suppressions file. */
static Supp* vg_suppressions = NULL;
-/* And a helper function so the leak detector can get hold of it. */
-Supp* VG_(get_suppressions) ( void ) { return vg_suppressions; }
-
/* Running count of unsuppressed errors detected. */
UInt VG_(n_errs_found) = 0;
return;
}
- if (stop_at > 3) stop_at = 3; /* At most three names */
+ if (stop_at > 4) stop_at = 4; /* At most four names */
vg_assert(stop_at > 0);
VG_(printf)("{\n");
goto syntax_error;
/* "i > 0" ensures at least one caller read. */
- for (i = 0; i < VG_N_SUPP_CALLERS; i++) {
+ for (i = 0; i <= VG_N_SUPP_CALLERS; i++) {
eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof) goto syntax_error;
if (i > 0 && VG_STREQ(buf, "}"))
break;
+ if (i == VG_N_SUPP_CALLERS)
+ break;
supp->caller[i] = VG_(arena_strdup)(VG_AR_CORE, buf);
if (!setLocationTy(&(supp->caller[i]), &(supp->caller_ty[i])))
goto syntax_error;
{
Int i;
- for (i = 0; su->caller[i] != NULL; i++) {
+ for (i = 0; i < VG_N_SUPP_CALLERS && su->caller[i] != NULL; i++) {
switch (su->caller_ty[i]) {
case ObjName: if (VG_(string_match)(su->caller[i],
caller_obj[i])) break;
extern void VG_(show_all_errors) ( void );
-/* Get hold of the suppression list ... just so we don't have to
- make it global. */
-extern Supp* VG_(get_suppressions) ( void );
-
extern Bool VG_(is_action_requested) ( Char* action, Bool* clo );
extern void VG_(gen_suppression) ( Error* err );
/* This is the argument to __NR_exit() supplied by the first thread to
call that syscall. We eventually pass that to __NR_exit() for
real. */
-extern UInt VG_(exitcode);
+extern Int VG_(exitcode);
/* --- Counters, for informational purposes only. --- */
/* This is the argument to __NR_exit() supplied by the first thread to
call that syscall. We eventually pass that to __NR_exit() for
real. */
-UInt VG_(exitcode) = 0;
+Int VG_(exitcode) = 0;
/* Tell the logging mechanism whether we are logging to a file
descriptor or a socket descriptor. */