Run System.Diagnostics.StackTrace tests with NAOT#103151
Merged
MichalStrehovsky merged 3 commits intodotnet:mainfrom Jun 10, 2024
Merged
Run System.Diagnostics.StackTrace tests with NAOT#103151MichalStrehovsky merged 3 commits intodotnet:mainfrom
MichalStrehovsky merged 3 commits intodotnet:mainfrom
Conversation
Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.
Member
Author
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
MichalStrehovsky
commented
Jun 7, 2024
src/libraries/System.Diagnostics.StackTrace/tests/StackFrameTests.cs
Outdated
Show resolved
Hide resolved
This was referenced Jun 7, 2024
jkotas
reviewed
Jun 7, 2024
| 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); |
Member
There was a problem hiding this comment.
Instead of this, would it be better for RhGetCurrentThreadStackTrace to take an integer with how many frames to skip?
Member
Author
There was a problem hiding this comment.
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.
Member
Author
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jkotas
approved these changes
Jun 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also fixes some corner case issues, like whether an empty stacktrace should stringify into a newline.
Cc @dotnet/ilc-contrib