Skip to content

Commit 6fc0630

Browse files
Ensure bitfield-based structure has padding bits initialized
1 parent b507811 commit 6fc0630

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/MC/MCSFrame.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ void MCSFrameEmitter::encodeFuncOffset(MCContext &C, uint64_t Offset,
474474
// Offset is the difference between the function start label and the final
475475
// FRE's offset, which is the max offset for this FDE.
476476
FDEInfo<endianness::native> I;
477+
I.Info = 0;
477478
if (isUInt<8>(Offset))
478479
I.setFREType(FREType::Addr1);
479480
else if (isUInt<16>(Offset))
@@ -483,6 +484,9 @@ void MCSFrameEmitter::encodeFuncOffset(MCContext &C, uint64_t Offset,
483484
I.setFREType(FREType::Addr4);
484485
}
485486
I.setFDEType(FDEType::PCInc);
487+
// TODO: When we support pauth keys, this will need to be retrieved
488+
// from the frag itself.
489+
I.setPAuthKey(0);
486490

487491
Out.push_back(I.getFuncInfo());
488492
return;

0 commit comments

Comments
 (0)