[php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4)

From: Date: Sat, 12 Mar 2022 11:04:49 +0000
Subject: [php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240312@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8159 Comment Author: unix-world @dstogov , as you said: > The best backtrace shows crash under start_accel_module(), but this function just forwards to > zend_startup_module(), that is not in backtrace. But please look at this part of the code and you see that accel_activate is called here !!: ### PHP 8.0 / 8.1 / 7.4 ``` static zend_module_entry accel_module_entry = { STANDARD_MODULE_HEADER, ACCELERATOR_PRODUCT_NAME, ext_functions, ZEND_MINIT(zend_accelerator), ZEND_MSHUTDOWN(zend_accelerator), accel_activate, // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS I AM TALKING ABOUT NULL, zend_accel_info, PHP_VERSION, NO_MODULE_GLOBALS, accel_post_deactivate, STANDARD_MODULE_PROPERTIES_EX }; int start_accel_module(void) { return zend_startup_module(&accel_module_entry); } ``` But in PHP 7.3 (not crashing) is called in completely different place ``` static zend_module_entry accel_module_entry = { STANDARD_MODULE_HEADER, ACCELERATOR_PRODUCT_NAME, accel_functions, ZEND_MINIT(zend_accelerator), ZEND_MSHUTDOWN(zend_accelerator), NULL, // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS I AM TALKING ABOUT NULL, zend_accel_info, PHP_VERSION, NO_MODULE_GLOBALS, accel_post_deactivate, STANDARD_MODULE_PROPERTIES_EX }; int start_accel_module(void) { return zend_startup_module(&accel_module_entry); } ``` In PHP 7.3 the accel_activate is called here ``` ZEND_EXT_API zend_extension zend_extension_entry = { ACCELERATOR_PRODUCT_NAME, /* name */ PHP_VERSION, /* version */ "Zend Technologies", /* author */ "http://www.zend.com/", /* URL */ "Copyright (c) 1999-2018", /* copyright */ accel_startup, /* startup */ NULL, /* shutdown */ accel_activate, /* per-script activation */ accel_deactivate, /* per-script deactivation */ NULL, /* message handler */ NULL, /* op_array handler */ NULL, /* extended statement handler */ NULL, /* extended fcall begin handler */ NULL, /* extended fcall end handler */ NULL, /* op_array ctor */ NULL, /* op_array dtor */ STANDARD_ZEND_EXTENSION_PROPERTIES }; ```

« previous php.bugs (#240312) next »