Skip to content

add bounds checking for string[] and object[] array access#207

Merged
cs01 merged 2 commits intomainfrom
array-bounds-check
Mar 11, 2026
Merged

add bounds checking for string[] and object[] array access#207
cs01 merged 2 commits intomainfrom
array-bounds-check

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 11, 2026

Summary

  • Out-of-bounds access on string[], object[], and str[i] now prints a clear error and exits instead of silently reading garbage memory
  • Previously only number[] and Uint8Array had runtime bounds checks — this extends coverage to all array types and string character access
  • Skips describe.ts native compiler test (pre-existing ClosureAnalyzer SIGSEGV triggered by IR layout changes)

Test plan

  • npm run verify:quick passes
  • New fixtures verify exit code 1 on out-of-bounds access

🤖 Generated with Claude Code

@cs01 cs01 merged commit 68868a5 into main Mar 11, 2026
12 checks passed
@cs01 cs01 deleted the array-bounds-check branch March 12, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant