This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/12708] SIGSEGV, Segmentation fault starting java program


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12708



------- Additional Comments From pj at csc dot fi  2003-10-22 07:27 -------
Subject: Re:  SIGSEGV, Segmentation fault starting java
	program

On ke, 2003-10-22 at 01:38, bryce at mckinlay dot net dot nz wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12708
> ------- Additional Comments From bryce at mckinlay dot net dot nz  2003-10-21 22:38 -------
> This looks like a runtime initialization problem. Class.forName(), and subsequently, VMClassLoader 
> is being called from inside _Jv_CreateJavaVM, but the File.separator field has not yet been set.
> 
> 1. Does a "hello world" program work ok? 

No, same error. Good Question! I was stupid to not tested myself.

> 2. Can you try this with the current CVS code?

No, I tried, but I seems to have difficulties to compile it:
-I../../gcc/gcc/ada ../../gcc/gcc/ada/gnat1drv.adb -o ada/gnat1drv.o
gnatbind -C -I- -I. -Iada -I../../gcc/gcc/ada -o ada/b_gnat1.c -n
ada/gnat1drv.ali
fatal error: file gnat1drv.ali is incorrectly formatted
make sure you are using consistent versions of gcc/gnatbind
9.   R nnvvnnnnnnnnnvvvnnvnvvnnnnnnnnnvnvnnnnnnnvvvnnnnvvnn
                                                     |
make[2]: *** [ada/b_gnat1.c] Error 4
make[2]: Leaving directory `/tmp/pj/cvs/objdir/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/tmp/pj/cvs/objdir/gcc'
make: *** [bootstrap] Error 2

I can try again with other configuration options if you like. 

> 3. Can you narrow this problem down to a small test case?

Yes!
 cat > HelloWorld.java
class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
}
}
[pj@rubiini pj]$ /v/linux22_i386/lang/gcc/3.3.2/bin/gcj
--main=HelloWorld -g -o HelloWorld HelloWorld.java
[pj@rubiini pj]$ ./HelloWorld 
Väärä muistilohko (muistin tila talletettu)
oops my LANG was fi_FI
setenv LANG en_EN
./HelloWorld
Segmentation fault (core dumped)

I'm compiling gcc again with -march=i686 instead of pentium4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]