Skip to content

Commit 9168b18

Browse files
committed
Merge branch 'PHP-8.3'
2 parents 8082567 + 6140f9a commit 9168b18

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Zend/zend_max_execution_timer.c

+10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
# include <pthread_np.h>
2828
# endif
2929

30+
#if __has_feature(memory_sanitizer)
31+
# include <sanitizer/msan_interface.h>
32+
#endif
33+
3034
#include "zend.h"
3135
#include "zend_globals.h"
3236

@@ -61,6 +65,12 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */
6165
sev.sigev_notify_thread_id = (pid_t) syscall(SYS_gettid);
6266
# endif
6367

68+
#if __has_feature(memory_sanitizer)
69+
/* MSan does not intercept timer_create() */
70+
__msan_unpoison(&EG(max_execution_timer_timer),
71+
sizeof(EG(max_execution_timer_timer)));
72+
#endif
73+
6474
// 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
6575
if (timer_create(ZEND_MAX_EXECUTION_TIMERS_CLOCK, &sev, &EG(max_execution_timer_timer)) != 0) {
6676
zend_strerror_noreturn(E_ERROR, errno, "Could not create timer");

0 commit comments

Comments
 (0)