#include <cstddef>
#include <cstdint>
-static volatile void *Sink;
+static void * volatile Sink;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Size > 0 && *Data == 'H') {
#include <cstdint>
#include <thread>
-static volatile int *Sink;
+static int * volatile Sink;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Size == 0) return 0;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
auto C = [&] {
- volatile void *a = malloc(5639);
+ void * volatile a = malloc(5639);
free((void *)a);
};
std::thread T[] = {std::thread(C), std::thread(C), std::thread(C),
REQUIRES: lsan
-// Avoid optimizing since it causes these leaks to go away.
-RUN: %cpp_compiler -O0 %S/LeakTest.cpp -o %t-LeakTest
-RUN: %cpp_compiler -O0 %S/ThreadedLeakTest.cpp -o %t-ThreadedLeakTest
-
+RUN: %cpp_compiler %S/LeakTest.cpp -o %t-LeakTest
+RUN: %cpp_compiler %S/ThreadedLeakTest.cpp -o %t-ThreadedLeakTest
RUN: %cpp_compiler %S/LeakTimeoutTest.cpp -o %t-LeakTimeoutTest
RUN: rm -rf %t-corpus && mkdir -p %t-corpus
// printing a stack trace repeatedly
UNSUPPORTED: darwin
-// Avoid optimizing since it causes the malloc to go away.
-RUN: %cpp_compiler -O0 %S/TraceMallocThreadedTest.cpp -o \
+RUN: %cpp_compiler %S/TraceMallocThreadedTest.cpp -o \
RUN: %t-TraceMallocThreadedTest
RUN: %t-TraceMallocThreadedTest -trace_malloc=2 -runs=1 2>&1 | FileCheck %s