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/bug44206.phpt ('Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors reached)')

Script

1: <?php
2:
3:
require dirname(__FILE__).'/connect.inc';
4:
5:
// Run Test
6:
7:
for ($x 0$x 400$x++)
8: {
9:     
$stmt "select cursor (select $x from dual) a,
10:          cursor (select 
$x from dual) b 
11:          from dual"
;
12:     
$s oci_parse($c$stmt);
13:     
$r oci_execute($s);
14:         if (!
$r) {
15:                 echo 
"Exiting $x\n";
16:                 exit;
17:         }
18:     
$mode OCI_ASSOC OCI_RETURN_NULLS;
19:     
$result oci_fetch_array($s$mode);
20:     
oci_execute($result['A']);
21:     
oci_execute($result['B']);
22:     
oci_fetch_array($result['A'], $mode);
23:     
oci_fetch_array($result['B'], $mode);
24:     
oci_free_statement($result['A']);
25:     
oci_free_statement($result['B']);
26:     
oci_free_statement($s);
27: }
28:
29: echo 
"Completed $x\n";
30:
31:
oci_close($c);
32:
33: echo 
"Done\n";
34:
35:
?>
36:

Report

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

 

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

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