transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclea...
authormonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 3 Jan 2022 21:54:19 +0000 (16:54 -0500)
committerGitHub <noreply@github.com>
Mon, 3 Jan 2022 21:54:19 +0000 (16:54 -0500)
commita2b288d7da6a36164e5e556cd736ca50e0a9bc02
treee4f1d044301766d85e746059fc94af85fdf3c508
parent0ef205d30e893ff3af0dce4933606871cfdd994c
transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclean (#63293)

Fixes mono/mono#21369
Related to https://github.com/xamarin/xamarin-android/issues/6546

job_major_mod_union_preclean can race with the tarjan bridge
implementation that changes the vtable pointer by settings the three
lower bits. this results in invalid loading of the vtable
(shifted by 7 bytes)  which in turn give a wrong desc to the scan
functions

This change is released under the MIT license.

Co-authored-by: tmijieux <tmijieux@users.noreply.github.com>
src/mono/mono/sgen/sgen-cardtable.c
src/mono/mono/sgen/sgen-marksweep.c