php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20994 int/long confusion in 64bits machine
Submitted: 2002-12-13 12:15 UTC Modified: 2003-03-10 10:23 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: soula at lifl dot fr Assigned: ddhill (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.0RC3 OS: any 64bit
Private report: No CVE-ID: None
 [2002-12-13 12:15 UTC] soula at lifl dot fr
There are locations in source where variables are declared int or long and are menipulated with long or int pointer respectively.

 - The function "OnUpdateInt" use long pointer (the case is already referenced in bug#20433 but I found more variables concerned).

 - In function "zend_parse_parameters()", the variable for token "l" should be a long and the 2nd variable for token "s" should be a int.

The patch above try to fix the 2 cases :

ftp://codon.genopole-lille.fr/pub/php-4.3.0RC2-onupdateint+zendparam.patch

-- 
Julien

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-14 03:50 UTC] sniper@php.net
Could you provide that patch in unified diff format?
And against the CVS HEAD?

 [2002-12-14 12:53 UTC] msopacua@php.net
FYI: there's a README.SUBMITTING_PATCH in the distribution, containing the guidelines for ... submitting a patch.
 [2002-12-14 14:43 UTC] tom at minnesota dot com
This issue will cause segmentation faults under php cgi NetBSD/Alpha-1.6.
 [2002-12-15 22:27 UTC] msopacua@php.net
Yes, but I tested the patch under AIX/64bit, and I got a broken build. Not sure whether this is related to my machine, the patch or the combination, but for now - I'd rather investigate.

Additionally - AIX uses a long for tv_usec only under certain conditions. Otherwise it's a signed int, so the patch needs work, regardless.
 [2002-12-16 00:17 UTC] tom at minnesota dot com
The patch provided fixed the unaligned access errors on my NetBSD/Alpha-1.6 machine (64-bit). However, it also caused:

  header("Location: ..."); 

to fail for redirections. Examining the patch, it does patch that function. I'm not sure why it breaks.
 [2002-12-31 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2003-03-10 07:25 UTC] ddhill@php.net
This problem has been verified and is targetted for the 4.3.2 release
 [2003-03-10 10:23 UTC] ddhill@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC