-exp-sgcheck, a stack and global array overrun detector
Invalid read of size 1
at 0x........: local_strlen (bad_percentify.c:138)
# Remove preambly stuff; also postambly stuff
sed \
--e "/^exp-ptrcheck, a heap, stack and global array overrun detector$/d" \
+-e "/^exp-sgcheck, a stack and global array overrun detector$/d" \
-e "/^NOTE: This is an Experimental-Class Valgrind Tool$/d" \
-e "/^Copyright (C) 2003-201., and GNU GPL'd, by OpenWorks Ltd et al.$/d" \
-e "/^For counts of detected and suppressed errors, rerun with: -v$/d" |
Invalid read of size 2
at 0x........: main (globalerr.c:12)
Address 0x........ expected vs actual:
- Expected: global array "a" in object with soname "NONE"
+ Expected: global array "a" of size 14 in object with soname "NONE"
Actual: unknown
+ Actual: is 0 after Expected
Invalid read of size 2
at 0x........: main (globalerr.c:12)
Address 0x........ expected vs actual:
- Expected: global array "b" in object with soname "NONE"
+ Expected: global array "b" of size 14 in object with soname "NONE"
Actual: unknown
+ Actual: is 0 after Expected
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
by 0x........: BZ2_bzBuffToBuffCompress (hackedbz2.c:5638)
by 0x........: main (hackedbz2.c:6484)
Address 0x........ expected vs actual:
- Expected: global array "myprintf_buf" in object with soname "NONE"
+ Expected: global array "myprintf_buf" of size 70 in object with soname "NONE"
Actual: unknown
+ Actual: is 0 after Expected
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
<valgrindoutput>
<protocolversion>4</protocolversion>
-<protocoltool>exp-ptrcheck</protocoltool>
+<protocoltool>exp-sgcheck</protocoltool>
<preamble>
<line>...</line>
<pid>...</pid>
<ppid>...</ppid>
-<tool>exp-ptrcheck</tool>
+<tool>exp-sgcheck</tool>
<args>
<vargv>...</vargv>
</frame>
</stack>
<auxwhat>Address 0x........ expected vs actual:</auxwhat>
- <auxwhat>Expected: global array "ga" in object with soname "NONE"</auxwhat>
+ <auxwhat>Expected: global array "ga" of size 200 in object with soname "NONE"</auxwhat>
<auxwhat>Actual: unknown</auxwhat>
</error>
</frame>
</stack>
<auxwhat>Address 0x........ expected vs actual:</auxwhat>
- <auxwhat>Expected: stack array "la" in frame 1 back from here</auxwhat>
+ <auxwhat>Expected: stack array "la" of size 200 in frame 1 back from here</auxwhat>
<auxwhat>Actual: unknown</auxwhat>
</error>
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>Heap</kind>
- <what>Invalid read of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_stupid_malloc_stuff</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 1 bytes before the accessing pointer's</auxwhat>
- <auxwhat>legitimate range, a block of size 100 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_stupid_malloc_stuff</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>Heap</kind>
- <what>Invalid read of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_stupid_malloc_stuff</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 50 bytes inside the accessing pointer's</auxwhat>
- <auxwhat>once-legitimate range, a block of size 100 free'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>free</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_stupid_malloc_stuff</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>hsg.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
<status>
<state>FINISHED</state>
<count>...</count>
<unique>0x........</unique>
</pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
</errorcounts>
<suppcounts>...</suppcounts>
at 0x........: main (preen_invars.c:22)
Address 0x........ expected vs actual:
Expected: unknown
- Actual: global array "im_a_global_arr" in object with soname "preen_invars_so"
+ Actual: global array "im_a_global_arr" of size 10 in object with soname "preen_invars_so"
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
by 0x........: bar (stackerr.c:32)
by 0x........: main (stackerr.c:41)
Address 0x........ expected vs actual:
- Expected: stack array "a" in frame 2 back from here
+ Expected: stack array "a" of size 56 in frame 2 back from here
Actual: unknown
+ Actual: is 0 after Expected
Invalid write of size 8
at 0x........: main (stackerr.c:44)
Address 0x........ expected vs actual:
- Expected: stack array "a" in this frame
+ Expected: stack array "a" of size 56 in this frame
Actual: unknown
+ Actual: is 0 after Expected
Invalid write of size 1
at 0x........: _IO_default_xsputn (in /...libc...)
by 0x........: ...
by 0x........: main (stackerr.c:49)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 4 back from here
+ Expected: stack array "buf" of size 8 in frame 4 back from here
Actual: unknown
+ Actual: is 0 after Expected
ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)