[PATCH] D47650: Disable recursive interceptors in signal(3)/MSan

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 12:33:01 PDT 2018


krytarowski created this revision.
krytarowski added reviewers: eugenis, vitalybuka, joerg.
krytarowski added a project: Sanitizers.
Herald added a subscriber: llvm-commits.

signal(3) on NetBSD calls internally sigaction(2).

Without disabling the recursive interceptor, there are
false positives about uninitialized memory reads inside libc.

This change fixes execution of such programs as sh(1) and
vmstat(1) in the NetBSD userland.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D47650

Files:
  lib/msan/msan_interceptors.cc


Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -1292,6 +1292,7 @@
 #define SIGNAL_INTERCEPTOR_SIGNAL_IMPL(func, signo, handler) \
   {                                                          \
     handler = signal_impl(signo, handler);                   \
+    InterceptorScope interceptor_scope;                      \
     return REAL(func)(signo, handler);                       \
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47650.149531.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/48a90ad3/attachment.bin>


More information about the llvm-commits mailing list