public inbox for java-prs@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: java-prs

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

* [Bug libgcj/31700] [JNI] -X options not recognised by JNI_CreateJavaVM
  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 ` tromey at gcc dot gnu dot org
  2007-04-26 22:13 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-04-25 17:38 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from tromey at gcc dot gnu dot org  2007-04-25 18:38 -------
Yeah, this logic looks bogus.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-25 18:38:21
               date|                            |


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


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

* [Bug libgcj/31700] [JNI] -X options not recognised by JNI_CreateJavaVM
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-04-26 22:13 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from tromey at gcc dot gnu dot org  2007-04-26 23:13 -------
Created an attachment (id=13452)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13452&action=view)
proposed patch

Could you try this patch?
If it works for you I will check it in.
Thanks.


-- 


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


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

* [Bug libgcj/31700] [JNI] -X options not recognised by JNI_CreateJavaVM
  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 11:07 ` debian-gcc at lists dot debian dot org
  2008-01-23 17:59 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: marcus at better dot se @ 2007-05-14 14:24 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from marcus at better dot se  2007-05-14 15:24 -------
Subject: Re:  [JNI] -X options not recognised by JNI_CreateJavaVM

> Could you try this patch?

I'm trying, but my brand new Thinkpad insists on rebooting every time I build 
gcc. Will have to investigate...

Marcus


-- 


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


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

* [Bug libgcj/31700] [JNI] -X options not recognised by JNI_CreateJavaVM
  2007-04-25 12:58 [Bug libgcj/31700] New: [JNI] -X options not recognised by JNI_CreateJavaVM marcus at better dot se
                   ` (2 preceding siblings ...)
  2007-05-14 14:24 ` marcus at better dot se
@ 2008-01-23 11:07 ` debian-gcc at lists dot debian dot org
  2008-01-23 17:59 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2008-01-23 11:07 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from debian-gcc at lists dot debian dot org  2008-01-23 11:07 -------
this patch is applied on the current trunk; the bug should be closed.

  Matthias


-- 

debian-gcc at lists dot debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug libgcj/31700] [JNI] -X options not recognised by JNI_CreateJavaVM
  2007-04-25 12:58 [Bug libgcj/31700] New: [JNI] -X options not recognised by JNI_CreateJavaVM marcus at better dot se
                   ` (3 preceding siblings ...)
  2008-01-23 11:07 ` debian-gcc at lists dot debian dot org
@ 2008-01-23 17:59 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-01-23 17:59 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from tromey at gcc dot gnu dot org  2008-01-23 17:59 -------
Fix checked in a while ago.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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 17:59 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 11:07 ` debian-gcc at lists dot debian dot org
2008-01-23 17:59 ` 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).