Bug 124318 - PHP 4.3.6 breaks gmp_powm
Summary: PHP 4.3.6 breaks gmp_powm
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
(Show other bugs)
Version: 1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-25 16:43 UTC by Oskari Saarenmaa
Modified: 2007-11-30 22:10 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Oskari Saarenmaa 2004-05-25 16:43:04 UTC
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 09:23:05 UTC
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 10:14:08 UTC
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 12:54:55 UTC
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 15:32:11 UTC
OK, great, we'll include the fix in the 4.3.7 update.

Comment 5 Joe Orton 2004-07-20 12:06:16 UTC
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 12:39:06 UTC
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 21:06:33 UTC
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.