Remove old exp-ptrcheck tests which were never used.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11750 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-sgcheck/tests/Makefile.am b/exp-sgcheck/tests/Makefile.am
index 245fa4a..fc74c91 100644
--- a/exp-sgcheck/tests/Makefile.am
+++ b/exp-sgcheck/tests/Makefile.am
@@ -1,49 +1,28 @@
include $(top_srcdir)/Makefile.tool-tests.am
-dist_noinst_SCRIPTS = filter_stderr filter_add filter_suppgen \
- sh_script
+dist_noinst_SCRIPTS = filter_stderr filter_add filter_suppgen
EXTRA_DIST = \
is_arch_supported \
- add.vgtest-disabled add.stderr.exp \
- and.vgtest-disabled and.stderr.exp \
- arith.vgtest-disabled arith.stderr.exp \
- arith_include1.c arith_include2.c \
bad_percentify.vgtest bad_percentify.c \
bad_percentify.stdout.exp bad_percentify.stderr.exp-glibc28-amd64 \
- cmp.vgtest-disabled cmp.stderr.exp \
globalerr.vgtest globalerr.stdout.exp \
globalerr.stderr.exp-glibc28-amd64 \
hackedbz2.vgtest hackedbz2.stdout.exp \
hackedbz2.stderr.exp-glibc28-amd64 \
hsg.vgtest hsg.stdout.exp hsg.stderr.exp \
- idiv.vgtest-disabled idiv.stderr.exp \
- imul.vgtest-disabled imul.stderr.exp \
- mm.vgtest-disabled mm.stderr.exp \
- neg.vgtest-disabled neg.stderr.exp \
- not.vgtest-disabled not.stderr.exp \
- or.vgtest-disabled or.stderr.exp \
preen_invars.vgtest preen_invars.stdout.exp \
preen_invars.stderr.exp-glibc28-amd64 \
- sh_script.vgtest-disabled sh_script.stderr.exp \
stackerr.vgtest stackerr.stdout.exp \
- stackerr.stderr.exp-glibc28-amd64 stackerr.stderr.exp-glibc27-x86 \
- strlen_bad.vgtest-disabled strlen_bad.stderr.exp \
- strlen_good.vgtest-disabled strlen_good.stderr.exp \
- sub.vgtest-disabled sub.stderr.exp \
- suppgen.vgtest-disabled suppgen.stderr.exp suppgen.stdin \
- syscall.vgtest-disabled syscall.stderr.exp \
- xor.vgtest-disabled xor.stderr.exp
+ stackerr.stderr.exp-glibc28-amd64 stackerr.stderr.exp-glibc27-x86
check_PROGRAMS = \
- add and arith bad_percentify cmp \
+ bad_percentify \
globalerr hackedbz2 \
- hsg idiv imul \
- mm not neg or \
+ hsg \
preen_invars preen_invars_so.so \
- stackerr \
- strlen sub syscall xor
+ stackerr
# DDD: not sure if these ones should work on Darwin or not... if not, should
# be moved into x86-linux/.
diff --git a/exp-sgcheck/tests/add.c b/exp-sgcheck/tests/add.c
deleted file mode 100644
index f861a62..0000000
--- a/exp-sgcheck/tests/add.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // ADD =========================================================
- g(+, n, n, n); // det, det
-
- g(+, n, p, p); // ok, det
-
- g(+, p, n, p); // ok, det
-
- g(+, p, p, e); // detected bad add; det, det
-
- g(+, n, un, u); // undet, undet
- g(+, n, up, u); // ok, undet
-
- g(+, un, n, u); // undet, undet
- g(+, up, n, u); // ok, undet
-
- g(+, un, un, u); // undet, undet
- g(+, un, up, u); // undet, undet
- g(+, up, un, u); // undet, undet
- g(+, up, up, u); // undetected bad add; undet, undet
-
- g(+, un, p, u); // undet, undet
- g(+, up, p, u); // undetected bad add; undet, undet
-
- g(+, p, un, u); // undet, undet
- g(+, p, up, u); // undetected bad add; undet, undet
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/add.stderr.exp b/exp-sgcheck/tests/add.stderr.exp
deleted file mode 100644
index e4e0f11..0000000
--- a/exp-sgcheck/tests/add.stderr.exp
+++ /dev/null
@@ -1,70 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (add.c:14)
- Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (add.c:14)
- Address 0x........ is not derived from any known block
-about to do 16 [0]
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (add.c:16)
- 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 18 [0]
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (add.c:18)
- 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)
-
-Invalid arguments to Add32/Add64
- at 0x........: main (add.c:20)
- Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (add.c:20)
- Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (add.c:20)
- Address 0x........ is not derived from any known block
-about to do 22 [0]
-about to do 22 [-1]
-about to do 23 [0]
-about to do 23 [-1]
-about to do 25 [0]
-about to do 25 [-1]
-about to do 26 [0]
-about to do 26 [-1]
-about to do 28 [0]
-about to do 28 [-1]
-about to do 29 [0]
-about to do 29 [-1]
-about to do 30 [0]
-about to do 30 [-1]
-about to do 31 [0]
-about to do 31 [-1]
-about to do 33 [0]
-about to do 33 [-1]
-about to do 34 [0]
-about to do 34 [-1]
-about to do 36 [0]
-about to do 36 [-1]
-about to do 37 [0]
-about to do 37 [-1]
-
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/add.vgtest-disabled b/exp-sgcheck/tests/add.vgtest-disabled
deleted file mode 100644
index 1fb7c79..0000000
--- a/exp-sgcheck/tests/add.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: add
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/and.c b/exp-sgcheck/tests/and.c
deleted file mode 100644
index 09a1ef5..0000000
--- a/exp-sgcheck/tests/and.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // Not testing the n&p-->p type cases, too hard to find an 'n' that gives
- // something that looks like a pointer! (Eg. if the pointer is
- // 0x40c38000, masking to 0x40000000 won't give invalid memory, and
- // masking below that, eg. to 0x00c38000 doesn't give a pointer result.)
-
- // AND =========================================================
- g(&, n, n, n); // det, det
-
- g(&, n, p, n); // det, det
- g(&, nFF,p, n); // ok, det
-
- g(&, p, n, n); // det, det
- g(&, p, nFF,n); // ok, det
-
- g(&, p, p, p); // ok, det
- g(&, p, p2, e); // bad AND detected; det, det
-
- g(&, n, un, n); // det, det
- g(&, n, up, n); // det, det
-
- g(&, un, n, n); // det, det
- g(&, up, n, n); // det, det
-
- g(&, un, un, u); // undet, undet
- g(&, un, up, n); // det, det
- g(&, up, un, n); // det, det
- g(&, up, up, u); // ok, undet
- g(&, up, up2,u); // undet, undet
-
- g(&, un, p, n); // det, det
- g(&, up, p, n); // det, det (result doesn't look like a pointer)
-
- g(&, p, un, n); // det, det
- g(&, p, up, u); // det, det
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/and.stderr.exp b/exp-sgcheck/tests/and.stderr.exp
deleted file mode 100644
index 9ef3730..0000000
--- a/exp-sgcheck/tests/and.stderr.exp
+++ /dev/null
@@ -1,184 +0,0 @@
-
-about to do 19 [0]
-Invalid read of size 4
- at 0x........: main (and.c:19)
- Address 0x........ is not derived from any known block
-about to do 19 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:19)
- Address 0x........ is not derived from any known block
-about to do 21 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:21)
- Address 0x........ is not derived from any known block
-about to do 21 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:21)
- Address 0x........ is not derived from any known block
-about to do 22 [0]
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:22)
- 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 24 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:24)
- Address 0x........ is not derived from any known block
-about to do 24 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:24)
- Address 0x........ is not derived from any known block
-about to do 25 [0]
-about to do 25 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:25)
- 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 27 [0]
-about to do 27 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:27)
- 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)
-
-Invalid arguments to And32/And64
- at 0x........: main (and.c:28)
- First arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
-about to do 28 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:28)
- Address 0x........ is not derived from any known block
-about to do 28 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:28)
- Address 0x........ is not derived from any known block
-about to do 30 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:30)
- Address 0x........ is not derived from any known block
-about to do 30 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:30)
- Address 0x........ is not derived from any known block
-about to do 31 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:31)
- Address 0x........ is not derived from any known block
-about to do 31 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:31)
- Address 0x........ is not derived from any known block
-about to do 33 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:33)
- Address 0x........ is not derived from any known block
-about to do 33 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:33)
- Address 0x........ is not derived from any known block
-about to do 34 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:34)
- Address 0x........ is not derived from any known block
-about to do 34 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:34)
- Address 0x........ is not derived from any known block
-about to do 36 [0]
-about to do 36 [-1]
-about to do 37 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:37)
- Address 0x........ is not derived from any known block
-about to do 37 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:37)
- Address 0x........ is not derived from any known block
-about to do 38 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:38)
- Address 0x........ is not derived from any known block
-about to do 38 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:38)
- Address 0x........ is not derived from any known block
-about to do 39 [0]
-about to do 39 [-1]
-about to do 40 [0]
-about to do 40 [-1]
-about to do 42 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:42)
- Address 0x........ is not derived from any known block
-about to do 42 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:42)
- Address 0x........ is not derived from any known block
-about to do 43 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:43)
- Address 0x........ is not derived from any known block
-about to do 43 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:43)
- Address 0x........ is not derived from any known block
-about to do 45 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:45)
- Address 0x........ is not derived from any known block
-about to do 45 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:45)
- Address 0x........ is not derived from any known block
-about to do 46 [0]
-
-Invalid read of size 4
- at 0x........: main (and.c:46)
- Address 0x........ is not derived from any known block
-about to do 46 [-1]
-
-Invalid read of size 4
- at 0x........: main (and.c:46)
- Address 0x........ is not derived from any known block
-
-ERROR SUMMARY: 32 errors from 32 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/and.vgtest-disabled b/exp-sgcheck/tests/and.vgtest-disabled
deleted file mode 100644
index 2a27612..0000000
--- a/exp-sgcheck/tests/and.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: and
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/arith.c b/exp-sgcheck/tests/arith.c
deleted file mode 100644
index 32af88c..0000000
--- a/exp-sgcheck/tests/arith.c
+++ /dev/null
@@ -1,57 +0,0 @@
-
-#include <stdlib.h>
-
-typedef unsigned long Ulong;
-
-int main(void)
-{
- long* x = malloc(sizeof(long) * 10);
- long* y = malloc(sizeof(long) * 10);
- long* y2 = y + 3;
-
- // ok -- same segment
- long w = y2 - y;
-
- // ok -- different heap segments (result can only be used to index off
- // 'x', but glibc's strcpy() does this...)
- long* z = (long*)((long)x - (long)y);
-
- w = (long)y2 + (long)y; // bad (same segment)
-
- w = (long)x & (long)y; // bad (different segments)
-
- w = (long)y2 / (long)4; // bad, but indistinguishable from
- // acceptable '%' cases...
-
- w = (long)y2 % (long)4; // ok
- w = (long)y2 % (long)y; // bad -- modulor(?) is a pointer
- w = (long)0xffffffff % (long)y; // bad -- modulend(?) is a non-pointer
-
- w = (Ulong)y2 % (Ulong)4; // ok
- w = (Ulong)y2 % (Ulong)y; // bad -- modulor(?) is a pointer
- w = (Ulong)0xffffffff % (Ulong)y; // bad -- modulend(?) is a non-pointer
-
- w = (long)y * (long)y2; // bad
-
- w = (long)y >> (long)2; // ok
- w = (long)y << (long)2; // ok
-
- w = (long)y & 0xffff; // ok
- w = (long)y | 0xffff; // ok
- w = (long)y ^ (long)y2; // ok
-
- w = ~((long)y); // ok
-
- w = -((long)y); // bad -- operand is a non-polonger
-
- w = (long)x ^ (long)x; // xor(ptr,ptr) --> constant (0)
- z = x + w; // ok, because xor result was zero
-
- w = (long)x ^ ((long)x+1); // xor(ptr,ptr') --> constant (small)
- z = x + w; // ok, because xor result was constant
-
- w = (long)x ^ (long)y; // xor(ptr,ptr') --> constant (small)
- z = x + w; // ok, because xor result was constant
-
- return (long)z;
-}
diff --git a/exp-sgcheck/tests/arith.stderr.exp b/exp-sgcheck/tests/arith.stderr.exp
deleted file mode 100644
index 4af05c5..0000000
--- a/exp-sgcheck/tests/arith.stderr.exp
+++ /dev/null
@@ -1,79 +0,0 @@
-
-Invalid ADD
- at 0x........: main (arith.c:19)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid AND
- at 0x........: main (arith.c:21)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:8)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid IDIV
- at 0x........: main (arith.c:27)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid IDIV
- at 0x........: main (arith.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg not a pointer
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid DIV
- at 0x........: main (arith.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid DIV
- at 0x........: main (arith.c:32)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg not a pointer
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Invalid IMUL
- at 0x........: main (arith.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith.c:9)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/arith.vgtest-disabled b/exp-sgcheck/tests/arith.vgtest-disabled
deleted file mode 100644
index 5a6f607..0000000
--- a/exp-sgcheck/tests/arith.vgtest-disabled
+++ /dev/null
@@ -1 +0,0 @@
-prog: arith
diff --git a/exp-sgcheck/tests/arith_include1.c b/exp-sgcheck/tests/arith_include1.c
deleted file mode 100644
index dfbbe6b..0000000
--- a/exp-sgcheck/tests/arith_include1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-#include <string.h>
-
-static jmp_buf TTT_jmpbuf;
-
-void SEGV_handler(int signum)
-{
- //fprintf(stderr, "segv caught\n");
- __builtin_longjmp(TTT_jmpbuf, 1);
-}
-
-int up[10], up2[10];
-
diff --git a/exp-sgcheck/tests/arith_include2.c b/exp-sgcheck/tests/arith_include2.c
deleted file mode 100644
index 524ca99..0000000
--- a/exp-sgcheck/tests/arith_include2.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
- // Comment "both" means tp[0] and tp[-1] are both bad.
- // Otherwise only tp[-1] is bad.
-
- #define TTT \
- if (__builtin_setjmp(TTT_jmpbuf) == 0) \
- { fprintf(stderr, "about to do %d [0]\n", __LINE__); tn = tp[ 0]; } \
- if (__builtin_setjmp(TTT_jmpbuf) == 0) \
- { fprintf(stderr, "about to do %d [-1]\n", __LINE__); tn = tp[-1]; }
-
- #define b( a, c) tp = (long*)a; TTT
- #define ui(op, a, c) tp = (long*)op(long)a; TTT
- #define g(op, a,b,c) tp = (long*)((long)a op (long)b); TTT
- #define UNU __attribute__((unused))
-
- struct sigaction sigsegv;
- // Scratch values
- long a, tn __attribute__((unused));
- long* tp;
-
- // Known pointers
- long* p = malloc(sizeof(long)*10); UNU long* p2 = malloc(sizeof(long)*10);
- UNU long* pp = p;
- // Unknown pointers
-// long up[10], UNU up2[10];
-
- // Known nonptrs; make them zero and known
- long n = a ^ a, UNU n2 = n+1, UNU n7F = 0x7fffffffUL, UNU nFF = ~n;
-
- // Unknown nonptrs; make them zero but unknown
- long un = 0x01100000UL, UNU un2 = un;
-
- // Known nonptr, from pointerness range check
- UNU long nn = 0;
-
- // Intall SEGV handler
- memset(&sigsegv, 0, sizeof(sigsegv));
- sigsegv.sa_handler = SEGV_handler;
- sigsegv.sa_flags = SA_NODEFER; /* so we can handle signal many times */
- assert( 0 == sigemptyset( &sigsegv.sa_mask ) );
- assert( 0 == sigaction(SIGSEGV, &sigsegv, NULL) );
diff --git a/exp-sgcheck/tests/cmp.c b/exp-sgcheck/tests/cmp.c
deleted file mode 100644
index 049295b..0000000
--- a/exp-sgcheck/tests/cmp.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <stdlib.h>
-
-// The comparisons use SUB instructions, and this can result in having a
-// (nonptr - ptr) situation legitimately; at one point I was flagging
-// errors when that happened.
-
-int main(void)
-{
- char* buf = malloc(sizeof(char) * 6);
-
- // Known zero non-pointer
- char* nz = (char*)((long)buf^(long)buf); // known non-pointer
-
- // Unknown zero nonptr; make them zero but unknown
- char* unz;
- ((char*)&unz)[0] = '\0';
- ((char*)&unz)[1] = '\0';
- ((char*)&unz)[2] = '\0';
- ((char*)&unz)[3] = '\0';
-
- if (buf == nz) return 1;
- if (nz == buf) return 1; // --> n - p, but legitimate
- if (buf == unz) return 1;
- if (unz == buf) return 1;
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/cmp.stderr.exp b/exp-sgcheck/tests/cmp.stderr.exp
deleted file mode 100644
index d18786f..0000000
--- a/exp-sgcheck/tests/cmp.stderr.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/cmp.vgtest-disabled b/exp-sgcheck/tests/cmp.vgtest-disabled
deleted file mode 100644
index 9b73f14..0000000
--- a/exp-sgcheck/tests/cmp.vgtest-disabled
+++ /dev/null
@@ -1 +0,0 @@
-prog: cmp
diff --git a/exp-sgcheck/tests/idiv.c b/exp-sgcheck/tests/idiv.c
deleted file mode 100644
index f4ecb9c..0000000
--- a/exp-sgcheck/tests/idiv.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // ADD =========================================================
- g(/, n, n2, n); // det, det
-
- g(/, n, p, e); // detected bad idiv; det, det
-
- g(/, p, n2, n); // ok, det
-
- g(/, p, p, e); // detected bad idiv; det, det
-
- g(/, n, un, n); // undet, undet
- g(/, n, up, n); // undetected bad idiv; ok, undet
-
- g(/, un, n2, n); // undet, undet
- g(/, up, n2, n); // ok, undet
-
- g(/, un, un, n); // undet, undet
- g(/, un, up, n); // undetected bad idiv; undet, undet
- g(/, up, un, n); // undet, undet
- g(/, up, up, n); // undetected bad idiv; undet, undet
-
- g(/, un, p, n); // detected bad idiv; undet, undet
- g(/, up, p, n); // detected bad idiv; undet, undet
-
- g(/, p, un, n); // undet, undet
- g(/, p, up, n); // undetected bad idiv; undet, undet
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/idiv.stderr.exp b/exp-sgcheck/tests/idiv.stderr.exp
deleted file mode 100644
index 92e9391..0000000
--- a/exp-sgcheck/tests/idiv.stderr.exp
+++ /dev/null
@@ -1,270 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (idiv.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-Invalid IDIV
- at 0x........: main (idiv.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg not a pointer
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-about to do 16 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-Invalid IDIV
- at 0x........: main (idiv.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 23 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:23)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 23 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:23)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 25 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:25)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 25 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:25)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 26 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:26)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 26 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:26)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 28 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 28 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 29 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:29)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 29 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:29)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 30 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:30)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 30 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:30)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 31 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 31 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-Invalid IDIV
- at 0x........: main (idiv.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg may be a pointer
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-about to do 33 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 33 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-Invalid IDIV
- at 0x........: main (idiv.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First arg may be a pointer
-Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-about to do 34 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 34 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 36 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:36)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 36 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:36)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 37 [0]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:37)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 37 [-1]
-
-Invalid read of size 4
- at 0x........: main (idiv.c:37)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-
-ERROR SUMMARY: 36 errors from 36 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/idiv.vgtest-disabled b/exp-sgcheck/tests/idiv.vgtest-disabled
deleted file mode 100644
index e8aa9bb..0000000
--- a/exp-sgcheck/tests/idiv.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: idiv
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/imul.c b/exp-sgcheck/tests/imul.c
deleted file mode 100644
index 877c00a..0000000
--- a/exp-sgcheck/tests/imul.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // ADD =========================================================
- g(*, n, n, n); // det, det
-
- g(*, n, p, n); // det, det
-
- g(*, p, n, n); // ok, det
-
- g(*, p, p, e); // detected bad mul; det, det
-
- g(*, n, un, n); // det, det
- g(*, n, up, n); // ok, det
-
- g(*, un, n, n); // det, det
- g(*, up, n, n); // ok, det
-
- g(*, un, un, n); // det, det
- g(*, un, up, n); // det, det
- g(*, up, un, n); // det, det
- g(*, up, up, n); // undetected bad imul; det, det
-
- g(*, un, p, n); // det, det
- g(*, up, p, n); // undetected bad imul; det, det
-
- g(*, p, un, n); // det, det
- g(*, p, up, n); // undetected bad imul; det, det
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/imul.stderr.exp b/exp-sgcheck/tests/imul.stderr.exp
deleted file mode 100644
index 08f553d..0000000
--- a/exp-sgcheck/tests/imul.stderr.exp
+++ /dev/null
@@ -1,237 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (imul.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 16 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-Invalid IMUL
- at 0x........: main (imul.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 23 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:23)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 23 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:23)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 25 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:25)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 25 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:25)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 26 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:26)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 26 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:26)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 28 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 28 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 29 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:29)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 29 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:29)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 30 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:30)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 30 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:30)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 31 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 31 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 33 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 33 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 34 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 34 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 36 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:36)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 36 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:36)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 37 [0]
-
-Invalid read of size 4
- at 0x........: main (imul.c:37)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 37 [-1]
-
-Invalid read of size 4
- at 0x........: main (imul.c:37)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-
-ERROR SUMMARY: 33 errors from 33 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/imul.vgtest-disabled b/exp-sgcheck/tests/imul.vgtest-disabled
deleted file mode 100644
index c220364..0000000
--- a/exp-sgcheck/tests/imul.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: imul
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/mm.c b/exp-sgcheck/tests/mm.c
deleted file mode 100644
index 0d78cf3..0000000
--- a/exp-sgcheck/tests/mm.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "tests/sys_mman.h"
-#include <unistd.h>
-#include "arith_include1.c"
-
-// For some reason, the stack frame below __GI_write is disappearing.
-// Therefore, if I don't want the write errors to be merged, I have to
-// ensure they have a different stack trace. I do this by using this
-// function. Weird.
-void mywrite(char* buf, int len)
-{
- write(-1, buf, len);
-}
-
-int main(void)
-{
- struct sigaction sigsegv;
-
- char c __attribute__((unused));
-
- // This fails due to a bad fd (at one point I was not handling failing
- // mmap() calls, and would have got a seg fault).
- char* res1 = mmap(0, 0, PROT_READ, MAP_PRIVATE, -1, 0 );
-
- // This succeeds but is meaningless. Important thing is that the size is
- // zero, so Annelid should not subtract one from the size when doing any
- // range calculations. (It did at one point, giving 0xffffffff, which
- // screwed everything up.)
- char* res2 = mmap(0, 0, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 );
-
- // This succeeds and is useful.
- char* res3 = mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-
- assert(MAP_FAILED == res1);
- assert(NULL == res2);
- assert(MAP_FAILED != res3 && NULL != res3);
-
- // Intall SEGV handler
- sigsegv.sa_handler = SEGV_handler;
- sigsegv.sa_flags = 0;
- assert( 0 == sigemptyset( &sigsegv.sa_mask ) );
- assert( 0 == sigaction(SIGSEGV, &sigsegv, NULL) );
-
- #define TTT(i) \
- if (__builtin_setjmp(TTT_jmpbuf) == 0) { c = res3[i]; }
-
- TTT(0);
- TTT(-1);
- mywrite(res3, 5);
- mywrite(res3-1, 5);
-
- assert( 0 == munmap(res3, getpagesize()) );
-
- TTT(0);
- TTT(-1);
- mywrite(res3, 5);
- mywrite(res3-1, 5);
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/mm.stderr.exp b/exp-sgcheck/tests/mm.stderr.exp
deleted file mode 100644
index 83be5a5..0000000
--- a/exp-sgcheck/tests/mm.stderr.exp
+++ /dev/null
@@ -1,65 +0,0 @@
-
-Invalid read of size 1
- at 0x........: main (mm.c:47)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is 1 bytes before the accessing pointer's
- legitimate range, the 4096-byte block mmap'd
- at 0x........: __mmap (in /...libc...)
-Warning: invalid file descriptor -1 in syscall write()
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (mm.c:49)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte is not within a known block
-Last byte (0x........) is 3 bytes within a 4096-byte block mmap'd
- at 0x........: __mmap (in /...libc...)
-
-Invalid read of size 1
- at 0x........: main (mm.c:53)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is 0 bytes inside the accessing pointer's
- once-legitimate range, the 4096-byte block munmap'd
- at 0x........: __munmap (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Doubly-invalid read of size 1
- at 0x........: main (mm.c:54)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is 1 bytes before the accessing pointer's
- once-legitimate range, the 4096-byte block munmap'd
- at 0x........: __munmap (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) contains unaddressable byte(s)
- at 0x........: __libc_write (...libc...)
- by 0x........: main (mm.c:55)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is 0 bytes within a 4096-byte block munmap'd
- at 0x........: __munmap (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (mm.c:56)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte is not within a known block
-Last byte (0x........) is 3 bytes within a 4096-byte block munmap'd
- at 0x........: __munmap (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-
-ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/mm.vgtest-disabled b/exp-sgcheck/tests/mm.vgtest-disabled
deleted file mode 100644
index ab3d50e..0000000
--- a/exp-sgcheck/tests/mm.vgtest-disabled
+++ /dev/null
@@ -1 +0,0 @@
-prog: mm
diff --git a/exp-sgcheck/tests/neg.c b/exp-sgcheck/tests/neg.c
deleted file mode 100644
index 5ea7734..0000000
--- a/exp-sgcheck/tests/neg.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // Neg =========================================================
- ui(-, p, n); // bad NEG; ok, det
-
- ui(-, up, n); // det, det
-
- ui(-, un, n); // det, det
-
- ui(-, n, n); // det, det
-
- ui(-, nn, n); // det, det
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/neg.stderr.exp b/exp-sgcheck/tests/neg.stderr.exp
deleted file mode 100644
index 1a6eea2..0000000
--- a/exp-sgcheck/tests/neg.stderr.exp
+++ /dev/null
@@ -1,53 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (neg.c:14)
- Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (neg.c:14)
- Address 0x........ is not derived from any known block
-about to do 16 [0]
-
-Invalid read of size 4
- at 0x........: main (neg.c:16)
- Address 0x........ is not derived from any known block
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (neg.c:16)
- Address 0x........ is not derived from any known block
-about to do 18 [0]
-
-Invalid read of size 4
- at 0x........: main (neg.c:18)
- Address 0x........ is not derived from any known block
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (neg.c:18)
- Address 0x........ is not derived from any known block
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (neg.c:20)
- Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (neg.c:20)
- Address 0x........ is not derived from any known block
-about to do 22 [0]
-
-Invalid read of size 4
- at 0x........: main (neg.c:22)
- Address 0x........ is not derived from any known block
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (neg.c:22)
- Address 0x........ is not derived from any known block
-
-
-ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/neg.vgtest-disabled b/exp-sgcheck/tests/neg.vgtest-disabled
deleted file mode 100644
index c546a43..0000000
--- a/exp-sgcheck/tests/neg.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: neg
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/not.c b/exp-sgcheck/tests/not.c
deleted file mode 100644
index c5c08d1..0000000
--- a/exp-sgcheck/tests/not.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // NOT =========================================================
- ui(~, p, n); // det, det
-
- ui(~, up, n); // det, det
-
- ui(~, un, n); // det, det
-
- ui(~, n, n); // det, det
-
- ui(~, nn, n); // det, det
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/not.stderr.exp b/exp-sgcheck/tests/not.stderr.exp
deleted file mode 100644
index 0a5b8d7..0000000
--- a/exp-sgcheck/tests/not.stderr.exp
+++ /dev/null
@@ -1,73 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (not.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (not.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 16 [0]
-
-Invalid read of size 4
- at 0x........: main (not.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (not.c:16)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [0]
-
-Invalid read of size 4
- at 0x........: main (not.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (not.c:18)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (not.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (not.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [0]
-
-Invalid read of size 4
- at 0x........: main (not.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-about to do 22 [-1]
-
-Invalid read of size 4
- at 0x........: main (not.c:22)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is not derived from any known block
-
-
-ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/not.vgtest-disabled b/exp-sgcheck/tests/not.vgtest-disabled
deleted file mode 100644
index 266c349..0000000
--- a/exp-sgcheck/tests/not.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: not
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/or.c b/exp-sgcheck/tests/or.c
deleted file mode 100644
index 6fd2128..0000000
--- a/exp-sgcheck/tests/or.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // OR ==========================================================
- g(|, n, n, n); // det, det
-
- g(|, n, p, p); // ok, det
-
- g(|, p, n, p); // ok, det
-
- g(|, p, p, e); // detected bad OR; ok, det
- g(|, p, p2, e); // detected bad OR; det, det
-
- g(|, n, un, u); // undet, undet
- g(|, n, up, u); // ok, undet
-
- g(|, un, n, u); // undet, undet
- g(|, up, n, u); // ok, undet
-
- g(|, un, un, u); // undet, undet
- g(|, un, up, u); // ok, undet
- g(|, up, un, u); // ok, undet
- g(|, up, up, u); // undetected bad OR; ok, undet
- g(|, up, up2,u); // undetected bad OR; undet, undet
-
- g(|, un, p, u); // ok, undet
- g(|, up, p, u); // undetected bad OR; undet, undet
-
- g(|, p, un, u); // ok, undet
- g(|, p, up, u); // undetected bad OR; undet, undet
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/or.stderr.exp b/exp-sgcheck/tests/or.stderr.exp
deleted file mode 100644
index e0f9b56..0000000
--- a/exp-sgcheck/tests/or.stderr.exp
+++ /dev/null
@@ -1,92 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (or.c:14)
- Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (or.c:14)
- Address 0x........ is not derived from any known block
-about to do 16 [0]
-about to do 16 [-1]
-
-Invalid read of size 4
- at 0x........: main (or.c:16)
- 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 18 [0]
-about to do 18 [-1]
-
-Invalid read of size 4
- at 0x........: main (or.c:18)
- 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)
-
-Invalid OR
- at 0x........: main (or.c:20)
-Both args derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
-about to do 20 [0]
-
-Invalid read of size 4
- at 0x........: main (or.c:20)
- Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (or.c:20)
- Address 0x........ is not derived from any known block
-
-Invalid arguments to Or32/Or64
- at 0x........: main (or.c:21)
- First arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
- Second arg derived from address 0x........ of 40-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (arith_include2.c:22)
-about to do 21 [0]
-
-Invalid read of size 4
- at 0x........: main (or.c:21)
- Address 0x........ is not derived from any known block
-about to do 21 [-1]
-
-Invalid read of size 4
- at 0x........: main (or.c:21)
- Address 0x........ is not derived from any known block
-about to do 23 [0]
-about to do 23 [-1]
-about to do 24 [0]
-about to do 24 [-1]
-about to do 26 [0]
-about to do 26 [-1]
-about to do 27 [0]
-about to do 27 [-1]
-about to do 29 [0]
-about to do 29 [-1]
-about to do 30 [0]
-about to do 30 [-1]
-about to do 31 [0]
-about to do 31 [-1]
-about to do 32 [0]
-about to do 32 [-1]
-about to do 33 [0]
-about to do 33 [-1]
-about to do 35 [0]
-about to do 35 [-1]
-about to do 36 [0]
-about to do 36 [-1]
-about to do 38 [0]
-about to do 38 [-1]
-about to do 39 [0]
-about to do 39 [-1]
-
-
-ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/or.vgtest-disabled b/exp-sgcheck/tests/or.vgtest-disabled
deleted file mode 100644
index 9a714a1..0000000
--- a/exp-sgcheck/tests/or.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: or
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/partial.c b/exp-sgcheck/tests/partial.c
deleted file mode 100644
index af07281..0000000
--- a/exp-sgcheck/tests/partial.c
+++ /dev/null
@@ -1,52 +0,0 @@
-
-#include <stdlib.h>
-
-int main ( void )
-{
- int* x3 = malloc(3); float f __attribute__((unused)), *f3 = malloc(3);
- int* x4 = malloc(4); double d __attribute__((unused)), *d7 = malloc(7);
- int* x5 = malloc(5); long long int lli __attribute__((unused)), *lli7 = malloc(7);
- int* x6 = malloc(6); char c __attribute__((unused)), *c0 = malloc(0);
- int* x7 = malloc(7); short int s __attribute__((unused)), *s1 = malloc(1);
- int x __attribute__((unused));
- int* y4 = malloc(4);
- int* y5 = malloc(5);
- int* y6 = malloc(6);
- int* y7 = malloc(7);
-
- #define ADDB(ptr, n) ((int*)(((unsigned long)(ptr)) + (n)))
-
- // All these overrun by a single byte; the reads are happening at
- // different alignments.
- x = * ADDB(x3,0); // ok if --partial-loads-ok=yes
- x = * ADDB(x4,1);
- x = * ADDB(x5,2);
- x = * ADDB(x6,3);
- x = * ADDB(x7,4); // ok if --partial-loads-ok=yes
-
- // These are fine
- x = * ADDB(y4,0);
- x = * ADDB(y5,1);
- x = * ADDB(y6,2);
- x = * ADDB(y7,3);
-
- // 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 // ... 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 // ... ditto
- d = * d7;
- 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. */
diff --git a/exp-sgcheck/tests/sh_script b/exp-sgcheck/tests/sh_script
deleted file mode 100755
index ca2b0b8..0000000
--- a/exp-sgcheck/tests/sh_script
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-if [ $# != 0 ] ; then
- echo "too many args"
-fi
diff --git a/exp-sgcheck/tests/sh_script.stderr.exp b/exp-sgcheck/tests/sh_script.stderr.exp
deleted file mode 100644
index d18786f..0000000
--- a/exp-sgcheck/tests/sh_script.stderr.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/sh_script.vgtest-disabled b/exp-sgcheck/tests/sh_script.vgtest-disabled
deleted file mode 100644
index 5942de2..0000000
--- a/exp-sgcheck/tests/sh_script.vgtest-disabled
+++ /dev/null
@@ -1 +0,0 @@
-prog: sh_script
diff --git a/exp-sgcheck/tests/strlen.c b/exp-sgcheck/tests/strlen.c
deleted file mode 100644
index 92abf46..0000000
--- a/exp-sgcheck/tests/strlen.c
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-
-// glibc's versions of functions like strlen() do things word-wise instead
-// of byte-wise, which means they can overrun the end of strings, etc.
-// Naughty, but must be safe, I guess; Annelid copes with this in the same
-// way Memcheck does, letting it happen unless the --partial-loads-ok=no
-// option is used.
-
-int main(void)
-{
- char* h = "hello, world";
- char* p = strdup(h);
- char u[20];
- char* c __attribute__((unused));
- int len;
-
- len = strlen(p);
-
- c = strchr (p, 'l');
- c = strchr (p, 'x');
-
- c = strrchr(p, 'l');
- c = strrchr(p, 'x');
-
- c = memchr (p, 'l', len); // glibc version ok?
- c = memchr (p, 'x', len);
-
- memcpy(u, p, len+1); // glibc version ok?
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/strlen_bad.stderr.exp b/exp-sgcheck/tests/strlen_bad.stderr.exp
deleted file mode 100644
index eab9bb3..0000000
--- a/exp-sgcheck/tests/strlen_bad.stderr.exp
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Invalid read of size 4
- at 0x........: strlen (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is 12 bytes inside the accessing pointer's
- legitimate range, a block of size 13 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: __strdup (in /...libc...)
- by 0x........: main (strlen.c:14)
-
-Invalid read of size 4
- at 0x........: strchr (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is 12 bytes inside the accessing pointer's
- legitimate range, a block of size 13 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: __strdup (in /...libc...)
- by 0x........: main (strlen.c:14)
-
-Invalid read of size 4
- at 0x........: strrchr (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is 12 bytes inside the accessing pointer's
- legitimate range, a block of size 13 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: __strdup (in /...libc...)
- by 0x........: main (strlen.c:14)
-
-Invalid read of size 4
- at 0x........: strrchr (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is 12 bytes inside the accessing pointer's
- legitimate range, a block of size 13 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: __strdup (in /...libc...)
- by 0x........: main (strlen.c:14)
-
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/strlen_bad.vgtest-disabled b/exp-sgcheck/tests/strlen_bad.vgtest-disabled
deleted file mode 100644
index 9f41872..0000000
--- a/exp-sgcheck/tests/strlen_bad.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: strlen
-vgopts: --partial-loads-ok=no
diff --git a/exp-sgcheck/tests/strlen_good.stderr.exp b/exp-sgcheck/tests/strlen_good.stderr.exp
deleted file mode 100644
index d18786f..0000000
--- a/exp-sgcheck/tests/strlen_good.stderr.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/strlen_good.vgtest-disabled b/exp-sgcheck/tests/strlen_good.vgtest-disabled
deleted file mode 100644
index 14e36fa..0000000
--- a/exp-sgcheck/tests/strlen_good.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: strlen
-vgopts: --partial-loads-ok=yes
diff --git a/exp-sgcheck/tests/sub.c b/exp-sgcheck/tests/sub.c
deleted file mode 100644
index 73116b6..0000000
--- a/exp-sgcheck/tests/sub.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-int aaa(void) { int x = 0x66; return x; }
-int bbb(void) { return 0x55; }
-int main(void)
-{
- #include "arith_include2.c"
-
- // SUB =========================================================
- g(-, n, n2, n); // det, det // undet, undet?
-
- g(-, n, p, e); // det, det
-
- g(-, p, n, p); // ok, det
-
- g(-, p, pp, B); // det, det
-
- g(-, n, un, u); // undet, undet
- g(-, n, up, u); // undet, undet
-
- g(-, un, n, u); // undet, undet
- g(-, up, n, u); // ok, undet
-
- g(-, un, un2,u); // det, det
- g(-, un, up, u); // undet, undet
- g(-, up, un, u); // ok, undet
- g(-, up, up, u); // det, det
-
- g(-, un, p, B); // undet, undet
- g(-, up, p, B); // undet, undet
-
- g(-, p, un, p); // det, det
- g(-, p, up, p); // det, det
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/sub.stderr.exp b/exp-sgcheck/tests/sub.stderr.exp
deleted file mode 100644
index 2599798..0000000
--- a/exp-sgcheck/tests/sub.stderr.exp
+++ /dev/null
@@ -1,102 +0,0 @@
-
-about to do 15 [0]
-Invalid read of size 4
- at 0x........: main (sub.c:15)
- Address 0x........ is not derived from any known block
-about to do 15 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:15)
- Address 0x........ is not derived from any known block
-about to do 17 [0]
-
-Invalid read of size 4
- at 0x........: main (sub.c:17)
- Address 0x........ is not derived from any known block
-about to do 17 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:17)
- Address 0x........ is not derived from any known block
-about to do 19 [0]
-about to do 19 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:19)
- 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 21 [0]
-about to do 21 [-1]
-about to do 23 [0]
-about to do 23 [-1]
-about to do 24 [0]
-about to do 24 [-1]
-about to do 26 [0]
-about to do 26 [-1]
-about to do 27 [0]
-about to do 27 [-1]
-about to do 29 [0]
-
-Invalid read of size 4
- at 0x........: main (sub.c:29)
- Address 0x........ is not derived from any known block
-about to do 29 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:29)
- Address 0x........ is not derived from any known block
-about to do 30 [0]
-about to do 30 [-1]
-about to do 31 [0]
-about to do 31 [-1]
-about to do 32 [0]
-
-Invalid read of size 4
- at 0x........: main (sub.c:32)
- Address 0x........ is not derived from any known block
-about to do 32 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:32)
- Address 0x........ is not derived from any known block
-about to do 34 [0]
-about to do 34 [-1]
-about to do 35 [0]
-about to do 35 [-1]
-about to do 37 [0]
-
-Invalid read of size 4
- at 0x........: main (sub.c:37)
- Address 0x........ is ... 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 37 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:37)
- Address 0x........ is ... 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 38 [0]
-
-Invalid read of size 4
- at 0x........: main (sub.c:38)
- Address 0x........ is ... bytes after 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 38 [-1]
-
-Invalid read of size 4
- at 0x........: main (sub.c:38)
- Address 0x........ is ... bytes after 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)
-
-
-ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/sub.vgtest-disabled b/exp-sgcheck/tests/sub.vgtest-disabled
deleted file mode 100644
index 45d1aee..0000000
--- a/exp-sgcheck/tests/sub.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: sub
-stderr_filter: filter_add
diff --git a/exp-sgcheck/tests/syscall.c b/exp-sgcheck/tests/syscall.c
deleted file mode 100644
index b446275..0000000
--- a/exp-sgcheck/tests/syscall.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/time.h>
-
-// For some reason, the stack frame below __GI_write is disappearing.
-// Therefore, if I don't want the write errors to be merged, I have to
-// ensure they have a different stack trace. I do this by using this
-// function. Weird.
-__attribute__((noinline))
-void mywrite(char* buf, int len)
-{
- write(-1, buf, len);
-}
-
-__attribute__((noinline))
-void mygetitimer(long arg1, struct itimerval* itval)
-{
- getitimer(arg1, itval);
-}
-
-__attribute__((noinline))
-void myopen(char* name, long flags)
-{
- open(name, flags);
-}
-
-int main(void)
-{
- char *buf = malloc(sizeof(char)*6), *buf2 = malloc(sizeof(char)*6);
- struct itimerval* itval = malloc(sizeof(struct itimerval) - 1);
- int diff = buf2 - buf;
- buf[0] = 'h';
- buf[1] = 'e';
- buf[2] = 'l';
- buf[3] = 'l';
- buf[4] = 'o';
- buf[5] = 'x';
-
- // error (read) (will fail due to -1, as we want -- don't want any
- // unpredictable output to foul up the test)
- mywrite(buf+3, 5); // error (read)
- mywrite(buf-1, 5); // error (read)
- mywrite(buf+1, diff); // error (read)
- myopen(buf+3, 0x0); // error (read_asciiz)
-
- mygetitimer(0, itval); // error (write)
-
- //----
- free(buf);
- mywrite(buf, 5); // error
- mywrite(buf+3, 5); // error
- mywrite(buf+1, diff); // error (read)
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/syscall.stderr.exp b/exp-sgcheck/tests/syscall.stderr.exp
deleted file mode 100644
index e363829..0000000
--- a/exp-sgcheck/tests/syscall.stderr.exp
+++ /dev/null
@@ -1,110 +0,0 @@
-
-Warning: invalid file descriptor -1 in syscall write()
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:32)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 3 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte is not within a known block
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:33)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte is not within a known block
-Last byte (0x........) is 3 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:34)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 1 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte (0x........) is 0 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-Syscall param open(pathname) is non-contiguous
- at 0x........: __libc_open (...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 3 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte is not within a known block
-
-Syscall param getitimer(timer) is non-contiguous
- at 0x........: __getitimer (in /...libc...)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 0 bytes within a 15-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:21)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte is not within a known block
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) contains unaddressable byte(s)
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:41)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Address 0x........ is 0 bytes within a 6-byte block free'd
- at 0x........: free (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:40)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:42)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 3 bytes within a 6-byte block free'd
- at 0x........: free (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:40)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte is not within a known block
-Warning: invalid file descriptor -1 in syscall write()
-
-Syscall param write(buf) is non-contiguous
- at 0x........: __libc_write (...libc...)
- by 0x........: main (syscall.c:43)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-First byte (0x........) is 1 bytes within a 6-byte block free'd
- at 0x........: free (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:40)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-Last byte (0x........) is 0 bytes within a 6-byte block alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (syscall.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
-
-
-ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/syscall.vgtest-disabled b/exp-sgcheck/tests/syscall.vgtest-disabled
deleted file mode 100644
index ea58a58..0000000
--- a/exp-sgcheck/tests/syscall.vgtest-disabled
+++ /dev/null
@@ -1 +0,0 @@
-prog: syscall
diff --git a/exp-sgcheck/tests/xor.c b/exp-sgcheck/tests/xor.c
deleted file mode 100644
index 7e3bade..0000000
--- a/exp-sgcheck/tests/xor.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <assert.h>
-
-#include "arith_include1.c"
-
-int main(void)
-{
- #include "arith_include2.c"
-
- // XOR =========================================================
- g(^, n, n, n); // det, det
-
- g(^, n, p, u); // ok, undet
-
- g(^, p, n, u); // ok, undet
-
- g(^, p, p, n); // det, det
-
- g(^, n, un, u); // undet, undet
- g(^, n, up, u); // ok, undet
-
- g(^, un, n, u); // undet, undet
- g(^, up, n, u); // ok, undet
-
- g(^, un, un, n); // det, det (range)
- g(^, un, up, u); // ok, undet
- g(^, up, un, u); // ok, undet
- g(^, up, up, n); // det, det
-
- g(^, un, p, u); // ok, undet
- g(^, up, p, u); // undet, undet
-
- g(^, p, un, u); // ok, undet
- g(^, p, up, u); // undet, undet
-
- return 0;
-}
diff --git a/exp-sgcheck/tests/xor.stderr.exp b/exp-sgcheck/tests/xor.stderr.exp
deleted file mode 100644
index ff28a84..0000000
--- a/exp-sgcheck/tests/xor.stderr.exp
+++ /dev/null
@@ -1,83 +0,0 @@
-
-about to do 14 [0]
-Invalid read of size 4
- at 0x........: main (xor.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 14 [-1]
-
-Invalid read of size 4
- at 0x........: main (xor.c:14)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-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 (xor.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 20 [-1]
-
-Invalid read of size 4
- at 0x........: main (xor.c:20)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 22 [0]
-about to do 22 [-1]
-about to do 23 [0]
-about to do 23 [-1]
-about to do 25 [0]
-about to do 25 [-1]
-about to do 26 [0]
-about to do 26 [-1]
-about to do 28 [0]
-
-Invalid read of size 4
- at 0x........: main (xor.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 28 [-1]
-
-Invalid read of size 4
- at 0x........: main (xor.c:28)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 29 [0]
-about to do 29 [-1]
-about to do 30 [0]
-about to do 30 [-1]
-about to do 31 [0]
-
-Invalid read of size 4
- at 0x........: main (xor.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 31 [-1]
-
-Invalid read of size 4
- at 0x........: main (xor.c:31)
- by 0x........: __libc_start_main (...libc...)
- by 0x........: ...
- Address 0x........ is not derived from any known block
-about to do 33 [0]
-about to do 33 [-1]
-about to do 34 [0]
-about to do 34 [-1]
-about to do 36 [0]
-about to do 36 [-1]
-about to do 37 [0]
-about to do 37 [-1]
-
-
-ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
diff --git a/exp-sgcheck/tests/xor.vgtest-disabled b/exp-sgcheck/tests/xor.vgtest-disabled
deleted file mode 100644
index 8d60202..0000000
--- a/exp-sgcheck/tests/xor.vgtest-disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: xor
-stderr_filter: filter_add