Skip to content

Commit b14ac87

Browse files
alx32github-actions[bot]
authored andcommitted
Automerge: [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](llvm/llvm-project#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.
2 parents ca14d63 + 8c31bb7 commit b14ac87

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)