RFR: 8292647: javac/lambda/T8031967.java fails with StackOverflowError when use -XX:TieredStopAtLevel=3 on aarch64 and LoongArch [v3]
SUN Guoyun
duke at openjdk.org
Fri Feb 10 09:52:52 UTC 2023
On Wed, 8 Feb 2023 09:21:30 GMT, SUN Guoyun <duke at openjdk.org> wrote:
>> make images run-test TEST=tools/javac/lambda/T8031967.java will fails with StackOverflowError when I use args JTREG="VM_OPTIONS=-XX:TieredStopAtLevel=3" on aarch64 and LoongArch. So the stack size `-Xss10m` needs to be increased to improve the robustness of the testcase.
>
> SUN Guoyun has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'openjdk:master' into 8292647
> - 8292647: javac/lambda/T8031967.java fails with StackOverflowError when use -XX:TieredStopAtLevel=3 on aarch64 and LoongArch
> - 8292647: javac/lambda/T8031967.java fails with StackOverflowError when use -XX:TieredStopAtLevel=3 on aarch64 and LoongArch
Sorry, I can't confirm which version reproduces the issue on aarch64. But the conclusion that aarch64 requires more stack space than x86_64 holds. i.e. `java.lang.Object::<init>` has a 0x30 stack size on x86_64 platforms, but 0x40 stack size on aarch64.
For x86_64
<pre><code class="shell">
----------------------------------- Assembly -----------------------------------
Compiled method (c1) 70 1 3 java.lang.Object::<init> (1 bytes)
...
[Verified Entry Point]
0x00007fb8191cc740: mov %eax,-0x18000(%rsp)
0x00007fb8191cc747: push %rbp
0x00007fb8191cc748: sub $0x30,%rsp // stack size is 0x30
</code></pre>
For aarch64
<pre><code class="shell">
----------------------------------- Assembly -----------------------------------
Compiled method (c1) 64 1 3 java.lang.Object::<init> (1 bytes)
...
[Verified Entry Point]
0x0000ffff9c22b980: nop
0x0000ffff9c22b984: sub x9, sp, #0x19, lsl #12
0x0000ffff9c22b988: str xzr, [x9]
0x0000ffff9c22b98c: sub sp, sp, #0x40 //stack size is 0x40, larger than x86_64
0x0000ffff9c22b990: stp x29, x30, [sp, #48]
</code></pre>
-------------
PR: https://git.openjdk.org/jdk/pull/9934
More information about the compiler-dev
mailing list