[PATCH] D42883: Prevent recursive MSan interceptors in strftime(3) like functions

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 18:51:30 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL325208: Prevent recursive MSan interceptors in strftime(3) like functions (authored by kamil, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D42883?vs=132741&id=134363#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42883

Files:
  compiler-rt/trunk/lib/msan/msan_interceptors.cc


Index: compiler-rt/trunk/lib/msan/msan_interceptors.cc
===================================================================
--- compiler-rt/trunk/lib/msan/msan_interceptors.cc
+++ compiler-rt/trunk/lib/msan/msan_interceptors.cc
@@ -514,6 +514,7 @@
 
 #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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42883.134363.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180215/191b1baf/attachment.bin>


More information about the llvm-commits mailing list