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_conn_close2.phpt ('DRCP: oci_connect() with oci_close() and oci8.old_oci_close_semantics OFF')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/details.inc";
4:
5:
// Test will open a connection
6: // Close the connection
7: // Open another connection
8: // With oci_close() the connection is released to the pool and hence the
9: // the second conneciton will be different
10:
11:
12: // OCI_CONNECT
13:
echo "This is with a OCI_CONNECT\n";
14:
var_dump($conn1 oci_connect($user,$password,$dbase));
15:
$rn1 = (int)$conn1;
16:
oci_close($conn1);
17:
18:
// Open another connection
19:
var_dump($conn2 oci_connect($user,$password,$dbase));
20:
$rn2 = (int)$conn2;
21:
oci_close($conn2);
22:
23:
// Compare the resource numbers
24:
25:
if ($rn1 === $rn2)
26:     echo 
"Both connections share a resource : NOT OK \n";
27: else
28:     echo 
"Both connections are different : OK \n";
29:
30: echo 
"Done\n";
31:
32:
?>
33:

Report

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

 

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

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