[php-maint] Bug#637336: php5: Segfault due to PHP bug in DateTime functions

Erik Meitner erik at wanderings.us
Wed Aug 10 13:43:02 UTC 2011

Package: php5
Version: 5.2.6.dfsg.1-1+lenny9
Severity: normal

Our Drupal site's cron.php script has been causing segfaults every few days for months now.

>From /var/log/apache2/error.log:
[Sun Aug 07 13:05:13 2011] [notice] child pid 2358 exit signal Segmentation fault (11)

Got a core dump and did a backtrace:
(gdb) bt full
#0  0xb76394f3 in strlen () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#1  0xb685e58d in zif_timezone_name_get () from
No symbol table info available.
#2  0xb6ab4113 in ?? () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#3  0x00000000 in ?? ()
No symbol table info available.

This seems to be the bug causing this:

I can reproduce it like this:
$ php -r '$dt = new DateTime(); $dt->setTimezone($dt->getTimezone()); '
Segmentation fault (core dumped)

I tracked down the commits by the PHP developer:
And I think this:

Unfortunately they do not apply cleanly.

-- System Information:
Debian Release: 5.0.7
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5 depends on:
ii  libapache2-mod-php 5.2.6.dfsg.1-1+lenny9 server-side, HTML-embedded scripti
ii  php5-common        5.2.6.dfsg.1-1+lenny9 Common files for packages built fr

php5 recommends no packages.

php5 suggests no packages.

-- no debconf information

More information about the pkg-php-maint mailing list