public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/31700]  New: [JNI] -X options not recognised by JNI_CreateJavaVM
@ 2007-04-25 12:58 marcus at better dot se
  2007-04-25 17:38 ` [Bug libgcj/31700] " tromey at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marcus at better dot se @ 2007-04-25 12:58 UTC (permalink / raw)
  To: gcc-bugs

JNI_CreateJavaVM fails to recognise -X options such as -Xmx and friends. It
says:
  libgcj: unknown option: -Xmx128M

I tracked it to this code in libjava/prims.cc:

      else if (vm_args->ignoreUnrecognized)
        {
          if (option_string[0] == '_')
            parse_x_arg (option_string + 1);
          else if (! strncmp (option_string, "-X", 2))
            parse_x_arg (option_string + 2);
          else
            {
            unknown_option:
              fprintf (stderr, "libgcj: unknown option: %s\n", option_string);
              return -1;
            }
        }
      else
        goto unknown_option;

Notice how the -X options are only accepted if vm_args->ignoreUnrecognized is
true. This is contrary to the specification [1] which seems to say that
supported -X options should be recognized in all cases, whereas unknown -X
options should be ignored iff vm_args->ignoreUnrecognized.

[1] http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html


-- 
           Summary: [JNI] -X options not recognised by JNI_CreateJavaVM
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcus at better dot se
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31700


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-23 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 12:58 [Bug libgcj/31700] New: [JNI] -X options not recognised by JNI_CreateJavaVM marcus at better dot se
2007-04-25 17:38 ` [Bug libgcj/31700] " tromey at gcc dot gnu dot org
2007-04-26 22:13 ` tromey at gcc dot gnu dot org
2007-05-14 14:24 ` marcus at better dot se
2008-01-23 13:10 ` debian-gcc at lists dot debian dot org
2008-01-23 18:32 ` tromey at gcc dot gnu dot org

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