After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322456 - [multiudpsink] gethostbyname might not be thread-safe
[multiudpsink] gethostbyname might not be thread-safe
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-25 18:26 UTC by Antoine Tremblay
Modified: 2012-06-02 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Path to use gethostbyname_r rather then gethostbyname (1.52 KB, patch)
2005-11-25 18:27 UTC, Antoine Tremblay
needs-work Details | Review

Description Antoine Tremblay 2005-11-25 18:26:43 UTC
Bug is hard to reproduce and i'm not sure that this is causing it but I think we
should use gethostbyname_r since this is multithreaded... (Helgrind will show a
mem race possible condition with getbyhostname)

Here's a patch for it...
Comment 1 Antoine Tremblay 2005-11-25 18:27:53 UTC
Created attachment 55233 [details] [review]
Path to use gethostbyname_r rather then gethostbyname
Comment 2 Tim-Philipp Müller 2005-12-16 10:58:14 UTC
It is indeed a good idea to use gethostbyname_r() if it is available, we need to
check however whether it is actually available on this system, and we also need
to check for different prototypes (GLIBC, Solaris/Irix, HP-UX all have different
protypes if I remember correctly) and provide implementations for the different
prototypes.
Comment 3 Wim Taymans 2006-02-17 08:55:46 UTC
how do we go about this? commit and wait for people to submit patches?
Comment 4 Tim-Philipp Müller 2006-04-25 19:14:12 UTC
Not sure if we should just commit it like this given that we know it will break on certain other systems. Unfortunately we don't even have a libgstutils where stuff like this could go ...

Comment 5 David Schleef 2007-05-14 20:42:07 UTC
If the patch is improved to detect gethostbyname_r() in configure.ac and use it if it exists, the patch should be applied.
Comment 6 David Schleef 2010-12-05 04:18:03 UTC
In the meantime, sometime during 2008, gethostbyname() was removed and replaced by... nothing.  I guess nobody sends hostnames to multifdsink.
Comment 7 Tim-Philipp Müller 2012-06-02 14:59:49 UTC
Replaced by getaddrinfo in 0.10 and g_resolver_lookup_by_name() in master, closing as OBSOLETE.