public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/17020] New: gij should ignore all reserved method flags
@ 2004-08-13 17:17 greenrd at greenrd dot org
2004-08-13 17:28 ` [Bug libgcj/17020] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: greenrd at greenrd dot org @ 2004-08-13 17:17 UTC (permalink / raw)
To: java-prs
The JVM spec says, in section 4.6 relating to method access flags:
"All bits of the access_flags item not assigned in Table 4.5 are reserved for
future use. They should be set to zero in generated class files and should be
ignored by Java virtual machine implementations." [0]
However, gij does not follow this spec. It contains this code in
libjava/defineclass.cc :
1253 if (method->accflags & (Modifier::VOLATILE
1254 | Modifier::TRANSIENT
1255 | Modifier::INTERFACE))
1256 throw_class_format_error ("erroneous method access flags");
This becomes a problem when a method using covariant return types is compiled by
JDK 1.5 beta, passed through Retroweaver[1] to make it "Java
1.4-bytecode-compatible", and then run by gij - because Retroweaver
sometimes/always leaves the undocumented 0x40 flag set for covariant bridge
methods. (0x40 is interpreted by gcj as VOLATILE, but 0x40 is not in Table 4.5
in the spec, so it should not be rejected by gij.)
Although probably Retroweaver shouldn't do that (and I'll file a bug against
Retroweaver about that), gij should still accept it when it does.
[0] http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#1513
[1] http://retroweaver.sourceforge.net/
--
Summary: gij should ignore all reserved method flags
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: greenrd at greenrd dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17020
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/17020] gij should ignore all reserved method flags
2004-08-13 17:17 [Bug libgcj/17020] New: gij should ignore all reserved method flags greenrd at greenrd dot org
@ 2004-08-13 17:28 ` pinskia at gcc dot gnu dot org
2004-08-13 18:26 ` cvs-commit at gcc dot gnu dot org
2004-08-13 18:26 ` mckinlay at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-13 17:28 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-13 17:28 -------
Even the first edition of the book says the same thing:
http://java.sun.com/docs/books/vmspec/html//ClassFile.doc.html#1513
"They should be set to zero in generated class files and should be ignored by Java Virtual Machine
implementations."
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-13 17:28:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17020
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/17020] gij should ignore all reserved method flags
2004-08-13 17:17 [Bug libgcj/17020] New: gij should ignore all reserved method flags greenrd at greenrd dot org
2004-08-13 17:28 ` [Bug libgcj/17020] " pinskia at gcc dot gnu dot org
@ 2004-08-13 18:26 ` cvs-commit at gcc dot gnu dot org
2004-08-13 18:26 ` mckinlay at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-13 18:26 UTC (permalink / raw)
To: java-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-13 18:26 -------
Subject: Bug 17020
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: bryce@gcc.gnu.org 2004-08-13 18:26:01
Modified files:
libjava : ChangeLog defineclass.cc
Log message:
PR libgcj/17020
Reported by Robin Green.
* defineclass.cc (handleField): Don't throw exception on
unrecognised modifier. Add FIXME comments for spec compliance.
(handleMethod): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.2999&r2=1.3000
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/defineclass.cc.diff?cvsroot=gcc&r1=1.39&r2=1.40
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17020
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/17020] gij should ignore all reserved method flags
2004-08-13 17:17 [Bug libgcj/17020] New: gij should ignore all reserved method flags greenrd at greenrd dot org
2004-08-13 17:28 ` [Bug libgcj/17020] " pinskia at gcc dot gnu dot org
2004-08-13 18:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-13 18:26 ` mckinlay at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: mckinlay at redhat dot com @ 2004-08-13 18:26 UTC (permalink / raw)
To: java-prs
------- Additional Comments From mckinlay at redhat dot com 2004-08-13 18:26 -------
Fixed checked in.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17020
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-13 18:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-13 17:17 [Bug libgcj/17020] New: gij should ignore all reserved method flags greenrd at greenrd dot org
2004-08-13 17:28 ` [Bug libgcj/17020] " pinskia at gcc dot gnu dot org
2004-08-13 18:26 ` cvs-commit at gcc dot gnu dot org
2004-08-13 18:26 ` mckinlay at redhat dot com
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).