]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
regtest: use in 'if' in memcheck/tests/manuel1
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 16 Mar 2024 16:00:17 +0000 (17:00 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 16 Mar 2024 16:00:17 +0000 (17:00 +0100)
clang tends to use cmov and csel instructions with the result
that the undefinedness propagates into the printf with a variable
number of errors.

memcheck/tests/Makefile.am
memcheck/tests/manuel1.c
memcheck/tests/manuel1.stderr.exp-freebsd-clang [deleted file]

index ea8f3e90d51726a95a934e138f987fe04b2f879d..150e632ccd7e34db31a68f40205e3f797a61ee22 100644 (file)
@@ -259,7 +259,6 @@ EXTRA_DIST = \
        malloc2.stderr.exp malloc2.vgtest \
        malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
        manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
-               manuel1.stderr.exp-freebsd-clang \
        manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp \
                manuel2.vgtest \
        manuel3.stderr.exp manuel3.vgtest \
index f2030e4b7fe636dc4459344bd272a415e82ad342..39b6c9ef29ace0a314138fde7f9cb705a184c3dd 100644 (file)
@@ -4,7 +4,14 @@ int main ()
 {
   int x;
 
-  printf ("x = %d\n", x==0xCAFEBABE ? 99 : 88);
+  if (x==0xCAFEBABE)
+  {
+    printf ("x = %d\n", 99);
+  }
+  else
+  {
+    printf ("x = %d\n", 88);
+  }
 
   return 0;
 }
diff --git a/memcheck/tests/manuel1.stderr.exp-freebsd-clang b/memcheck/tests/manuel1.stderr.exp-freebsd-clang
deleted file mode 100644 (file)
index e658adb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-[[[
-Conditional jump or move depends on uninitialised value(s)
-   ...
-   by 0x........: main (manuel1.c:7)
-
-[[[
-Conditional jump or move depends on uninitialised value(s)
-   ...
-   by 0x........: main (manuel1.c:7)
-
-[[[
-Conditional jump or move depends on uninitialised value(s)
-   ...
-   by 0x........: main (manuel1.c:7)
-
-[[[
-Conditional jump or move depends on uninitialised value(s)
-   ...
-   by 0x........: main (manuel1.c:7)
-
-[[[
-Conditional jump or move depends on uninitialised value(s)
-   ...
-   by 0x........: main (manuel1.c:7)
-
-[[[
-Syscall param write(buf) points to uninitialised byte(s)
-   ...
- Address 0x........ is 4 bytes inside a block of size 131,072 alloc'd
-   at 0x........: malloc (vg_replace_malloc.c:...)
-   ...
-   by 0x........: main (manuel1.c:7)
-