/memcheck/tests/wcs
/memcheck/tests/weirdioctl
/memcheck/tests/with space
+/memcheck/tests/wmemcmp
/memcheck/tests/wrap1
/memcheck/tests/wrap2
/memcheck/tests/wrap3
351857 confusing error message about valid command line option
374596 inconsistent RDTSCP support on x86_64
392331 Spurious lock not held error from inside pthread_cond_timedwait
+397083 Likely false positive "uninitialised value(s)" for __wmemchr_avx2 and __wmemcmp_avx2_movbe
400793 pthread_rwlock_timedwrlock false positive
419054 Unhandled syscall getcpu on arm32
433873 openat2 syscall unimplemented on Linux
vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stdout.exp-solaris \
vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
wcs.vgtest wcs.stderr.exp wcs.stdout.exp \
+ wmemcmp.vgtest wmemcmp.stderr.exp \
wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \
wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \
wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \
vcpu_fbench vcpu_fnfns \
wcs \
xml1 \
+ wmemcmp \
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
wrapmalloc wrapmallocso.so wrapmallocstatic \
writev1
--- /dev/null
+#include <stdlib.h>
+#include <wchar.h>
+
+int main ()
+{
+ wchar_t *s = (wchar_t *) malloc (8 * sizeof (wchar_t));
+ s[0] = '-';
+ s[1] = 'N';
+ s[2] = 'A';
+ s[3] = 'N';
+ s[4] = ' ';
+ s[5] = '3';
+ s[6] = '3';
+ s[7] = '\0';
+ return wmemcmp (s + 1, L"NAN", 3) == 0;
+}
+
--- /dev/null
+prog: wmemcmp
+vgopts: -q
20440 WCSNLEN
20450 WSTRNCMP
20460 MEMMEM
+ 20470 WMEMCMP
*/
#if defined(VGO_solaris)
#if defined(VGO_freebsd)
WMEMCHR(VG_Z_LIBC_SONAME, wmemchr)
#endif
+
+
+#define WMEMCMP(soname, fnname) \
+ int VG_REPLACE_FUNCTION_EZU(20470,soname,fnname) \
+ ( const Int *b1, const Int *b2, SizeT n ); \
+ int VG_REPLACE_FUNCTION_EZU(20470,soname,fnname) \
+ ( const Int *b1, const Int *b2, SizeT n ) \
+ { \
+ for (SizeT i = 0U; i < n; ++i) { \
+ if (b1[i] != b2[i]) \
+ return b1[i] > b2[i] ? 1 : -1; \
+ } \
+ return 0; \
+ }
+
+#if defined(VGO_linux)
+ WMEMCMP(VG_Z_LIBC_SONAME, wmemcmp)
+#endif
+
+
/*------------------------------------------------------------*/
/*--- Improve definedness checking of process environment ---*/
/*------------------------------------------------------------*/