Signal handling: JNI_FastGetField stub search may be invoked too eagerly

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: hotspot

      Seen while working on signal handling:

      I see these in the various Posix signal handlers in os_xxx_yyy:

      ```
          // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
          // and the heap gets shrunk before the field access.
          if ((sig == SIGSEGV) || (sig == SIGBUS)) {
            address addr_slow = JNI_FastGetField::find_slowcase_pc(pc);
            if (addr_slow != (address)-1) {
              stub = addr_slow;
            }
          }
      ```

      I think this gets executed unnecessarily often. If I understand the comment correctly, it should only be executed if
      - A return stub has not yet been determined at this point
      - The faulting address is in heap range

            Assignee:
            Thomas Stuefe
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: