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

need to instrument thread-local globals #12

Open
ramosian-glider opened this issue Aug 31, 2015 · 2 comments
Open

need to instrument thread-local globals #12

ramosian-glider opened this issue Aug 31, 2015 · 2 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 12

Currently, asan does not instrument thread-local globals, but it should. 

Two problems here: 

1. The address of main thread's thread-local is not available at the link time where
we currently form the array which will be passed to __asan_register_globals

2. Need to poison the non-main-thread's copies somehow. 

Reported by konstantin.s.serebryany on 2011-11-23 02:38:42

@ramosian-glider
Copy link
Member Author

For the main executable we can keep a stencil corresponding to the .tls segment with
poisoned redzones (the redzone positions are determined using a function similar to
__asan_register_globals). In the pthread_create callback we can copy that stencil over
the current thread's TLS, which is usually before the thread's stack.


For the shared libraries it's a little bit trickier, because their TLS data is stored
in a two-level map.

Reported by ramosian.glider on 2012-02-01 16:05:18

@kcc kcc assigned kcc and unassigned google Dec 2, 2015
@hstk30-hw
Copy link

Does this have any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants