[Bug 154] New: abort is not called when JVM cores

[email protected] Sat, 20 Aug 2005 07:44:54 -0400
Newsgroups gmane.comp.java.vm.sablevm.bugs
Message-ID <[email protected]>
http://sablevm.org/bugs/show_bug.cgi?id=154

           Summary: abort is not called when JVM cores
           Product: SableVM
           Version: 1.11[.x]
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: default
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]


When using before calling JNI_CreateJavaVM():
+++
    opt[x].optionString=strdup("abort");
    opt[x].extraInfo=java_abort123;
    arg.options=opt;
+++
When the JVM cores it should call java_abort123().
I have used the following patch to fix the problem:
+++
jfclere@jfcexpert:~/tmp/old/sablevm-sdk-1.12> diff -u
sablevm/src/libsablevm/error.c ../../sablevm-sdk-1.12/sablevm/src/libsablevm/error.c
--- sablevm/src/libsablevm/error.c      2005-07-05 03:10:32.000000000 +0200
+++ ../../sablevm-sdk-1.12/sablevm/src/libsablevm/error.c       2005-08-20
13:02:30.000000000 +0200
@@ -167,6 +167,9 @@
            _svmf_printf (env, stderr,
                          "** Segfault in native code on thread %d.  Java stack
trace done.\n",
                          env->thread.id);
+            /* Call abort when required */
+            if (env->vm->abort != abort)
+               env->vm->abort();
            /* We force a "real" segfault to get core dump and ease debugging. */
            *cause_segfault = 0xdeadbeef;
            _svmm_fatal_error
+++



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.