php-src/ext/ffi
Máté Kocsis 8d12f666ae
Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
..
tests [skip ci] Fix typos in XFAIL reasons 2024-08-22 11:48:46 +02:00
config.m4 Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
config.w32 Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
CREDITS
ffi_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
ffi_parser.c Fix GH-14286 (ffi enum type (when enum has no name) make memory leak) 2024-07-22 17:44:47 +02:00
ffi.c Merge branch 'PHP-8.3' 2024-07-22 17:45:28 +02:00
ffi.g Fix GH-14286 (ffi enum type (when enum has no name) make memory leak) 2024-07-22 17:44:47 +02:00
ffi.stub.php Fix class constant and property ID generation for the manual (#14249) 2024-05-17 20:30:16 +02:00
php_ffi.h Fix GH-14286 (ffi enum type (when enum has no name) make memory leak) 2024-07-22 17:44:47 +02:00