Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MichalStrehovsky
Copy link
Member

Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.

Cc @dotnet/ilc-contrib

Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

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

int realFrameCount = (returnedFrameCount >= 0 ? returnedFrameCount : frameArray.Length);
// Unreasonably high or negative frameIndex could lead to overflows or failures to allocate
// the frameArray below so spot check it's sane.
RuntimeImports.RhGetCurrentThreadStackBounds(out IntPtr stackLow, out IntPtr stackHigh);
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this, would it be better for RhGetCurrentThreadStackTrace to take an integer with how many frames to skip?

Copy link
Member Author

Choose a reason for hiding this comment

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

I reverted this part and block the relevant tests on #103218. This API is really confusing wrt integer overflows and underflows (that we enshrine in tests rather than block) and propagating the confusion to the runtime APIs doesn't sound like an improvement. It should be dealt separately from this PR.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky MichalStrehovsky merged commit 0686ce6 into dotnet:main Jun 10, 2024
@MichalStrehovsky MichalStrehovsky deleted the stacktracetests branch June 10, 2024 21:23
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 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.

2 participants