[PATCH] D35704: added reset feature to dfsan

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 11:43:01 PDT 2017

kcc added a comment.

also, would like to hear from @pcc

Comment at: include/sanitizer/dfsan_interface.h:55
+/// In process reset of dfsan
+void dfsan_reset(void);
Explain thread-[un]safety
I assume this function is *not* thread safe and thus the comment must be clear on this topic. 
Add '.' at the end

Comment at: lib/dfsan/dfsan.cc:179
+  // reset label count
+  atomic_store(&__dfsan_last_label, 0, memory_order_relaxed);
Add some code to check-fail in case __dfsan_last_label has changed (i.e. to check that no other threads are messing around)

Then, add a test with threads that will trigger that check-fail.


More information about the llvm-commits mailing list