Skip to content

test(codegen): assert the push-barrier ordering over the CFG region, not a text slice (#7708) - #7858

Merged
proggeramlug merged 1 commit into
mainfrom
test/7708-cfg-walk-push-barrier
Aug 11, 2026
Merged

test(codegen): assert the push-barrier ordering over the CFG region, not a text slice (#7708)#7858
proggeramlug merged 1 commit into
mainfrom
test/7708-cfg-walk-push-barrier

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes the last residue of #7708. The census rewrite (CFG walk from apush.inbounds) replaces the text slice that went blind when the barrier legally moved downstream of apush.realloc — full analysis and the shared verdict with the peer session on #7708's thread and in the fragment.

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of push barriers across complex control-flow paths.
    • Added checks to ensure barrier operations, storage updates, and layout metadata appear in the correct order.
    • Extended equivalent validation to class-field stores.
  • Tests

    • Expanded coverage for local arrays and large-object handling, including scenarios spanning multiple execution blocks.
  • Documentation

    • Added a changelog entry describing the updated validation behavior.

…not a text slice

The #7708 residue: the barrier moved into apush.barrier.* downstream of
apush.realloc, which a slice bounded by those labels structurally cannot
see (#7698's failure shape). The invariant itself is live -- the fixture
pushes a heap pointer -- so the census walks successors from apush.inbounds
instead of being deleted.

Claude-Session: https://claude.ai/code/session_01Y1QZ5wUP9gRSwpiweT4Wix
@proggeramlug
proggeramlug force-pushed the test/7708-cfg-walk-push-barrier branch from 94bce42 to 3fc3df1 Compare August 11, 2026 15:04
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45e12a58-48bd-40f6-954f-f5acf20261c2

📥 Commits

Reviewing files that changed from the base of the PR and between 079e646 and 3fc3df1.

📒 Files selected for processing (2)
  • changelog.d/7858-push-barrier-cfg-census.md
  • crates/perry-codegen/tests/large_object_barriers.rs

📝 Walkthrough

Walkthrough

The push-barrier test now traverses the reachable apush.* control-flow region. It verifies in-bounds store placement and ordering of layout notes and write barriers across basic blocks. The changelog documents the CFG-based validation.

Changes

Push-barrier CFG census

Layer / File(s) Summary
CFG region traversal
crates/perry-codegen/tests/large_object_barriers.rs
ApushRegion parses LLVM blocks, extracts successors, traverses reachable apush.* blocks, and locates markers by block and offset.
Barrier ordering assertions
crates/perry-codegen/tests/large_object_barriers.rs, changelog.d/7858-push-barrier-cfg-census.md
The test requires the direct store in the in-bounds block and checks store, slot-layout note, and write-barrier ordering. The changelog records the validation changes and test status.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: thehypnoo

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/7708-cfg-walk-push-barrier

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit bef6651 into main Aug 11, 2026
0 of 18 checks passed
@proggeramlug
proggeramlug deleted the test/7708-cfg-walk-push-barrier branch August 11, 2026 15:05
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