In contrast to Linux, FreeBSD does not omit the *printf_l() functions so we have to intercept them. Particularly, libcxx leverage snprintf_l() for verbalization of numeric values. Since gtest use the standard i/o streams, we get mass false positives on Msan unit tests.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
906–908 ↗ | (On Diff #16647) | Just to confirm, the issue reported in this comment is not directly tied to the new *printf_l functionality? |
Please add a test, either in test/asan or in lib/asan/tests/asan_test.cc
lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
892 ↗ | (On Diff #16647) | Why not use VSNPRINTF_INTERCEPTOR_IMPL directly? Also, what about all the other *printf*_l functions? They do not have to be done in 1 patch, but you'll probably run into issues with them at some point, too. |
906–908 ↗ | (On Diff #16647) | It's not. |
Also, what about all the other *printf*_l functions? They do not have to be done in 1 patch, but you'll probably run into issues with them at some point, too.
Yes, I've added them to my TODO and will provide another patch for the rest of the funcs some time later.
Now it seems I have to add a test case to this patch...
lib/asan/tests/asan_test.cc | ||
---|---|---|
1289 ↗ | (On Diff #17442) | Capital W after an underscore looks unusual. |
1298 ↗ | (On Diff #17442) | This does not really test much (does it fail before this patch?). |