|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68285 leak in timelib_parse_zone
Submitted: 2014-10-22 14:17 UTC Modified: 2014-12-30 15:14 UTC
From: Assigned: fmargaine (profile)
Status: Closed Package: Date/time related
PHP Version: 5.6Git-2014-10-22 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
25 - 1 = ?
Subscribe to this entry?

 [2014-10-22 14:17 UTC]
Seems like a leak has been introduced in 2b9af967

Test script:
$ memcheck sapi/cli/php -d date.timezone=UTC -r '
->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/
==27268==    by 0x7A219C9: strdup (in /usr/lib/
==27268==    by 0x463FC1: timelib_time_tz_abbr_update (timelib.c:76)
==27268==    by 0x439E90: timelib_parse_zone (
==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)


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-24 11:19 UTC]
-Assigned To: +Assigned To: fmargaine
 [2014-12-30 15:14 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC