public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5368: gcj-3.0.3 segfaults with 20 line program
@ 2002-03-25 13:06 mark
  0 siblings, 0 replies; 3+ messages in thread
From: mark @ 2002-03-25 13:06 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ian.bruce, java-prs, mark, nobody

Synopsis: gcj-3.0.3 segfaults with 20 line program

Responsible-Changed-From-To: unassigned->mark
Responsible-Changed-By: mark
Responsible-Changed-When: Mon Mar 25 13:06:56 2002
Responsible-Changed-Why:
    I am handling this.
State-Changed-From-To: analyzed->closed
State-Changed-By: mark
State-Changed-When: Mon Mar 25 13:06:56 2002
State-Changed-Why:
    I checked in a patch. The problem should be fixed when 3.1 is released.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5368


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

* Re: java/5368: gcj-3.0.3 segfaults with 20 line program
@ 2002-02-10 16:32 tromey
  0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2002-02-10 16:32 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ian.bruce, java-prs, nobody

Synopsis: gcj-3.0.3 segfaults with 20 line program

State-Changed-From-To: open->analyzed
State-Changed-By: tromey
State-Changed-When: Sun Feb 10 16:32:24 2002
State-Changed-Why:
    I've verified this still happens with 3.1.
    It crashes while trying to print an error message.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5368


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

* java/5368: gcj-3.0.3 segfaults with 20 line program
@ 2002-01-13  7:16 ian.bruce
  0 siblings, 0 replies; 3+ messages in thread
From: ian.bruce @ 2002-01-13  7:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5368
>Category:       java
>Synopsis:       gcj-3.0.3 segfaults with 20 line program
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 13 07:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     ian.bruce@myrealbox.com
>Release:        gcj-3.0.3
>Organization:
>Environment:
linux-2.2.17/alpha
>Description:
Here's the whole story:

$ ls -RF .
.:
b/  test/

./b:
a.java

./test:
gcj_test.java
$ 
$ gcj -v -I. -C test/gcj_test.java 
Reading specs from /usr/lib/gcc-lib/alpha-linux/3.0.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc alpha-linux
Thread model: posix
gcc version 3.0.3
 /usr/lib/gcc-lib/alpha-linux/3.0.3/jc1 test/gcj_test.java -quiet -dumpbase gcj_test.java -g1 -version -fsyntax-only -femit-class-files -o /dev/null -I.
GNU Java version 3.0.3 (alpha-linux)
        compiled by GNU C version 3.0.3.
test/gcj_test.java: In class `gcj_test':
test/gcj_test.java: In method `gcj_test.gcj_segf_dummy(java.lang.String,java.lang.String,java.lang.String)':
test/gcj_test.java:7: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
$ 
$ uname -a
Linux bandit 2.2.17 #1 Thu Jun 29 13:33:28 EDT 2000 alpha unknown
$ 
>How-To-Repeat:
(this just repeats the contents of the archive file)

$ cat b/a.java 
package b;

public class a
{
    public static void qqq(String s1, String s2, String s3)
    {
        System.out.println(s1 + s2 + s3);
    }
}
$ 
$ cat test/gcj_test.java 
import b.a;

public class gcj_test
{
    public static void gcj_segf_dummy(String s1, String s2, String s3)
    {
        b.a.qqq(s1, s2, s3);
    }

    public static boolean b;
}
$ 
>Fix:
The problem seems to be the ambiguity caused by the package 'b' having the same name as a member variable of class 'gcj_test'. If the member name is changed, the segfault goes away. However, the compiler should not segfault on ANY input. This example is easily fixed, but this is not the case when you are working with a large body of existing code, as I was when I discovered this problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/gzip; name="segf.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="segf.tar.gz"

H4sICGGOQTwAA3NlZ2YudGFyAO3W3W6CMBgGYI65ih5qtrC2gD3wMrwAU5ARHH/aYmIW731f3XDu
x5ktw2XxfQ6k6oclvLSfJsvvdVfaO284nEdSxTEduVAxPz72PK4iyUMeKik9LrhSscfiAa/poDNW
rxnzCl1/WXfu+3/K9Pknwz0B38h/QpWUv5AyRP6XcJS/DpZ6oweYg9YzBRudzF9K0ecfxcKtfykn
tP75ANfywZXn3+r0QecZS6a+33ZJWaQsLbUxTPuPPiMvH9JdsnTYNMWCrVar0cyuizpnRtyyfihf
h+F4f+7zLzizrbFZFTSdDVoqsWU9MoLd0EnuJRxP95U7f+f/9Q25Mof1bzMz1J+AH+z/aiKw/1/C
2/zzdDl3g9/tBGf3f9rs+/z5Pv+I3mD/v4Siapu1ZUmg3zeA/lk43QdchXt+5ouuqrbfbQk0ZeA6
iat3hUdd4JMJk6YpM127PoUeAQAAAAAAAAAAAAAAAHDCE5Plx3QAKAAA


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

end of thread, other threads:[~2002-03-25 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-25 13:06 java/5368: gcj-3.0.3 segfaults with 20 line program mark
  -- strict thread matches above, loose matches on Subject: below --
2002-02-10 16:32 tromey
2002-01-13  7:16 ian.bruce

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