JVM crash by creating VarHandle

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Sat Feb 1 23:09:07 UTC 2020


On 01/02/2020 23:01, Ty Young wrote:
>
> On 2/1/20 4:49 PM, Maurizio Cimadamore wrote:
>>
>> On 01/02/2020 12:31, Ty Young wrote:
>>> MemoryHandles.varHandle(long.class, ByteOrder.nativeOrder()); 
>> Hi Ty,
>> thanks for reaching out - I assume you are on the foreign-jextract 
>> branch?
>
>
> Yep. The build is right after the name() method was added to SystemABI.
>
>
>> And also, is the above snippet enough to reproduce the crash for you? 
>> Or does it only happen sometimes, but not others?
>
>
> It seems to only happen when accessing the struct field from a struct 
> that resides in memory. Never outside of an array.
>
>
> Here is a Github Gist, if it helps any: 
> https://gist.github.com/BlueGoliath/307f60856afee04e218b759420a53fb7

The stack trace you showed seems to point at a constructor somewhere:

  org.goliath.crosspoint.fields.NumberField.<init>

so, the crash  seems to happen outside of memory access - e.g. it 
happens on actual var handle creation. So I assume that the thing which 
actually fails is this?

https://github.com/BlueGoliath/Crosspoint/blob/master/src/main/java/org/goliath/crosspoint/fields/NumberField.java#L29

Is there a repeatable way to call the NumberField constructor which will 
lead to the crash?

Maurizio

>
>
>
>>
>> Thanks
>> Maurizio
>>


More information about the panama-dev mailing list