if (VG_(clo_xml))
VG_(message)(Vg_UserMsg, "</valgrindoutput>\n");
VG_(message)(Vg_UserMsg,
- "FATAL: in suppressions file \"%s\" around line %d:",
+ "FATAL: in suppressions file \"%s\" near line %d:",
filename, lineno );
VG_(message)(Vg_UserMsg,
" %s", err_str );
Int i, j;
static Char caller_name[ERRTXT_LEN]; /* NOT IN FRAME */
+ vg_assert(n_ips > 0 && n_callers > 0);
i = j = 0;
while (i < n_callers) {
Addr a = trace[j];
VG_(strcpy)(caller_name, "???");
break;
case DotDotDot:
+ caller_name[0] = 0; /* precautionary */
break;
default:
VG_(tool_panic)("supp_wildmatch_callers");
/* Handle frame-level wildcard case */
Char *lookahead;
- // collapse subsequent wildcards
- while (i < n_callers && callers[i].ty == DotDotDot)
+ // collapse subsequent wildcards
+ while (i < n_callers && callers[i].ty == DotDotDot)
++i;
- --i;
+ --i;
if (i == n_callers-1)
// wildcard at the top, doesn't matter
return True;
- lookahead = callers[i+1].name;
+ vg_assert(i >= 0 && i+1 < n_callers);
+ lookahead = callers[i+1].name;
while (j < n_ips) {
static Char tmp[ERRTXT_LEN]; /* NOT IN FRAME */
<formalpara><title>Note:</title> <para>By far the easiest way to add
suppressions is to use the <option>--gen-suppressions=yes</option> flag
-described in <xref linkend="manual-core.flags"/>.</para>
+described in <xref linkend="manual-core.flags"/>. This generates
+suppressions automatically. For best results,
+though, you may want to edit the output
+ of <option>--gen-suppressions=yes</option> by hand, in which
+case it would be advisable to read through this section.
+</para>
</formalpara>
<para>Each error to be suppressed is described very specifically, to
required.</para>
<para>Note that the suppressions printed are as specific as
- possible. You may want to common up similar ones, eg. by adding
- wildcards to function names. Sometimes two different errors
+ possible. You may want to common up similar ones, by adding
+ wildcards to function names, and by using frame-level wildcards.
+ The wildcarding facilities are powerful yet flexible, and with a
+ bit of careful editing, you may be able to suppress a whole
+ family of related errors with only a few suppressions. For
+ details on how to do this, see
+ <xref linkend="manual-core.suppress"/>.</para>
+
+ <para>Sometimes two different errors
are suppressed by the same suppression, in which case Valgrind
will output the suppression more than once, but you only need to
have one copy in your suppression file (but having more than one
<computeroutput>make</computeroutput>, <computeroutput>make
install</computeroutput> mechanism, and we have attempted to
ensure that it works on machines with kernel 2.4 or 2.6 and glibc
-2.2.X to 2.5.X. Once you have completed
+2.2.X to 2.9.X. Once you have completed
<computeroutput>make install</computeroutput> you may then want
to run the regression tests
with <computeroutput>make regtest</computeroutput>.