Skip to content

test(runtime): an absent-key read may publish its holder entry (#11681) - #12214

Merged
proggeramlug merged 1 commit into
mainfrom
test/12207-absent-holder-entry
Oct 8, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
test/12207-absent-holder-entry

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #12207.

an_unresolved_cache_slot_is_never_dereferenced has failed since #11681 (7fa094c). I bisected it by running this one test: it passes at #11681's parent and fails at #11681 and at every later commit tried. This PR fixes the test, not the runtime.

#11681 made read sites answer absent keys from holder-shape facts on purpose. On a NotOwn miss, prime_read_holder publishes an absent holder entry, and that resolves the slot. The test still asserted the pre-#11681 rule that an absent read leaves the slot null.

The entry is validated against the receiver and hop shapes on every use, so all of these invalidate it:

  • adding the key to the receiver or to any prototype;
  • delete;
  • setPrototypeOf on the receiver or on a hop;
  • defining an accessor on a prototype.

A Proxy in the chain is never admitted. Existing tests that cover this:

  • memo_tests::alternating_terminals_and_deep_hops_hit_and_invalidate_independently;
  • class_read::tests::multi_absent_*.

Changes:

  • Drop the slot.is_null() assert.
  • Keep the guarantees the test is about: the read returns undefined and leaves the own-key ways unprimed (packed == 0).
  • Add a second read through the same slot, which must also return undefined.
  • Update the doc comment.

Results: cargo test --release -p perry-runtime --lib -- --test-threads=1 ic_slow passes 24 tests with 0 failures.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 538ede72-cd91-4185-98f2-6ba950637ea8
📥 Commits

Reviewing files that changed from the base of the PR and between 48e819a and 36c3715.

📒 Files selected for processing (1)
  • crates/perry-runtime/src/object/field_get_set/ic_miss/ic_slow.rs
 __________________________________________________________________________________________________________________________
< Unix was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things. >
 --------------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 98d1871 into main Oct 8, 2026
92 of 101 checks passed
@proggeramlug
proggeramlug deleted the test/12207-absent-holder-entry branch October 8, 2026 12:39
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.

runtime test ic_slow::an_unresolved_cache_slot_is_never_dereferenced fails on main

1 participant