[PATCH] D63877: Avoid infinite loop with asan interception
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 06:43:07 PDT 2019
serge-sans-paille created this revision.
serge-sans-paille added a reviewer: kcc.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.
This should fix https://bugs.llvm.org/show_bug.cgi?id=39641
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D63877
Files:
compiler-rt/lib/interception/interception_linux.cc
Index: compiler-rt/lib/interception/interception_linux.cc
===================================================================
--- compiler-rt/lib/interception/interception_linux.cc
+++ compiler-rt/lib/interception/interception_linux.cc
@@ -54,6 +54,9 @@
bool InterceptFunction(const char *name, uptr *ptr_to_real, uptr func,
uptr wrapper) {
void *addr = GetFuncAddr(name);
+ if ((uptr)addr == wrapper)
+ addr = nullptr;
+
*ptr_to_real = (uptr)addr;
return addr && (func == wrapper);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63877.206852.patch
Type: text/x-patch
Size: 524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190627/353e7bd1/attachment.bin>
More information about the llvm-commits
mailing list