diff options
| author | Danila Kutenin <kutdanila@yandex.ru> | 2021-12-20 15:56:56 +0100 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2021-12-20 15:56:57 +0100 |
| commit | cff192739bb6dd67b2ec58f055af2ae2834c4348 (patch) | |
| tree | dabf6cf8ee18373773409d908c1971e9ab45ae9b /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 85cb53c790361b97d39461c9c0c45d4c69ce3d6a (diff) | |
[clang-include-fixer] Fix incorrect ranking because of dangling references
SymbolAndSignals stores SymbolInfo which stores two std::strings. Then
the values are stored in a llvm::DenseMap<llvm::StringRef, double>. When
the sorting is happening, SymbolAndSignals are swapped and thus because
of small string optimization some strings may become invalid. This
results in incorrect ranking.
This was detected when running new std::sort algorithm against llvm
toolchain. This could have been prevented with running llvm::sort and
EXPENSIVE_CHECKS. Unfortunately, no sanitizer yelled.
I don't have commit rights, kutdanila@yandex.ru Danila Kutenin
Reviewed By: bkramer
Differential Revision: https://reviews.llvm.org/D116037
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
