Commit 7c4b32bc by Tom Tromey Committed by Tom Tromey

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
parent ea094d1f
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> 2007-11-01 Tom Tromey <tromey@redhat.com>
* Make-lang.in (java/jcf-dump.o): Depend on zipfile.h. * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
......
...@@ -1946,6 +1946,10 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) ...@@ -1946,6 +1946,10 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
#endif #endif
parse_zip_file_entries (); parse_zip_file_entries ();
} }
else if (magic == (JCF_u4) ZIPEMPTYMAGIC)
{
/* Ignore an empty input jar. */
}
else else
{ {
gcc_unreachable (); gcc_unreachable ();
......
...@@ -58,6 +58,7 @@ extern struct ZipFile *SeenZipFiles; ...@@ -58,6 +58,7 @@ extern struct ZipFile *SeenZipFiles;
#define ZIPDIR_NEXT(ZIPD) \ #define ZIPDIR_NEXT(ZIPD) \
((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size)) ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
#define ZIPMAGIC 0x504b0304 #define ZIPMAGIC 0x504b0304
#define ZIPEMPTYMAGIC 0x504b0506
extern ZipFile * opendir_in_zip (const char *, int); extern ZipFile * opendir_in_zip (const char *, int);
extern int read_zip_archive (ZipFile *); extern int read_zip_archive (ZipFile *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment