-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[stable] Backport fix for malformed coverage #117857
Conversation
This method is trying to detect macro invocations, so that it can split a span into two parts just after the `!` of the invocation. Under some circumstances (probably involving nested macros), it gets confused and produces a span that is larger than the original span, and possibly extends outside its enclosing function and even into an adjacent file. In extreme cases, that can result in malformed coverage mappings that cause `llvm-cov` to fail. For now, we at least want to detect these egregious cases and avoid them, so that coverage reports can still be produced.
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
Currently this backport hasn't been approved; I'm just filing this PR so that everything's ready if it does get approved, since the original PR won't apply cleanly on this branch due to minor cleanups to the affected code and test directories. |
Without the workaround applied, this test will produce malformed mappings that cause `llvm-cov` to fail. (And if it does emit well-formed mappings, they should be obviously incorrect.)
5700603
to
d8d9a84
Compare
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
I'm not sure what the proper procedure is for merging a last-minute beta backport to pre-release |
Cherry picked into the stable release PR (#117843). |
Backport of #117827.
Discussion at https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/backport.20.23117827.20to.201.2E74.