Skip to content

Instantly share code, notes, and snippets.

@skunkworker
Last active September 20, 2018 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skunkworker/90a669fc393bb8a180765d9bd3162b56 to your computer and use it in GitHub Desktop.
Save skunkworker/90a669fc393bb8a180765d9bd3162b56 to your computer and use it in GitHub Desktop.
How to fix valgrind ignoring sigreturn errors on mac os x high sierra.
git clone https://sourceware.org/git/valgrind.git;
cd valgrind/
# time to edit some files (see below)
./autogen.sh
./configure --disable-dependency-tracking --enable-only64bit --build=amd64-darwin
./make
./make install
# done.
if (ARG2 == VKI_UC_SET_ALT_STACK) {
/* This is confusing .. the darwin kernel sources imply there is
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", // how about we don't print out anything here? - sep 20, 2018 by skunkworker
// "WARNING: Ignoring sigreturn( ..., "
// "UC_SET_ALT_STACK );\n");
SET_STATUS_Success(0);
return;
}
if (ARG2 == VKI_UC_RESET_ALT_STACK) {
/* Ditto */
// VG_(debugLog)(0, "syswrap-darwin", // or here
// "WARNING: Ignoring sigreturn( ..., "
// "UC_RESET_ALT_STACK );\n");
SET_STATUS_Success(0);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment