Skip to content

Fix JavaScript bounds checking

Josh Meredith requested to merge wip/js-boundsCheck into master

Fixes #23123 (closed)

This MR fixes JavaScript bounds checking for the -fcheck-prim-bounds flag with byte arrays by:

  • checking for the len field that is used to track byte array lengths, rather than the built-in JavaScript length field that is used by regular arrays
  • checking for range operations that use a size-zero range (effectively no-ops)

Additionally, the js_broken(23123) ("JS bounds checking broken") for the CheckBoundsOK test introduced in !9629 (closed) is changed to js_broken(21142) ("RuntimeRep requirements for novel Backends"), since the test is still failing on Addr representation.

Edited by Josh Meredith

Merge request reports