From: Florian Krohm Date: Sat, 28 Jul 2012 21:59:34 +0000 (+0000) Subject: Minor tweaks. A few comments were out of synch with source. X-Git-Tag: svn/VALGRIND_3_8_0~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d073e8f615b85d5fb48b56a95a034dc449035171;p=thirdparty%2Fvalgrind.git Minor tweaks. A few comments were out of synch with source. Add another test. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12802 --- diff --git a/memcheck/tests/s390x/cu21.c b/memcheck/tests/s390x/cu21.c index 526f2ebc09..dd9654bdf3 100644 --- a/memcheck/tests/s390x/cu21.c +++ b/memcheck/tests/s390x/cu21.c @@ -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 diff --git a/memcheck/tests/s390x/cu21.stderr.exp b/memcheck/tests/s390x/cu21.stderr.exp index 1b5bb188e1..25563f2bd6 100644 --- a/memcheck/tests/s390x/cu21.stderr.exp +++ b/memcheck/tests/s390x/cu21.stderr.exp @@ -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) +