Bug #68285 [NEW]: leak in timelib_parse_zone
| From: | mike@php.net | Date: | Wed, 22 Oct 2014 14:17:28 +0000 |
| Subject: | Bug #68285 [NEW]: leak in timelib_parse_zone | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188261@lists.php.net to get a copy of this message | ||
From: mike
Operating system:
PHP version: 5.6Git-2014-10-22 (Git)
Package: Date/time related
Bug Type: Bug
Bug description:leak in timelib_parse_zone
Description:
------------
Seems like a leak has been introduced in 2b9af967
Test script:
---------------
$ memcheck sapi/cli/php -d date.timezone=UTC -r '
date_create("@123")
->setTimezone(new DateTimezone("UTC"))
->format("D, d M Y H:i:s \\G\\M\\T");
'
Actual result:
--------------
==27268== 4 bytes in 1 blocks are definitely lost in loss record 1 of 4
==27268== at 0x4C29F90: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27268== by 0x7A219C9: strdup (in /usr/lib/libc-2.20.so)
==27268== by 0x463FC1: timelib_time_tz_abbr_update (timelib.c:76)
==27268== by 0x439E90: timelib_parse_zone (parse_date.re:776)
==27268== by 0x4316A6: timezone_initialize (php_date.c:3686)
==27268== by 0x431867: zim_DateTimeZone___construct
(php_date.c:3730)
==27268== by 0x8AAD4E: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:558)
==27268== by 0x8AB525: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:693)
==27268== by 0x8AA3BD: execute_ex (zend_vm_execute.h:363)
==27268== by 0x8AA446: zend_execute (zend_vm_execute.h:388)
==27268== by 0x852492: zend_eval_stringl (zend_execute_API.c:1080)
==27268== by 0x852731: zend_eval_stringl_ex
(zend_execute_API.c:1127)
==27268== by 0x8527B5: zend_eval_string_ex (zend_execute_API.c:1138)
==27268== by 0x9182BE: do_cli (php_cli.c:1034)
==27268== by 0x9192CB: main (php_cli.c:1378)
--
Edit bug report at https://bugs.php.net/bug.php?id=68285&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68285&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68285&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68285&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68285&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68285&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68285&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68285&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68285&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68285&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68285&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68285&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68285&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68285&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68285&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68285&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68285&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68285&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68285&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68285&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68285&r=mysqlcfg