summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2018-03-27 16:40:20 +0000
committerMatt Morehouse <mascasa@google.com>2018-03-27 16:40:20 +0000
commit22a1afd99fd0d0390f3db0d7c2f821592f90d62b (patch)
tree143f079b45faf08dbde50dfbfc915167bd4dcc0b /compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp
parent5d93fdfa898fb1fcfd574770362e5c79ba2deb2b (diff)
downloadbcm5719-llvm-22a1afd99fd0d0390f3db0d7c2f821592f90d62b.tar.gz
bcm5719-llvm-22a1afd99fd0d0390f3db0d7c2f821592f90d62b.zip
[libFuzzer] Place volatile after pointer types.
For a few tests, volatile was placed before the '*' in pointer declarations, resulting in it applying to the underlying data rather than the pointer itself. Placing volatile after the '*' allows us to switch those tests to -O2. llvm-svn: 328633
Diffstat (limited to 'compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp')
-rw-r--r--compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp2
1 files changed, 1 insertions, 1 deletions
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),
OpenPOWER on IntegriCloud