Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -2430,8 +2430,6 @@ ZEND_API zend_result zend_startup_module_ex(zend_module_entry *module) /* {{{ */
EG(current_module) = module;
if (module->module_startup_func(module->type, module->module_number)==FAILURE) {
zend_error_noreturn(E_CORE_ERROR,"Unable to start %s module", module->name);
EG(current_module) = NULL;
return FAILURE;
}
EG(current_module) = NULL;
}
Expand Down
1 change: 0 additions & 1 deletion Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,6 @@ static zend_always_inline void *zend_mm_alloc_heap(zend_mm_heap *heap, size_t si
size = ZEND_MM_ALIGNED_SIZE(size) + ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info));
if (UNEXPECTED(size < real_size)) {
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu + %zu)", ZEND_MM_ALIGNED_SIZE(real_size), ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info)));
return NULL;
}
#endif
if (EXPECTED(size <= ZEND_MM_MAX_SMALL_SIZE)) {
Expand Down
6 changes: 0 additions & 6 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2670,7 +2670,6 @@ static void zend_emit_return_type_check(
ZEND_ASSERT(!implicit);
zend_error_noreturn(E_COMPILE_ERROR, "A never-returning %s must not return",
CG(active_class_entry) != NULL ? "method" : "function");
return;
}

if (!expr && !implicit) {
Expand Down Expand Up @@ -7678,14 +7677,12 @@ static zend_type zend_compile_typename_ex(
zend_string *standard_type_str = zend_type_to_string(single_type);
zend_error_noreturn(E_COMPILE_ERROR,
"Type %s cannot be part of an intersection type", ZSTR_VAL(standard_type_str));
zend_string_release_ex(standard_type_str, false);
}
/* An intersection of standard types cannot exist so invalidate it */
if (ZEND_TYPE_IS_ONLY_MASK(single_type)) {
zend_string *standard_type_str = zend_type_to_string(single_type);
zend_error_noreturn(E_COMPILE_ERROR,
"Type %s cannot be part of an intersection type", ZSTR_VAL(standard_type_str));
zend_string_release_ex(standard_type_str, false);
}
/* Check for "self" and "parent" too */
if (
Expand Down Expand Up @@ -7918,7 +7915,6 @@ static void zend_compile_attributes(
if (error != NULL) {
if (delayed_target_validation == NULL) {
zend_error_noreturn(E_COMPILE_ERROR, "%s", ZSTR_VAL(error));
zend_string_efree(error);
} else {
attr->validation_error = error;
}
Expand Down Expand Up @@ -10483,7 +10479,6 @@ static bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */
goto fail;
default:
zend_error_noreturn(E_COMPILE_ERROR, "Illegal offset type");
break;
}
} else if (!zend_hash_next_index_insert(Z_ARRVAL_P(result), value)) {
fail:
Expand Down Expand Up @@ -11687,7 +11682,6 @@ static void zend_compile_const_expr_class_name(zend_ast **ast_ptr) /* {{{ */
case ZEND_FETCH_CLASS_STATIC:
zend_error_noreturn(E_COMPILE_ERROR,
"static::class cannot be used for compile-time class name resolution");
return;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
Expand Down
3 changes: 0 additions & 3 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,6 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) {
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not delete queued timer");
return;
}
tq_timer = NULL;
}
Expand All @@ -1572,7 +1571,6 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
if (!CreateTimerQueueTimer(&tq_timer, NULL, (WAITORTIMERCALLBACK)tq_timer_cb, (VOID*)eg, seconds*1000, 0, WT_EXECUTEONLYONCE)) {
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not queue new timer");
return;
}
#elif defined(ZEND_MAX_EXECUTION_TIMERS)
if (seconds > 0) {
Expand Down Expand Up @@ -1659,7 +1657,6 @@ void zend_unset_timeout(void) /* {{{ */
zend_atomic_bool_store_ex(&EG(timed_out), false);
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not delete queued timer");
return;
}
tq_timer = NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ static void remember_prev_exception(zend_object **prev_exception)
}
}

static zend_never_inline void gc_call_destructors_in_fiber(uint32_t end)
static zend_never_inline void gc_call_destructors_in_fiber(void)
{
ZEND_ASSERT(!GC_G(dtor_fiber_running));

Expand Down Expand Up @@ -2093,7 +2093,7 @@ ZEND_API int zend_gc_collect_cycles(void)
if (EXPECTED(!EG(active_fiber))) {
gc_call_destructors(GC_FIRST_ROOT, end, NULL);
} else {
gc_call_destructors_in_fiber(end);
gc_call_destructors_in_fiber();
}
GC_G(dtor_time) += zend_hrtime() - dtor_start_time;

Expand Down
3 changes: 0 additions & 3 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,6 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry
zend_get_object_type_uc(ce),
ZSTR_VAL(ce->name),
ZSTR_VAL(iface->name));
return;
}
/* skip duplications */
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&iface->constants_table, key, c) {
Expand Down Expand Up @@ -2524,7 +2523,6 @@ static uint32_t zend_check_trait_usage(const zend_class_entry *ce, const zend_cl
{
if (UNEXPECTED((trait->ce_flags & ZEND_ACC_TRAIT) != ZEND_ACC_TRAIT)) {
zend_error_noreturn(E_COMPILE_ERROR, "Class %s is not a trait, Only traits may be used in 'as' and 'insteadof' statements", ZSTR_VAL(trait->name));
return 0;
}

for (uint32_t i = 0; i < ce->num_traits; i++) {
Expand All @@ -2533,7 +2531,6 @@ static uint32_t zend_check_trait_usage(const zend_class_entry *ce, const zend_cl
}
}
zend_error_noreturn(E_COMPILE_ERROR, "Required Trait %s wasn't added to %s", ZSTR_VAL(trait->name), ZSTR_VAL(ce->name));
return 0;
}
/* }}} */

Expand Down
2 changes: 0 additions & 2 deletions Zend/zend_vm_execute.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Zend/zend_vm_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,6 @@ function gen_null_handler($f, $kind) {
out($f,"\n");
out($f,"\tSAVE_OPLINE();\n");
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
out($f,"}\n\n");
}

Expand Down Expand Up @@ -1812,12 +1811,10 @@ function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array())
case ZEND_VM_KIND_SWITCH:
out($f,"default: ZEND_NULL_LABEL:\n");
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
break;
case ZEND_VM_KIND_GOTO:
out($f,"ZEND_NULL_LABEL:\n");
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
break;
case ZEND_VM_KIND_HYBRID:
out($f,"\t\t\tHYBRID_CASE(HYBRID_HALT):\n");
Expand Down
17 changes: 10 additions & 7 deletions build/config.guess
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2024 Free Software Foundation, Inc.
# Copyright 1992-2025 Free Software Foundation, Inc.

# shellcheck disable=SC2006,SC2268 # see below for rationale

timestamp='2024-07-27'
timestamp='2025-07-10'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright 1992-2024 Free Software Foundation, Inc.
Copyright 1992-2025 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Expand Down Expand Up @@ -1597,8 +1597,11 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
*:Ironclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
;;
*:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
;;
esac

Expand Down Expand Up @@ -1808,8 +1811,8 @@ fi
exit 1

# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-format: "%Y-%02m-%02d"
# time-stamp-end: "'"
# End:
28 changes: 19 additions & 9 deletions build/config.sub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2024 Free Software Foundation, Inc.
# Copyright 1992-2025 Free Software Foundation, Inc.

# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale

timestamp='2024-05-27'
timestamp='2025-07-10'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)

Copyright 1992-2024 Free Software Foundation, Inc.
Copyright 1992-2025 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Expand Down Expand Up @@ -145,6 +145,7 @@ case $1 in
| kfreebsd*-gnu* \
| knetbsd*-gnu* \
| kopensolaris*-gnu* \
| ironclad-* \
| linux-* \
| managarm-* \
| netbsd*-eabi* \
Expand Down Expand Up @@ -242,7 +243,6 @@ case $1 in
| rombug \
| semi \
| sequent* \
| siemens \
| sgi* \
| siemens \
| sim \
Expand All @@ -261,7 +261,7 @@ case $1 in
basic_machine=$field1-$field2
basic_os=
;;
zephyr*)
tock* | zephyr*)
basic_machine=$field1-unknown
basic_os=$field2
;;
Expand Down Expand Up @@ -1194,7 +1194,7 @@ case $cpu-$vendor in
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
arm64-* | aarch64le-*)
arm64-* | aarch64le-* | arm64_32-*)
cpu=aarch64
;;

Expand Down Expand Up @@ -1321,6 +1321,7 @@ case $cpu-$vendor in
| i960 \
| ia16 \
| ia64 \
| intelgt \
| ip2k \
| iq2000 \
| javascript \
Expand Down Expand Up @@ -1522,6 +1523,10 @@ EOF
kernel=nto
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
;;
ironclad*)
kernel=ironclad
os=`echo "$basic_os" | sed -e 's|ironclad|mlibc|'`
;;
linux*)
kernel=linux
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
Expand Down Expand Up @@ -1976,6 +1981,7 @@ case $os in
| atheos* \
| auroraux* \
| aux* \
| banan_os* \
| beos* \
| bitrig* \
| bme* \
Expand Down Expand Up @@ -2022,7 +2028,6 @@ case $os in
| ios* \
| iris* \
| irix* \
| ironclad* \
| isc* \
| its* \
| l4re* \
Expand Down Expand Up @@ -2118,6 +2123,7 @@ case $os in
| sysv* \
| tenex* \
| tirtos* \
| tock* \
| toppers* \
| tops10* \
| tops20* \
Expand Down Expand Up @@ -2214,6 +2220,8 @@ case $kernel-$os-$obj in
;;
uclinux-uclibc*- | uclinux-gnu*- )
;;
ironclad-mlibc*-)
;;
managarm-mlibc*- | managarm-kernel*- )
;;
windows*-msvc*-)
Expand Down Expand Up @@ -2249,6 +2257,8 @@ case $kernel-$os-$obj in
;;
*-eabi*- | *-gnueabi*-)
;;
ios*-simulator- | tvos*-simulator- | watchos*-simulator- )
;;
none--*)
# None (no kernel, i.e. freestanding / bare metal),
# can be paired with an machine code file format
Expand Down Expand Up @@ -2347,8 +2357,8 @@ echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
exit

# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-format: "%Y-%02m-%02d"
# time-stamp-end: "'"
# End:
3 changes: 0 additions & 3 deletions ext/pdo/pdo.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ PDO_API zend_result php_pdo_register_driver(const pdo_driver_t *driver) /* {{{ *
if (driver->api_version != PDO_DRIVER_API) {
zend_error_noreturn(E_ERROR, "PDO: driver %s requires PDO API version " ZEND_ULONG_FMT "; this is PDO version %d",
driver->driver_name, driver->api_version, PDO_DRIVER_API);
return FAILURE;
}
if (!zend_hash_str_exists(&module_registry, "pdo", sizeof("pdo") - 1)) {
zend_error_noreturn(E_ERROR, "The PDO extension must be loaded first in order to load PDO drivers");
return FAILURE; /* NOTREACHED */
}

return zend_hash_str_add_ptr(&pdo_driver_hash, driver->driver_name, driver->driver_name_len, (void*)driver) != NULL ? SUCCESS : FAILURE;
Expand All @@ -141,7 +139,6 @@ PDO_API zend_result php_pdo_register_driver_specific_ce(const pdo_driver_t *driv
{
if (!zend_hash_str_exists(&module_registry, "pdo", sizeof("pdo") - 1)) {
zend_error_noreturn(E_ERROR, "The PDO extension must be loaded first in order to load PDO drivers");
return FAILURE; /* NOTREACHED */
}

return zend_hash_str_add_ptr(&pdo_driver_specific_ce_hash, driver->driver_name,
Expand Down
1 change: 0 additions & 1 deletion ext/pgsql/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -3676,7 +3676,6 @@ PHP_FUNCTION(pg_unescape_bytea)
tmp = (char *)PQunescapeBytea((unsigned char*)from, &to_len);
if (!tmp) {
zend_error_noreturn(E_ERROR, "Out of memory");
return;
}

RETVAL_STRINGL(tmp, to_len);
Expand Down
3 changes: 0 additions & 3 deletions main/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ PHPAPI zend_result php_output_handler_conflict_register(const char *name, size_t

if (!EG(current_module)) {
zend_error_noreturn(E_ERROR, "Cannot register an output handler conflict outside of MINIT");
return FAILURE;
}
str = zend_string_init_interned(name, name_len, 1);
zend_hash_update_ptr(&php_output_handler_conflicts, str, check_func);
Expand All @@ -626,7 +625,6 @@ PHPAPI zend_result php_output_handler_reverse_conflict_register(const char *name

if (!EG(current_module)) {
zend_error_noreturn(E_ERROR, "Cannot register a reverse output handler conflict outside of MINIT");
return FAILURE;
}

if (NULL != (rev_ptr = zend_hash_str_find_ptr(&php_output_handler_reverse_conflicts, name, name_len))) {
Expand Down Expand Up @@ -663,7 +661,6 @@ PHPAPI zend_result php_output_handler_alias_register(const char *name, size_t na

if (!EG(current_module)) {
zend_error_noreturn(E_ERROR, "Cannot register an output handler alias outside of MINIT");
return FAILURE;
}
str = zend_string_init_interned(name, name_len, 1);
zend_hash_update_ptr(&php_output_handler_aliases, str, func);
Expand Down