Fix ICE in write_interface when the interface file can't be written#158843
Merged
rust-bors[bot] merged 1 commit intoJul 17, 2026
Merged
Conversation
Collaborator
|
r? @jackh726 rustbot has assigned @jackh726. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
Author
|
r? @bjorn3 |
bjorn3
reviewed
Jul 15, 2026
cezarbbb
force-pushed
the
fix-143981-sdylib-write-interface-panic
branch
from
July 16, 2026 01:04
8617caf to
297060e
Compare
bjorn3
approved these changes
Jul 16, 2026
cezarbbb
force-pushed
the
fix-143981-sdylib-write-interface-panic
branch
from
July 17, 2026 01:26
297060e to
07069b3
Compare
Contributor
|
@cezarbbb: 🔑 Insufficient privileges: not in review users |
Member
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 17, 2026
…nterface-panic, r=bjorn3 Fix ICE in `write_interface` when the interface file can't be written Fixes rust-lang#143981. `write_interface` opened the `sdylib` interface file with `fs::File::create_buffered(...).unwrap()`, so any failure to create it (like `-o` into a non-existent or unwritable directory) will ICE instead of reporting a normal error. Emit `FailedWritingFile` instead, matching the rlink and dep-graph write paths. Also drop a stray trailing `"` from the `FailedWritingFile` in `diagnostic.rs` and `error.rs`.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 17, 2026
…uwer Rollup of 16 pull requests Successful merges: - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX ) - #159301 (Update Enzyme to handle LLVM23) - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges) - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store) - #159410 (rustdoc: remove old `--emit` types) - #158398 (Comment about empty run_passes, fixup of #158040) - #158843 (Fix ICE in `write_interface` when the interface file can't be written) - #159302 (Implement `Debug` helpers via `Cell`) - #159332 (Honor field-level lint attributes in non_snake_case) - #159386 (add a fallback for `fmuladdf*`) - #159391 (Update tests for LLVM 23) - #159400 (Update books) - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1) - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC) - #159405 (Manually implement Clone for GrowableBitSet) - #159415 (rustdoc: rename the doc parts metadata params)
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 17, 2026
…uwer Rollup of 17 pull requests Successful merges: - #159301 (Update Enzyme to handle LLVM23) - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges) - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store) - #159408 (rustc_data_structures: Expand documentation for rustc jobserver APIs) - #159410 (rustdoc: remove old `--emit` types) - #158398 (Comment about empty run_passes, fixup of #158040) - #158843 (Fix ICE in `write_interface` when the interface file can't be written) - #159302 (Implement `Debug` helpers via `Cell`) - #159332 (Honor field-level lint attributes in non_snake_case) - #159340 (Rename `errors.rs` file to `diagnostics.rs` (14/N)) - #159386 (add a fallback for `fmuladdf*`) - #159391 (Update tests for LLVM 23) - #159400 (Update books) - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1) - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC) - #159405 (Manually implement Clone for GrowableBitSet) - #159415 (rustdoc: rename the doc parts metadata params)
rust-timer
added a commit
that referenced
this pull request
Jul 17, 2026
Rollup merge of #158843 - cezarbbb:fix-143981-sdylib-write-interface-panic, r=bjorn3 Fix ICE in `write_interface` when the interface file can't be written Fixes #143981. `write_interface` opened the `sdylib` interface file with `fs::File::create_buffered(...).unwrap()`, so any failure to create it (like `-o` into a non-existent or unwritable directory) will ICE instead of reporting a normal error. Emit `FailedWritingFile` instead, matching the rlink and dep-graph write paths. Also drop a stray trailing `"` from the `FailedWritingFile` in `diagnostic.rs` and `error.rs`.
Kobzol
pushed a commit
to Kobzol/rustc_codegen_cranelift
that referenced
this pull request
Jul 23, 2026
…uwer Rollup of 17 pull requests Successful merges: - rust-lang/rust#159301 (Update Enzyme to handle LLVM23) - rust-lang/rust#159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges) - rust-lang/rust#159402 (Clarify safety requirements for SIMD shl/shr and masked load/store) - rust-lang/rust#159408 (rustc_data_structures: Expand documentation for rustc jobserver APIs) - rust-lang/rust#159410 (rustdoc: remove old `--emit` types) - rust-lang/rust#158398 (Comment about empty run_passes, fixup of rust-lang/rust#158040) - rust-lang/rust#158843 (Fix ICE in `write_interface` when the interface file can't be written) - rust-lang/rust#159302 (Implement `Debug` helpers via `Cell`) - rust-lang/rust#159332 (Honor field-level lint attributes in non_snake_case) - rust-lang/rust#159340 (Rename `errors.rs` file to `diagnostics.rs` (14/N)) - rust-lang/rust#159386 (add a fallback for `fmuladdf*`) - rust-lang/rust#159391 (Update tests for LLVM 23) - rust-lang/rust#159400 (Update books) - rust-lang/rust#159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1) - rust-lang/rust#159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC) - rust-lang/rust#159405 (Manually implement Clone for GrowableBitSet) - rust-lang/rust#159415 (rustdoc: rename the doc parts metadata params)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #143981.
write_interfaceopened thesdylibinterface file withfs::File::create_buffered(...).unwrap(), so any failure to create it (like-ointo a non-existent or unwritable directory) will ICE instead of reporting a normal error. EmitFailedWritingFileinstead, matching the rlink and dep-graph write paths.Also drop a stray trailing
"from theFailedWritingFileindiagnostic.rsanderror.rs.