|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71160 PHP 5.3.2 cross compile for arm using clang coredumps
Submitted: 2015-12-18 13:41 UTC Modified: 2016-01-03 04:26 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ratheesh dot tv at gmail dot com Assigned:
Status: Open Package: Reproducible crash
PHP Version: 5.5.15 OS: Free BSD 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ratheesh dot tv at gmail dot com
New email:
PHP Version: OS:


 [2015-12-18 13:41 UTC] ratheesh dot tv at gmail dot com
We are doing cross compilation of PHP 5.3.2 in Free BSD 10 using clang for ARM architecture. Compilation goes fine and binary is causing core dump when doing :

1) Decimal operation with values > 1000000000
2) md5(uniqid(rand(), true))  call also causing core.
3) xpath reading.
   Used -g option to enable debug symbols. But still the core dump is not having any stack

    root@myhost:/var/tmp # gdb php.core.1

GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as ""..."/var/tmp/php.core.1": not in executable format: File format not recognized

(gdb) bt
No stack.

Expected result:
No core dump

Actual result:
core dump generated with no stack.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-18 13:53 UTC]
-PHP Version: 5.5.30 +PHP Version: 5.3.2
 [2015-12-18 13:53 UTC]
Are you able to reproduce this with a supported version of PHP?

You can see the currently supported vesions here:
 [2015-12-19 10:37 UTC] ratheesh dot tv at gmail dot com
I am able to reproduce this in PHP 5.5.15
Sorry I cud not try with 5.5.30
 [2015-12-19 11:29 UTC]
-PHP Version: 5.3.2 +PHP Version: 5.5.15
 [2015-12-21 08:22 UTC] ratheesh dot tv at gmail dot com
(gdb) bt
#0  0x001e5a2c in zend_dtoa (_d=<optimized out>, mode=2, ndigits=14, decpt=<optimized out>, sign=<optimized out>, rve=0x0) at ../../../../../../../../src/dist/php/Zend/zend_strtod.c:1532
#1  0x00128260 in php_gcvt (value=<optimized out>, ndigit=14, dec_point=46 '.', exponent=-128 '\200', buf=0x0) at ../../../../../../../../src/dist/php/main/snprintf.c:142
#2  0x0012b3f4 in xbuf_format_converter (fmt=<optimized out>, xbuf=<optimized out>, ap=...) at ../../../../../../../../src/dist/php/main/spprintf.c:669
#3  vspprintf (pbuf=0xbfbfc0f8, max_len=0, format=<optimized out>, ap=...) at ../../../../../../../../src/dist/php/main/spprintf.c:797
#4  0x00157900 in zend_spprintf (message=0xbfbfbd7c, max_len=-1077953152, format=0xe8140000 <error: Cannot access memory at address 0xe8140000>) at ../../../../../../../../src/dist/php/Zend/zend_exceptions.c:529
#5  0x001e46dc in zend_locale_sprintf_double (op=0xbfbfc0f8) at ../../../../../../../../src/dist/php/Zend/zend_operators.c:2047
#6  0x001387f4 in zend_make_printable_zval (expr=<optimized out>, expr_copy=0xbfbfc0f8, use_copy=0xbfbfc0f0) at ../../../../../../../../src/dist/php/Zend/zend.c:276
#7  0x001e2484 in concat_function (result=0x9710f4, op1=0x81d308, op2=0x81d2b0) at ../../../../../../../../src/dist/php/Zend/zend_operators.c:1212
#8  0x001635e0 in ZEND_CONCAT_SPEC_CV_CV_HANDLER (execute_data=0x971020) at ../../../../../../../../src/dist/php/Zend/zend_vm_execute.h:28396
#9  0x00158cd4 in execute (op_array=<optimized out>) at ../../../../../../../../src/dist/php/Zend/zend_vm_execute.h:104
#10 0x0013a058 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at ../../../../../../../../src/dist/php/Zend/zend.c:1196
#11 0x0011cd3c in php_execute_script (primary_file=0xbfbffb18) at ../../../../../../../../src/dist/php/main/main.c:2260
#12 0x001ecda8 in main (argc=2, argv=0xbfbffc78) at ../../../../../../../../src/dist/php/sapi/cgi/cgi_main.c:2102
 [2015-12-21 18:45 UTC]
-Status: Open +Status: Feedback
 [2015-12-21 18:45 UTC]
@ratheesh, is your ARM target big endian?

 [2015-12-22 17:37 UTC] ratheesh dot tv at gmail dot com

No mine is little endian.

There was a bug raised earlier : #33227 : zend_strtod() broken on big-endian arm

What is the resolution for this.?
 [2016-01-03 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-01-03 04:26 UTC]
-Status: No Feedback +Status: Open
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 28 17:01:26 2020 UTC