Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

todo: audit code against the &Header problem #16

Open
pnkfelix opened this issue Aug 10, 2023 · 0 comments
Open

todo: audit code against the &Header problem #16

pnkfelix opened this issue Aug 10, 2023 · 0 comments
Labels
risk-needing-assessment These are todo work items that are potential bugs but need investigation before we can confirm that.

Comments

@pnkfelix
Copy link
Owner

rust-lang/unsafe-code-guidelines#256 discusses issues with how one might choose to encode the common C pattern of transmuting back and forth from a pointer to a struct and a pointer to a prefix of that struct.

glibc setjmp inherently does this.

I don't think its actually a real issue for this crate, because the JmpBufFields and SigJmpBufFields should really be extern types, not accessible on the Rust side of things.

But at the same time, I am passing a &'a _ around, in order to prevent people from using the reference outside of its scope. And so I just want to double check that my usage here is allowed.

(unfortunately I don't expect miri to be any help for us checking this, since it doesn't support foreign code nor inline assembly. It would be pretty cool if I could get krabcake far enough along for it to make a statement one way or another about what I'm doing here.)

@pnkfelix pnkfelix added the risk-needing-assessment These are todo work items that are potential bugs but need investigation before we can confirm that. label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
risk-needing-assessment These are todo work items that are potential bugs but need investigation before we can confirm that.
Projects
None yet
Development

No branches or pull requests

1 participant