-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run System.Diagnostics.StackTrace tests with NAOT #103151
Run System.Diagnostics.StackTrace tests with NAOT #103151
Conversation
Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
src/libraries/System.Diagnostics.StackTrace/tests/StackFrameTests.cs
Outdated
Show resolved
Hide resolved
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.
Cc @dotnet/ilc-contrib