From: benoit dot beraud at gmail dot com Operating system: Win XP PHP version: 5CVS-2006-06-30 (snap) PHP Bug Type: Reproducible crash Bug description: Php makes Apache crash with preg_match
Description: ------------ When executing the reproduce code, the function preg_match makes APache restart with the 'traditionnal' error ("[notice] Parent: child process exited with status 3221225477 -- Restarting.") The script makes Apache crash with php 5.1.4 and the snapshot of php 5.2.0-2006-06-30. together with apache 2.0.58 Everything is ok with php 4.3.10 with apache 1.3.33 I've seen some corresponding bug in the DB but they do not seem to apply, as in my case it was working in previous version of php (and probably PECR) and now it does not work. Strange ... I don't have any idea if it really comes from php or if it's an issue of the PECR library or of apache 2. I would have been happy to provide a bugtrace but my knowledge of php compilation is still to limited to do it. Thanks in advance for your help. Reproduce code: --------------- // 'Well-formed UTF-8' $goodUtf8 = '^([\x00-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xec][\x80-\xbf]{2}|\xed[\x80-\x9f][\x80-\xbf]|[\xee-\xef][\x80-\xbf]{2}|f0[\x90-\xbf][\x80-\xbf]{2}|[\xf1-\xf3][\x80-\xbf]{3}|\xf4[\x80-\x8f][\x80-\xbf]{2})*$'; // ISO-10646 'UCS' $ucsUtf8 = '^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3}|[\xf8-\xfb][\x80-\xbf]{4}|[\xfc-\xfd][\x80-\xbf]{5})*$'; $inStr = "Complex models, such as activated sludge model No. 1 (ASM1), have rarely been used in practice for process control or optimization. One major reason for this is the computational effort demanded by these models for both parameter estimation and simulation. Therefore, a linearized version of the ASM1 model is developed and applied to the control and optimization of a bench-scale alternating aerobic/anoxic activated sludge system. The model prediction was used to optimize the aeration time by manipulating tc (total cycle time) and fa (fraction of aeration cycle time) while meeting the permit requirement of the effluent ammonia concentration. The linear nature of the model facilitates its use for on-line calculations, and error feedback is used to counteract problems of model inaccuracy. The model was applied to two cases in which the influent compositions were either known currently or only the previous day\'s information was available. The average optimized fa was found to be 0.30 for the first case and 0.37 for the second case, when the maximum effluent NH4+N concentration was set at 1 mg/l. The efficiency of nitrogen removal was 76% for both test cases since nitrate could almost completely be removed through adequate anoxic cycle ratios resulting from the fa optimization."; preg_match("/$goodUtf8|$ucsUtf8/",$inStr); Expected result: ---------------- The function preg_match should check if the variable inStr is goodUtf or ISO-10646 'UCS'. -- Edit bug report at http://bugs.php.net/?id=37978&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37978&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37978&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37978&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37978&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37978&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37978&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37978&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37978&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37978&r=support Expected behavior: http://bugs.php.net/fix.php?id=37978&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37978&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37978&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37978&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37978&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37978&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37978&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37978&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37978&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37978&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37978&r=mysqlcfg