Closed Bug 1621933 Opened 5 years ago Closed 5 years ago

Perma js/src/jit-test/tests/structured-clone/sab-errMsg.js | /builds/worker/workspace/build/src/js/src/jit-test/tests/structured-clone/sab-errMsg.js:7:13 ReferenceError: SharedArrayBuffer is not defined when Gecko 76 merges to Beta on 2020-04-06

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla76
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 --- unaffected
firefox75 --- unaffected
firefox76 + verified

People

(Reporter: NarcisB, Assigned: lth)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Flags: needinfo?(evilpies) → needinfo?(ttung)

I wonder if I need // |jit-test| skip-if: !this.SharedArrayBuffer at the top of the test. I will visit this later today or tomorrow

Assignee: nobody → ttung
Status: NEW → ASSIGNED
Flags: needinfo?(ttung)
Priority: -- → P1

The bustage is caused by https://hg.mozilla.org/mozilla-central/rev/1313df275548
:lhansen , can you please take a look?

Flags: needinfo?(lhansen)
Regressed by: 1566427
No longer regressed by: 1621341
Has Regression Range: --- → yes

Tom, the fix you propose will work, but more conventionally we use !sharedMemoryEnabled() instead of !this.sharedArrayBuffer.

Flags: needinfo?(lhansen)

(In reply to Narcis Beleuzu [:NarcisB] from comment #2)

The bustage is caused by https://hg.mozilla.org/mozilla-central/rev/1313df275548
:lhansen , can you please take a look?

Technically that patch uncovered a bug in the test case ;-)

Hmm, it doesn't look like what I understood after I look into it more. This seems to be Linux only base on https://treeherder.mozilla.org/#/jobs?repo=try&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=59d43c58418f7e1c9e2215ae9bc0428992f69681&selectedJob=292812869 and I couldn't reproduce on my Mac after running " ./mach try release -v 75.0b1 --tasks release-sim --migration central-to-beta --no-push ".

(I saw "ReferenceError: SharedArrayBuffer is not defined" and thus was thinking I forgot to disable the test when we disable the SAB)

I'm going to remove the assignee from myself since this doesn't look like an issue on the test itself. It looks some issues around jit-test and shared array buffer at this moment.

(In reply to Lars T Hansen [:lth] from comment #3)

Tom, the fix you propose will work, but more conventionally we use !sharedMemoryEnabled() instead of !this.sharedArrayBuffer.

If !sharedMemoryEnabled() works the same as !this.sharedArrayBuffer, the test has already had it.
https://searchfox.org/mozilla-central/rev/278046367dab878316f60f0bd7f740cf73f3c447/js/src/jit-test/tests/structured-clone/sab-errMsg.js#1

Lars, I guess I had misled you when you replied the needinfo, so I re-needinfo you for comment 2.

Assignee: ttung → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(lhansen)

Remaining tasks got canceled for the push mentioned in comment 5, that's the reason Windows spidermonkey didn't show up as failed there.

OK, I'll take a look in the morning.

(In reply to Tom Tung [:tt, :ttung] from comment #5)

If !sharedMemoryEnabled() works the same as !this.sharedArrayBuffer, the test has already had it.

No it doesn't. The test has !this.sharedMemoryEnabled, and that is always false, because sharedMemoryEnabled is a shell function that is always defined, whether SharedArrayBuffer is present or not. You gotta love the implicit boolification of every value in JS... Anyway, with the broken skip-if guard, the test case is always executed whether shared memory is enabled or not.

Flags: needinfo?(lhansen)

Now that I think about it, the reason why my patch causes this may be because it actually disables shared memory in the shell if the configuration is !nightly, a consequence of me struggling with js/moz.configure and the moz.configure linter... Previously, shared memory was enabled in the shell for all configurations. Do we know what is best here?

(In reply to Lars T Hansen [:lth] from comment #8)

(In reply to Tom Tung [:tt, :ttung] from comment #5)

If !sharedMemoryEnabled() works the same as !this.sharedArrayBuffer, the test has already had it.

No it doesn't. The test has !this.sharedMemoryEnabled, and that is always false, because sharedMemoryEnabled is a shell function that is always defined, whether SharedArrayBuffer is present or not. You gotta love the implicit boolification of every value in JS... Anyway, with the broken skip-if guard, the test case is always executed whether shared memory is enabled or not.

Ah, I see. Then, all cases in https://searchfox.org/mozilla-central/search?q=!this.sharedMemoryEnabled&case=false&regexp=false&path= should be changed...

Ah, good eye.

Will grab this on monday or so (depending on other workload) if nobody else has grabbed it first.

Assignee: nobody → lhansen
Status: NEW → ASSIGNED

A few test cases tested for the presence of sharedMemoryEnabled in
the global object. This is nonsensical - it is a testing function
that is always present when jit-tests are executed. The guards should
either not be there, or should invoke sharedMemoryEnabled() to test
for the presence of shared memory functionality.

I've tested this locally by munging config/milestone.txt to simulate beta, and tests pass now while they fail without the patch, as predicted. Will land the patch.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Regressions: 1623602
See Also: → 1623889
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: