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

Frida windows thread local #2433

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Frida windows thread local #2433

wants to merge 3 commits into from

Conversation

s1341
Copy link
Collaborator

@s1341 s1341 commented Jul 23, 2024

Fix windows thread local by refactoring the thread_local! into an os_thread_local::ThreadLocal and embedding it in the AsanRuntime type.

This fix is necessary because static thread local storage appears to be broken on windows. The TEB is supposed to have a ThreadLocalStoragePointer, but it appears to be uninitialized even though thread_local variables were declared in the main executable, leading to a null deref.

The os-thread-local crate uses a dynamic thread local storage api, and thus works.

@domenukk
Copy link
Member

News?

@s1341
Copy link
Collaborator Author

s1341 commented Sep 29, 2024

I have some patches on this... but need to find time to work on them.

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