The various classes in the java.lang.constant package have cyclic dependencies. This can lead to deadlocks when multiple threads initialize classes from these packages concurrently.
The attached reproducer class deadlocks very reliably for me.
The cycle is between ConstantDescs.<clinit> and DynamicConstantDesc.<clinit>
The attached reproducer class deadlocks very reliably for me.
The cycle is between ConstantDescs.<clinit> and DynamicConstantDesc.<clinit>