]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Minor tweaks. A few comments were out of synch with source.
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 28 Jul 2012 21:59:34 +0000 (21:59 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 28 Jul 2012 21:59:34 +0000 (21:59 +0000)
Add another test.

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

memcheck/tests/s390x/cu21.c
memcheck/tests/s390x/cu21.stderr.exp

index 526f2ebc090bccc6f32e083a02c012631c29ffe1..dd9654bdf344b1a17ca811af3c539bf3dec9911c 100644 (file)
@@ -95,19 +95,26 @@ int main()
    
    /* Read 2 bytes from input buffer. First byte is uninitialised */
    input = malloc(10);
-   input[0] = 0x0;
+   input[1] = 0x0;
    do_cu21(malloc(4), 4, (void *)input, 2);          // complaint
 
    /* Read 2 bytes from input buffer. Second byte is uninitialised */
    input = malloc(10);
-   input[1] = 0x0;
+   input[0] = 0x0;
    do_cu21(malloc(4), 4, (void *)input, 2);          // complaint
    
-   /* Read 2 bytes from input buffer. All bytes are uninitialised */
+   /* Read 2 bytes from input buffer. All bytes are initialised */
    input = malloc(10);
    input[0] = input[1] = 0x0;
    do_cu21(malloc(4), 4, (void *)input, 2);          // no complaint
    
+   /* Read 4 bytes from input buffer. This iterates once. In the 1st
+      iteration all input bytes are initialised in the 2nd iteration all
+      input bytes are uninitialised. */
+   input = malloc(10);
+   input[0] = input[1] = 0x0;
+   do_cu21(malloc(4), 4, (void *)input, 4);          // complaint
+   
    /* Write to NULL */
    //   do_cu21(NULL, 10, pattern1, sizeof pattern1);    // complaint
 
index 1b5bb188e1eb86998420539a6871f7fea06fb542..25563f2bd66b707b5fdb1de956c89c9212f2f808 100644 (file)
@@ -59,3 +59,7 @@ Conditional jump or move depends on uninitialised value(s)
    at 0x........: do_cu21 (cu21.c:45)
    by 0x........: main (cu21.c:104)
 
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: do_cu21 (cu21.c:45)
+   by 0x........: main (cu21.c:116)
+