NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/53805: dlclose(3) does not interact correctly with atexit(3) callbacks
The following reply was made to PR lib/53805; it has been noted by GNATS.
From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/53805: dlclose(3) does not interact correctly with atexit(3)
callbacks
Date: Thu, 20 Dec 2018 19:22:29 +0100
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--dBtaBH0f5mqCqL5nh8o9oW1xZMEeeHpSc
Content-Type: multipart/mixed; boundary="s3wiZ69Y1Zlx1L1iTFBAWE82ggPzAHg4O";
protected-headers="v1"
From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Message-ID: <af3efee5-ff91-a435-d618-f0c3994c902e%gmx.com@localhost>
Subject: Re: lib/53805: dlclose(3) does not interact correctly with atexit(3)
callbacks
References: <pr-lib-53805%gnats.netbsd.org@localhost>
<20181220170732.7C3557A1ED%mollari.NetBSD.org@localhost>
<20181220181001.58C477A1DA%mollari.NetBSD.org@localhost>
In-Reply-To: <20181220181001.58C477A1DA%mollari.NetBSD.org@localhost>
--s3wiZ69Y1Zlx1L1iTFBAWE82ggPzAHg4O
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
There is also specification mentioning this in C++ABI:
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#dso-dtor-motivation
The API specified below is intended to provide standard-conforming
treatment during normal program exit, which includes executing
atexit-registered functions in the correct sequence relative to
constructor-registered destructors, and reasonable treatment during
early DSO unload (e.g. dlclose).
[...]
I think the most important part is in "Object construction":
"[...] This registration, e.g. __cxa_atexit(f,p,d), is intended to cause
the call f(p) when DSO d is unloaded [..]" and dlclose(3) causes DSO to
be unloaded.
and later in "User atexit calls":
"It is expected that implementations supporting both C and C++ will
integrate this capability into the libc atexit implementation so that
C-only DSOs will nevertheless interact with C++ programs in a
C++-standard-conforming manner."
--s3wiZ69Y1Zlx1L1iTFBAWE82ggPzAHg4O--
--dBtaBH0f5mqCqL5nh8o9oW1xZMEeeHpSc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQJABAEBCAAqFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAlwb3eUMHG41NEBnbXgu
Y29tAAoJEEuzCOmwLnZsEiMP/3MOY8LR/xlU0olsDVtb+b7AG85EUqcxyXb9Sd3t
ugfFZtwnfoyEq69AB9215hfpCFu7khlpdMcGYCpwJMctPkYQf3tFYg5mlbOSAFXg
otdOmHdCsSwFUvS5JCRGtm8/s1SJScFQvyS9ESEoXbRR8TuAhuCscvY+xlYYcwCq
TFDXJAcBteKAIl3lOz+ggp0ukK2aIkR4WJ8+rMp8wlnjN1PiQLPwaTYOxnc7dHn7
4XKIitSTa7dIXMXq8ng2tcqibDCqBWZtrTnfEARJSfeNrAlXPHbnwPV2f41m6RkZ
xKg7ofYZOoWPx34c8nX3M5WPFxgsrBBKxTq9vbYYHnKu5+vXOghmz6VSaT/ajzce
a8RoW1NmkwyKnaCIaNsGegnhia6AG8db4uI4x1z+FhOmcdlvDUx40hIxIC/zXEiz
9fGqrUo27pNi5BMkTNJQ8uZSMzzowNFv6UphkNV/s7OXnpv8Gs8SxO2F7fNU8pqN
n8VQdb/xdk58iyBlB1OTfEZMSahoRUGGInz7M0VrUpvA6UFpiQStEfWxYjZjd2MV
s7cMfLLqUWdElYhF4ifosu7F9VfZi5zIbNJ1cPfIewAxZR1wF4W+6ObSKz2Nhk6l
a2LFZb+mPPw3O6YQUd36iAvZqupKkM01cRHXBYGhByLtROBdJiTQU2A/e8qqEZK2
FMgL
=hNWa
-----END PGP SIGNATURE-----
--dBtaBH0f5mqCqL5nh8o9oW1xZMEeeHpSc--
Home |
Main Index |
Thread Index |
Old Index