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: Assigned
+Status: Closed
Type: Bug
Package: Testing related
Operating System: Ubuntu 16.04
PHP Version: master-Git-2020-04-13 (Git)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/php-src/commit/8c5faf7ad1a28edd7c20a474602b77c3ebae911e
Previous Comments:
------------------------------------------------------------------------
[2020-04-13 21:25:46] [email protected]
The following pull request has been associated:
Patch Name: Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch
On GitHub: https://github.com/php/php-src/pull/5383
Patch: https://github.com/php/php-src/pull/5383.patch
------------------------------------------------------------------------
[2020-04-13 18:05:25] [email protected]
Assigning to dmitry as he's the maintainer of FFI
------------------------------------------------------------------------
[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.