[CP] [dart2wasm] Only perform compile-time lookup in constant list if index is in-bounds #55853
Labels
area-meta
Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-review
Issue that need cherry pick triage to approve
Commit(s) to merge
827a7c4
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/368304
Issue Description
Compiler crashes when compiling list index access code when it can infer the list to be a constant list and the index to be constant but the index is out-of-bounds.
What is the fix
Only perform the optimization if the list index is in-bounds.
Why cherry-pick
Users have hit this issue.
Risk
Low
Issue link(s)
#55817
Extra Info
No response
The text was updated successfully, but these errors were encountered: