mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Fixed bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled).
This commit is contained in:
parent
42ef2b500b
commit
79cd9a18b5
4
NEWS
4
NEWS
@ -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)
|
||||
|
@ -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);
|
||||
|
20
ext/opcache/tests/bug70237.phpt
Normal file
20
ext/opcache/tests/bug70237.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user