fix(codegen): update the disposed-Uint8Array proof to the helper #6092 emits#6839
fix(codegen): update the disposed-Uint8Array proof to the helper #6092 emits#6839TheHypnoo wants to merge 2 commits into
Conversation
…emits `native_owned_uint8array_get_fallback_uses_uint8array_helper` has been red on main since #6092. That PR moved the unproven-bounds JS-value read off the i32 `js_uint8array_get` accessor — whose out-of-range answer is the `0` byte-sentinel — onto `js_uint8array_index_get_value`, which reads `undefined` per IntegerIndexedExotic `[[Get]]` (#6088). The proof still asserted the old symbol. Nothing about the property under test changes: the disposed native view must fall back through the Uint8Array-shaped accessor, never the Buffer-shaped one. The second assertion, that no `js_buffer_get` appears, still passes untouched. The sibling inline-path test only forbade `js_uint8array_get`, so after #6092 a regression that took the slow path would have gone unnoticed. It now forbids both helpers. Integration suites under `crates/*/tests/` don't run per-PR (#5960), which is why this sat red for weeks — it surfaces only when a PR touches perry-codegen and pulls the suite into `e2e-scoped`. Also reformats crates/perry-hir/src/lower/builder_fold.rs, the one file failing `cargo fmt --check` on main, so this PR's lint job can pass on its own.
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
native_owned_uint8array_get_fallback_uses_uint8array_helperincrates/perry-codegen/tests/native_proof_buffer_views.rshas been failing onmainsince #6092. It asserted the emitted IR containscall i32 @js_uint8array_get; codegen emitscall double @js_uint8array_index_get_value.Why the emit changed
#6092 (fixing #6088) moved the unproven-bounds JS-value read off the i32 accessor deliberately.
js_uint8array_getanswers an out-of-range read with the0byte-sentinel; a JS-valuebuf[i]must readundefined, per IntegerIndexedExotic[[Get]]. The comment atcrates/perry-codegen/src/expr/index_get.rs:1494spells this out. The proof was not updated with it.The property under test is unchanged: a disposed native Uint8Array view must fall back through the Uint8Array-shaped accessor, never the Buffer-shaped one. The second assertion — no
js_buffer_get— passes untouched.Second change
The sibling inline-path test forbade only
js_uint8array_get. After #6092 that is no longer the symbol a slow-path regression would emit, so the assertion had gone blind. It now forbids both helpers.Why it sat red
Integration suites under
crates/*/tests/don't run per-PR (#5960). This one surfaces only when a PR touches perry-codegen and pulls the suite intoe2e-scoped— which is how #6837 found it.Also included
crates/perry-hir/src/lower/builder_fold.rsis the one file failingcargo fmt --checkonmain. Reformatted, so this PR'slintjob can pass on its own.Verification
cargo test -p perry-codegen— 30/30 innative_proof_buffer_views, and every other suite in the crate green excepttyped_feedback::typed_feedback_trace_dump_runs_before_entry_return, which is a separate pre-existing failure onmain(assertion failed: dump_pos < ret_pos) and is not touched here.