diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-01 11:14:54 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-01 11:14:54 +0200 |
commit | 8fc58a1a1d32dd288bf4b9e09f9302a99d7b35fe (patch) | |
tree | ac8467b70f35a493c4362d7dcb1e2b1b87bb3181 /ext/standard/random.c | |
parent | 4a8fe02c7c17d3d4427e9b0097ac72ed6bc163f7 (diff) | |
parent | 7defd5f69c7360ab1755f8a467972b3b012632c8 (diff) | |
download | php-git-8fc58a1a1d32dd288bf4b9e09f9302a99d7b35fe.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/standard/random.c')
-rw-r--r-- | ext/standard/random.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/random.c b/ext/standard/random.c index 01d99a5eef..9fe2ac2133 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -38,6 +38,10 @@ # endif #endif +#if __has_feature(memory_sanitizer) +# include <sanitizer/msan_interface.h> +#endif + #ifdef ZTS int random_globals_id; #else @@ -133,6 +137,10 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw) } } +#if __has_feature(memory_sanitizer) + /* MSan does not instrument manual syscall invocations. */ + __msan_unpoison(bytes + read_bytes, n); +#endif read_bytes += (size_t) n; } #endif |