#47467 [Opn->Asn]: The crc32b polynomial result has a wrong endianess

From: Date: Fri, 20 Feb 2009 22:21:03 +0000
Subject: #47467 [Opn->Asn]: The crc32b polynomial result has a wrong endianess
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134062@lists.php.net to get a copy of this message
ID: 47467 Updated by: pajoye@php.net Reported By: php at twinmail dot de -Status: Open +Status: Assigned Bug Type: hash related Operating System: Windows XP SP2 PHP Version: 5.2.8 -Assigned To: +Assigned To: pajoye New Comment: Windows has no specific endianess but the processor. However I can reproduce on windows (vc6 and vc9). Weird, needs more analyze. Previous Comments: ------------------------------------------------------------------------ [2009-02-20 21:24:26] php at twinmail dot de Description: ------------ The polynomial result of the crc32b hash function has since 5.2.8 a wrong byte endianess on Windows. This also affects the CVS snapshot. I cannot reproduce this error on any linux (debian / debian / gentoo / opensuse) box I have, so I think this bug only affects Windows versions. I tested different versions of PHP on my Windows system: PHP 5.2.9RC4-dev (cli) (built: Feb 20 2009 15:57:39): affected PHP 5.2.8 (cli) (built: Dec 8 2008 19:31:23): affected PHP 5.2.6 (cli) (built: May 2 2008 18:02:07): NOT affected The bug #45028 is maybe related to this one. Reproduce code: --------------- print hash('crc32b', 'Lorem Ipsum'); Expected result: ---------------- 5dd48a35 Actual result: -------------- 358ad45d ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47467&edit=1

« previous php.bugs (#134062) next »