Skip to content

WIP: core::process::abort - #163922

Draft
tgross35 wants to merge 4 commits into
rust-lang:mainfrom
tgross35:core-abort
Draft

tgross35 wants to merge 4 commits into
rust-lang:mainfrom
tgross35:core-abort

Conversation

@tgross35

@tgross35 tgross35 commented Oct 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Some tests may need access to the constants.
There has been discussion about possibly bringing `abort` into `core`
with `abort_immediate` as a fallback. If this or other changes happen,
we would want to make sure `abort` still raises SIGABRT. Since we don't
seem to be asserting the exact exit behavior anywhere, add a test here.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 7, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[TIMING:end] format::InternalRustfmt {  } -- 12.796
fmt: checked 7345 files
tidy check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy [pal (library)]: library/std/src/process.rs:2641: platform-specific cfg: cfg(not(any(all(windows, target_env = "gnu"), target_os = "cygwin")))
tidy [pal (library)]: library/std/src/process.rs:2645: platform-specific cfg: cfg(any(all(windows, target_env = "gnu"), target_os = "cygwin"))
tidy [pal (library)]: FAIL
tidy: Skipping binary file check, read-only filesystem
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.12' and 'venv'
Requirement already satisfied: pip in ./build/venv/lib/python3.12/site-packages (24.0)
Collecting pip
---
typechecking javascript files
tidy: The following check failed: pal (library)
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1665
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1747:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:02:47
  local time: Wed Oct  7 09:20:21 UTC 2026
  network time: Wed, 07 Oct 2026 09:20:21 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

#[cold]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub fn abort() -> ! {
#[unsafe(no_mangle)]

@bjorn3 bjorn3 Oct 7, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[unsafe(no_mangle)]
#[rustc_std_internal_symbol]

all symbols defined by the standard library must be mangled to prevent conflicts when linking staticlibs produced by two versions of rustc together. Also this seems like something where an EII would make sense, though those aren't usable in the standard library yet. Also on MSVC weak linkage needs compiler assistance for linking dylibs like std.dll to not fail with an error. EII handles this already.

View changes since the review

@rust-bors

rust-bors Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #166230) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants