mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 16:47:41 +00:00
[libFuzzer] ensure that strncmp is not inlined in a test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299177 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8cefdcb5f6
commit
15e73a64fc
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user