Re: com php-src: Fixed possible crash: ext/opcache/Optimizer/zend_call_graph.c

From: Date: Fri, 06 May 2016 09:38:58 +0000
Subject: Re: com php-src: Fixed possible crash: ext/opcache/Optimizer/zend_call_graph.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92050@lists.php.net to get a copy of this message
Hi Nikita, Please check this fix. PHP crashed on the following script. <?php class C1 { static function foo() { static $a = 0; return ++$a; } } class C2 extends C1 { } var_dump(C1::foo()); var_dump(C1::foo()); var_dump(C1::foo()); var_dump(C2::foo()); var_dump(C2::foo()); var_dump(C2::foo()); ?> Thanks. Dmitry. ________________________________________ From: Dmitry Stogov <dmitry@php.net> Sent: Friday, May 6, 2016 12:36:21 PM To: php-cvs@lists.php.net Subject: [PHP-CVS] com php-src: Fixed possible crash: ext/opcache/Optimizer/zend_call_graph.c Commit: 8ae695cd7515af0bcb84844392b5b00910d5cf5b Author: Dmitry Stogov <dmitry@zend.com> Fri, 6 May 2016 12:36:21 +0300 Parents: cca2c8ecc4048537e442ffa96c791df9a84a1690 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8ae695cd7515af0bcb84844392b5b00910d5cf5b Log: Fixed possible crash Changed paths: M ext/opcache/Optimizer/zend_call_graph.c Diff: diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index f245d14..c7bc7b2 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -170,7 +170,7 @@ static int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t call_info->next_caller = NULL; } else { zend_func_info *callee_func_info = ZEND_FUNC_INFO(&func->op_array); - call_info->next_caller = callee_func_info->caller_info; + call_info->next_caller = callee_func_info ? callee_func_info->caller_info : NULL; } } /* break missing intentionally */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.cvs (#92050) next »