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/drcp_connect1.phpt ('DRCP: oci_connect()')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/details.inc";
4: require 
dirname(__FILE__)."/drcp_functions.inc";
5:
6:
// Open a number of connections with oci_connect and oci_pconnect and verify
7: // whether we get a used session with DRCP.
8: // To verify this, we change the value of a PL/SQL package variable in one
9: // session and query for this through another connection
10:
11:
echo "Test 1a\n";
12:
var_dump($conn1 oci_connect($user,$password,$dbase));
13:
// Create the package
14:
drcp_create_package($conn1);
15:
16: echo 
"Test 1b\n";     
17:
// OCI_CONNECT
18:
echo " This is with OCI_CONNECT.....\n";
19:
drcp_select_packagevar($conn1); // Returns 0
20:
drcp_set_packagevar($conn1,1000);
21:
oci_close($conn1);
22: echo 
" Connection conn1  closed....\n";
23:
24: echo 
"Test 2\n";
25:
// Second connection should return 0 for the package variable.
26:
var_dump($conn2 oci_connect($user,$password,$dbase));
27: echo 
" Select with connection 2 \n";
28:
drcp_select_packagevar($conn2); // Returns 0
29:
drcp_set_packagevar($conn2,100);
30:
31: echo 
"Test 3\n";
32:
// Third connection. There is no oci_close() for conn2 hence this should
33: // return the value set by conn2.
34:
var_dump($conn3 oci_connect($user,$password,$dbase));
35: echo 
" Select with connection 3 \n";
36:
drcp_select_packagevar($conn3); // Returns 100
37:
38: // Close all the connections
39:
oci_close($conn2);
40:
oci_close($conn3);
41:
42: echo 
"Test 4\n";
43:
// OCI_PCONNECT
44:
echo " This is with oci_pconnect().....\n";
45:
var_dump($pconn1 oci_pconnect($user,$password,$dbase));
46:
drcp_set_packagevar($pconn1,1000);
47:
oci_close($pconn1);
48: echo 
" Connection pconn1  closed....\n";
49:
50:
// Second connection with oci_pconnect should return the same session hence the
51: // value returned is what is set by pconn1
52:
53:
echo "Test 5\n";
54:
var_dump($pconn2 oci_pconnect($user,$password,$dbase));
55: echo 
" Select with persistent connection 2 \n";
56:
drcp_select_packagevar($pconn2); // Returns 1000
57:
oci_close($pconn2);
58:
59: echo 
"Done\n";
60:
61:
?>
62:

Report

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

 

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

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