Following up on our discussion here: https://chromium-review.googlesource.com/c/chromium/src/+/1249734#message-f67816c3e48a7693b8bcee07c06d82ca58b28be1
I can confirm that without "/OPT:NODLLDTAILMERGE", binaries built in Chromium have spurious ASAN errors.
Repro Steps:
Build without patch to confirm crashes don't occur with flag:
> gn gen --args="is_debug=false is_component_build=false is_asan=true use_goma=true" out/tailmerge
> autoninja -C .\out\tailmerge\ v8
Build will complete successfully
Build with patch to build target without "/OPT:NODLLDTAILMERGE" and reproduce the issue:
> git apply tailmerge.patch
> autoninja -C .\out\tailmerge\ v8
C:/src/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../v8/tools/run.py ./mksnapshot --turbo_instruction_scheduling --embedded_src gen/v8/embedded.cc --embedded_variant Default --random-seed 314159265 --startup_blob snapshot_blob.bin
=================================================================
==127476==ERROR: AddressSanitizer: odr-violation (0x7ff7bf4e0ae0):
[1] size=4 '<string literal>' ../../third_party/icu/source/i18n/reldtfmt.cpp:205:46
[2] size=2 '<string literal>' ../../v8/src/regexp/regexp-ast.cc:221:10
These globals were registered at these points:
[1]:
#0 0x7ff7be8cd1c9 in __asan_register_globals C:\b\rr\tmpbqecky\w\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_globals.cc:359
#1 0x7ff7bec9699e in _initterm D:\chromium\src\out\notworking\minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21
#2 0x7ff7bec8d164 in __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:251
#3 0x7ffe28e01fe3 in BaseThreadInitThunk+0x13 (C:\Windows\System32\KERNEL32.DLL+0x180011fe3)
#4 0x7ffe2a78cb30 in RtlUserThreadStart+0x20 (C:\Windows\SYSTEM32\ntdll.dll+0x18006cb30)
[2]:
#0 0x7ff7be8cd1c9 in __asan_register_globals C:\b\rr\tmpbqecky\w\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_globals.cc:359
#1 0x7ff7bec9699e in _initterm D:\chromium\src\out\notworking\minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp:21
#2 0x7ff7bec8d164 in __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:251
#3 0x7ffe28e01fe3 in BaseThreadInitThunk+0x13 (C:\Windows\System32\KERNEL32.DLL+0x180011fe3)
#4 0x7ffe2a78cb30 in RtlUserThreadStart+0x20 (C:\Windows\SYSTEM32\ntdll.dll+0x18006cb30)
==127476==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global '<string literal>' at ../../third_party/icu/source/i18n/reldtfmt.cpp:205:46
==127476==ABORTING
ninja: build stopped: subcommand failed.
Comment 1 by thakis@chromium.org
, Sep 29