Skip to content

test: Add a regression test for Apple platforms aborting on free#155713

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
tgross35:150898-regression-test
Apr 24, 2026
Merged

test: Add a regression test for Apple platforms aborting on free#155713
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
tgross35:150898-regression-test

Conversation

@tgross35
Copy link
Copy Markdown
Contributor

@tgross35 tgross35 commented Apr 24, 2026

View all comments

Add a regression test for #150898 to make users aware that if this test failures, they may encounter unusual behavior elsewhere.

@rustbot rustbot added 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. labels Apr 24, 2026
@tgross35 tgross35 marked this pull request as ready for review April 24, 2026 02:16
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 24, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 24, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 19 candidates

@tgross35
Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-apple

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
test: Add a regression test for Apple platforms aborting on `free`


try-job: aarch64-apple
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

💔 Test for eb1af91 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the 150898-regression-test branch from 943e78c to acb99bb Compare April 24, 2026 02:27
@tgross35
Copy link
Copy Markdown
Contributor Author

Blocked of course if the runner in CI fails.

@dianqk this is just your repro from #150898 (comment).

@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the 150898-regression-test branch from acb99bb to 3e273bc Compare April 24, 2026 02:43
@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the 150898-regression-test branch from 3e273bc to a511777 Compare April 24, 2026 03:24
@tgross35

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
test: Add a regression test for Apple platforms aborting on `free`


try-job: aarch64-apple
// bug. If this fails with SIGABRT, you may need to upgrade your system to
// avoid other unexpected behavior.
//
// The bug was resolved by MacOS 26.4.
Copy link
Copy Markdown
Member

@dianqk dianqk Apr 24, 2026

Choose a reason for hiding this comment

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

Suggested change
// The bug was resolved by MacOS 26.4.
// The bug was resolved by macOS 26.4.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied

#[unsafe(no_mangle)]
fn retv() -> Reproducer {
// let x = [48, 0, 3, 1, 48, 0];
let x = [0, 0, 3, 0, 0, 0];
Copy link
Copy Markdown
Member

@dianqk dianqk Apr 24, 2026

Choose a reason for hiding this comment

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

I don't know if this can pass Miri check. Should we use let x = [48, 0, 3, 1, 48, 0];?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I replaced the test case with something that I think should be less reliant on codegen, based on your asm repro. I found that using threads makes it reproduce is every time, or at least hasn't not crashed in the
30-40 times I've run it.


let s = 128;
// A few more allocations seem to be necessary, probably to prime
// the allocator find the bug.
Copy link
Copy Markdown
Member

@dianqk dianqk Apr 24, 2026

Choose a reason for hiding this comment

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

Should we document that this test can be a flaky test?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Mentioned this in the comment that it can have false negatives but is also pretty reliable

@rust-bors

This comment was marked as outdated.

@tgross35 tgross35 force-pushed the 150898-regression-test branch from a511777 to 227e008 Compare April 24, 2026 08:46
@tgross35

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
test: Add a regression test for Apple platforms aborting on `free`


try-job: aarch64-apple
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as outdated.

@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the 150898-regression-test branch from 227e008 to 04a5c6e Compare April 24, 2026 09:18
Add a regression test for RUST-150898 to make users aware that if this
test fails, they may encounter unusual behavior elsewhere.

Original repro authored by dianqk.
@tgross35 tgross35 force-pushed the 150898-regression-test branch from 04a5c6e to 150905c Compare April 24, 2026 09:33
@tgross35
Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-apple

r? @dianqk

@rustbot rustbot assigned dianqk and unassigned adwinwhite Apr 24, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
test: Add a regression test for Apple platforms aborting on `free`


try-job: aarch64-apple
@tgross35
Copy link
Copy Markdown
Contributor Author

Any idea what the actual failure mechanism is in the buggy allocator? I can't wrap my head around how writing a random value to a (should be) valid allocation could cause free to not work.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

☀️ Try build successful (CI)
Build commit: fa6c504 (fa6c504d6bea64e370fd51fe3a340feeec21811e, parent: d493b7c5ac637ed7edf626128b9f14796a2dad20)

@dianqk
Copy link
Copy Markdown
Member

dianqk commented Apr 24, 2026

Any idea what the actual failure mechanism is in the buggy allocator? I can't wrap my head around how writing a random value to a (should be) valid allocation could cause free to not work.

I have no idea. Really. And I don't think Apple will share this bug.

@dianqk
Copy link
Copy Markdown
Member

dianqk commented Apr 24, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

📌 Commit 150905c has been approved by dianqk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 24, 2026
…=dianqk

test: Add a regression test for Apple platforms aborting on `free`

Add a regression test for rust-lang#150898 to make users aware that if this test failures, they may encounter unusual behavior elsewhere.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 24, 2026
…=dianqk

test: Add a regression test for Apple platforms aborting on `free`

Add a regression test for rust-lang#150898 to make users aware that if this test failures, they may encounter unusual behavior elsewhere.
rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149452 (Refactor out common code into a `IndexItem::new` constructor)
 - #155621 (Document #[diagnostic::on_move] in the unstable book.)
 - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations)
 - #155730 (Some cleanups around per parent disambiguators)
 - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu)
 - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations)
 - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer)
 - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf)
 - #155713 (test: Add a regression test for Apple platforms aborting on `free`)
 - #155723 (Fix tier level for 5 thumb bare-metal ARM targets)
 - #155735 (Fix typo by removing extra 'to')
 - #155736 (Remove `AllVariants` workaround for rust-analyzer)
rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149452 (Refactor out common code into a `IndexItem::new` constructor)
 - #155621 (Document #[diagnostic::on_move] in the unstable book.)
 - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations)
 - #155730 (Some cleanups around per parent disambiguators)
 - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu)
 - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations)
 - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer)
 - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf)
 - #155713 (test: Add a regression test for Apple platforms aborting on `free`)
 - #155723 (Fix tier level for 5 thumb bare-metal ARM targets)
 - #155735 (Fix typo by removing extra 'to')
 - #155736 (Remove `AllVariants` workaround for rust-analyzer)
@rust-bors rust-bors Bot merged commit 3ad0c70 into rust-lang:main Apr 24, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 24, 2026
rust-timer added a commit that referenced this pull request Apr 24, 2026
Rollup merge of #155713 - tgross35:150898-regression-test, r=dianqk

test: Add a regression test for Apple platforms aborting on `free`

Add a regression test for #150898 to make users aware that if this test failures, they may encounter unusual behavior elsewhere.
@tgross35 tgross35 deleted the 150898-regression-test branch April 24, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

5 participants