public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "jojelino at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-50053-8172-PJAVu9ZkBW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50053-8172@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from gee <jojelino at gmail dot com> 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 <java::lang::Class::newInstance()>, 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 <return> to continue, or q <return> 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
<java::lang::Class::isPrimitive()+12>
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
<java.lang.Class.memberAccessCheck(int)void>
   0x696ca562 <+28>:    sub    $0x4,%esp
   0x696ca565 <+31>:    mov    -0x1c(%ebp),%eax
   0x696ca568 <+34>:    mov    %eax,%ecx
   0x696ca56a <+36>:    call   0x6a45d588 <java::lang::Class::isPrimitive()>
=> 0x696ca56f <+41>:    test   %al,%al
   0x696ca571 <+43>:    jne    0x696ca5a5 <java::lang::Class::newInstance()+95>
   0x696ca573 <+45>:    mov    -0x1c(%ebp),%eax
   0x696ca576 <+48>:    mov    %eax,%ecx
   0x696ca578 <+50>:    call   0x6a45d568 <java::lang::Class::isInterface()>
   0x696ca57d <+55>:    test   %al,%al
   0x696ca57f <+57>:    jne    0x696ca5a5 <java::lang::Class::newInstance()+95>
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb)


  parent reply	other threads:[~2011-08-12 11:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  7:58 [Bug libgcj/50053] New: " jojelino at gmail dot com
2011-08-12  8:28 ` [Bug libgcj/50053] " rguenth at gcc dot gnu.org
2011-08-12  8:29 ` rguenth at gcc dot gnu.org
2011-08-12  9:00 ` jojelino at gmail dot com
2011-08-12 11:45 ` jojelino at gmail dot com [this message]
2011-10-10 12:16 ` rguenth at gcc dot gnu.org
2011-10-22 19:33 ` jojelino at gmail dot com
2011-10-23 13:43 ` jojelino at gmail dot com
2011-12-08 19:13 ` [Bug libgcj/50053] [4.7 regression] jc1 doesn't emit static initializer or initializer code for super class without -findirect-dispatch jojelino at gmail dot com
2011-12-08 19:16 ` jojelino at gmail dot com
2011-12-09 21:27 ` ktietz at gcc dot gnu.org
2011-12-12 10:41 ` ktietz at gcc dot gnu.org
2011-12-12 10:42 ` ktietz at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-50053-8172-PJAVu9ZkBW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).