|  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
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: soula at lifl dot fr
New email:
PHP Version: OS:


 [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 :



Add a Patch

Pull Requests

Add a Pull Request


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

 [2002-12-14 12:53 UTC]
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]
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]
This problem has been verified and is targetted for the 4.3.2 release
 [2003-03-10 10:23 UTC]
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
In case this was a documentation problem, the fix will show up soon at

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

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 06:03:34 2021 UTC