[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nufw-devel] [PATCH] Fix problem with sasl_set_mutex
|
From: |
Eric Leblond |
|
Subject: |
[Nufw-devel] [PATCH] Fix problem with sasl_set_mutex |
|
Date: |
Sat, 20 Sep 2008 14:41:41 +0200 |
|
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hi,
When working on NuFW (http://www.nufw.org), I've encounter some weird crash
when calling sasl_dispose. The problem was in fact a logic problem in
sasl_set_mutex.
NuFW uses sasl and libldap_r. NuFW has to do a call to sasl_set_mutex
because it is multithreaded. One of the NuFW module uses libldap_r which
also does a call to sasl_set_mutex. By doing this, we run into a problem
because sasl_MUTEX_* function change during run time. Thus we can
allocate a mutex with NuFW function and destroy it with libldap_r
function. This lead to a crash in almost all cases.
IMHO, the only clean workaround is to modify sasl_set_mutex(): it should
not be run twice in the same program. I attach a simple patch to this
mail which implement this behaviour.
BR,
--
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
sasl_set_mutex_fix.diff
Description: Text Data
signature.asc
Description: Digital signature
- [Nufw-devel] [PATCH] Fix problem with sasl_set_mutex,
Eric Leblond <=