-
Bug
-
Resolution: Fixed
-
P3
-
8u281, 11, 17
-
b12
-
aarch64
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8263498 | 13.0.7 | Sergey Nazarkin | P3 | Resolved | Fixed | b04 |
JDK-8263240 | 11.0.12-oracle | Dukebot | P3 | Resolved | Fixed | b01 |
JDK-8263052 | 11.0.12 | Nick Gasson | P3 | Resolved | Fixed | b01 |
JDK-8263053 | openjdk8u302 | Fei Yang | P3 | Resolved | Fixed | b01 |
StubAssembler::call_RT() has some code to shuffle arguments using the stack as temporary storage:
// if there is any conflict use the stack
if (arg1 == c_rarg2 || arg1 == c_rarg3 ||
arg2 == c_rarg1 || arg2 == c_rarg3 ||
arg3 == c_rarg1 || arg3 == c_rarg2) {
stp(arg3, arg2, Address(pre(sp, 2 * wordSize)));
stp(arg1, zr, Address(pre(sp, -2 * wordSize)));
ldp(c_rarg1, zr, Address(post(sp, 2 * wordSize)));
ldp(c_rarg3, c_rarg2, Address(post(sp, 2 * wordSize)));
Unfortunately there's a typo: the first pre(sp, 2 * wordSize) should be pre(sp, -2 * wordSize) otherwise the pushes and pops are unbalanced.
I think this was exposed byJDK-8259619 which fixed the conflict check but AFAIK it only causes a problem on the Valhalla lworld branch and is not used otherwise.
// if there is any conflict use the stack
if (arg1 == c_rarg2 || arg1 == c_rarg3 ||
arg2 == c_rarg1 || arg2 == c_rarg3 ||
arg3 == c_rarg1 || arg3 == c_rarg2) {
stp(arg3, arg2, Address(pre(sp, 2 * wordSize)));
stp(arg1, zr, Address(pre(sp, -2 * wordSize)));
ldp(c_rarg1, zr, Address(post(sp, 2 * wordSize)));
ldp(c_rarg3, c_rarg2, Address(post(sp, 2 * wordSize)));
Unfortunately there's a typo: the first pre(sp, 2 * wordSize) should be pre(sp, -2 * wordSize) otherwise the pushes and pops are unbalanced.
I think this was exposed by
- backported by
-
JDK-8263052 AArch64: C1 StubAssembler::call_RT can corrupt stack
-
- Resolved
-
-
JDK-8263053 AArch64: C1 StubAssembler::call_RT can corrupt stack
-
- Resolved
-
-
JDK-8263240 AArch64: C1 StubAssembler::call_RT can corrupt stack
-
- Resolved
-
-
JDK-8263498 AArch64: C1 StubAssembler::call_RT can corrupt stack
-
- Resolved
-
- links to
-
Commit openjdk/jdk13u-dev/5de1b465
-
Commit openjdk/jdk/be67aaab
-
Review openjdk/jdk13u-dev/145
-
Review openjdk/jdk/2787
(3 links to)