[PATCH] Sanitize printf functions
Yury Gribov
tetra2005 at gmail.com
Fri Dec 27 03:54:02 PST 2013
================
Comment at: asan/asan_interceptors.cc:678
@@ +677,3 @@
+#if ASAN_INTERCEPT_PRINTF
+// TODO(ygribov): move to sanitizer_common_interceptors.inc
+// to reuse in e.g. other sanitizers?
----------------
Evgeniy Stepanov wrote:
> Kostya Serebryany wrote:
> > Yury Gribov wrote:
> > > Kostya Serebryany wrote:
> > > > yes, please
> > > I tried this initially but realized that Msan already intercepts printf stuff. What's the general policy about what goes into sanitizer_common (e.g. strcmp) and what gets re-implemented in each sanitizer (e.g. memset)?
> > msan interceptors are rudimentary and will have to be replaced with these *eventually*.
> > Here is a suggestion: move the code to sanitizer_common_interceptors.inc
> > but define SANITIZER_INTERCEPT_PRINTF to 1 only in asan.
> > tsan and msan will follow later.
> We can enable it in MSan from the start (killing the old msan interceptors), just make sure that the new interceptors emulate a WRITE to the target buffer (for sprintf and friends).
Is current emulation fine or do you want to check each specifier separately?
http://llvm-reviews.chandlerc.com/D2480
More information about the llvm-commits
mailing list