]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin regtest: try again with memmem and make sigreturn warnings debug level 1
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 25 Dec 2023 08:04:46 +0000 (09:04 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 25 Dec 2023 08:04:46 +0000 (09:04 +0100)
coregrind/m_syswrap/syswrap-darwin.c
memcheck/tests/memmem.c

index f24b1c79724ba08fa9285072b10661fd7e0f2b6b..61e7f6e6e2311b6d19ce639386004bb4fcb06047 100644 (file)
@@ -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);
index 41dc0fa3db713eb64c438f237e4d0238171cb02c..b8a055306da0485175f54a404962814873bc5a9a 100644 (file)
@@ -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);