public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5135: Compiler segfault on non public Interfaces
@ 2003-05-12 19:56 Dara Hazeghi
0 siblings, 0 replies; 4+ messages in thread
From: Dara Hazeghi @ 2003-05-12 19:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/5135; it has been noted by GNATS.
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: java/5135: Compiler segfault on non public Interfaces
Date: Mon, 12 May 2003 12:50:16 -0700
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
trail&database=gcc&pr=5135
Hello,
I can confirm this bug still exists on gcc 3.2, 3.3 branch and mainline
(20030511).
Dara
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/5135: Compiler segfault on non public Interfaces
@ 2003-04-21 21:46 Daniel Bonniot
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Bonniot @ 2003-04-21 21:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/5135; it has been noted by GNATS.
From: Daniel Bonniot <Daniel.Bonniot@inria.fr>
To: gcc-gnats@gcc.gnu.org, java-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, olivier@zipworld.com.au
Cc:
Subject: Re: java/5135: Compiler segfault on non public Interfaces
Date: Mon, 21 Apr 2003 23:41:44 +0200
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5135
I reproduced this bug in gcc version 3.3 20030412 (Debian prerelease)
Here is the output:
$ gcj-3.3 -C a/b/C.java
a/b/C.java: In class `a.b.C':
a/b/C.java: In method `a.b.C.hello()':
a/b/C.java:10: internal compiler error: Segmentation fault
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/5135: Compiler segfault on non public Interfaces
@ 2001-12-16 17:46 Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2001-12-16 17:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/5135; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: olivier@zipworld.com.au
Cc: gcc-gnats@gcc.gnu.org, Alexandre Petit-Bianco <apbianco@cygnus.com>
Subject: Re: java/5135: Compiler segfault on non public Interfaces
Date: 16 Dec 2001 18:51:24 -0700
Olivier> Note that "A" and therefore "A.Hello" are protected in
Olivier> package "a" and should not be accessible from class "C".
First, thanks for your report. It is concise and self-contained --
exactly how I like bug reports.
I looked at this a bit today. gcj does correctly detect that A.HELLO
is inaccessible, but unfortunately it crashes while trying to tell you
that.
The appended patch fixes the crash, but I think this patch is almost
certainly incorrect. I don't really understand the code in this
function. Something else I don't understand is that if you get rid of
class `a.B', then the error in check_pkg_class_access is printed. Why
does the presence of B make a difference here?
Tom
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.333
diff -u -r1.333 parse.y
--- parse.y 2001/12/16 16:23:49 1.333
+++ parse.y 2001/12/17 01:40:13
@@ -9660,10 +9659,9 @@
if (not_accessible_p (TREE_TYPE (decl), decl, type, 0))
{
parse_error_context
- (qual_wfl, "Can't access %s field `%s.%s' from `%s'",
+ (qual_wfl, "Can't access %s `%s' from `%s'",
java_accstring_lookup (get_access_flags_from_decl (decl)),
- GET_TYPE_NAME (type),
- IDENTIFIER_POINTER (DECL_NAME (decl)),
+ GET_TYPE_NAME (TREE_TYPE (decl)),
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))));
return 1;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* java/5135: Compiler segfault on non public Interfaces
@ 2001-12-16 13:56 olivier
0 siblings, 0 replies; 4+ messages in thread
From: olivier @ 2001-12-16 13:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 5135
>Category: java
>Synopsis: Compiler segfault on non public Interfaces
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 16 13:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: olivier@zipworld.com.au
>Release: gcc version 3.1 20011211 (experimental)
>Organization:
>Environment:
Reading specs from /usr/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../../program/cvs/gcc/configure --prefix=/usr/local/gcc --enable-shared --enable-threads=posix --enable-languages=c++,java
Thread model: posix
gcc version 3.1 20011211 (experimental)
>Description:
gcj compilation aborts with a segfault in the following
situation:
Class:
a/A.java a package protected interface.
a/B.java a class that implement interface A.
a/b/C.java a class in a different package that import
both A and B and try to use a constant
defined in interface A.
Note that "A" and therefore "A.Hello" are protected in package "a" and should
not be accessible from class "C". Sun JDK correctly reports:
tournesol$ javac a/b/C.java
a/b/C.java:3: a.A is not public in a; cannot be accessed from outside
package
import a.A;
^
a/b/C.java:10: a.A is not public in a; cannot be accessed from
outside package
System.out.println(A.HELLO);
but gcj gets confused by the fact that class "B" (also imported) is
public in package "a" and implements "A". It wrongly believes that "A"
is accessible and segfault.
>How-To-Repeat:
gcj -C a/b/C.java
>Fix:
Unknown...
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="a.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="a.tgz"
H4sIALkUHTwAA+3WTWvCMBgH8J7zKR486aVN0tYeyg5VBjsIO+wTRJe5bn2jjcIYfvel3ZwiiAxW
Ze7/u6QvgYY+PMlfeU7vOA9kFIZ25CIK+f645fAo4JHg3Jf2WgjJhUNh/0tznFVjVE3klFm6TnV9
dN6p93+U8hL3Ra1Vn9/gtq7jIDhe/2hXfxkKO19KETnE+1zU1j+vf6UWr2qpScWMpYXR9ZNaaErY
OyOiB1OnxZLubmeze7qhwbPOsnIQsw1jl143/A7lTS7f/+3ZsO3/KOz63xfo/3PY7/9qNc/SBS0y
1TQ0YWleZTrXhWm6/QBNf42UN+89Af4o/439Nv8FPvLfWbT1n/Z8Apza/yUPD+ovg2CM/f8cvvd/
d94mwLwqa2Nvknh3PTk8Gqaf6fDrmf1/xg7rMn2kLiAOR+3bbkqbId8ao3O3XBm3smnSZMUwcbtE
OYrbKRt7sFz6JwAAAAAAAAAAAAAAAFyRDxetJjMAKAAA
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-12 19:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-12 19:56 java/5135: Compiler segfault on non public Interfaces Dara Hazeghi
-- strict thread matches above, loose matches on Subject: below --
2003-04-21 21:46 Daniel Bonniot
2001-12-16 17:46 Tom Tromey
2001-12-16 13:56 olivier
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).