Error running my build of ASan for Windows (cross-compile from Linux)

231 views
Skip to first unread message

Alesandro Ortiz

unread,
Nov 22, 2022, 7:23:18 PM11/22/22
to Chromium-dev
Hello,

I'm trying to run my build of ASan for Windows x64 for the first time, and am running into issues that I cannot seem to troubleshoot. This is a cross-compile from Linux, but the same Linux environment (a GCP instance) has been used to build non-ASan versions that run perfectly fine. Regular ASan from Google storage buckets also run fine.

Signs of trouble are:

1. mini_installer.exe refuses to run (Windows says "The specified executable is not a valid application for this OS platform").

2. If I try to run chrome.exe from the chrome.7z generated by building the mini_installer target, I get another error:  "Program 'chrome.exe' failed to run: The application has failed to start because its side-by-side configuration is
incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail"
The Windows event log says a bit more: "Activation context generation failed for "C:\chromium\Chromium - GCP Builds\chrome-asan-nov20\Chrome-bin\chrome.exe". Dll redirector contributor unable to add file map entry for file clang_rt.asan_dynamic-x86_64.dll; Two or more components referenced directly or indirectly by the application manifest have files by the same name."

3. Based on event log from #2, I looked at the assembly manifest which has two entries for <file name='clang_rt.asan_dynamic-x86_64.dll'/>, one at the top (below chrome_elf.dll), and another around line 345 (below leveldb_proto.dll). As far as I can tell, none of the other file entries are duplicated.
I tried removing the first entry, which allows chrome.exe to kind-of run, but I hit this ASan output a few seconds later:
==26920==ERROR: AddressSanitizer: unknown-crash on address 0x132b06bbe461 at pc 0x7fff6379fe3c bp 0x00f06b7f20a0 sp 0x00f06b7f20e0
WRITE of size 512 at 0x132b06bbe461 thread T0
AddressSanitizer: nested bug in the same thread, aborting.

4. Difference between clang_rt.asan_dynamic-x86_64.dll in chrome.7z and toolchain directory.
Within the Windows toolchain directory (./src/third_party/depot_tools/win_toolchain/vs_files/343c378581/VC/Tools/MSVC/14.28.29910/bin/HostX64/x64/) I see clang_rt.asan_dynamic-x86_64.dll has a file size of ~597K, but the same file in the generated chrome.7z is ~928K. Checking vcruntime140.dll shows they have the same hashes, so not sure why the asan_dynamic DLL is different.

I'm not sure one or more of the issues above are due to an error on my end, trying ASan with an unsupported configuration, or an issue in the Chromium codebase. I have a small suspicion maybe the issue is using is_component_build=true + is_asan=true, but don't see anything that explicitly says this isn't supported in ASan builds (vs. is_debug=true + is_asan=true which is clearly documented as not supported).

target_os="win"
target_cpu="x64"
is_asan=true
is_debug=false
is_component_build=true
enable_nacl=false
symbol_level=1
blink_symbol_level=1
v8_symbol_level=1

HEAD is at a4537e1eb7038c62232f88c9807a13139612efce (from earlier today, November 21st, 2022), no code changes.

Building Chrome on Ubuntu 18.04 (GCP).
Trying to run in Windows 10.0.19044 Build 19044 (laptop).

Any troubleshooting help is appreciated.

Regards,
Alesandro

Alesandro Ortiz

unread,
Nov 29, 2022, 5:59:39 PM11/29/22
to Chromium-dev, Alesandro Ortiz
Update: I did a build with only these args.gn which resulted in a working binary, but because I made the changes all at once not sure which removed arg helped. Also could have nothing to do with the args.gn but haven't tested that theory yet.

target_os="win"
target_cpu="x64"
is_asan=true
is_debug=false

I would still like to do a component build for faster linking, so will try that again sometime in the future to see if that has a bug or is otherwise unsupported. If anyone has info on ASan + component build support, will appreciate it.

Regards,
Alesandro

Reply all
Reply to author
Forward
0 new messages