[PATCH] D19607: [sanitizer] Add early call handling to strchr + strrchr interceptors
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 14:26:43 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267793: [sanitizer] Add early call handling to strchr + strrchr interceptors (authored by bruening).
Changed prior to commit:
http://reviews.llvm.org/D19607?vs=55270&id=55317#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19607
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -401,6 +401,8 @@
#if SANITIZER_INTERCEPT_STRCHR
INTERCEPTOR(char*, strchr, const char *s, int c) {
void *ctx;
+ if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED)
+ return internal_strchr(s, c);
COMMON_INTERCEPTOR_ENTER(ctx, strchr, s, c);
char *result = REAL(strchr)(s, c);
uptr len = internal_strlen(s);
@@ -432,6 +434,8 @@
#if SANITIZER_INTERCEPT_STRRCHR
INTERCEPTOR(char*, strrchr, const char *s, int c) {
void *ctx;
+ if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED)
+ return internal_strrchr(s, c);
COMMON_INTERCEPTOR_ENTER(ctx, strrchr, s, c);
uptr len = internal_strlen(s);
if (common_flags()->intercept_strchr)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19607.55317.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/d203548d/attachment.bin>
More information about the llvm-commits
mailing list