| Issue |
87345
|
| Summary |
Test asan\TestCases\init-order-atexit.cpp fails on windows
|
| Labels |
compiler-rt:asan
|
| Assignees |
|
| Reporter |
tru
|
This test fails on Windows with the following output:
Tested this on latest 18.x release.
```
FAIL: AddressSanitizer-x86_64-windows :: TestCases/init-order-atexit.cpp (1 of 1)
******************** TEST 'AddressSanitizer-x86_64-windows :: TestCases/init-order-atexit.cpp' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 7
C:/code/llvm/llvm.packageci/build/llvm-final-windows/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview -gcolumn-info -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O0 C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases/Helpers/init-order-atexit-extra.cpp -o c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\init-order-atexit.cpp.tmp
# executed command: C:/code/llvm/llvm.packageci/build/llvm-final-windows/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview -gcolumn-info -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O0 'C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp' 'C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases/Helpers/init-order-atexit-extra.cpp' -o 'c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\init-order-atexit.cpp.tmp'
# RUN: at line 8
env ASAN_OPTIONS=strict_init_order=true not c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\init-order-atexit.cpp.tmp 2>&1 | FileCheck C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp
# executed command: env ASAN_OPTIONS=strict_init_order=true not 'c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\init-order-atexit.cpp.tmp'
# executed command: FileCheck 'C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp'
# .---command stderr------------
# | C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp:23:12: error: CHECK: expected string not found in input
# | // CHECK: PASSED
# | ^
# | <stdin>:1:1: note: scanning from here
# | =================================================================
# | ^
# | <stdin>:21:33: note: possible intended match here
# | #17 0x7ff986f0aa57 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005aa57)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: =================================================================
# | check:23'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: ==14380==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x7ff7cc091ae0 at pc 0x7ff7cb692352 bp 0x0015ff51f470 sp 0x0015ff51f4b8
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: READ of size 4 at 0x7ff7cc091ae0 thread T0
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: #0 0x7ff7cb692351 in AccessC(void) C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\Helpers\init-order-atexit-extra.cpp:13:29
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: #1 0x7ff7cb691fea in A::~A(void) C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp:21:10
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: #2 0x7ff7cb691f05 in `dynamic atexit destructor for 'a' C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp:26
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 16: #12 0x7ff7cb691f25 in `dynamic initializer for 'b' C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp:34:3
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: #13 0x7ff7cb691f7f in _GLOBAL__sub_I_init_order_atexit.cpp C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases\init-order-atexit.cpp
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 18: #14 0x7ff7cb6b114e in _initterm c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 19: #15 0x7ff7cb693178 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:256
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 20: #16 0x7ff98667257c (C:\WINDOWS\System32\KERNEL32.DLL+0x18001257c)
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: #17 0x7ff986f0aa57 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005aa57)
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:23'1 ? possible intended match
# | 22:
# | check:23'0 ~
# | 23: 0x7ff7cc091ae0 is located 0 bytes inside of global variable 'class C c' defined in 'C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\test\asan\TestCases/Helpers/init-order-atexit-extra.cpp' (0x7ff7cc091ae0) of size 4
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: registered at:
# | check:23'0 ~~~~~~~~~~~~~~~~
# | 25: #0 0x7ff7cb67e64b in __asan_register_globals C:\code\llvm\llvm.packageci\git\llvm-project\compiler-rt\lib\asan\asan_globals.cpp:369
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 26: #1 0x7ff7cb6b114e in _initterm c:\code\llvm\llvm.packageci\build\llvm-final-windows\runtimes\runtimes-x86_64-pc-windows-msvc-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21
# | check:23'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
AddressSanitizer-x86_64-windows :: TestCases/init-order-atexit.cpp
Testing Time: 2.04s
Total Discovered Tests: 1
Failed: 1 (100.00%)
```
I see that this test is disabled on mingw, but with no real context. Should this be disabled on all windows targets?
@mstorsjo @sylvain-audi
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs