OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cefdcb
)
[libFuzzer] ensure that strncmp is not inlined in a test
author
Kostya Serebryany
<kcc@google.com>
Fri, 31 Mar 2017 03:34:33 +0000
(
03:34
+0000)
committer
Kostya Serebryany
<kcc@google.com>
Fri, 31 Mar 2017 03:34:33 +0000
(
03:34
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299177
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Fuzzer/test/SingleStrncmpTest.cpp
patch
|
blob
|
history
diff --git
a/lib/Fuzzer/test/SingleStrncmpTest.cpp
b/lib/Fuzzer/test/SingleStrncmpTest.cpp
index
dbcc464
..
e5601da
100644
(file)
--- a/
lib/Fuzzer/test/SingleStrncmpTest.cpp
+++ b/
lib/Fuzzer/test/SingleStrncmpTest.cpp
@@
-9,7
+9,8
@@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
char *S = (char*)Data;
- if (Size >= 6 && !strncmp(S, "qwerty", 6)) {
+ volatile auto Strncmp = &(strncmp); // Make sure strncmp is not inlined.
+ if (Size >= 6 && !Strncmp(S, "qwerty", 6)) {
fprintf(stderr, "BINGO\n");
exit(1);
}