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:08:25 +0100

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --1iEWI1ENw1FhRJje8EH40CTqkc74mgdrQ
 Content-Type: multipart/mixed; boundary="Q3PilkAAa2FstzAfKhSHv60OMsew5oJUO";
  protected-headers="v1"
 From: Kamil Rytarowski <n54%gmx.com@localhost>
 To: gnats-bugs%NetBSD.org@localhost
 Message-ID: <631aa7d2-4be6-c708-b29d-270312f03d90%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>
  <20181220175001.CAE5E7A1E3%mollari.NetBSD.org@localhost>
 In-Reply-To: <20181220175001.CAE5E7A1E3%mollari.NetBSD.org@localhost>
 
 --Q3PilkAAa2FstzAfKhSHv60OMsew5oJUO
 Content-Type: text/plain; charset=utf-8
 Content-Language: en-US
 Content-Transfer-Encoding: quoted-printable
 
 On 20.12.2018 18:50, Martin Husemann wrote:
 > The following reply was made to PR lib/53805; it has been noted by GNAT=
 S.
 >=20
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:=20
 > Subject: Re: lib/53805: dlclose(3) does not interact correctly with ate=
 xit(3)
 >  callbacks
 > Date: Thu, 20 Dec 2018 18:47:06 +0100
 >=20
 >  I am not sure I follow - the progam is not exiting, so why should an
 >  "atexit" callback be called?
 > =20
 
 This is the common behavior of atexit(3) vs dlclose(3). Internally
 atexit(3) is registered together with its DSO pointer so we have all we
 need there.
 
 >  If you want something run at dso unload time, declare it as destructor=
 ?
 > =20
 
 I'm not discussing whether destructors are better design or more
 natural. Real existing code (LLVM profile feature) does this and it
 causes crash on NetBSD and works as expected on other POSIX-like systems.=
 
 
 I've found that there used to be similar discussions on this, e.g.
 FreeBSD (year 2003):
 
 https://freebsd-arch.freebsd.narkive.com/zzyHX3Bw/dlclose-vs-atexit
 
 Red Hat fixed it in 2001:
 
 https://bugzilla.redhat.com/show_bug.cgi?id=3D28625
 
 >  Martin
 > =20
 >=20
 
 
 
 --Q3PilkAAa2FstzAfKhSHv60OMsew5oJUO--
 
 --1iEWI1ENw1FhRJje8EH40CTqkc74mgdrQ
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 
 iQJABAEBCAAqFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAlwb2pkMHG41NEBnbXgu
 Y29tAAoJEEuzCOmwLnZs6/IP/3Aeii85IKkloPBIlDbAOZIv2MKdDslbbE3xF3pJ
 wExkcApWJDzphnxAf9dHBaV72O+6mcsaN4Yc2Nb7RS8zbLGE//7mmlL2ZBwrLBWU
 6yN00puIT0gBDg76BhXZcL1KpqQMq04JbQYvgxeg8vDI1hThP+urElsO0fu+i9Dc
 3c1QVOH62EUG1FGRPoOn+TzK6oipM5doSHl6d8wj55XqCRnU5piDlpquXxjcMfJb
 4dPt2wLWDXYMETUXs7p4dVbRqOjHN8XiKRcGmVw00Vrb5qYcbd8PySfux8kgiXih
 KRISDoaeZcsWR6+qGMkmG4tdrXfqc3XSoY1/iw65abD/65NgLbVgDfRJdze1cqew
 +aIlsN4sQIMzBJRF1X9lf+KDgQHwrARbKGIt+cE7DAvVUIChWMXTbIf7TNF89w5/
 IgjDnsFOci5J77WU6YPc1OdS6XtfjlbCXiByiQVYAQFEvqZ2LvP0lYV1rEQmYZAU
 9VZyhJqiYHh9RsUQkXgkuB6z7i8aCaG2qNFTcvwJCiZmYsNgU5L+OV8P442aYYkc
 2KmRsN66NEIXBefBarmW7pKYAfY200xHJrKJHKxl7TAYdAieXDYP0v+6Ugfgm/Oh
 kAXr3TqYlg5+wE3Nog+dU/5NnzJfBzdgdQcUxO5MKGjnmBrVlRhjBG0VbJy0weFN
 BBOq
 =R3tB
 -----END PGP SIGNATURE-----
 
 --1iEWI1ENw1FhRJje8EH40CTqkc74mgdrQ--
 


Home | Main Index | Thread Index | Old Index