Skip to content
Open
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 @@ -2429,8 +2429,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 @@ -2646,7 +2646,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 @@ -7480,14 +7479,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 @@ -7720,7 +7717,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 @@ -10285,7 +10281,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 @@ -11489,7 +11484,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 @@ -1565,7 +1565,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 @@ -1575,7 +1574,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 @@ -1662,7 +1660,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
3 changes: 0 additions & 3 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,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 @@ -2525,7 +2524,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 @@ -2534,7 +2532,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 @@ -1582,7 +1582,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 @@ -1811,12 +1810,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
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 @@ -605,7 +605,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 @@ -622,7 +621,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 @@ -659,7 +657,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
Loading