Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/wasm/regress/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 794 B image not shown  

Quelle  bug2010050.js

  Sprache: JAVA
 

// |jit-test| test-join=--spectre-mitigations=off

let { load, memory } = wasmEvalText(`(module
  (memory (export "memory") i64 1)
  (func (export "load") (param i64) (result i32)
    (i32.load
        (local.get 0)
    )
  )
)`).exports;

// a wasm page is 64k
let pageSize = 0x1_0000n;

// 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/);

Messung V0.5 in Prozent
C=88 H=95 G=91

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.