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

frame::oops_interpreted_do does not adjust bcp in a native frame

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.0.1
    • hotspot
    • beta2
    • generic
    • generic



      Name: clC74495 Date: 02/03/2000


      In the course of running tests on a DEBUG build using the
      Hotspot 1.0.1 VM sources, I found that some assertions
      were getting triggered because the bcp in a native frame
      was invalid. I forget exactly which assertions.

      The following change to frame::oops_interpreted_do in frame.cpp
      turned out to solve the problem. I am now merging
      my changes to 1.0.1 into the Hotspot Solaris 2.0 beta C sources,
      and noticed that this problem might still exist in the 2.0 sources.

      The line numbers below are relative to the Solaris 2.0 beta C sources.

      581c582,598
      < f((oop*)interpreter_frame_method_addr());
      ---
      > if (m->is_native()) {
      > // Gemstone fix, adjust bcp in a native frame if the method moved , while
      > // we are in safepoint at return from a native method .
      > oop oldMethod = *interpreter_frame_method_addr();
      > f((oop*)interpreter_frame_method_addr());
      > oop newMethod = *interpreter_frame_method_addr();
      > if (oldMethod != newMethod) {
      > int delta = (char*)newMethod - (char*)oldMethod;
      > jint oldBcp = *interpreter_frame_bcx_addr();
      > if (oldBcp != 0) {
      > jint *bcpPtr = interpreter_frame_bcx_addr();
      > *bcpPtr = oldBcp + delta ;
      > }
      > }
      > } else {
      > f((oop*)interpreter_frame_method_addr());
      > }
      (Review ID: 100661)
      ======================================================================

            sgoldman Steve Goldman (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: