php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39710 getprotobyname is not thread-safe
Submitted: 2006-12-01 22:57 UTC Modified: 2007-09-06 01:00 UTC
From: dave@php.net Assigned:
Status: No Feedback Package: Network related
PHP Version: 5.2CVS-2006-12-01 (CVS) OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-12-01 22:57 UTC] dave@php.net
Description:
------------
The PHP functions:

getservbyname
getservbyport
getprotobyname
getprotobynumber

are not thread safe.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-29 11:51 UTC] jani@php.net
You mean the operating system's functions are not thread-safe?
(how to reproduce and what error do you get? :)
 [2007-08-29 12:45 UTC] dave@php.net
Well, taken from `man getprotobyname` on FreeBSD 6.2:

BUGS
     These functions use a thread-specific data space; if the data is needed
     for future use, it should be copied before any subsequent calls overwrite
     it.  Only the Internet protocols are currently understood.

I believe a race condition still exists in php-src for these functions?
 [2007-09-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun May 26 14:01:25 2019 UTC