Merge branch 'PHP-8.3'

This commit is contained in:
Go Kudo 2024-08-17 02:57:12 +09:00
commit 9168b18c84

View file

@ -27,6 +27,10 @@
# include <pthread_np.h>
# endif
#if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
#endif
#include "zend.h"
#include "zend_globals.h"
@ -61,6 +65,12 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */
sev.sigev_notify_thread_id = (pid_t) syscall(SYS_gettid);
# endif
#if __has_feature(memory_sanitizer)
/* MSan does not intercept timer_create() */
__msan_unpoison(&EG(max_execution_timer_timer),
sizeof(EG(max_execution_timer_timer)));
#endif
// Measure wall time instead of CPU time as originally planned now that it is possible https://github.com/php/php-src/pull/6504#issuecomment-1370303727
if (timer_create(ZEND_MAX_EXECUTION_TIMERS_CLOCK, &sev, &EG(max_execution_timer_timer)) != 0) {
zend_strerror_noreturn(E_ERROR, errno, "Could not create timer");