mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix release build failure
This commit is contained in:
commit
fa18c115be
4 changed files with 13 additions and 15 deletions
|
@ -3955,6 +3955,15 @@ static void preload_check_windows_restrictions(zend_class_entry *scope) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static inline int preload_update_class_constants(zend_class_entry *ce) {
|
||||||
|
/* This is a separate function to work around what appears to be a bug in GCC
|
||||||
|
* maybe-uninitialized analysis. */
|
||||||
|
zend_try {
|
||||||
|
return zend_update_class_constants(ce);
|
||||||
|
} zend_end_try();
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
static zend_class_entry *preload_load_prop_type(zend_property_info *prop, zend_string *name) {
|
static zend_class_entry *preload_load_prop_type(zend_property_info *prop, zend_string *name) {
|
||||||
zend_class_entry *ce;
|
zend_class_entry *ce;
|
||||||
if (zend_string_equals_literal_ci(name, "self")) {
|
if (zend_string_equals_literal_ci(name, "self")) {
|
||||||
|
@ -4000,18 +4009,7 @@ static void preload_ensure_classes_loadable() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
|
if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
|
||||||
int result = SUCCESS;
|
if (preload_update_class_constants(ce) == FAILURE) {
|
||||||
zend_try {
|
|
||||||
result = zend_update_class_constants(ce);
|
|
||||||
} zend_catch {
|
|
||||||
/* Provide some context for the generated error. */
|
|
||||||
zend_error_noreturn(E_ERROR,
|
|
||||||
"Error generated while resolving initializers of class %s during preloading",
|
|
||||||
ZSTR_VAL(ce->name));
|
|
||||||
} zend_end_try();
|
|
||||||
if (result == FAILURE) {
|
|
||||||
/* Just present to be safe: We generally always throw some
|
|
||||||
* other fatal error as part of update_class_constants(). */
|
|
||||||
zend_error_noreturn(E_ERROR,
|
zend_error_noreturn(E_ERROR,
|
||||||
"Failed to resolve initializers of class %s during preloading",
|
"Failed to resolve initializers of class %s during preloading",
|
||||||
ZSTR_VAL(ce->name));
|
ZSTR_VAL(ce->name));
|
||||||
|
|
|
@ -14,4 +14,4 @@ var_dump(class_exists('Foo'));
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Undefined class constant 'self::DOES_NOT_EXIST' in Unknown on line 0
|
Fatal error: Undefined class constant 'self::DOES_NOT_EXIST' in Unknown on line 0
|
||||||
|
|
||||||
Fatal error: Error generated while resolving initializers of class Foo during preloading in Unknown on line 0
|
Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0
|
||||||
|
|
|
@ -15,4 +15,4 @@ var_dump(class_exists('Foo'));
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
|
Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
|
||||||
|
|
||||||
Fatal error: Error generated while resolving initializers of class Foo during preloading in Unknown on line 0
|
Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0
|
||||||
|
|
|
@ -12,4 +12,4 @@ Unreachable
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
|
Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
|
||||||
|
|
||||||
Fatal error: Error generated while resolving initializers of class Test during preloading in Unknown on line 0
|
Fatal error: Failed to resolve initializers of class Test during preloading in Unknown on line 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue