public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "mark at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug java/24938] New: gcj -C miscompiles gnu/CORBA/DynAn/gnuDynValue.java Date: Fri, 18 Nov 2005 23:18:00 -0000 [thread overview] Message-ID: <bug-24938-3639@http.gcc.gnu.org/bugzilla/> (raw) There are two pieces of code in gnuDynValue that generate unverifiable (and wrong!) code. The following method in this file: public int component_count() { return isNull ? 0 : super.component_count(); } Generates the following byte code: Method name:"component_count" public Signature: ()int Attribute "Code", length:38, max_stack:2, max_locals:1, code_length:14 0: aload_0 1: getfield <Field gnu.CORBA.DynAn.gnuDynValue.isNull boolean> 4: ifeq 9 7: iconst_0 8: ireturn 9: aload_0 10: invokespecial <InterfaceMethod org.omg.DynamicAny.DynAny.component_count ()int> 13: ireturn Attribute "LineNumberTable", length:6, count: 1 line: 369 at pc: 0 PC 10 is wrong. And the verifier actually catches that: gnu/CORBA/DynAn/gnuDynValue.java: In class 'gnu.CORBA.DynAn.gnuDynValue': gnu/CORBA/DynAn/gnuDynValue.java: In method 'gnu.CORBA.DynAn.gnuDynValue.component_count()': gnu/CORBA/DynAn/gnuDynValue.java:369: error: verification failed at PC=10: didn't see expected constant Another method in this file that exhibits this is: public boolean equal(DynAny other) { if (other instanceof DynValueOperations) { DynValueCommon o = (DynValueCommon) other; if (isNull) return o.is_null() && o.type().equal(official_type); else return !o.is_null() && super.equal(other); } else return false; } That last super.equal() call generates the same wrong code. This might be an existing bug, but I couldn't quickly find it. I have a workaround for this issue that I want to get in before reducing this. -- Summary: gcj -C miscompiles gnu/CORBA/DynAn/gnuDynValue.java Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mark at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24938
next reply other threads:[~2005-11-18 23:18 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-11-18 23:18 mark at gcc dot gnu dot org [this message] 2005-11-18 23:52 ` [Bug java/24938] " pinskia at gcc dot gnu dot org 2005-11-18 23:52 ` pinskia at gcc dot gnu dot org 2005-11-25 21:16 ` mark at gcc dot gnu dot org 2005-11-25 22:31 ` mark at gcc dot gnu dot org 2005-11-26 0:48 ` mark at gcc dot gnu dot org 2006-12-06 17:39 ` tromey at gcc dot gnu dot org 2006-12-06 19:35 ` tromey at gcc dot gnu dot org 2006-12-07 12:31 ` gary at gcc dot gnu dot org 2007-01-09 20:52 ` tromey at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-24938-3639@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).