forked from OSchip/llvm-project
[libFuzzer] Fix fuzzer-oom.test.
SinkPtr was not correctly marked as volatile, causing the malloc to get optimized out. This was causing 20-minute timeouts for the test and no OOM.
This commit is contained in:
parent
9b8e7a9d7d
commit
b351590bae
|
@ -10,7 +10,7 @@
|
|||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
static volatile char *SinkPtr;
|
||||
static char *volatile SinkPtr;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
if (Size > 0 && Data[0] == 'H') {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
static volatile char *SinkPtr;
|
||||
static char *volatile SinkPtr;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
if (Size > 0 && Data[0] == 'H') {
|
||||
|
|
Loading…
Reference in New Issue