From:             vibhutisawant18 at gmail dot com
Operating system: Ubuntu 16.04
PHP version:      master-Git-2020-03-09 (Git)
Package:          Testing related
Bug Type:         Bug
Bug description:FFI:structure/union alignment [ext/ffi/tests/022.phpt] failure

Description:
------------
FFI:structure/union alignment [ext/ffi/tests/022.phpt] fails on Big
endian systems.
 
The TC fails in the following code block:
 
if (substr(PHP_OS, 0, 3) != 'WIN') {
    test_size(32, "struct  {char a; uint32_t b
__attribute__((aligned));}");
    test_align(16, "struct  {char a; uint32_t b
__attribute__((aligned));}");
}
 
The __attribute__((aligned(__BIGGEST_ALIGNMENT__))) returns 8 bytes on
s390x, whereas its 16 bytes on x86 architecture.
Hence the test functions output observed on s390x is :
test_size expects the size returned to be 16.
test_align expects the alignment returned to be  8.

Added a patch with TC changes specific to s390x. Kindly let me know if I
shall raise a PR with this changes.
Also Could you please ensure if additional source code changes are
needed?


-- 
Edit bug report at https://bugs.php.net/bug.php?id=79356&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79356&r=fixed
Fixed in release:                 
https://bugs.php.net/fix.php?id=79356&r=alreadyfixed
Need backtrace:                   
https://bugs.php.net/fix.php?id=79356&r=needtrace
Need Reproduce Script:            
https://bugs.php.net/fix.php?id=79356&r=needscript
Try newer version:                
https://bugs.php.net/fix.php?id=79356&r=oldversion
Not developer issue:              
https://bugs.php.net/fix.php?id=79356&r=support
Expected behavior:                
https://bugs.php.net/fix.php?id=79356&r=notwrong
Not enough info:                  
https://bugs.php.net/fix.php?id=79356&r=notenoughinfo
Submitted twice:                  
https://bugs.php.net/fix.php?id=79356&r=submittedtwice
register_globals:                 
https://bugs.php.net/fix.php?id=79356&r=globals
PHP version support discontinued: 
https://bugs.php.net/fix.php?id=79356&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79356&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79356&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79356&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79356&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79356&r=nozend
MySQL Configuration Error:        
https://bugs.php.net/fix.php?id=79356&r=mysqlcfg

Reply via email to