public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904
@ 2011-10-22 15:13 jojelino at gmail dot com
  2011-10-22 15:15 ` [Bug libgcj/50831] " jojelino at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2011-10-22 15:13 UTC (permalink / raw)
  To: java-prs

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

             Bug #: 50831
           Summary: [4.7 regression] SIGSEGV in link.cc:1904
    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
              Host: i686-pc-cygwin
            Target: i686-pc-mingw32
             Build: i686-pc-cygwin


Running gcj-dbtool or gjar or any executable compiled with GCJ tag sigsegvs

/bin/sh ./libtool --tag=GCJ  --mode=link /tmp/gcc/host-i686-pc-cygwin/gcc/gcj
-B/tmp/gcc/i686-pc-mingw32/libjava/ -B/tmp/gcc/host-i686-pc-cygwin/gcc/
-L/tmp/gcc/i686-pc-mingw32/winsup/mingw
-L/tmp/gcc/i686-pc-mingw32/winsup/w32api/lib -isystem
/tmp/gcc/winsup/mingw/include -isystem /tmp/gcc/winsup/w32api/include
-B/usr/i686-pc-mingw32/bin/ -B/usr/i686-pc-mingw32/lib/ -isystem
/usr/i686-pc-mingw32/include -isystem /usr/i686-pc-mingw32/sys-include
--sysroot=/usr/i686-pc-mingw32/sys-root   -L/tmp/gcc/i686-pc-mingw32/libjava
-ffloat-store -fomit-frame-pointer -Usun -fno-omit-frame-pointer -g -O2  -o
gcj-dbtool.exe --main=gnu.gcj.tools.gcj_dbtool.Main -rpath
/usr/i686-pc-mingw32/lib -shared-libgcc   gnu/gcj/tools/gcj_dbtool/natMain.o
gnu/gcj/tools/gcj_dbtool.lo -L/tmp/gcc/i686-pc-mingw32/libjava/.libs libgcj.la
gdb --args .libs/gcj-dbtool.exe
(gdb) p klass->engine
$14 = (_Jv_ExecutionEngine *) 0x0
(gdb) p *klass
$15 = (java::lang::Class) {
  <java::lang::Object> = {<No data fields>},
  members of java::lang::Class:
  static class$ = {
    <java::lang::Object> = {<No data fields>},
    members of java::lang::Class:
    static class$ = <same as static member of an already seen type>,
    next_or_version = 0x0,
    name = 0x6a04c874,
    accflags = 0x31,
    superclass = 0x69d57180,
    constants = {
      size = 0x25,
      tags = 0x69d57620 "",
      data = 0x69d57580
    },
    {
      methods = 0x69d57660,
      element_type = 0x69d57660
    },
    method_count = 0x52,
    vtable_method_count = 0x41,
    fields = 0x0,
---Type <return> to continue, or q <return> to quit---
    size_in_bytes = 0x90,
    field_count = 0x0,
    static_field_count = 0x0,
    vtable = 0x69d57468,
    otable = 0x0,
    otable_syms = 0x0,
    atable = 0x0,
    atable_syms = 0x0,
    itable = 0x0,
    itable_syms = 0x0,
    catch_classes = 0x69d57cc8,
    interfaces = 0x69d57ce0,
    loader = 0x0,
    interface_count = 0x4,
    state = 0xe,
    thread = 0x1,
    depth = 0x1,
    ancestors = 0xa64ff0,
    {
      idt = 0xa68fc8,
      ioffsets = 0xa68fc8
    },
    arrayclass = 0xa6ced8,
---Type <return> to continue, or q <return> to quit---
    protectionDomain = 0x0,
    assertion_table = 0x0,
    hack_signers = 0x0,
    chain = 0x69e6c120,
    aux_info = 0x0,
    engine = 0x6a3a95c0,
    reflection_data = 0x6a04c8a0 "\001"
  },
  next_or_version = 0x400635d8,
  name = 0x4060bc,
  accflags = 0x21,
  superclass = 0x69d57180,
  constants = {
    size = 0x32,
    tags = 0x405420 "",
    data = 0x4052c0
  },
  {
    methods = 0x405460,
    element_type = 0x405460
  },
  method_count = 0xa,
  vtable_method_count = 0x6,
---Type <return> to continue, or q <return> to quit---
  fields = 0x405528,
  size_in_bytes = 0x4,
  field_count = 0x1,
  static_field_count = 0x1,
  vtable = 0x4051a8,
  otable = 0x0,
  otable_syms = 0x0,
  atable = 0x0,
  atable_syms = 0x0,
  itable = 0x0,
  itable_syms = 0x0,
  catch_classes = 0x405538,
  interfaces = 0x0,
  loader = 0x0,
  interface_count = 0x0,
  state = 0x1,
  thread = 0x0,
  depth = 0x0,
  ancestors = 0x0,
  {
    idt = 0x0,
    ioffsets = 0x0
  },
---Type <return> to continue, or q <return> to quit---
  arrayclass = 0x0,
  protectionDomain = 0x0,
  assertion_table = 0x0,
  hack_signers = 0x0,
  chain = 0x0,
  aux_info = 0x0,
  engine = 0x0,
  reflection_data = 0x4060de ""
}

why do we have two engine field?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] SIGSEGV in link.cc:1904
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
@ 2011-10-22 15:15 ` jojelino at gmail dot com
  2011-10-22 16:30 ` [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll jojelino at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2011-10-22 15:15 UTC (permalink / raw)
  To: java-prs

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

--- Comment #1 from gee <jojelino at gmail dot com> 2011-10-22 15:15:07 UTC ---

$ gdb --args ./gcj-dbtool.exe
rGNU gdb (GDB) 7.3.50.20110903-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...

warning: the current range check setting does not match the language.


warning: the current type check setting does not match the language.

Whether backtraces should continue past the entry point of a program is off.
Reading symbols from
/tmp/gcc/i686-pc-mingw32/libjava/.libs/gcj-dbtool.exe...done.
(gdb) r
Starting program: /tmp/gcc/i686-pc-mingw32/libjava/.libs/gcj-dbtool.exe
[New Thread 3860.0x1a7c]
[New Thread 3860.0x1c98]

Program received signal SIGSEGV, Segmentation fault.
0x69690e36 in verify_class (klass=0x405100) at ../.././libjava/link.cc:1904
1904      klass->engine->verify(klass);
(gdb) bt
#0  0x69690e36 in verify_class (klass=0x405100) at ../.././libjava/link.cc:1904
#1  _Jv_Linker::wait_for_state (klass=0x405100, state=0x9)
    at ../.././libjava/link.cc:2074
#2  0x696c5280 in java::lang::Class::initializeClass (this=0x405100)
    at ../.././libjava/java/lang/natClass.cc:722
#3  0x00401f38 in gnu.gcj.tools.gcj_dbtool.Main.main(java.lang.String[])void (
    s=@a6af98) at /tmp/gcc/libjava/gnu/gcj/tools/gcj_dbtool/Main.java:26
#4  0x696bd552 in gnu::java::lang::MainThread::call_main (this=0xc0bf60)
    at ../.././libjava/gnu/java/lang/natMainThread.cc:54
#5  0x696fad96 in gnu.java.lang.MainThread.run()void (this=@c0bf60)
    at /tmp/gcc/libjava/gnu/java/lang/MainThread.java:106
#6  0x696cbeb2 in _Jv_ThreadRun (thread=0xc0bf60)
    at ../.././libjava/java/lang/natThread.cc:335
#7  0x69684030 in _Jv_RunMain (vm_args=0x0, klass=0x405100, name=0x0,
    argc=0x1, argv=0x3d8810, is_jar=0x0) at ../.././libjava/prims.cc:1789
#8  0x69684226 in _Jv_RunMain (klass=0x405100, name=0x0, argc=0x1,
    argv=0x3d8810, is_jar=0x0) at ../.././libjava/prims.cc:1814
#9  0x6968428f in JvRunMain (klass=0x405100, argc=0x1, argv=0x3d8810)
    at ../.././libjava/prims.cc:1820
#10 0x00401402 in _fu0___Jv_Compiler_Properties () at /tmp/ccMCI8VE.i:11
#11 0x004010bb in __mingw_CRTStartup ()
    at
/usr/src/mingw-runtime/mingw-runtime-3.20-1/src/mingwrt-3.20-mingw32/crt1.c:244
---Type <return> to continue, or q <return> to quit---
#12 0x004012a8 in mainCRTStartup ()
    at
/usr/src/mingw-runtime/mingw-runtime-3.20-1/src/mingwrt-3.20-mingw32/crt1.c:264
(gdb)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
  2011-10-22 15:15 ` [Bug libgcj/50831] " jojelino at gmail dot com
@ 2011-10-22 16:30 ` jojelino at gmail dot com
  2011-10-23 10:59 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2011-10-22 16:30 UTC (permalink / raw)
  To: java-prs

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

gee <jojelino at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.7 regression] SIGSEGV in |[4.7 regression]
                   |link.cc:1904                |__gcc_register_frame must
                   |                            |throw error when failed to
                   |                            |load dll

--- Comment #2 from gee <jojelino at gmail dot com> 2011-10-22 16:30:35 UTC ---
in config/i386/{cygwin,mingw32}.h, LIBGCJ_SONAME is hard-coded so
__gcc_register_frame tries to load libgcj-12.dll, but in
libjava/libtool-version the major version is 13. for permanant fix, it would be
needed to generate header file on configuration time for proper libjava
version.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
  2011-10-22 15:15 ` [Bug libgcj/50831] " jojelino at gmail dot com
  2011-10-22 16:30 ` [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll jojelino at gmail dot com
@ 2011-10-23 10:59 ` rguenth at gcc dot gnu.org
  2012-01-18  6:21 ` jojelino at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-23 10:59 UTC (permalink / raw)
  To: java-prs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
                   ` (2 preceding siblings ...)
  2011-10-23 10:59 ` rguenth at gcc dot gnu.org
@ 2012-01-18  6:21 ` jojelino at gmail dot com
  2012-01-18  6:46 ` jojelino at gmail dot com
  2012-01-20  0:05 ` ktietz at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2012-01-18  6:21 UTC (permalink / raw)
  To: java-prs

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

gee <jojelino at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
                   ` (3 preceding siblings ...)
  2012-01-18  6:21 ` jojelino at gmail dot com
@ 2012-01-18  6:46 ` jojelino at gmail dot com
  2012-01-20  0:05 ` ktietz at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2012-01-18  6:46 UTC (permalink / raw)
  To: java-prs

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

gee <jojelino at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll
  2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
                   ` (4 preceding siblings ...)
  2012-01-18  6:46 ` jojelino at gmail dot com
@ 2012-01-20  0:05 ` ktietz at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-01-20  0:05 UTC (permalink / raw)
  To: java-prs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ktietz at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-01-20 00:05:07 UTC ---
Issue was fixed by Dave Korn at rev 181055.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-20  0:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-22 15:13 [Bug libgcj/50831] New: [4.7 regression] SIGSEGV in link.cc:1904 jojelino at gmail dot com
2011-10-22 15:15 ` [Bug libgcj/50831] " jojelino at gmail dot com
2011-10-22 16:30 ` [Bug libgcj/50831] [4.7 regression] __gcc_register_frame must throw error when failed to load dll jojelino at gmail dot com
2011-10-23 10:59 ` rguenth at gcc dot gnu.org
2012-01-18  6:21 ` jojelino at gmail dot com
2012-01-18  6:46 ` jojelino at gmail dot com
2012-01-20  0:05 ` ktietz at gcc dot gnu.org

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).