Bug #71160 [Com]: PHP 5.3.2 cross compile for arm using clang coredumps

[email protected] ("ratheesh dot tv at gmail dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=71160&edit=1

 ID:                 71160
 Comment by:         ratheesh dot tv at gmail dot com
 Reported by:        ratheesh dot tv at gmail dot com
 Summary:            PHP 5.3.2 cross compile for arm using clang
                     coredumps
 Status:             Feedback
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Free BSD 10
 PHP Version:        5.5.15
 Block user comment: N
 Private report:     N

 New Comment:

@ab

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.?


Previous Comments:
------------------------------------------------------------------------
[2015-12-21 18:45:18] [email protected]

@ratheesh, is your ARM target big endian?

Thanks.

------------------------------------------------------------------------
[2015-12-21 08:22:22] 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-19 10:37:39] 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-18 13:53:42] [email protected]

Are you able to reproduce this with a supported version of PHP?

You can see the currently supported vesions here: http://php.net/supported-versions.php

------------------------------------------------------------------------
[2015-12-18 13:41:04] ratheesh dot tv at gmail dot com

Description:
------------
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 "arm-specifix.com-freebsd"..."/var/tmp/php.core.1": not in executable format: File format not recognized

(gdb) bt
No stack.
(gdb)

Expected result:
----------------
No core dump

Actual result:
--------------
core dump generated with no stack.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71160&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.