]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 437790 - valgrind reports "Conditional jump or move depends on uninitialised...
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 14 Nov 2023 07:30:05 +0000 (08:30 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 14 Nov 2023 07:30:05 +0000 (08:30 +0100)
.gitignore
NEWS
memcheck/tests/darwin/Makefile.am
memcheck/tests/darwin/bug437790.c [new file with mode: 0644]
memcheck/tests/darwin/bug437790.stderr.exp [new file with mode: 0644]
memcheck/tests/darwin/bug437790.stdout.exp [new file with mode: 0644]
memcheck/tests/darwin/bug437790.vgtest [new file with mode: 0644]
shared/vg_replace_strmem.c

index 6dca0059a47714a824d3f5869f960942876ccf79..369d49404c3e1c3a455926194e8dbedc7284124b 100644 (file)
 /memcheck/tests/darwin/Makefile.in
 /memcheck/tests/darwin/aio
 /memcheck/tests/darwin/aligned_alloc
+/memcheck/tests/darwin/bug437790
 /memcheck/tests/darwin/deep_badparam
 /memcheck/tests/darwin/env
 /memcheck/tests/darwin/ioctl-tiocsbrk
diff --git a/NEWS b/NEWS
index 5578caf4df7b8dcba8529a0b3657624987e6b45f..6736f58b2a53755cd3825f72f5aa941e73704dd7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,12 +25,16 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 
 
 401284  False positive "Source and destination overlap in strncat"
+437790  valgrind reports "Conditional jump or move depends on uninitialised
+        value" in memchr of macOS 10.12-10.15
 460616  disInstr(arm64): unhandled instruction 0x4E819402 (dotprod/ASIMDDP)
 475498  Add reallocarray wrapper
 476320  Build failure with GCC
-476535  Difference in allocation size for massif/tests/overloaded-new between clang++/libc++ and g++/libstdc++
+476535  Difference in allocation size for massif/tests/overloaded-new between
+        clang++/libc++ and g++/libstdc++
 476780  Extend strlcat and strlcpy wrappers to GNU libc
-476787  Build of Valgrind 3.21.0 fails when SOLARIS_PT_SUNDWTRACE_THRP is defined
+476787  Build of Valgrind 3.21.0 fails when SOLARIS_PT_SUNDWTRACE_THRP is
+        defined
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index c180964dd6011c4ddfd9fa63402fd8d00a68ad93..648f533ee47e8b6ec29fa5b9ab54699c58bb5d1d 100644 (file)
@@ -8,6 +8,7 @@ noinst_HEADERS = scalar.h
 EXTRA_DIST = \
        aio.stderr.exp aio.vgtest \
        aligned_alloc.stderr.exp aligned_alloc.vgtest \
+       bug437790.vgtest bug437790.stderr.exp bug437790.stderr.out \
        deep_badparam.stderr.exp deep_badparam.stdout.exp deep_badparam.vgtest \
        env.stderr.exp env.vgtest \
        ioctl-tiocsbrk.stderr.exp ioctl-tiocsbrk.vgtest \
@@ -22,6 +23,7 @@ EXTRA_DIST = \
 check_PROGRAMS = \
        aio \
        aligned_alloc \
+       bug437790 \
        deep_badparam \
        env \
        ioctl-tiocsbrk \
diff --git a/memcheck/tests/darwin/bug437790.c b/memcheck/tests/darwin/bug437790.c
new file mode 100644 (file)
index 0000000..ffb6b42
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <string.h>
+
+int main(int argc, char *argv[])
+{
+  char strval[100];
+  int len = sprintf(strval, "%.7G", 10.);
+  if(memchr(strval, '.', len))
+     printf("IF len %d\n", len);
+  else
+     printf("ELSE len %d\n", len);
+}
+
diff --git a/memcheck/tests/darwin/bug437790.stderr.exp b/memcheck/tests/darwin/bug437790.stderr.exp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/memcheck/tests/darwin/bug437790.stdout.exp b/memcheck/tests/darwin/bug437790.stdout.exp
new file mode 100644 (file)
index 0000000..19e78d7
--- /dev/null
@@ -0,0 +1 @@
+ELSE len 2
diff --git a/memcheck/tests/darwin/bug437790.vgtest b/memcheck/tests/darwin/bug437790.vgtest
new file mode 100644 (file)
index 0000000..b016e1a
--- /dev/null
@@ -0,0 +1,2 @@
+prog: bug437790
+vgopts: -q
index 9a2eda67379929eb58a70ab2f05f81bb33957a89..16c1bd2f9b0c6304a6830a43c826f8e2cf690a61 100644 (file)
@@ -999,6 +999,10 @@ static inline void my_exit ( int x )
   /* _platform_memchr$VARIANT$Haswell */
   MEMCHR(libsystemZuplatformZddylib, _platform_memchr$VARIANT$Haswell)
 # endif
+# if DARWIN_VERS >= DARWIN_10_12
+  /* _platform_memchr$VARIANT$Base */
+  MEMCHR(libsystemZuplatformZddylib, _platform_memchr$VARIANT$Base)
+#endif
 
 #elif defined(VGO_solaris)
  MEMCHR(VG_Z_LIBC_SONAME, memchr)