Closed Bug 1926680 Opened 1 year ago Closed 1 year ago

[ASAN] certutil.exe segfaults on windows11 24H2

Categories

(Firefox Build System :: General, defect, P2)

defect

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: jmaher, Assigned: yannis)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

we have fixed all the simple obvious things, now we are getting a segfault when running certutil.exe. After downloading items and trying to run the binaries locally, firefox.exe segfaults as well. It appears that all the .exe files I find segfault, this indicates something generic with the libraries we compile with or link with are causing problems.

I am not an expert in ASAN, but I believe it uses some shadow memory map, I don't know if we need to update tools, link with additional libraries, or add different compiler/linker flags.

:glandium- do you have suggestions on how I could move forward here? this is reproducible, maybe you know something about the compiler/linker chains or some debugging tip I could do since I can reproduce this.

Flags: needinfo?(mh+mozilla)
Severity: -- → S2
Priority: -- → P2

Yannis, could you check this out?

Flags: needinfo?(mh+mozilla) → needinfo?(yjuglaret)

Hi, I'm happy to help! We are talking about C:\Windows\System32\certutil.exe right? What command line do you run to get a segfault? For firefox.exe, can you point to an ASAN build of Firefox corresponding to the current progress on this track? Thanks!

Flags: needinfo?(yjuglaret) → needinfo?(jmaher)

certutil.exe from our build artifacts used in testing. Here is a try push:
https://treeherder.mozilla.org/jobs?repo=try&searchStr=asan&revision=e8a35a9ded7ca55653c125045eb7e17949753285

you can see all the failures and download artifacts from the build, such as:

Flags: needinfo?(jmaher)

(In reply to Joel Maher ( :jmaher ) (UTC -8) from comment #4)

certutil.exe from our build artifacts used in testing

Thank you! I did not know about this one -- this makes a lot more sense. The issue is a subtle consequence of the addition of calls to memset in RtlDispatchException in ntdll.dll 10.0.26100.2161 (edit: in fact, in all Windows 11 24H2 builds so far -- thanks Gov Maharaj for figuring this out). I have filed an issue on github.

Summary: certutil.exe segfaults on windows11 24H2 → [ASAN] certutil.exe segfaults on windows11 24H2

This patch adds a temporary workaround when building compiler-rt to
ensure that we can run ASan builds on Windows 11 24H2. The proper fix
will come through llvm-project issue #114793 on github.

Assignee: nobody → yjuglaret
Status: NEW → ASSIGNED

The attached patch can be used to run ASAN builds on Windows 11 24H2. Discussion whether we want to land it or wait for the proper fix will happen in the code review.

Blocks: 1936396
Pushed by yjuglaret@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7656bdae4fdc Add support for Win11 24H2 in ASan builds. r=firefox-build-system-reviewers,glandium
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: