{{ message }}
Repository navigation
abi-location selftest: one slot judged with and without abi/ declaring its fn type (row 191, a6 on #1409) - #1479
Merged
Merged
Conversation
…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.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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_scanchecked the fn-types part. No selftest case changedabi/, 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:abi/declares nofn(u64, u64) -> u64, so it is reported asextern-fn.abi/planted_slot_type.rsdeclaring 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.