Update the main thread's os_id on every pthread_create, and before
initiating leak checking. This ensures that we have the correct os_id even if we
have forked after Init(). Not sure of the performance implications for
pthread_create, but this is more robust than intercepting fork() since this
scheme handles fork by syscall too.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Can you please clarify why we it is necessary to ensure correct os_id before pthread_create?
lib/asan/asan_interceptors.cc | ||
---|---|---|
141 | Please add this to CreateThread() interceptor as well. | |
lib/asan/asan_thread.cc | ||
259 | static_cast here for consistency. | |
lib/asan/asan_thread.h | ||
127 | I think the comment needs to be more explicit. |
Please add this to CreateThread() interceptor as well.