From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22740 invoked by alias); 13 Aug 2004 17:17:15 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 22693 invoked by uid 48); 13 Aug 2004 17:17:14 -0000 Date: Fri, 13 Aug 2004 17:17:00 -0000 From: "greenrd at greenrd dot org" To: java-prs@gcc.gnu.org Message-ID: <20040813171711.17020.greenrd@greenrd.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/17020] New: gij should ignore all reserved method flags X-Bugzilla-Reason: CC X-SW-Source: 2004-q3/txt/msg00238.txt.bz2 List-Id: 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