sendaoYan / riscv-port-jdk8u-ysd

https://openjdk.org/projects/riscv-port
GNU General Public License v2.0
0 stars 0 forks source link

java launch crash: j java.lang.String.equals(Ljava/lang/Object;)Z+8 at instanceof bytecode #258

Open sendaoYan opened 1 month ago

sendaoYan commented 1 month ago
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003f8903a8e4, pid=275198, tid=0x0000003f9efff180
#
# JRE version:  (8.0_412) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.412-b00-debug interpreted mode linux-riscv64 compressed oops)
# Problematic frame:
# j  java.lang.String.equals(Ljava/lang/Object;)Z+8
#
# Core dump written. Default location: /home/yansendao/software/jdk/jdk8u-riscv64/0930/1500/core or core.275198
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp

core.275198.tar.gz.zip hs_err_pid275198.log jdk8u-riscv.log

sendaoYan commented 1 month ago

make-gcc9-cross-riscv64-slowdebug.log make-gcc9-cross-riscv64-release.log make-gcc9-cross-riscv64-fastdebug.log

> git diff
diff --git a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
index ebc486df14..3aac5ec1d5 100644
--- a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
+++ b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
@@ -4012,6 +4012,7 @@ void TemplateTable::instanceof() {
   __ bind(quicked);
   __ load_klass(x13, x10);
   // __ load_resolved_klass_at_offset(x12, x9, x10, t0);
+  __ shadd(x10, x10, x12, x19, 3);
   __ ld(x10, Address(x10, sizeof(ConstantPool)));  //TODO-RISCV64 revert by JDK-8171392, imitated from LIR_Assembler::type_profile_helper in c1_LIRAssembler_aarch64.cpp, needed to be check.

   __ bind(resolved);
sendaoYan commented 1 month ago
> git diff
diff --git a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
index ebc486df14..fa082db198 100644
--- a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
+++ b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
@@ -4012,6 +4012,7 @@ void TemplateTable::instanceof() {
   __ bind(quicked);
   __ load_klass(x13, x10);
   // __ load_resolved_klass_at_offset(x12, x9, x10, t0);
+  __ shadd(x10, x10, x12, x9, 3);
   __ ld(x10, Address(x10, sizeof(ConstantPool)));  //TODO-RISCV64 revert by JDK-8171392, imitated from LIR_Assembler::type_profile_helper in c1_LIRAssembler_aarch64.cpp, needed to be check.

   __ bind(resolved);

make-gcc9-cross-riscv64-slowdebug.log make-gcc9-cross-riscv64-release.log make-gcc9-cross-riscv64-fastdebug.log

sendaoYan commented 1 month ago
> git diff
diff --git a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
index ebc486df14..fa4509620e 100644
--- a/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
+++ b/hotspot/src/cpu/riscv/vm/templateTable_riscv.cpp
@@ -4012,6 +4012,7 @@ void TemplateTable::instanceof() {
   __ bind(quicked);
   __ load_klass(x13, x10);
   // __ load_resolved_klass_at_offset(x12, x9, x10, t0);
+  __ shadd(x10, x9, x12, t0, 3);
   __ ld(x10, Address(x10, sizeof(ConstantPool)));  //TODO-RISCV64 revert by JDK-8171392, imitated from LIR_Assembler::type_profile_helper in c1_LIRAssembler_aarch64.cpp, needed to be check.

   __ bind(resolved);

make-gcc9-cross-riscv64-fastdebug.log make-gcc9-cross-riscv64-release.log make-gcc9-cross-riscv64-slowdebug.log

sendaoYan commented 1 month ago

jdk8u-riscv-1.log 258.zip jdk8u-riscv-3.log jdk8u-riscv.log

sendaoYan commented 1 month ago

To github.com:sendaoYan/riscv-port-jdk8u-ysd.git e2045725d0..1b69cfa67f minus-jbs8276799 -> minus-jbs8276799

sendaoYan commented 1 month ago

hs_err_pid764398.log jdk8u-riscv64.log