First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 13948
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Max Gilead <gilead@yellowhedgehog.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
GL4JavaInitException.java gl4java/GL4JavaInitException.java text/plain 2004-01-31 13:47 103 bytes Edit
GLRunnable.java gl4java/GLRunnable.java text/plain 2004-01-31 13:47 1.06 KB Edit
GL4JavaInitException.class gl4java/GL4JavaInitException.class application/octet-stream 2004-01-31 13:48 181 bytes Edit
GLRunnable.class gl4java/GLRunnable.class application/octet-stream 2004-01-31 13:48 251 bytes Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 13948 depends on: Show dependency tree
Show dependency graph
Bug 13948 blocks: 17574

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2004-01-31 20:02 Opened: 2004-01-31 13:46
When trying to compile GL4Java project .class files into native code GCJ
crashes.

I prepared minimal test case.

Command I issue and its result:
max@maxbox:~/gl4java_test$ gcj -v -save-temps --classpath ${LIBGCJ} -shared -o
libgl4java.so gl4java/GL4JavaInitException.class gl4java/GLRunnable.class
Reading specs from /home/max/gcc34/out/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Reading specs from
/home/max/gcc34/out/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc/configure --prefix=/home/max/gcc34/out
--with-system-zlib
Thread model: posix
gcc version 3.4.0 20040125 (prerelease)
 /home/max/gcc34/out/libexec/gcc/i686-pc-linux-gnu/3.4.0/jc1 /tmp/ccgrrBzxjx
-fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase ccgrrBzxjx
-mtune=pentiumpro -auxbase ccgrrBzxjx -g1 -version -fclasspath=-shared
-ffilelist-file -o ccgrrBzxjx.s
GNU Java version 3.4.0 20040125 (prerelease) (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.3 20040110 (prerelease) (Debian).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64465
Class path starts here:
    -shared/
    /home/max/gcc34/out/share/java/libgcj-3.4.0.jar/ (system) (zip)
gl4java/GL4JavaInitException.class:0: internal compiler error: Segmentation
fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



Contents of ccgrrBzxjx.s generated temp file:
        .file   "ccgrrBzxjx"
        .section        .debug_abbrev,"",@progbits
.Ldebug_abbrev0:
        .section        .debug_info,"",@progbits
.Ldebug_info0:
        .section        .debug_line,"",@progbits
.Ldebug_line0:
        .text
.Ltext0:


I'm using GCC obtained from CVS gcc-3_4-branch on 2004.01.25

GCJ version:

max@maxbox:~/gl4java_test$ gcj --version
gcj (GCC) 3.4.0 20040125 (prerelease)
Copyright (C) 2004 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.


System:
max@maxbox:~/gl4java_test$ uname -a
Linux maxbox 2.4.24-1-686 #1 Tue Jan 6 21:29:44 EST 2004 i686 GNU/Linux


I'll be happy to provide any help which would aid in resolving this problem.
Max

------- Comment #1 From Max Gilead 2004-01-31 13:47 -------
Created an attachment (id=5627) [edit]
gl4java/GL4JavaInitException.java

------- Comment #2 From Max Gilead 2004-01-31 13:47 -------
Created an attachment (id=5628) [edit]
gl4java/GLRunnable.java

------- Comment #3 From Max Gilead 2004-01-31 13:48 -------
Created an attachment (id=5629) [edit]
gl4java/GL4JavaInitException.class

------- Comment #4 From Max Gilead 2004-01-31 13:48 -------
Created an attachment (id=5630) [edit]
gl4java/GLRunnable.class

------- Comment #5 From Andrew Pinski 2004-01-31 20:02 -------
I can reproduce this.  The command line which I can reproduce this with:
gcj -o libgl4java.so gl4java/GL4JavaInitException.class gl4java/GLRunnable.class
Note you have include "-o filename" part else it will not seg fault.

------- Comment #6 From Andrew Pinski 2004-02-01 14:12 -------
Here is the backtrace:
#0  add_miranda_methods (base_class=0x40c6aa80, search_class=0x40c6ac80) at /Users/
pinskia/src/gcc-checkin/src/gcc/java/class.c:2007
#1  0x0002a4c4 in add_miranda_methods (base_class=0x40c6aa80, search_class=0x40c6ac80) at 
/Users/pinskia/src/gcc-checkin/src/gcc/java/class.c:2048
#2  0x0002a3ac in layout_class_methods (this_class=0x40c6aa80) at /Users/pinskia/src/gcc-
checkin/src/gcc/java/class.c:2079
#3  0x0000d354 in java_layout_seen_class_methods () at /Users/pinskia/src/gcc-checkin/src/gcc/
java/parse.y:7568
#4  0x000463d4 in parse_class_file () at /Users/pinskia/src/gcc-checkin/src/gcc/java/jcf-parse.c:
700
#5  0x00047550 in java_parse_file (set_yydebug=1086761600) at /Users/pinskia/src/gcc-
checkin/src/gcc/java/jcf-parse.c:1106
#6  0x0005c198 in toplev_main (argc=1078371988, argv=0x4046a694) at /Users/pinskia/src/
gcc-checkin/src/gcc/toplev.c:1812
#7  0x00002534 in _start (argc=17, argv=0xbffffb7c, envp=0xbffffbc4) at /SourceCache/Csu/
Csu-46/crt.c:267
#8  0x000023a8 in start ()

------- Comment #7 From Andrew Pinski 2004-02-01 14:17 -------
Confirmed a regression from 3.3.1.

------- Comment #8 From Mark Mitchell 2004-03-01 01:49 -------
Java problems are not showstoppers, so I have pushed this back to GCC 3.4.1.

------- Comment #9 From Ranjit Mathew 2004-05-03 05:49 -------
Yet another Miranda methods bug!

FWIW, for me it happens *only* if I say:

gcj -shared -o libgl4java.so gl4java/GL4JavaInitException.class
gl4java/GLRunnable.class

It *does not happen* if I:

  1. Omit the "-o" flag (as Andrew Pinski points out).
  2. Use Java sources instead of class files.
  3. Reverse the order of the classes on the command line.

------- Comment #10 From Anthony Green 2004-05-30 22:58 -------
I've hit the same bug building Ant 1.6.1 from rhug.  It happens while building
bytecode from org/apache/tools/ant/types/selectors/BaseSelectorContainer.java.

(gdb) where
#0  0x080bcd93 in add_miranda_methods (base_class=0xf6d27244,
    search_class=0xf6d12b54)
    at /home/green/sources/jhbuild-src/gcc/gcc/java/class.c:2067
#1  0x080bd05b in add_miranda_methods (base_class=0xf6d27244,
    search_class=0xf6d27244)
    at /home/green/sources/jhbuild-src/gcc/gcc/java/class.c:2108
#2  0x080bd57a in layout_class_methods (this_class=0xf6d27244)
    at /home/green/sources/jhbuild-src/gcc/gcc/java/class.c:2140
#3  0x080bd397 in layout_class_methods (this_class=0xf66cf740)
    at /home/green/sources/jhbuild-src/gcc/gcc/java/class.c:2127
#4  0x080710a5 in java_layout_seen_class_methods () at parse.y:7587
#5  0x0807141e in java_layout_classes () at parse.y:7652
#6  0x08078a26 in java_expand_classes () at parse.y:9001
#7  0x080efb6f in java_parse_file (set_yydebug=0)
    at /home/green/sources/jhbuild-src/gcc/gcc/java/jcf-parse.c:1111
#8  0x08486e28 in compile_file ()
    at /home/green/sources/jhbuild-src/gcc/gcc/toplev.c:1653
#9  0x08488769 in do_compile ()
    at /home/green/sources/jhbuild-src/gcc/gcc/toplev.c:2699
#10 0x084887d0 in toplev_main (argc=19, argv=0xfeef1e84)
    at /home/green/sources/jhbuild-src/gcc/gcc/toplev.c:2731
#11 0x0810a90e in main (argc=19, argv=0xfeef1e84)
    at /home/green/sources/jhbuild-src/gcc/gcc/main.c:35


------- Comment #11 From Mark Mitchell 2004-06-09 19:31 -------
Postponed until 3.4.2.

------- Comment #12 From Ranjit Mathew 2004-06-14 19:19 -------
My proposed patch is here:

  http://gcc.gnu.org/ml/java-patches/2004-q2/msg00664.html

------- Comment #13 From CVS Commits 2004-06-17 13:45 -------
Subject: Bug 13948

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rmathew@gcc.gnu.org	2004-06-17 13:45:24

Modified files:
	gcc/java       : ChangeLog parse.y jcf-parse.c 

Log message:
	Fixes PR java/13948
	* parse.y (java_layout_seen_class_methods): Ensure class is loaded
	before trying to lay out its methods.
	* jcf-parse.c (read_class): Track parsed files using canonical paths
	obtained via lrealpath from libiberty.
	(java_parse_file): Likewise.
	(parse_source_file_1): Rename formal parameter to reflect its
	modified purpose. Minor formatting fix.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1380&r2=1.1381
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&r1=1.480&r2=1.481
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-parse.c.diff?cvsroot=gcc&r1=1.159&r2=1.160


------- Comment #14 From Anthony Green 2004-06-29 16:58 -------
I have the patch installed, but I'm still seeing the same failure in ant.

------- Comment #15 From Ranjit Mathew 2004-06-30 04:48 -------
(In reply to comment #14)
> I have the patch installed, but I'm still seeing the same failure in ant.

Are you using the latest CVS sources? Bryce also fixed a couple of class
loading bugs recently (after the fix above went in). If the problem still
persists, can you at least give the backtrace with a "debug_tree()" of
the class that is causing problems?


------- Comment #16 From Mark Mitchell 2004-08-23 20:54 -------
Postponed until GCC 3.4.3.

------- Comment #17 From Tom Tromey 2004-09-23 17:19 -------
I can build the rhug ant just fine with current cvs head.
I'm closing this; I'll ping Anthony to see if he still has problems.

First Last Prev Next    No search results available      Search page      Enter new bug