summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rwxr-xr-xllvm/lib/Fuzzer/fuzzer-test-suite/openssl-1.0.1f/build.sh2
-rw-r--r--llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/fuzzer-test-suite/openssl-1.0.1f/build.sh b/llvm/lib/Fuzzer/fuzzer-test-suite/openssl-1.0.1f/build.sh
index 33e77a00c91..69fa7241b86 100755
--- a/llvm/lib/Fuzzer/fuzzer-test-suite/openssl-1.0.1f/build.sh
+++ b/llvm/lib/Fuzzer/fuzzer-test-suite/openssl-1.0.1f/build.sh
@@ -7,7 +7,7 @@ LIBFUZZER_SRC=$(dirname $(dirname $SCRIPT_DIR))
JOBS=20
# FUZZ_CXXFLAGS=" -g -fsanitize=address -fsanitize-coverage=edge"
-FUZZ_CXXFLAGS=" -g -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div"
+FUZZ_CXXFLAGS=" -g -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div,trace-gep"
get() {
[ ! -e SRC ] && git clone https://github.com/openssl/openssl.git SRC && (cd SRC && git checkout OpenSSL_1_0_1f)
diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
index 4a1a75518b0..e26fdb42c99 100644
--- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -599,7 +599,7 @@ void SanitizerCoverageModule::InjectTraceForGep(
for (auto GEP : GepTraceTargets) {
IRBuilder<> IRB(GEP);
for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I)
- if (!isa<ConstantInt>(*I))
+ if (!isa<ConstantInt>(*I) && (*I)->getType()->isIntegerTy())
IRB.CreateCall(SanCovTraceGepFunction,
{IRB.CreateIntCast(*I, IntptrTy, true)});
}
OpenPOWER on IntegriCloud