Open Bug 1582382 Opened 6 months ago Updated 5 months ago

Make standalone SpiderMonkey use libxul-like panic and allocation handling

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

People

(Reporter: hsivonen, Unassigned, NeedInfo)

References

Details

From https://phabricator.services.mozilla.com/D41355#1406762 :

some point, jsrust will need to have the panic hook that redirects to MOZ_CRASH and the allocator wrapper.

I'm afraid I'm still at a bit of a loss. What is this bug about? What work is involved? What does it block?

Flags: needinfo?(mh+mozilla)
Priority: -- → P1

This blocks fuzzing of e.g. Cranelift in the JS shell. Currently, any Rust panics in Cranelift go undetected in automation because the panic does not redirect to MOZ_CRASH.

It seems we could share the code transitively tied to https://searchfox.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#5132 between the JS shell and gkrust, and then not worry about calling the hooks setups twice: each will just replace and properly drop the previous hook, if there was one.

I'll try to address this next week.

Depends on: 1594998
You need to log in before you can comment on or make changes to this bug.