|
From: <sv...@va...> - 2008-08-04 16:33:40
|
Author: sewardj
Date: 2008-08-04 17:33:46 +0100 (Mon, 04 Aug 2008)
New Revision: 8509
Log:
Add 64-bit expected outputs for regtests, extra comments, fix 64-bit bugs.
Added:
branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-amd64
branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-x86
branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-amd64
branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-x86
branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp-glibc25-x86
branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-amd64
branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-x86
branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-amd64
branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-x86
branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-amd64
branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-x86
Removed:
branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp
branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp
branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp
branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp
branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp
branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp
Modified:
branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am
branches/PTRCHECK/exp-ptrcheck/tests/partial.c
branches/PTRCHECK/exp-ptrcheck/tests/realloc.c
branches/PTRCHECK/exp-ptrcheck/tests/strcpy.c
branches/PTRCHECK/exp-ptrcheck/tests/unaligned.c
Modified: branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/Makefile.am 2008-08-04 16:33:46 UTC (rev 8509)
@@ -26,8 +26,10 @@
and.vgtest-disabled and.stderr.exp \
arith.vgtest-disabled arith.stderr.exp \
arith_include1.c arith_include2.c \
- base.vgtest base.stderr.exp \
- ccc.vgtest ccc.stderr.exp \
+ base.vgtest \
+ base.stderr.exp-glibc25-amd64 base.stderr.exp-glibc25-x86 \
+ ccc.vgtest \
+ ccc.stderr.exp-glibc25-x86 ccc.stderr.exp-glibc25-amd64 \
cmp.vgtest-disabled cmp.stderr.exp \
fp.vgtest fp.stderr.exp \
hp_bounds.vgtest hp_bounds.stderr.exp \
@@ -39,11 +41,16 @@
neg.vgtest-disabled neg.stderr.exp \
not.vgtest-disabled not.stderr.exp \
or.vgtest-disabled or.stderr.exp \
- partial_bad.vgtest partial_bad.stderr.exp \
- partial_good.vgtest partial_good.stderr.exp \
+ partial_bad.vgtest \
+ partial_bad.stderr.exp-glibc25-x86 \
+ partial_bad.stderr.exp-glibc25-amd64 \
+ partial_good.vgtest \
+ partial_good.stderr.exp-glibc25-x86 \
+ partial_good.stderr.exp-glibc25-amd64 \
pth_create.vgtest pth_create.stderr.exp \
pth_specific.vgtest pth_specific.stderr.exp \
- realloc.vgtest realloc.stderr.exp \
+ realloc.vgtest \
+ realloc.stderr.exp-glibc25-x86 realloc.stderr.exp-glibc25-amd64 \
sh_script.vgtest-disabled sh_script.stderr.exp \
strcpy.vgtest strcpy.stderr.exp \
strlen_bad.vgtest-disabled strlen_bad.stderr.exp \
@@ -53,7 +60,8 @@
suppgen.vgtest-disabled suppgen.stderr.exp suppgen.stdin \
syscall.vgtest-disabled syscall.stderr.exp \
tricky.vgtest tricky.stderr.exp \
- unaligned.vgtest unaligned.stderr.exp \
+ unaligned.vgtest \
+ unaligned.stderr.exp-glibc25-x86 unaligned.stderr.exp-glibc25-amd64 \
xor.vgtest-disabled xor.stderr.exp \
zero.vgtest zero.stderr.exp
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,35 +0,0 @@
-
-about to do 14 [0]
-about to do 14 [-1]
-Invalid read of size 4
- at 0x........: main (base.c:14)
- Address 0x........ is 4 bytes before the accessing pointer's
- legitimate range, a block of size 40 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
-about to do 16 [0]
-about to do 16 [-1]
-about to do 18 [0]
-about to do 18 [-1]
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (base.c:20)
- Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (base.c:20)
- Address 0x........ is not derived from any known block
-about to do 22 [0]
-
-Invalid read of size 4
- at 0x........: main (base.c:22)
- Address 0x........ is not derived from any known block
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (base.c:22)
- Address 0x........ is not derived from any known block
-
-ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
Added: branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-amd64
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-amd64 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-amd64 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,35 @@
+
+about to do 14 [0]
+about to do 14 [-1]
+Invalid read of size 8
+ at 0x........: main (base.c:14)
+ Address 0x........ is 8 bytes before the accessing pointer's
+ legitimate range, a block of size 80 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (arith_include2.c:22)
+about to do 16 [0]
+about to do 16 [-1]
+about to do 18 [0]
+about to do 18 [-1]
+about to do 20 [0]
+
+Invalid read of size 8
+ at 0x........: main (base.c:20)
+ Address 0x........ is not derived from any known block
+about to do 20 [-1]
+
+Invalid read of size 8
+ at 0x........: main (base.c:20)
+ Address 0x........ is not derived from any known block
+about to do 22 [0]
+
+Invalid read of size 8
+ at 0x........: main (base.c:22)
+ Address 0x........ is not derived from any known block
+about to do 22 [-1]
+
+Invalid read of size 8
+ at 0x........: main (base.c:22)
+ Address 0x........ is not derived from any known block
+
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-x86 (from rev 8507, branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/base.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,35 @@
+
+about to do 14 [0]
+about to do 14 [-1]
+Invalid read of size 4
+ at 0x........: main (base.c:14)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 40 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (arith_include2.c:22)
+about to do 16 [0]
+about to do 16 [-1]
+about to do 18 [0]
+about to do 18 [-1]
+about to do 20 [0]
+
+Invalid read of size 4
+ at 0x........: main (base.c:20)
+ Address 0x........ is not derived from any known block
+about to do 20 [-1]
+
+Invalid read of size 4
+ at 0x........: main (base.c:20)
+ Address 0x........ is not derived from any known block
+about to do 22 [0]
+
+Invalid read of size 4
+ at 0x........: main (base.c:22)
+ Address 0x........ is not derived from any known block
+about to do 22 [-1]
+
+Invalid read of size 4
+ at 0x........: main (base.c:22)
+ Address 0x........ is not derived from any known block
+
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,45 +0,0 @@
-
-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:22)
- 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:23)
- 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: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........: posix_memalign (vg_replace_malloc.c:...)
- by 0x........: main (ccc.cpp:14)
-
-ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Added: branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-amd64
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-amd64 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-amd64 2008-08-04 16:33:46 UTC (rev 8509)
@@ -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 long) (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 long) (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:10)
+
+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 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:23)
+ 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: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........: posix_memalign (vg_replace_malloc.c:...)
+ by 0x........: main (ccc.cpp:14)
+
+ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-x86 (from rev 8507, branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/ccc.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -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:22)
+ 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:23)
+ 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: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........: 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/partial.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial.c 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial.c 2008-08-04 16:33:46 UTC (rev 8509)
@@ -14,7 +14,7 @@
int* y6 = malloc(6);
int* y7 = malloc(7);
- #define ADDB(ptr, n) ((long*)(((unsigned long)(ptr)) + (n)))
+ #define ADDB(ptr, n) ((int*)(((unsigned long)(ptr)) + (n)))
// All these overrun by a single byte; the reads are happening at
// different alignments.
@@ -32,17 +32,21 @@
// These are all bad, at different points along
x = * ADDB(x3,-1); // before
- x = * ADDB(x3, 0); // inside // ok if --partial-loads-ok=yes
- x = * ADDB(x3, 1); // inside
- x = * ADDB(x3, 2); // inside
+ x = * ADDB(x3, 0); // inside // ok if --partial-loads-ok=yes ...
+ x = * ADDB(x3, 1); // inside // ... but only on 32 bit platforms
+ x = * ADDB(x3, 2); // inside // ... ditto
x = * ADDB(x3, 3); // after
// These are all bad
- f = * f3; // ok if --partial-loads-ok=yes
+ f = * f3; // ok if --partial-loads-ok=yes // ... ditto
d = * d7;
- lli = * lli7; // ok if --partial-loads-ok=yes
+ lli = * lli7; // ok if --partial-loads-ok=yes see XXX below
c = * c0;
s = * s1;
return 0;
}
+
+/* Note re XXX, this gives different behaviour on 32 and 64 bit
+platforms, because on 64-bit it's one load whereas as on 32 bit
+platforms it's necessarily 2 32-bit loads, and the first one is OK. */
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,107 +0,0 @@
-
-Invalid read of size 4
- at 0x........: main (partial.c:21)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:22)
- Address 0x........ is 1 bytes inside the accessing pointer's
- legitimate range, a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:7)
-
-Invalid read of size 4
- at 0x........: main (partial.c:23)
- Address 0x........ is 2 bytes inside the accessing pointer's
- legitimate range, a block of size 5 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:8)
-
-Invalid read of size 4
- at 0x........: main (partial.c:24)
- Address 0x........ is 3 bytes inside the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:9)
-
-Invalid read of size 4
- at 0x........: main (partial.c:25)
- Address 0x........ is 4 bytes inside the accessing pointer's
- legitimate range, a block of size 7 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:10)
-
-Invalid read of size 4
- at 0x........: main (partial.c:34)
- Address 0x........ is 1 bytes before the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:35)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:36)
- Address 0x........ is 1 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:37)
- Address 0x........ is 2 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:38)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:41)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 8
- at 0x........: main (partial.c:42)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 7 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:7)
-
-Invalid read of size 4
- at 0x........: main (partial.c:43)
- Address 0x........ is 4 bytes inside the accessing pointer's
- legitimate range, a block of size 7 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:8)
-
-Invalid read of size 1
- at 0x........: main (partial.c:44)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 0 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:9)
-
-Invalid read of size 2
- at 0x........: main (partial.c:45)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 1 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:10)
-
-ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp-glibc25-x86 (from rev 8499, branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial_bad.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,107 @@
+
+Invalid read of size 4
+ at 0x........: main (partial.c:21)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:22)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:7)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:23)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 5 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:8)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:24)
+ Address 0x........ is 3 bytes inside the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:25)
+ Address 0x........ is 4 bytes inside the accessing pointer's
+ legitimate range, a block of size 7 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:10)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:34)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:35)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:36)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:37)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:38)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:41)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 8
+ at 0x........: main (partial.c:42)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 7 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:7)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:43)
+ Address 0x........ is 4 bytes inside the accessing pointer's
+ legitimate range, a block of size 7 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:8)
+
+Invalid read of size 1
+ at 0x........: main (partial.c:44)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 0 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 2
+ at 0x........: main (partial.c:45)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:10)
+
+ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 0 from 0)
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,72 +0,0 @@
-
-Invalid read of size 4
- at 0x........: main (partial.c:22)
- Address 0x........ is 1 bytes inside the accessing pointer's
- legitimate range, a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:7)
-
-Invalid read of size 4
- at 0x........: main (partial.c:23)
- Address 0x........ is 2 bytes inside the accessing pointer's
- legitimate range, a block of size 5 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:8)
-
-Invalid read of size 4
- at 0x........: main (partial.c:24)
- Address 0x........ is 3 bytes inside the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:9)
-
-Invalid read of size 4
- at 0x........: main (partial.c:34)
- Address 0x........ is 1 bytes before the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:36)
- Address 0x........ is 1 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:37)
- Address 0x........ is 2 bytes inside the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 4
- at 0x........: main (partial.c:38)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:6)
-
-Invalid read of size 8
- at 0x........: main (partial.c:42)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 7 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:7)
-
-Invalid read of size 1
- at 0x........: main (partial.c:44)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 0 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:9)
-
-Invalid read of size 2
- at 0x........: main (partial.c:45)
- Address 0x........ is 0 bytes inside the accessing pointer's
- legitimate range, a block of size 1 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (partial.c:10)
-
-ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
Added: branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-amd64
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-amd64 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-amd64 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,93 @@
+
+Invalid read of size 4
+ at 0x........: main (partial.c:21)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:22)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:7)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:23)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 5 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:8)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:24)
+ Address 0x........ is 3 bytes inside the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:25)
+ Address 0x........ is 4 bytes inside the accessing pointer's
+ legitimate range, a block of size 7 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:10)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:34)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:35)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:36)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:37)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:38)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:41)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 1
+ at 0x........: main (partial.c:44)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 0 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 2
+ at 0x........: main (partial.c:45)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:10)
+
+ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-x86 (from rev 8499, branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/partial_good.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,72 @@
+
+Invalid read of size 4
+ at 0x........: main (partial.c:22)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:7)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:23)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 5 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:8)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:24)
+ Address 0x........ is 3 bytes inside the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:34)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:36)
+ Address 0x........ is 1 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:37)
+ Address 0x........ is 2 bytes inside the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 4
+ at 0x........: main (partial.c:38)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:6)
+
+Invalid read of size 8
+ at 0x........: main (partial.c:42)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 7 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:7)
+
+Invalid read of size 1
+ at 0x........: main (partial.c:44)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 0 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:9)
+
+Invalid read of size 2
+ at 0x........: main (partial.c:45)
+ Address 0x........ is 0 bytes inside the accessing pointer's
+ legitimate range, a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial.c:10)
+
+ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
Modified: branches/PTRCHECK/exp-ptrcheck/tests/realloc.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/realloc.c 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/realloc.c 2008-08-04 16:33:46 UTC (rev 8509)
@@ -5,7 +5,7 @@
{
int i;
int* y;
- int** x = malloc(sizeof(int) * 100);
+ int** x = malloc(sizeof(int*) * 100);
int* x2 = malloc(sizeof(int) * 100);
void* sink;
x[0] = x2; // this is to check the pointerness is copied across ok
@@ -14,7 +14,7 @@
i = *x[0];
i = *x[49];
- x = realloc(x, sizeof(int)*50); // smaller
+ x = realloc(x, sizeof(int*)*50); // smaller
y = x[0]; // ok
y = x[49]; // ok
y = x[-1]; // bad
@@ -22,7 +22,7 @@
i = *x[0]; // ok
i = *x[49]; // ok
- x = realloc(x, sizeof(int)*50); // same size
+ x = realloc(x, sizeof(int*)*50); // same size
y = x[0]; // ok
y = x[49]; // ok
y = x[-1]; // bad
@@ -30,7 +30,7 @@
i = *x[0]; // ok
i = *x[49]; // ok
- x = realloc(x, sizeof(int)*100); // bigger
+ x = realloc(x, sizeof(int*)*100); // bigger
y = x[0]; // ok
y = x[49]; // ok
y = x[50]; // ok
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,44 +0,0 @@
-
-Invalid read of size 4
- at 0x........: main (realloc.c:20)
- Address 0x........ is 4 bytes before the accessing pointer's
- legitimate range, a block of size 200 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:17)
-
-Invalid read of size 4
- at 0x........: main (realloc.c:21)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 200 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:17)
-
-Invalid read of size 4
- at 0x........: main (realloc.c:28)
- Address 0x........ is 4 bytes before the accessing pointer's
- legitimate range, a block of size 200 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:25)
-
-Invalid read of size 4
- at 0x........: main (realloc.c:29)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 200 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:25)
-
-Invalid read of size 4
- at 0x........: main (realloc.c:38)
- Address 0x........ is 4 bytes before the accessing pointer's
- legitimate range, a block of size 400 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:33)
-
-Invalid read of size 4
- at 0x........: main (realloc.c:39)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 400 alloc'd
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (realloc.c:33)
-
-ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Added: branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-amd64
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-amd64 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-amd64 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,44 @@
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:20)
+ Address 0x........ is 8 bytes before the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:17)
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:21)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:17)
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:28)
+ Address 0x........ is 8 bytes before the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:25)
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:29)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:25)
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:38)
+ Address 0x........ is 8 bytes before the accessing pointer's
+ legitimate range, a block of size 800 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:33)
+
+Invalid read of size 8
+ at 0x........: main (realloc.c:39)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 800 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:33)
+
+ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-x86 (from rev 8499, branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/realloc.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,44 @@
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:20)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 200 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:17)
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:21)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 200 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:17)
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:28)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 200 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:25)
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:29)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 200 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:25)
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:38)
+ Address 0x........ is 4 bytes before the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:33)
+
+Invalid read of size 4
+ at 0x........: main (realloc.c:39)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 400 alloc'd
+ at 0x........: realloc (vg_replace_malloc.c:...)
+ by 0x........: main (realloc.c:33)
+
+ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Modified: branches/PTRCHECK/exp-ptrcheck/tests/strcpy.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/strcpy.c 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/strcpy.c 2008-08-04 16:33:46 UTC (rev 8509)
@@ -8,7 +8,7 @@
char* my_strcpy (char* dest, const char* src)
{
char c, *s = (char *) src;
- int off = dest - s;
+ long off = dest - s;
off = off - 1;
do {
c = *s++;
@@ -26,13 +26,13 @@
char u2[13];
// All these are legit
- p1[p2-p1] = 0; // p-p (must be BADSEG'd)
+ p1[p2-p1] = 0; // p-p (must be BADSEG'd) // ea is p2[0]
u1[p2-u1] = 0; // p-?
p1[u2-p1] = 0; // ?-p (must be BADSEG'd)
u1[u2-u1] = 0; // ?-?
// All these are a 1-byte underrun
- p1[p2-p1-1] = 0; // p-p (must be BADSEG'd)
+ p1[p2-p1-1] = 0; // p-p (must be BADSEG'd) // ea is p2[-1]
u1[p2-u1-1] = 0; // p-? (undet)
p1[u2-p1-1] = 0; // ?-p (must be BADSEG'd)
u1[u2-u1-1] = 0; // ?-? (undet)
Modified: branches/PTRCHECK/exp-ptrcheck/tests/unaligned.c
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/unaligned.c 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/unaligned.c 2008-08-04 16:33:46 UTC (rev 8509)
@@ -30,17 +30,22 @@
c = (*p4)[5];
// These 10 are bad
- c = (*p0)[-1];
+ c = (*p0)[-1]; // always word aligned, so det
c = (*p1)[-1]; // undet
c = (*p2)[-1]; // undet
c = (*p3)[-1]; // undet
- c = (*p4)[-1];
+ c = (*p4)[-1]; // undet on 64-bit since not 64-bit aligned
- c = (*p0)[6];
+ c = (*p0)[6]; // always word aligned, so det
c = (*p1)[6]; // undet
c = (*p2)[6]; // undet
c = (*p3)[6]; // undet
- c = (*p4)[6];
+ c = (*p4)[6]; // undet on 64-bit since not 64-bit aligned
return 0;
}
+
+/* What this program does: verifies that (unfortunately) if you store a
+ pointer misaligned, then the associated shadow value decays to Unknown,
+ and so when you retrieve the pointer later and dereference it, you
+ get no check :-( */
Deleted: branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp 2008-08-04 14:53:51 UTC (rev 8508)
+++ branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp 2008-08-04 16:33:46 UTC (rev 8509)
@@ -1,34 +0,0 @@
-
-Invalid read of size 1
- at 0x........: main (unaligned.c:33)
- Address 0x........ is 1 bytes before the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: ...
- by 0x........: main (unaligned.c:8)
-
-Invalid read of size 1
- at 0x........: main (unaligned.c:37)
- Address 0x........ is 1 bytes before the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: ...
- by 0x........: main (unaligned.c:8)
-
-Invalid read of size 1
- at 0x........: main (unaligned.c:39)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: ...
- by 0x........: main (unaligned.c:8)
-
-Invalid read of size 1
- at 0x........: main (unaligned.c:43)
- Address 0x........ is 0 bytes after the accessing pointer's
- legitimate range, a block of size 6 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: ...
- by 0x........: main (unaligned.c:8)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
Added: branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-amd64
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-amd64 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-amd64 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,18 @@
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:33)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:39)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Copied: branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-x86 (from rev 8499, branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp)
===================================================================
--- branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-x86 (rev 0)
+++ branches/PTRCHECK/exp-ptrcheck/tests/unaligned.stderr.exp-glibc25-x86 2008-08-04 16:33:46 UTC (rev 8509)
@@ -0,0 +1,34 @@
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:33)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:37)
+ Address 0x........ is 1 bytes before the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:39)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+Invalid read of size 1
+ at 0x........: main (unaligned.c:43)
+ Address 0x........ is 0 bytes after the accessing pointer's
+ legitimate range, a block of size 6 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: ...
+ by 0x........: main (unaligned.c:8)
+
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
|