abi-location selftest: one slot judged with and without abi/ declaring its fn type (row 191, a6 on #1409) by MattJackson · Pull Request #1479 · GetBusbar/busbar · GitHub
Skip to content

abi-location selftest: one slot judged with and without abi/ declaring its fn type (row 191, a6 on #1409) - #1479

Merged
MattJackson merged 1 commit into
devfrom
lane-abi-location-sig-plant
Oct 21, 2026
Merged

MattJackson merged 1 commit into
devfrom
lane-abi-location-sig-plant

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

This PR does a6's follow-up on #1409.

#1409 caches abi-location's per-file scan. Each cache hit must match on repo, path, file bytes, and the ABI's fn types. Until now only the unit test the_memoised_scan_is_the_fresh_scan checked the fn-types part. No selftest case changed abi/, so a cache lookup that ignored the fn types would still pass the battery.

What this adds: two selftest cases that plant one kernel slot with identical bytes, planted_typed_slot(a: u64, b: u64) -> u64:

  • RED: the slot alone. abi/ declares no fn(u64, u64) -> u64, so it is reported as extern-fn.
  • GREEN: the same bytes, plus abi/planted_slot_type.rs declaring that fn type. The slot now implements the ABI and is no finding.

If the cache ignored the fn types, one case would be handed the other's answer, so whichever ran second would fail.

Proof (abi-location run on its own on ModernCI, through scratch branches):

  • lane-scratch-abi-sig-green (this branch): green.
  • lane-scratch-abi-sig-red (this branch, with the cache lookup changed to ignore the fn types): result to follow in a comment.

Guarded: xtask/src/gates/abi_location.rs.

…declaring its fn type (a6 on #1409)

The scan memo (#1409) is keyed on the repo, the path, the bytes and the ABI's fn types. Until
now only the unit test the_memoised_scan_is_the_fresh_scan held it to the fn types: no
selftest case changed abi/. The same planted slot is now RED alone and GREEN once abi/ declares
its signature, so a memo that dropped the fn types hands one case the other's answer.
@MattJackson

Copy link
Copy Markdown
Collaborator Author

@MattJackson
MattJackson merged commit 0f3c9ca into dev Oct 21, 2026
1 check passed
@MattJackson
MattJackson deleted the lane-abi-location-sig-plant branch October 21, 2026 22:31
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