[PATCH] D114558: [ASan] Shared optimized callbacks implementation.
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 12:03:28 PST 2021
aeubanks added a comment.
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
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114558/new/
https://reviews.llvm.org/D114558
More information about the llvm-commits
mailing list