Closed Bug 1638037 Opened 11 months ago Closed 2 months ago

Should Atomics.isLockFree(8) return true?

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

AtomicOperations::isLockfreeJS has this comment:

// The spec requires Atomics.isLockFree(n) to return false unless n is
// the BYTES_PER_ELEMENT value of some integer TypedArray that admits
// atomic operations. At this time (August 2017) there is no such array
// with n=8.

This is no longer true, now that BigInt64/BigUint64 is valid for Atomics.

Patches welcome. isLockFree is an abomination that should never have happened. We should just return 'true' here on all platforms, irrespective of whether the platform has lock-free 8-byte atomics (maybe MIPS32, maybe jit-less platforms).

Severity: -- → S3
Priority: -- → P3

Always return true per Lars' comment in bug 1638037.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/d83197d0d07c
Return true for Atomics.isLockFree(8). r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.