Skip to content

Commit bceb3ad

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 56fb910 + 841e54d commit bceb3ad

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
@@ -1364,26 +1364,13 @@ ZEND_FUNCTION(gmp_pow)
13641364
RETURN_THROWS();
13651365
}
13661366

1367-
double powmax = log((double)ZEND_LONG_MAX);
1368-
13691367
if (Z_TYPE_P(base_arg) == IS_LONG && Z_LVAL_P(base_arg) >= 0) {
13701368
INIT_GMP_RETVAL(gmpnum_result);
1371-
if ((log(Z_LVAL_P(base_arg)) * exp) > powmax) {
1372-
zend_value_error("base and exponent overflow");
1373-
RETURN_THROWS();
1374-
}
13751369
mpz_ui_pow_ui(gmpnum_result, Z_LVAL_P(base_arg), exp);
13761370
} else {
13771371
mpz_ptr gmpnum_base;
1378-
zend_ulong gmpnum;
13791372
FETCH_GMP_ZVAL(gmpnum_base, base_arg, temp_base, 1);
13801373
INIT_GMP_RETVAL(gmpnum_result);
1381-
gmpnum = mpz_get_ui(gmpnum_base);
1382-
if ((log(gmpnum) * exp) > powmax) {
1383-
FREE_GMP_TEMP(temp_base);
1384-
zend_value_error("base and exponent overflow");
1385-
RETURN_THROWS();
1386-
}
13871374
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
13881375
FREE_GMP_TEMP(temp_base);
13891376
}

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)