[llvm] [BOLT][DWARF] Add support for .debug_names (PR #81062)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 12:14:55 PST 2024
================
@@ -441,10 +441,9 @@ class DebugStrOffsetsWriter {
/// Get offset for given index in original .debug_str_offsets section.
uint64_t getOffset(uint32_t Index) const {
- assert(StrOffsets.size() > Index && "Index is out of bounds.");
+ assert(StrOffsets.size() >= Index && "Index is out of bounds.");
----------------
maksfb wrote:
The new bounds check is incorrect. If you were using `SmallVector` for `StrOffsets`, this assertion would be redundant since `operator []` has its own assertion.
https://github.com/llvm/llvm-project/pull/81062
More information about the llvm-commits
mailing list