libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] unit tests using curl, openssl & multithreading


From: Christian Grothoff
Subject: Re: [libmicrohttpd] unit tests using curl, openssl & multithreading
Date: Thu, 07 Jun 2012 14:20:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120506 Lightning/1.0b1 Icedove/3.0.11

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/06/2012 12:27 PM, Cristian Constantin wrote:
> hi!
> 
> the file:
> 
> libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
> 
> tests multithreading capabilities of libmicrohttpd(+tls) with multiple threads
> both on the client and on the server side.
> 
> the client side is implemented using curl+openssl. since I am getting
> random crashes in:
> 
> sha1_block_data_order () / sha1-x86_64.s (part of openssl)
> 
> I am asking myself whether it has to do with (NOT using properly)
> locking. I had a look and the openssl function which is supposed to
> set up the locking callback, CRYPTO_set_locking_callback() is NOT used
> explicitly when setting up curl/openssl.
> 
> what do you think?

Might be.  Some consider linking against OpenSSL from GPL/LGPL code to
be a license violation, so usually MHD is used with libcurl/gnutls (and
that's how I test).  In either case, as MHD cannot (and should not) know
about OpenSSL, it is up to the application to do thread-initialization
for libraries like OpenSSL.  So I suggest you add the respective calls
to your application and see if that fixes the issues.


Happy hacking!

Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/QnIoACgkQv2Bwi0hCbH7jwwCfYXQZBjZms2SYycRGGBP7+TgC
EK4An2KdBbZoEhJLt5HfmoUL501u1rxl
=zZZr
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]