From: Nat! <nat@mulle-kybernetik.com>
To: libc-help@sourceware.org
Subject: Re: Problem with atexit and _dl_fini
Date: Tue, 11 Jun 2019 22:40:00 -0000 [thread overview]
Message-ID: <a06959e2-ef9a-8732-8082-7524bdf585d2@mulle-kybernetik.com> (raw)
In-Reply-To: <174f19a0-40ea-a5b1-d21d-3903f9bba9f8@mulle-kybernetik.com>
Sorry for the spam, but I just thought of an easy fix for the situation,
with this rewording of
http://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic.html#BASELIB---CXA-FINALIZE
```
The implementation shall arrange for__cxa_finalize() to be called during
early shared library unload (e.g. dlclose()) with a handle to the shared
library. The unload should fail, if the termination function list
contains any __cxa_atexit-registered functions.
When the main program calls exit, the implementation shall cause any
remaining __cxa_atexit-registered functions to be called, either by
calling __cxa_finalize(NULL), or by walking the registration list itself.
```
The effect is, that atexit "poisoned" shared objects stay until
termination, all others get unloaded as they are now, which would be IMO
perfect and expected. As a positive side effect it seems like minimal
code change.
Ciao
  Nat!
next prev parent reply other threads:[~2019-06-11 22:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 21:23 Nat!
2019-05-19 16:23 ` Florian Weimer
2019-05-19 19:37 ` Nat!
2019-05-21 20:43 ` Adhemerval Zanella
2019-05-22 10:22 ` Nat!
2019-05-22 15:01 ` Adhemerval Zanella
2019-05-22 15:29 ` Nat!
2019-05-22 19:35 ` Adhemerval Zanella
2019-05-29 21:16 ` Nat!
2019-06-09 20:59 ` Nat!
2019-06-10 11:48 ` Adhemerval Zanella
2019-06-10 13:08 ` Nat!
2019-06-10 20:27 ` Adhemerval Zanella
2019-06-11 18:39 ` Adhemerval Zanella
2019-06-11 20:20 ` Nat!
2019-06-11 22:40 ` Nat! [this message]
2019-06-12 3:41 ` Carlos O'Donell
2019-06-13 22:53 ` Nat!
2019-06-14 12:29 ` Manfred
2019-06-14 15:14 ` Adhemerval Zanella
2019-06-11 18:53 ` Nat!
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=a06959e2-ef9a-8732-8082-7524bdf585d2@mulle-kybernetik.com \
--to=nat@mulle-kybernetik.com \
--cc=libc-help@sourceware.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).