public inbox for
 help / color / mirror / Atom feed
From: "Johann 'Myrkraverk' Oskarsson" <>
To: GCC Java <>
Subject: Garbage collection segfault in OpenIndiana
Date: Sat, 12 Nov 2011 20:38:00 -0000	[thread overview]
Message-ID: <> (raw)

[-- 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

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          |[]
   PostgreSQL Development, 24x7 Support, Training and Services  --+--

[-- 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 =
  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 */

             reply	other threads:[~2011-11-12 20:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12 20:38 Johann 'Myrkraverk' Oskarsson [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).