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/strtotime3-64bit.phpt ('strtotime() function (64 bit)')

Script

1: <?php
2: date_default_timezone_set
('Europe/Lisbon');
3:
$time 1150494719// 16/June/2006
4:
5:
$strs = array(
6:     
'',
7:     
" \t\r\n000",
8:     
'yesterday',
9:     
'22:49:12',
10:     
'22:49:12 bogusTZ',
11:     
'22.49.12.42GMT',
12:     
'22.49.12.42bogusTZ',
13:     
't0222',
14:     
't0222 t0222',
15:     
'022233',
16:     
'022233 bogusTZ',
17:     
'2-3-2004',
18:     
'2.3.2004',
19:     
'20060212T23:12:23UTC',
20:     
'20060212T23:12:23 bogusTZ',
21:     
'2006167'//pgydotd
22:     
'Jan-15-2006'//pgtextshort
23:     
'2006-Jan-15'//pgtextreverse
24:     
'10/Oct/2000:13:55:36 +0100'//clf
25:     
'10/Oct/2000:13:55:36 +00100'//clf
26:     
'2006',
27:     
'1986'// year
28:     
'JAN',
29:     
'January',
30: );
31:
32: foreach (
$strs as $str) {
33:     
$t strtotime($str$time);
34:     if (
is_integer($t)) {
35:         
var_dump(date(DATE_RFC2822$t));
36:     } else {
37:         
var_dump($t);
38:     }
39: }
40:
41:
?>
42:

Report

==7257== Conditional jump or move depends on uninitialised value(s)
==7257==    at 0x4DEC1D: do_adjust_timezone (tm2unixtime.c:467)
==7257==    by 0x4DEF86: timelib_update_ts (tm2unixtime.c:511)
==7257==    by 0x459E23: zif_strtotime (php_date.c:1509)
==7257==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==7257==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==7257==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==7257==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==7257==    by 0xE15279: php_execute_script (main.c:2650)
==7257==    by 0x119DB6F: do_cli (php_cli.c:985)
==7257==    by 0x119F611: main (php_cli.c:1375)
==7257== 

 

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

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