[PATCH] [Sanitizers] Intercept snprintf_l() on FreeBSD
Evgeniy Stepanov
eugenis at google.com
Thu Dec 18 07:42:13 PST 2014
================
Comment at: lib/asan/tests/asan_test.cc:1289
@@ +1288,3 @@
+#if SANITIZER_TEST_HAS_PRINTF_L
+static int vsnprintf_l_Wrapper(char *s, size_t n,
+ locale_t l, const char *format, ...) {
----------------
Capital W after an underscore looks unusual.
================
Comment at: lib/asan/tests/asan_test.cc:1298
@@ +1297,3 @@
+
+TEST(AddressSanitizer, snprintf_l) {
+ char buff[100];
----------------
This does not really test much (does it fail before this patch?).
See test/asan/TestCases/printf-*.c for inspiration. No need to repeat all 5 of them for the _l variant, but please add something that verifies that the whole prinf sanitizing machinery is applied in this case.
http://reviews.llvm.org/D6418
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list