public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/30785] New: Always call destructors in reverse constructor order
@ 2023-08-22 10:48 fweimer at redhat dot com
  2023-08-22 10:49 ` [Bug dynamic-link/30785] " fweimer at redhat dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: fweimer at redhat dot com @ 2023-08-22 10:48 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 30785
           Summary: Always call destructors in reverse constructor order
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

Since

commit 1df71d32fe5f5905ffd5d100e5e9ca8ad6210891
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Sep 20 11:00:42 2022 +0200

    elf: Implement force_first handling in _dl_sort_maps_dfs (bug 28937)

    The implementation in _dl_close_worker requires that the first
    element of l_initfini is always this very map (“We are always the
    zeroth entry, and since we don't include ourselves in the
    dependency analysis start at 1.”).  Rather than fixing that
    assumption, this commit adds an implementation of the force_first
    argument to the new dependency sorting algorithm.  This also means
    that the directly dlopen'ed shared object is always initialized last,
    which is the least surprising behavior in the presence of cycles.

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

it is very likely that with cyclic dependencies, the destructor ordering is not
the reverse of the constructor ordering because there is no working force_first
handling for _dl_fini/dlclose. Reportedly, this results in application
problems.

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

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

end of thread, other threads:[~2023-10-18 14:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 10:48 [Bug dynamic-link/30785] New: Always call destructors in reverse constructor order fweimer at redhat dot com
2023-08-22 10:49 ` [Bug dynamic-link/30785] " fweimer at redhat dot com
2023-08-22 10:49 ` fweimer at redhat dot com
2023-08-22 10:59 ` fweimer at redhat dot com
2023-08-22 13:55 ` sam at gentoo dot org
2023-09-11  7:27 ` fweimer at redhat dot com
2023-09-11 20:04 ` sam at gentoo dot org
2023-09-11 20:04 ` sam at gentoo dot org
2023-09-19  7:36 ` fweimer at redhat dot com
2023-10-06  9:09 ` fweimer at redhat dot com
2023-10-06  9:09 ` fweimer at redhat dot com
2023-10-18 14:29 ` fweimer at redhat dot com
2023-10-18 14:38 ` fweimer at redhat dot com
2023-10-18 14:38 ` fweimer at redhat 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).