Bug 234157 - gcj final variable corrupted in inner class.
gcj final variable corrupted in inner class.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Andrew Haley
Depends On:
Blocks: 173278
  Show dependency treegraph
Reported: 2007-03-27 11:07 EDT by Nurdin Premji
Modified: 2008-12-01 06:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-01 06:51:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Empty class needed by StackAccessors.java (2.07 KB, text/x-java)
2007-03-27 11:07 EDT, Nurdin Premji
no flags Details
StackAccessors.java main fails. (2.89 KB, text/x-java)
2007-03-27 11:09 EDT, Nurdin Premji
no flags Details
. (3.40 KB, patch)
2007-03-29 08:38 EDT, Andrew Haley
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 4282 None None None Never

  None (edit)
Description Nurdin Premji 2007-03-27 11:07:48 EDT
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- --with-cpu=generic
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)

How reproducible:

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

Expected results:
maxNameSize: 100
maxNameSize: 100

Additional info:
compiled with:
$ make frysk4282/StackAccessors
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
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
gcj  -g -O -Wall -Werror   -o frysk4282/StackAccessors
--main=frysk4282.StackAccessors  frysk4282/frysk4282_StackAccessors-MyProcName.o

code is hosted at:
Comment 1 Nurdin Premji 2007-03-27 11:07:49 EDT
Created attachment 151036 [details]
Empty class needed by StackAccessors.java
Comment 2 Nurdin Premji 2007-03-27 11:09:01 EDT
Created attachment 151037 [details]
StackAccessors.java main fails.
Comment 4 Nurdin Premji 2007-03-27 13:08:26 EDT
To download and build frysk go to:

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 13:09:59 EDT
sorry should be 
make tests/frysk4282/StackAccessors.

Note You need to log in before you can comment on or make changes to this bug.