mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix MSAN getservbyport() false positive Fix uninitialized CG(zend_lineno) Fix uninitialized EG(user_error_handler_error_reporting)
This commit is contained in:
@@ -711,6 +711,7 @@ static void auto_global_copy_ctor(zval *zv) /* {{{ */
|
||||
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{{ */
|
||||
{
|
||||
compiler_globals->compiled_filename = NULL;
|
||||
compiler_globals->zend_lineno = 0;
|
||||
|
||||
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(compiler_globals->function_table, 1024, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
@@ -803,6 +804,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
|
||||
zend_init_call_trampoline_op();
|
||||
memset(&executor_globals->trampoline, 0, sizeof(zend_op_array));
|
||||
executor_globals->capture_warnings_during_sccp = 0;
|
||||
executor_globals->user_error_handler_error_reporting = 0;
|
||||
ZVAL_UNDEF(&executor_globals->user_error_handler);
|
||||
ZVAL_UNDEF(&executor_globals->user_exception_handler);
|
||||
executor_globals->in_autoload = NULL;
|
||||
|
||||
@@ -117,6 +117,10 @@ PHPAPI php_basic_globals basic_globals;
|
||||
#include "zend_frameless_function.h"
|
||||
#include "basic_functions_arginfo.h"
|
||||
|
||||
#if __has_feature(memory_sanitizer)
|
||||
# include <sanitizer/msan_interface.h>
|
||||
#endif
|
||||
|
||||
typedef struct _user_tick_function_entry {
|
||||
zend_fcall_info fci;
|
||||
zend_fcall_info_cache fci_cache;
|
||||
@@ -2233,6 +2237,10 @@ PHP_FUNCTION(getservbyport)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* MSAN false positive, getservbyport() is not properly intercepted. */
|
||||
#if __has_feature(memory_sanitizer)
|
||||
__msan_unpoison_string(serv->s_name);
|
||||
#endif
|
||||
RETURN_STRING(serv->s_name);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
Reference in New Issue
Block a user