|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50800 Hashes use improper sign with L64 macro
Submitted: 2010-01-19 17:09 UTC Modified: 2018-09-30 14:13 UTC
From: philipp at redfish-solutions dot com Assigned: cmb (profile)
Status: Closed Package: Compile Warning
PHP Version: 5.2.12 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: philipp at redfish-solutions dot com
New email:
PHP Version: OS:


 [2010-01-19 17:09 UTC] philipp at redfish-solutions dot com
The table:

static const php_hash_uint64 rc[R + 1] = {

uses unsigned data of 64-bit size, but it isn't declared as such. When the high bit is set, as above, this causes warnings (or errors, if -Wall is present).

Reproduce code:
The fix is trivial.  In the sequence:

#define L64(x) x##LL
typedef unsigned long long php_hash_uint64;

for example, in ext/hash/php_hash_types.h, the macro should be written as:

#define L64(x) x##ULL



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-30 14:13 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-09-30 14:13 UTC]
This should be fixed with commit 14caf17[1], available as of PHP

[1] <;a=commit;h=14caf174ff219376e4f1234bd297ffe973cc416e>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 01:01:30 2024 UTC