On Mon, 2007-07-30 at 18:49 +0200, [EMAIL PROTECTED] wrote: > I found that a similar problem was this: > > http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200703.mbox/[EMAIL > PROTECTED]
Similar? In what way? Abusing libxml2 interna? Are you doing this? Iff xmlFreeDoc triggers a segmentation violation than the most likely case is that you pass it a document pointer that's not (a valid libxml document any more). So what part of the module did invalidate that doc pointer? Is it more likely to be Apache or your module code? BTW - one shure way to f^h^hk up you document is messing (i.e. releasing) nodes still refered to from the document. Does your module copy/move/delete nodes? > So it seems that it's possibile. > I don't understand how to solve it. > Could you give me some hints? Unless your module replaced libxml2's allocator the library uses malloc/free - you can use all the glorious GNU tools to debug. I guess you already set MALLOC_CHECK_ to 1, did you? HTH Ralf Mattes > Best regards > > Marco > > > Sorry I don't understand the reply. > > You are telling me that it should be possibile or not? > > I always use r->pool to allocate memory in my module, but not for > > libxml2. It has it's memory allocation and looking at source it uses > > malloc and free. > > Best regards > > > > Marco > > > > > > > On Mon, Jul 30, 2007 at 06:04:27PM +0200, [EMAIL PROTECTED] 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)? > > > Not an option. Unless you use somewhat pools to allocate memory for > > > libxml. If you do so, stop it. Either use apr pools or malloc/free. > > > Kind regards. > > > > >