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/50053] New: [4.7 regression] SIGSEGV in natClass.cc:651


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
<java.lang.Class.memberAccessCheck(int)void>
   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 <java::lang::Class::newInstance()>, 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 <return> to continue, or q <return> 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
<java::lang::Class::newInstance()+25>
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.


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