1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

Merge branch 'PHP-8.2'

* PHP-8.2:
  Fix GH-9589: dl() segfaults when module is already loaded
  Fix GH-9566: disable assembly for Fiber on FreeBSD i386.
This commit is contained in:
Christoph M. Becker
2022-10-10 13:37:30 +02:00
2 changed files with 15 additions and 0 deletions
+5
View File
@@ -205,6 +205,11 @@ PHPAPI int php_load_extension(const char *filename, int type, int start_now)
return FAILURE;
}
module_entry = get_module();
if (zend_hash_str_exists(&module_registry, module_entry->name, strlen(module_entry->name))) {
DL_UNLOAD(handle);
zend_error(E_CORE_WARNING, "Module \"%s\" is already loaded", module_entry->name);
return FAILURE;
}
if (module_entry->zend_api != ZEND_MODULE_API_NO) {
php_error_docref(NULL, error_type,
"%s: Unable to initialize module\n"
@@ -0,0 +1,10 @@
--TEST--
dl() segfaults when module is already loaded
--EXTENSIONS--
dl_test
--FILE--
<?php
dl("dl_test");
?>
--EXPECT--
Warning: Module "dl_test" is already loaded in Unknown on line 0