-
Bug
-
Resolution: Fixed
-
P4
-
20, 21, 22, 23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8331456 | 22.0.2 | Bernhard Urban-Forster | P4 | Resolved | Fixed | b05 |
JDK-8331313 | 21.0.5-oracle | Bernhard Urban-Forster | P4 | Resolved | Fixed | b01 |
JDK-8331455 | 21.0.4 | Bernhard Urban-Forster | P4 | Resolved | Fixed | b01 |
This can lead to undefined behavior. I found it to cause crashes in the Sulong LLVM toolchain inside Apple's `ld`.
Attached patch fixes it (or rather, gets me onto the next linker crash...)
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -392,13 +392,13 @@ static bool offset_for(uint32_t insn1, uint32_t insn2, ptrdiff_t &byte_offset) {
return false;
}
-class Decoder : public RelocActions {
- virtual reloc_insn adrpMem() { return &Decoder::adrpMem_impl; }
- virtual reloc_insn adrpAdd() { return &Decoder::adrpAdd_impl; }
- virtual reloc_insn adrpMovk() { return &Decoder::adrpMovk_impl; }
+class Aarch64Decoder : public RelocActions {
+ virtual reloc_insn adrpMem() { return &Aarch64Decoder::adrpMem_impl; }
+ virtual reloc_insn adrpAdd() { return &Aarch64Decoder::adrpAdd_impl; }
+ virtual reloc_insn adrpMovk() { return &Aarch64Decoder::adrpMovk_impl; }
public:
- Decoder(address insn_addr, uint32_t insn) : RelocActions(insn_addr, insn) {}
+ Aarch64Decoder(address insn_addr, uint32_t insn) : RelocActions(insn_addr, insn) {}
virtual int loadStore(address insn_addr, address &target) {
intptr_t offset = Instruction_aarch64::sextract(_insn, 23, 5);
@@ -494,7 +494,7 @@ class Decoder : public RelocActions {
};
address MacroAssembler::target_addr_for_insn(address insn_addr, uint32_t insn) {
- Decoder decoder(insn_addr, insn);
+ Aarch64Decoder decoder(insn_addr, insn);
address target;
decoder.run(insn_addr, target);
return target;
- backported by
-
JDK-8331313 ODR violation in macroAssembler_aarch64.cpp
- Resolved
-
JDK-8331455 ODR violation in macroAssembler_aarch64.cpp
- Resolved
-
JDK-8331456 ODR violation in macroAssembler_aarch64.cpp
- Resolved
- relates to
-
JDK-8289743 AArch64: Clean up patching logic
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/3ab3f52b
-
Commit openjdk/jdk22u/72d3f61b
-
Commit openjdk/jdk/b972997a
-
Review openjdk/jdk21u-dev/534
-
Review openjdk/jdk21u/446
-
Review openjdk/jdk22u/169
-
Review openjdk/jdk/18056