Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ extern "C++" {

/* Memory sanitizer is incompatible with ifunc resolvers. Even if the resolver
* is marked as no_sanitize("memory") it will still be instrumented and crash. */
#if __has_feature(memory_sanitizer) || __has_feature(thread_sanitizer) || \
__has_feature(dataflow_sanitizer)
#if defined(PHP_DISABLE_IFUNC) || __has_feature(memory_sanitizer) || \
__has_feature(thread_sanitizer) || __has_feature(dataflow_sanitizer)
# undef HAVE_FUNC_ATTRIBUTE_IFUNC
#endif

Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ AS_VAR_IF([PHP_BINARIES],,
dnl Exit early.
AS_VAR_IF([PHP_INSTALLED_SAPIS],, [AC_MSG_ERROR([Nothing to build.])])

AS_VAR_IF([php_tsrm_dlopened_sapi], [yes], [
AC_DEFINE([PHP_DISABLE_IFUNC], [1], [Define to disable IFUNC resolvers.])
])

dnl Add POSIX threads compilation and linker flags when thread safety is enabled
dnl with either the '--enable-zts' configure option or automatically enabled by
dnl PHP SAPIs. For example, Apache SAPI.
Expand Down
Loading