Skip to content

Conversation

@mikem8361
Copy link
Contributor

The exception object address wasn't being render correctly in the JSON crash info.

@mikem8361 mikem8361 requested a review from jkotas December 22, 2023 19:19
@mikem8361 mikem8361 self-assigned this Dec 22, 2023
@ghost
Copy link

ghost commented Dec 22, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

The exception object address wasn't being render correctly in the JSON crash info.

Author: mikem8361
Assignees: mikem8361
Labels:

area-NativeAOT-coreclr

Milestone: -

return false;

if (!WriteHexValue("address"u8, (ulong)Unsafe.AsPointer(ref exception)))
ulong address = Unsafe.As<Exception, nuint>(ref exception);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the GC move the exception object between when we write this address in crashinfo and when the actual dump is generated?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it can. IIRC, it was discussed somewhere. It is not 100% reliable pattern.

The diagnostic stack likes to use it. Tracing uses in multiple places, e.g.

public unsafe void RunningContinuation(int TaskID, object Object) { RunningContinuation(TaskID, (long)*((void**)Unsafe.AsPointer(ref Object))); }
.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants