11 May 2009
Protocols 1 through 3 supported Memcheck only. Protocol 4 provides
-XML output for Memcheck, Helgrind and Ptrcheck. Technically there are
+XML output for Memcheck, Helgrind and SGcheck. Technically there are
three variants of Protocol 4, one for each tool, since they produce
different errors. The three variants differ only in the definition of
the ERROR nonterminal and are otherwise identical.
The definition of Protocol 4 now follows. It is structured similarly
to that of the previous protocols, except that there is a separate
definition of a nonterminal called TOOLSPECIFIC for each of Memcheck,
-Helgrind and Ptrcheck. The XWHAT and XAUXWHAT nonterminals also have
+Helgrind and SGcheck. The XWHAT and XAUXWHAT nonterminals also have
tool-specific components. Apart from that, the structure is common
to all supported tools.
</status>
* Zero or more of (either ERRORCOUNTS or TOOLSPECIFIC). In Memcheck's
- case these will be complaints from the leak checker. For Ptrcheck
+ case these will be complaints from the leak checker. For SGcheck
and Helgrind we don't expect any output here (but the spec does not
guarantee that either).
====================================================================
-TOOLSPECIFIC definition for Ptrcheck
-------------------------------------
+TOOLSPECIFIC definition for SGcheck
+-----------------------------------
-For Ptrcheck, a TOOLSPECIFIC is simply an ERROR:
+For SGcheck, a TOOLSPECIFIC is simply an ERROR:
TOOLSPECIFIC = ERROR
-ERROR details for Ptrcheck
---------------------------
+ERROR details for SGcheck
+-------------------------
-Ptrcheck does not produce any XWHAT records, despite the fact that
+SGcheck does not produce any XWHAT records, despite the fact that
"ERROR definition -- common structure" says that tools may do so.
* <dir>TEXT</dir>, as defined in FRAME
-KIND for Ptrcheck
------------------
+KIND for SGcheck
+----------------
This is a small enumeration indicating roughly the nature of an error.
The possible values are:
overrun of a stack or global array). The <auxwhat> blocks give
further details.
- Heap
-
- Usage of a pointer derived from a heap block, to access
- outside that heap block
-
- Arith
-
- Doing arithmetic on pointers in a way that cannot possibly
- result in another valid pointer. Eg, adding two pointer values.
-
- SysParam
-
- Special case of "Heap", in which the invalidly-addressed memory
- is presented as an argument to a system call which reads or
- writes memory.
-
====================================================================
</programlisting>
</question>
<answer id="a-overruns">
- <para>Unfortunately, Memcheck doesn't do bounds checking on static
+ <para>Unfortunately, Memcheck doesn't do bounds checking on global
or stack arrays. We'd like to, but it's just not possible to do in
a reasonable way that fits with how Memcheck works. Sorry.</para>
- <para>However, the experimental tool Ptrcheck can detect errors like
- this. Run Valgrind with the <option>--tool=exp-ptrcheck</option> option
- to try it, but beware that it is not as robust as Memcheck.</para>
+ <para>However, the experimental tool SGcheck can detect errors like
+ this. Run Valgrind with the <option>--tool=exp-sgcheck</option> option
+ to try it, but be aware that it is not as robust as Memcheck.</para>
</answer>
</qandaentry>
</listitem>
<listitem>
- <para><command>Ptrcheck</command> is an experimental heap, stack and
- global array overrun detector. Its functionality overlaps somewhat
- with Memcheck's, but it can find some problems that Memcheck would
- miss.</para>
+ <para><command>SGcheck</command> is an experimental tool that can
+ detect overruns of stack and global arrays. Its functionality is
+ complementary to that of Memcheck: SGcheck finds problems that
+ Memcheck can't, and vice versa..</para>
</listitem>
<listitem>