Skip to content

Fix alloc_error_handler signature mismatch - #150757

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Spxg:w/mismatch
Jan 8, 2026
Merged

Fix alloc_error_handler signature mismatch#150757
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Spxg:w/mismatch

Conversation

@Spxg

@SpxgSpxg commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Commit #147526 removed the following code and replaced it with the AllocatorMethod. However, its input is empty, resulting in behavior inconsistent with the previous code.

create_wrapper_function(
tcx,&cx,&mangle_internal_symbol(tcx,"__rust_alloc_error_handler"),Some(&mangle_internal_symbol(tcx,alloc_error_handler_name(alloc_error_handler_kind))),&[usize, usize],// size, alignNone,true,&CodegenFnAttrs::new(),);

resolves#150755

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 7, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Spxg

Spxg commented Jan 7, 2026

Copy link
Copy Markdown
ContributorAuthor

r? @bjorn3

@rustbotrustbot assigned bjorn3 and unassigned nnethercoteJan 7, 2026
@bjorn3

Copy link
Copy Markdown
Member

@bors r+

@rust-borsrust-borsBot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 7, 2026
@bors

bors commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

📌 Commit f02ed7b has been approved by bjorn3

It is now in the queue for this repository.

@bors

bors commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@rust-borsrust-borsBot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 7, 2026
@rust-bors

rust-borsBot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f02ed7b has been approved by bjorn3

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Fix `alloc_error_handler` signature mismatch
Commit rust-lang#147526 removed the following code and replaced it with the `AllocatorMethod`. However, its input is empty, resulting in behavior inconsistent with the previous code.
```rust
create_wrapper_function(
tcx,
&cx,
&mangle_internal_symbol(tcx, "__rust_alloc_error_handler"),
Some(&mangle_internal_symbol(tcx, alloc_error_handler_name(alloc_error_handler_kind))),
&[usize, usize], // size, align
None,
true,
&CodegenFnAttrs::new(),
);
```
resolvesrust-lang#150755
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Fix `alloc_error_handler` signature mismatch
fixesrust-lang#98342
r? @GuillaumeGomez
Renders intra-doc links in the note text of the `#[deprecated]` attribute. It is quite natural to suggest some other function to use there. So e.g.
```rust
#[deprecated(since = "0.0.0", note = "use [`std::mem::size_of`] instead")]
```
renders as
<img width="431" height="74" alt="Screenshot from 2026-01-06 12-08-21" src="https://github.com/user-attachments/assets/8f608f08-13ee-4bbf-a631-6008058a51e2" />
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Fix `alloc_error_handler` signature mismatch
Commit rust-lang#147526 removed the following code and replaced it with the `AllocatorMethod`. However, its input is empty, resulting in behavior inconsistent with the previous code.
```rust
create_wrapper_function(
tcx,
&cx,
&mangle_internal_symbol(tcx, "__rust_alloc_error_handler"),
Some(&mangle_internal_symbol(tcx, alloc_error_handler_name(alloc_error_handler_kind))),
&[usize, usize], // size, align
None,
true,
&CodegenFnAttrs::new(),
);
```
resolvesrust-lang#150755
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Fix `alloc_error_handler` signature mismatch
It was added in ddee45e ([here](https://github.com/rust-lang/rust/pull/97802/changes#diff-85dc642a7bdad363a9e37d2491230280fcd977391ba7a242bda2da9ddb55f654) to be specific) when SIGPIPE was controlled with an attribute on `fn main()` which meant it could also be combined with `#[rustc_main]`:
#[unix_sigpipe = "sig_dfl"]
#[rustc_main]
fn rustc_main() {
The test stopped being needed in cde0cde when `#[unix_sigpipe = "..."]` was replaced by `-Zon-broken-pipe=...`. And it will not be needed when `-Zon-broken-pipe=...` is replaced by an Externally Implementable Item (see rust-lang#150591). Let's remove this test.
Tracking issue:
- rust-lang#150588
rust-borsBot added a commit that referenced this pull request Jan 8, 2026
Rollup of 6 pull requests
Successful merges:
- #150675 (MGCA: Support tuple expressions as direct const arguments)
- #150696 (enrich error info when tries to dlopen Enzyme)
- #150747 (tests/ui/runtime/on-broken-pipe/with-rustc_main.rs: Not needed so remove)
- #150757 (Fix `alloc_error_handler` signature mismatch)
- #150777 (Stabilize `slice::element_offset`)
- #150791 (Remove out of date FIXME comment.)
r? @ghost
@rust-bors
rust-borsBot merged commit bfec56b into rust-lang:mainJan 8, 2026
11 checks passed
@rustbotrustbot added this to the 1.94.0 milestone Jan 8, 2026
rust-timer added a commit that referenced this pull request Jan 8, 2026
Rollup merge of #150757 - rm-unneded-test, r=bjorn3
Fix `alloc_error_handler` signature mismatch
It was added in ddee45e ([here](https://github.com/rust-lang/rust/pull/97802/changes#diff-85dc642a7bdad363a9e37d2491230280fcd977391ba7a242bda2da9ddb55f654) to be specific) when SIGPIPE was controlled with an attribute on `fn main()` which meant it could also be combined with `#[rustc_main]`:
#[unix_sigpipe = "sig_dfl"]
#[rustc_main]
fn rustc_main() {
The test stopped being needed in cde0cde when `#[unix_sigpipe = "..."]` was replaced by `-Zon-broken-pipe=...`. And it will not be needed when `-Zon-broken-pipe=...` is replaced by an Externally Implementable Item (see #150591). Let's remove this test.
Tracking issue:
- #150588
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#150675 (MGCA: Support tuple expressions as direct const arguments)
- rust-lang/rust#150696 (enrich error info when tries to dlopen Enzyme)
- rust-lang/rust#150747 (tests/ui/runtime/on-broken-pipe/with-rustc_main.rs: Not needed so remove)
- rust-lang/rust#150757 (Fix `alloc_error_handler` signature mismatch)
- rust-lang/rust#150777 (Stabilize `slice::element_offset`)
- rust-lang/rust#150791 (Remove out of date FIXME comment.)
r? @ghost
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alloc_error_handler signature mismatch

5 participants

@Spxg@rustbot@bjorn3@bors@nnethercote