Re: [rvm-research] Initialization of reference fields in Poisoned collector

Robin Garner <[email protected]> Sat, 22 Apr 2017 10:23:46 +1000
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
Nice catch.

The patch looks good to me.  The only thing missing is a Harness 
implementation of the initializeObjectReferenceFields method.

cheers,

Robin


On 09/04/17 22:19, Erik Brangs wrote:
> Hi,
>
> it seems to me that the Poisoned collector doesn't initialize null fields properly. When initializing the memory for an object, all the memory is initialized to 0. That's incorrect for Poisoned because that collector poisons all references. So a null reference in an object actually has the (poisoned) value of 1. This leads to problems for compare-and-swap operations: a compare-and-swap operation will compare the correctly poisoned value of null (i.e. 1) with the non-poisoned value in the initialized object field (i.e. 0).
>
> I've attached a patch that seems to fix this. It makes the recently added TestSynchronization pass on BaseBasePoisoned.
>
> I'd appreciate any reviews of the patch.
>
>
> Kind regards,
>
> Erik Brangs
>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot