[9] RFR(S): 8155046: Parse::Block construction using undefined behavior
Tobias Hartmann
tobias.hartmann at oracle.com
Tue May 31 06:00:55 UTC 2016
Hi Vladimir,
thanks for the review!
On 30.05.2016 20:01, Vladimir Kozlov wrote:
> I think it was this way to avoid calling MethodLivenessResult constructor for _live_locals which required parameters until very recent change:
>
> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/6784b64bacf0#l15.1
Right, good that this was changed.
> Your changes looks fine.
Thanks,
Tobias
>
> Thanks,
> Vladimir
>
> On 5/30/16 6:55 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8155046
>> http://cr.openjdk.java.net/~thartmann/8155046/webrev.00/
>>
>> Parse::init_blocks() initializes _blocks by allocating a chunk of memory and initializing the elements by treating them as blocks and calling Parse::Block::init_node(). This is undefined behavior because the objects are not created with "new". I replaced init_node() with the constructor and use placement new to create the blocks. I also added missing field initializations to the constructor.
>>
>> Tested with JPRT and RBT (running).
>>
>> Thanks,
>> Tobias
>>
More information about the hotspot-compiler-dev
mailing list