-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
The const-eval interpreter is called on incomplete/invalid/ill-formed code #124789
Comments
IIRC @oli-obk has been trying to make compilation abort as late as possible to report as many errors as possible (at the item granularity). I'm not sure how to "suspend further compilation processes" for specific items that contain errors prior to const-eval. |
It's probably desirable to discuss some error handling strategy that preserves the "fail as late as possible, report as many errors as possible" idea and yet does not let inputs that const-eval does not expect to handle to go through, at the item granularity. Maybe this involves some pre-const-eval validation/guard, or hardening const-eval against invalid inputs, or some other strategy. Nominating for T-compiler discussion. @rustbot label +I-compiler-nominated |
It looks like #76064 is back. This is the source of countless ICEs. Just in the last few weeks:
invalid asymmetric binary op
#121858Unsigned value 0x100 does not fit in 8 bits
#123690!base.layout().is_sized()
#124436left == right
failed atrustc_const_eval/src/interpret/validity.rs
#124164As member of @rust-lang/wg-const-eval my position is that generally these are not const-eval bugs, but bugs in whatever part of the compiler is passing invalid data to const-eval. However, which part would that be? I am not sure whom to ping for this.^^
The text was updated successfully, but these errors were encountered: