[PATCH] Sanitize printf functions
Yury Gribov
tetra2005 at gmail.com
Sat Dec 28 04:41:27 PST 2013
> Let others look at this change too.
> We won't commit it before the end of our holidays (~Jan 10) anyway.
Sure, there's no push from my side.
> Until we don't have tsan tests, I suggest to disable this for tsan.
k
================
Comment at: msan/msan_interceptors.cc:1294
@@ -1293,1 +1293,3 @@
#define COMMON_INTERCEPTOR_ON_EXIT(ctx) OnExit()
+// TODO(ygribov): update Msan to use common printf interceptors
+#define SANITIZER_INTERCEPT_PRINTF 0
----------------
Kostya Serebryany wrote:
> we can do it as a separate commit (I'd even prefer that)
Sure.
================
Comment at: sanitizer_common/sanitizer_common_interceptors.inc:33
@@ -32,2 +32,3 @@
+#include <stddef.h>
#include <stdarg.h>
----------------
Kostya Serebryany wrote:
> Evgeniy Stepanov wrote:
> > No system includes (stdarg is a necessary evil).
> can you avoid this?
Well, I need size_t for snprintf.
================
Comment at: sanitizer_common/sanitizer_common_interceptors_scanf.inc:281
@@ -280,1 +280,3 @@
+ // TODO(y.gribov): check format?
+
----------------
Kostya Serebryany wrote:
> good idea. feel free to implement or to leave the TODO.
> Actually this code base uses FIXME (w/o name) more often.
> Actually this code base uses FIXME (w/o name) more often.
Got it. Anyway, this was more a question for reviewers than real TODO. I'll add format check in next rev.
http://llvm-reviews.chandlerc.com/D2480
More information about the llvm-commits
mailing list