From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30201 invoked by alias); 12 Aug 2011 11:45:41 -0000 Received: (qmail 30175 invoked by uid 22791); 12 Aug 2011 11:45:39 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_EB X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Aug 2011 11:45:27 +0000 From: "jojelino at gmail dot com" To: java-prs@gcc.gnu.org Subject: [Bug libgcj/50053] [4.7 regression] SIGSEGV in natClass.cc:651 Date: Fri, 12 Aug 2011 11:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcj X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jojelino at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2011-q3/txt/msg00022.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50053 --- Comment #3 from gee 2011-08-12 11:44:58 UTC --- using only '-fno-ipa-sra -fno-ipa-cp' didn't work too. Reading symbols from /usr/i686-pc-mingw32/java/bin/i686-pc-mingw32-gij...done. (gdb) r Starting program: /usr/i686-pc-mingw32/java/bin/i686-pc-mingw32-gij -cp . foobar --verbose [New Thread 9260.0x2b18] [New Thread 9260.0x3634] Program received signal SIGSEGV, Segmentation fault. 0x6a45d594 in java::lang::Class::isPrimitive (this=0x1) at ../.././libjava/java/lang/Class.h:428 428 return vtable == JV_PRIMITIVE_VTABLE; (gdb) bt #0 0x6a45d594 in java::lang::Class::isPrimitive (this=0x1) at ../.././libjava/java/lang/Class.h:428 #1 0x696ca56f in java::lang::Class::newInstance (this=0x1) at ../.././libjava/java/lang/natClass.cc:651 #2 0x6a432d37 in ffi_call_win32 () at ../.././libffi/src/x86/win32.S:424 #3 0x6a432d13 in ffi_raw_call (cif=0xbf0a0c, fn=0x696ca546 , rvalue=0x22e8c4, fake_avalue=0x22e5a0) at ../.././libffi/src/x86/ffi.c:647 #4 0x696a351f in _Jv_InterpMethod::run (retp=0x22f104, args=0x22f124, meth=0xe12f60) at ../.././libjava/interpret-run.cc:611 #5 0x696a2251 in _Jv_InterpMethod::run_normal (ret=0x22f104, args=0x22f124, __this=0xe12f60) at ../.././libjava/interpret.cc:358 #6 0x6a432ee5 in ffi_closure_raw_SYSV () at ../.././libffi/src/x86/win32.S:695 #7 0x6a432d37 in ffi_call_win32 () at ../.././libffi/src/x86/win32.S:424 #8 0x6a432d13 in ffi_raw_call (cif=0xbf0b24, fn=0xe30098, rvalue=0x22f4e0, fake_avalue=0x22f1c0) at ../.././libffi/src/x86/ffi.c:647 #9 0x696a351f in _Jv_InterpMethod::run (retp=0x22fd20, args=0x22fd40, meth=0xab8e60) at ../.././libjava/interpret-run.cc:611 #10 0x696a237a in _Jv_InterpMethod::run_class (ret=0x22fd20, args=0x22fd40, __this=0xab8e60) at ../.././libjava/interpret.cc:407 #11 0x6a432ee5 in ffi_closure_raw_SYSV () at ../.././libffi/src/x86/win32.S:695 #12 0x696c282c in gnu::java::lang::MainThread::call_main (this=0xbfdf60) at ../.././libjava/gnu/java/lang/natMainThread.cc:54 ---Type to continue, or q to quit--- #13 0x6973c37d in gnu.java.lang.MainThread.run()void (this=@bfdf60) at /tmp/gcc/libjava/gnu/java/lang/MainThread.java:106 #14 0x696d4d4d in _Jv_ThreadRun (thread=0xbfdf60) at ../.././libjava/java/lang/natThread.cc:335 #15 0x69684e9b in _Jv_RunMain (vm_args=0x22fef4, klass=0x0, name=0x3d8925 "foobar", argc=0x2, argv=0x3d89fc, is_jar=0x0) at ../.././libjava/prims.cc:1789 #16 0x66bc24b0 in _fu0___ZN3gcj13verifyClassesE () at ../.././libjava/gij.cc:333 #17 0x004010fd in __mingw_CRTStartup () at ../../.././winsup/mingw/crt1.c:244 #18 0x00000408 in ?? () #19 0x7ffda000 in ?? () #20 0x00000000 in ?? () (gdb) Quit (gdb) down Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) Bottom (innermost) frame selected; you cannot go down. (gdb) print vtable Cannot access memory at address 0x35 (gdb) print this $1 = (java::lang::Class * const) 0x1 (gdb) i r eax 0x1 0x1 ecx 0x1 0x1 edx 0x0 0x0 ebx 0x696ca546 0x696ca546 esp 0x22e4a8 0x22e4a8 ebp 0x22e4c0 0x22e4c0 esi 0xe300bc 0xe300bc edi 0x22e5a4 0x22e5a4 eip 0x6a45d594 0x6a45d594 eflags 0x10212 [ AF IF RF ] cs 0x1b 0x1b ss 0x23 0x23 ds 0x23 0x23 es 0x23 0x23 fs 0x3b 0x3b gs 0x0 0x0 (gdb) disass Dump of assembler code for function java::lang::Class::isPrimitive(): 0x6a45d588 <+0>: push %ebp 0x6a45d589 <+1>: mov %esp,%ebp 0x6a45d58b <+3>: sub $0x18,%esp 0x6a45d58e <+6>: mov %ecx,-0xc(%ebp) 0x6a45d591 <+9>: mov -0xc(%ebp),%eax => 0x6a45d594 <+12>: mov 0x34(%eax),%eax 0x6a45d597 <+15>: cmp $0xffffffff,%eax 0x6a45d59a <+18>: sete %al 0x6a45d59d <+21>: leave 0x6a45d59e <+22>: ret End of assembler dump. (gdb) up #1 0x696ca56f in java::lang::Class::newInstance (this=0x1) at ../.././libjava/java/lang/natClass.cc:651 651 if (isPrimitive () (gdb) disass Dump of assembler code for function java::lang::Class::newInstance(): 0x696ca546 <+0>: push %ebp 0x696ca547 <+1>: mov %esp,%ebp 0x696ca549 <+3>: push %esi 0x696ca54a <+4>: push %ebx 0x696ca54b <+5>: sub $0x30,%esp 0x696ca54e <+8>: mov %ecx,-0x1c(%ebp) 0x696ca551 <+11>: mov -0x1c(%ebp),%eax 0x696ca554 <+14>: movl $0x0,(%esp) 0x696ca55b <+21>: mov %eax,%ecx 0x696ca55d <+23>: call 0x696e0e14 0x696ca562 <+28>: sub $0x4,%esp 0x696ca565 <+31>: mov -0x1c(%ebp),%eax 0x696ca568 <+34>: mov %eax,%ecx 0x696ca56a <+36>: call 0x6a45d588 => 0x696ca56f <+41>: test %al,%al 0x696ca571 <+43>: jne 0x696ca5a5 0x696ca573 <+45>: mov -0x1c(%ebp),%eax 0x696ca576 <+48>: mov %eax,%ecx 0x696ca578 <+50>: call 0x6a45d568 0x696ca57d <+55>: test %al,%al 0x696ca57f <+57>: jne 0x696ca5a5 ---Type to continue, or q to quit---q Quit (gdb)