Bug 124318 - PHP 4.3.6 breaks gmp_powm
PHP 4.3.6 breaks gmp_powm
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-25 12:43 EDT by Oskari Saarenmaa
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 4.3.8-1.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-23 17:06:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Oskari Saarenmaa 2004-05-25 12:43:04 EDT
Description of problem:
Prior to PHP 4.3.6 the mod argument to gmp_powm() could be a
hexadecimal string, in the new version it must be passed to gmp_init()
first.  This breaks compatibility with older code.

Version-Release number of selected component (if applicable):
php-4.3.6

Actual Results:  With PHP 4.3.6
% echo '<?php var_dump(gmp_powm("0x123", "0x123", "0x123")) ?>' | php -q
bool(false)

Expected Results:  With PHP 4.3.4
% echo '<?php var_dump(gmp_powm("0x123", "0x123", "0x123")) ?>' | php -q
resource(4) of type (GMP integer)


This is apparently caused by a change in php 4.3.5 or 4.3.6,
ext/gmp/gmp.c, line 833: convert_to_long_ex(mod_arg);
Running convert_to_long_ex() on anything but normal 32 bit numbers
will break things.
Comment 1 Oskari Saarenmaa 2004-06-09 05:23:05 EDT
PHP 4.3.7 was just released, but unfortunately my patch for the
problem didn't make it in the release.  If you are planning on
updating the Fedora packages to 4.3.7 please include my fix for this
bug: http://bugs.php.net/bug.php?id=28525
Comment 2 Joe Orton 2004-06-09 06:14:08 EDT
Thanks for the report.  Could you provide a (minimal) valid test case
for this if, as Ilia states, it is not valid to pass hex strings?  A
patch along with such a test case may receive better reception
upstream too :)
Comment 3 Oskari Saarenmaa 2004-06-10 08:54:55 EDT
I added some more information about the case in my php.net bug report,
and it has now been fixed in CVS.
Comment 4 Joe Orton 2004-06-10 11:32:11 EDT
OK, great, we'll include the fix in the 4.3.7 update.
Comment 5 Joe Orton 2004-07-20 08:06:16 EDT
4.3.8 updates including your patch are now available for testing from:

http://people.redhat.com/jorton/FedoraC1-php/

Please post results of any testing.
Comment 6 Oskari Saarenmaa 2004-07-20 08:39:06 EDT
The update rpms seem to fix the issue, but apparently also add a
dependency from php to php-mbstring.
Comment 7 Joe Orton 2004-07-23 17:06:33 EDT
That's deliberate, up2date and yum will handle it correctly.  This
update has now been made live.  Thanks for the report and for chasing
this upstream.

http://www.redhat.com/archives/fedora-announce-list/2004-July/msg00026.html

Note You need to log in before you can comment on or make changes to this bug.