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

SIGBUS in Get/SetLocalLong and Get/SetLocalDouble functions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 5.0
    • 5.0
    • hotspot
    • None
    • tiger
    • generic
    • generic
    • Verified

      The problem is that Long and Double types occupate 2 slots on stack frame,
      so the JVMTI has to check boundaries correspondigly.
      Otherwise, Get/SetLocalLong and Get/SetLocalDouble produce SIGBUS, as follows:

      ## An unexpected error has been detected by HotSpot Virtual Machine:
      ##
      ## SIGBUS (0xa) at pc=0xff02f840, pid=24392, tid=2

      This bug is platform-independent. It must be in JVMDI too.
      Please, see also related bug 4300412:
          Synopsis: GetLocal*/SetLocal* functions do not track TYPE_MISMATCH error

      A new JVMTI level testcase nsk/jvmti/GetLocalVariable/getlocal004 is in attachment.
      The test checks if there is a problem when we retrieve Long or Double value by slot number method->max_locals() - 1.
      We expect JVMTI_ERROR_INVALID_SLOT in this case.

      The following is the full tlog file showing a problem:

      ^Css45998@bratsk cat ss45998.Solaris.sparc/getlocal004/getlocal004.tlog
      #!/usr/bin/sh

      LD_LIBRARY_PATH=/export/home/sqe/v15_jvmti_b20030822/vm/bin/lib/sparc/nsk/jvmti/GetLocalVariable:/export/home/sqe/v15_jvmti_b20030822/vm/src/nsk/share/lib/sparc:/net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/jre/lib/sparc/client
      CLASSPATH=/net/tomsk.sfbay/export/home/ss45998/1.5/ti_tests/rerun/c1.Xint.sparc/ss45998.Solaris.sparc/getlocal004:/export/home/sqe/v15_jvmti_b20030822/vm/bin/classes:/export/home/sqe/v15_jvmti_b20030822/vm/bin/classes::/export/home/sqe/v15_jvmti_b20030822/vm/bin/classes:/net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/lib/tools.jar::/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a/javatest.jar:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a/classes:/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/latest/solsparc/classes:/net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/lib/tools.jar:/net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/lib/tools.jar::/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a/javatest.jar:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JDWP_QUICKLOOK/testbase/JCKS/JCK-118a/classes:/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/latest/solsparc/classes
      DISPLAY=bratsk:0.0
      PATH=/net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/bin:/bin:/usr/bin/cut:/usr/bin/echo
      RAS_OPTIONS=
      HOME=/tmp
      SHELL=/usr/bin/sh

      while [ $# -gt 0 ];
      do
        if [ $1 = "-jdk" ]; then
      shift 1
      PATH=${1}/bin:${PATH}
      shift 1
        else
      if [ $1 = "-d" ]; then
      shift 1
      if [ $# -gt 0 ]; then
      DISPLAY=$1
      shift 1
      else
      DISPLAY=:0.0
      fi
      fi
        fi
      done

      export LD_LIBRARY_PATH
      export CLASSPATH
      export DISPLAY
      export PATH
      export RAS_OPTIONS
      export HOME
      export SHELL
      /usr/dist/exe/perl5 /export/home/sqe/v15_jvmti_b20030822/vm/src/nsk/share/jvmti/run_jvmti.pl /net/tomsk.sfbay/export/home/ss45998/1.5/cur_ref/sparc/j2sdk1.5.0/bin/java -client -Xint -DHANGINGJAVA16562 -Xdebug -Xnoagent -agentlib:getlocal004 nsk.jvmti.GetLocalVariable.getlocal004
      ##Exit status of execution step=6
      ##!checkExitCode

      # JAVA: staticMeth: Started 0
      ##
      ## An unexpected error has been detected by HotSpot Virtual Machine:
      ##
      ## SIGBUS (0xa) at pc=0xff02f840, pid=24392, tid=2
      ##
      ## Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b18 interpreted mode)
      ## Problematic frame:
      ## V [libjvm.so+0x42f840]
      ##
      ## An error report file with more information is saved as hs_err_pid24392.log
      ##
      ## If you would like to submit a bug report, please visit:
      ## http://java.sun.com/cgi-bin/bugreport.cgi
      ##
      # GetLocalInt: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 3
      #
      # GetLocalLong: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 3
      #
      # GetLocalDouble: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 3
      #
      # GetLocalInt: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 4
      #
      # GetLocalLong: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 4
      #
      # GetLocalDouble: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 4
      #
      # GetLocalInt: JVMTI_ERROR_NONE (0)
      # success: JVMTI_ERROR_NONE as expected, slot: 5
      #

      ###@###.### 2003-09-11

            sspitsyn Serguei Spitsyn
            sspitsyn Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: