[PATCH] Switch ASan to use ThreadRegistry from sanitizer_common.
Kostya Serebryany
kcc at google.com
Wed Mar 20 06:22:06 PDT 2013
================
Comment at: lib/asan/asan_interceptors.cc:136
@@ +135,3 @@
+ int detached = 0;
+ pthread_attr_getdetachstate(attr, &detached);
+
----------------
you can call pthread_attr_getdetachstate only iff the original attr != 0
then you don't need myattr
================
Comment at: lib/asan/asan_report.cc:451
@@ +450,3 @@
+ // recursive reports.
+ ThreadRegistryLock *lock = new(registry_lock_placeholder)
+ ThreadRegistryLock(&asanThreadRegistry());
----------------
OMFG!!
Can you add sanThreadRegistry()->LockAndNeverUnlock() ?
http://llvm-reviews.chandlerc.com/D555
More information about the llvm-commits
mailing list