← Back to team overview

ius-coredev team mailing list archive

[Question #224628]: Segfault with PDFlib

 

New question #224628 on IUS Community Project:
https://answers.launchpad.net/ius/+question/224628

I just upgraded our CentOS 6.4 (x84) stock PHP 5.3.3 with the IUS repo to PHP 5.4.11 using the yum-plugin-replace.

Everything works fine except one class which uses PDFlib 8. Code using this class segfaults at the end of the PHP script. I've narrowed it down to the following test code to reproduce the segfault:

<?php

class PdfExt extends PDFLib {

    /** Just some public variable */
    public $someVar;
}

$pdf = new PdfExt();

//print_r($pdf);


The PdfExt class instance will cause a segfault when the script finishes (somewhere during internal PHP cleanup I suppose).
However, when the print_r() is uncommented the segfault magically disappears! It also disappears if the public $someVar is removed from the class.

This smells like a very serious bug. Any help is much appreciated.

Further info: the PDFlib functions properly, so all code inside the actual class is executed normally and the PDF output is perfectly fine. It all goes wrong during the cleanup by PHP is seems (garbage collection stage?) This wasn't an issue with the stock PHP 5.3.3, it appeared after upgrading to IUS PHP 5.4.11.

Thanks in advance.

Marcel

-- 
You received this question notification because you are a member of IUS
Core Development, which is an answer contact for IUS Community Project.