You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: (bug) Native-int-typed stack address is CSE'd across an await and reused after resumption #133588
Requires <Features>runtime-async=on</Features> in the project file.
Expected
start
result = 2
Actual
start
result = 1
The second Sink call writes through the address computed before the suspension, so the increment
lands in the abandoned frame instead of buf.E1. The Unsafe.As<Buf, int> is what makes the
address native-int-typed rather than byref: writing Unsafe.Add(ref buf.E0, index) instead keeps it
byref-typed and prints the correct result = 2. Setting DOTNET_JitNoCSE=1 also restores result = 2.
Platform
Windows x64, .NET 11 (dotnet/runtime main @ a0b86b1), DOTNET_TieredCompilation=0, runtime async
enabled. No special CPU features. Output above is from the Release build and is stable across runs;
on the Checked build the same program instead dies with an access violation after printing start
(exit code -1073741819).
Activity
dotnet-policy-service commentedon Sep 10, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
EgorBo commentedon Sep 18, 2026
Affected SDK versions:
JIT: Do not reuse local addresses across suspension points in async m…
JIT: Do not reuse local addresses across suspension points in async m…