public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/18430] New: VerifyError, incompatible type on stack
@ 2004-11-11 16:32 brian_252 at yahoo dot com
  2004-11-11 16:34 ` [Bug libgcj/18430] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: brian_252 at yahoo dot com @ 2004-11-11 16:32 UTC (permalink / raw)
  To: java-prs

I'm trying to compile Ant and i ran into and error.  I simplified the code as 
much as possible while still producing the error.  It doesn't matter if you 
use gcj or Sun's javac (1.3.1) to compile.  And Sun's java will run the code 
without problem. 
 
Here's the code: 
interface fnm 
 { 
 int getInt(); 
 } 
 
class im1  
implements fnm 
 { 
 public int getInt() { return 1; } 
 } 
 
class im2 
implements fnm 
 { 
 public int getInt() { return 2; } 
 } 
 
public class test 
 { 
 public static void main( String[] Args ) 
  { 
  test T = new test(); 
  T.exec(); 
  } 
 
 public void exec() 
  { 
  fnm myMapper = new im1(); 
  if (Math.random() == 1.0d) 
   { 
   myMapper = new im2(); 
   } 
  System.out.println( myMapper.getClass().getName() ); // im1 
 // System.out.println( myMapper.getInt() ); // works 
 // this.select( myMapper );   // fails 
  } 
 
 public void select( fnm Mapper ) 
  { 
  System.out.println( Mapper.getInt() ); 
  } 
 } 
 
 
Here's the stack trace: 
Exception in thread "main" java.lang.VerifyError: verification failed at PC 26 
in test:exec(()V): incompatible type on stack 
   at _Jv_BytecodeVerifier.verify_fail(byte, int) (/usr/lib/libgcj.so.4.0.0) 
   at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.4.0.0) 
   at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.4.0.0) 
   at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.4.0.0) 
   at java.lang.ClassLoader.linkClass0(java.lang.Class) 
(/usr/lib/libgcj.so.4.0.0) 
   at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
(/usr/lib/libgcj.so.4.0.0) 
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0) 
   at java.lang.Class.forName(java.lang.String, boolean, 
java.lang.ClassLoader) (/usr/lib/libgcj.so.4.0.0) 
   at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.4.0.0) 
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.4.0.0) 
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.4.0.0) 
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) 
(/usr/lib/libgcj.so.4.0.0) 
   at __libc_start_main (/lib/libc-2.3.2.so)

-- 
           Summary: VerifyError, incompatible type on stack
           Product: gcc
           Version: 3.3.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: brian_252 at yahoo dot com
                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=18430


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/18430] VerifyError, incompatible type on stack
  2004-11-11 16:32 [Bug java/18430] New: VerifyError, incompatible type on stack brian_252 at yahoo dot com
@ 2004-11-11 16:34 ` pinskia at gcc dot gnu dot org
  2004-11-11 16:36 ` brian_252 at yahoo dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-11 16:34 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|java                        |libgcj


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18430


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/18430] VerifyError, incompatible type on stack
  2004-11-11 16:32 [Bug java/18430] New: VerifyError, incompatible type on stack brian_252 at yahoo dot com
  2004-11-11 16:34 ` [Bug libgcj/18430] " pinskia at gcc dot gnu dot org
@ 2004-11-11 16:36 ` brian_252 at yahoo dot com
  2004-11-11 16:37 ` brian_252 at yahoo dot com
  2004-11-11 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: brian_252 at yahoo dot com @ 2004-11-11 16:36 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From brian_252 at yahoo dot com  2004-11-11 16:36 -------
Here's someone reporting the error in practice:  
http://lists.debian.org/debian-user-french/2003/09/msg01033.html 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18430


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/18430] VerifyError, incompatible type on stack
  2004-11-11 16:32 [Bug java/18430] New: VerifyError, incompatible type on stack brian_252 at yahoo dot com
  2004-11-11 16:34 ` [Bug libgcj/18430] " pinskia at gcc dot gnu dot org
  2004-11-11 16:36 ` brian_252 at yahoo dot com
@ 2004-11-11 16:37 ` brian_252 at yahoo dot com
  2004-11-11 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: brian_252 at yahoo dot com @ 2004-11-11 16:37 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From brian_252 at yahoo dot com  2004-11-11 16:37 -------
One workaround that i've tested is to change the interface into an abstract 
class and change its descendents to extend it. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18430


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/18430] VerifyError, incompatible type on stack
  2004-11-11 16:32 [Bug java/18430] New: VerifyError, incompatible type on stack brian_252 at yahoo dot com
                   ` (2 preceding siblings ...)
  2004-11-11 16:37 ` brian_252 at yahoo dot com
@ 2004-11-11 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-11 16:40 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-11 16:40 -------
A duplicate of PR 13439, fixed already in 3.4.0.

*** This bug has been marked as a duplicate of 13439 ***

*** This bug has been marked as a duplicate of 13439 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18430


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-11 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-11 16:32 [Bug java/18430] New: VerifyError, incompatible type on stack brian_252 at yahoo dot com
2004-11-11 16:34 ` [Bug libgcj/18430] " pinskia at gcc dot gnu dot org
2004-11-11 16:36 ` brian_252 at yahoo dot com
2004-11-11 16:37 ` brian_252 at yahoo dot com
2004-11-11 16:40 ` pinskia at gcc dot gnu dot org

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).