RFR: 8256290: javac/lambda/T8031967.java fails with StackOverflowError on x86_32

Aleksey Shipilev shade at openjdk.java.net
Thu Nov 12 17:49:10 UTC 2020


Observe:

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

STDOUT:
STDERR:

        GroupLayout l = new GroupLayout();
        ^
  symbol: class GroupLayout
  location: class Test

        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.

-------------

Commit messages:
 - 8256290: javac/lambda/T8031967.java fails with StackOverflowError on x86_32

Changes: https://git.openjdk.java.net/jdk/pull/1193/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1193&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256290
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1193.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1193/head:pull/1193

PR: https://git.openjdk.java.net/jdk/pull/1193


More information about the compiler-dev mailing list