[PATCH] [compiler-rt] Fix a flaky heap-overflow-large.cc test
kuba.brecka at gmail.com
Sun Mar 22 02:59:32 PDT 2015
The regression test in test/asan/TestCases/heap-overflow-large.cc returns an exit code with this statement:
return res ? res : 1;
with the intention of always returning a non-zero exit code, no matter what `res` is (it's a result of a pretty much random memory read). However, when `res` is accidentally a multiple of 256, then (at least on Darwin) this will be treated as a zero exit code. Let's change the test to only return one byte of `res` and not the whole `int`.
@@ -19,5 +19,5 @@
// CHECK: main
// CHECK-NOT: CHECK failed
- return res ? res : 1;
+ return (char)res ? (char)res : 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 358 bytes
Desc: not available
More information about the llvm-commits