Fix GC for collectible classes (#19892)
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 12 Sep 2018 11:32:31 +0000 (13:32 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Sep 2018 11:32:31 +0000 (13:32 +0200)
commitcd1f0d9ad32cacd9d2ac2998f368bc196c40754a
tree93c8a71403981a35a18d88d006db9efbd2a084ad
parent9d8d00c61a65a413768f47267e119fa2d31beb2e
Fix GC for collectible classes (#19892)

There is a subtle bug in the GC that causes access violation when a
LoaderAllocator of a collectible class is pushed to the mark stack and
that class also has partial sub-objects. One example is an array of byte
arrays. In that case, the mark stack is supposed to have the reference
to the instance of the class stored right before the related partial
sub-objects references. But due to the bug, the slot where the instance
of the class was expected to be located was not set to anything.
src/gc/gc.cpp