JDK-8256290 : javac/lambda/T8031967.java fails with StackOverflowError on x86_32
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11,15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-11-12
  • Updated: 2021-02-23
  • Resolved: 2020-11-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.11Fixed 16 b25Fixed
Related Reports
Relates :  
Description
Observe:

$ CONF=linux-x86_64-server-fastdebug make images run-test TEST=tools/javac/lambda/T8031967.java 

STDOUT:
STDERR:
/Test.java:3: error: cannot find symbol
        GroupLayout l = new GroupLayout();
        ^
  symbol:   class GroupLayout
  location: class Test
/Test.java:3: error: cannot find symbol
        GroupLayout l = new GroupLayout();
                            ^
  symbol:   class GroupLayout
  location: class Test
java.lang.IllegalStateException: java.lang.StackOverflowError
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:383)
	at T8031967.runTestCase(T8031967.java:108)
	at T8031967.run(T8031967.java:55)
	at T8031967.main(T8031967.java:49)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.StackOverflowError
	at jdk.compiler/com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:2651)
	at jdk.compiler/com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:4020)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2407)

x86_32 defaults to 320K stack size, x86_64 (and pretty much every other platform) defaults to 1M stack size. Setting -Xss1M explicitly makes the test pass.
Comments
Fix Request (11u) This improves test reliability. Patch applies cleanly to 11u. I could not get current x86_32 11u to fail with this test, but I suspect some future tuneup/backport could make the SOE appear here. Affected test still passes on Linux x86_64 and Linux x86_32.
04-02-2021

Changeset: 05b82456 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2020-11-13 07:40:19 +0000 URL: https://github.com/openjdk/jdk/commit/05b82456
13-11-2020