[sgen] Fix invalid value passed to write barrier (mono/mono#17236)
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 9 Oct 2019 11:37:41 +0000 (14:37 +0300)
committerGitHub <noreply@github.com>
Wed, 9 Oct 2019 11:37:41 +0000 (14:37 +0300)
commit4e62f07cc8b053d4a2d4abd5aa976bef38b2d144
treebc94f5205fde497ef9ccbc7921b8f5094f7697d9
parent3a4da557e6e6f1cff747b8d74425b2bb4e476504
[sgen] Fix invalid value passed to write barrier (mono/mono#17236)

When doing memory copy dest is the destination address and src is the source address. If we are copying a single reference, we need to emit a write barrier and pass to the write barrier the value, not the pointer where the value is stored.

Commit migrated from https://github.com/mono/mono/commit/8e649c35450e77e68ff468ced77987e4c0b51f99
src/mono/mono/mini/memory-access.c