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

minor buglet in computation of end of pc descs in libjvm_db.c

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc
    • Resolved In Build:
      b33
    • CPU:
      generic
    • OS:
      solaris

      Backports

        Description

        I have a utility built on libjvm_db.c that uses it to walk the entire code cache and while updating it for 1.8 I discovered a bug in libjvm_db.c itself though I suspect it won't trigger in normal usage through pstack. The scopes_pcs_end value is incorrectly computed so if you scanned all the PcDescs you'd walk into the dependencies section. The fix is pretty trivial.

        diff -r 073676d6d428 src/os/solaris/dtrace/libjvm_db.c
        --- a/src/os/solaris/dtrace/libjvm_db.c
        +++ b/src/os/solaris/dtrace/libjvm_db.c
        @@ -592,7 +592,7 @@
           /* scopes_pcs */
           err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32);
           CHECK_FAIL(err);
        - err = ps_pread(J->P, nm + OFFSET_nmethod_handler_table_offset, &N->scopes_pcs_end, SZ32);
        + err = ps_pread(J->P, nm + OFFSET_nmethod_dependencies_offset, &N->scopes_pcs_end, SZ32);
           CHECK_FAIL(err);
         
           /* scopes_data */

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dsamersoff Dmitriy Samersoff
                Reporter:
                never Tom Rodriguez
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: