Open Bug 1927663 Opened 5 days ago Updated 4 days ago

MOZ_RELEASE_ASSERT(disabledHugeMemory) when setting javascript.options.wasm_disable_huge_memory=true

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

People

(Reporter: glandium, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Crash report on a nightly: https://crash-stats.mozilla.org/report/index/b2299b52-87ca-4fb5-a176-41cc90241029

STR:

  • open about:config
  • add a javascript.options.wasm_disable_huge_memory boolean pref and set it to true
  • restart Firefox

Result:

  • crash on startup. Can't be fixed until the pref is removed by editing the prefs.js file manually.

Hey, this seems... maybe up your alley?

Severity: -- → S3
Component: JavaScript Engine → JavaScript: WebAssembly
Flags: needinfo?(rhunt)
Priority: -- → P1
Priority: P1 → P3

Yeah, it is.

Assignee: nobody → rhunt
Flags: needinfo?(rhunt)

The old system required wasm::DisableHugeMemory() to be called
before anyone calls wasm::HugeMemoryEnabled(), and enforced that with
some runtime checks.

We had a bug where GetOptimizedBuildEncodingId() (which queries the
huge memory flag) would be called by Gecko before we read the pref.

This commit refactors this code to use a JS::Pref instead which is
always set before JS_Init() is invoked. This ensures that it is
never changed after we've observed the value and can drop all the
fancy runtime checking.

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

Attachment

General

Created:
Updated:
Size: