This change moves optimized callbacks from each .o file to compiler-rt. Instead of using code generation it uses direct assembly implementation. Please note that the 'or' version is not implemented and it will produce unresolved external if somehow 'or' version is requested.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/asan/tests/asan_noinst_test.cpp | ||
---|---|---|
13–29 | can you commit this line reordering separately and rebase the patch | |
351 | I see SHADOW_OFFSET_STR neither in existing code nor in the patch | |
compiler-rt/lib/sanitizer_common/sanitizer_shadow_defines.h | ||
14 ↗ | (On Diff #389622) | why it's in common? these constants are asan specific |
llvm/test/CodeGen/X86/asan-check-memaccess-add.ll | ||
61–62 | why do you need x86_64 in nname? |
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
---|---|---|
19 | Nit: Can we omit the semicolons? | |
89 | ||
100 | I think we also need to handle the 16 byte case. | |
compiler-rt/lib/sanitizer_common/sanitizer_shadow_defines.h | ||
32 ↗ | (On Diff #389622) | Looks like in asan_mapping.h this value is 0xd55550000. |
46 ↗ | (On Diff #389622) | Why is the offset 0 for all these platforms? It looks like they have non-zero in asan_mapping.h. |
compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cpp | ||
4 | Why is this step required now? |
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
---|---|---|
43 | Maybe I've confused myself, but isn't this condition opposite of what we want? if (last_accessed_byte >= shadow_value) crash() would translate to cmp %ecx, %r8d ... jl RLABEL(...) or cmp %r8d, %ecx ... jg RLABEL(...) |
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
---|---|---|
19 | Unfortunately no. The issue is that macros are expanded as single line and ; is used instead of a new line character. | |
43 | Here is the disassembled version of __asan_load1: mov %rdi,%rax shr $0x3,%rax movsbl 0x7fff8000(%rax),%eax test %eax,%eax jne <__asan_load1+0x13> ret mov %edi,%ecx and $0x7,%ecx cmp %eax,%ecx jl <__asan_load1+0x12> xor %esi,%esi mov $0x1,%edx xor %ecx,%ecx mov $0x1,%r8d jmp <_ZN6__asanL25ReportGenericErrorWrapperEmbiib> | |
100 | Good catch! | |
compiler-rt/lib/asan/asan_shadow_defines.h | ||
32–50 | Fixed 0 constants. @morehouse PTAL. | |
compiler-rt/lib/asan/tests/asan_noinst_test.cpp | ||
351 | It is supposed to be SHADOW_OFFSET. Good catch. | |
compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cpp | ||
4 | It runs the preprocessor, which will produce platform specific files for the platform as they are guarded by #ifdef in the asan_interface.inc file. | |
llvm/test/CodeGen/X86/asan-check-memaccess-add.ll | ||
61–62 | No, it doesn't. Removed. |
Fixed SHADOW_OFFSET_CONST.
compiler-rt/lib/asan/tests/asan_noinst_test.cpp | ||
---|---|---|
351 | Correction: |
I would recommend to separate llvm into a separate patch, so you can land compiler-rt separately. That part is likely NFC on it's own, but you can wait some time to see if it was not reverted because of breaking. And then you can land/revert llvm part as many times you want
compiler-rt/lib/asan/asan_mapping.h | ||
---|---|---|
160–225 ↗ | (On Diff #391374) | it would be nice to move formating out of the patch and submit separately, review is not required |
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
89 | it's back again? | |
compiler-rt/lib/asan/asan_shadow_defines.h | ||
18 | why can't you move this into asan_mapping.h? | |
compiler-rt/lib/asan/tests/asan_noinst_test.cpp | ||
331 | ASAN_MEMORY_ACCESS_CALLBACKS_ADD -> TEST_ASAN_MEMORY_ACCESS_CALLBACKS_ADD because it instantiates tests |
compiler-rt/lib/asan/asan_shadow_defines.h | ||
---|---|---|
18 | I can't include asan_mapping.h from .S files. |
compiler-rt/lib/asan/asan_shadow_defines.h | ||
---|---|---|
18 | Can you do an opposite? include this one into asan_mapping and use SHADOW_OFFSET_CONST there. |
compiler-rt/lib/asan/asan_interface.inc | ||
---|---|---|
184 | why? |
compiler-rt/lib/asan/asan_interface.inc | ||
---|---|---|
184 | btw === NOTE === If you see a mismatch below, please update sanitizer_interface.inc files. 7,19c7,136 < __asan_check_op_add_s_R12 < __asan_check_op_add_s_R13 < __asan_check_op_add_s_R14 < __asan_check_op_add_s_R15 < __asan_check_op_add_s_R8 < __asan_check_op_add_s_R9 < __asan_check_op_add_s_RAX < __asan_check_op_add_s_RBP < __asan_check_op_add_s_RBX < __asan_check_op_add_s_RCX < __asan_check_op_add_s_RDI < __asan_check_op_add_s_RDX < __asan_check_op_add_s_RSI --- > __asan_check_load_add_16_R12 > __asan_check_load_add_16_R13 > __asan_check_load_add_16_R14 > __asan_check_load_add_16_R15 > __asan_check_load_add_16_R8 > __asan_check_load_add_16_R9 > __asan_check_load_add_16_RAX > __asan_check_load_add_16_RBP > __asan_check_load_add_16_RBX > __asan_check_load_add_16_RCX > __asan_check_load_add_16_RDI > __asan_check_load_add_16_RDX > __asan_check_load_add_16_RSI > __asan_check_load_add_1_R12 > __asan_check_load_add_1_R13 > __asan_check_load_add_1_R14 > __asan_check_load_add_1_R15 > __asan_check_load_add_1_R8 > __asan_check_load_add_1_R9 > __asan_check_load_add_1_RAX > __asan_check_load_add_1_RBP > __asan_check_load_add_1_RBX > __asan_check_load_add_1_RCX > __asan_check_load_add_1_RDI > __asan_check_load_add_1_RDX > __asan_check_load_add_1_RSI > __asan_check_load_add_2_R12 > __asan_check_load_add_2_R13 > __asan_check_load_add_2_R14 > __asan_check_load_add_2_R15 > __asan_check_load_add_2_R8 > __asan_check_load_add_2_R9 > __asan_check_load_add_2_RAX > __asan_check_load_add_2_RBP > __asan_check_load_add_2_RBX > __asan_check_load_add_2_RCX > __asan_check_load_add_2_RDI > __asan_check_load_add_2_RDX > __asan_check_load_add_2_RSI > __asan_check_load_add_4_R12 > __asan_check_load_add_4_R13 > __asan_check_load_add_4_R14 > __asan_check_load_add_4_R15 > __asan_check_load_add_4_R8 > __asan_check_load_add_4_R9 > __asan_check_load_add_4_RAX > __asan_check_load_add_4_RBP > __asan_check_load_add_4_RBX > __asan_check_load_add_4_RCX > __asan_check_load_add_4_RDI > __asan_check_load_add_4_RDX > __asan_check_load_add_4_RSI > __asan_check_load_add_8_R12 > __asan_check_load_add_8_R13 > __asan_check_load_add_8_R14 > __asan_check_load_add_8_R15 > __asan_check_load_add_8_R8 > __asan_check_load_add_8_R9 > __asan_check_load_add_8_RAX > __asan_check_load_add_8_RBP > __asan_check_load_add_8_RBX > __asan_check_load_add_8_RCX > __asan_check_load_add_8_RDI > __asan_check_load_add_8_RDX > __asan_check_load_add_8_RSI > __asan_check_store_add_16_R12 > __asan_check_store_add_16_R13 > __asan_check_store_add_16_R14 > __asan_check_store_add_16_R15 > __asan_check_store_add_16_R8 > __asan_check_store_add_16_R9 > __asan_check_store_add_16_RAX > __asan_check_store_add_16_RBP > __asan_check_store_add_16_RBX > __asan_check_store_add_16_RCX > __asan_check_store_add_16_RDI > __asan_check_store_add_16_RDX > __asan_check_store_add_16_RSI > __asan_check_store_add_1_R12 > __asan_check_store_add_1_R13 > __asan_check_store_add_1_R14 > __asan_check_store_add_1_R15 > __asan_check_store_add_1_R8 > __asan_check_store_add_1_R9 > __asan_check_store_add_1_RAX > __asan_check_store_add_1_RBP > __asan_check_store_add_1_RBX > __asan_check_store_add_1_RCX > __asan_check_store_add_1_RDI > __asan_check_store_add_1_RDX > __asan_check_store_add_1_RSI > __asan_check_store_add_2_R12 > __asan_check_store_add_2_R13 > __asan_check_store_add_2_R14 > __asan_check_store_add_2_R15 > __asan_check_store_add_2_R8 > __asan_check_store_add_2_R9 > __asan_check_store_add_2_RAX > __asan_check_store_add_2_RBP > __asan_check_store_add_2_RBX > __asan_check_store_add_2_RCX > __asan_check_store_add_2_RDI > __asan_check_store_add_2_RDX > __asan_check_store_add_2_RSI > __asan_check_store_add_4_R12 > __asan_check_store_add_4_R13 > __asan_check_store_add_4_R14 > __asan_check_store_add_4_R15 > __asan_check_store_add_4_R8 > __asan_check_store_add_4_R9 > __asan_check_store_add_4_RAX > __asan_check_store_add_4_RBP > __asan_check_store_add_4_RBX > __asan_check_store_add_4_RCX > __asan_check_store_add_4_RDI > __asan_check_store_add_4_RDX > __asan_check_store_add_4_RSI > __asan_check_store_add_8_R12 > __asan_check_store_add_8_R13 > __asan_check_store_add_8_R14 > __asan_check_store_add_8_R15 > __asan_check_store_add_8_R8 > __asan_check_store_add_8_R9 > __asan_check_store_add_8_RAX > __asan_check_store_add_8_RBP > __asan_check_store_add_8_RBX > __asan_check_store_add_8_RCX > __asan_check_store_add_8_RDI > __asan_check_store_add_8_RDX > __asan_check_store_add_8_RSI -- ******************** ******************** Failed Tests (1): AddressSanitizer-x86_64-linux :: TestCases/Linux/interface_symbols_linux.cpp |
Yes, because it broke this: https://lab.llvm.org/buildbot/#/builders/165/builds/11459.
I mean if you revert own or someone else patch it's nice (not required) to reopen the review.
This is breaking check-asan on Windows, see https://crbug.com/1279386. I've repro'd locally, and reverting this change (along with a dependent change) causes the tests to pass again.
$ FILECHECK_OPTS=-dump-input=always ./bin/llvm-lit.py -vv projects/compiler-rt/test/asan/X86_64WindowsConfig/TestCases/Windows/report_globals_vs_freelibrary.cpp -- Testing: 1 tests, 1 workers -- FAIL: AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp (1 of 1) ******************** TEST 'AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp' FAILED ******************** Script: -- : 'RUN: at line 1'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -LD -Od -DDLL C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll : 'RUN: at line 2'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -Od -DEXE C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe : 'RUN: at line 3'; env ASAN_OPTIONS=report_globals=2 C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll 2>&1 | FileCheck C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -- Exit Code: 1 Command Output (stdout): -- $ ":" "RUN: at line 1" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-LD" "-Od" "-DDLL" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" $ ":" "RUN: at line 2" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Od" "-DEXE" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" # command output: Creating library C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.lib and object C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exp $ ":" "RUN: at line 3" $ "env" "ASAN_OPTIONS=report_globals=2" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" note: command had no output on stdout or stderr error: command failed with exit status: 3221226505 $ "FileCheck" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" # command stderr: C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp:23:11: error: CHECK: expected string not found in input // CHECK: Added Global{{.*}} size=19 ^ <stdin>:18:17: note: scanning from here time to load DLL ^ Input file: <stdin> Check file: C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: #0 0x7ff7fe7607c6 in __asan_register_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals.cpp:370 2: #1 0x7ff7fe762fdb in __asan::call_on_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:40 3: #2 0x7ff7fe762edf in __asan::register_dso_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:44 4: #3 0x7ff7fe7e7bc2 in _initterm minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21 5: #4 0x7ff7fe7b8bac in __scrt_common_main_seh d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:256 6: #5 0x7ffc23cf7c23 (C:\Windows\System32\KERNEL32.DLL+0x180017c23) 7: #6 0x7ffc25cad720 (C:\Windows\SYSTEM32\ntdll.dll+0x18006d720) 8: 9: === ID 11; 0x7ff7fe830040 0x7ff7fe830100 10: ==36748==Added Global[0x7ff7fe830040]: beg=0x7ff7fe8074c0 size=24/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 11: ==36748== location (0x7ff7fe807640): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7fe8075e3], 13 12 12: ==36748==Added Global[0x7ff7fe830080]: beg=0x7ff7fe807500 size=18/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 13: ==36748== location (0x7ff7fe8076c0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7fe807661], 19 10 14: ==36748==Added Global[0x7ff7fe8300c0]: beg=0x7ff7fe807540 size=6/32 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 15: ==36748== location (0x7ff7fe807740): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7fe8076e1], 35 10 16: ==36748==Added Global[0x7ff7fe830100]: beg=0x7ff7fe833000 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 17: ==36748== location (0x7ff7fe8077b0): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ff7fe807760], 87 33 18: time to load DLL check:23 X error: no match found >>>>>> error: command failed with exit status: 1 -- ******************** ******************** Failed Tests (1): AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp Testing Time: 60.84s Failed: 1
$ ninja check-asan ... Failed Tests (22): AddressSanitizer-x86_64-windows :: TestCases/Windows/coverage-dll-stdio.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_aligned_mallocs.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_allocators_sanity.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_cerr.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_global_dead_strip.c AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_intercept_memcpy.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_intercept_memcpy_indirect.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_intercept_memset.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_intercept_strlen.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_malloc_left_oob.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_malloc_uaf.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_noreturn.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_null_deref.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_operator_array_new_left_oob.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_poison_unpoison.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_seh.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_stack_use_after_return.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/dll_thread_stack_array_left_oob.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/null_deref_multiple_dlls.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_reload_dll.cpp AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp
I've reverted this (along with D115552), let me know in the bug (or ping me directly) if you'd like help reproing.
after revert
$ FILECHECK_OPTS=-dump-input=always ./bin/llvm-lit.py -a projects/compiler-rt/test/asan/X86_64WindowsConfig/TestCases/Windows/report_globals_vs_freelibrary.cpp -- Testing: 1 tests, 1 workers -- PASS: AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp (1 of 1) Script: -- : 'RUN: at line 1'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -LD -Od -DDLL C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll : 'RUN: at line 2'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -Od -DEXE C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe : 'RUN: at line 3'; env ASAN_OPTIONS=report_globals=2 C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll 2>&1 | FileCheck C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -- Exit Code: 0 Command Output (stdout): -- $ ":" "RUN: at line 1" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-LD" "-Od" "-DDLL" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" $ ":" "RUN: at line 2" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Od" "-DEXE" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" # command output: Creating library C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.lib and object C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exp $ ":" "RUN: at line 3" $ "env" "ASAN_OPTIONS=report_globals=2" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" $ "FileCheck" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" # command stderr: Input file: <stdin> Check file: C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: #0 0x7ff660ed07c6 in __asan_register_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals.cpp:370 2: #1 0x7ff660ed2fdb in __asan::call_on_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:40 3: #2 0x7ff660ed2edf in __asan::register_dso_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:44 4: #3 0x7ff660f57bc2 in _initterm minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21 5: #4 0x7ff660f28bac in __scrt_common_main_seh d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:256 6: #5 0x7ffc23cf7c23 (C:\Windows\System32\KERNEL32.DLL+0x180017c23) 7: #6 0x7ffc25cad720 (C:\Windows\SYSTEM32\ntdll.dll+0x18006d720) 8: 9: === ID 11; 0x7ff660fa0040 0x7ff660fa0100 10: ==43580==Added Global[0x7ff660fa0040]: beg=0x7ff660f774c0 size=24/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 11: ==43580== location (0x7ff660f77640): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f775e3], 13 12 12: ==43580==Added Global[0x7ff660fa0080]: beg=0x7ff660f77500 size=18/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 13: ==43580== location (0x7ff660f776c0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f77661], 19 10 14: ==43580==Added Global[0x7ff660fa00c0]: beg=0x7ff660f77540 size=6/32 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 15: ==43580== location (0x7ff660f77740): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f776e1], 35 10 16: ==43580==Added Global[0x7ff660fa0100]: beg=0x7ff660fa3000 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 17: ==43580== location (0x7ff660f777b0): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ff660f77760], 87 33 18: time to load DLL 19: #0 0x7ff660ed07c6 in __asan_register_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals.cpp:370 20: #1 0x7ffc08b37e71 in __asan::call_on_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:40 21: #2 0x7ffc08b37dcf in __asan::register_dso_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:44 22: #3 0x7ffc08b6632e in _initterm minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21 23: #4 0x7ffc08b3a751 in dllmain_crt_process_attach d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:64 24: #5 0x7ffc08b3a8c3 in dllmain_dispatch d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:195 25: #6 0x7ffc25c65020 (C:\Windows\SYSTEM32\ntdll.dll+0x180025020) 26: #7 0x7ffc25ca9c54 (C:\Windows\SYSTEM32\ntdll.dll+0x180069c54) 27: #8 0x7ffc25ca9a47 (C:\Windows\SYSTEM32\ntdll.dll+0x180069a47) 28: #9 0x7ffc25c6aa16 (C:\Windows\SYSTEM32\ntdll.dll+0x18002aa16) 29: #10 0x7ffc25c62510 (C:\Windows\SYSTEM32\ntdll.dll+0x180022510) 30: #11 0x7ffc25c62227 (C:\Windows\SYSTEM32\ntdll.dll+0x180022227) 31: #12 0x7ffc25c616e3 (C:\Windows\SYSTEM32\ntdll.dll+0x1800216e3) 32: #13 0x7ffc2376eb9f (C:\Windows\System32\KERNELBASE.dll+0x18002eb9f) 33: #14 0x7ffc23797920 (C:\Windows\System32\KERNELBASE.dll+0x180057920) 34: #15 0x7ffc23796eee (C:\Windows\System32\KERNELBASE.dll+0x180056eee) 35: #16 0x7ff660eb10cf in main C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp:25 36: #17 0x7ff660f28c37 in invoke_main d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78 37: #18 0x7ff660f28c37 in __scrt_common_main_seh d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 38: #19 0x7ffc23cf7c23 (C:\Windows\System32\KERNEL32.DLL+0x180017c23) 39: #20 0x7ffc25cad720 (C:\Windows\SYSTEM32\ntdll.dll+0x18006d720) 40: 41: === ID 22; 0x7ffc08b9d040 0x7ffc08b9d080 42: ==43580==Added Global[0x7ffc08b9d040]: beg=0x7ffc08b88380 size=19/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 43: ==43580== location (0x7ffc08b884a0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ffc08b88443], 40 10 44: ==43580==Added Global[0x7ffc08b9d080]: beg=0x7ffc08b9dd20 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 45: ==43580== location (0x7ffc08b88510): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ffc08b884c0], 87 33 46: in DLL(reason=1) 47: in DLL(reason=0) 48: ==43580==Removed Global[0x7ffc08b9d040]: beg=0x7ffc08b88380 size=19/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 49: ==43580== location (0x7ffc08b884a0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ffc08b88443], 40 10 50: ==43580==Removed Global[0x7ffc08b9d080]: beg=0x7ffc08b9dd20 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 51: ==43580== location (0x7ffc08b88510): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ffc08b884c0], 87 33 52: bye! 53: ==43580==Removed Global[0x7ff660fa0040]: beg=0x7ff660f774c0 size=24/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 54: ==43580== location (0x7ff660f77640): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f775e3], 13 12 55: ==43580==Removed Global[0x7ff660fa0080]: beg=0x7ff660f77500 size=18/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 56: ==43580== location (0x7ff660f776c0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f77661], 19 10 57: ==43580==Removed Global[0x7ff660fa00c0]: beg=0x7ff660f77540 size=6/32 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 58: ==43580== location (0x7ff660f77740): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff660f776e1], 35 10 59: ==43580==Removed Global[0x7ff660fa0100]: beg=0x7ff660fa3000 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 60: ==43580== location (0x7ff660f777b0): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ff660f77760], 87 33 >>>>>> -- ******************** Testing Time: 20.57s Passed: 1
before revert
$ FILECHECK_OPTS=-dump-input=always ./bin/llvm-lit.py -a projects/compiler-rt/test/asan/X86_64WindowsConfig/TestCases/Windows/report_globals_vs_freelibrary.cpp -- Testing: 1 tests, 1 workers -- FAIL: AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp (1 of 1) ******************** TEST 'AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp' FAILED ******************** Script: -- : 'RUN: at line 1'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -LD -Od -DDLL C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll : 'RUN: at line 2'; C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe -fsanitize=address -Wno-deprecated-declarations -WX -D_HAS_EXCEPTIONS=0 -Zi -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -Od -DEXE C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe : 'RUN: at line 3'; env ASAN_OPTIONS=report_globals=2 C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll 2>&1 | FileCheck C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -- Exit Code: 1 Command Output (stdout): -- $ ":" "RUN: at line 1" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-LD" "-Od" "-DDLL" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" $ ":" "RUN: at line 2" $ "C:/src/llvm-mint/build/cmake/./bin/clang-cl.exe" "-fsanitize=address" "-Wno-deprecated-declarations" "-WX" "-D_HAS_EXCEPTIONS=0" "-Zi" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Od" "-DEXE" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" "-FeC:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" # command output: Creating library C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.lib and object C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exp $ ":" "RUN: at line 3" $ "env" "ASAN_OPTIONS=report_globals=2" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmpe.exe" "C:\src\llvm-mint\build\cmake\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Windows\Output\report_globals_vs_freelibrary.cpp.tmp.dll" note: command had no output on stdout or stderr error: command failed with exit status: 3221226505 $ "FileCheck" "C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp" # command stderr: C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp:23:11: error: CHECK: expected string not found in input // CHECK: Added Global{{.*}} size=19 ^ <stdin>:18:17: note: scanning from here time to load DLL ^ Input file: <stdin> Check file: C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: #0 0x7ff7a3ff07c6 in __asan_register_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals.cpp:370 2: #1 0x7ff7a3ff2fdb in __asan::call_on_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:40 3: #2 0x7ff7a3ff2edf in __asan::register_dso_globals C:\src\llvm-mint\compiler-rt\lib\asan\asan_globals_win.cpp:44 4: #3 0x7ff7a4077bc2 in _initterm minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21 5: #4 0x7ff7a4048bac in __scrt_common_main_seh d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:256 6: #5 0x7ffc23cf7c23 (C:\Windows\System32\KERNEL32.DLL+0x180017c23) 7: #6 0x7ffc25cad720 (C:\Windows\SYSTEM32\ntdll.dll+0x18006d720) 8: 9: === ID 11; 0x7ff7a40c0040 0x7ff7a40c0100 10: ==6872==Added Global[0x7ff7a40c0040]: beg=0x7ff7a40974c0 size=24/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 11: ==6872== location (0x7ff7a4097640): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7a40975e3], 13 12 12: ==6872==Added Global[0x7ff7a40c0080]: beg=0x7ff7a4097500 size=18/64 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 13: ==6872== location (0x7ff7a40976c0): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7a4097661], 19 10 14: ==6872==Added Global[0x7ff7a40c00c0]: beg=0x7ff7a4097540 size=6/32 name=<string literal> module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 15: ==6872== location (0x7ff7a4097740): name=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp[0x7ff7a40976e1], 35 10 16: ==6872==Added Global[0x7ff7a40c0100]: beg=0x7ff7a40c3000 size=8/32 name=_OptionsStorage module=C:\src\llvm-mint\compiler-rt\test\asan\TestCases\Windows\report_globals_vs_freelibrary.cpp dyn_init=0 odr_indicator=0x000000000000 17: ==6872== location (0x7ff7a40977b0): name=C:/PROGRA~2/WI3CF2~1/10/Include/10.0.17763.0/ucrt\corecrt_stdio_config.h[0x7ff7a4097760], 87 33 18: time to load DLL check:23 X error: no match found >>>>>> error: command failed with exit status: 1 -- ******************** ******************** Failed Tests (1): AddressSanitizer-x86_64-windows :: TestCases/Windows/report_globals_vs_freelibrary.cpp Testing Time: 61.07s Failed: 1
Hi. This patch is causing a couple of test failures on one of our internal bots which is still running Ubuntu 18.04. Do you have any idea what could be causing it? I'm posting the test output:
- AddressSanitizer-x86_64-linux.TestCases.non-executable-pc.cpp
Stacktrace Script: -- : 'RUN: at line 1'; /home/siadmin/jenkins/w/opensource/opensource_build/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/asan/TestCases/non-executable-pc.cpp -o /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/non-executable-pc.cpp.tmp : 'RUN: at line 2'; not /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/non-executable-pc.cpp.tmp 0 2>&1 | FileCheck /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/asan/TestCases/non-executable-pc.cpp : 'RUN: at line 3'; not /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/non-executable-pc.cpp.tmp n 2>&1 | FileCheck /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/asan/TestCases/non-executable-pc.cpp -check-prefix=CHECK -check-prefix=NON_EXEC -- Exit Code: 1 Command Output (stderr): -- /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/asan/TestCases/non-executable-pc.cpp:28:15: error: NON_EXEC: expected string not found in input // NON_EXEC: PC is at a non-executable region. Maybe a wild jump? ^ <stdin>:3:77: note: scanning from here ==6109==ERROR: AddressSanitizer: SEGV on unknown address 0x604000010000 (pc 0x60400000ffff bp 0x7fff5e741a70 sp 0x7fff5e741a18 T0) ^ <stdin>:8:15: note: possible intended match here AddressSanitizer can not provide additional info. ^ Input file: <stdin> Check file: /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/asan/TestCases/non-executable-pc.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: AddressSanitizer:DEADLYSIGNAL 2: ================================================================= 3: ==6109==ERROR: AddressSanitizer: SEGV on unknown address 0x604000010000 (pc 0x60400000ffff bp 0x7fff5e741a70 sp 0x7fff5e741a18 T0) check:28'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 4: ==6109==The signal is caused by a READ memory access. check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5: #0 0x60400000ffff (<unknown module>) check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6: #1 0x7f16edc37bf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310 check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7: check:28'0 ~ 8: AddressSanitizer can not provide additional info. check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ check:28'1 ? possible intended match 9: SUMMARY: AddressSanitizer: SEGV (<unknown module>) check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10: ==6109==ABORTING check:28'0 ~~~~~~~~~~~~~~~~~ >>>>>>
- SanitizerCommon-asan-x86_64-Linux.Linux.decorate_proc_maps.cpp
Stacktrace Script: -- : 'RUN: at line 1'; /home/siadmin/jenkins/w/opensource/opensource_build/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -m64 -funwind-tables -ldl -g /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp -o /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp : 'RUN: at line 2'; env ASAN_OPTIONS=decorate_proc_maps=1 /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp 2>&1 | FileCheck /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp --check-prefix=CHECK-asan -- Exit Code: 1 Command Output (stderr): -- /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp:48:16: error: CHECK-asan: expected string not found in input // CHECK-asan: rw-p {{.*}} [low shadow] ^ <stdin>:1:1: note: scanning from here 00400000-00542000 r-xp 00000000 08:01 3149254 /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp ^ <stdin>:5:44: note: possible intended match here 7fff7000-8fff7000 rwxp 00000000 00:18 24 /dev/shm/5194 [low shadow] (deleted) ^ Input file: <stdin> Check file: /home/siadmin/jenkins/w/opensource/opensource_build/working_dir/compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: 00400000-00542000 r-xp 00000000 08:01 3149254 /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp check:48'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 2: 00742000-00743000 r-xp 00142000 08:01 3149254 /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3: 00743000-00746000 rwxp 00143000 08:01 3149254 /home/siadmin/jenkins/w/opensource/opensource_build/build/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/decorate_proc_maps.cpp.tmp check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4: 00746000-0112e000 rwxp 00000000 00:00 0 check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5: 7fff7000-8fff7000 rwxp 00000000 00:18 24 /dev/shm/5194 [low shadow] (deleted) check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ check:48'1 ? possible intended match 6: 8fff7000-2008fff7000 ---p 00000000 00:18 26 /dev/shm/5194 [shadow gap] (deleted) check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7: 2008fff7000-ff73b5d8000 rwxp 00000000 00:18 25 /dev/shm/5194 [high shadow] (deleted) check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8: ff73b5d8000-ff73b6d7000 rwxp 00000000 00:00 0 check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9: ff73b6d7000-100037932000 rwxp df6ab6e0000 00:18 25 /dev/shm/5194 [high shadow] (deleted) check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10: 100037932000-100037a31000 rwxp 00000000 00:00 0 check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>>
why?
I applied and clang-format does a reasonable job