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

Valgrind Report for ext/odbc/tests/bug44618.phpt ('Bug #44618 (Fetching may rely on uninitialized data)')

Script

1: <?php
2:
include __DIR__ "/config.inc";
3:
$conn odbc_connect($dsn$user$passSQL_CUR_USE_ODBC);
4:
5:
odbc_exec($conn"CREATE TABLE bug44618(ID INT, real1 REAL, text1 TEXT)");
6:
odbc_exec($conn"INSERT INTO bug44618 VALUES (1, 10.0199995, 'testing 1,2,3')");
7:
8:
$result odbc_exec($conn"SELECT * FROM bug44618");
9:
var_dump(odbc_fetch_array($result));
10:
$result null;
11:
12:
$result odbc_exec($conn"SELECT * FROM bug44618");
13:
odbc_fetch_into($result$array);
14:
var_dump($array);
15:
$result null;
16:
17:
$result odbc_exec($conn"SELECT * FROM bug44618");
18:
odbc_fetch_row($result);
19:
var_dump(odbc_result($result"text1"));
20:
$result null;
21:
22:
$result odbc_exec($conn"SELECT * FROM bug44618");
23:
odbc_result_all($result);
24:
$result null;
25:
?>
26:

Report

==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB15E29: odbc_bindcols (php_odbc.c:966)
==8232==    by 0xB19497: zif_odbc_exec (php_odbc.c:1698)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Use of uninitialised value of size 8
==8232==    at 0xB15E3A: odbc_bindcols (php_odbc.c:966)
==8232==    by 0xB19497: zif_odbc_exec (php_odbc.c:1698)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB160DA: odbc_bindcols (php_odbc.c:1024)
==8232==    by 0xB19497: zif_odbc_exec (php_odbc.c:1698)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1617D: odbc_bindcols (php_odbc.c:1031)
==8232==    by 0xB19497: zif_odbc_exec (php_odbc.c:1698)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB16220: odbc_bindcols (php_odbc.c:1038)
==8232==    by 0xB19497: zif_odbc_exec (php_odbc.c:1698)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Syscall param write(buf) points to uninitialised byte(s)
==8232==    at 0xD58186D: ??? (in /lib64/libc-2.12.so)
==8232==    by 0xD5179B2: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0xD517879: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0xD50D92C: fwrite (in /lib64/libc-2.12.so)
==8232==    by 0x18868F82: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0x188690BB: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0x188694D6: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0xCB26296: SQLExtendedFetch (in /usr/lib64/libodbc.so.2.0.0)
==8232==    by 0xB197A5: php_odbc_fetch_hash (php_odbc.c:1758)
==8232==    by 0xB1A523: zif_odbc_fetch_array (php_odbc.c:1865)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==  Address 0x18a900c4 is 4 bytes inside a block of size 65,598 alloc'd
==8232==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==8232==    by 0x18868A0B: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0x1886920F: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0xCB26296: SQLExtendedFetch (in /usr/lib64/libodbc.so.2.0.0)
==8232==    by 0xB197A5: php_odbc_fetch_hash (php_odbc.c:1758)
==8232==    by 0xB1A523: zif_odbc_fetch_array (php_odbc.c:1865)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB19912: php_odbc_fetch_hash (php_odbc.c:1780)
==8232==    by 0xB1A523: zif_odbc_fetch_array (php_odbc.c:1865)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1992D: php_odbc_fetch_hash (php_odbc.c:1780)
==8232==    by 0xB1A523: zif_odbc_fetch_array (php_odbc.c:1865)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Syscall param write(buf) points to uninitialised byte(s)
==8232==    at 0xD58186D: ??? (in /lib64/libc-2.12.so)
==8232==    by 0xD5179B2: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0xD518F64: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0xD51873F: _IO_file_close_it@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0xD50C3D7: fclose@@GLIBC_2.2.5 (in /lib64/libc-2.12.so)
==8232==    by 0x18868AC3: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0x18869C53: ??? (in /usr/lib64/libodbccr.so.2.0.0)
==8232==    by 0xCB2795D: ??? (in /usr/lib64/libodbc.so.2.0.0)
==8232==    by 0xCB28341: SQLFreeStmt (in /usr/lib64/libodbc.so.2.0.0)
==8232==    by 0xB13B09: _free_odbc_result (php_odbc.c:437)
==8232==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==8232==    by 0x11CE263: list_entry_destructor (zend_list.c:185)
==8232==  Address 0x4029000 is in a rw- anonymous segment
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1A8BF: zif_odbc_fetch_into (php_odbc.c:1937)
==8232==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==8232==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1A8DA: zif_odbc_fetch_into (php_odbc.c:1937)
==8232==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==8232==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1BA6A: zif_odbc_result (php_odbc.c:2166)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1BA81: zif_odbc_result (php_odbc.c:2166)
==8232==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==8232==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1CED4: zif_odbc_result_all (php_odbc.c:2340)
==8232==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==8232==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 
==8232== Conditional jump or move depends on uninitialised value(s)
==8232==    at 0xB1CEEB: zif_odbc_result_all (php_odbc.c:2340)
==8232==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==8232==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==8232==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==8232==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==8232==    by 0x107C733: php_execute_script (main.c:2637)
==8232==    by 0x13DD66B: do_cli (php_cli.c:1000)
==8232==    by 0x13DF1BD: main (php_cli.c:1396)
==8232== 

 

Generated at Thu, 09 Sep 2021 23:07:45 +0000 (6 days ago)

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