From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: How to test if dlclose is a no-op?
Date: Thu, 15 Mar 2018 10:40:15 -0400 [thread overview]
Message-ID: <20180315144015.GD1436@brightrain.aerifal.cx> (raw)
In-Reply-To: <A3828F5A-36C7-467E-AF4D-C0E4F76B3B8D@gmail.com>
On Thu, Mar 15, 2018 at 08:32:34AM -0500, Thadeus Fleming wrote:
> In the spirit of not “assum[ing] a certain implementation has
> particular properties rather than testing,” how can one test if
> dlclose is a no-op, as it is in musl, without breaking things if it
> isn’t?
This sounds like an XY problem¹. Do you care about whether you can
recover virtual memory space, whether the underlying fs objects remain
referenced, whether there's a cycle of dtors and ctors running, or
something else?
FYI there is no clear answer to the question even on other
implementations. glibc only sometimes unloads; there are corner cases
and race-type conditions where unloading is impossible for them. You
really should not be designing around an assumption/requirement that
anything get unloaded.
Rich
¹ http://xyproblem.info/
next prev parent reply other threads:[~2018-03-15 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 13:32 Thadeus Fleming
2018-03-15 14:40 ` Rich Felker [this message]
2018-03-15 15:24 ` Thadeus Fleming
2018-03-15 15:32 ` Rich Felker
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=20180315144015.GD1436@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).