-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 when target directory doesn’t exist for LLVM outputs #21335
Comments
No longer an ICE. Here's a safer repro: $ RUST_BACKTRACE=1 rustc - --out-dir=random_directory_that_does_not_exist/ --emit=llvm-bc <<< 'fn main(){}'
error: could not copy "target/rust_out.0.bc" to "target/rust_out.bc": the source path is not an existing file
error: failed to remove target/rust_out.0.bc: No such file or directory (os error 2)
error: aborting due to 2 previous errors |
llvm-ir still fails with the same error. I went ahead and added headers so it is clear this bug has 2 parts. |
@nagisa I don't get a crash with
|
@tamird I, from the little information you’ve provided, predict your rustc has been compiled with (llvm) assertions disabled. It is a bad idea to go out and triage ICEs with such compiler. |
Yeah, I wasn't aware llvm assertions were disabled by default - I'm recompiling my toolchain and will revisit. |
@nagisa yep, LLVM assertion now. |
Reference rust-lang/rust#21335
@alexcrichton Unless I'm mistaken, this is still broken and should have the |
add test for issue rust-lang#21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes rust-lang#21335.
add test for issue rust-lang#21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes rust-lang#21335.
add test for issue rust-lang#21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes rust-lang#21335.
add test for issue rust-lang#21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes rust-lang#21335.
Rollup of 19 pull requests Successful merges: - #55011 (Add libstd Cargo feature "panic_immediate_abort") - #55821 (Use sort_by_cached_key when the key function is not trivial/free) - #56014 (add test for issue #21335) - #56131 (Assorted tweaks) - #56214 (Implement chalk unification routines) - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy) - #56268 (Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.) - #56324 (Use raw_entry for more efficient interning) - #56336 (Clean up and streamline the pretty-printer) - #56337 (Fix const_fn ICE with non-const function pointer) - #56339 (Remove not used option) - #56341 (Rename conversion util; remove duplicate util in librustc_codegen_llvm.) - #56349 (rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker) - #56355 (Add inline attributes and add unit to CommonTypes) - #56360 (Optimize local linkchecker program) - #56364 (Fix panic with outlives in existential type) - #56365 (Stabilize self_struct_ctor feature.) - #56367 (Moved some feature gate tests to correct location) - #56373 (Update books)
MAKE SURE TO NOT RUN THE COMMANDS IN DIRECTORY WITH ANYTHING NAMED
target
ORtest.rs
OTHERWISE YOU’LL LOSE DATAllvm-bc (does not ICE anymore as reported below):
llvm-ir:
gdb backtrace (for the relevant thread):
All other outputs fail predictably with an error from rustc:
The text was updated successfully, but these errors were encountered: