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

teach miri to use intrinsics' fallback bodies #3397

Closed
oli-obk opened this issue Mar 23, 2024 · 2 comments · Fixed by rust-lang/rust#124293
Closed

teach miri to use intrinsics' fallback bodies #3397

oli-obk opened this issue Mar 23, 2024 · 2 comments · Fixed by rust-lang/rust#124293
Assignees
Labels
A-intrinsics Area: Affects out implementation of Rust intrinsics C-cleanup Category: cleaning up our code

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Mar 23, 2024

And then replace lots of our SIMD and numeric shims with fallback bodies by adding said fallback bodies to libcore.

Note that we need to take lots of care to preserve UB.

This may regress diagnostics quality, so maybe we need some sort of unreachable_unchecked intrinsic equivalent which can be passed a string that explains the UB?

@RalfJung
Copy link
Member

RalfJung commented Mar 23, 2024

I think we may want to require some sort of opt-in here, like #[rustc_intrinsic_fallback_checks_ub] or so, so that one can locally review in the intrinsic body whether the requirement is upheld.

@RalfJung
Copy link
Member

RalfJung commented May 3, 2024

Isn't this a duplicate of #3302?

@RalfJung RalfJung added A-shims Area: This affects the external function shims C-cleanup Category: cleaning up our code labels May 3, 2024
compiler-errors added a commit to compiler-errors/rust that referenced this issue May 4, 2024
…dy, r=RalfJung

Let miri and const eval execute intrinsics' fallback bodies

fixes rust-lang/miri#3397

r? `@RalfJung`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 4, 2024
…dy, r=RalfJung

Let miri and const eval execute intrinsics' fallback bodies

fixes rust-lang/miri#3397

r? `@RalfJung`
@RalfJung RalfJung added A-intrinsics Area: Affects out implementation of Rust intrinsics and removed A-shims Area: This affects the external function shims labels May 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 4, 2024
Rollup merge of rust-lang#124293 - oli-obk:miri_intrinsic_fallback_body, r=RalfJung

Let miri and const eval execute intrinsics' fallback bodies

fixes rust-lang/miri#3397

r? ``@RalfJung``
RalfJung pushed a commit to RalfJung/miri that referenced this issue May 4, 2024
…fJung

Let miri and const eval execute intrinsics' fallback bodies

fixes rust-lang#3397

r? ``@RalfJung``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intrinsics Area: Affects out implementation of Rust intrinsics C-cleanup Category: cleaning up our code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants