Bug 191211 - gcj crashes when compiling ProjectX_Source_0.90.4
Summary: gcj crashes when compiling ProjectX_Source_0.90.4
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-09 19:36 UTC by tomi ollila
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-10 13:18:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description tomi ollila 2006-05-09 19:36:23 UTC
Description of problem:

compiling ProjectX 0.90.4 with command line

$ gcj -encoding ISO-8859-1 -O -classpath
lib/commons-net-1.3.0.jar:lib/jakarta-oro-2.0.8.jar -d build @sources.lst

gives:

src/net/sourceforge/dvb/projectx/gui/MainFrame.java:2653: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


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.0/libgcj.spec
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 --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.0 20060304 (Red Hat 4.1.0-3)


How reproducible:

Simply trying to compile ProjectX


Steps to Reproduce:
1. Download pjx 0.90.4 from http://sourceforge.net/projects/project-x
2. extract, try to compile, add required (byte) casts to MpvDecoder.java
3. gcj -encoding ISO-8859-1 -O -classpath
lib/commons-net-1.3.0.jar:lib/jakarta-oro-2.0.8.jar -d build @sources.lst
  
Actual results:

src/net/sourceforge/dvb/projectx/gui/MainFrame.java:2653: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


Expected results:

Getting further than that, as most probably there is something that
are unstatisfied (when not using sun jdk)


Additional info:

Nothing needed.

Comment 1 Jakub Jelinek 2006-05-10 11:16:07 UTC
I can reproduce this on x86-64 with gcj 4.1.0-15.fc5 (i.e. current
redhat/gcc-4_1-branch and thus most likely gcc-4_1-branch too).
Program received signal SIGSEGV, Segmentation fault.
0x0000000000419856 in patch_method_invocation (patch=0x2aaaafed3870,
primary=Variable "primary" is not available.
) at ../../gcc/java/parse.y:11024
11024       if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) &&
where
11019     t = TYPE_ARG_TYPES (TREE_TYPE (method));
11020     if (TREE_CODE (patch) == NEW_CLASS_EXPR)
11021       t = TREE_CHAIN (t);
11022     for (ta = args; t != end_params_node && ta;
11023          t = TREE_CHAIN (t), ta = TREE_CHAIN (ta))
11024       if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) &&
11025           TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t))
11026         TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta));
11027
11028     /* Resolve unresolved returned type issues */
and
(gdb) p debug_tree (args)
 <tree_list 0x2aaac04881e0
    chain <tree_list 0x2aaac04881b0
        chain <tree_list 0x2aaac0488180
            chain <tree_list 0x2aaac0488150
                chain <tree_list 0x2aaac0488120
                    chain <tree_list 0x2aaac04880f0
                        chain <tree_list 0x2aaac04880c0>>>>>>>


Comment 2 Andrew Haley 2006-05-10 13:09:45 UTC
There's a simple workaround for this.

Make sure that java-1.4.2-gcj-compat is installed, and run the ProjectX build:

sh -x ./build.sh

Then compile with gcj:

gcj -shared -o ProjectX.so -findirect-dispatch -Bsymbolic -O ProjectX.jar



Comment 3 Andrew Haley 2006-05-10 13:17:36 UTC
That should be

gcj -shared -o ProjectX.so -findirect-dispatch -Bsymbolic -O ProjectX.jar \
-save-temps -fPIC

assuming that a library is wanted.


Comment 5 Andrew Haley 2006-05-10 14:09:48 UTC
This is a duplicate of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12257



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