-
Notifications
You must be signed in to change notification settings - Fork 14k
Prevent ICE at codegen_attrs.rs in autodiff validation by emitting nice error message
#137906
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
Conversation
|
Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test. Also, there's no issue linked -- does this actually fix a real issue found by someone? You mention f5 and f6 from tests/ui/autodiff/autodiff_illegal.rs, but these are not ICEing on master, so can you explain more about how you encountered an ICE?
|
The errors were found by following the build guide from Enzyme's Rust installation page, running: git clone --depth=1 [email protected]:rust-lang/rust.git
cd rust
./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs
./x.py build --stage 1 library
rustup toolchain link enzyme build/host/stage1
rustup toolchain install nightly # enables -Z unstable-optionsAnd after that, testing that specific file using: ./x test tests/ui/autodiff/autodiff_illegal.rsAs long as I know, there is no issue related to this problem. I started looking into it because it was mentioned in a Zulip chat, specifically in this conversation. Since I did this, there doesn't seem to be any PR fixing it, so the error should still be there. |
This PR replaces the following ICE error with a more user-friendly error message.
The issue was occurring specifically in the test file
tests/ui/autodiff/autodiff_illegal.rs, affecting functionsf5andf6.