mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Fix MSAN getservbyport() false positive
Closes GH-15814
This commit is contained in:
parent
1f35e2a999
commit
0faa1d2017
1 changed files with 8 additions and 0 deletions
|
@ -112,6 +112,10 @@ PHPAPI php_basic_globals basic_globals;
|
||||||
#include "streamsfuncs.h"
|
#include "streamsfuncs.h"
|
||||||
#include "basic_functions_arginfo.h"
|
#include "basic_functions_arginfo.h"
|
||||||
|
|
||||||
|
#if __has_feature(memory_sanitizer)
|
||||||
|
# include <sanitizer/msan_interface.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _user_tick_function_entry {
|
typedef struct _user_tick_function_entry {
|
||||||
zend_fcall_info fci;
|
zend_fcall_info fci;
|
||||||
zend_fcall_info_cache fci_cache;
|
zend_fcall_info_cache fci_cache;
|
||||||
|
@ -2263,6 +2267,10 @@ PHP_FUNCTION(getservbyport)
|
||||||
RETURN_FALSE;
|
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);
|
RETURN_STRING(serv->s_name);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue