Garbage collection segfault in OpenIndiana
"Johann 'Myrkraverk' Oskarsson" <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
With GCC 4.6.2 on OpenIndiana 151a (Solaris) the boehm gc segfaults in
os_dep.c:810 when JNI_CreateJavaVM() is called. The attached
invocation example (as small as I think I can make it) is a complete
example.
Is this the right place to discuss this issue? I thought of merging
boehm gc 7.1 into the gcc source tree, but this seems non-trivial. In
particular it's not possible just to make it a drop-in replacement.
Is there a way to have GCJ use a system supplied boehm gc?
--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/
inv.c
(application/octet-stream, 804 B)
// File: invoke.c
// Compile with:
// gcc -g -m64 -o inv inv.c -L<prefix>/lib/amd64/gcj-4.6.2-12 -ljvm \
// -R<prefix>/lib/amd64/gcj-4.6.2-12 \
// -R<prefix>/lib/gcc/i386-pc-solaris2.11/4.6.2/amd64
// The -g -m64 is optional, of course. The last -R should not be
// neccesary but is on my install.
#include <jni.h>
int main( int argc, char *argv[] )
{
JNIEnv *env;
JavaVM *jvm;
jint res;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
options[0].optionString =
"-Djava.class.path=.";
vm_args.version = 0x00010002;
vm_args.options = options;
vm_args.nOptions = 1;
vm_args.ignoreUnrecognized = JNI_TRUE;
// This segfaults in the Boehm GC, in
// boehm-gc/os_dep.c:810
res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
return 0;
}
/* End of file: invoke.c */