httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: Strange segmentation fault
Date Mon, 30 Jul 2007 17:59:33 GMT
On Mon, 30 Jul 2007 18:04:27 +0200
"m.spinetti@pisa.iol.it"<m.spinetti@pisa.iol.it> wrote:

> I isolated my problem.
> It seems that sometimes during xmlFreeDoc(doc) I get a Segmentation
> fault. xmlFreeDoc is a function of libxml2 which I use inside my
> module. I suppose that libxml2 uses malloc/free to alloc and free
> memory: is it possibile that there is some overlap of memory with apr
> poll (r->poll)?

Works fine in a number of modules.  So I'd point the
finger of suspicion at possible bugs in your module.

The easy way to ensure cleanups like xmlFreeDoc happen at
the right time is usually to register them with
apr_pool_cleanup_register as soon as you create the doc.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Mime
View raw message