RFR: 8327647: Occasional SIGSEGV in markWord::displaced_mark_helper() for SPECjvm2008 sunflow [v3]

Fei Yang fyang at openjdk.org
Wed Apr 17 23:40:15 UTC 2024


On Wed, 17 Apr 2024 19:17:17 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> A misplaced memory barrier causes a very intermittent crash on on some aarch64 systems. This patch adds an appropriate LoadLoad barrier after a constant pool cache field entry is loaded. Verified with tier 1-5 tests.
>
> Matias Saavedra Silva 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 10 additional commits since the last revision:
> 
>  - Reverted change on arm32
>  - Merge branch 'master' into membar_8327647
>  - Moved membar inside load_field_entry
>  - Corrected comments
>  - Merge branch 'master' into membar_8327647
>  - Removed unneeded push/pop
>  - Merge branch 'master' into membar_8327647
>  - Replace use of r0 with noreg
>  - Added membars after load_field_entry() calls
>  - 8327647: Occasional SIGSEGV in markWord::displaced_mark_helper() for SPECjvm2008 sunflow

The riscv part is still lacking one change:

diff --git a/src/hotspot/cpu/riscv/templateTable_riscv.cpp b/src/hotspot/cpu/riscv/templateTable_riscv.cpp
index 58f57f32b2f..e27b35e793f 100644
--- a/src/hotspot/cpu/riscv/templateTable_riscv.cpp
+++ b/src/hotspot/cpu/riscv/templateTable_riscv.cpp
@@ -2272,7 +2272,9 @@ void TemplateTable::load_resolved_field_entry(Register obj,
   __ load_unsigned_byte(flags, Address(cache, in_bytes(ResolvedFieldEntry::flags_offset())));

   // TOS state
-  __ load_unsigned_byte(tos_state, Address(cache, in_bytes(ResolvedFieldEntry::type_offset())));
+  if (tos_state != noreg) {
+    __ load_unsigned_byte(tos_state, Address(cache, in_bytes(ResolvedFieldEntry::type_offset())));
+  }

   // Klass overwrite register
   if (is_static) {

src/hotspot/cpu/riscv/templateTable_riscv.cpp line 3040:

> 3038:   __ load_field_entry(x12, x11);
> 3039: 
> 3040:   // X11: field offset, X12: TOS, X13: flags

Suggestion: `// X11: field offset, X12: field holder, X13: flags`

-------------

Changes requested by fyang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18477#pullrequestreview-2007541639
PR Review Comment: https://git.openjdk.org/jdk/pull/18477#discussion_r1569670754


More information about the hotspot-compiler-dev mailing list