1 | // Test that asan_symbolize does not hang when provided with an non-existing |
2 | // path. |
3 | // RUN: echo '#0 0xabcdabcd (%t/bad/path+0x1234)' | %asan_symbolize | FileCheck %s -check-prefix CHECK-BAD-FILE |
4 | // Note: can't check for "0xabcdabcd in ?? ??:0" since DarwinSymbolizer will print the file even if it doesn't exist. |
5 | // CHECK-BAD-FILE: #0 0xabcdabcd |
6 | // CHECK-BAD-FILE-EMPTY: |
7 | |
8 | // Also test that asan_symbolize doesn't assert on an invalid address with a valid file: |
9 | // RUN: %clangxx_asan -O0 %s -o %t |
10 | // RUN: echo '#0 0xabcdabcd (%t+0xabcdabcd)' | %asan_symbolize | FileCheck %s -check-prefix CHECK-BAD-ADDR |
11 | // CHECK-BAD-ADDR: #0 0xabcdabcd |
12 | // CHECK-BAD-ADDR-EMPTY: |
13 | |
14 | int main() { |
15 | return 0; |
16 | } |
17 | |