From b97df475dfbfe5c7ddd883432eb3bcf3645803e9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 22 Jun 2015 12:53:52 +0300 Subject: Fixed crash in Zend/tests/bug69891.phpt on x86 (32-bit). compare_function() now has to be compatible with binary_op_type (use fastcall convention). Introduced new zval_compare_function() to be used as zval comparison callback instead of compare_function(). --- Zend/zend_operators.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Zend/zend_operators.c') diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 7e3b458bbe..26584745dc 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1760,7 +1760,7 @@ static inline void zend_free_obj_get_result(zval *op) /* {{{ */ } /* }}} */ -ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ +static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ { int ret; int converted = 0; @@ -1942,6 +1942,18 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ } /* }}} */ +ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ +{ + return i_compare_function(result, op1, op2); +} +/* }}} */ + +ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ +{ + return i_compare_function(result, op1, op2); +} +/* }}} */ + static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */ { zval result; -- cgit v1.2.1