RFR 8224631 [lworld] C1 asserts - Could not resolve circular dependency

Tobias Hartmann tobias.hartmann at oracle.com
Mon May 27 09:36:20 UTC 2019


Hi Ioi,

this looks good to me.

Thanks,
Tobias

On 23.05.19 07:13, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8224631
> http://cr.openjdk.java.net/~iklam/valhalla/8224631-c1-assert-shuffle-value-args.v01/
> 
> The verified entry point of a C1-compiled method packs scalarized fields into buffered value
> objects. The assert happens when the fields of a value argument (rp4 in the following example) span
> across a reserved entry in the stack:
> 
>  test63(RefPoint_Access rpa, RefPoint rp1, RefPoint rp2, Number n1, RefPoint rp3, RefPoint rp4,
> Number n2) {}
> 
> (The only "Q" type is RefPoint)
> 
> [Verified Entry Point]
>   rsi:rsi   = (this)
>   rdx:rdx   = L RefPoint_Access rpa
>   rcx:rcx   = Q RefPoint rp1.x
>   r8:r8     = Q RefPoint rp1.y
>   r9:r9     = Q RefPoint rp2.x
>   rdi:rdi   = Q RefPoint rp2.x
>   [sp+0x50] = L Number n1
>   [sp+0x58] = [RESERVED]
>   [sp+0x60] = Q RefPoint rp3.x
>   [sp+0x68] = Q RefPoint rp3.y
>   [sp+0x70] = Q RefPoint rp4.x <<
>   [sp+0x78] = [RESERVED] <<<<<<<<<<<<<
>   [sp+0x80] = Q RefPoint rp4.y <<
>   [sp+0x88] = L Number n1
> 
> C1 does not use the RESREVED entries. The fix is to properly mark [sp+0x78] as writable, before we
> start shuffling. This is done in the new mark_reserved_entries_writable() method.
> 
> I also refactored the initialization of reg_state[] into a separate method, to make the code more
> manageable.
> 
> Thanks
> - Ioi
> 



More information about the valhalla-dev mailing list