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

Valgrind Report for ext/oci8/tests/conn_attr_1.phpt ('Set and get of connection attributes with all types of connections.')

Script

1: <?php
2:
3: $testuser     
'testuser_attr_1';  // Used in conn_attr.inc
4:
$testpassword 'testuser'
5:
6: require(
dirname(__FILE__)."/conn_attr.inc");
7:
8:
$attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER');
9:
10: echo
"**Test 1.1 - Default values for the attributes **************\n";
11:
$c get_conn(1);
12: foreach(
$attr_array as $attr) {
13:         
get_attr($c,$attr);
14: }
15:
16: echo
"**Test 1.2 - Set and get values for the attributes **************\n";
17:
18:
// With oci_connect, oci_pconnect, oci_new_connect
19:
20:
$conn1 get_conn(1); //oci_connect()
21:
foreach($attr_array as $attr) {
22:     
set_attr($conn1,$attr,1);
23:     
get_attr($conn1,$attr);
24: }
25:
26:
$conn2 get_conn(2); //oci_pconnect()
27:
foreach($attr_array as $attr) {
28:     
set_attr($conn2,$attr,2);
29:     
get_attr($conn2,$attr);
30: }
31:
32:
$conn3 get_conn(3); //oci_new_connect()
33:
foreach($attr_array as $attr) {
34:     
set_attr($conn3,$attr,3);
35:     
get_attr($conn3,$attr);
36: }
37:
38:
// clean up
39:
oci_close($conn1);
40:
oci_close($conn2);
41:
oci_close($conn3);
42:
clean_up($c);
43:
44: echo 
"Done\n";
45:
46:
?>
47:

Report

==25579== Invalid read of size 1
==25579==    at 0xA96B1E: zval_get_type (zend_types.h:390)
==25579==    by 0xA96B1E: php_oci_register_taf_callback (oci8_failover.c:108)
==25579==    by 0xA96AD7: php_oci_unregister_taf_callback (oci8_failover.c:92)
==25579==    by 0xA91959: zif_oci_close (oci8_interface.c:1620)
==25579==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==25579==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==25579==    by 0x1339EDB: zend_execute (zend_vm_execute.h:63763)
==25579==    by 0x10DF02D: zend_execute_scripts (zend.c:1494)
==25579==    by 0xFD0CE5: php_execute_script (main.c:2566)
==25579==    by 0x133FA79: do_cli (php_cli.c:1011)
==25579==    by 0x134142D: main (php_cli.c:1404)
==25579==  Address 0x152d3a38 is 136 bytes inside a block of size 144 free'd
==25579==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==25579==    by 0x1076214: _efree (zend_alloc.c:2428)
==25579==    by 0xA6B758: php_oci_connection_close (oci8.c:2267)
==25579==    by 0xA6517B: php_oci_connection_list_dtor (oci8.c:1266)
==25579==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==25579==    by 0x1120B09: zend_list_close (zend_list.c:89)
==25579==    by 0xA9193B: zif_oci_close (oci8_interface.c:1617)
==25579==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==25579==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==25579==    by 0x1339EDB: zend_execute (zend_vm_execute.h:63763)
==25579==    by 0x10DF02D: zend_execute_scripts (zend.c:1494)
==25579==    by 0xFD0CE5: php_execute_script (main.c:2566)
==25579==  Block was alloc'd at
==25579==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==25579==    by 0x10777DB: __zend_malloc (zend_alloc.c:2811)
==25579==    by 0x1075EF1: _emalloc (zend_alloc.c:2413)
==25579==    by 0x107677F: _safe_emalloc (zend_alloc.c:2472)
==25579==    by 0x1076B91: _ecalloc (zend_alloc.c:2495)
==25579==    by 0xA69EF6: php_oci_do_connect_ex (oci8.c:1981)
==25579==    by 0xA66680: php_oci_do_connect (oci8.c:1645)
==25579==    by 0xA919B8: zif_oci_new_connect (oci8_interface.c:1632)
==25579==    by 0x11BD9D3: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==25579==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==25579==    by 0x1339EDB: zend_execute (zend_vm_execute.h:63763)
==25579==    by 0x10DF02D: zend_execute_scripts (zend.c:1494)
==25579== 

 

Generated at Sat, 09 Sep 2017 03:10:54 +0000 (14 days ago)

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