Skip to content

Commit 841e54d

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
2 parents 3c3ec0e + 5fd53a8 commit 841e54d

File tree

4 files changed

+0
-127
lines changed

4 files changed

+0
-127
lines changed

ext/gmp/gmp.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,26 +1354,13 @@ ZEND_FUNCTION(gmp_pow)
13541354
RETURN_THROWS();
13551355
}
13561356

1357-
double powmax = log((double)ZEND_LONG_MAX);
1358-
13591357
if (Z_TYPE_P(base_arg) == IS_LONG && Z_LVAL_P(base_arg) >= 0) {
13601358
INIT_GMP_RETVAL(gmpnum_result);
1361-
if ((log(Z_LVAL_P(base_arg)) * exp) > powmax) {
1362-
zend_value_error("base and exponent overflow");
1363-
RETURN_THROWS();
1364-
}
13651359
mpz_ui_pow_ui(gmpnum_result, Z_LVAL_P(base_arg), exp);
13661360
} else {
13671361
mpz_ptr gmpnum_base;
1368-
zend_ulong gmpnum;
13691362
FETCH_GMP_ZVAL(gmpnum_base, base_arg, temp_base, 1);
13701363
INIT_GMP_RETVAL(gmpnum_result);
1371-
gmpnum = mpz_get_ui(gmpnum_base);
1372-
if ((log(gmpnum) * exp) > powmax) {
1373-
FREE_GMP_TEMP(temp_base);
1374-
zend_value_error("base and exponent overflow");
1375-
RETURN_THROWS();
1376-
}
13771364
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
13781365
FREE_GMP_TEMP(temp_base);
13791366
}

ext/gmp/tests/gmp_pow.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
gmp_pow() basic tests
33
--EXTENSIONS--
44
gmp
5-
--SKIPIF--
6-
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
75
--FILE--
86
<?php
97

ext/gmp/tests/gmp_pow_32bits.phpt

Lines changed: 0 additions & 77 deletions
This file was deleted.

ext/gmp/tests/gmp_pow_fpe.phpt

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)