Skip to content

Commit

Permalink
Fix reversed code offsets in GcInfo (#111792)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeksowi authored Jan 24, 2025
1 parent 6acb17a commit 6c73c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ private List<InterruptibleRange> EnumerateInterruptibleRanges(byte[] image, int
uint normRangeStartOffset = normLastinterruptibleRangeStopOffset + normStartDelta;
uint normRangeStopOffset = normRangeStartOffset + normStopDelta;

uint rangeStartOffset = _gcInfoTypes.DenormalizeCodeOffset(normRangeStopOffset);
uint rangeStopOffset = _gcInfoTypes.DenormalizeCodeOffset(normRangeStartOffset);
uint rangeStartOffset = _gcInfoTypes.DenormalizeCodeOffset(normRangeStartOffset);
uint rangeStopOffset = _gcInfoTypes.DenormalizeCodeOffset(normRangeStopOffset);
ranges.Add(new InterruptibleRange(i, rangeStartOffset, rangeStopOffset));

normLastinterruptibleRangeStopOffset = normRangeStopOffset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection.PortableExecutable;
using System.Text;

Expand All @@ -16,6 +17,7 @@ public struct InterruptibleRange
public InterruptibleRange(uint index, uint start, uint stop)
{
Index = index;
Debug.Assert(start <= stop);
StartOffset = start;
StopOffset = stop;
}
Expand Down

0 comments on commit 6c73c19

Please sign in to comment.