[Xapian-discuss] php bindings error

Olly Betts olly at survex.com
Thu Mar 30 12:22:21 BST 2006


Ryan Mahoney wrote:
>However, when I run the smoketest or the examples, I get the following 
>message from php:
>
>*** glibc detected *** double free or corruption (!prev): 0x0a37e760 ***
>
>any thoughts?  I don't seem to be seeing this message when I run php 
>through apache, but I haven't tested that much.

In recent glibc versions, the malloc implementation detects an attempt
to free the same allocation twice.

It's unclear what is trying to do this though.  It's probably not Xapian
(since we run the test suite under valgrind which should detect this).
Or it could be the SWIG generated code or our hand written glue code,
or PHP itself.

If you look in the apache error.log, do you see the message when you
run under apache?

On Fri, Mar 24, 2006 at 04:57:21PM -0500, Ryan Mahoney wrote:
> I don't know why, but when I take 'extension=xapian.so' out of php.ini, 
> and add  'dl("xapian.so");' to my php scripts... everything works fine!

It would be good to work out what's going on though.  Double-free can
be an exploitable security hole.

If you cut down smoketest.php what's the smallest example which causes
this?

Cheers,
    Olly



More information about the Xapian-discuss mailing list