Mercurial > hg > CbC > CbC_llvm
comparison compiler-rt/test/fuzzer/trace-malloc-unbalanced.test @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // FIXME: This test infinite loops on darwin because it crashes | |
2 // printing a stack trace repeatedly | |
3 UNSUPPORTED: darwin | |
4 | |
5 // Verifies lib/fuzzer/scripts/unbalanced_allocs.py script | |
6 | |
7 RUN: %cpp_compiler %S/TraceMallocTest.cpp -o %t-TraceMallocTest | |
8 | |
9 # Specify python because we can't use the shebang line on Windows. | |
10 RUN: %run %t-TraceMallocTest -seed=1 -trace_malloc=1 -runs=200 2>&1 | \ | |
11 RUN: python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s | |
12 | |
13 RUN: %run %t-TraceMallocTest -seed=1 -trace_malloc=2 -runs=200 2>&1 | \ | |
14 RUN: python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s --check-prefixes=CHECK,CHECK2 | |
15 | |
16 CHECK: MallocFreeTracer: START | |
17 # Behavior of the format string "%p" is implementation defined. Account for the | |
18 # implementation on Windows and Linux. | |
19 CHECK: Unbalanced MALLOC[{{[0-9]+}}] [[PTR:(:?0x)?[0-9a-fA-F]+]] 4 | |
20 CHECK2-NEXT: {{ #0 0x[0-9a-f]+ in }} | |
21 CHECK2-NEXT: {{ #1 0x[0-9a-f]+ in }} | |
22 CHECK2-NEXT: {{ #2 0x[0-9a-f]+ in }} | |
23 CHECK: MallocFreeTracer: STOP | |
24 | |
25 CHECK: MallocFreeTracer: START | |
26 CHECK: Unbalanced FREE[{{[0-9]+}}] [[PTR]] | |
27 CHECK2-NEXT: {{ #0 0x[0-9a-f]+ in }} | |
28 CHECK2-NEXT: {{ #1 0x[0-9a-f]+ in }} | |
29 CHECK2-NEXT: {{ #2 0x[0-9a-f]+ in }} | |
30 CHECK: MallocFreeTracer: STOP |