PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/date/tests/bug54597.phpt ('Bug #54597 (incorrect years for DateTime objects created with 4-digit years)')

Script

1: <?php
2: $tz 
= new DateTimeZone("Europe/Amsterdam");
3:
$dateObject = new DateTime'January 0099'$tz );
4: echo 
$dateObject->format'Y' ), "\n";
5:
$dateObject = new DateTime'January 1, 0099'$tz );
6: echo 
$dateObject->format'Y' ), "\n";
7:
$dateObject = new DateTime'0099-01'$tz );
8: echo 
$dateObject->format'Y' ), "\n";
9:
?>
10:

Report

==6445== Conditional jump or move depends on uninitialised value(s)
==6445==    at 0x4DEC1D: do_adjust_timezone (tm2unixtime.c:467)
==6445==    by 0x4DEF86: timelib_update_ts (tm2unixtime.c:511)
==6445==    by 0x46322C: php_date_initialize (php_date.c:2696)
==6445==    by 0x466447: zim_DateTime___construct (php_date.c:2817)
==6445==    by 0x1170F9E: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:1241)
==6445==    by 0x1170F9E: execute_ex (zend_vm_execute.h:60393)
==6445==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==6445==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==6445==    by 0xE15279: php_execute_script (main.c:2650)
==6445==    by 0x119DB6F: do_cli (php_cli.c:985)
==6445==    by 0x119F611: main (php_cli.c:1375)
==6445== 

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

Copyright © 2005-2020 The PHP Group
All rights reserved.