Commit 1e645c51 authored by Cedric Roux's avatar Cedric Roux

T: bugfix: check limits

parent 69a84825
......@@ -71,6 +71,12 @@ event new_event(int type, int length, char *buffer, void *database)
e.buffer = buffer;
f = get_format(database, type);
if (f.count > T_MAX_ARGS) {
printf("fatal: the T trace %s is defined to take %d arguments, but T_MAX_ARGS is %d. "
"Increase T_MAX_ARGS in event.h and recompile all the tracers (make clean; make).\n",
event_name_from_id(database, type), f.count, T_MAX_ARGS);
exit(1);
}
e.ecount = f.count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment