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

1.2.2_15 broke VM invocation through JNI

XMLWordPrintable

    • sparc
    • solaris_8

      As of Java 2 RE 1.2.2_15, it is no longer possible to create a JVM from a
      standalone program via JNI along the lines in the JNI spec - the only program
      not affected by this is probably the java launcher itself!

      The call to JNI_GetDefaultJavaVMInitArgs() will result in a null pointer
      dereference, segmentation violation, SIGSEGV and core dump even before
      JNI_CreateJavaVM() is called. (And the java launcher is immune to it only
      and precisely because it doesn't call JNI_GetDefaultJavaVMInitArgs().)

      In particular, this affects SUNWj2rt VERSION=1.2.2,REV=2003.12.09.20.42
      (1.2.2_17b) which ships on the Solaris 8 2/04 media.

      The quickest way to reproduce the issue is to install vanilla Sol8 2/04,
      invoke /usr/dt/bin/netscape a.k.a. /usr/dt/appconfig/netscape/netscape,
      and point it at file:/usr/dt/appconfig/netscape/j2pi/ControlPanel.html
      (which tries to launch the Plugin (SUNWj2pi) Control Panel as an applet).
      You'll get a subprocess diagnostics popup "Pugin: Java VM process has died."

      Run the same under
      truss -adeflo /tmp/truss.out -vall -u libjvm::\* ...
      to see where it happens.

      (To get a core, you'll need to add -S11 to the truss options and take a
      gcore when truss abandons the dying process; then use prun to let it die.)

      I don't expect many people will care, but there's still at least one customer
      using 3rd party applets which won't run on anything newer than Java 2 RE 1.2.2
      and cannot upgrade on short notice, so I just wanted to have this on record -
      maybe it'll save somebody else a little time one day...

      ###@###.### 2005-2-08 20:14:10 GMT

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: