@@ -527,7 +527,7 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
527527 char * colon ;
528528
529529 if (IS_CONSTANT_VISITED (p )) {
530- zend_error (E_ERROR , "Cannot declare self-referencing constant '%s'" , Z_STRVAL_P (p ));
530+ zend_error_noreturn (E_ERROR , "Cannot declare self-referencing constant '%s'" , Z_STRVAL_P (p ));
531531 } else if (Z_TYPE_P (p ) == IS_CONSTANT ) {
532532 int refcount ;
533533
@@ -550,7 +550,7 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
550550 if ((colon = (char * )zend_memrchr (Z_STRVAL_P (p ), ':' , Z_STRLEN_P (p )))) {
551551 size_t len ;
552552
553- zend_error (E_ERROR , "Undefined class constant '%s'" , Z_STRVAL_P (p ));
553+ zend_error_noreturn (E_ERROR , "Undefined class constant '%s'" , Z_STRVAL_P (p ));
554554 len = Z_STRLEN_P (p ) - ((colon - Z_STRVAL_P (p )) + 1 );
555555 if (inline_change ) {
556556 zend_string * tmp = zend_string_init (colon + 1 , len , 0 );
@@ -584,9 +584,9 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
584584 }
585585 if ((Z_CONST_FLAGS_P (p ) & IS_CONSTANT_UNQUALIFIED ) == 0 ) {
586586 if (save -> val [0 ] == '\\' ) {
587- zend_error (E_ERROR , "Undefined constant '%s'" , save -> val + 1 );
587+ zend_error_noreturn (E_ERROR , "Undefined constant '%s'" , save -> val + 1 );
588588 } else {
589- zend_error (E_ERROR , "Undefined constant '%s'" , save -> val );
589+ zend_error_noreturn (E_ERROR , "Undefined constant '%s'" , save -> val );
590590 }
591591 if (inline_change ) {
592592 zend_string_release (save );
@@ -698,7 +698,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
698698 case sizeof (zend_fcall_info ):
699699 break ; /* nothing to do currently */
700700 default :
701- zend_error (E_ERROR , "Corrupted fcall_info provided to zend_call_function()" );
701+ zend_error_noreturn (E_ERROR , "Corrupted fcall_info provided to zend_call_function()" );
702702 break ;
703703 }
704704
@@ -1182,7 +1182,7 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */
11821182 zend_on_timeout (EG (timeout_seconds ));
11831183 }
11841184
1185- zend_error (E_ERROR , "Maximum execution time of %pd second%s exceeded" , EG (timeout_seconds ), EG (timeout_seconds ) == 1 ? "" : "s" );
1185+ zend_error_noreturn (E_ERROR , "Maximum execution time of %pd second%s exceeded" , EG (timeout_seconds ), EG (timeout_seconds ) == 1 ? "" : "s" );
11861186}
11871187/* }}} */
11881188
@@ -1224,7 +1224,7 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
12241224 if (!DeleteTimerQueueTimer (NULL , tq_timer , NULL )) {
12251225 EG (timed_out ) = 0 ;
12261226 tq_timer = NULL ;
1227- zend_error (E_ERROR , "Could not delete queued timer" );
1227+ zend_error_noreturn (E_ERROR , "Could not delete queued timer" );
12281228 return ;
12291229 }
12301230 tq_timer = NULL ;
@@ -1234,7 +1234,7 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
12341234 if (!CreateTimerQueueTimer (& tq_timer , NULL , (WAITORTIMERCALLBACK )tq_timer_cb , (VOID * )& EG (timed_out ), seconds * 1000 , 0 , WT_EXECUTEONLYONCE )) {
12351235 EG (timed_out ) = 0 ;
12361236 tq_timer = NULL ;
1237- zend_error (E_ERROR , "Could not queue new timer" );
1237+ zend_error_noreturn (E_ERROR , "Could not queue new timer" );
12381238 return ;
12391239 }
12401240 EG (timed_out ) = 0 ;
@@ -1283,7 +1283,7 @@ void zend_unset_timeout(void) /* {{{ */
12831283 if (!DeleteTimerQueueTimer (NULL , tq_timer , NULL )) {
12841284 EG (timed_out ) = 0 ;
12851285 tq_timer = NULL ;
1286- zend_error (E_ERROR , "Could not delete queued timer" );
1286+ zend_error_noreturn (E_ERROR , "Could not delete queued timer" );
12871287 return ;
12881288 }
12891289 tq_timer = NULL ;
@@ -1319,20 +1319,20 @@ zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* {
13191319 switch (fetch_type ) {
13201320 case ZEND_FETCH_CLASS_SELF :
13211321 if (!EG (scope )) {
1322- zend_error (E_ERROR , "Cannot access self:: when no class scope is active" );
1322+ zend_error_noreturn (E_ERROR , "Cannot access self:: when no class scope is active" );
13231323 }
13241324 return EG (scope );
13251325 case ZEND_FETCH_CLASS_PARENT :
13261326 if (!EG (scope )) {
1327- zend_error (E_ERROR , "Cannot access parent:: when no class scope is active" );
1327+ zend_error_noreturn (E_ERROR , "Cannot access parent:: when no class scope is active" );
13281328 }
13291329 if (!EG (scope )-> parent ) {
1330- zend_error (E_ERROR , "Cannot access parent:: when current class scope has no parent" );
1330+ zend_error_noreturn (E_ERROR , "Cannot access parent:: when current class scope has no parent" );
13311331 }
13321332 return EG (scope )-> parent ;
13331333 case ZEND_FETCH_CLASS_STATIC :
13341334 if (!EG (current_execute_data ) || !EG (current_execute_data )-> called_scope ) {
1335- zend_error (E_ERROR , "Cannot access static:: when no class scope is active" );
1335+ zend_error_noreturn (E_ERROR , "Cannot access static:: when no class scope is active" );
13361336 }
13371337 return EG (current_execute_data )-> called_scope ;
13381338 case ZEND_FETCH_CLASS_AUTO : {
@@ -1348,11 +1348,11 @@ zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* {
13481348 if (use_autoload ) {
13491349 if (!silent && !EG (exception )) {
13501350 if (fetch_type == ZEND_FETCH_CLASS_INTERFACE ) {
1351- zend_error (E_ERROR , "Interface '%s' not found" , class_name -> val );
1351+ zend_error_noreturn (E_ERROR , "Interface '%s' not found" , class_name -> val );
13521352 } else if (fetch_type == ZEND_FETCH_CLASS_TRAIT ) {
1353- zend_error (E_ERROR , "Trait '%s' not found" , class_name -> val );
1353+ zend_error_noreturn (E_ERROR , "Trait '%s' not found" , class_name -> val );
13541354 } else {
1355- zend_error (E_ERROR , "Class '%s' not found" , class_name -> val );
1355+ zend_error_noreturn (E_ERROR , "Class '%s' not found" , class_name -> val );
13561356 }
13571357 }
13581358 }
@@ -1371,11 +1371,11 @@ zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, const zval *
13711371 if (use_autoload ) {
13721372 if ((fetch_type & ZEND_FETCH_CLASS_SILENT ) == 0 && !EG (exception )) {
13731373 if ((fetch_type & ZEND_FETCH_CLASS_MASK ) == ZEND_FETCH_CLASS_INTERFACE ) {
1374- zend_error (E_ERROR , "Interface '%s' not found" , class_name -> val );
1374+ zend_error_noreturn (E_ERROR , "Interface '%s' not found" , class_name -> val );
13751375 } else if ((fetch_type & ZEND_FETCH_CLASS_MASK ) == ZEND_FETCH_CLASS_TRAIT ) {
1376- zend_error (E_ERROR , "Trait '%s' not found" , class_name -> val );
1376+ zend_error_noreturn (E_ERROR , "Trait '%s' not found" , class_name -> val );
13771377 } else {
1378- zend_error (E_ERROR , "Class '%s' not found" , class_name -> val );
1378+ zend_error_noreturn (E_ERROR , "Class '%s' not found" , class_name -> val );
13791379 }
13801380 }
13811381 }
@@ -1432,7 +1432,7 @@ void zend_verify_abstract_class(zend_class_entry *ce) /* {{{ */
14321432 } ZEND_HASH_FOREACH_END ();
14331433
14341434 if (ai .cnt ) {
1435- zend_error (E_ERROR , "Class %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")" ,
1435+ zend_error_noreturn (E_ERROR , "Class %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")" ,
14361436 ce -> name -> val , ai .cnt ,
14371437 ai .cnt > 1 ? "s" : "" ,
14381438 DISPLAY_ABSTRACT_FN (0 ),
0 commit comments