Skip to content

Conversation

@folkertdev
Copy link
Contributor

fixes #150050

Always use the same implementation when running miri (regardless of target, for consistency). This implementation yields the current thread to try find actual bugs.

r? RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2025

The Miri subtree was changed

cc @rust-lang/miri

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 17, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

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

Thanks! Just some minor suggestions.

View changes since this review

this.write_int(if success { 0 } else { needed_size }, dest)?;
}
// Hint that a loop is spinning indefinitely.
"miri_spin_loop" => {
Copy link
Member

Choose a reason for hiding this comment

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

Please also add this function in tests/utils/miri_extern.rs inside Miri, with a suitable doc comment.

}
// Hint that a loop is spinning indefinitely.
"miri_spin_loop" => {
// To maximize the chance of finding actual bugs, try to find another thread to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// To maximize the chance of finding actual bugs, try to find another thread to
let [] = this.check_shim_sig_lenient(abi, CanonAbi::Rust, link_name, args)?;
// To maximize the chance of finding actual bugs, try to find another thread to

Comment on lines +278 to +279
// consistent behavior across targets, this custom function is used. To maximize the
// likelihood of finding actual issues, it will attempt to find another thread to run.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// consistent behavior across targets, this custom function is used. To maximize the
// likelihood of finding actual issues, it will attempt to find another thread to run.
// consistent behavior across targets, this custom function is used.

What that function does is Miri's choice and maybe we'll change it in the future.

@rustbot rustbot 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 Dec 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

riscv64: miri test: error: unsupported operation: inline assembly is not supported

4 participants