This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from CyberShadow/master
Forbid interacting with the GC while a collection is in progress, to avoid memory corruption (issue 5653)
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0a18e49
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.
Could this please be something but an OutOfMemory exception. Clearly if interacting with the GC in finalizers in disallowed this is
a programming error and rather calls for a hlt instruction or should at least carry a specific message.
0a18e49
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.
What should probably happen is for allocations during the finalization phase of a collection to simply get more memory from the OS if there isn't enough available--ie. pretend that GC.disable() is set.