public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
@ 2005-10-14 8:47 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:48 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-14 8:47 UTC (permalink / raw)
To: java-prs
------- Comment #8 from cvs-commit at gcc dot gnu dot org 2005-10-14 08:46 -------
Subject: Bug 23620
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: nathan@gcc.gnu.org 2005-10-14 08:46:55
Modified files:
gcc/java : ChangeLog class.c
Log message:
PR java/23620
* class.c (make_class): Create empty binfo here.
(set_super_info): Only create binfo if we have superclasses.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1668&r2=1.1669
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&r1=1.241&r2=1.242
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
2005-10-14 8:47 ` [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces cvs-commit at gcc dot gnu dot org
@ 2005-10-14 8:48 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:48 ` nathan at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-14 8:48 UTC (permalink / raw)
To: java-prs
------- Comment #10 from cvs-commit at gcc dot gnu dot org 2005-10-14 08:48 -------
Subject: Bug 23620
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: nathan@gcc.gnu.org 2005-10-14 08:48:02
Modified files:
gcc/java : ChangeLog class.c
Log message:
PR java/23620
* class.c (make_class): Create empty binfo here.
(set_super_info): Only create binfo if we have superclasses.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1556.2.37&r2=1.1556.2.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.220.8.7&r2=1.220.8.8
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
2005-10-14 8:47 ` [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces cvs-commit at gcc dot gnu dot org
2005-10-14 8:48 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-14 8:48 ` nathan at gcc dot gnu dot org
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-10-14 8:48 UTC (permalink / raw)
To: java-prs
------- Comment #9 from nathan at gcc dot gnu dot org 2005-10-14 08:48 -------
fixed mainline and 4.0
2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
Wil Mahan <wmahan@gmail.com>
PR java/23620
* class.c (make_class): Create empty binfo here.
(set_super_info): Only create binfo if we have superclasses.
--
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:09 UTC (permalink / raw)
To: java-prs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-14 8:48 ` nathan at gcc dot gnu dot org
@ 2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:09 UTC (permalink / raw)
To: java-prs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.0 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
` (4 preceding siblings ...)
2005-09-02 7:13 ` nathan at gcc dot gnu dot org
@ 2005-09-21 14:29 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-09-21 14:29 UTC (permalink / raw)
To: java-prs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-09-21 14:29 -------
I had to make the methods in B and C public in order
to compile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
` (3 preceding siblings ...)
2005-09-01 21:37 ` pinskia at gcc dot gnu dot org
@ 2005-09-02 7:13 ` nathan at gcc dot gnu dot org
2005-09-21 14:29 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-09-02 7:13 UTC (permalink / raw)
To: java-prs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-08-31 15:26:08 |2005-09-02 07:13:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
` (2 preceding siblings ...)
2005-09-01 19:18 ` wmahan at gmail dot com
@ 2005-09-01 21:37 ` pinskia at gcc dot gnu dot org
2005-09-02 7:13 ` nathan at gcc dot gnu dot org
2005-09-21 14:29 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-01 21:37 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-01 21:37 -------
Then this was caused by:
* class.c (make_class): Do not create binfo here.
(set_super_info): Create it here.
* java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
Nathan?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
2005-08-31 15:26 ` [Bug java/23620] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-31 16:24 ` wmahan at gmail dot com
@ 2005-09-01 19:18 ` wmahan at gmail dot com
2005-09-01 21:37 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: wmahan at gmail dot com @ 2005-09-01 19:18 UTC (permalink / raw)
To: java-prs
------- Additional Comments From wmahan at gmail dot com 2005-09-01 19:18 -------
I think I found the root of the problem. In 3.4.x, make_class() in java/class.c
looks like this:
type = make_node (RECORD_TYPE);
TYPE_BINFO (type) = make_tree_vec (BINFO_ELTS);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
but in 4.0.1 it becomes this:
type = make_node (RECORD_TYPE);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
The crash was caused by TYPE_BINFO not being set for a certain type. I added the
line
TYPE_BINFO (type) = make_tree_binfo (0);
to make_class(). This seems consistent with the changes made in 4.0, and it
fixes the problem for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
2005-08-31 15:26 ` [Bug java/23620] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-31 16:24 ` wmahan at gmail dot com
2005-09-01 19:18 ` wmahan at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: wmahan at gmail dot com @ 2005-08-31 16:24 UTC (permalink / raw)
To: java-prs
------- Additional Comments From wmahan at gmail dot com 2005-08-31 16:23 -------
I guess that is a bug in my test case. I didn't notice because it compiles fine
with gcc 4.0.1 when A.class and A$AInt.class are not present.
The problem seems to be that when check_inner_circular_reference() is looking
for circular references, it segfaults when it gets to the tree for A, which has
->type.binfo == NULL. I'm not sure if that's supposed to happen.
Here's a patch that fixes the bug for me, but it may just fix the symptom rather
than the real problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
@ 2005-08-31 15:26 ` pinskia at gcc dot gnu dot org
2005-08-31 16:24 ` wmahan at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 15:26 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-31 15:26 -------
Confirmed, this is a regression from 3.4.0 where this worked just fine.
before 3.4.0, we rejected this with:
C.java:2: error: Class `C' must override `C.methB()' with a public method in order to implement
interface `B$BInt'.
void methB() { }
^
1 error
Actually that is correct, we should error out, even fixing that bug I still get an ICE.
I will report a bug for that one soon too.
Back trace:
#0 0x0805991c in check_inner_circular_reference (source=0xb7d35b80, target=0xb7d32b80) at
parse.y:5375
#1 0x08059a15 in check_inner_circular_reference (source=0xb7d32e04, target=0xb7d32b80) at
parse.y:5397
#2 0x08059a15 in check_inner_circular_reference (source=0xb7d32b80, target=0xb7d32b80) at
parse.y:5397
#3 0x08066d99 in java_check_circular_reference () at parse.y:5445
#4 0x080cce1f in parse_source_file_3 () at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/java/jcf-
parse.c:1020
#5 0x080d0a3d in java_parse_file (set_yydebug=0) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:1286
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to work| |3.4.0
Last reconfirmed|0000-00-00 00:00:00 |2005-08-31 15:26:08
date| |
Summary|Segfault compiling inner |[4.0/4.1 Regression]
|interfaces |Segfault compiling inner
| |interfaces
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-10-14 12:09 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-23620-11253@http.gcc.gnu.org/bugzilla/>
2005-10-14 8:47 ` [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces cvs-commit at gcc dot gnu dot org
2005-10-14 8:48 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:48 ` nathan at gcc dot gnu dot org
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
2005-10-14 12:09 ` pinskia at gcc dot gnu dot org
2005-08-29 9:44 [Bug java/23620] New: " wmahan at gmail dot com
2005-08-31 15:26 ` [Bug java/23620] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-31 16:24 ` wmahan at gmail dot com
2005-09-01 19:18 ` wmahan at gmail dot com
2005-09-01 21:37 ` pinskia at gcc dot gnu dot org
2005-09-02 7:13 ` nathan at gcc dot gnu dot org
2005-09-21 14:29 ` tromey 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).