AsanThread::Destroy implementation expected to be called on
child thread.
I missed authors concern regarding this reviewing D95184.
Differential D95731
[asan] Fix pthread_create interceptor Authored by vitalybuka on Jan 30 2021, 12:44 AM.
Details
AsanThread::Destroy implementation expected to be called on I missed authors concern regarding this reviewing D95184.
Diff Detail
Event TimelineComment Actions Thanks for catching this. Did this break something somewhere? I didn't see any emails about breaking CI. I've left some minor comments in the review but overall the approach seems good to me.
Comment Actions It fails many_threads_detach.cpp on my workstation. Probably bots have higher thread limits.
Comment Actions Thanks for working on this. The new approach LGTM apart from calling malloc_storage().CommitBack();. I've left a comment on this. I suspect it's probably okay but I wanted to bring this up before we land this.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Should we have something like this to document the assumption and catch if it's being violated?
// Must be called on owning thread if `create_failed` is false. AsanThread::Destroy(bool create_failed) { ... bool called_by_owning_thread = tid == GetCurrentTidOrInvalid(); ... if (!create_failed) { CHECK(called_by_owning_thread); ... }