]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add testcase for bugzilla #287260. Testcase by M.Welinder
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 29 Jan 2012 02:23:07 +0000 (02:23 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 29 Jan 2012 02:23:07 +0000 (02:23 +0000)
(mwelinder@gmail.com). Announce bug fix.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12359

NEWS
memcheck/tests/Makefile.am
memcheck/tests/bug287260.c [new file with mode: 0644]
memcheck/tests/bug287260.stderr.exp [new file with mode: 0644]
memcheck/tests/bug287260.vgtest [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 79fd6cb1c44a763d1be457d5ffdf29229d0bcc46..b46679758cceeb7dbb27cc84f9b0341e7279b926 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,7 @@ where XXXXXX is the bug number as listed below.
 283413  Fix wrong sanity check
 286270  vgpreload is not friendly to 64->32 bit execs, gives ld.so warnings
 286374  Running cachegrind with --branch-sim=yes on 64-bit PowerPC program fails
+287260  Incorrect conditional jump or move depends on uninitialised value(s)
 287858  VG_(strerror): unknown error 
 289699  vgdb connection in relay mode erroneously closed due to buffer overrun 
 289939  wish: complete monitor cmd 'leak_check' with details about leaked or reachable blocks
index 25e8f1a63097a3cfde9c1e9c110135edf05f07aa..55ba531e99f252752edcb36fa4c659d9509137e4 100644 (file)
@@ -66,6 +66,7 @@ EXTRA_DIST = \
        big_blocks_freed_list.stderr.exp big_blocks_freed_list.vgtest \
        brk2.stderr.exp brk2.vgtest \
        buflen_check.stderr.exp buflen_check.vgtest buflen_check.stderr.exp-kfail \
+       bug287260.stderr.exp bug287260.vgtest \
        calloc-overflow.stderr.exp calloc-overflow.vgtest\
        clientperm.stderr.exp \
        clientperm.stdout.exp clientperm.vgtest \
@@ -222,6 +223,7 @@ check_PROGRAMS = \
        big_blocks_freed_list \
        brk2 \
        buflen_check \
+       bug287260 \
        calloc-overflow \
        clientperm \
        custom_alloc \
diff --git a/memcheck/tests/bug287260.c b/memcheck/tests/bug287260.c
new file mode 100644 (file)
index 0000000..79574f8
--- /dev/null
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+typedef struct {
+       unsigned int stuff : 21;
+       signed int rotation : 10;
+} Oink;
+
+int
+main (int argc, char **argv)
+{
+       volatile Oink r;
+
+       r.rotation = 45;
+       fprintf (stderr, "%d\n", r.rotation);
+       return 0;
+}
diff --git a/memcheck/tests/bug287260.stderr.exp b/memcheck/tests/bug287260.stderr.exp
new file mode 100644 (file)
index 0000000..a9d58bf
--- /dev/null
@@ -0,0 +1,11 @@
+
+45
+
+HEAP SUMMARY:
+    in use at exit: 0 bytes in 0 blocks
+  total heap usage: 0 allocs, 0 frees, 0 bytes allocated
+
+For a detailed leak analysis, rerun with: --leak-check=full
+
+For counts of detected and suppressed errors, rerun with: -v
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/memcheck/tests/bug287260.vgtest b/memcheck/tests/bug287260.vgtest
new file mode 100644 (file)
index 0000000..928ef80
--- /dev/null
@@ -0,0 +1 @@
+prog: bug287260