-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Fix ICE on coverage span context mismatch for nested macros #152036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
chenyukang
wants to merge
1
commit into
rust-lang:main
from
chenyukang:yukang-fix-147339-span-context-mismatch
Closed
Fix ICE on coverage span context mismatch for nested macros #152036
chenyukang
wants to merge
1
commit into
rust-lang:main
from
chenyukang:yukang-fix-147339-span-context-mismatch
+26
−7
Conversation
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
Collaborator
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage instrumentation. cc @Zalathar |
Member
|
Thanks for your efforts. This fix is not quite right, but it's easier to create my own PR than to explain how to change this one, so I've filed #152039 as a replacement. |
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 3, 2026
…ukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of rust-lang#152036. --- In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes rust-lang#147339. r? chenyukang
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 3, 2026
…ukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of rust-lang#152036. --- In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes rust-lang#147339. r? chenyukang
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 3, 2026
…ukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of rust-lang#152036. --- In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes rust-lang#147339. r? chenyukang
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 3, 2026
…ukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of rust-lang#152036. --- In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes rust-lang#147339. r? chenyukang
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 3, 2026
…ukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of rust-lang#152036. --- In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes rust-lang#147339. r? chenyukang
rust-timer
added a commit
that referenced
this pull request
Feb 3, 2026
Rollup merge of #152039 - Zalathar:context-mismatch, r=chenyukang coverage: Add a test case for a previously-unknown span mismatch - This is a revised version of #152036. --- In #145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice. A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in #147339. Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds. - Fixes #147339. r? chenyukang
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 #147339
r? @Zalathar