public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* 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
* gcj onLinux, 32 and 64 bit executables.
@ 2011-09-14  3:41 Me Myself and I
  2011-11-13 16:35 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Me Myself and I @ 2011-09-14  3:41 UTC (permalink / raw)
  To: gcc-help, java


If I successfully compile a Test.java program with gcj Test.java --main=Test -o Test.bin
on 64 bit linux, I then have a 64 bit Linux exectuable.

If I do similar on 32 bit Linux, I have a 32 bit Linux exectable.

If I am running 64 bit Linux, is there a way to use gcj on this to get a 32 bit Linux bin,
what should I do for this, where should I look, and can anyone give me any simple,
practical instructions on how to set it up? 		 	   		  

^ 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).