EconomicMapImpl.setKey ArrayIndexOutOfBoundsException

Tim Harris timothy.l.harris at oracle.com
Mon Jun 5 15:36:00 UTC 2017


Hi,

 

I am occasionally getting an ArrayIndexOutOfBoundsException during start-up of a multi-threaded program (below).

 

I suspect this is a data race with the entries array being expanded in one thread concurrent with the access from the static constructor in another thread.

 

If that is correct then does EconomicMapImpl need synchronization here, or should the change be somewhere else?

 

--Tim

 

 

 

 

Java HotSpot(TM) 64-Bit Server VM (build 25.71-b01-internal-jvmci-0.26, mixed mode)

 

Caused by: java.lang.ArrayIndexOutOfBoundsException: 62

        at org.graalvm.util.impl.EconomicMapImpl.setKey(EconomicMapImpl.java:781)

        at org.graalvm.util.impl.EconomicMapImpl.put(EconomicMapImpl.java:432)

        at org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.put(InvocationPlugins.java:634)

        at org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.register(InvocationPlugins.java:913)

        at org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration.registerMethodSubstitution(InvocationPlugins.java:378)

        at org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration.registerMethodSubstitution(InvocationPlugins.java:361)

        at com.oracle.rts.WorkRequestSubstitutions.<clinit>(WorkRequestSubstitutions.java:148)

 


More information about the graal-dev mailing list