-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Check if External Object Context is still active after a possible GC #59285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if External Object Context is still active after a possible GC #59285
Conversation
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1247477775 |
Check if `IsActive()` during consideration too.
Use detach state instead of IsActive state for EOC.
Co-authored-by: Elinor Fung <[email protected]>
Co-authored-by: Elinor Fung <[email protected]>
This change relies on this AllocateObjectArray call not triggering multiple GCs. While I think that such behavior would be unusual, I don't think its a good practice to rely on such a detail. Refers to: src/coreclr/vm/interoplibinterface_comwrappers.cpp:355 in e820da6. [](commit_id = e820da6, deletion_comment = False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The allocation problem here now looks solved.
…59285) * Handle a possible GC after allocating an array by iterating over the hash again. Co-authored-by: Elinor Fung <[email protected]>
/backport to release/6.0-rc2 |
Started backporting to release/6.0-rc2: https://github.com/dotnet/runtime/actions/runs/1259570246 |
Comments in this code detail the logic and reasons for failure.
This should be considered for .NET 6.
Fixes #59072
/cc @davidwrighton @jkoritzinsky @elinor-fung