|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug38698_add_endian_check.patch (last revision 2012-11-01 09:06 UTC by tianhonglouis at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-06-26 16:49 UTC] felipe@php.net
[2013-06-26 16:49 UTC] felipe@php.net
-Status: Open
+Status: Closed
[2014-10-07 23:18 UTC] stas@php.net
[2014-10-07 23:29 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 01:00:01 2025 UTC |
Description: ------------ For ext/dba/tests/bug38698.phpt, if running the testcase on big-endian machine like ppc, it will fail. The main root cause is the function pack('i', 129), if add the format character "i", it's machine dependent size and byte order. Big endian and liitle endian will output the different string value. According to the string value, dba_insert() will insert the different position of the db, finally cause the different md5 value. Test script: --------------- php run-tests.php ext/dba/tests/bug38698.phpt Expected result: ---------------- Running selected tests. PASS Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) [ext/dba/tests/bug38698.phpt] ===================================================================== Number of tests : 1 1 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 1 (100.0%) (100.0%) --------------------------------------------------------------------- Time taken : 0 seconds Actual result: -------------- Running selected tests. FAIL Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) [ext/dba/tests/bug38698.phpt] ===================================================================== Number of tests : 1 1 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 1 (100.0%) (100.0%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 0 ( 0.0%) ( 0.0%) --------------------------------------------------------------------- Time taken : 0 seconds ===================================================================== ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) [ext/dba/tests/bug38698.phpt]