JDK-8334545 : runtime/ClassInitErrors/TestStackOverflowDuringInit.java fails after JDK-8294960
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2024-06-19
  • Updated: 2024-06-24
Related Reports
Relates :  
Description
runtime/ClassInitErrors/TestStackOverflowDuringInit.java seems to be very fragile and it fails after JDK-8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles

It fails with:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class java.lang.Long$LongCache and/or Caused by: java.lang.StackOverflowError missing from stacktrace
	at TestStackOverflowDuringInit.verify_stack(TestStackOverflowDuringInit.java:91)
	at TestStackOverflowDuringInit.main(TestStackOverflowDuringInit.java:78)

However the log contains:
java.lang.StackOverflowError
	at java.base/java.lang.Number.<init>(Number.java:59)
	at java.base/java.lang.Long.<init>(Long.java:1136)
	at java.base/java.lang.Long.valueOf(Long.java:1023)
	at TestStackOverflowDuringInit.recurse(TestStackOverflowDuringInit.java:58)
	at TestStackOverflowDuringInit.recurse(TestStackOverflowDuringInit.java:59)
	at TestStackOverflowDuringInit.recurse(TestStackOverflowDuringInit.java:59)

Comments
Thanks [~syan]. I was trying to find failures for this in our CI, not realizing it had been ProblemListed before it would start failing.
24-06-2024

The testcase runtime/ClassInitErrors/TestStackOverflowDuringInit.java has been exclude by https://github.com/openjdk/jdk/pull/17108/files#diff-5dd1b912c2b1268bbd9aba3669bdda0abd4bcdcad523470959238b02bb1bcfd7
24-06-2024