Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 85183

Summary: gcj segfault when compiling a class with array of inner class
Product: [Retired] Red Hat Linux Reporter: Andreas Fahle <fahle>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-03 12:35:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Java source code, which causes the bug none

Description Andreas Fahle 2003-02-26 11:30:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
gcj segfaults ("Speicherzugriffsfehler") at method "getTerrain(x,y)", which
should return the attribute "terrain" of a "Field[][]" object, while "Field[][]"
is an array of the inner class "Field". Source code is attached.

[af@maxima mymap]$ echo $CLASSPATH
.
[af@maxima mymap]$ javac --version
Warning: --version not understood. Ignoring.
gcj: no input files
[af@maxima mymap]$ gcj --version
gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[af@maxima mymap]$ javac MyMap.java
MyMap.java: In class `MyMap':
MyMap.java: In method `MyMap.getTerrain(int,int)':
MyMap.java:24: internal error: Speicherzugriffsfehler
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
[af@maxima mymap]$


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. export CLASSPATH=. (probably not necessary)
2. javac MyMap.java

Didn't try to reproduce on other machines/compilers yet.
    

Actual Results:  error message, see description

Expected Results:  compiled class (or message that code makes no sense)

Additional info:

I'm a Java newbie, so this code might be bullshit. However, gcj should tell me
this, right?

Comment 1 Andreas Fahle 2003-02-26 11:33:26 UTC
Created attachment 90374 [details]
Java source code, which causes the bug

Comment 2 Richard Henderson 2004-10-03 12:35:25 UTC
Fixed with gcc 3.4.