Either I am confused or you are confused. G_THREADS_ENABLED is definitely defined. I am not defining it, the ifdefs are checking if it is defined. On Mon, 2003-12-29 at 18:43, Jeffrey Stedfast wrote: > uh... if G_THREADS_ENABLED isn't enabled, then you have a lot more > problems than that. I'm surprised evo works at all without gthread > support. > > I suggest you make sure your glib install supports threads. this is not > the right fix. > > Jeff > > On Mon, 2003-12-29 at 02:18, Zan Lynx wrote: > > I think I found a locking bug in e-util/e-memory.c. This bug, if it is > > this bug, has been crashing Evolution on me several times a day when > > running on a SMP system. I patched it, and Evolution hasn't crashed > > yet, so I'm posting it. > > > > I'm not sure if the lock needs to include the e_mempool_flush or not. I > > just tried to follow the locking in e_mempool_new. > > > > This is Evolution 1.4.5, compiled on Gentoo. > > > > Here is the patch: > > --- /tmp/e-memory.c 2003-12-29 00:07:18.691690575 -0700 > > +++ e-util/e-memory.c 2003-12-28 22:05:51.000000000 -0700 > > @@ -534,10 +534,16 @@ > > **/ > > void e_mempool_destroy(MemPool *pool) > > { > > +#ifdef G_THREADS_ENABLED > > + g_static_mutex_lock(&mempool_mutex); > > +#endif > > if (pool) { > > e_mempool_flush(pool, 1); > > e_memchunk_free(mempool_memchunk, pool); > > } > > +#ifdef G_THREADS_ENABLED > > + g_static_mutex_unlock(&mempool_mutex); > > +#endif > > } > > _______________________________________________ > evolution-hackers maillist - evolution-hackers lists ximian com > http://lists.ximian.com/mailman/listinfo/evolution-hackers -- Zan Lynx <zlynx acm org>
Attachment:
signature.asc
Description: This is a digitally signed message part