Bug 21365 – TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-05T16:33:15Z
Last change time
2020-11-13T02:54:09Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2020-11-05T16:33:15Z
If the type might contain pointers perform the swap in pointer-sized chunks in case a garbage collection pass occurs partway through the function. Directly affected TypeInfo subclasses that were not overriding swap:
- TypeInfo_AssociativeArray
- TypeInfo_Class
- TypeInfo_Delegate
- TypeInfo_Interface
- TypeInfo_Struct
Comment #1 by dlang-bot — 2020-11-05T16:39:17Z
@n8sh created dlang/druntime pull request #3264 "TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass" fixing this issue:
- Fix Issue 21365 - TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass
If the type might contain pointers perform the swap in pointer-sized
chunks in case a garbage collection pass occurs partway through the
function. Directly affected TypeInfo subclasses that were not
overriding swap:
- TypeInfo_AssociativeArray
- TypeInfo_Class
- TypeInfo_Delegate
- TypeInfo_Interface
- TypeInfo_Struct
https://github.com/dlang/druntime/pull/3264
Comment #2 by dlang-bot — 2020-11-05T23:09:38Z
dlang/druntime pull request #3264 "TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass" was merged into stable:
- 2c169c833cd2fe49f23b025032ff21bc6e8113e5 by Nathan Sashihara:
Fix Issue 21365 - TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass
If the type might contain pointers perform the swap in pointer-sized
chunks in case a garbage collection pass interrupts the function.
Directly affected TypeInfo subclasses that were not overriding swap:
- TypeInfo_AssociativeArray
- TypeInfo_Class
- TypeInfo_Delegate
- TypeInfo_Interface
- TypeInfo_Struct
https://github.com/dlang/druntime/pull/3264
Comment #3 by dlang-bot — 2020-11-13T02:54:09Z
dlang/druntime pull request #3269 "merge stable" was merged into master:
- e1b53449a9e44a3b63d61da172c37c2fd4aff1bb by Nathan Sashihara:
Fix Issue 21365 - TypeInfo.swap must not allow reachable memory to be freed if interrupted by a garbage collection pass
If the type might contain pointers perform the swap in pointer-sized
chunks in case a garbage collection pass interrupts the function.
Directly affected TypeInfo subclasses that were not overriding swap:
- TypeInfo_AssociativeArray
- TypeInfo_Class
- TypeInfo_Delegate
- TypeInfo_Interface
- TypeInfo_Struct
https://github.com/dlang/druntime/pull/3269