From: Nikita Popov Date: Thu, 20 Jun 2019 10:11:30 +0000 (+0200) Subject: Disable float division by zero sanitizer for div_function X-Git-Tag: php-7.4.0alpha2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a59e0cfce528669642f8199410b267146a30b714;p=php Disable float division by zero sanitizer for div_function We intentionally divide by zero here and want to get IEEE-754 semantics. --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 14019a5afa..f6ecd42562 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1263,6 +1263,9 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* { } /* }}} */ +#ifdef __clang__ +__attribute__((no_sanitize("float-divide-by-zero"))) +#endif ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ { zval op1_copy, op2_copy;