Just one possible temporary fix for bug 3168531 (https://sourceforge.net/tracker/?func=detail&aid=3168531&group_id=1645&atid=101645).
As mentioned in the aforementioned bug report, I don't really consider the attached patch to be a final solution. But hopefully it will provide a starting point for someone who understands the inner-workings of php.cxx to solve more completely. In the meantime, this patch can at least replace segmentation faults with error messages ;)
Fix segmentation fault in php.cxx
Thanks, that showed nicely where the problem was. Fixed properly in r12471.
BTW, you can just attach a patch to a ticket in the bug tracker - no need to open a separate ticket in the patch tracker.