Calculate fn ptr type discriminator from FnAbi#3
Draft
jchlanda wants to merge 19 commits into
Draft
Conversation
Alongside Rust implementation of LLVM's SipHash-2-4.
This is only to be used when emitting an operand bundle, which might not have access to an Instance of the function, but for which FnAbi is guaranteed to be correct.
Start moving away from global schema, by cloning it into users. Helpers for fn ptr type discrimination status and value of the key.
This is a move away from a blind bitcast between the types. Now, when dealing with function pointers, transmute will detect a domain change (change of fn ptr type) and issue resigning.
As the libc changes was merged in to the main we do not need to patch it. cc-rs still needs to be patched as compiler/rustc_llvm/Cargo.toml still pins to an old version: cc = "=1.2.16"
…g get_fn_addr call sites
Note: This is an experiment, we harness the fact that FnAbi contains type information for both return and arguments (alongside, lowered, ABI info).
jchlanda
force-pushed
the
jakub/pac_ty_disc
branch
2 times, most recently
from
July 17, 2026 06:56
c224581 to
cff5996
Compare
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.
Note: This is an experiment, we harness the fact that FnAbi contains type information for both return and arguments (alongside, lowered, ABI info).