cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl-7.17.1 crashes on getprotobyname() problem in RHEL5.1

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 2 May 2008 13:07:00 -0700

On Fri, May 02, 2008 at 09:18:46PM +0200, Michal Marek wrote:
> OK, it seems that glibc serializes calls to getprotobyname internally.
> But when curl reads the result in one thread, another thread might be
> running inside getprotobyname() overwriting the static storage, which
> isn't thread-safe either. There's getprotobyname_r which is really

Good call--glibc doesn't serialize access to the static buffer, and it
has only a single one globally. It would be nice if issues like this were
actually documented! At least with glibc you can see what's going
on. This definitely needs to be addressed by libcurl.

> thread-safe, but it works differently on different platforms. Also, the
> number assigned to the TCP protocol doesn't change every week, so what
> about just removing the call as Jean-François suggested and relying on
> the IPPROTO_TCP constant?

Sounds like an effective fix!

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-02