[PATCH] D42884: Prevent recursive MSan interceptors in fgets(3)

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT325207: Prevent recursive MSan interceptors in fgets(3) (authored by kamil, committed by ).

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42884

Files:
  lib/msan/msan_interceptors.cc


Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -779,6 +779,7 @@
 
 INTERCEPTOR(char *, fgets, char *s, int size, void *stream) {
   ENSURE_MSAN_INITED();
+  InterceptorScope interceptor_scope;
   char *res = REAL(fgets)(s, size, stream);
   if (res)
     __msan_unpoison(s, REAL(strlen)(s) + 1);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42884.134361.patch
Type: text/x-patch
Size: 425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180215/14a54b8f/attachment.bin>


More information about the llvm-commits mailing list