public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/33765]  New: [4.3 regression] gcj internal compiler error when reading an empty file
@ 2007-10-13 19:45 bero at arklinux dot org
  2007-10-22  8:40 ` [Bug java/33765] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: bero at arklinux dot org @ 2007-10-13 19:45 UTC (permalink / raw)
  To: java-prs

Feeding gcj an empty input file results in

[bero@localhost ~]$ rm -f crap.java ; touch crap.java ; gcj crap.java
/tmp/cck13U8f.jar:0: internal compiler error: in java_parse_file, at
java/jcf-parse.c:1951
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: [4.3 regression] gcj internal compiler error when
                    reading an empty file
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bero at arklinux dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
@ 2007-10-22  8:40 ` pinskia at gcc dot gnu dot org
  2007-10-28 15:47 ` jakub at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-22  8:40 UTC (permalink / raw)
  To: java-prs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.3.0


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
  2007-10-22  8:40 ` [Bug java/33765] " pinskia at gcc dot gnu dot org
@ 2007-10-28 15:47 ` jakub at gcc dot gnu dot org
  2007-10-30 14:28 ` jakub at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-28 15:47 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from jakub at gcc dot gnu dot org  2007-10-28 15:47 -------
Created an attachment (id=14427)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14427&action=view)
gcc43-pr33765.patch

In this case (and e.g. also in case where you gcj -c package-info.java
from #297961) ecj1 creates an empty zip file, which contains just the
end central signature and nothing else (so doesn't have the usual
PK\3\4 magic, but PK\5\6).  The attached patch will handle it the same
as file with PK\3\4 magic, but it will still issue an error because the
expected
file wasn't found in the (empty) jar file.  Not sure what exact behavior we
want,
if giving an error is fine or if we e.g. should silently compile it into an
empty
.s file.


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
  2007-10-22  8:40 ` [Bug java/33765] " pinskia at gcc dot gnu dot org
  2007-10-28 15:47 ` jakub at gcc dot gnu dot org
@ 2007-10-30 14:28 ` jakub at gcc dot gnu dot org
  2007-10-31 18:26 ` tromey at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-30 14:28 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from jakub at gcc dot gnu dot org  2007-10-30 14:28 -------
I have tried what icedtea javac does on such *.java files and it apparently
exits with 0 exit status, but doesn't create any *.class file.  So I guess
silently creating empty *.s (i.e. just ignore not being able to find the
expected class in the *.jar file created by ecj1) would match it best.


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (2 preceding siblings ...)
  2007-10-30 14:28 ` jakub at gcc dot gnu dot org
@ 2007-10-31 18:26 ` tromey at gcc dot gnu dot org
  2007-10-31 18:36 ` bero at arklinux dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-10-31 18:26 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from tromey at gcc dot gnu dot org  2007-10-31 18:26 -------
Confirmed.

I would not mind giving an error for this.  We don't necessarily have
to be compatible with javac here.

I wonder, though, whether this is used in a configure script or something
like this.  How did the reporter happen across this case?


-- 

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-10-31 18:26:32
               date|                            |


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (3 preceding siblings ...)
  2007-10-31 18:26 ` tromey at gcc dot gnu dot org
@ 2007-10-31 18:36 ` bero at arklinux dot org
  2007-10-31 23:42 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bero at arklinux dot org @ 2007-10-31 18:36 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from bero at arklinux dot org  2007-10-31 18:36 -------
Unfortunately I don't remember what I was trying to compile, but I was trying
to compile some open source code I had downloaded. It was running javac on a
huge list of files, one of which was empty (probably to be implemented later).

So apparently some broken code using this javac "feature" exists.


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (4 preceding siblings ...)
  2007-10-31 18:36 ` bero at arklinux dot org
@ 2007-10-31 23:42 ` jakub at gcc dot gnu dot org
  2007-11-01 19:24 ` tromey at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-31 23:42 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from jakub at gcc dot gnu dot org  2007-10-31 23:42 -------
Well, package-info.java files containing just package something; line
and comments are quite common, and for them ecj1 creates an empty jar file.
If the whole package is compiled at once, then there will be a bigger jar file
and so this ICE or error won't trigger, but just letting gcj compile each
*.java
file into *.o individually in a makefile (using ecj1 internally) wouldn't work
in such cases.


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (5 preceding siblings ...)
  2007-10-31 23:42 ` jakub at gcc dot gnu dot org
@ 2007-11-01 19:24 ` tromey at gcc dot gnu dot org
  2007-11-02  8:02 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-01 19:24 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from tromey at gcc dot gnu dot org  2007-11-01 19:24 -------
Created an attachment (id=14456)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14456&action=view)
patch to make it do nothing

This patch changes gcj to do nothing in this case.
It works fine on the test case.
Jakub, what do you think of this?


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (6 preceding siblings ...)
  2007-11-01 19:24 ` tromey at gcc dot gnu dot org
@ 2007-11-02  8:02 ` jakub at gcc dot gnu dot org
  2007-11-02 10:06 ` aph at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-02  8:02 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from jakub at gcc dot gnu dot org  2007-11-02 08:02 -------
Looks good to me.  Andrew?


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (7 preceding siblings ...)
  2007-11-02  8:02 ` jakub at gcc dot gnu dot org
@ 2007-11-02 10:06 ` aph at gcc dot gnu dot org
  2007-11-02 16:11 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aph at gcc dot gnu dot org @ 2007-11-02 10:06 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from aph at gcc dot gnu dot org  2007-11-02 10:06 -------
I think it's brilliant!  I never expected such an elegant solution.


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (8 preceding siblings ...)
  2007-11-02 10:06 ` aph at gcc dot gnu dot org
@ 2007-11-02 16:11 ` tromey at gcc dot gnu dot org
  2007-11-02 20:02 ` tromey at gcc dot gnu dot org
  2007-11-02 20:08 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-02 16:11 UTC (permalink / raw)
  To: java-prs



------- Comment #9 from tromey at gcc dot gnu dot org  2007-11-02 16:11 -------
Testing my patch.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-10-31 18:26:32         |2007-11-02 16:11:58
               date|                            |


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (9 preceding siblings ...)
  2007-11-02 16:11 ` tromey at gcc dot gnu dot org
@ 2007-11-02 20:02 ` tromey at gcc dot gnu dot org
  2007-11-02 20:08 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-02 20:02 UTC (permalink / raw)
  To: java-prs



------- Comment #10 from tromey at gcc dot gnu dot org  2007-11-02 20:02 -------
Subject: Bug 33765

Author: tromey
Date: Fri Nov  2 20:02:35 2007
New Revision: 129860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129860
Log:
        PR java/33765:
        * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
        * zipfile.h (ZIPEMPTYMAGIC): New define.

Modified:
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/jcf-parse.c
    trunk/gcc/java/zipfile.h


-- 


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


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

* [Bug java/33765] [4.3 regression] gcj internal compiler error when reading an empty file
  2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
                   ` (10 preceding siblings ...)
  2007-11-02 20:02 ` tromey at gcc dot gnu dot org
@ 2007-11-02 20:08 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-02 20:08 UTC (permalink / raw)
  To: java-prs



------- Comment #11 from jakub at gcc dot gnu dot org  2007-11-02 20:08 -------
Fixed, thanks.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-11-02 20:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-13 19:45 [Bug java/33765] New: [4.3 regression] gcj internal compiler error when reading an empty file bero at arklinux dot org
2007-10-22  8:40 ` [Bug java/33765] " pinskia at gcc dot gnu dot org
2007-10-28 15:47 ` jakub at gcc dot gnu dot org
2007-10-30 14:28 ` jakub at gcc dot gnu dot org
2007-10-31 18:26 ` tromey at gcc dot gnu dot org
2007-10-31 18:36 ` bero at arklinux dot org
2007-10-31 23:42 ` jakub at gcc dot gnu dot org
2007-11-01 19:24 ` tromey at gcc dot gnu dot org
2007-11-02  8:02 ` jakub at gcc dot gnu dot org
2007-11-02 10:06 ` aph at gcc dot gnu dot org
2007-11-02 16:11 ` tromey at gcc dot gnu dot org
2007-11-02 20:02 ` tromey at gcc dot gnu dot org
2007-11-02 20:08 ` jakub 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).