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
When investigating https://github.com/dotnet/coreclr/issues/10265 I noticed that GCHeap::StressHeap does not acquire the alloc lock when allocating strings. When not using per-thread allocation contexts (e.g. Windows x86/x64 single proc scenarios), this is not safe. Another thread can be allocating through the normal allocation path while another thread is allocating through GCHeap::StressHeap, resulting in random heap corruption.
The correct fix is to acquire the global allloc lock before calling GCHeap::StressHeap when running without per-thread allocation contexts. I don't believe anyone is currently running GC stress on single-proc machines, so I imagine this is pretty low priority to fix.
The text was updated successfully, but these errors were encountered:
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
When investigating https://github.com/dotnet/coreclr/issues/10265 I noticed that
GCHeap::StressHeap
does not acquire the alloc lock when allocating strings. When not using per-thread allocation contexts (e.g. Windows x86/x64 single proc scenarios), this is not safe. Another thread can be allocating through the normal allocation path while another thread is allocating throughGCHeap::StressHeap
, resulting in random heap corruption.The correct fix is to acquire the global allloc lock before calling
GCHeap::StressHeap
when running without per-thread allocation contexts. I don't believe anyone is currently running GC stress on single-proc machines, so I imagine this is pretty low priority to fix.The text was updated successfully, but these errors were encountered: