Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
8, 11, 17, 19, 20
-
b22
-
aarch64
-
generic
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8296664 | 17.0.7-oracle | Fairoz Matte | P3 | Resolved | Fixed | b01 |
JDK-8299469 | 17.0.7 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
Description
In aarch64_enc_fast_unlock() (aarch64.ad) we have this piece of code:
__ ldr(tmp, Address(oop, oopDesc::mark_offset_in_bytes()));
__ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);
The tbnz uses the wrong register - it should really use tmp. disp_hdr has been loaded with the displaced header of the stack-lock, which would never have its monitor bits set, thus the branch will always take the slow path. In the case of !UseHeavyMonitors it is even worse, then disp_hdr will be unitialized.
__ ldr(tmp, Address(oop, oopDesc::mark_offset_in_bytes()));
__ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);
The tbnz uses the wrong register - it should really use tmp. disp_hdr has been loaded with the displaced header of the stack-lock, which would never have its monitor bits set, thus the branch will always take the slow path. In the case of !UseHeavyMonitors it is even worse, then disp_hdr will be unitialized.
Attachments
Issue Links
- backported by
-
JDK-8296664 Use correct register in aarch64_enc_fast_unlock()
- Resolved
-
JDK-8299469 Use correct register in aarch64_enc_fast_unlock()
- Resolved
- relates to
-
JDK-8305006 Use correct register in riscv_enc_fast_unlock()
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/9a2743f6
-
Commit openjdk/jdk/7619602c
-
Review openjdk/jdk17u-dev/1005
-
Review openjdk/jdk/10921
(2 links to)