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 234157

Summary: gcj final variable corrupted in inner class.
Product: Red Hat Enterprise Linux 5 Reporter: Nurdin Premji <npremji>
Component: gccAssignee: Andrew Haley <aph>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: aph, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-01 11:51:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 173278    
Attachments:
Description Flags
Empty class needed by StackAccessors.java
none
StackAccessors.java main fails.
none
. none

Description Nurdin Premji 2007-03-27 15:07:48 UTC
Description of problem:
final variables get corrupted when used inside inner classes inside methods.

Version-Release number of selected component (if applicable):
$gcj -v
Using built-in specs.
Reading specs from /usr/lib/gcc/i386-redhat-linux/4.1.1/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)


How reproducible:
Always.

Steps to Reproduce:
1. Compile and run StackAccessors.java
2. 
3.
  
Actual results:
maxNameSize: 100
maxNameSize: 0

Expected results:
maxNameSize: 100
maxNameSize: 100

Additional info:
compiled with:
$ make frysk4282/StackAccessors
source='frysk4282/MyProcName.java'
object='frysk4282/frysk4282_StackAccessors-MyProcName.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ../../../frysk/frysk-imports/depcomp \
        gcj -I ../../../frysk/frysk-imports/tests -g -O -Wall -Werror -c -o
frysk4282/frysk4282_StackAccessors-MyProcName.o `test -f
'frysk4282/MyProcName.java' || echo
'../../../frysk/frysk-imports/tests/'`frysk4282/MyProcName.java
source='frysk4282/StackAccessors.java'
object='frysk4282/frysk4282_StackAccessors-StackAccessors.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ../../../frysk/frysk-imports/depcomp \
        gcj -I ../../../frysk/frysk-imports/tests -g -O -Wall -Werror -c -o
frysk4282/frysk4282_StackAccessors-StackAccessors.o `test -f
'frysk4282/StackAccessors.java' || echo
'../../../frysk/frysk-imports/tests/'`frysk4282/StackAccessors.java
gcj  -g -O -Wall -Werror   -o frysk4282/StackAccessors
--main=frysk4282.StackAccessors  frysk4282/frysk4282_StackAccessors-MyProcName.o
frysk4282/frysk4282_StackAccessors-StackAccessors.o  

code is hosted at:
<http://sources.redhat.com/cgi-bin/cvsweb.cgi/frysk-imports/tests/frysk4282/?cvsroot=frysk>

Comment 1 Nurdin Premji 2007-03-27 15:07:49 UTC
Created attachment 151036 [details]
Empty class needed by StackAccessors.java

Comment 2 Nurdin Premji 2007-03-27 15:09:01 UTC
Created attachment 151037 [details]
StackAccessors.java main fails.

Comment 4 Nurdin Premji 2007-03-27 17:08:26 UTC
To download and build frysk go to:
http://sourceware.org/frysk/build/

will show the dependencies and how to check out frysk from cvs.

After that run frysk/autogen.sh in a separate build directory and then you can
cd into frysk-imports/tests and do a 
make tests/4282/StackAccessors

Comment 5 Nurdin Premji 2007-03-27 17:09:59 UTC
sorry should be 
make tests/frysk4282/StackAccessors.