From: Paul Floyd Date: Mon, 25 Dec 2023 08:04:46 +0000 (+0100) Subject: Darwin regtest: try again with memmem and make sigreturn warnings debug level 1 X-Git-Tag: VALGRIND_3_23_0~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10be3819b70e363eb4210c2384f5548e8b4dd5ec;p=thirdparty%2Fvalgrind.git Darwin regtest: try again with memmem and make sigreturn warnings debug level 1 --- diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index f24b1c7972..61e7f6e6e2 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -9063,7 +9063,7 @@ PRE(sigreturn) a per-thread on-altstack/not-on-altstack flag, which is set by this flag. Just ignore it and claim success for the time being. */ - VG_(debugLog)(0, "syswrap-darwin", + VG_(debugLog)(1, "syswrap-darwin", "WARNING: Ignoring sigreturn( ..., " "UC_SET_ALT_STACK );\n"); SET_STATUS_Success(0); @@ -9071,7 +9071,7 @@ PRE(sigreturn) } if (ARG2 == VKI_UC_RESET_ALT_STACK) { /* Ditto */ - VG_(debugLog)(0, "syswrap-darwin", + VG_(debugLog)(1, "syswrap-darwin", "WARNING: Ignoring sigreturn( ..., " "UC_RESET_ALT_STACK );\n"); SET_STATUS_Success(0); diff --git a/memcheck/tests/memmem.c b/memcheck/tests/memmem.c index 41dc0fa3db..b8a055306d 100644 --- a/memcheck/tests/memmem.c +++ b/memcheck/tests/memmem.c @@ -32,10 +32,11 @@ main () * character of the first occurrence of little is returned. */ assert (memmem (haystack, 0, needle, 0) == NULL); + assert (memmem (haystack, 1, needle, 0) == NULL); #else assert (memmem (haystack, 0, needle, 0) == haystack); -#endif assert (memmem (haystack, 1, needle, 0) == haystack); +#endif assert (memmem (haystack, 0, needle, 1) == NULL); assert (memmem (haystack, 1, needle, 1) == haystack); free (haystack); @@ -43,7 +44,11 @@ main () haystack = create_mem ("abc"); needle = create_mem ("bc"); +#if defined(VGO_darwin) + assert (memmem (haystack, 3, needle, 0) == NULL); +#else assert (memmem (haystack, 3, needle, 0) == haystack); +#endif assert (memmem (haystack, 3, needle, 2) == haystack + 1); assert (memmem (haystack + 1, 2, needle, 2) == haystack + 1); assert (memmem (haystack + 2, 1, needle, 2) == NULL);