// if an upper 32-bit is non-zero, the bounds check is skipped. the upper 32-bits is truncated and ignored
let fourGiB = 0x1_0000_0000n;
// there is always a wasm page sized guard after the initial memory
let guardSize = pageSize; // the initial size of memory is 1 page
let initialSize = pageSize;
// access immediately beyond the guard region
let badAccess = fourGiB + initialSize + guardSize;
// this should trap
assertErrorMessage(() => load(badAccess), WebAssembly.RuntimeError, /out of bounds/);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.