Skip to content

Building rust 1.69.0 with LLVM 16, then using that to build firefox 113, results in a crash on startup #111507

Not planned
@berolinux

Description

@berolinux

Sorry, no small self-contained test case yet...

If rust 1.69.0 is built with LLVM 16, and the resulting rust is used to build firefox 113 (with clang 16 for the C and C++ parts), the resulting binary crashes on startup.
The problem goes away if rust 1.69.0 is built with bundled LLVM instead (still using clang 16 for C/C++ parts).

Meta

rustc --version --verbose:

rustc 1.69.0 (84c898d65 2023-04-16) (built from a source tarball)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 16.0.2
Backtrace

Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
0x00007ffff3093b27 in style::style_adjuster::StyleAdjuster::adjust::h2df66d511b1d2fd7 () from /usr/lib64/firefox-113.0/libxul.so
(gdb) bt
#0  0x00007ffff3093b27 in style::style_adjuster::StyleAdjuster::adjust::h2df66d511b1d2fd7 () from /usr/lib64/firefox-113.0/libxul.so
#1  0x00007ffff30926bd in style::properties::cascade::cascade_rules::h0859924e6a48a9d4 () from /usr/lib64/firefox-113.0/libxul.so
#2  0x00007ffff30918c1 in style::stylist::Stylist::cascade_style_and_visited::h9917b048e41e23f6 () from /usr/lib64/firefox-113.0/libxul.so
#3  0x00007ffff310dfc1 in Servo_ComputedValues_GetForAnonymousBox () from /usr/lib64/firefox-113.0/libxul.so
#4  0x00007ffff12bd8b4 in nsCSSFrameConstructor::ConstructRootFrame() () from /usr/lib64/firefox-113.0/libxul.so
#5  0x00007ffff127fc1b in mozilla::PresShell::Initialize() () from /usr/lib64/firefox-113.0/libxul.so
#6  0x00007ffff0a4027f in mozilla::dom::PrototypeDocumentContentSink::StartLayout() () from /usr/lib64/firefox-113.0/libxul.so
#7  0x00007ffff0a400b0 in mozilla::dom::PrototypeDocumentContentSink::DoneWalking() () from /usr/lib64/firefox-113.0/libxul.so
#8  0x00007ffff0f9ba4f in mozilla::dom::DocumentL10n::InitialTranslationCompleted(bool) () from /usr/lib64/firefox-113.0/libxul.so
#9  0x00007ffff0fa04b4 in L10nReadyHandler::ResolvedCallback(JSContext*, JS::Handle<JS::Value>, mozilla::ErrorResult&) ()
   from /usr/lib64/firefox-113.0/libxul.so
#10 0x00007ffff0d125dd in mozilla::dom::(anonymous namespace)::PromiseNativeHandlerShim::ResolvedCallback(JSContext*, JS::Handle<JS::Value>, mozilla::ErrorResult&) () from /usr/lib64/firefox-113.0/libxul.so
#11 0x00007ffff0d12896 in mozilla::dom::NativeHandlerCallback(JSContext*, unsigned int, JS::Value*) () from /usr/lib64/firefox-113.0/libxul.so
#12 0x00007ffff250e95a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
   from /usr/lib64/firefox-113.0/libxul.so
#13 0x00007ffff250f0be in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) () from /usr/lib64/firefox-113.0/libxul.so
#14 0x00007ffff2651f29 in PromiseReactionJob(JSContext*, unsigned int, JS::Value*) () from /usr/lib64/firefox-113.0/libxul.so
#15 0x00007ffff250e95a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
   from /usr/lib64/firefox-113.0/libxul.so
#16 0x00007ffff250f0be in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) () from /usr/lib64/firefox-113.0/libxul.so
#17 0x00007ffff25777a6 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) ()
   from /usr/lib64/firefox-113.0/libxul.so
#18 0x00007fffef53fb55 in mozilla::dom::FinalizationRegistryCleanupCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::ErrorResult&) () from /usr/lib64/firefox-113.0/libxul.so
#19 0x00007fffee4a2d72 in mozilla::PromiseJobRunnable::Run(mozilla::AutoSlowOperation&) () from /usr/lib64/firefox-113.0/libxul.so
#20 0x00007fffee496b8c in mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool) () from /usr/lib64/firefox-113.0/libxul.so
#21 0x00007fffee49728d in mozilla::CycleCollectedJSContext::AfterProcessTask(unsigned int) () from /usr/lib64/firefox-113.0/libxul.so
#22 0x00007fffeeb89319 in XPCJSContext::AfterProcessTask(unsigned int) () from /usr/lib64/firefox-113.0/libxul.so
#23 0x00007fffee54acd2 in nsThread::ProcessNextEvent(bool, bool*) () from /usr/lib64/firefox-113.0/libxul.so
#24 0x00007fffee54f47a in NS_ProcessNextEvent(nsIThread*, bool) () from /usr/lib64/firefox-113.0/libxul.so
#25 0x00007fffeeace4b7 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () from /usr/lib64/firefox-113.0/libxul.so
#26 0x00007fffeea7ced7 in MessageLoop::Run() () from /usr/lib64/firefox-113.0/libxul.so
#27 0x00007ffff0ff3a13 in nsBaseAppShell::Run() () from /usr/lib64/firefox-113.0/libxul.so
#28 0x00007ffff235b071 in nsAppStartup::Run() () from /usr/lib64/firefox-113.0/libxul.so
#29 0x00007ffff2423062 in XREMain::XRE_mainRun() () from /usr/lib64/firefox-113.0/libxul.so
#30 0x00007ffff24237c7 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) () from /usr/lib64/firefox-113.0/libxul.so
#31 0x00007ffff2423c37 in XRE_main(int, char**, mozilla::BootstrapConfig const&) () from /usr/lib64/firefox-113.0/libxul.so
#32 0x000055555557429c in main ()

Activity

added
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
on May 12, 2023
lukas-code

lukas-code commented on May 12, 2023

@lukas-code
Member

See also #111229, which has a more detailed report of the same issue. This is a bug in Firefox, not in Rust or LLVM.

Link back to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1831242

jyn514

jyn514 commented on May 31, 2023

@jyn514
Member

I'm going to close this as an upstream bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @berolinux@jyn514@lukas-code@Noratrieb

        Issue actions

          Building rust 1.69.0 with LLVM 16, then using that to build firefox 113, results in a crash on startup · Issue #111507 · rust-lang/rust