Bug 158096
Summary: | FC3 PHP bitwise operations on large integers fails | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | James Pooton <james> |
Component: | php | Assignee: | Joe Orton <jorton> |
Status: | CLOSED WONTFIX | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-05-18 18:18:07 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
James Pooton
2005-05-18 17:25:01 UTC
For some reason my submission isn't including the product information: Product Fedora Core Component php Version fc3 Platform i386 Since Zend will convert the number into a 32-bit integer to do the bitwise "and" there has to be some choice of how to cope with integer overflow. In 4.3.10 and previous 4.3.11-based FC3 updates, the behaviour was to truncate. Previously, and again in the latest update, it is to rely on the underlying behaviour of integer oveflow in C (which is strictly undefined in most cases, but in practice will wrap). There do exist a number of scripts which rely on the original (and now, current) behaviour, so we've reverted the patch to maintain the behaviour chosen upstream. Having language behaviour which is compatible with upstream is really more important than making some "correct" choice; so I'm marking this WONTFIX. The real answer is exactly that which you suggest: scripts should not rely on *any* behaviour on integer overflow - and should use GMP for such operations. |