* Garbage collection segfault in OpenIndiana
@ 2011-11-12 20:38 Johann 'Myrkraverk' Oskarsson
0 siblings, 0 replies; 2+ messages in thread
From: Johann 'Myrkraverk' Oskarsson @ 2011-11-12 20:38 UTC (permalink / raw)
To: GCC Java
[-- Attachment #1: Type: text/plain, Size: 749 bytes --]
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/
[-- Attachment #2: Invocation example --]
[-- Type: text/plain, Size: 804 bytes --]
// 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Garbage collection segfault in OpenIndiana
2011-11-13 16:35 ` Andrew Haley
@ 2011-11-13 23:25 ` Johann 'Myrkraverk' Oskarsson
0 siblings, 0 replies; 2+ messages in thread
From: Johann 'Myrkraverk' Oskarsson @ 2011-11-13 23:25 UTC (permalink / raw)
To: GCC Java; +Cc: gc
Andrew Haley <aph@redhat.com> writes:
> On 11/12/2011 08:38 PM, Johann 'Myrkraverk' Oskarsson wrote:
>> With GCC 4.6.2 on OpenIndiana 151a (Solaris) the boehm gc segfaults
>> in os_dep.c:810 when JNI_CreateJavaVM() is called.
>
>> 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.
>
> Do you have any reason to suspect that merging gc 7.1 might help?
No concrete evidence. In the past I was unable to use 6.x on it while
7.x worked in my own projects. In 7.1 and 7.2alpha6 this function is
now called GC_find_limit_with_bound() instead of just GC_find_limit().
The relevant line number in 7.2alpha6 is os_dep.c:994.
I suppose the best way to be sure is to compare the output of gcc -E
for os_dep.c.
If you have any further ideas I can explore, please let me know.
--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-13 23:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-12 20:38 Garbage collection segfault in OpenIndiana Johann 'Myrkraverk' Oskarsson
-- strict thread matches above, loose matches on Subject: below --
2011-09-14 3:41 gcj onLinux, 32 and 64 bit executables Me Myself and I
2011-11-13 16:35 ` Andrew Haley
2011-11-13 23:25 ` Garbage collection segfault in OpenIndiana Johann 'Myrkraverk' Oskarsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).