[compiler-rt] r325208 - Prevent recursive MSan interceptors in strftime(3) like functions
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 18:48:20 PST 2018
Author: kamil
Date: Wed Feb 14 18:48:20 2018
New Revision: 325208
URL: http://llvm.org/viewvc/llvm-project?rev=325208&view=rev
Log:
Prevent recursive MSan interceptors in strftime(3) like functions
Summary:
This corrects intercepting this call on NetBSD without false positives.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, vitalybuka
Reviewed By: vitalybuka
Subscribers: llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D42883
Modified:
compiler-rt/trunk/lib/msan/msan_interceptors.cc
Modified: compiler-rt/trunk/lib/msan/msan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_interceptors.cc?rev=325208&r1=325207&r2=325208&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_interceptors.cc Wed Feb 14 18:48:20 2018
@@ -514,6 +514,7 @@ INTERCEPTOR(SIZE_T, __strxfrm_l, char *d
#define INTERCEPTOR_STRFTIME_BODY(char_type, ret_type, func, s, ...) \
ENSURE_MSAN_INITED(); \
+ InterceptorScope interceptor_scope; \
ret_type res = REAL(func)(s, __VA_ARGS__); \
if (s) __msan_unpoison(s, sizeof(char_type) * (res + 1)); \
return res;
More information about the llvm-commits
mailing list