Hello again, I seem to have stumbled across a bug in
progs/japhar/japhar.c in the function main near line 240
(code from the current CVS). At any rate, the call to
JNI_CreateJavaVM below seems to be failing (I do not know
why just yet) and JNI_CreateJavaVM is returning -1 as an
error value. The problems seems to be that the return value
of JNI_CreateJavaVM is not getting checked for this -1
return value and create_java_command_line gets called with
an invalid env pointer which crashes the process inside
create_java_command_line. Shouldnt the return value be
caught here? If it should what is the proper error function
to call at this point?


  /*
  ** load and initialize a JavaVM, return a JNI interface pointer in
  ** env.
  */
  JNI_CreateJavaVM(&jvm, &env, &vm_args);

  create_java_command_line(argc, argv, env, jvm);
  if ((*env)->ExceptionOccurred(env))
    handleException(env, jvm);


Mo DeJong
dejong at cs.umn.edu

Reply via email to