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

Valgrind Report for ext/odbc/tests/bug68087.phpt ('odbc_exec(): Getting accurate date data from query')

Script

1: <?php
2:
3:
include 'config.inc';
4:
5:
$id_1_date '2014-09-23';
6:
$id_2_date '2014-09-24';
7:
8:
$conn odbc_connect($dsn$user$pass);
9:
10: @
odbc_exec($conn'CREATE DATABASE odbcTEST');
11:
12:
odbc_exec($conn'CREATE TABLE FOO (ID INT, VARCHAR_COL VARCHAR(100), DATE_COL DATE)');
13:
14:
odbc_exec($conn"INSERT INTO FOO(ID, VARCHAR_COL, DATE_COL) VALUES (1, 'hello', '$id_1_date')");
15:
odbc_exec($conn"INSERT INTO FOO(ID, VARCHAR_COL, DATE_COL) VALUES (2, 'helloagain', '$id_2_date')");
16:
17:
$res odbc_exec($conn'SELECT * FROM FOO ORDER BY ID ASC');
18:
19: while(
odbc_fetch_row($res)) {
20:     
$id odbc_result($res"ID");
21:     
$varchar_col odbc_result($res"VARCHAR_COL");
22:     
$date odbc_result($res"DATE_COL");
23:
24:     if (
$id == 1) {
25:         if (
$date != $id_1_date) {
26:             print 
"Date_1 mismatched\n";
27:         } else {
28:             print 
"Date_1 matched\n";
29:         }
30:     } else {
31:         if (
$date != $id_2_date) {
32:             print 
"Date_2 mismatched\n";
33:         } else {
34:             print 
"Date_2 matched\n";
35:         }
36:     }
37: }
38:
39:
?>
40:

Report

==18526== Conditional jump or move depends on uninitialised value(s)
==18526==    at 0x9DBCE9: odbc_bindcols (php_odbc.c:982)
==18526==    by 0x9DF607: zif_odbc_exec (php_odbc.c:1683)
==18526==    by 0xF600AE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==18526==    by 0xF6BC44: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==18526==    by 0xF5DB34: execute_ex (zend_vm_execute.h:363)
==18526==    by 0xF5E6D7: zend_execute (zend_vm_execute.h:388)
==18526==    by 0xEF2222: zend_execute_scripts (zend.c:1341)
==18526==    by 0xE0E79D: php_execute_script (main.c:2613)
==18526==    by 0x10ACC56: do_cli (php_cli.c:998)
==18526==    by 0x10AE44F: main (php_cli.c:1382)
==18526== 
==18526== Conditional jump or move depends on uninitialised value(s)
==18526==    at 0x9DBE6C: odbc_bindcols (php_odbc.c:1022)
==18526==    by 0x9DF607: zif_odbc_exec (php_odbc.c:1683)
==18526==    by 0xF600AE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==18526==    by 0xF6BC44: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==18526==    by 0xF5DB34: execute_ex (zend_vm_execute.h:363)
==18526==    by 0xF5E6D7: zend_execute (zend_vm_execute.h:388)
==18526==    by 0xEF2222: zend_execute_scripts (zend.c:1341)
==18526==    by 0xE0E79D: php_execute_script (main.c:2613)
==18526==    by 0x10ACC56: do_cli (php_cli.c:998)
==18526==    by 0x10AE44F: main (php_cli.c:1382)
==18526== 
==18526== Conditional jump or move depends on uninitialised value(s)
==18526==    at 0x9DBF09: odbc_bindcols (php_odbc.c:1029)
==18526==    by 0x9DF607: zif_odbc_exec (php_odbc.c:1683)
==18526==    by 0xF600AE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==18526==    by 0xF6BC44: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==18526==    by 0xF5DB34: execute_ex (zend_vm_execute.h:363)
==18526==    by 0xF5E6D7: zend_execute (zend_vm_execute.h:388)
==18526==    by 0xEF2222: zend_execute_scripts (zend.c:1341)
==18526==    by 0xE0E79D: php_execute_script (main.c:2613)
==18526==    by 0x10ACC56: do_cli (php_cli.c:998)
==18526==    by 0x10AE44F: main (php_cli.c:1382)
==18526== 
==18526== Conditional jump or move depends on uninitialised value(s)
==18526==    at 0x9E1711: zif_odbc_result (php_odbc.c:2144)
==18526==    by 0xF600AE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==18526==    by 0xF6BC44: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==18526==    by 0xF5DB34: execute_ex (zend_vm_execute.h:363)
==18526==    by 0xF5E6D7: zend_execute (zend_vm_execute.h:388)
==18526==    by 0xEF2222: zend_execute_scripts (zend.c:1341)
==18526==    by 0xE0E79D: php_execute_script (main.c:2613)
==18526==    by 0x10ACC56: do_cli (php_cli.c:998)
==18526==    by 0x10AE44F: main (php_cli.c:1382)
==18526== 
==18526== Conditional jump or move depends on uninitialised value(s)
==18526==    at 0x9E1728: zif_odbc_result (php_odbc.c:2144)
==18526==    by 0xF600AE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==18526==    by 0xF6BC44: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==18526==    by 0xF5DB34: execute_ex (zend_vm_execute.h:363)
==18526==    by 0xF5E6D7: zend_execute (zend_vm_execute.h:388)
==18526==    by 0xEF2222: zend_execute_scripts (zend.c:1341)
==18526==    by 0xE0E79D: php_execute_script (main.c:2613)
==18526==    by 0x10ACC56: do_cli (php_cli.c:998)
==18526==    by 0x10AE44F: main (php_cli.c:1382)
==18526== 

 

Generated at Fri, 10 Nov 2017 14:18:45 +0000 (7 days ago)

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