Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2023 18:05:13 +0200
From:      Felix Palmen <zirias@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Thread safety of getaddrinfo()/getnameinfo()
Message-ID:  <7owxqb2h5f6rajo5xqijxawgsvfiti7egbn5erqa67gomfeiw6@vdbinwj5timn>
In-Reply-To: <b511b099-8756-589e-43a1-9954c4a6a588@gmail.com>
References:  <invxudjtzhw6bdaf2vuy57ec4herfhn4t4lrcpyardmy2muru5@inwlenyqkzm5> <b511b099-8756-589e-43a1-9954c4a6a588@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ky2d6ahamdfej573
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Paul Floyd <paulf2718@gmail.com> [20230426 22:28]:
> On 26-04-23 19:57, Felix Palmen wrote:
>=20
> > So, is there a thread-safety issue with these functions, or a bug in
> > valgrind, or maybe just some false positive?
>=20
> A false positive is a bug.

Well, depends on the definition. It's at least a different class than
e.g. misdetecting what it *should* know about ;)

> I believe that getaddrinfo should be MT safe.
> [...]
> These lock macros use spinlocks. The problem is that Valgrind (both Helgr=
ind
> and DRD) doesn't recognize any locking mechanisms other than pthreads and=
 Qt
> threads.

Thanks a lot for that clarification! So, won't worry about using these
functions on threads any more :)

Cheers, Felix

--=20
 Felix Palmen <zirias@FreeBSD.org>     {private}   felix@palmen-it.de
 -- ports committer (mentee) --            {web}  http://palmen-it.de
 {pgp public key}  http://palmen-it.de/pub.txt
 {pgp fingerprint} 6936 13D5 5BBF 4837 B212  3ACC 54AD E006 9879 F231

--ky2d6ahamdfej573
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZEqdKF8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz
NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny
MdrBAP9wZv4uJ+0Wp4eoJdkjD2Y0M7HTPBfy4Xqt3YRNHJU/EgEA22aN5w94uuS5
+jrFMYfcvhpUdCrPsh/5fCtiIsDF3gE=
=T0Lq
-----END PGP SIGNATURE-----

--ky2d6ahamdfej573--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7owxqb2h5f6rajo5xqijxawgsvfiti7egbn5erqa67gomfeiw6>