Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP-CPP: PHP 8.4 support #535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aidvu
Copy link

@aidvu aidvu commented Nov 21, 2024

@@ -179,17 +179,23 @@ class Module
// this is not possible if the module is invalid in the first place
if (!valid()) return false;

#if PHP_VERSION_ID < 80400
// the Zend engine sets a number of properties in the entry class, we do that here too
// note that it would be better to call zend_next_free_module() to find the next module
// number, but some users complain that this function is not always available
_entry->type = MODULE_TEMPORARY;
_entry->module_number = zend_hash_num_elements(&module_registry) + 1;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicitly uses zend_next_free_module inside zend_register_module_ex.

@kernelcalm kernelcalm mentioned this pull request Jan 1, 2025
@gnat42 gnat42 mentioned this pull request Mar 7, 2025
@gnat42
Copy link
Contributor

gnat42 commented Mar 7, 2025

Sadly this segfaults the same as the PR I submitted when attempting to use the Examples/simple example module.

#0  0x000055555565d55f in zend_register_functions (scope=scope@entry=0x0, functions=0x555555c28700, function_table=function_table@entry=0x0, type=type@entry=1) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/Zend/zend_API.c:3073
#1  0x000055555565e70a in zend_register_module_ex (module=module@entry=0x555555c26f10, module_type=module_type@entry=1) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/Zend/zend_API.c:2636
#2  0x0000555555570845 in php_load_extension (filename=<optimized out>, type=1, start_now=0) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/ext/standard/dl.c:234
#3  0x0000555555735aa7 in zend_llist_apply (l=l@entry=0x555555c08538 <extension_lists+56>, func=func@entry=0x5555555e5a50 <php_load_php_extension_cb>) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/Zend/zend_llist.c:184
#4  0x00005555555e681e in php_ini_register_extensions () at /usr/src/debug/php-8.4.4-3.fc42.x86_64/main/php_ini.c:751
#5  0x00005555555dfd10 in php_module_startup (sf=<optimized out>, additional_module=0x0) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/main/main.c:2286
#6  0x00005555554516d2 in main (argc=2, argv=0x555555c111e0) at /usr/src/debug/php-8.4.4-3.fc42.x86_64/sapi/cli/php_cli.c:1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants