Bug #79431 [NEW]: make command fails on Big endian arch
| From: | vibhutisawant18 at gmail dot com | Date: | Mon, 30 Mar 2020 05:52:42 +0000 |
| Subject: | Bug #79431 [NEW]: make command fails on Big endian arch | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-226331@lists.php.net to get a copy of this message | ||
From: vibhutisawant18 at gmail dot com
Operating system: Ubuntu 16.04
PHP version: master-Git-2020-03-30 (Git)
Package: Compile Warning
Bug Type: Bug
Bug description:make command fails on Big endian arch
Description:
------------
With --enable-werror flag enabled in configure command, following
warnings were observed on big endian arch while running the make
command:
1) /root/php/php-src/ext/ffi/ffi_parser.c: In function 'get_skip_sym':
/root/php/php-src/ext/ffi/ffi_parser.c:1664:10: error: 'accept_pos' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
yy_pos = accept_pos;
2)/root/php/php-src/ext/hash/hash_sha3.c: In function 'store64':
/root/php/php-src/ext/hash/hash_sha3.c:54:4: error: array subscript has
type 'char' [-Werror=char-subscripts]
x[i] = val & 0xFF;
^
/root/php/php-src/ext/hash/hash_sha3.c: In function 'xor64':
/root/php/php-src/ext/hash/hash_sha3.c:61:4: error: array subscript has
type 'char' [-Werror=char-subscripts]
x[i] ^= val & 0xFF;
^
3) /root/php/php-src/ext/intl/collator/collator_is_numeric.c: In
function 'collator_u_strtod':
/root/php/php-src/Zend/zend_portability.h:365:10: error: 'use_heap' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
do { if (UNEXPECTED(use_heap)) efree(p); } while (0)
^
/root/php/php-src/ext/intl/collator/collator_is_numeric.c:72:15: note:
'use_heap' was declared here
ALLOCA_FLAG(use_heap);
^
/root/php/php-src/Zend/zend_portability.h:357:12: note: in definition of
macro 'ALLOCA_FLAG'
zend_bool name;
4)/root/php/php-src/ext/pdo/pdo_stmt.c:753:53: error: missing braces
around initializer [-Werror=missing-braces]
zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {{0}}, {0}};
^
/root/php/php-src/ext/pdo/pdo_stmt.c:753:53: note: (near initialization
for 'old_ctor_args.u1')
/root/php/php-src/ext/pdo/pdo_stmt.c:753:47: error: missing braces
around initializer [-Werror=missing-braces]
zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {{0}}, {0}};
^
5)/root/php/php-src/Zend/zend_execute_API.c:49:62: error: missing braces
around initializer [-Werror=missing-braces]
ZEND_API const zend_fcall_info empty_fcall_info = { 0, {{0}, {{0}},
{0}}, NULL, NULL, NULL, 0, 0 };
^
/root/php/php-src/Zend/zend_execute_API.c:49:62: note: (near
initialization for 'empty_fcall_info.function_name.u1')
/root/php/php-src/Zend/zend_execute_API.c:49:56: error: missing braces
around initializer [-Werror=missing-braces]
ZEND_API const zend_fcall_info empty_fcall_info = { 0, {{0}, {{0}},
{0}}, NULL, NULL, NULL, 0, 0 };
^
/root/php/php-src/Zend/zend_execute_API.c:49:56: note: (near
initialization for 'empty_fcall_info.function_name')
/root/php/php-src/Zend/zend_execute_API.c:49:51: error: missing braces
around initializer [-Werror=missing-braces]
ZEND_API const zend_fcall_info empty_fcall_info = { 0, {{0}, {{0}},
{0}}, NULL, NULL, NULL, 0, 0 };
All of the above warnings are fixed by making suggested changes in the
respective files
However no such warnings are observed on amd64 arch.
Also by adding the fixes , the build completes successfully on Little
Endian arch as well.
Added a patch file along with this bug.
How can we get rid of this warnings?
Are there any x86 specific flags used during compilation?
--
Edit bug report at https://bugs.php.net/bug.php?id=79431&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79431&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79431&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79431&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79431&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79431&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79431&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79431&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79431&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79431&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79431&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79431&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79431&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79431&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79431&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79431&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79431&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79431&r=mysqlcfg