1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00

Zend/zend_globals: convert fiber_stack_size to size_t (#10619)

`zend_long` is a signed integer that's only 32 bit on some 64 bit
architectures (e.g. ARM64).  The proper type for memory sizes is
`size_t`, and this type is accepted by zend_fiber_init_context().
This commit is contained in:
Max Kellermann
2023-02-18 22:04:32 +01:00
committed by GitHub
parent d46dea169c
commit bf036fa2a3
2 changed files with 2 additions and 2 deletions

View File

@@ -223,7 +223,7 @@ static ZEND_INI_MH(OnUpdateReservedStackSize) /* {{{ */
static ZEND_INI_MH(OnUpdateFiberStackSize) /* {{{ */
{
if (new_value) {
EG(fiber_stack_size) = zend_ini_parse_quantity_warn(new_value, entry->name);
EG(fiber_stack_size) = zend_ini_parse_uquantity_warn(new_value, entry->name);
} else {
EG(fiber_stack_size) = ZEND_FIBER_DEFAULT_C_STACK_SIZE;
}

View File

@@ -269,7 +269,7 @@ struct _zend_executor_globals {
zend_fiber *active_fiber;
/* Default fiber C stack size. */
zend_long fiber_stack_size;
size_t fiber_stack_size;
/* If record_errors is enabled, all emitted diagnostics will be recorded,
* in addition to being processed as usual. */