Opened 10 years ago

Closed 10 years ago

#652 closed defect (fixed)

Segfaults with Xapian under PHP 5.4 or later

Reported by: Sebastian Gottfried Owned by: Olly Betts
Priority: normal Milestone: 1.2.19
Component: Xapian-bindings (PHP) Version: 1.2.17
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Sebastian Gottfried)

The runtime crashes when a script tries to use a MatchDecider subclass. In this case, the bindings documentation recommends to stick to PHP 5.3 for now. Since the upstream support for this version did end on 14 August 2014, this is no longer an advisable option.

Change History (9)

comment:1 by Sebastian Gottfried, 10 years ago

Description: modified (diff)

comment:2 by Olly Betts, 10 years ago

Unfortunately, it seems to be a bug in SWIG (or possibly PHP), and nobody's yet managed to work out what's going on:

https://github.com/swig/swig/issues/164

So all we can really do right now is to drop the recommendation to stick with PHP 5.3.

comment:3 by Olly Betts, 10 years ago

Hmm, I really can't see where the page you link to suggests sticking with PHP 5.3.

http://trac.xapian.org/wiki/ReleaseNotes/1.2.18 did, so I've just updated that.

comment:4 by Sebastian Gottfried, 10 years ago

Link to the (probably) relevant SWIG issue: https://github.com/swig/swig/issues/164

comment:5 by Olly Betts, 10 years ago

I linked to that already in comment:2!

comment:6 by Olly Betts, 10 years ago

Someone found the single character change to fix this, and I've committed the fix to SWIG. I'll update the version of SWIG we use for the next release.

Here's a patch for 1.2.18, but it should apply to any vaguely recent version of the code:

http://oligarchy.co.uk/xapian/patches/php-bindings-segfault.patch

comment:7 by Olly Betts, 10 years ago

Milestone: 1.3.2
Owner: set to Olly Betts
Status: newassigned

comment:8 by Olly Betts, 10 years ago

Milestone: 1.3.21.2.19

Fixed in trunk r18247 - needs backporting.

comment:9 by Olly Betts, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in 1.2 branch by r18284.

Note: See TracTickets for help on using tickets.