|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-11-17 11:14 UTC] derick@php.net
-Status: Open
+Status: Feedback
[2015-11-17 11:14 UTC] derick@php.net
[2015-11-19 20:42 UTC] royanee at gmail dot com
-Status: Feedback
+Status: Open
[2015-11-19 20:42 UTC] royanee at gmail dot com
[2016-10-05 14:35 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2016-10-05 14:35 UTC] cmb@php.net
[2016-10-05 22:53 UTC] royanee at gmail dot com
[2016-10-06 12:08 UTC] cmb@php.net
-Status: Feedback
+Status: Not a bug
[2016-10-06 12:08 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 01:00:01 2025 UTC |
Description: ------------ I have a script that loops through all of the DateTimeZone identifiers and creates a DateTimeZone instance of each one for use later in the script. I noticed that it was triggering a segmentation fault while trying to get another application working. Here's how I identified that the "leap-seconds.list" timezone was breaking it: <?php foreach (DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) as $tz) { echo $tz . PHP_EOL; $dtz = new DateTimeZone($tz); } echo 'Success' . PHP_EOL; Test script: --------------- <?php $tz = 'leap-seconds.list'; $dtz = new DateTimeZone($tz); echo 'Success' . PHP_EOL; Expected result: ---------------- Success Actual result: -------------- Segmentation fault (gdb) bt #0 __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:116 #1 0x000000000048ca86 in memcpy (__len=8148847036, __src=0x7ffff7ff002c, __dest=0x7ffe08580010) at /usr/include/x86_64-linux-gnu/bits/string3.h:51 #2 read_transistions (tz=0x11c4020, tzf=0x7fffffffa618) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/lib/parse_tz.c:134 #3 timelib_parse_tzfile (timezone=timezone@entry=0x11c4000 "leap-seconds.list", tzdb=tzdb@entry=0x11bd530) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/lib/parse_tz.c:881 #4 0x00000000004677ab in php_date_parse_tzfile (formal_tzname=0x11c4000 "leap-seconds.list", tzdb=0x11bd530) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/php_date.c:926 #5 0x00000000004708ad in timelib_parse_zone (ptr=ptr@entry=0x7fffffffa728, dst=dst@entry=0x7fffffffa730, t=t@entry=0x7ffff7fc7858, tz_not_found=tz_not_found@entry=0x7fffffffa734, tzdb=<optimized out>, tz_wrapper=tz_wrapper@entry=0x467830 <php_date_parse_tzfile_wrapper>) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/lib/parse_date.c:782 #6 0x000000000046727a in timezone_initialize (tzobj=0x7ffff7fc7638, tz=0x7ffff7ec5079 "", tz_len=17) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/php_date.c:3713 #7 0x00000000004673aa in zim_DateTimeZone___construct (ht=1, return_value=<optimized out>, return_value_ptr=<optimized out>, this_ptr=0x7ffff7fc5900, return_value_used=<optimized out>) at /build/php5-z1CRVw/php5-5.6.14+dfsg/ext/date/php_date.c:3758 #8 0x00000000006dae1a in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>, return_value_used=<optimized out>) at /build/php5-z1CRVw/php5-5.6.14+dfsg/Zend/zend_dtrace.c:97 #9 0x000000000079a4f7 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>) at /build/php5-z1CRVw/php5-5.6.14+dfsg/Zend/zend_vm_execute.h:560 #10 0x0000000000729520 in execute_ex (execute_data=execute_data@entry=0x7ffff7f92190) at /build/php5-z1CRVw/php5-5.6.14+dfsg/Zend/zend_vm_execute.h:363 #11 0x00000000006dacc1 in dtrace_execute_ex (execute_data=0x7ffff7f92190) at /build/php5-z1CRVw/php5-5.6.14+dfsg/Zend/zend_dtrace.c:73 #12 0x00000000006ed7d0 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /build/php5-z1CRVw/php5-5.6.14+dfsg/Zend/zend.c:1341 #13 0x0000000000688840 in php_execute_script (primary_file=primary_file@entry=0x7fffffffce40) at /build/php5-z1CRVw/php5-5.6.14+dfsg/main/main.c:2597 #14 0x000000000079c441 in do_cli (argc=2, argv=0xeb0e70) at /build/php5-z1CRVw/php5-5.6.14+dfsg/sapi/cli/php_cli.c:994 #15 0x000000000046237e in main (argc=2, argv=0xeb0e70) at /build/php5-z1CRVw/php5-5.6.14+dfsg/sapi/cli/php_cli.c:1378