Bug #79472 [Opn]: ext/ffi/tests/040.phpt TC fails on Big endian arch
| From: | girgias@php.net | Date: | Mon, 13 Apr 2020 18:05:26 +0000 |
| Subject: | Bug #79472 [Opn]: ext/ffi/tests/040.phpt TC fails on Big endian arch | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-226560@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79472&edit=1
ID: 79472
Updated by: girgias@php.net
Reported by: vibhutisawant18 at gmail dot com
Summary: ext/ffi/tests/040.phpt TC fails on Big endian arch
Status: Open
Type: Bug
Package: Testing related
Operating System: Ubuntu 16.04
PHP Version: master-Git-2020-04-13 (Git)
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Assigning to dmitry as he's the maintainer of FFI
Previous Comments:
------------------------------------------------------------------------
[2020-04-13 11:42:31] vibhutisawant18 at gmail dot com
Description:
------------
ext/ffi/tests/040.phpt TC fails as the actual output obtained on big endian doesnt match the
expected output which is specific to little endian arch.
FFI\CType data stores an int value as int32_t datatype comprising of 4 bytes, when the same variable
is type casted to int8_t[4](an array of int8_t), the value returned on little endian is
FFI\CData:int8_t[4] Object
(
[0] => 5
[1] => 0
[2] => 0
[3] => 0
)
whereas the output obtained on big endian is :
FFI\CData:int8_t[4] Object
(
[0] => 0
[1] => 0
[2] => 0
[3] => 5
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79472&edit=1