public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
       [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
@ 2010-11-18 14:15 ` schwab@linux-m68k.org
  2011-01-20  1:10 ` drepper.fsp at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2010-11-18 14:15 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|i686-linux-gnu              |
             Status|WAITING                     |NEW
               Host|i686-linux-gnu              |
              Build|i686-linux-gnu              |

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


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
       [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
  2010-11-18 14:15 ` [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered schwab@linux-m68k.org
@ 2011-01-20  1:10 ` drepper.fsp at gmail dot com
  2011-08-02 20:21 ` werkt0 at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-01-20  1:10 UTC (permalink / raw)
  To: glibc-bugs

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

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-01-19 20:35:16 UTC ---
I check in your test and a patch I wrote.

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


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
       [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
  2010-11-18 14:15 ` [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered schwab@linux-m68k.org
  2011-01-20  1:10 ` drepper.fsp at gmail dot com
@ 2011-08-02 20:21 ` werkt0 at gmail dot com
  2011-10-29 17:30 ` drepper.fsp at gmail dot com
  2014-06-30 17:46 ` fweimer at redhat dot com
  4 siblings, 0 replies; 11+ messages in thread
From: werkt0 at gmail dot com @ 2011-08-02 20:21 UTC (permalink / raw)
  To: glibc-bugs

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

George Gensure <werkt0 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
         AssignedTo|drepper.fsp at gmail dot    |werkt0 at gmail dot com
                   |com                         |

--- Comment #8 from George Gensure <werkt0 at gmail dot com> 2011-08-02 20:20:58 UTC ---
Created attachment 5872
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5872
Example of post-patch initialization order failure.

Your patch is not sufficient.  You corrected the given case, but opened up
another failure case.  I have attached a reproducer for the failure case.  I
recommend again that my previous patch be accepted as it was, since it worked
for both of these cases.  The failure condition now, which did not break under
the previous implementation, is described as follows:

main => deps1, deps4, deps3
deps1 => deps2
deps2 => deps3
deps3 => deps4

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


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
       [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-08-02 20:21 ` werkt0 at gmail dot com
@ 2011-10-29 17:30 ` drepper.fsp at gmail dot com
  2014-06-30 17:46 ` fweimer at redhat dot com
  4 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-10-29 17:30 UTC (permalink / raw)
  To: glibc-bugs

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

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |drepper.fsp at gmail dot
                   |                            |com
         Resolution|                            |FIXED

--- Comment #9 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-10-29 17:29:59 UTC ---
THis has long since been handled.

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


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
       [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-10-29 17:30 ` drepper.fsp at gmail dot com
@ 2014-06-30 17:46 ` fweimer at redhat dot com
  4 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 17:46 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=11724

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
                   ` (4 preceding siblings ...)
  2010-06-22 11:28 ` schwab at linux-m68k dot org
@ 2010-06-22 16:55 ` werkt0 at gmail dot com
  5 siblings, 0 replies; 11+ messages in thread
From: werkt0 at gmail dot com @ 2010-06-22 16:55 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From werkt0 at gmail dot com  2010-06-22 16:55 -------
(In reply to comment #5)
> int a = (l > p->l) - (l < p->l);

Fine by me.  Do you want an update of the diff for this?

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
                   ` (3 preceding siblings ...)
  2010-06-21 20:12 ` werkt0 at gmail dot com
@ 2010-06-22 11:28 ` schwab at linux-m68k dot org
  2010-06-22 16:55 ` werkt0 at gmail dot com
  5 siblings, 0 replies; 11+ messages in thread
From: schwab at linux-m68k dot org @ 2010-06-22 11:28 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From schwab at linux-m68k dot org  2010-06-22 11:28 -------
(In reply to comment #2)
> there's a better portable pointer equiv integer type

int a = (l > p->l) - (l < p->l);

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
                   ` (2 preceding siblings ...)
  2010-06-19 19:17 ` drepper at redhat dot com
@ 2010-06-21 20:12 ` werkt0 at gmail dot com
  2010-06-22 11:28 ` schwab at linux-m68k dot org
  2010-06-22 16:55 ` werkt0 at gmail dot com
  5 siblings, 0 replies; 11+ messages in thread
From: werkt0 at gmail dot com @ 2010-06-21 20:12 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From werkt0 at gmail dot com  2010-06-21 20:12 -------
Created an attachment (id=4855)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4855&action=view)
Revised fix including test case (case fails independently in the previous
implementation of ld.so)

Test case added to elf/ as tst-initorder, with a comparison test to make sure
that the initialization occurs in order.  This is a failure set for the
previous implementation.

I've also done a couple of tweaks to the existing patch, returning instead of
trying to sort if we run out of memory during fini.  Technically the previous
implementation could be used if memory allocation fails, since it does not use
any new allocations.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4852 is|0                           |1
           obsolete|                            |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
  2010-06-18 18:40 ` [Bug libc/11724] " werkt0 at gmail dot com
  2010-06-18 20:17 ` werkt0 at gmail dot com
@ 2010-06-19 19:17 ` drepper at redhat dot com
  2010-06-21 20:12 ` werkt0 at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: drepper at redhat dot com @ 2010-06-19 19:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-06-19 19:17 -------
You'll have to provide a complete small, self-contained test case.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
  2010-06-18 18:40 ` [Bug libc/11724] " werkt0 at gmail dot com
@ 2010-06-18 20:17 ` werkt0 at gmail dot com
  2010-06-19 19:17 ` drepper at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: werkt0 at gmail dot com @ 2010-06-18 20:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From werkt0 at gmail dot com  2010-06-18 20:16 -------
Created an attachment (id=4852)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4852&action=view)
topological sort implementation for dependency resolution

I've used the implementation of tsort from coreutils here almost verbatim.  One
point of contention might be the (long) cast for comparison in dl-tsort.c - if
there's a better portable pointer equiv integer type that will give a negative
value for subtraction (since pointers won't), that will be fine.  Obviously
this introduces some recursion into ld.so, and I saw in a comment that that is
not desirable.	This implementation works to provide correct init and fini
ordering for everything I've thrown at it.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered
  2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
@ 2010-06-18 18:40 ` werkt0 at gmail dot com
  2010-06-18 20:17 ` werkt0 at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: werkt0 at gmail dot com @ 2010-06-18 18:40 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From werkt0 at gmail dot com  2010-06-18 18:40 -------
Created an attachment (id=4851)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4851&action=view)
Dependency hierarchy which breaks existing deps sorting (apologies for the
complexity)

This is the list of l_initfini in dl-deps.c when the initialization order is
determined which produces incorrect output.  I have left in the leader
dependency for each library which points back to itself.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2014-06-30 17:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11724-131@http.sourceware.org/bugzilla/>
2010-11-18 14:15 ` [Bug libc/11724] ld.so - Initialization and Termination Functions incorrectly ordered schwab@linux-m68k.org
2011-01-20  1:10 ` drepper.fsp at gmail dot com
2011-08-02 20:21 ` werkt0 at gmail dot com
2011-10-29 17:30 ` drepper.fsp at gmail dot com
2014-06-30 17:46 ` fweimer at redhat dot com
2010-06-18 18:33 [Bug libc/11724] New: " werkt0 at gmail dot com
2010-06-18 18:40 ` [Bug libc/11724] " werkt0 at gmail dot com
2010-06-18 20:17 ` werkt0 at gmail dot com
2010-06-19 19:17 ` drepper at redhat dot com
2010-06-21 20:12 ` werkt0 at gmail dot com
2010-06-22 11:28 ` schwab at linux-m68k dot org
2010-06-22 16:55 ` werkt0 at gmail dot com

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