Repairing and mechanising the JavaScript relaxed memory model

Conrad Watt, Christopher Pulte, Anton Podkopaev, Guillaume Barbier, Stephen K. Dolan, Shaked Flur, Jean Pichon-Pharabod, Shuyu Guo · 2020

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.

Read the paper · More papers on PaperTik