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
==8741== Conditional jump or move depends on uninitialised value(s)
==8741== at 0x9D11E1: odbc_bindcols (php_odbc.c:982)
==8741== by 0x9D48D7: zif_odbc_exec (php_odbc.c:1683)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
==8741== Use of uninitialised value of size 8
==8741== at 0x9D11F2: odbc_bindcols (php_odbc.c:982)
==8741== by 0x9D48D7: zif_odbc_exec (php_odbc.c:1683)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
==8741== Conditional jump or move depends on uninitialised value(s)
==8741== at 0x9D134B: odbc_bindcols (php_odbc.c:1022)
==8741== by 0x9D48D7: zif_odbc_exec (php_odbc.c:1683)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
==8741== Conditional jump or move depends on uninitialised value(s)
==8741== at 0x9D13E5: odbc_bindcols (php_odbc.c:1029)
==8741== by 0x9D48D7: zif_odbc_exec (php_odbc.c:1683)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
==8741== Conditional jump or move depends on uninitialised value(s)
==8741== at 0x9D6908: zif_odbc_result (php_odbc.c:2144)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
==8741== Conditional jump or move depends on uninitialised value(s)
==8741== at 0x9D691F: zif_odbc_result (php_odbc.c:2144)
==8741== by 0xF44E9F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8741== by 0xF50662: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==8741== by 0xF429CD: execute_ex (zend_vm_execute.h:363)
==8741== by 0xF435A6: zend_execute (zend_vm_execute.h:388)
==8741== by 0xED8585: zend_execute_scripts (zend.c:1341)
==8741== by 0xDF831C: php_execute_script (main.c:2613)
==8741== by 0x1089EB6: do_cli (php_cli.c:998)
==8741== by 0x108B79B: main (php_cli.c:1382)
==8741==
Generated at Mon, 16 Apr 2018 16:12:41 +0000 (8 days ago)
|