|
From: <sv...@va...> - 2008-09-12 20:30:04
|
Author: sewardj
Date: 2008-09-12 21:30:14 +0100 (Fri, 12 Sep 2008)
New Revision: 8605
Log:
Add some regtest expected outputs, and fix nonsense code in stackerr.c.
Added:
branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc27-x86
branches/PTRCHECK/exp-ptrcheck/tests/stackerr.stderr.exp-glibc27-x86
Modified:
branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am
branches/PTRCHECK/exp-ptrcheck/tests/stackerr.c
Modified: branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am 2008-09-12 20:29:35 UTC (rev 8604)
+++ branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am 2008-09-12 20:30:14 UTC (rev 8605)
@@ -30,6 +30,7 @@
base.stderr.exp-glibc25-amd64 base.stderr.exp-glibc25-x86 \
ccc.vgtest \
ccc.stderr.exp-glibc25-x86 ccc.stderr.exp-glibc25-amd64 \
+ ccc.stderr.exp-glibc27-x86 \
cmp.vgtest-disabled cmp.stderr.exp \
globalerr.vgtest globalerr.stdout.exp \
globalerr.stderr.exp-glibc28-amd64 \
@@ -55,7 +56,7 @@
realloc.stderr.exp-glibc25-x86 realloc.stderr.exp-glibc25-amd64 \
sh_script.vgtest-disabled sh_script.stderr.exp \
stackerr.vgtest stackerr.stdout.exp \
- stackerr.stderr.exp-glibc28-amd64 \
+ stackerr.stderr.exp-glibc28-amd64 stackerr.stderr.exp-glibc27-x86 \
strcpy.vgtest strcpy.stderr.exp \
strlen_bad.vgtest-disabled strlen_bad.stderr.exp \
strlen_good.vgtest-disabled strlen_good.stderr.exp \
Added: branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc27-x86
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc27-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc27-x86 2008-09-12 20:30:14 UTC (rev 8605)
@@ -0,0 +1,45 @@
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:20)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:8)
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:21)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: operator new(unsigned) (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:9)
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:22)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 40 alloc'd
+ at 0x........: operator new[](unsigned) (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:10)
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:23)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:11)
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:24)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:12)
+
+Invalid read of size 4
+ at 0x........: main (ccc.cpp:25)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ by 0x........: posix_memalign (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:14)
+
+ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Modified: branches/PTRCHECK/exp-ptrcheck/tests/stackerr.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/stackerr.c 2008-09-12 20:29:35 UTC (rev 8604)
+++ branches/PTRCHECK/exp-ptrcheck/tests/stackerr.c 2008-09-12 20:30:14 UTC (rev 8605)
@@ -20,14 +20,14 @@
#include <stdio.h>
-__attribute__((noinline)) foo ( long* sa, int n )
+__attribute__((noinline)) void foo ( long* sa, int n )
{
int i;
for (i = 0; i < n; i++)
sa[i] = 0;
}
-__attribute__((noinline)) bar ( long* sa, int n )
+__attribute__((noinline)) void bar ( long* sa, int n )
{
foo(sa, n);
}
Added: branches/PTRCHECK/exp-ptrcheck/tests/stackerr.stderr.exp-glibc27-x86
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/stackerr.stderr.exp-glibc27-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/stackerr.stderr.exp-glibc27-x86 2008-09-12 20:30:14 UTC (rev 8605)
@@ -0,0 +1,26 @@
+
+Invalid write of size 4
+ at 0x........: foo (stackerr.c:27)
+ 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
+ Actual: stack array "beforea" in frame 2 back from here
+
+Invalid write of size 4
+ at 0x........: main (stackerr.c:44)
+ Address 0x........ expected vs actual:
+ Expected: stack array "a" in this frame
+ Actual: stack array "beforea" in this frame
+
+Invalid write of size 1
+ at 0x........: _IO_default_xsputn (in /...libc...)
+ by 0x........: ...
+ by 0x........: ...
+ by 0x........: ...
+ by 0x........: main (stackerr.c:49)
+ Address 0x........ expected vs actual:
+ Expected: stack array "buf" in frame 4 back from here
+ Actual: stack array "beforebuf" in frame 4 back from here
+
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
|