Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#1568: add initial support for TLS on MacOS 64-bit (#2293) #3542

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

derekbruening
Copy link
Contributor

For 64-bit MacOS, there is no way to set the %fs base which stops
us from using DR's scheme used on other unix platforms. This commit
provides initial support to MacOS 64-bit by stealing a TLS slot
from the app for DR's TLS base.

  • implement is_thread_tls_initialized for MacOS 64-bit
  • implement tls_thread_init and tls_thread_free
  • set MACOS64 define in cmake script
  • add WRITE_TLS_SLOT_IMM etc. for MacOS 64-bit
  • add read_thread_register for MacOS 64-bit to get pthread_t base

Issue: #1979

For 64-bit MacOS, there is no way to set the %fs base which stops
us from using DR's scheme used on other unix platforms. This commit
provides initial support to MacOS 64-bit by stealing a TLS slot
from the app for DR's TLS base.
+ implement is_thread_tls_initialized for MacOS 64-bit
+ implement tls_thread_init and tls_thread_free
+ set MACOS64 define in cmake script
+ add WRITE_TLS_SLOT_IMM etc. for MacOS 64-bit
+ add read_thread_register for MacOS 64-bit to get pthread_t base

Issue: #1979
@derekbruening derekbruening merged commit ce8e803 into master Apr 15, 2019
@derekbruening derekbruening deleted the i1568-mac64-tls branch April 15, 2019 03:15
@derekbruening
Copy link
Contributor Author

I failed to give Shawn Denbow credit for this due to the squash-and-merge throwing his Author info away, even though there was no squash: Github makes a new commit using whoever created the PR, which was me. Adding a note here at least: this was PR #2293 by Shawn with minor tweaks afterward by me.

hgreving2304 pushed a commit that referenced this pull request Apr 22, 2019
For 64-bit MacOS, there is no way to set the %fs base which stops
us from using DR's scheme used on other unix platforms. This commit
provides initial support to MacOS 64-bit by stealing a TLS slot
from the app for DR's TLS base.
+ implement is_thread_tls_initialized for MacOS 64-bit
+ implement tls_thread_init and tls_thread_free
+ set MACOS64 define in cmake script
+ add WRITE_TLS_SLOT_IMM etc. for MacOS 64-bit
+ add read_thread_register for MacOS 64-bit to get pthread_t base

Issue: #1568, #1979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants