about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-11-12 18:07:28 +1100
committerMark Rousskov <mark.simulacrum@gmail.com>2023-11-12 21:45:18 -0500
commit09cd1153e5a66785bac59f21257a301c56d8a16b (patch)
tree9ccf7ee740e44fb2413a26d3a9169e596c634774 /compiler/rustc_codegen_llvm/src/debuginfo
parent034f8bb438765f5cfbdf76bc1612c22e867bb462 (diff)
coverage: Avoid creating malformed macro name spans
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
0 files changed, 0 insertions, 0 deletions