From: Paul Floyd Date: Fri, 26 Dec 2025 13:20:34 +0000 (+0100) Subject: Darwin regtest: ensure no stdout output for memcheck/tests/darwin/deep_badparam X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f06c0aec8e65bf0428395aff256221a3ed78e2f;p=thirdparty%2Fvalgrind.git Darwin regtest: ensure no stdout output for memcheck/tests/darwin/deep_badparam The test was doing a write of an uninit ilocal 32byte char buffer. This has started outputting junk resulting in a stdout diff. So make sure that the buffer only contains zeros (but still uninit). Hope the compiler doesn't get too smart. --- diff --git a/memcheck/tests/darwin/deep_badparam.c b/memcheck/tests/darwin/deep_badparam.c index 9f1268370..e86762747 100644 --- a/memcheck/tests/darwin/deep_badparam.c +++ b/memcheck/tests/darwin/deep_badparam.c @@ -5,6 +5,8 @@ int func_six(int x) { char b[32]; + for (int i = 0; i < sizeof(b); ++i) + b[i] /= 256; int r = write(1, b, sizeof(b)); return x; } diff --git a/memcheck/tests/darwin/deep_badparam.stderr.exp b/memcheck/tests/darwin/deep_badparam.stderr.exp index 3eeddc70c..165c7dbb0 100644 --- a/memcheck/tests/darwin/deep_badparam.stderr.exp +++ b/memcheck/tests/darwin/deep_badparam.stderr.exp @@ -1,12 +1,12 @@ Syscall param write(buf) points to uninitialised byte(s) ... - by 0x........: func_six (deep_badparam.c:8) - by 0x........: func_five (deep_badparam.c:14) - by 0x........: func_four (deep_badparam.c:19) - by 0x........: func_three (deep_badparam.c:24) - by 0x........: func_two (deep_badparam.c:29) - by 0x........: func_one (deep_badparam.c:34) - by 0x........: main (deep_badparam.c:39) + by 0x........: func_six (deep_badparam.c:10) + by 0x........: func_five (deep_badparam.c:16) + by 0x........: func_four (deep_badparam.c:21) + by 0x........: func_three (deep_badparam.c:26) + by 0x........: func_two (deep_badparam.c:31) + by 0x........: func_one (deep_badparam.c:36) + by 0x........: main (deep_badparam.c:41) Address 0x........ is on thread 1's stack in frame #1, created by func_six (deep_badparam.c:6)