Bug #70323 [Ana]: Regression in zend_fetch_debug_backtrace() can cause segfaults

From: Date: Mon, 24 Aug 2015 18:52:15 +0000
Subject: Bug #70323 [Ana]: Regression in zend_fetch_debug_backtrace() can cause segfaults
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195484@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70323&edit=1 ID: 70323 Updated by: aharvey@php.net Reported by: aharvey@php.net Summary: Regression in zend_fetch_debug_backtrace() can cause segfaults Status: Analyzed Type: Bug Package: Reproducible crash Operating System: Irrelevant PHP Version: 7.0Git-2015-08-22 (Git) Block user comment: N Private report: N New Comment: I tend to agree (and have added a check to my own code to stop that), but since this was a safe operation in PHP 5 and isn't in PHP 7, I think we should fix it before the final release. Previous Comments: ------------------------------------------------------------------------ [2015-08-23 05:15:17] laruence@php.net Not sure about that, if there is no active_execute_data, then it must not in execution.. then maybe this fucntion should not be called at all however, add a protection in such a not-common used function, seems is also okey. :) ------------------------------------------------------------------------ [2015-08-22 01:57:25] aharvey@php.net Description: ------------ In PHP 5, zend_fetch_debug_backtrace() checks if the current execute data is NULL before attempting to access fields on that structure. PHP 7's implementation of zend_fetch_debug_backtrace() includes some new code that accesses execute data fields without proper checks, thereby making it possible for the function to segfault if EG(current_execute_data) is NULL. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70323&edit=1

« previous php.bugs (#195484) next »