On Tue, Sep 29, 2009 at 09:59:46AM -0000, reschauzier wrote:
> Ah, I see. The problem is that mg_init() [and therefore dump_init()]
> is called _after_ conf_load() in main(). I am assuming that before the
> introduction of store.c, dump_init used to be called _before_
> conf_load(), properly initializing the cond var. Is this what the
> problem was?
Yes.
> Also, I wonder why nobody caught it before -- do you have any thoughts
> on that?
I guess it depends on your local pthreads implementation. The NetBSD
libc SIGABRTs the process if cond wasn't initialized properly:
| __RCSID("$NetBSD: pthread_cond.c,v 1.18 2005/01/06 17:33:36 mycroft Exp $");
|
| (...)
|
| int
| pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
| {
|
| pthread__error(EINVAL, "Invalid condition variable attribute",
| (attr == NULL) || (attr->ptca_magic == _PT_CONDATTR_MAGIC));
glibc OTOH doesn't care (see nptl/pthread_cond_init.c).
Petar BogdanovicMessage
Re: [milter-greylist] Re: libpthread: Invalid condition variable
2009-09-29 by Petar Bogdanovic
Attachments
- No local attachments were found for this message.