-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE: -Crpath
without -o
#119571
Comments
Also, I don't think there's an ICE-golf competition, but if there were then I might be winning |
In this case Both parent calls can't return |
Rollup merge of rust-lang#125861 - name1e5s:fix/rpath_null_panic, r=michaelwoerister rustc_codegen_ssa: fix `get_rpath_relative_to_output` panic when lib only contains file name <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> --> When compiles program with `-C rpath=yes` but with no output filename specified, or with filename ONLY, we will get an ICE for now. Fix it by treat empty `output` path in `get_rpath_relative_to_output` as current dir. Before this patch: ```bash rustc -C prefer_dynamic=yes -C rpath=yes -O h.rs # ICE, no output filename specified rustc -o hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # ICE, output filename has no path rustc -o ./hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # Works ``` All those examples work after the patch. Close rust-lang#119571. Close rust-lang#125785.
I tried this:
I expected to see this happen: Anything but an ICE
Instead, this happened:
The unwraps in this function all look a bit suspicious tbh:
rust/compiler/rustc_codegen_ssa/src/back/rpath.rs
Lines 80 to 96 in 139fb22
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: