PHP Segmentation fault during preg_replace

Viewed 1915

I'm using Magento and got PHP Segmentation fault during rollback database from admin. I make and investigation and see that the reason is such line:

preg_replace("/'(\\'|\\\\{2}|[^'])*'/", '', $sql);

$sql string is big enough, I'm attaching it.

https://drive.google.com/file/d/0B9UbKYbywcABOTRSVG5KRl9La0k/edit?usp=sharing

You may use such script to reproduce the problem:

<?php
    $test = file_get_contents('test.txt');
    $sql = preg_replace("/'(\\'|\\\\{2}|[^'])*'/", '', $test);

May be somebody knows about this problem and can help me to solve it?

P.S. Class that directly causes the problem is abstract class Zend_Db_Statement 204:208

2 Answers
Related