[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53733] Panic/segfault when calling Java metho

From: Adrian
Subject: [Octave-bug-tracker] [bug #53733] Panic/segfault when calling Java method after forge:im[read|write]
Date: Sun, 29 Apr 2018 01:57:40 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #50, bug #53733 (project octave):

Just to share a 'negative' result, I tried to implement the workaround
mentioned on


(linked to by the openjdk bug referenced by John in comment #12 and comment

Namely to increase the Java stack size by the option "-Xss2m". I have no clue
how the stack guard works and how it affects JVMs, nor how this option would
circumvent the problem, but it seems openjdk does not implement the -Xss
option anyway. Maybe it would be worth trying a JRE that implements it ?

Source code to be compiled with 

g++ -ggdb3 -I/usr/lib/jvm/java-9-openjdk-amd64/include
-I/usr/lib/jvm/java-9-openjdk-amd64/include/linux jni_createVM_test.c
-L/usr/lib/jvm/java-9-openjdk-amd64/lib/server -ljvm -o

#include <jni.h>
#include <stdlib.h>

main (void)
  JavaVMInitArgs vmArgs;
  JavaVMOption* options = new JavaVMOption[1];

  options[0].optionString = "-Xss2m";
  options[1].optionString = "-verbose:jni";

  vmArgs.version = JNI_VERSION_1_8;
  vmArgs.nOptions = 2;
  vmArgs.options = options;
  vmArgs.ignoreUnrecognized = JNI_FALSE;

  JNIEnv *env = NULL;
  JavaVM *jvm = NULL;

  jint ret = JNI_CreateJavaVM (&jvm, (void **) &env, &vmArgs);
  if (ret < 0 || jvm == NULL)
      printf ("failed\n");
      //log(0, "Unable to create a Java Virtual Machine");
      return -1;

  printf ("VM = %p\n", jvm);

  return 0;


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]