TL;DR
This paper analyzes the JavaScript relaxed memory model, identifies deficiencies, proposes corrections, and mechanizes proofs to ensure correctness and support compilation to various architectures.
Contribution
It introduces a corrected JavaScript memory model, develops an extended ARMv8 model, and provides mechanized proofs of correctness and compilation schemes.
Findings
The original JavaScript model does not support ARMv8 compilation.
The proposed correction fixes data-race semantics and supports compilation.
Mechanized proofs validate the corrected model and compilation schemes.
Abstract
Modern JavaScript includes the SharedArrayBuffer feature, which provides access to true shared memory concurrency. SharedArrayBuffers are simple linear buffers of bytes, and the JavaScript specification defines an axiomatic relaxed memory model to describe their behaviour. While this model is heavily based on the C/C++11 model, it diverges in some key areas. JavaScript chooses to give a well-defined semantics to data-races, unlike the "undefined behaviour" of C/C++11. Moreover, the JavaScript model is mixed-size. This means that its accesses are not to discrete locations, but to (possibly overlapping) ranges of bytes. We show that the model, in violation of the design intention, does not support a compilation scheme to ARMv8 which is used in practice. We propose a correction, which also incorporates a previously proposed fix for a failure of the model to provide Sequential Consistency…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
