Bug 2696 - NPTL libthread_db misbehaves at startup of a static executable
Summary: NPTL libthread_db misbehaves at startup of a static executable
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: 2.4
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-24 20:19 UTC by Daniel Jacobowitz
Modified: 2019-04-10 07:15 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2006-05-24 20:27:00
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Jacobowitz 2006-05-24 20:19:10 UTC
In short, there is no way to either enable libthread_db at _start time for a
static binary, or find the appropriate time to initialize it later.  I propose
allowing it to initialize, and then reporting the "creation" of the first thread
once the pthreads library is initialized.

The patch is here:

  http://sourceware.org/ml/libc-alpha/2006-03/msg00014.html

Without a fix for this problem, GDB can not debug static executables which use NPTL.
Comment 1 Roland McGrath 2006-05-24 20:27:00 UTC
I'm responsible for nptl_db and recall some poking related to this in the past.
I'll look into it, but it won't be before June 5 as I'm leaving for vacation now.
Comment 2 Daniel Jacobowitz 2006-10-25 15:03:34 UTC
Roland, did you ever get a chance to look at this?  Another user just reported a
similar problem on gdb@.
Comment 3 Roland McGrath 2006-10-25 18:55:50 UTC
Sorry, still back burner.  It will be a little while longer before I get to my
libc backlog.
Comment 4 Daniel Jacobowitz 2007-06-27 15:49:55 UTC
Roland checked in an NPTL patch for this and I fixed gdb.