diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index cde6a496..09a18f05 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -68,6 +68,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -150,6 +151,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -285,6 +287,8 @@ 'zend_object_iterator_funcs *' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, 'zend_objects_store *' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, + 'zend_oom_info *' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op *' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, diff --git a/include/8.4/darwin-arm64-nts/engine.h b/include/8.4/darwin-arm64-nts/engine.h index 442ab4ab..e5435770 100644 --- a/include/8.4/darwin-arm64-nts/engine.h +++ b/include/8.4/darwin-arm64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -728,6 +740,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -830,6 +843,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-arm64-nts/layouts.json b/include/8.4/darwin-arm64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/darwin-arm64-nts/layouts.json +++ b/include/8.4/darwin-arm64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-arm64-nts/probe.c b/include/8.4/darwin-arm64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/darwin-arm64-nts/probe.c +++ b/include/8.4/darwin-arm64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/darwin-arm64-zts/engine.h b/include/8.4/darwin-arm64-zts/engine.h index 740605b6..55ba9d24 100644 --- a/include/8.4/darwin-arm64-zts/engine.h +++ b/include/8.4/darwin-arm64-zts/engine.h @@ -159,6 +159,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -729,6 +741,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -832,6 +845,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-arm64-zts/layouts.json b/include/8.4/darwin-arm64-zts/layouts.json index 96180389..a5f5c86b 100644 --- a/include/8.4/darwin-arm64-zts/layouts.json +++ b/include/8.4/darwin-arm64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-arm64-zts/probe.c b/include/8.4/darwin-arm64-zts/probe.c index 6582029e..cc0f398f 100644 --- a/include/8.4/darwin-arm64-zts/probe.c +++ b/include/8.4/darwin-arm64-zts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/darwin-x64-nts/engine.h b/include/8.4/darwin-x64-nts/engine.h index ae2356be..b4a3fc95 100644 --- a/include/8.4/darwin-x64-nts/engine.h +++ b/include/8.4/darwin-x64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -728,6 +740,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -830,6 +843,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-x64-nts/layouts.json b/include/8.4/darwin-x64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/darwin-x64-nts/layouts.json +++ b/include/8.4/darwin-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-x64-nts/probe.c b/include/8.4/darwin-x64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/darwin-x64-nts/probe.c +++ b/include/8.4/darwin-x64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/darwin-x64-zts/engine.h b/include/8.4/darwin-x64-zts/engine.h index 5a4f8066..80b14678 100644 --- a/include/8.4/darwin-x64-zts/engine.h +++ b/include/8.4/darwin-x64-zts/engine.h @@ -159,6 +159,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -729,6 +741,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -832,6 +845,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-x64-zts/layouts.json b/include/8.4/darwin-x64-zts/layouts.json index 96180389..a5f5c86b 100644 --- a/include/8.4/darwin-x64-zts/layouts.json +++ b/include/8.4/darwin-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-x64-zts/probe.c b/include/8.4/darwin-x64-zts/probe.c index 6582029e..cc0f398f 100644 --- a/include/8.4/darwin-x64-zts/probe.c +++ b/include/8.4/darwin-x64-zts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/linux-x64-nts/engine.h b/include/8.4/linux-x64-nts/engine.h index 46c9f7f3..1bbd4b47 100644 --- a/include/8.4/linux-x64-nts/engine.h +++ b/include/8.4/linux-x64-nts/engine.h @@ -155,6 +155,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -732,6 +744,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -834,6 +847,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/linux-x64-nts/layouts.json b/include/8.4/linux-x64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/linux-x64-nts/layouts.json +++ b/include/8.4/linux-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/linux-x64-nts/probe.c b/include/8.4/linux-x64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/linux-x64-nts/probe.c +++ b/include/8.4/linux-x64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/linux-x64-zts/engine.h b/include/8.4/linux-x64-zts/engine.h index 4198c4a1..2cb3c355 100644 --- a/include/8.4/linux-x64-zts/engine.h +++ b/include/8.4/linux-x64-zts/engine.h @@ -250,6 +250,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -820,6 +832,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -926,6 +939,7 @@ struct _zend_executor_globals { struct sigaction oldact; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/linux-x64-zts/layouts.json b/include/8.4/linux-x64-zts/layouts.json index c5835d3f..70b136ac 100644 --- a/include/8.4/linux-x64-zts/layouts.json +++ b/include/8.4/linux-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2128, + "size": 2152, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -394,7 +394,8 @@ "pid": 1840, "oldact": 1848, "strtod_state": 2000, - "reserved": 2080 + "reserved": 2080, + "delayed_oom": 2128 } }, "zend_compiler_globals": { @@ -431,6 +432,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/linux-x64-zts/probe.c b/include/8.4/linux-x64-zts/probe.c index 467a8377..8a3c9284 100644 --- a/include/8.4/linux-x64-zts/probe.c +++ b/include/8.4/linux-x64-zts/probe.c @@ -1271,6 +1271,7 @@ int main(void) { fprintf(layouts, ", \"oldact\": %zu", offsetof(zend_executor_globals, oldact)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1305,6 +1306,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/windows-x64-nts/engine.h b/include/8.4/windows-x64-nts/engine.h index dcd62bdf..bdb2cb75 100644 --- a/include/8.4/windows-x64-nts/engine.h +++ b/include/8.4/windows-x64-nts/engine.h @@ -172,6 +172,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -747,6 +759,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -850,6 +863,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/windows-x64-nts/layouts.json b/include/8.4/windows-x64-nts/layouts.json index 3a8f2c51..3f6c65c0 100644 --- a/include/8.4/windows-x64-nts/layouts.json +++ b/include/8.4/windows-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2120, + "size": 2144, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -392,7 +392,8 @@ "max_allowed_stack_size": 1976, "reserved_stack_size": 1984, "strtod_state": 1992, - "reserved": 2072 + "reserved": 2072, + "delayed_oom": 2120 } }, "zend_compiler_globals": { @@ -429,6 +430,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/windows-x64-nts/probe.c b/include/8.4/windows-x64-nts/probe.c index 46d7f729..fee34e44 100644 --- a/include/8.4/windows-x64-nts/probe.c +++ b/include/8.4/windows-x64-nts/probe.c @@ -1269,6 +1269,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1303,6 +1304,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/include/8.4/windows-x64-zts/engine.h b/include/8.4/windows-x64-zts/engine.h index 71281700..c67d3a35 100644 --- a/include/8.4/windows-x64-zts/engine.h +++ b/include/8.4/windows-x64-zts/engine.h @@ -173,6 +173,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -748,6 +760,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -852,6 +865,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/windows-x64-zts/layouts.json b/include/8.4/windows-x64-zts/layouts.json index 00d92079..0efd2463 100644 --- a/include/8.4/windows-x64-zts/layouts.json +++ b/include/8.4/windows-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2120, + "size": 2144, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -392,7 +392,8 @@ "max_allowed_stack_size": 1976, "reserved_stack_size": 1984, "strtod_state": 1992, - "reserved": 2072 + "reserved": 2072, + "delayed_oom": 2120 } }, "zend_compiler_globals": { @@ -429,6 +430,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/windows-x64-zts/probe.c b/include/8.4/windows-x64-zts/probe.c index 1b26dbb9..58914dc8 100644 --- a/include/8.4/windows-x64-zts/probe.c +++ b/include/8.4/windows-x64-zts/probe.c @@ -1269,6 +1269,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1303,6 +1304,7 @@ int main(void) { fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); diff --git a/stubs/zend-engine-structs.php b/stubs/zend-engine-structs.php index 2a6991c0..81d23153 100644 --- a/stubs/zend-engine-structs.php +++ b/stubs/zend-engine-structs.php @@ -622,6 +622,7 @@ final class zend_compiler_globals public bool $multibyte; public bool $detect_unicode; public bool $encoding_declared; + public bool $interned_strings_fallible; public ?zend_ast $ast; public ?zend_arena $ast_arena; public zend_stack $delayed_oplines_stack; @@ -809,6 +810,7 @@ final class zend_executor_globals public int $reserved_stack_size; public zend_strtod_state $strtod_state; public \FFI\CData $reserved; + public zend_oom_info $delayed_oom; private function __construct() {} } @@ -1284,6 +1286,21 @@ final class zend_objects_store private function __construct() {} } +/** + * Analysis-only view of the engine C struct 'zend_oom_info'; the runtime value is always FFI\CData. + * + * @internal + */ +final class zend_oom_info +{ + public int $state; + public int $lineno; + public ?zend_string $message; + public ?zend_string $filename; + + private function __construct() {} +} + /** * Analysis-only view of the engine C struct 'zend_op'; the runtime value is always FFI\CData. *