Bug #68285 [Asn->Csd]: leak in timelib_parse_zone

From: Date: Tue, 30 Dec 2014 15:14:05 +0000
Subject: Bug #68285 [Asn->Csd]: leak in timelib_parse_zone
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189522@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68285&edit=1 ID: 68285 Updated by: fmargaine@php.net Reported by: mike@php.net Summary: leak in timelib_parse_zone -Status: Assigned +Status: Closed Type: Bug Package: Date/time related PHP Version: 5.6Git-2014-10-22 (Git) Assigned To: fmargaine Block user comment: N Private report: N New Comment: fixed https://github.com/php/php-src/pull/914 Previous Comments: ------------------------------------------------------------------------ [2014-10-22 14:17:26] mike@php.net 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 this bug report at https://bugs.php.net/bug.php?id=68285&edit=1

« previous php.bugs (#189522) next »