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

Detect UB due to mismatching declarations? #3581

Open
RalfJung opened this issue May 7, 2024 · 1 comment
Open

Detect UB due to mismatching declarations? #3581

RalfJung opened this issue May 7, 2024 · 1 comment
Labels
A-interpreter Area: affects the core interpreter C-spec-question Category: it is unclear what the intended behavior of Miri for this case is

Comments

@RalfJung
Copy link
Member

RalfJung commented May 7, 2024

This code has UB that Miri does not detect. See rust-lang/rust#46188 for context.

It seems quite hard to detect this though... we have to somehow check all declarations of all no_mangle functions that ever get called, or something like that.

@RalfJung RalfJung added C-bug Category: This is a bug. A-interpreter Area: affects the core interpreter I-misses-UB Impact: makes Miri miss UB, i.e., a false negative (with default settings) labels May 7, 2024
@RalfJung
Copy link
Member Author

RalfJung commented May 9, 2024

Actually... probably this is a rustc bug, and the code shouldn't be UB in the first place.

@RalfJung RalfJung added C-spec-question Category: it is unclear what the intended behavior of Miri for this case is and removed C-bug Category: This is a bug. I-misses-UB Impact: makes Miri miss UB, i.e., a false negative (with default settings) labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interpreter Area: affects the core interpreter C-spec-question Category: it is unclear what the intended behavior of Miri for this case is
Projects
None yet
Development

No branches or pull requests

1 participant