summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test')
-rw-r--r--compiler-rt/test/fuzzer/LeakTest.cpp2
-rw-r--r--compiler-rt/test/fuzzer/ThreadedLeakTest.cpp2
-rw-r--r--compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp2
-rw-r--r--compiler-rt/test/fuzzer/fuzzer-leak.test6
-rw-r--r--compiler-rt/test/fuzzer/trace-malloc-threaded.test3
5 files changed, 6 insertions, 9 deletions
diff --git a/compiler-rt/test/fuzzer/LeakTest.cpp b/compiler-rt/test/fuzzer/LeakTest.cpp
index ea89e390105..f259e9d359f 100644
--- a/compiler-rt/test/fuzzer/LeakTest.cpp
+++ b/compiler-rt/test/fuzzer/LeakTest.cpp
@@ -5,7 +5,7 @@
#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') {
diff --git a/compiler-rt/test/fuzzer/ThreadedLeakTest.cpp b/compiler-rt/test/fuzzer/ThreadedLeakTest.cpp
index 538d3b43480..59f3671fe9d 100644
--- a/compiler-rt/test/fuzzer/ThreadedLeakTest.cpp
+++ b/compiler-rt/test/fuzzer/ThreadedLeakTest.cpp
@@ -6,7 +6,7 @@
#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;
diff --git a/compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp b/compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp
index 2b83d3597f3..0183d939af5 100644
--- a/compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp
+++ b/compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp
@@ -12,7 +12,7 @@
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),
diff --git a/compiler-rt/test/fuzzer/fuzzer-leak.test b/compiler-rt/test/fuzzer/fuzzer-leak.test
index 0b1a09f4dbf..c777797959e 100644
--- a/compiler-rt/test/fuzzer/fuzzer-leak.test
+++ b/compiler-rt/test/fuzzer/fuzzer-leak.test
@@ -1,9 +1,7 @@
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
diff --git a/compiler-rt/test/fuzzer/trace-malloc-threaded.test b/compiler-rt/test/fuzzer/trace-malloc-threaded.test
index 4d96a6652ad..3e3679d5597 100644
--- a/compiler-rt/test/fuzzer/trace-malloc-threaded.test
+++ b/compiler-rt/test/fuzzer/trace-malloc-threaded.test
@@ -2,8 +2,7 @@
// 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
OpenPOWER on IntegriCloud