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

Alignment error and possible read past float storage in stackValueCollection.cpp on sparcv9

XMLWordPrintable

    • b30
    • generic
    • generic

      src/share/vm/runtime/stackValueCollection.cpp

      Has code that looks like:

         86 void StackValueCollection::set_float_at(int slot, jfloat value) {
         87 at(slot)->set_int(*(intptr_t*)(&value));
         88 }

      The &value is a float*, and can be aligned on any 32 bit boundary, it points to a 32bit float.
      Casting to a intptr_t* which is a long* on sparcv9, then dereferencing it means that we run the
      risk of a SIGBUS when compiled with -xmemalign=8s, but more importantly we are accessing
      32bits beyond the end of this float object.

      See suggested fix.
      ###@###.### 2005-03-10 22:45:31 GMT

      This bug affects the following tests:

          com/sun/jdi/FetchLocals.java
          com/sun/jdi/GetSetLocalTest.java
          com/sun/jdi/SparcToSparcv9Test.sh
          nsk/jdwp/StackFrame/SetValues/setvalues001
          nsk/jvmdi/SetLocalVariable/setlocal001
          nsk/jvmti/SetLocalVariable/setlocal001
          nsk/jvmti/scenarios/capability/CM01/cm01t011

      ###@###.### 2005-03-18 18:37:42 GMT

            coleenp Coleen Phillimore
            ohair Kelly Ohair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: