Uh oh!
There was an error while loading. Please reload this page.
Remove undefined-behavior UnsafeTests.DangerousAs to stabilize jitstress leg - #129793
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
UnsafeTests.DangerousAs to stabilize jitstress legThere was a problem hiding this comment.
Pull request overview
This PR removes a unit test that exercises Unsafe.As<string>(object) on an incompatible runtime type, which can produce runtime/JIT-dependent behavior and intermittently fail under stress configurations (e.g., ARM jitstress). The remaining As() test still validates the supported/meaningful usage (object containing a string cast to string).
Changes:
- Deleted
UnsafeTests.DangerousAs(invalid cast scenario) fromUnsafeTests.cs. - Left the existing
As()test intact.
MichalPetryka
commented
Jun 26, 2026
Do the other invalid usages in runtime like |
jkotas
commented
Jun 26, 2026
These internal runtime uses in CoreLib are in patterns that do not cause problems in the JIT currently. If they start causing problems, they will have to be fixed. |
Uh oh!
There was an error while loading. Please reload this page.
…tress leg (#129793) This change addresses an intermittent failure in `System.Runtime.CompilerServices.UnsafeTests.DangerousAs` on jitstress ARM runs. The test asserted behavior from an invalid cast path (`Unsafe.As<string>(object)`) where the result is undefined. Fixes#129678 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
This change addresses an intermittent failure in
System.Runtime.CompilerServices.UnsafeTests.DangerousAson jitstress ARM runs. The test asserted behavior from an invalid cast path (Unsafe.As<string>(object)) where the result is undefined.Fixes#129678