public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
@ 2004-11-27 23:59 mark at gcc dot gnu dot org
  2004-11-28  0:05 ` [Bug java/18697] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mark at gcc dot gnu dot org @ 2004-11-27 23:59 UTC (permalink / raw)
  To: java-prs

The setParent(MenuItem) method in gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
gets miscompiled which makes Menu related tests in the Mauve Visual Test Engine
and the AWT demo from GNU Classpath examples crash.

Example (from GNU Classpath 0.12 examples):
  gij -cp examples.zip gnu.classpath.examples.awt.Demo
  Aborted

A gdb shows the following (impossible!) backtrace:

#0  0x0eee3144 in Java_gnu_java_awt_peer_gtk_GtkMenuPeer_delItem (env=Variable
"env" is not available.
)
    at
/home/mark/src/gcc40/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c:164
#1  0x0eee3140 in Java_gnu_java_awt_peer_gtk_GtkMenuPeer_delItem (env=Variable
"env" is not available.)
    at
/home/mark/src/gcc40/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c:164
#2  0x0eecddf4 in
gnu.java.awt.peer.gtk.GtkMenuItemPeer.setParent(java.awt.MenuItem)
(this=Variable "this" is not available.)
    at
/home/mark/src/gcc40/gcc/libjava/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java:78
#3  0x0eecdc30 in
gnu.java.awt.peer.gtk.GtkMenuItemPeer.GtkMenuItemPeer(java.awt.MenuItem)
(this=Variable "this" is not available.)
    at
/home/mark/src/gcc40/gcc/libjava/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java:60
#4  0x0eece410 in gnu.java.awt.peer.gtk.GtkMenuPeer.GtkMenuPeer(java.awt.Menu)
(this=Variable "this" is not available.)
    at /home/mark/src/gcc40/gcc/libjava/gnu/java/awt/peer/gtk/GtkMenuPeer.java:58
#5  0x0eed3ab8 in gnu.java.awt.peer.gtk.GtkToolkit.createMenu(java.awt.Menu)
(this=Variable "this" is not available.)
    at /home/mark/src/gcc40/gcc/libjava/gnu/java/awt/peer/gtk/GtkToolkit.java:446
[...]

This has nothing to do with the recent gui-merge patch. It works fine when
compiled with the gui branch compiler and fails in exactly the same why before
and after the gui-branch-merge-patch in the trunk.

It fails in the same way on i686-pc-linux-gnu and powerpc-unknown-linux-gnu
(both configured with --enable-java-awt=gtk,xlib)
gij (GNU libgcj) version 4.0.0 20041127 (experimental)

The following rewrite of the method makes everything work fine.

--- gnu/java/awt/peer/gtk/GtkMenuItemPeer.java  2 Sep 2004 05:10:11 -0000    1.5
+++ gnu/java/awt/peer/gtk/GtkMenuItemPeer.java  26 Nov 2004 04:47:09 -0000
@@ -74,8 +97,10 @@
       }
     else // parent instanceof Menu
       {
-       ((GtkMenuPeer)((Menu)parent).getPeer ()).addItem (this,
-                                                         item.getShortcut ());
+       Menu m = (Menu) parent;
+       GtkMenuPeer gmp = (GtkMenuPeer) m.getPeer();
+       MenuShortcut ms = item.getShortcut();
+       gmp.addItem(this, ms);
       }
   }

See also http://gcc.gnu.org/ml/java-patches/2004-q4/msg00736.html

-- 
           Summary: Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu 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=18697


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

* [Bug java/18697] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
@ 2004-11-28  0:05 ` pinskia at gcc dot gnu dot org
  2004-11-28  0:08 ` mark at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-28  0:05 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-28 00:05 -------


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

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

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


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


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

* [Bug java/18697] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
  2004-11-28  0:05 ` [Bug java/18697] " pinskia at gcc dot gnu dot org
@ 2004-11-28  0:08 ` mark at gcc dot gnu dot org
  2004-11-28  0:09 ` [Bug java/18697] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mark at gcc dot gnu dot org @ 2004-11-28  0:08 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mark at gcc dot gnu dot org  2004-11-28 00:08 -------
*** Bug 18696 has been marked as a duplicate of this bug. ***

-- 


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
  2004-11-28  0:05 ` [Bug java/18697] " pinskia at gcc dot gnu dot org
  2004-11-28  0:08 ` mark at gcc dot gnu dot org
@ 2004-11-28  0:09 ` pinskia at gcc dot gnu dot org
  2004-11-28 12:41 ` mark at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-28  0:09 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-28 00:09 -------
Reopening.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
           Keywords|                            |wrong-code
         Resolution|DUPLICATE                   |
            Summary|Miscompilation of           |[4.0 Regression]
                   |GtkMenuItemPeer.setParent(Me|Miscompilation of
                   |nuItem)                     |GtkMenuItemPeer.setParent(Me
                   |                            |nuItem)
   Target Milestone|---                         |4.0.0


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-11-28  0:09 ` [Bug java/18697] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-28 12:41 ` mark at gcc dot gnu dot org
  2004-11-28 12:59 ` aph at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mark at gcc dot gnu dot org @ 2004-11-28 12:41 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mark at gcc dot gnu dot org  2004-11-28 12:41 -------
Seems it does work with a build from a few days earlier on i686-pc-linux-gnu
gij (GNU libgcj) version 4.0.0 20041124 (experimental)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-28 12:41:18
               date|                            |


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-11-28 12:41 ` mark at gcc dot gnu dot org
@ 2004-11-28 12:59 ` aph at gcc dot gnu dot org
  2004-11-28 13:29 ` mark at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-11-28 12:59 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From aph at gcc dot gnu dot org  2004-11-28 12:59 -------
I can't do anything with this bug because there's no instructions for
reproducing it.

Please provide a step-by-step way to demonstrate the bug.

-- 


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-11-28 12:59 ` aph at gcc dot gnu dot org
@ 2004-11-28 13:29 ` mark at gcc dot gnu dot org
  2004-11-29 14:16 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mark at gcc dot gnu dot org @ 2004-11-28 13:29 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mark at gcc dot gnu dot org  2004-11-28 13:29 -------
Added the Menu part from GNU Classpath examples as simple testcase.
Unfortunately after updating gcc again (version 4.0.0 20041128 (experimental)) I
hit [Bug java/18699] SIGSEGV in GC_local_gcj_malloc with this on i686-pc-linux-gnu.

-- 


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-11-28 13:29 ` mark at gcc dot gnu dot org
@ 2004-11-29 14:16 ` pinskia at gcc dot gnu dot org
  2004-12-02 19:32 ` aph at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 14:16 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-29 14:16 -------
*** Bug 18695 has been marked as a duplicate of this bug. ***

-- 


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-11-29 14:16 ` pinskia at gcc dot gnu dot org
@ 2004-12-02 19:32 ` aph at gcc dot gnu dot org
  2004-12-03 18:02 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-12-02 19:32 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |aph at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-12-02 19:32 ` aph at gcc dot gnu dot org
@ 2004-12-03 18:02 ` cvs-commit at gcc dot gnu dot org
  2004-12-03 23:33 ` tromey at gcc dot gnu dot org
  2004-12-04  4:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-03 18:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-03 18:02 -------
Subject: Bug 18697

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aph@gcc.gnu.org	2004-12-03 18:02:01

Modified files:
	gcc/java       : ChangeLog class.c 

Log message:
	2004-12-03  Andrew Haley  <aph@redhat.com>
	
	PR java/18697
	* class.c (layout_class_method): Don't fail to override a method
	simply because it has DECL_ARTIFICIAL set.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1512&r2=1.1513
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&r1=1.217&r2=1.218



-- 


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-12-03 18:02 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-03 23:33 ` tromey at gcc dot gnu dot org
  2004-12-04  4:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-12-03 23:33 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-12-03 23:33 -------
Andrew fixed this.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug java/18697] [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
  2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-12-03 23:33 ` tromey at gcc dot gnu dot org
@ 2004-12-04  4:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-04  4:04 UTC (permalink / raw)
  To: java-prs



-- 
Bug 18697 depends on bug 18699, which changed state.

Bug 18699 Summary: [4.0 Regression] SIGSEGV in GC_local_gcj_malloc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18699

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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


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

end of thread, other threads:[~2004-12-04  4:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27 23:59 [Bug java/18697] New: Miscompilation of GtkMenuItemPeer.setParent(MenuItem) mark at gcc dot gnu dot org
2004-11-28  0:05 ` [Bug java/18697] " pinskia at gcc dot gnu dot org
2004-11-28  0:08 ` mark at gcc dot gnu dot org
2004-11-28  0:09 ` [Bug java/18697] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-28 12:41 ` mark at gcc dot gnu dot org
2004-11-28 12:59 ` aph at gcc dot gnu dot org
2004-11-28 13:29 ` mark at gcc dot gnu dot org
2004-11-29 14:16 ` pinskia at gcc dot gnu dot org
2004-12-02 19:32 ` aph at gcc dot gnu dot org
2004-12-03 18:02 ` cvs-commit at gcc dot gnu dot org
2004-12-03 23:33 ` tromey at gcc dot gnu dot org
2004-12-04  4:04 ` 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).