Closed Bug 1362807 Opened 4 years ago Closed 4 years ago

Failure in debug/wasm-12.js

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

I am getting a failure in the SM(cgc) (Compacting GC) test for jit-tests/tests/debug/wasm-12.js when run with --baseline-eager. The problem is that in

    g.eval(`
    function initWasm(s) { return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(s))); }
    o = initWasm('(module (func) (export "" 0))');
    o = initWasm('(module (func) (func) (export "" 1))');
    `);

o is overwritten, and therefore a GC will cause only one script to be found rather than both. In the comment in bug 1355263, it was correctly using 'o1' and 'o2', so I am assuming this is accidental.

    var dbg = new Debugger(g);
    gc(); // Adding this line will cause it to fail in all configurations.
    var foundScripts = dbg.findScripts().filter(isWasm);
    assertEq(foundScripts.length, 2);
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Blocks: 1322560
Comment on attachment 8865157 [details] [diff] [review]
Keep wasm scripts live so the GC cannot kill one before findScripts sees it

Review of attachment 8865157 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thank you for the patch.
Attachment #8865157 - Flags: review?(ydelendik) → review+
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9ee4e7e0209
Keep wasm scripts live so the GC cannot kill one before findScripts sees it, r=yury
https://hg.mozilla.org/mozilla-central/rev/a9ee4e7e0209
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.