Edit report at https://bugs.php.net/bug.php?id=79472&edit=1
ID: 79472
Updated by: [email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.