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

Valgrind Report for ext/oci8/tests/driver_name_11gR2.phpt ('Verify that the Driver Name attribute is set')

Script

1: <?php
2:
require(dirname(__FILE__)."/connect.inc");
3:
4: echo
"**Test 1.1 - Default values for the attribute **************\n";
5:
get_attr($c);
6:
oci_close($c);
7:
8: echo
"\n***Test 1.2 - Get the values from different connections **************\n";
9:
// with oci_pconnect() 
10:
echo "Testing with oci_pconnect()\n";
11:
$pc1=oci_pconnect($user,$password,$dbase);
12:
get_attr($pc1);
13:
oci_close($pc1);
14:
15: echo 
"Testing with oci_new_connect()\n";
16:
$nc1=oci_new_connect($user,$password,$dbase);
17:
get_attr($nc1);
18:
oci_close($nc1);
19: echo 
"Done\n";
20:
21: function 
get_attr($conn)
22: {
23:     
$sel_stmt "select client_driver 
24:         from v\$session_connect_info sci, v\$session s 
25:         where sci.client_driver is not null 
26:           and sci.sid = s.sid 
27:           and s.audsid = userenv('SESSIONID')"
;
28:     
$s2 oci_parse($conn,$sel_stmt);
29:     
oci_execute($s2,OCI_DEFAULT);
30:     
oci_fetch($s2);
31:     echo 
"The value of DRIVER_NAME is ".trim(oci_result($s2,1))."\n";
32: }
33:
34:
?>
35:

Report

==31087== Invalid read of size 1
==31087==    at 0xA1E9C6: zval_get_type (zend_types.h:327)
==31087==    by 0xA1E9C6: php_oci_register_taf_callback (oci8_failover.c:108)
==31087==    by 0xA1E97F: php_oci_unregister_taf_callback (oci8_failover.c:92)
==31087==    by 0xA1998D: zif_oci_close (oci8_interface.c:1620)
==31087==    by 0x1092F2A: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586)
==31087==    by 0x1090CFD: execute_ex (zend_vm_execute.h:417)
==31087==    by 0x1091923: zend_execute (zend_vm_execute.h:458)
==31087==    by 0xFC3656: zend_execute_scripts (zend.c:1443)
==31087==    by 0xEC11C4: php_execute_script (main.c:2493)
==31087==    by 0x11C5E29: do_cli (php_cli.c:977)
==31087==    by 0x11C77B9: main (php_cli.c:1347)
==31087==  Address 0x15031ce8 is 136 bytes inside a block of size 144 free'd
==31087==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==31087==    by 0xF643C0: _efree (zend_alloc.c:2472)
==31087==    by 0x9F3CAF: php_oci_connection_close (oci8.c:2267)
==31087==    by 0x9ED7DB: php_oci_connection_list_dtor (oci8.c:1266)
==31087==    by 0x10033C9: zend_resource_dtor (zend_list.c:76)
==31087==    by 0x10034A1: zend_list_close (zend_list.c:89)
==31087==    by 0xA1996F: zif_oci_close (oci8_interface.c:1617)
==31087==    by 0x1092F2A: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586)
==31087==    by 0x1090CFD: execute_ex (zend_vm_execute.h:417)
==31087==    by 0x1091923: zend_execute (zend_vm_execute.h:458)
==31087==    by 0xFC3656: zend_execute_scripts (zend.c:1443)
==31087==    by 0xEC11C4: php_execute_script (main.c:2493)
==31087==  Block was alloc'd at
==31087==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==31087==    by 0xF65A20: __zend_malloc (zend_alloc.c:2864)
==31087==    by 0xF6409D: _emalloc (zend_alloc.c:2457)
==31087==    by 0xF6492B: _safe_emalloc (zend_alloc.c:2516)
==31087==    by 0xF64D3D: _ecalloc (zend_alloc.c:2539)
==31087==    by 0x9F244D: php_oci_do_connect_ex (oci8.c:1981)
==31087==    by 0x9EECE0: php_oci_do_connect (oci8.c:1645)
==31087==    by 0xA19A45: zif_oci_connect (oci8_interface.c:1640)
==31087==    by 0x1092F2A: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586)
==31087==    by 0x1090CFD: execute_ex (zend_vm_execute.h:417)
==31087==    by 0x1091923: zend_execute (zend_vm_execute.h:458)
==31087==    by 0xFC3656: zend_execute_scripts (zend.c:1443)
==31087== 

 

Generated at Wed, 20 Sep 2017 13:49:37 +0000 (5 days ago)

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