Permalink
Browse files

Subtract sizeof LOSObject instead of LOSObject*

On 64-bit mono with marksweep-conc enabled, sgen_los_pin_object()
would mistakenly set the cardtable_mod_union pointer field to 1
due to the incorrect pointer math in sgen_los_header_for_object()
  • Loading branch information...
awinters-fvs committed Mar 2, 2013
1 parent c8b1c2b commit d83533bc7892c99ac6f513e56b6c8a75036a5cc8
Showing with 1 addition and 1 deletion.
  1. +1 −1 mono/metadata/sgen-los.c
View
@@ -579,7 +579,7 @@ sgen_los_object_size (LOSObject *obj)
LOSObject*
sgen_los_header_for_object (char *data)
{
- return (LOSObject*)(data - (sizeof (LOSObject*) + sizeof (mword)));
+ return (LOSObject*)(data - sizeof (LOSObject));
}
void

0 comments on commit d83533b

Please sign in to comment.