Don't use pthread_*_np functions to get stack master thread #14501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
They seems to return bogus values for master thread on Linux.
For non-windows, this should be basically the same on master thread.
Buildbot runs:
http://buildbot.e.ip.saba.us:8010/builders/build_centos7.1-x64/builds/52
http://buildbot.e.ip.saba.us:8010/builders/build_osx10.9-x64/builds/51
http://buildbot.e.ip.saba.us:8010/builders/build_ubuntu12.04-x64/builds/49
http://buildbot.e.ip.saba.us:8010/builders/build_ubuntu12.04-x86/builds/50
http://buildbot.e.ip.saba.us:8010/builders/build_ubuntu14.04-x64/builds/50
http://buildbot.e.ip.saba.us:8010/builders/build_ubuntu14.04-x86/builds/49
Second commit:
http://buildbot.e.ip.saba.us:8010/builders/build_osx10.9-x64/builds/52
Ref #14473 (comment)
c.c. @tkelman
Also fix stack address detection on OSX since the signal (message?) handling thread cannot access the TLS value directly. The same logic is also used by #14190 and they should be combined when both are merged (to the version in this PR). c.c. @vtjnash