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
[NET 11.0.0] Large P/Invoke string marshaling StackOverflowException still present (fix not in GA) #137601
#132243 reported a .NET 11 regression: P/Invoke DllImport string marshaling of large payloads (~5.5 MB) throws StackOverflowException under Release/FullOpts (works on .NET 10; works with larger thread stack / Debug / min-opts).
That issue was closed by #132536 (merged to main 2026-08-21). That PR was milestoned for 12.0-preview1 and does not appear to have been backported to release/11.0.
We are still reproducing the failure on .NET 11.0.0 GA (SDK 11.0.100).
Please consider backporting #132536 to release/11.0 for inclusion in the next .NET 11 servicing update.
Reproduction Steps
Same as #132243 (and the attached reproducer there). Minimal form:
Root cause (per #132243 / #132536): JIT if-conversion speculated a guarded localloc past the 261-byte stack/heap check in the interop string marshalling stub. Fix marks GT_LCLHEAP with GTF_CALL | GTF_GLOB_REF.
Activity
dotnet-policy-service commentedon Nov 15, 2026
Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Nov 16, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
JonPawley-Trimble commentedon Nov 25, 2026
Does the adding of this to the 12.0.0 milestone indicate that this will not be back-ported to .NET 11?
AaronRobinsonMSFT commentedon Nov 26, 2026
@jakobbotsch @EgorBo I've created a backport to .NET 11, #138323. Let me know if you'd like to move it forward or you can take it over.