Skip to content
Draft
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
180c0b1
Implement SetFatalErrorHandler for NativeAOT
AaronRobinsonMSFT Jun 16, 2026
fc2fd84
Implement SetFatalErrorHandler for CoreCLR
AaronRobinsonMSFT Jun 17, 2026
9e102dd
Apply suggestions from code review
AaronRobinsonMSFT Jun 17, 2026
0da0fa6
Use _exit() for SkipDefaultHandler on Unix
AaronRobinsonMSFT Jun 17, 2026
01fe291
Add using declaration for Process in test
AaronRobinsonMSFT Jun 17, 2026
fd85bf0
Simplify test process launch with Process.RunAndCaptureText
AaronRobinsonMSFT Jun 17, 2026
1c4d60c
Address PR feedback: use _Exit, fix IsCrashExitCode, suppress warning
AaronRobinsonMSFT Jun 18, 2026
e27a586
Fix handler invocation on Windows and exclude Mono
AaronRobinsonMSFT Jun 18, 2026
e6eec0a
Address PR feedback: UTF-8 crash log, exit code checks, truncation fix
AaronRobinsonMSFT Jun 18, 2026
6965928
Merge remote-tracking branch 'upstream/main' into set-fatal-error-han…
AaronRobinsonMSFT Jun 19, 2026
6249ab4
Replace managed test handlers with native C++ library
AaronRobinsonMSFT Jun 19, 2026
05e0539
Potential fix for pull request finding
AaronRobinsonMSFT Jun 19, 2026
d48a54e
Move crash log writer abstraction into eepolicy.cpp
AaronRobinsonMSFT Jun 23, 2026
88d4857
Fix HandleFatalStackOverflow: invoke handler after stack trace
AaronRobinsonMSFT Jun 23, 2026
6b1848b
Remove unused SystemNative__Exit entrypoint
AaronRobinsonMSFT Jun 24, 2026
58f269d
Address PR review feedback
AaronRobinsonMSFT Jun 24, 2026
8a47f90
Populate FatalErrorInfo with native exception pointers on Unix
AaronRobinsonMSFT Jun 25, 2026
9f69d40
Move fatal error handler to C++ static with QCall registration
AaronRobinsonMSFT Jun 25, 2026
a9d2d1c
Simplify InvokeFatalErrorHandler to direct call
AaronRobinsonMSFT Jun 25, 2026
3b40c8c
Address PR feedback: fix QCall return type, PAL decorators, remove de…
AaronRobinsonMSFT Jun 25, 2026
d798770
Route stack trace through CrashInfoWriter for callback support
AaronRobinsonMSFT Jun 26, 2026
83a87c4
Surface native exception info/context to the fatal error handler on m…
AaronRobinsonMSFT Jun 30, 2026
56ce69a
Refactor fatal error property storage into common core + platform module
AaronRobinsonMSFT Jul 6, 2026
790b319
Fix duplicate crash log and stack-overflow header in fatal error path
AaronRobinsonMSFT Jul 7, 2026
a65444a
Store hardware-exception records per-fault to survive nested faults
AaronRobinsonMSFT Jul 7, 2026
ad36176
Align hardware-exception records within the per-fault buffer
AaronRobinsonMSFT Jul 7, 2026
9ab5194
Use InlineArray16 for crash log fragment storage
AaronRobinsonMSFT Jul 7, 2026
5ec609f
Address PR review feedback
AaronRobinsonMSFT Jul 8, 2026
baa5e41
Clarify comment on FatalErrorPropertyGetter regarding ownership of data
AaronRobinsonMSFT Jul 8, 2026
9a074eb
Address PR review feedback
AaronRobinsonMSFT Jul 8, 2026
2abb2df
Merge remote-tracking branch 'upstream/main' into set-fatal-error-han…
AaronRobinsonMSFT Jul 9, 2026
a3ce5f0
Address PR review feedback
AaronRobinsonMSFT Jul 9, 2026
01e4dc1
Stage 1: surface fault IP to fatal error handler (managed path)
AaronRobinsonMSFT Jul 10, 2026
323a39f
Stage 2: route genuinely-unmanaged fatal faults to the fatal error ha…
AaronRobinsonMSFT Jul 10, 2026
9e1739e
Stage 2: route genuinely-unmanaged fatal faults to the fatal error ha…
AaronRobinsonMSFT Jul 10, 2026
401175a
WIP
AaronRobinsonMSFT Jul 10, 2026
f28cd9f
Merge branch 'main' into set-fatal-error-handler
AaronRobinsonMSFT Jul 12, 2026
e011455
Address review feedback: synchronize native fatal handler pointer, po…
AaronRobinsonMSFT Jul 13, 2026
3b16843
Enhance comments in fatal error handling to clarify encoder behavior …
AaronRobinsonMSFT Jul 17, 2026
1a608d4
Refactor crash log handling to use a single managed string, improving…
AaronRobinsonMSFT Jul 20, 2026
f72811e
Serialize concurrent fatal error handling to ensure only the first fa…
AaronRobinsonMSFT Jul 24, 2026
7960de5
Merge remote-tracking branch 'upstream/main' into set-fatal-error-han…
AaronRobinsonMSFT Jul 24, 2026
2fa3051
Install fatal error handling header
AaronRobinsonMSFT Jul 27, 2026
cd46bf2
Make C compliant
AaronRobinsonMSFT Jul 27, 2026
5871c68
Handle native fatal exceptions in CoreCLR
AaronRobinsonMSFT Jul 29, 2026
46a4925
Invoke fatal error handler for SIGABRT
AaronRobinsonMSFT Jul 30, 2026
0b0e3ad
Merge upstream/main into set-fatal-error-handler
AaronRobinsonMSFT Jul 31, 2026
2fba4fa
Split TerminateProcess interop declarations
AaronRobinsonMSFT Jul 31, 2026
df78676
Refactor fatal error handling: remove previous unhandled exception fi…
AaronRobinsonMSFT Jul 31, 2026
b67696a
Reserve fatal error handler return values
AaronRobinsonMSFT Jul 31, 2026
5bd6d69
Invoke NativeAOT fatal handlers from native code
AaronRobinsonMSFT Aug 3, 2026
72669ae
Cover CoreCLR native utility threads in the fatal error handler
AaronRobinsonMSFT Aug 4, 2026
b6190a6
Ensure process termination in InvokeFatalErrorHandler on spurious wakeup
AaronRobinsonMSFT Aug 4, 2026
ec3ae8e
Update README.md for clarity and formatting improvements
AaronRobinsonMSFT Aug 6, 2026
0a99673
Merge remote-tracking branch 'upstream/main' into set-fatal-error-han…
AaronRobinsonMSFT Aug 6, 2026
cbd3c88
Bad merge.
AaronRobinsonMSFT Aug 6, 2026
173e007
Merge branch 'main' into set-fatal-error-handler
AaronRobinsonMSFT Aug 11, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
<Compile Include="$(MSBuildThisFileDirectory)..\nativeaot\Runtime.Base\src\System\Runtime\ExceptionIDs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)..\nativeaot\Runtime.Base\src\System\Runtime\StackFrameIterator.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\AsmOffsets.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\ExceptionHandling.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\InternalCalls.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\GCSettings.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\JitInfo.CoreCLR.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace System.Runtime.ExceptionServices
{
public static partial class ExceptionHandling
{
[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "ExceptionHandling_TrySetFatalErrorHandler")]
[SuppressGCTransition]
[return: MarshalAs(UnmanagedType.U1)]
private static partial bool TrySetFatalErrorHandler(IntPtr handler);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ internal static void UnhandledExceptionFailFastViaClasslib(
void* pContext = null; // Fatal crash handler does not use the context on non-Windows
#endif

// If this unhandled exception originated from a hardware fault, hand its per-fault
// native records (siginfo/ucontext or EXCEPTION_RECORD/CONTEXT) to the classlib
// FailFast so they can be surfaced to the user's fatal error handler. This is the
// single genuinely-unhandled point, so there is no nested-fault window here.
if (exInfo._pHwExceptionRecords != null)
{
InternalCalls.RhpSetUnhandledHardwareExceptionRecords(exInfo._pHwExceptionRecords);
}

try
{
((delegate*<RhFailFastReason, object, IntPtr, void*, void>)pFailFastFunction)
Expand Down Expand Up @@ -500,6 +509,9 @@ internal void Init(object exceptionObj, bool instructionFault = false)
if (instructionFault)
_kind |= ExKind.InstructionFaultFlag;
_notifyDebuggerSP = UIntPtr.Zero;
#if NATIVEAOT
_pHwExceptionRecords = null;
#endif
}

internal void Init(object exceptionObj, ref ExInfo rethrownExInfo)
Expand All @@ -513,6 +525,9 @@ internal void Init(object exceptionObj, ref ExInfo rethrownExInfo)
_exception = exceptionObj;
_kind = rethrownExInfo._kind | ExKind.RethrowFlag;
_notifyDebuggerSP = UIntPtr.Zero;
#if NATIVEAOT
_pHwExceptionRecords = null;
#endif
}

internal object ThrownException
Expand Down Expand Up @@ -549,7 +564,14 @@ internal object ThrownException

[FieldOffset(AsmOffsets.OFFSETOF__ExInfo__m_notifyDebuggerSP)]
internal volatile UIntPtr _notifyDebuggerSP;
#if !NATIVEAOT
#if NATIVEAOT
// Per-fault copy of the native hardware-exception records (siginfo/ucontext on Unix,
// EXCEPTION_RECORD/CONTEXT on Windows). Set by RhThrowHwEx when a hardware fault is
// translated to a managed exception; surfaced to the fatal error handler if the fault
// goes unhandled. Stored per-ExInfo so nested faults do not clobber each other.
[FieldOffset(AsmOffsets.OFFSETOF__ExInfo__m_pHwExceptionRecords)]
internal void* _pHwExceptionRecords;
#else
[FieldOffset(AsmOffsets.OFFSETOF__ExInfo__m_pCatchHandler)]
internal volatile byte* _pCatchHandler;

Expand All @@ -572,7 +594,7 @@ internal object ThrownException
internal volatile IntPtr _pReversePInvokePropagationContext;
#endif // TARGET_UNIX

#endif // !NATIVEAOT
#endif // NATIVEAOT
}

//
Expand Down Expand Up @@ -653,12 +675,34 @@ internal static void RhThrowHwEx(uint exceptionCode, ExInfo* pExInfo)
break;
}

#if NATIVEAOT
// Take a per-fault copy of the native hardware-exception records captured by the
// signal/vectored handler *before* resolving the classlib exception below. For an
// uncatchable fault (access violation, illegal instruction, ...) the classlib's
// GetRuntimeException calls FailFast directly and never returns here, so both the copy
// and the unhandled hand-off must already be in place by then.
//
// Storing the records on this fault's ExInfo (rather than in a single shared
// thread-local) ensures a nested hardware fault handled while this fault is still in
// flight cannot clobber this fault's records.
int cbHwRecords = InternalCalls.RhpGetHardwareExceptionRecordsBufferSize();
Debug.Assert(cbHwRecords > 0);
byte* pHwRecords = stackalloc byte[cbHwRecords];
InternalCalls.RhpCaptureHardwareExceptionRecordsToBuffer(pHwRecords, cbHwRecords);
InternalCalls.RhpSetUnhandledHardwareExceptionRecords(pHwRecords);
#endif

if (exceptionId != default(ExceptionIDs))
{
exceptionToThrow = GetClasslibException(exceptionId, faultingCodeAddress);
}

exInfo.Init(exceptionToThrow!, instructionFault);
#if NATIVEAOT
// Init cleared _pHwExceptionRecords above; restore this fault's captured records so the
// unhandled dispatch path (UnhandledExceptionFailFastViaClasslib) can re-publish them.
exInfo._pHwExceptionRecords = pHwRecords;
#endif
DispatchEx(ref exInfo._frameIter, ref exInfo);
#if NATIVEAOT
FallbackFailFast(RhFailFastReason.InternalError, null);
Expand Down Expand Up @@ -932,6 +976,17 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn
InvokeSecondPass(ref exInfo, startIdx);
}

// This hardware fault is being handled (caught here or propagated to native code), so
// it will not reach the unhandled fatal-error path. Drop its pending unhandled records
// so a later FailFast cannot surface stale records backed by this fault's now-unwound
// RhThrowHwEx stack frame. Non-hardware exceptions never publish records, but an
// in-flight *outer* hardware fault may have: only clear when the fault being handled
// here is itself the hardware fault whose records are pending.
if ((exInfo._kind & ExKind.KindMask) == ExKind.HardwareFault)
{
InternalCalls.RhpSetUnhandledHardwareExceptionRecords(null);
}

#if FEATURE_OBJCMARSHAL
if (pReversePInvokePropagationCallback != IntPtr.Zero)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ internal static extern unsafe IntPtr RhpCallPropagateExceptionCallback(
internal static extern unsafe void RhpCopyContextFromExInfo(void* pOSContext, int cbOSContext, EH.PAL_LIMITED_CONTEXT* pPalContext);
#endif

[RuntimeImport(RuntimeLibrary, "RhpGetHardwareExceptionRecordsBufferSize")]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern int RhpGetHardwareExceptionRecordsBufferSize();

[RuntimeImport(RuntimeLibrary, "RhpCaptureHardwareExceptionRecordsToBuffer")]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern unsafe void RhpCaptureHardwareExceptionRecordsToBuffer(void* pBuffer, int cbBuffer);

[RuntimeImport(RuntimeLibrary, "RhpSetUnhandledHardwareExceptionRecords")]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern unsafe void RhpSetUnhandledHardwareExceptionRecords(void* pBuffer);

[RuntimeImport(RuntimeLibrary, "RhCurrentNativeThreadId")]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern unsafe IntPtr RhCurrentNativeThreadId();
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/nativeaot/Runtime/AsmOffsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ void BogusFunction()
// Sample usage to generate the error
FindCompileTimeConstant<sizeof(ExInfo)> bogus_variable;
FindCompileTimeConstant<offsetof(ExInfo, m_notifyDebuggerSP)> bogus_variable2;
FindCompileTimeConstant<sizeof(StackFrameIterator)> bogus_variable3;
FindCompileTimeConstant<sizeof(PAL_LIMITED_CONTEXT)> bogus_variable4;
FindCompileTimeConstant<offsetof(PAL_LIMITED_CONTEXT, IP)> bogus_variable5;
FindCompileTimeConstant<offsetof(ExInfo, m_pHwExceptionRecords)> bogus_variable3;
FindCompileTimeConstant<sizeof(StackFrameIterator)> bogus_variable4;
FindCompileTimeConstant<sizeof(PAL_LIMITED_CONTEXT)> bogus_variable5;
FindCompileTimeConstant<offsetof(PAL_LIMITED_CONTEXT, IP)> bogus_variable6;
}
#endif // defined(__cplusplus) && defined(USE_COMPILE_TIME_CONSTANT_FINDER)
103 changes: 103 additions & 0 deletions src/coreclr/nativeaot/Runtime/EHHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,42 @@
#include <minipal/debugger.h>
#include "corexcep.h"

// Per-fault hardware-exception records buffer, handed to the classlib FailFast when a
// hardware fault goes unhandled. The buffer is a managed stackalloc owned by the
// unhandled fault's ExInfo and begins with a two-pointer header {pInfo, pContext} that
// points into the record bytes that follow (siginfo_t/ucontext_t on Unix,
// EXCEPTION_RECORD/CONTEXT on Windows). It is only set at the single genuinely-unhandled
// point (see UnhandledExceptionFailFastViaClasslib), so there is no nested-fault window.
static thread_local void* t_pUnhandledHwRecordsBuffer;

// Set by the unhandled-exception dispatch path when the fault is a hardware fault, just
// before the classlib FailFast runs. The buffer stays valid until FailFast completes.
FCIMPL1(void, RhpSetUnhandledHardwareExceptionRecords, void* pBuffer)
{
t_pUnhandledHwRecordsBuffer = pBuffer;
}
FCIMPLEND

// Consumed once by the classlib FailFast to surface the native records to the fatal
// error handler. Returns true (and fills the out pointers from the buffer header) only
// when an unhandled hardware fault set the buffer above, then clears it.
FCIMPL2(FC_BOOL_RET, RhpGetHardwareExceptionRecords, void** ppInfo, void** ppContext)
{
void* pBuffer = t_pUnhandledHwRecordsBuffer;
if (pBuffer == NULL)
{
*ppInfo = NULL;
*ppContext = NULL;
FC_RETURN_BOOL(false);
}

t_pUnhandledHwRecordsBuffer = NULL;
*ppInfo = ((void**)pBuffer)[0];
*ppContext = ((void**)pBuffer)[1];
FC_RETURN_BOOL(true);
}
FCIMPLEND

struct MethodRegionInfo
{
void* hotStartAddress;
Expand Down Expand Up @@ -420,6 +456,69 @@ EXTERN_C void RhpContinueOnFatalErrors()
g_ContinueOnFatalErrors = true;
}

// Durable per-thread copies of the Windows exception records, surfaced to the fatal
// error handler when a hardware fault goes unhandled. The OS-provided records are
// only valid for the duration of the vectored handler, so they are copied here
// before the faulting context is redirected to RhpThrowHwEx.
static thread_local EXCEPTION_RECORD t_hardwareExceptionRecord;
Comment thread
AaronRobinsonMSFT marked this conversation as resolved.
Outdated
static thread_local CONTEXT t_hardwareExceptionContext;

static void CaptureHardwareExceptionRecords(PEXCEPTION_POINTERS pExPtrs)
{
t_hardwareExceptionRecord = *pExPtrs->ExceptionRecord;
t_hardwareExceptionContext = *pExPtrs->ContextRecord;
#ifdef CONTEXT_XSTATE
// The extended (XSTATE) portion of a CONTEXT is stored after the fixed-size structure,
// so a shallow copy does not capture it. Clear the flag so a consumer does not read
// extended state that was not copied into the durable thread-local record.
t_hardwareExceptionContext.ContextFlags &= ~(DWORD)CONTEXT_XSTATE;
#endif
}

// The records are laid out at ALIGN_UP-ed offsets within the buffer, so the size includes
// the worst-case padding needed to align each sub-record to its own alignment requirement.
static constexpr int32_t ExceptionRecordBufferSize = (int32_t)(2 * sizeof(void*)
+ (alignof(EXCEPTION_RECORD) - 1) + sizeof(EXCEPTION_RECORD)
+ (alignof(CONTEXT) - 1) + sizeof(CONTEXT));

// Size of the per-fault buffer RhThrowHwEx stackallocs to hold a private copy of the
// hardware-exception records: a two-pointer header {pInfo, pContext} followed by the
// EXCEPTION_RECORD and CONTEXT bytes.
FCIMPL0(int32_t, RhpGetHardwareExceptionRecordsBufferSize)
{
return ExceptionRecordBufferSize;
}
FCIMPLEND

// Copies the most recently captured hardware-exception records into the caller-provided
// per-fault buffer and writes the header pointers. Called synchronously from RhThrowHwEx
// right after the vectored handler captured the records, so the durable thread-local
// copies are still those of the current fault.
FCIMPL2(void, RhpCaptureHardwareExceptionRecordsToBuffer, void* pBuffer, int32_t cbBuffer)
{
ASSERT(cbBuffer >= ExceptionRecordBufferSize);

uint8_t* p = (uint8_t*)pBuffer;
// The header holds two pointers, so the buffer must be at least pointer-aligned.
ASSERT(IS_ALIGNED(p, sizeof(void*)));
void** pHeader = (void**)p;
p += 2 * sizeof(void*);

// Each record is aligned to its own alignment requirement (CONTEXT is 16-byte aligned
// on x64/arm64) so the struct copies below (and any later typed access through the
// header pointers) are not misaligned.
EXCEPTION_RECORD* pRecord = (EXCEPTION_RECORD*)ALIGN_UP(p, alignof(EXCEPTION_RECORD));
*pRecord = t_hardwareExceptionRecord;
p = (uint8_t*)(pRecord + 1);

CONTEXT* pContext = (CONTEXT*)ALIGN_UP(p, alignof(CONTEXT));
*pContext = t_hardwareExceptionContext;

pHeader[0] = pRecord;
pHeader[1] = pContext;
}
FCIMPLEND

LONG WINAPI RhpVectoredExceptionHandler(PEXCEPTION_POINTERS pExPtrs)
{
uintptr_t faultCode = pExPtrs->ExceptionRecord->ExceptionCode;
Expand Down Expand Up @@ -533,6 +632,10 @@ LONG WINAPI RhpVectoredExceptionHandler(PEXCEPTION_POINTERS pExPtrs)

if (translateToManagedException)
{
// Copy the OS exception records before redirecting the faulting context so
// that an unhandled fault can surface them to the fatal error handler.
CaptureHardwareExceptionRecords(pExPtrs);

NATIVE_CONTEXT* pCtx = (NATIVE_CONTEXT*)pExPtrs->ContextRecord;

pCtx->SetIp(PCODEToPINSTR((PCODE)&RhpThrowHwEx));
Expand Down
4 changes: 3 additions & 1 deletion src/coreclr/nativeaot/Runtime/amd64/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PLAT_ASM_OFFSET(19, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(1c, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(20, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(240, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(248, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_RIP)
PLAT_ASM_OFFSET(8, PInvokeTransitionFrame, m_FramePointer)
Expand Down Expand Up @@ -73,7 +74,7 @@ PLAT_ASM_OFFSET(90, REGDISPLAY, Xmm)

#else // !UNIX_AMD64_ABI

PLAT_ASM_SIZEOF(190, ExInfo)
PLAT_ASM_SIZEOF(198, ExInfo)
PLAT_ASM_OFFSET(0, ExInfo, m_pPrevExInfo)
PLAT_ASM_OFFSET(8, ExInfo, m_pExContext)
PLAT_ASM_OFFSET(10, ExInfo, m_exception)
Expand All @@ -82,6 +83,7 @@ PLAT_ASM_OFFSET(19, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(1c, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(20, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(188, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(190, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_RIP)
PLAT_ASM_OFFSET(8, PInvokeTransitionFrame, m_FramePointer)
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/nativeaot/Runtime/arm/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PLAT_ASM_OFFSET(0d, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(10, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(18, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(120, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(124, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_FramePointer)
PLAT_ASM_OFFSET(4, PInvokeTransitionFrame, m_RIP)
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/nativeaot/Runtime/arm64/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// NOTE: the offsets MUST be in hex notation WITHOUT the 0x prefix

PLAT_ASM_SIZEOF(278, ExInfo)
PLAT_ASM_SIZEOF(280, ExInfo)
PLAT_ASM_OFFSET(0, ExInfo, m_pPrevExInfo)
PLAT_ASM_OFFSET(8, ExInfo, m_pExContext)
PLAT_ASM_OFFSET(10, ExInfo, m_exception)
Expand All @@ -16,6 +16,7 @@ PLAT_ASM_OFFSET(19, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(1c, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(20, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(270, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(278, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_FramePointer)
PLAT_ASM_OFFSET(8, PInvokeTransitionFrame, m_RIP)
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/nativeaot/Runtime/i386/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// NOTE: the offsets MUST be in hex notation WITHOUT the 0x prefix

PLAT_ASM_SIZEOF(c8, ExInfo)
PLAT_ASM_SIZEOF(cc, ExInfo)
PLAT_ASM_OFFSET(0, ExInfo, m_pPrevExInfo)
PLAT_ASM_OFFSET(4, ExInfo, m_pExContext)
PLAT_ASM_OFFSET(8, ExInfo, m_exception)
Expand All @@ -16,6 +16,7 @@ PLAT_ASM_OFFSET(0d, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(10, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(14, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(c4, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(c8, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_RIP)
PLAT_ASM_OFFSET(4, PInvokeTransitionFrame, m_FramePointer)
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/nativeaot/Runtime/loongarch64/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// NOTE: the offsets MUST be in hex notation WITHOUT the 0x prefix

PLAT_ASM_SIZEOF(270, ExInfo)
PLAT_ASM_SIZEOF(278, ExInfo)
PLAT_ASM_OFFSET(0, ExInfo, m_pPrevExInfo)
PLAT_ASM_OFFSET(8, ExInfo, m_pExContext)
PLAT_ASM_OFFSET(10, ExInfo, m_exception)
Expand All @@ -16,6 +16,7 @@ PLAT_ASM_OFFSET(19, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(1C, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(20, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(268, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(270, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_FramePointer)
PLAT_ASM_OFFSET(8, PInvokeTransitionFrame, m_RIP)
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/nativeaot/Runtime/riscv64/AsmOffsetsCpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// NOTE: the offsets MUST be in hex notation WITHOUT the 0x prefix

PLAT_ASM_SIZEOF(340, ExInfo)
PLAT_ASM_SIZEOF(348, ExInfo)
PLAT_ASM_OFFSET(0, ExInfo, m_pPrevExInfo)
PLAT_ASM_OFFSET(8, ExInfo, m_pExContext)
PLAT_ASM_OFFSET(10, ExInfo, m_exception)
Expand All @@ -16,6 +16,7 @@ PLAT_ASM_OFFSET(19, ExInfo, m_passNumber)
PLAT_ASM_OFFSET(1C, ExInfo, m_idxCurClause)
PLAT_ASM_OFFSET(20, ExInfo, m_frameIter)
PLAT_ASM_OFFSET(338, ExInfo, m_notifyDebuggerSP)
PLAT_ASM_OFFSET(340, ExInfo, m_pHwExceptionRecords)

PLAT_ASM_OFFSET(0, PInvokeTransitionFrame, m_FramePointer)
PLAT_ASM_OFFSET(8, PInvokeTransitionFrame, m_RIP)
Expand Down
Loading
Loading