public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "drangon dot mail at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/39832] [4.4/4.5 Regression] program built by x86_64-pc-mingw32-g++ run crash, maybe for _Unwind_SjLj_Unregister or __dyn_tls_dtor
Date: Sat, 25 Jul 2009 07:45:00 -0000	[thread overview]
Message-ID: <20090725074508.16981.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39832-15104@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from drangon dot mail at gmail dot com  2009-07-25 07:45 -------
I try the newest gcc svn trunk code, the problem still exist.
program built by x86_64-w64-mingw32-gcc runs ok, but program built by
x86_64-w64-mingw32-g++ runs failed, change libgcc_s_sjlj-1.dll to version
2009-06-20, the same program runs ok ( need not recompile ).

I use gdb or windbg to run the program, it show the following result:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000408059 in __dyn_tls_dtor (hDllHandle=0x400000, dwReason=0,
    lpreserved=0x0)
    at
/compile/mingw-w64-dgn/source/mingw-w64/trunk/mingw-w64-crt/crt/tlssup.c:
120
120    
/compile/mingw-w64-dgn/source/mingw-w64/trunk/mingw-w64-crt/crt/tlssup.c
: No such file or directory.
        in
/compile/mingw-w64-dgn/source/mingw-w64/trunk/mingw-w64-crt/crt/tlssu
p.c
(gdb) bt
#0  0x0000000000408059 in __dyn_tls_dtor (hDllHandle=0x400000, dwReason=0,
    lpreserved=0x0)
    at
/compile/mingw-w64-dgn/source/mingw-w64/trunk/mingw-w64-crt/crt/tlssup.c:
120
#1  0x0000000077f1cc41 in ?? ()
warning: (Internal error: pc 0x3fffff in read in psymtab, but not in symtab.)

#2  0x0000000000400000 in ?? (warning: (Internal error: pc 0x3fffff in read in
p
symtab, but not in symtab.)

)
warning: (Internal error: pc 0x3fffff in read in psymtab, but not in symtab.)

#3  0x0000000000000000 in ?? ()
(gdb) info register
rax            0xfeeefeeefeeefeee       -76843841185972498
rbx            0x49e050 4841552
rcx            0x0      0
rdx            0x0      0
rsi            0x400000 4194304
rdi            0x408024 4227108
rbp            0x22fb10 0x22fb10
rsp            0x22fad0 0x22fad0
r8             0x0      0
r9             0x9f000  651264
r10            0x400080 4194432
r11            0x22fb50 2292560
r12            0x0      0
r13            0x7fffffd8000    8796092858368
r14            0x77fa8f50       2012909392
r15            0x0      0
rip            0x408059 0x408059 <__dyn_tls_dtor+53>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x202002b        33685547
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x2b0000 2818048
(gdb)


0000000000408024 <___dyn_tls_dtor>:

static BOOL WINAPI
__dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
  408024:   55                      push   %rbp
  408025:   48 89 e5                mov    %rsp,%rbp
  408028:   48 83 ec 40             sub    $0x40,%rsp
  40802c:   48 89 4d 10             mov    %rcx,0x10(%rbp)
  408030:   89 55 18                mov    %edx,0x18(%rbp)
  408033:   4c 89 45 20             mov    %r8,0x20(%rbp)
  TlsDtorNode *pnode, *pnext;
  int i;

  if (dwReason != DLL_THREAD_DETACH && dwReason != DLL_PROCESS_DETACH)
  408037:   83 7d 18 03             cmpl   $0x3,0x18(%rbp)
  40803b:   74 10                   je     40804d <___dyn_tls_dtor+0x29>
  40803d:   83 7d 18 00             cmpl   $0x0,0x18(%rbp)
  408041:   74 0a                   je     40804d <___dyn_tls_dtor+0x29>
    return TRUE;
  408043:   b8 01 00 00 00          mov    $0x1,%eax
  408048:   e9 ab 00 00 00          jmpq   4080f8 <___dyn_tls_dtor+0xd4>

  for (pnode = dtor_list; pnode != NULL; pnode = pnext)
  40804d:   48 8d 0d 6c 3a 08 00    lea    0x83a6c(%rip),%rcx        # 48bac0
<___emutls_v.dtor_list>
  408054:   e8 ef 0c 00 00          callq  408d48 <___emutls_get_address>
  408059:   48 8b 00                mov    (%rax),%rax
  40805c:   48 89 45 f0             mov    %rax,-0x10(%rbp)
  408060:   eb 6a                   jmp    4080cc <___dyn_tls_dtor+0xa8>
    {
      for (i = pnode->count - 1; i >= 0; --i)
  408062:   48 8b 45 f0             mov    -0x10(%rbp),%rax
  408066:   8b 00                   mov    (%rax),%eax
  408068:   83 e8 01                sub    $0x1,%eax
  40806b:   89 45 fc                mov    %eax,-0x4(%rbp)
  40806e:   eb 2f                   jmp    40809f <___dyn_tls_dtor+0x7b>


-- 

drangon dot mail at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.5 Regression] program    |[4.4/4.5 Regression] program
                   |built by x86_64-pc-mingw32- |built by x86_64-pc-mingw32-
                   |gcc run crash, maybe for    |g++ run crash, maybe for
                   |_Unwind_SjLj_Unregister,    |_Unwind_SjLj_Unregister or
                   |                            |__dyn_tls_dtor


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


  parent reply	other threads:[~2009-07-25  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21  5:23 [Bug libstdc++/39832] New: program built by x86_64-pc-mingw32-gcc run crash, maybe for _Unwind_SjLj_Unregister, drangon dot mail at gmail dot com
2009-04-22 23:53 ` [Bug middle-end/39832] " pinskia at gcc dot gnu dot org
2009-04-23 15:49 ` drangon dot mail at gmail dot com
2009-04-23 15:50 ` [Bug middle-end/39832] [4.5 Regression] " pinskia at gcc dot gnu dot org
2009-07-21  7:46 ` drangon dot mail at gmail dot com
2009-07-21  7:48 ` drangon dot mail at gmail dot com
2009-07-25  7:45 ` drangon dot mail at gmail dot com [this message]
2009-07-29 22:33 ` [Bug middle-end/39832] [4.4/4.5 Regression] program built by x86_64-pc-mingw32-g++ run crash, maybe for _Unwind_SjLj_Unregister or __dyn_tls_dtor jsm28 at gcc dot gnu dot org
2009-08-30  8:27 ` ktietz at gcc dot gnu dot org
2009-08-30 13:53 ` drangon dot mail at gmail dot com
2009-09-04 12:18 ` fxcoudert at gcc dot gnu dot 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=20090725074508.16981.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).