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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: hotspot
    • svc
    • b33
    • generic
    • solaris

        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 */

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

                Created:
                Updated:
                Resolved: