#43185 [NEW]: preg_replace cause exit signal Illegal instruction
From: nicolas dot fruit+phpbug at gmail dot com
Operating system: Mac
PHP version: 5.2.4
PHP Bug Type: PCRE related
Bug description: preg_replace cause exit signal Illegal instruction
Description:
------------
preg_replace cause a "exit signal Illegal instruction (4)" in the apache
log.
My config:
Mac OS Darwin Kernel Version 8.9.0
Apache/2.0.61 (same error with Apache 2.2)
PHP Version 5.2.4
phpinfo related to regex:
mbstring:
- Multibyte regex (oniguruma) version 4.4.4
- Multibyte regex (oniguruma) backtrack check On
The bug come from Drupal 5.2 /includes/common.inc function
drupal_build_css_cache
Reproduce code:
---------------
<?
$data=
"
/*
** Details: http://www.positioniseverything.net/easyclearing.html
*/
";
$data = preg_replace('<
\s*([@{}:;,]|\)\s|\s\()\s* |
/\*([^*\\\\]|\*(?!/))+\*/ |
[\n\r]
>x', '\1', $data);
echo $data;
?>
Expected result:
----------------
Remove the css "comment" on the string
Actual result:
--------------
exit signal Illegal instruction (4)" in the apache log.
--
Edit bug report at http://bugs.php.net/?id=43185&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43185&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43185&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43185&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43185&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43185&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43185&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43185&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43185&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43185&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43185&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43185&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43185&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43185&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43185&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43185&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43185&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43185&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43185&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43185&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43185&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43185&r=mysqlcfg
Thread (14 messages)
- nicolas dot fruit+phpbug at gmail dot com
- jani@php.net#43185 [Opn->Fbk]: preg_replace cause exit signal Illegal instruction
- lms at esoterica dot pt#43185 [Com]: preg_replace cause exit signal Illegal instruction
- nejc at skoberne dot net#43185 [Com]: preg_replace cause exit signal Illegal instruction
- sabapamu at mizuho-sc dot com#43185 [Com]: preg_replace cause exit signal Illegal instruction
- btmash at gmail dot com#43185 [Com]: preg_replace cause exit signal Illegal instruction
- d dot arnolds at gmail dot com#43185 [Com]: preg_replace cause exit signal Illegal instruction
- me at skylord dot ru#43185 [Com]: preg_replace cause exit signal Illegal instruction
- ddeineka at gmail dot com#43185 [Com]: preg_replace cause exit signal Illegal instruction
- art dot sormy at gmail dot comBug #43185 [Com]: preg_replace cause exit signal Illegal instruction
- requinix@php.netBug #43185 [NoF->ReO]: preg_replace cause exit signal Illegal instruction
- art dot sormy at gmail dot comBug #43185 [Com]: preg_replace cause exit signal Illegal instruction
- nikic@php.netBug #43185 [ReO->Fbk]: preg_replace cause exit signal Illegal instruction
- php-bugs at lists dot php dot netBug #43185 [Fbk->NoF]: preg_replace cause exit signal Illegal instruction