Bug #61472 [Com]: cannot use date function in mips64

From: Date: Fri, 18 Oct 2013 20:15:46 +0000
Subject: Bug #61472 [Com]: cannot use date function in mips64
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182339@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61472&edit=1 ID: 61472 Comment by: cassiano at idbinfo dot com dot br Reported by: jonathanbj at qq dot com Summary: cannot use date function in mips64 Status: Open Type: Bug Package: Date/time related Operating System: linux 2.6 PHP Version: 5.4.0 Block user comment: N Private report: N New Comment: I'm having exactly the same issue. PHP compiled for mips64 architecture, 32bit N32 binary format. I've crossbuilt PHP from 5.3.20 to 5.3.27 and 5.4.20, both all crashes at the same point 1: how to test: php -r 'print_r(date('l'));' crashes with the following output (gdb) run -r 'print_r(date('l'));' Starting program: /root/php -r 'print_r(date('l'));' *** Error in `/root/php': free(): invalid next size (fast): 0x10566ef0 *** Program received signal SIGABRT, Aborted. 0x778b76b8 in raise () from /lib32/libc.so.6 (gdb) (gdb) bt #0 0x778b76b8 in raise () from /lib32/libc.so.6 #1 0x778bc0a0 in abort () from /lib32/libc.so.6 #2 0x778f740c in __libc_message () from /lib32/libc.so.6 #3 0x77904f94 in malloc_printerr () from /lib32/libc.so.6 #4 0x77905f88 in _int_free () from /lib32/libc.so.6 #5 0x10063a10 in read_types (tz=0x10566d98, tzf=0x7fff53ec) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/lib/parse_tz.c:179 #6 timelib_parse_tzfile (timezone=<optimized out>, tzdb=<optimized out>) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/lib/parse_tz.c:326 #7 0x1003b87c in php_date_parse_tzfile (formal_tzname=0x1041ae00 "America/Sao_Paulo", tzdb=0x103ee828 <timezonedb_builtin>) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/php_date.c:831 #8 0x1003c47c in get_timezone_info () at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/php_date.c:949 #9 0x1003e8c4 in php_format_date (format=0x104f60a8 "l", format_len=1, ts=3064, localtime=localtime@entry=1) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/php_date.c:1198 #10 0x1003ea00 in php_date (ht=1, return_value=0x104f40e8, localtime=1, return_value_used=<optimized out>, this_ptr=<optimized out>, return_value_ptr=<optimized out>) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/ext/date/php_date.c:1183 #11 0x102f0f34 in zend_do_fcall_common_helper_SPEC (execute_data=0x10526ba8) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/Zend/zend_vm_execute.h:320 #12 0x102a877c in execute (op_array=0x104f4680) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/Zend/zend_vm_execute.h:107 #13 0x10273740 in zend_eval_stringl (str=<optimized out>, str_len=<optimized out>, retval_ptr=0x0, string_name=<optimized out>) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/Zend/zend_execute_API.c:1198 #14 0x1027394c in zend_eval_stringl_ex (str=<optimized out>, str_len=<optimized out>, retval_ptr=<optimized out>, string_name=<optimized out>, handle_exceptions=1) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/Zend/zend_execute_API.c:1240 #15 0x10035ebc in main (argc=3, argv=0x104154f0) at /home/cassiano/SecureGateway/mips64/output/build/php-5.3.21/sapi/cli/php_cli.c:1281 Previous Comments: ------------------------------------------------------------------------ [2012-03-22 12:34:14] jonathanbj at qq dot com (gdb) bt #0 0x0000005555e4ba38 in memcpy () at ../ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h:195 #1 0x000000012007ef18 in timelib_parse_tzfile (timezone=<value optimized out>, tzdb=<value optimized out>) at /home/ck/trunk/dongda/apps/php-5.4.0/ext/date/lib/parse_tz.c:124 #2 0x00000001200540f0 in php_date_parse_tzfile (formal_tzname=0x55565496b0 "", tzdb=0x120795ffe) at /home/ck/trunk/dongda/apps/php-5.4.0/ext/date/php_date.c:831 #3 0x0000000120056c9c in get_timezone_info () at /home/ck/trunk/dongda/apps/php-5.4.0/ext/date/php_date.c:877 #4 0x0000000120059964 in php_format_date (format=0x555614b0c0 "l", format_len=1, ts=4839792638, localtime=1) at /home/ck/trunk/dongda/apps/php-5.4.0/ext/date/php_date.c:1126 #5 0x000000012005a40c in php_date (ht=1, return_value=0x55555ab368, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, return_value_used=<value optimized out>, localtime=1) at /home/ck/trunk/dongda/apps/php-5.4.0/ext/date/php_date.c:1111 #6 0x00000001203a0bc0 in zend_do_fcall_common_helper_SPEC (execute_data=0x5555579060) at /home/ck/trunk/dongda/apps/php-5.4.0/Zend/zend_vm_execute.h:642 #7 0x00000001203a8d0c in execute (op_array=<value optimized out>) at /home/ck/trunk/dongda/apps/php-5.4.0/Zend/zend_vm_execute.h:410 #8 0x0000000120369180 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/ck/trunk/dongda/apps/php-5.4.0/Zend/zend.c:1272 #9 0x00000001202f92f4 in php_execute_script (primary_file=0xffffaec568) at /home/ck/trunk/dongda/apps/php-5.4.0/main/main.c:2473 #10 0x000000012043d328 in do_cli (argc=0, argv=0xffffaecbe8) at /home/ck/trunk/dongda/apps/php-5.4.0/sapi/cli/php_cli.c:983 #11 0x000000012043daa0 in main (argc=0, argv=0xffffaecbe8) at /home/ck/trunk/dongda/apps/php-5.4.0/sapi/cli/php_cli.c:1356 (gdb) ------------------------------------------------------------------------ [2012-03-22 12:31:48] jonathanbj at qq dot com Description: ------------ 1) get the source of php 5.4.0 or 5.3.6: ./configure --host=mips64-unkown-linux make 2) do the test ./php 3.php Result with date()Segmentation fault (core dumped) Test script: --------------- <?php echo("Result with date()"); echo(date("l")); ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61472&edit=1

« previous php.bugs (#182339) next »