diff options
author | Tom Tromey <tromey@redhat.com> | 2007-11-02 20:02:35 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-11-02 20:02:35 +0000 |
commit | 7c4b32bcdc8455d77f73eb56e8fec9ca74fe6be2 (patch) | |
tree | 90163de1e6b727cfe012f66de458f03150d43180 | |
parent | ea094d1f239ecc2e057ccff9829dbee7c26f142f (diff) | |
download | gcc-7c4b32bcdc8455d77f73eb56e8fec9ca74fe6be2.zip gcc-7c4b32bcdc8455d77f73eb56e8fec9ca74fe6be2.tar.gz gcc-7c4b32bcdc8455d77f73eb56e8fec9ca74fe6be2.tar.bz2 |
re PR java/33765 (gcj internal compiler error when reading an empty file)
PR java/33765:
* jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
* zipfile.h (ZIPEMPTYMAGIC): New define.
From-SVN: r129860
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 4 | ||||
-rw-r--r-- | gcc/java/zipfile.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 587178d..194edc5 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2007-11-02 Tom Tromey <tromey@redhat.com> + + PR java/33765: + * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files. + * zipfile.h (ZIPEMPTYMAGIC): New define. + 2007-11-01 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index a544163..ab2a385 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1946,6 +1946,10 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) #endif parse_zip_file_entries (); } + else if (magic == (JCF_u4) ZIPEMPTYMAGIC) + { + /* Ignore an empty input jar. */ + } else { gcc_unreachable (); diff --git a/gcc/java/zipfile.h b/gcc/java/zipfile.h index 39e3a5f..d78226a 100644 --- a/gcc/java/zipfile.h +++ b/gcc/java/zipfile.h @@ -58,6 +58,7 @@ extern struct ZipFile *SeenZipFiles; #define ZIPDIR_NEXT(ZIPD) \ ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size)) #define ZIPMAGIC 0x504b0304 +#define ZIPEMPTYMAGIC 0x504b0506 extern ZipFile * opendir_in_zip (const char *, int); extern int read_zip_archive (ZipFile *); |