diff options
| author | bors <bors@rust-lang.org> | 2022-10-20 15:18:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-20 15:18:31 +0000 |
| commit | 967f172e256802f9bf0ad5718d9c761da18132a9 (patch) | |
| tree | 052f0bbd2df748670825025af0c0c261c9928724 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 4612fdfa7b183c778e6985c96c06f9bdebe36e2e (diff) | |
| parent | 524ec2e12577d652875c68c3f205e8530451ba48 (diff) | |
| download | rust-967f172e256802f9bf0ad5718d9c761da18132a9.tar.gz rust-967f172e256802f9bf0ad5718d9c761da18132a9.zip | |
Auto merge of #9635 - smoelius:fix-9386-bug, r=Jarcho
Fix bug introduced by #9386 #9386 introduced a potential out-of-bounds array access. Specifically, a location returned by `local_assignments` could have [`location.statement_index` equal to `mir.basic_blocks[location.block].statements.len()`](https://github.com/rust-lang/rust-clippy/blob/b8a9a507bf9e3149d287841454842116c72d66c4/clippy_utils/src/mir/mod.rs#L129), in which case the location would refer to the block terminator: https://github.com/rust-lang/rust-clippy/blob/b8a9a507bf9e3149d287841454842116c72d66c4/clippy_lints/src/dereference.rs#L1204-L1206 I suspect the bug is not triggerable now, because of checks leading up to where it occurs. But a future code change could make it triggerable. Hence, it should be fixed. r? `@Jarcho` changelog: none
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
