Bug 201216 - Valgrind does not support pthread_sigmask() on OS X
Summary: Valgrind does not support pthread_sigmask() on OS X
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: Unlisted Binaries macOS
: NOR normal
Target Milestone: ---
Assignee: Rhys Kidd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 13:33 UTC by Alexander Potapenko
Modified: 2015-07-12 07:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (4.29 KB, patch)
2015-07-11 08:44 UTC, Rhys Kidd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potapenko 2009-07-23 13:33:38 UTC
To reproduce the bug:
  gcc none/tests/pth_blockedsig.c -o pth_blockedsig
  valgrind ./pth_blockedsig

UNKNOWN __pthread_sigmask is unsupported. This warning will not be repeated.
thread CHILD sending SIGUSR1 to thread MAIN
SHOULD NOT BE HERE (SIGUSR1)!!!!
==66545== 

, while a native run produces the following output:
glider$ ./pth_blockedsig 
thread CHILD sending SIGUSR1 to thread MAIN

Nullgrind behaves the same way on this test.
Comment 1 Georgi Kodinov 2011-01-26 16:09:46 UTC
This is what's currently preventing mysqld from running under valgrind on MacOSX 10.6
Comment 2 Rhys Kidd 2015-06-07 05:07:47 UTC
This can be reliably reproduced with the below commands:

$ make check
$ perl tests/vg_regtest memcheck/tests/thread_alloca none/tests/pth_blockedsig
thread_alloca:   valgrind   -q --trace-children=yes ./thread_alloca 30 
sh: line 1: 77175 Illegal instruction: 4  VALGRIND_LIB=/Users/rhyskidd/Documents/Coding/valgrind/trunk/.in_place VALGRIND_LIB_INNER=/Users/rhyskidd/Documents/Coding/valgrind/trunk/.in_place /Users/rhyskidd/Documents/Coding/valgrind/trunk/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --tool=memcheck -q --trace-children=yes ./thread_alloca 30 > thread_alloca.stdout.out 2> thread_alloca.stderr.out
*** thread_alloca failed (stderr) ***
pth_blockedsig:  valgrind   ./pth_blockedsig 
*** pth_blockedsig failed (stderr) ***

== 2 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/thread_alloca             (stderr)
none/tests/pth_blockedsig                (stderr)
Comment 3 Rhys Kidd 2015-07-11 08:44:03 UTC
Created attachment 93559 [details]
Proposed patch
Comment 4 Rhys Kidd 2015-07-12 07:07:45 UTC
Resolved with r15410.