[php-maint] Bug#805591: php5: Segmentation fault on new DateTimeZone('leap-seconds.list')

Jonathan Champ royanee at gmail.com
Thu Nov 19 21:16:12 UTC 2015


Package: php5-common
Version: 5.6.15+dfsg-1
Severity: normal

Dear Maintainer,

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.

The Debian package returns an extra timezone identifier "leap-seconds.list"
that causes a segfault when you try to instanciate the object.

Test script:

  <?php
  foreach (DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) as $tz)
{
      echo $tz . PHP_EOL;
      $dtz = new DateTimeZone($tz);
  }
  echo 'Success' . PHP_EOL;

Backtrace:

  (gdb) bt
  #0  __memcpy_sse2_unaligned () at
../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:116
  #1  0x000000000048cab6 in memcpy (__len=8148847036, __src=0x7ffff7ff002c,
__dest=0x7ffe08580010) at /usr/include/x86_64-linux-gnu/bits/string3.h:51
  #2  read_transistions (tz=0x11c40f0, tzf=0x7fffffffa618) at
/tmp/buildd/php5-5.6.15+dfsg/ext/date/lib/parse_tz.c:138
  #3  timelib_parse_tzfile (timezone=timezone at entry=0x11c40d0
"leap-seconds.list", tzdb=tzdb at entry=0x11bd600) at
/tmp/buildd/php5-5.6.15+dfsg/ext/date/lib/parse_tz.c:885
  #4  0x00000000004677ab in php_date_parse_tzfile (formal_tzname=0x11c40d0
"leap-seconds.list", tzdb=0x11bd600) at
/tmp/buildd/php5-5.6.15+dfsg/ext/date/php_date.c:926
  #5  0x00000000004708bd in timelib_parse_zone (ptr=ptr at entry=0x7fffffffa728,
dst=dst at entry=0x7fffffffa730, t=t at entry=0x7ffff7fc7858,
tz_not_found=tz_not_found at entry=0x7fffffffa734, tzdb=<optimized out>,
tz_wrapper=tz_wrapper at entry=0x467830 <php_date_parse_tzfile_wrapper>)
      at /tmp/buildd/php5-5.6.15+dfsg/ext/date/lib/parse_date.c:788
  #6  0x000000000046727a in timezone_initialize (tzobj=0x7ffff7fc7638,
tz=0x7ffff7ec5079 "", tz_len=17) at
/tmp/buildd/php5-5.6.15+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
/tmp/buildd/php5-5.6.15+dfsg/ext/date/php_date.c:3758
  #8  0x00000000006daf2a in dtrace_execute_internal
(execute_data_ptr=<optimized out>, fci=<optimized out>,
return_value_used=<optimized out>) at
/tmp/buildd/php5-5.6.15+dfsg/Zend/zend_dtrace.c:97
  #9  0x000000000079a657 in zend_do_fcall_common_helper_SPEC
(execute_data=<optimized out>) at
/tmp/buildd/php5-5.6.15+dfsg/Zend/zend_vm_execute.h:560
  #10 0x0000000000729680 in execute_ex
(execute_data=execute_data at entry=0x7ffff7f92190)
at /tmp/buildd/php5-5.6.15+dfsg/Zend/zend_vm_execute.h:363
  #11 0x00000000006dadd1 in dtrace_execute_ex (execute_data=0x7ffff7f92190)
at /tmp/buildd/php5-5.6.15+dfsg/Zend/zend_dtrace.c:73
  #12 0x00000000006ed8e0 in zend_execute_scripts (type=type at entry=8,
retval=retval at entry=0x0, file_count=file_count at entry=3) at
/tmp/buildd/php5-5.6.15+dfsg/Zend/zend.c:1341
  #13 0x00000000006889c0 in php_execute_script
(primary_file=primary_file at entry=0x7fffffffce40) at
/tmp/buildd/php5-5.6.15+dfsg/main/main.c:2597
  #14 0x000000000079c5a1 in do_cli (argc=2, argv=0xeb0e70) at
/tmp/buildd/php5-5.6.15+dfsg/sapi/cli/php_cli.c:994
  #15 0x000000000046237e in main (argc=2, argv=0xeb0e70) at
/tmp/buildd/php5-5.6.15+dfsg/sapi/cli/php_cli.c:1378


-- Package-specific info:
==== Additional PHP 5 information ====

++++ PHP 5 SAPI (php5query -S): ++++
cli
fpm

++++ PHP 5 Extensions (php5query -M -v): ++++
opcache (Enabled for cli by local administrator)
opcache (Enabled for fpm by local administrator)
mysql (Enabled for cli by maintainer script)
mysql (Enabled for fpm by maintainer script)
xmlrpc (Enabled for cli by maintainer script)
xmlrpc (Enabled for fpm by maintainer script)
mysqli (Enabled for cli by maintainer script)
mysqli (Enabled for fpm by maintainer script)
xsl (Enabled for cli by maintainer script)
xsl (Enabled for fpm by maintainer script)
json (Enabled for cli by maintainer script)
json (Enabled for fpm by maintainer script)
mysqlnd (Enabled for cli by maintainer script)
mysqlnd (Enabled for fpm by maintainer script)
No module matches xdebug
No module matches xdebug
pdo_mysql (Enabled for cli by maintainer script)
pdo_mysql (Enabled for fpm by maintainer script)
memcached (Enabled for cli by local administrator)
memcached (Enabled for fpm by local administrator)
curl (Enabled for cli by maintainer script)
curl (Enabled for fpm by maintainer script)
readline (Enabled for cli by maintainer script)
readline (Enabled for fpm by maintainer script)
pdo (Enabled for cli by maintainer script)
pdo (Enabled for fpm by maintainer script)

++++ Configuration files: ++++
**** /etc/php5/mods-available/pdo.ini ****
extension=pdo.so

**** /etc/php5/mods-available/opcache.ini ****
zend_extension=opcache.so


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500,
'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages php5 depends on:
ii  php5-common  5.6.15+dfsg-1
ii  php5-fpm     5.6.15+dfsg-1

php5 recommends no packages.

php5 suggests no packages.

Versions of packages php5-common depends on:
ii  libc6   2.19-22
ii  lsof    4.89+dfsg-0.1
ii  psmisc  22.21-2.1
ii  sed     4.2.2-6.1
ii  ucf     3.0030

Versions of packages php5-common suggests:
pn  php5-user-cache  <none>

-- no debconf information
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20151119/47f6fb6c/attachment.html>


More information about the pkg-php-maint mailing list