[PATCH] D35704: added reset feature to dfsan

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 14:49:11 PDT 2017


pcc added inline comments.


================
Comment at: include/sanitizer/dfsan_interface.h:55
 
+/// In process reset of dfsan
+void dfsan_reset(void);
----------------
kcc wrote:
> 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
> 
Please also document that there should also be no active stack frames which may be processing values with non-zero labels.


================
Comment at: test/dfsan/reset.cc:18
+
+  dfsan_reset();
+  assert(dfsan_get_label_count() == 0);
----------------
Is this safe, given the constraint I mentioned above? I'd prefer to move the code that creates labels into a separate function.


https://reviews.llvm.org/D35704





More information about the llvm-commits mailing list