Skip to content

Commit 52b931b

Browse files
author
Mike McLaughlin
committed
Fix JSON crashinfo exception object address
1 parent 4454914 commit 52b931b

File tree

1 file changed

+2
-1
lines changed
  • src/coreclr/nativeaot/System.Private.CoreLib/src/System

1 file changed

+2
-1
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ private bool WriteExceptionHelper(ReadOnlySpan<byte> key, Exception exception, i
170170
if (!OpenValue(key, '{'))
171171
return false;
172172

173-
if (!WriteHexValue("address"u8, (ulong)Unsafe.AsPointer(ref exception)))
173+
ulong address = Unsafe.As<Exception, nuint>(ref exception);
174+
if (!WriteHexValue("address"u8, address))
174175
return false;
175176

176177
if (!WriteHexValue("hr"u8, exception.HResult))

0 commit comments

Comments
 (0)