Archive Index
This month's Index
|
Subject: [ libssh2-Bugs-2800519 ] libssh2 library is not thread safe
[ libssh2-Bugs-2800519 ] libssh2 library is not thread safe
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 04 Jun 2009 18:27:00 +0000
Bugs item #2800519, was opened at 2009-06-03 15:55
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Referencing errno in many pieces of code makes the whole library not thread safe (libssh2_session_startup() for example). There are many EAGAIN errors that are now thrown internally (because of new non-blocking sockets in 1.1), but unfortunately, the errno value is not correctly accessed, leading to undefined behaviour. This can be "easily" reproduced using something like (compiled in a thread safe manner):
I've passed CPPFLAGS="-D_REENTRANT" to the configure script, and things seem now to be OK.
Miscellaneous defects of the "configure" script:
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Message:
The fix will be included in the June 5 and later snapshots from =>
----------------------------------------------------------------------
Comment By: Gaƫtan Buchetet (p82420)
Message:
Sorry, but I'm not really confident with configure.in, m4 macros and all
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
http://curl.haxx.se/lxr/source/m4/curl-reentrant.m4#L390
You able to provide a patch?
----------------------------------------------------------------------
You can respond by visiting:
------------------------------------------------------------------------------
|