Segfault with PDFlib
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
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Marcel Lindenbergh
- Solved:
- Last query:
- Last reply: