Bug 7879 - Segmentation fault: jc1:java/mangle.c:228 when compiling *.java and *.jar together
Summary: Segmentation fault: jc1:java/mangle.c:228 when compiling *.java and *.jar tog...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-09-10 03:26 UTC by cedric.dufour
Modified: 2005-07-23 22:49 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
files.tar.bz2 (55 bytes, application/octet-stream)
2003-05-21 15:17 UTC, cedric.dufour
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cedric.dufour 2002-09-10 03:26:01 UTC
Segmentation fault in JC1 as soon as a JAR file is passed to GCJ in addition to *.java files. (Here, PostgreSQL's JDBC driver: jdbc7.2-1.1.jar)

What is strange is that when I precompile the *.class file using 'gcj -C *.class' and then compile the executable using 'gcj --main=dev_fill -o test *.class jdbc7.2-1.1.jar', it works absolutely fine!

I hope I'm not reporting an unimportant or already known issue and bugging you with the matter.

Let me know if original *.java files are needed.

Regards

Release:
GCC 3.2

How-To-Repeat:
[cdufour@ced-lx-001] /home/ces/projects/photodb/db/dev/java/dev_fill> gcj -v -save-temps --main=dev_fill -o test *.java jdbc7.2-1.1.jar
Reading specs from /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Reading specs from /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared : (reconfigured) ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared : (reconfigured) ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared --enable-threads=posix --enable-languages=c,c++,java --enable-libgcj --with-system-zlib : (reconfigured) ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared --enable-threads=posix --enable-languages=c,c++,java --enable-libgcj --with-system-zlib : (reconfigured) ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared --enable-threads=posix --enable-languages=c,c++,java --enable-libgcj --enable-interpreter --with-system-zlib : (reconfigured) ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2 --enable-version-specific-runtime-libs --enable-shared --enable-threads=posix --enable-languages=c++,java --enable-libgcj --enable-interpreter
Thread model: posix
gcc version 3.2
 /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/jc1 /tmp/cdufour/ccYhe56Djx -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase ccYhe56Djx -g1 -version -ffilelist-file -o ccYhe56Djx.s
GNU Java version 3.2 (i686-pc-linux-gnu)
 compiled by GNU C version 3.2.
Class path starts here:
    ./
    /usr/local/gcc-3.2/share/java/libgcj-3.2.jar/ (system) (zip)
org/postgresql/core/BytePoolDim1.class:0: 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.


[cdufour@ced-lx-001] /home/ces/projects/photodb/db/dev/java/dev_fill> gdb /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/jc1 
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run /tmp/cdufour/ccYhe56Djx -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase ccYhe56Djx -g1 -version -ffilelist-file -o ccYhe56Djx.s
Starting program: /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/jc1 /tmp/cdufour/ccYhe56Djx -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase ccYhe56Djx -g1 -version -ffilelist-file -o ccYhe56Djx.s
GNU Java version 3.2 (i686-pc-linux-gnu)
 compiled by GNU C version 3.2.
Class path starts here:
    ./
    /usr/local/gcc-3.2/share/java/libgcj-3.2.jar/ (system) (zip)

Program received signal SIGSEGV, Segmentation fault.
0x0807f353 in mangle_type (type=0x40071af0) at ../../gcc-3.2/gcc/java/mangle.c:228
228 ../../gcc-3.2/gcc/java/mangle.c: No such file or directory.
 in ../../gcc-3.2/gcc/java/mangle.c
(gdb) p *mangle_type
$1 = {void (union tree_node *)} 0x807f260 <mangle_type>
Comment 1 Andrew Haley 2002-10-08 06:42:53 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: I need the source files to be able to duplicate this.
Comment 2 Nathanael C. Nerode 2003-02-23 20:49:50 UTC
State-Changed-From-To: feedback->open
State-Changed-Why: Feedback received (a while back!)
Comment 3 Dara Hazeghi 2003-06-08 17:02:50 UTC
Hello,

your attachment doesn't seem to have been converted in the bugzilla switchover. Would you mind 
attaching your testcase via bugzilla? Thanks,

Dara
Comment 4 Dara Hazeghi 2003-08-24 18:12:53 UTC
Marking as invalid to...
Comment 5 Dara Hazeghi 2003-08-24 18:13:37 UTC
Reopen as unconfirmed.
Comment 6 Andrew Pinski 2003-08-24 18:22:15 UTC
The attachment only contains the file names, could please attach the files which are causing this 
problem?
Comment 7 Andrew Pinski 2003-08-29 14:36:04 UTC
No feedback in 3 months (T-10 days).