Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/coreclr/gcinfo/gcinfodumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,10 @@ PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on th
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
UINT32 safePointOffset = offset;
#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
safePointOffset++;
if (safePointDecoder.Version() < 4)
{
safePointOffset++;
}
#endif
if(safePointDecoder.IsSafePoint(safePointOffset))
{
Expand Down
9 changes: 4 additions & 5 deletions src/coreclr/vm/gcinfodecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,17 @@ TGcInfoDecoder<GcInfoEncoding>::TGcInfoDecoder(
{
if(m_NumSafePoints)
{
UINT32 offset = m_InstructionOffset;
#ifdef DECODE_OLD_FORMATS
if (Version() < 4)
if (Version() < 4 && (flags & DECODE_INTERRUPTIBILITY))
{
// Safepoints are encoded with a -1 adjustment
// DECODE_GC_LIFETIMES adjusts the offset accordingly, but DECODE_INTERRUPTIBILITY does not
// adjust here
UINT32 offset = flags & DECODE_INTERRUPTIBILITY ? m_InstructionOffset - 1 : m_InstructionOffset;
m_SafePointIndex = FindSafePoint(offset);
offset--;
}
#else
m_SafePointIndex = FindSafePoint(m_InstructionOffset);
#endif
m_SafePointIndex = FindSafePoint(offset);
}
}
else if(flags & DECODE_FOR_RANGES_CALLBACK)
Expand Down
Loading