Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255564

InterpreterMacroAssembler::remove_activation() needs to restore thread right after VM call on x86_32

    XMLWordPrintable

Details

    • b23

    Description

      Currently, it restores thread register a bit too late, that results crashes with Shenandoah GC on x86_32 JVM.

      diff --git a/src/hotspot/cpu/x86/interp_masm_x86.cpp b/src/hotspot/cpu/x86/interp_masm_x86.cpp
      index 9274f298759..9c1376a33c6 100644
      --- a/src/hotspot/cpu/x86/interp_masm_x86.cpp
      +++ b/src/hotspot/cpu/x86/interp_masm_x86.cpp
      @@ -1005,9 +1005,9 @@ void InterpreterMacroAssembler::remove_activation(
         push(state);
         set_last_Java_frame(rthread, noreg, rbp, (address)pc());
         super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
      + NOT_LP64(get_thread(rthread);) // call_VM clobbered it, restore
         reset_last_Java_frame(rthread, true);
         pop(state);
      - NOT_LP64(get_thread(rthread);) // call_VM clobbered it, restore
         bind(fast_path);
       

      Attachments

        Issue Links

          Activity

            People

              zgu Zhengyu Gu
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: