Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 370255eb46e7985ff118c66bdd8a9e1e6d739ddd
      
https://github.com/WebKit/WebKit/commit/370255eb46e7985ff118c66bdd8a9e1e6d739ddd
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    A JSTests/wasm/stress/memory64-atomic-wait-out-of-bounds.js
    M Source/JavaScriptCore/llint/InPlaceInterpreter64.asm

  Log Message:
  -----------
  [JSC] IPInt fast path for `memory.atomic.wait32`/`wait64` wraps the Memory64 
effective address
https://bugs.webkit.org/show_bug.cgi?id=314263

Reviewed by Keith Miller.

The IPInt assembly for memory.atomic.wait32 and memory.atomic.wait64 computes
the effective address as `pointer + offset` with an unchecked `addq`. For
Memory64, both the i64 address operand and the immediate offset are 64-bit, so
the sum can wrap around. The wrapped address is then handed to the slow path
as a single value, which has no way to detect the overflow and accepts a small
in-bounds address instead of trapping.

Use the existing `baddpc` macro, which adds and branches to the OOB throw
on carry, matching what the regular memory access fast path already does.

Test: JSTests/wasm/stress/memory64-atomic-wait-out-of-bounds.js

* JSTests/wasm/stress/memory64-atomic-wait-out-of-bounds.js: Added.
* Source/JavaScriptCore/llint/InPlaceInterpreter64.asm:

Canonical link: https://commits.webkit.org/312832@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to