Closed Bug 1639318 Opened 4 years ago Closed 4 years ago

aarch64-windows builds fail CFG with clang 10

Categories

(Firefox Build System :: Toolchains, defect)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: away, Assigned: away)

References

Details

Attachments

(1 file)

Arm64-Windows builds built with clang 10 crash on startup due to the expanded CFG checks in that clang release. It is not clear why this doesn't happen on x86.

02 00000035`261ff2e0 00007ff8`61069c48 ntdll!LdrpHandleInvalidUserCallTarget+0x34
03 00000035`261ff3c0 00007ff8`6105b9f0 xul!nsAppStartupNotifier::NotifyObservers+0x2c8 [/builds/worker/checkouts/gecko/toolkit/xre/nsAppStartupNotifier.cpp @ 52] 

At https://searchfox.org/mozilla-central/rev/61fceb7c0729773f544a9656f474e36cd636e5ea/toolkit/xre/nsAppStartupNotifier.cpp#52, startupObserver is an XPTCStub:

0:000> dps poi 0x1c2e9dbff60 
00007ff8`63094970  00007ff8`5d780930 xul!nsXPTCStubBase::QueryInterface [/builds/worker/checkouts/gecko/xpcom/reflect/xptcall/xptcall.cpp @ 14]
00007ff8`63094978  00007ff8`5d7809f0 xul!nsXPTCStubBase::AddRef [/builds/worker/checkouts/gecko/xpcom/reflect/xptcall/xptcall.cpp @ 25]
00007ff8`63094980  00007ff8`5d780b30 xul!nsXPTCStubBase::Release [/builds/worker/checkouts/gecko/xpcom/reflect/xptcall/xptcall.cpp @ 28]
00007ff8`63094988  00007ff8`5d4e10cc xul!nsXPTCStubBase::Stub3
00007ff8`63094990  00007ff8`5d4e10d4 xul!nsXPTCStubBase::Stub4

The expanded checks in clang 10 made arm64 builds hit CFG crashes on nsXPTCStubBase vtables on startup.

It's not clear why this doesn't happen on x86 builds. Given priorities, I can't really justify investigating this, although I suspect that fixing the underlying issue would be pretty much bug 1483885.

As a get-unblocked stopgap, -guard:cf,nochecks in clang 10 gives the same behavior as -guard:cf in clang 9.

Assignee: nobody → dmajor
Status: NEW → ASSIGNED
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a58f5a460cf1
Stick to clang-9 levels of CFG on arm64 r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: