[PATCH] Sanitize printf functions
Yury Gribov
tetra2005 at gmail.com
Fri Jan 17 05:53:48 PST 2014
Updates based on feedback from Evgeny&Alex.
What's missing:
* I haven't added the @LINE directives; currently ASan reports
#0 0x431593 in printf_common
#1 0x431a94 in __interceptor_vprintf
#2 0x42b2fd in printf
#3 0x47a897 in main
which probably is not what we want but I don't think that we should fix it in this patch.
Regarding glibc tests: I've ran them and verified that ASan does not cause segfaults or test failures (it does print couple of warnings on invalid format strings). Is this what you guys wanted?
Hi samsonov, eugenis,
http://llvm-reviews.chandlerc.com/D2480
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D2480?vs=6502&id=6503#toc
Files:
lib/asan/lit_tests/TestCases/printf-2.c
lib/asan/lit_tests/TestCases/printf-4.c
lib/asan/lit_tests/TestCases/printf-1.c
lib/asan/lit_tests/TestCases/printf-3.c
lib/asan/lit_tests/TestCases/printf-5.c
lib/tsan/rtl/tsan_stat.cc
lib/tsan/rtl/tsan_stat.h
lib/tsan/lit_tests/printf-1.c
lib/sanitizer_common/sanitizer_printf.cc
lib/sanitizer_common/sanitizer_common_interceptors.inc
lib/sanitizer_common/sanitizer_platform_interceptors.h
lib/sanitizer_common/sanitizer_flags.h
lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc
lib/sanitizer_common/tests/sanitizer_printf_test.cc
lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc
lib/sanitizer_common/sanitizer_flags.cc
lib/msan/msan_interceptors.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2480.8.patch
Type: text/x-patch
Size: 50378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140117/c6e39bc3/attachment.bin>
More information about the llvm-commits
mailing list