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

aarch32: rthread corrupted in method handle dispatch

XMLWordPrintable

    • aarch32
    • linux

      MethodHandle uses r8 (rthread) as temporary register and not restores
      it after. This is the reason jtreg
      java/lang/invoke/PrivateInvokeTest.java failed in release mode with
      such message:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x75568878, pid=471, tid=1675060320
      #
      # JRE version: OpenJDK Runtime Environment (8.0_60-b99) (build 1.8.0_60
      -internal-b99)
      # Java VM: OpenJDK Client VM (25.60-b23 mixed mode linux-aarch32 )
      # Problematic frame:
      # V [libjvm.so+0x129878] GrowableArray<Metadata*>::append(Metadata*
      const&)+0x8
      #

      I suggest just to not use rthread as temporary. Registers r5-r7 seems
      to be fine as temporary registers, as they holds cached values in
      interpreter mode and will be restored on enter to interpreter; and they
      are callee-saved and can't hold arguments in compiled/native calling
      conventions (however, r4 used in critical native code, so r5 is first).

      Thanks,
      Anton

            enevill Ed Nevill
            enevill Ed Nevill
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: