Edit report at https://bugs.php.net/bug.php?id=66242&edit=1
ID: 66242
User updated by: thuhc at yahoo dot com
Reported by: thuhc at yahoo dot com
Summary: CLI server failure on 64-bit ARM (Aarch64)
-Status: Closed
+Status: Assigned
Type: Bug
Package: Testing related
Operating System: Linux AARCH64
PHP Version: 5.5.6
Assigned To: ardbiesheuvel
Block user comment: N
Private report: N
New Comment:
Hi ardbiesheuvel,
About mimetype issue on test.mp3, I found an issue in
ext/fileinfo/libmagic/apprentice.c
protected uint64_t file_signextend(struct magic_set *ms, struct magic *m,
uint64_t v)
...
case FILE_BYTE:
v = (char) v;
break;
...
char is unsigned char by default on ARM (on Intel char is signed char by
default) --> invalid mimetype with test.mp3
If I changed code: v = (signed char) v --> it's ok.
Previous Comments:
------------------------------------------------------------------------
[2013-12-12 08:47:24] [email protected]
The mimetype issue you are seeing is not caused by PHP but by the underlying
OpenEmbedded installation that you are using.
I have built and tested PHP/CLI on Ubuntu Saucy under a QEMU/arm64 chroot, and
I get the following failures (out of 7051 executed):
function with many parameters [tests/func/010.phpt]
-> Times out, due to execution overhead of the QEMU emulator
Check cli_process_title support on Unix
[sapi/cli/tests/cli_process_title_unix.phpt]
-> Not supported under QEMU
file upload greater than 2G [sapi/cli/tests/upload_2G.phpt]
-> Fails on out of memory condition (on my 8GB machine)
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, ba)
[ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-ba.phpt]
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bs)
[ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt]
-> Not quite clear to me, but reproducible also on my x86 Ubuntu Saucy
installation
So as far as I can tell, there are no arm64 specific issues remaining in this
report that are caused by bugs in PHP.
Thanks for the report.
------------------------------------------------------------------------
[2013-12-12 02:37:33] thuhc at yahoo dot com
================================================================================
/home/root/php-src/ext/fileinfo/tests/finfo_file_002.phpt
================================================================================
array(8) {
["/home/root/php-src/ext/fileinfo/tests/resources/dir.zip"]=>
string(15) "application/zip"
["/home/root/php-src/ext/fileinfo/tests/resources/test.awk"]=>
string(10) "text/plain"
["/home/root/php-src/ext/fileinfo/tests/resources/test.bmp"]=>
string(14) "image/x-ms-bmp"
["/home/root/php-src/ext/fileinfo/tests/resources/test.gif"]=>
string(9) "image/gif"
["/home/root/php-src/ext/fileinfo/tests/resources/test.jpg"]=>
string(10) "image/jpeg"
["/home/root/php-src/ext/fileinfo/tests/resources/test.mp3"]=>
string(24) "application/octet-stream"
["/home/root/php-src/ext/fileinfo/tests/resources/test.pdf"]=>
string(15) "application/pdf"
["/home/root/php-src/ext/fileinfo/tests/resources/test.png"]=>
string(9) "image/png"
}
================================================================================
013+ string(24) "application/octet-stream"
013- string(10) "audio/mpeg"
================================================================================
================================================================================
/home/root/php-src/ext/standard/tests/array/bug65304.phpt
================================================================================
int(-9223372036854775808)
float(9.2233720368548E+18)
================================================================================
001+ int(-9223372036854775808)
002- float(%s)
================================================================================
------------------------------------------------------------------------
[2013-12-10 11:15:24] [email protected]
OK, that looks a whole lot better. I have pushed another fix to address the
#65304 regression (Zend: fix overflow handling bug in non-x86
fast_add_function), so the only remaining failure shared between the two runs
whose results you have posted is ext/fileinfo/tests/finfo_file_002.phpt.
Any background on those? Care to share the .log?
------------------------------------------------------------------------
[2013-12-10 10:05:14] thuhc at yahoo dot com
I tested with current source:
git clone http://git.php.net/repository/php-src.git
Bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date)
[ext/date/tests/bug53879.phpt]
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, ba) [ext/date/t
ests/rfc-datetime_and_daylight_saving_time-type3-ba.phpt]
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bs) [ext/date/t
ests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt]
finfo_file(): Testing mime types [ext/fileinfo/tests/finfo_file_002.phpt]
Bug #65304 (Use of max int in array_sum) [ext/standard/tests/array/bug65304.phpt
]
Test strncmp() function : usage variations - binary safe(binary values) [ext/sta
ndard/tests/strings/strncmp_variation6.phpt]
------------------------------------------------------------------------
[2013-12-09 16:09:22] [email protected]
The majority of failures is caused by an issue that causes the CLI server to
crash immediately after startup. I have pushed a fix to PHP-5.6 and master to
address this issue (cli: don't cast away const in select() timeout argument),
but I am not entirely convinced that this fixes it conclusively.
Please try the PHP-5.6 git branch (or master) and share your results here.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66242
--
Edit this bug report at https://bugs.php.net/bug.php?id=66242&edit=1
--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php