We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dc9418 commit b111674Copy full SHA for b111674
Zend/zend_portability.h
@@ -489,7 +489,10 @@ extern "C++" {
489
# undef HAVE_FUNC_ATTRIBUTE_IFUNC
490
#endif
491
492
-#if defined(HAVE_FUNC_ATTRIBUTE_IFUNC) && defined(HAVE_FUNC_ATTRIBUTE_TARGET)
+/* Only use ifunc resolvers if we have __builtin_cpu_supports() and __builtin_cpu_init(),
493
+ * otherwise the use of zend_cpu_supports() may not be safe inside ifunc resolvers. */
494
+#if defined(HAVE_FUNC_ATTRIBUTE_IFUNC) && defined(HAVE_FUNC_ATTRIBUTE_TARGET) && \
495
+ defined(PHP_HAVE_BUILTIN_CPU_SUPPORTS) && defined(PHP_HAVE_BUILTIN_CPU_INIT)
496
# define ZEND_INTRIN_HAVE_IFUNC_TARGET 1
497
498
0 commit comments