From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32188 invoked by alias); 12 Aug 2011 07:58:37 -0000 Received: (qmail 32165 invoked by uid 22791); 12 Aug 2011 07:58:37 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_EB,TW_GC 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 07:58:25 +0000 From: "jojelino at gmail dot com" To: java-prs@gcc.gnu.org Subject: [Bug libgcj/50053] New: [4.7 regression] SIGSEGV in natClass.cc:651 Date: Fri, 12 Aug 2011 07:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: --- X-Bugzilla-Changed-Fields: Message-ID: 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/msg00018.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50053 Bug #: 50053 Summary: [4.7 regression] SIGSEGV in natClass.cc:651 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned@gcc.gnu.org ReportedBy: jojelino@gmail.com Created attachment 24989 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24989 testcase,class file using -target 1.1 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 -v [New Thread 11168.0x2234] [New Thread 11168.0x3824] Program received signal SIGSEGV, Segmentation fault. 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(): 0x696c5cb0 <+0>: push %ebp 0x696c5cb1 <+1>: mov %esp,%ebp 0x696c5cb3 <+3>: push %esi 0x696c5cb4 <+4>: push %ebx 0x696c5cb5 <+5>: mov %ecx,%ebx 0x696c5cb7 <+7>: sub $0x10,%esp 0x696c5cba <+10>: movl $0x0,(%esp) 0x696c5cc1 <+17>: call 0x696d64a0 0x696c5cc6 <+22>: sub $0x4,%esp => 0x696c5cc9 <+25>: cmpl $0xffffffff,0x34(%ebx) (gdb) bt #0 java::lang::Class::newInstance (this=0x1) at ../.././libjava/java/lang/natClass.cc:651 #1 0x69d0b567 in ffi_call_win32 () at ../.././libffi/src/x86/win32.S:424 #2 0x69d0b525 in ffi_raw_call (cif=0xbf0a0c, fn=0x696c5cb0 , rvalue=0x22f8ac, fake_avalue=0x22f6d0) at ../.././libffi/src/x86/ffi.c:647 #3 0x6969d056 in _Jv_InterpMethod::run (retp=0x22fa14, args=0x22fa34, meth=0xe12f60) at ../.././libjava/interpret-run.cc:611 #4 0x69d0b715 in ffi_closure_raw_SYSV () at ../.././libffi/src/x86/win32.S:695 #5 0x69d0b567 in ffi_call_win32 () at ../.././libffi/src/x86/win32.S:424 #6 0x69d0b525 in ffi_raw_call (cif=0xbf0b24, fn=0xe30098, rvalue=0x22fc98, fake_avalue=0x22fab0) at ../.././libffi/src/x86/ffi.c:647 #7 0x6969d056 in _Jv_InterpMethod::run (retp=0x22fe00, args=0x22fe20, meth=0xab8e60) at ../.././libjava/interpret-run.cc:611 #8 0x69d0b715 in ffi_closure_raw_SYSV () at ../.././libffi/src/x86/win32.S:695 #9 0x696bdd22 in gnu::java::lang::MainThread::call_main (this=0xbfcf60) at ../.././libjava/gnu/java/lang/natMainThread.cc:54 #10 0x696fb636 in gnu.java.lang.MainThread.run()void (this=@bfcf60) at /tmp/gcc/libjava/gnu/java/lang/MainThread.java:106 #11 0x696cc6a2 in _Jv_ThreadRun (thread=0xbfcf60) at ../.././libjava/java/lang/natThread.cc:335 #12 0x69684040 in _Jv_RunMain (vm_args=0x22ff30, klass=0x0, name=0x3d8925 "foobar", argc=0x2, argv=0x3d89f4, is_jar=0x0) ---Type to continue, or q to quit--- at ../.././libjava/prims.cc:1789 #13 0x66bc6d2a in main (argc=0x5, argv=0x3d89e8) at ../.././libjava/gij.cc:333 #14 0x004010fd in __mingw_CRTStartup () at ../../.././winsup/mingw/crt1.c:244 #15 0x00000408 in ?? () #16 0x7ffde000 in ?? () #17 0x00000000 in ?? () (gdb) i r eax 0x0 0x0 ecx 0x69e8d040 0x69e8d040 edx 0x0 0x0 ebx 0x1 0x1 esp 0x22f628 0x22f628 ebp 0x22f640 0x22f640 esi 0x696c5cb0 0x696c5cb0 edi 0x22f6d0 0x22f6d0 eip 0x696c5cc9 0x696c5cc9 eflags 0x10206 [ PF IF RF ] cs 0x1b 0x1b ss 0x23 0x23 ds 0x23 0x23 es 0x23 0x23 fs 0x3b 0x3b gs 0x0 0x0 (gdb) it is class member function, so %ecx is considered as `this`, but caller doesn't seem to assign `this` to %ecx.