[libopendkim] dkim_init() and dkim_close() thread problems

From: Dino Ciuffetti <dino_at_tuxweb.it>
Date: Tue, 27 Apr 2010 13:11:50 +0200 (CEST)

Hi.
I'm using libopendkim 2.0.2 stable.
This was my configure string: ./configure --prefix=/opt/opendkim
--disable-filter --enable-dnsupgrade --enable-query_cache
--enable-dkim_reputation

I have a crash problem calling dkim_init(NULL, NULL) and dkim_close() into
pthreads. Do I have to protect dkim_init(NULL, NULL) and dkim_close()
calls with a mutex lock into a multi threaded implementation? If it is so
I did not found the info from the documentation.

I've found that don't doing so cause my program terminating frequently
with a respectively "segfault" and "double free" when calling dkim_init()
and dkim_close() library calls.
After setting up the mutex lock the problem goes away.

Not sure if this is a problem with my program or with the library, or
other stuff I don't understand right now, but the problem seems fixed now.
Ciao e grazie.
Dino.


-- 
Dino Ciuffetti
Linux System Administrator and Architect
TuxWeb S.r.l. - http://www.tuxweb.it/
Received on Tue Apr 27 2010 - 11:12:05 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:19:47 PST