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

Calling GetThreadLocalStorage during JVMPI_EVENT_JVM_SHUT_DOWN crashes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 2.0
    • vm-legacy
    • beta
    • sparc
    • solaris_8
    • Not verified



        Name: cl74495 Date: 08/16/2000


        Using:

        java -version
        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-b25)
        Java HotSpot(TM) Client VM (build 1.3.0-b25, mixed mode)

        OS is actually Solaris Sparc 2.8, but the bug submission drop-down
        does not include an entry for that.

        Calling the JVMPI function GetThreadLocalStorage during notification
        of the JVMPI_EVENT_JVM_SHUT_DOWN event causes the following crash:

        #
        # HotSpot Virtual Machine Error, Unexpected Signal 11
        # Please report this error at
        # http://java.sun.com/cgi-bin/bugreport.cgi
        #
        # Error happened during: post JVMPI VM death event
        #
        # Error ID: 4F533F534F4C415249530E435050079A 01
        #
        # Problematic Thread: prio=5 tid=0x91f48 nid=0x4 runnable
        #
        Abort(coredump)

        Use the simple JVMPI client below and run with:
        java -Xrunbug foo

        #include <jvmpi.h>

        #define JVMPI(m) (jvmpi->m)

        static JVMPI_Interface *jvmpi;
        static void notify(JVMPI_Event *);

        extern "C" JNIEXPORT jint JNICALL
        JVM_OnLoad(JavaVM *jvm, char *options, void *reserved)
        {
                int res = jvm->GetEnv((void **)&jvmpi, JVMPI_VERSION_1);

                if (res < 0) {
                        return JNI_ERR;
                }

                jvmpi->NotifyEvent = notify;

                JVMPI(EnableEvent)(JVMPI_EVENT_JVM_SHUT_DOWN, NULL);

                return JNI_OK;
        }

        void
        notify(JVMPI_Event * event)
        {
                void * tls = JVMPI(GetThreadLocalStorage)(event->env_id);
        }
        (Review ID: 108441)
        ======================================================================

              duke J. Duke
              clucasius Carlos Lucasius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: