public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ivg2@cornell.edu
To: gcc-gnats@gcc.gnu.org
Subject: libgcj/7870: Incorrect constructor invoked in inherited class.
Date: Mon, 09 Sep 2002 12:26:00 -0000	[thread overview]
Message-ID: <20020909191603.20878.qmail@sources.redhat.com> (raw)


>Number:         7870
>Category:       libgcj
>Synopsis:       Incorrect constructor invoked in inherited class.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 09 12:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     ivg2@cornell.edu
>Release:        gij (GNU libgcj) version 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)
>Organization:
>Environment:
Red Hat Rawhide (in sync with server on 9/9/02)
Kernel 2.4.20-pre5 
Athlon XP 1600+ processor
>Description:
Here's the code, compiled correctly, 
works under interpreter: 
gij (GNU libgcj) version 0.0.7
Does not work  under:
gij (GNU libgcj) version 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)

Summarry: It appears that a 0-arg constructor
of base class Frame is called, when a 1-argument
constructor of the derived class SaMSimulatorGUI
is present and should be invoked. 

Java below is a frontend to gij.
gij GUISimulator has precisely the same behavior.

Compiled with: javac.
gcj -C filename has the same effect.
Options: 
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=athlon-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix

============================================
[phantom@cobra bug]$ ls
GUISimulator.java  IDisplay.java  SaM.java  SaMSimulatorGUI.java

[phantom@cobra bug]$ cat IDisplay.java
interface IDisplay { }

[phantom@cobra bug]$ cat SaM.java
public class SaM { }

[phantom@cobra bug]$ cat GUISimulator.java
public class GUISimulator
{ public static void main(String[] args)
  { IDisplay g = new SaMSimulatorGUI(new SaM()); }  }


[phantom@cobra bug]$ cat SaMSimulatorGUI.java
import java.awt.*;

public class SaMSimulatorGUI extends Frame implements IDisplay { public SaMSimulatorGUI (SaM m) { } }
====================================================
[root@cobra bug]# java GUISimulator        
Exception in thread "main" java.lang.NullPointerException
   at 0x40226296: ?? (??:0)
   at 0xbffff1fc: ?? (??:0)
   at 0x4036695a: java.awt.Component.Component() (/usr/lib/libgcj.so.3)
   at 0x4036a94f: java.awt.Container.Container() (/usr/lib/libgcj.so.3)
   at 0x4037d095: java.awt.Window.Window() (/usr/lib/libgcj.so.3)
   at 0x4036fb54: java.awt.Frame.Frame(java.lang.String) (/usr/lib/libgcj.so.3)
   at 0x4036fb19: java.awt.Frame.Frame() (/usr/lib/libgcj.so.3)
   at 0x403c61bb: ffi_call_SYSV (/usr/lib/libgcj.so.3)
   at 0x403c6185: ffi_raw_call (/usr/lib/libgcj.so.3)
   at 0x4023ad4f: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/l                                                               ib/libgcj.so.3)
   at 0x4023b664: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodI                                                               nvocation) (/usr/lib/libgcj.so.3)
   at 0x40238c44: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/us                                                               r/lib/libgcj.so.3)
   at 0x403c604c: ?? (??:0)
   at 0x403c61bb: ffi_call_SYSV (/usr/lib/libgcj.so.3)
   at 0x403c6185: ffi_raw_call (/usr/lib/libgcj.so.3)
   at 0x4023ad4f: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/l                                                               ib/libgcj.so.3)
   at 0x4023b664: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodI                                                               nvocation) (/usr/lib/libgcj.so.3)
   at 0x40238c44: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/us                                                               r/lib/libgcj.so.3)
   at 0x403c604c: ?? (??:0)
   at 0x4024d848: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
   at 0x402c76b0: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
   at 0x4025a00c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
   at 0x40227bce: _Jv_RunMain(java.lang.Class, byte const, int, byte const, bool                                                               ean) (/usr/lib/libgcj.so.3)
   at 0x08048921: ?? (??:0)
   at 0x420155e4: ?? (??:0)
   at 0x080486e1: ?? (??:0)
[root@cobra bug]# 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-09-09 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09 12:26 ivg2 [this message]
2002-09-23 11:13 tromey
2002-09-25  9:06 Ivan Gyurdiev
2002-09-25 12:56 Tom Tromey
2002-10-07 19:00 tromey

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=20020909191603.20878.qmail@sources.redhat.com \
    --to=ivg2@cornell.edu \
    --cc=gcc-gnats@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: link
Be 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).