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/drcp_characterset.phpt ('DRCP: oci_pconnect() and oci_connect() with different character sets')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/details.inc";
4:
5:
// Create connections with oci_connect and oci_pconnect with UTF8 as Charset
6:
7:
$c1 oci_connect($user,$password,$dbase,"UTF8");
8:
var_dump($c1);
9:
10:
// Now with oci_pconnect()
11:
12:
$p1 oci_pconnect($user,$password,$dbase,"UTF8");
13:
var_dump($p1);
14:
15:
// Create two more connections with character set US7ASCII
16:
17:
$c2 oci_connect($user,$password,$dbase,"US7ASCII");
18:
var_dump($c2);
19:
20:
// Now with oci_pconnect()
21:
22:
$p2 oci_pconnect($user,$password,$dbase,"US7ASCII");
23:
var_dump($p2);
24:
25:
// The two connections c1 and c2 should not share resources as they use different
26: //character sets
27:
28:
if((int)$c1 === (int)$c2)
29:     echo 
"First and third connections share a resource: NOT OK\n";
30: else
31:     echo 
"First and third  connections are different: OK\n";
32:
33:
// The two connections p1 and p2 should not share resources as they use different
34: //character sets
35:
36:
if((int)$p1 === (int)$p2)
37:     echo 
"Second and fourth connections share a resource: NOT OK\n";
38: else
39:     echo 
"Second and fourth connections are different: OK\n";
40:
41:
// Close all the connections
42:
oci_close($c1);
43:
oci_close($c2);
44:
oci_close($p1);
45:
oci_close($p2);
46:
47: echo 
"Done\n";
48:
?>
49:

Report

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

 

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

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