public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/14545] Many tests fail when linking statically
Date: Wed, 05 Sep 2012 18:26:00 -0000	[thread overview]
Message-ID: <bug-14545-131-mfhxa1j1HT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14545-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=14545

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-05 18:25:56 UTC ---
It crashes at

(gdb) bt
#0  malloc_printerr (action=3, str=0x4a3079 "free(): invalid pointer", 
    ptr=0x6da000 <static_dtv>) at malloc.c:4950
#1  0x0000000000444c01 in _dl_deallocate_tls (tcb=tcb@entry=0x6dd880, 
    dealloc_tcb=dealloc_tcb@entry=false) at dl-tls.c:483
#2  0x0000000000403110 in __deallocate_stack (pd=pd@entry=0x6dd880)
    at allocatestack.c:749
#3  0x0000000000403ea9 in __free_tcb (pd=pd@entry=0x6dd880)
    at pthread_create.c:224
#4  0x0000000000405178 in pthread_join (threadid=threadid@entry=7198848, 
    thread_return=thread_return@entry=0x7ffff7ffcd58) at pthread_join.c:113
#5  0x00000000004027cd in tf (arg=0x6dd880) at tst-cancel21.c:133
#6  0x0000000000403f8f in start_thread (arg=0x7ffff7ffd700)
    at pthread_create.c:308
#7  0x0000000000443c69 in clone ()
(gdb) p dtv
$2 = (dtv_t *) 0x6da010 <static_dtv+16>
(gdb) 

Since dtv comes from,

static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS];

in csu/libc-tls.c,

  /* The array starts with dtv[-1].  */
#ifdef SHARED
  if (dtv != GL(dl_initial_dtv))
#endif
    free (dtv - 1); 

is incorrect.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  reply	other threads:[~2012-09-05 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 13:53 [Bug libc/14545] New: " hjl.tools at gmail dot com
2012-09-05 18:26 ` hjl.tools at gmail dot com [this message]
2012-09-07 17:18 ` [Bug libc/14545] " hjl.tools at gmail dot com
2014-06-17  4:45 ` fweimer at redhat dot com

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-14545-131-mfhxa1j1HT@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /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).