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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
7 - 2 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC