Skip to content

Fix broken GCC compatibility #15447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Zend/zend_max_execution_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
#include <sys/syscall.h>
#include <sys/types.h>

#include "zend.h"
#include "zend_globals.h"
#include "zend_portability.h"

#if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
#endif

#include "zend.h"
#include "zend_globals.h"

// Musl Libc defines this macro, glibc does not
// According to "man 2 timer_create" this field should always be available, but it's not: https://sourceware.org/bugzilla/show_bug.cgi?id=27417
# ifndef sigev_notify_thread_id
Expand All @@ -53,8 +54,8 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */

#if __has_feature(memory_sanitizer)
/* MSan does not intercept timer_create() */
__msan_unpoison(&EG(max_execution_timer_timer),
sizeof(EG(max_execution_timer_timer)));
__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
Expand Down
Loading