Skip to content

Commit 8c31bb7

Browse files
authored
[GSYM] Fix incorrect comparison in gSYM creation (#131197)
There is a bug in `llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp` where `StmtSeqVal` was being compared against `UINT32_MAX` rather than the correct `UINT64_MAX` - thanks @nocchijiang for [pointing this out](#129196 (comment)). We correct the issue with this patch. For testing - the issue would show when we have a correct offset of value `UINT32_MAX` - but constructing such a test is impractical.
1 parent bdb4012 commit 8c31bb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ static void convertFunctionLineTable(OutputAggregator &Out, CUInfo &CUI,
324324
// when it refers to an empty line sequence. In such cases, the DWARF linker
325325
// will exclude the empty sequence from the final output and assign
326326
// `UINT64_MAX` to the `DW_AT_LLVM_stmt_sequence` attribute.
327-
auto StmtSeqVal = dwarf::toSectionOffset(StmtSeqAttr, UINT64_MAX);
328-
if (StmtSeqVal != UINT32_MAX)
327+
uint64_t StmtSeqVal = dwarf::toSectionOffset(StmtSeqAttr, UINT64_MAX);
328+
if (StmtSeqVal != UINT64_MAX)
329329
StmtSeqOffset = StmtSeqVal;
330330
}
331331

0 commit comments

Comments
 (0)