Fixed bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled).

This commit is contained in:
Xinchen Hui 2015-08-11 21:01:56 +08:00
parent 42ef2b500b
commit 79cd9a18b5
3 changed files with 28 additions and 0 deletions

4
NEWS
View File

@ -10,6 +10,10 @@ PHP NEWS
. Fixed bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE).
(wusuopu, cmb)
- Opcache:
. Fixed bug #70237 (Empty while and do-while segmentation fault with opcode
on CLI enabled). (Dmitry, Laruence)
- Standard:
. Fixed bug #70052 (getimagesize() fails for very large and very small WBMP).
(cmb)

View File

@ -367,6 +367,10 @@ static inline void del_source(zend_code_block *from, zend_code_block *to)
return;
}
if (from == to) {
return;
}
while (*cs) {
if ((*cs)->from == from) {
DEL_SOURCE(cs);

View File

@ -0,0 +1,20 @@
--TEST--
Bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled)
--INI--
opcache.enable=1
opcache.enable_cli=1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function neverUsed() {
$bool = false;
while ($bool) { };
//do { } while ($bool);
}
?>
okey
--EXPECT--
okey