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

Valgrind Report for ext/pdo_oci/tests/pecl_bug_6364.phpt ('PECL PDO_OCI Bug #6364 (segmentation fault on stored procedure call with OUT binds)')

Script

1: <?php
2:
3:
require dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc';
4:
$dbh PDOTest::factory();
5:
6: @
$dbh->exec ("drop table bug_6364_t");
7:
8:
$dbh->exec ("create table bug_6364_t (c1 varchar2(10), c2 varchar2(10), c3 varchar2(10), c4 varchar2(10), c5 varchar2(10))");
9:
10:
$dbh->exec ("create or replace procedure bug_6364_sp(p1 IN varchar2, p2 IN varchar2, p3 IN varchar2, p4 OUT varchar2, p5 OUT varchar2) as begin insert into bug_6364_t (c1, c2, c3) values (p1, p2, p3); p4 := 'val4'; p5 := 'val5'; end;");
11:
12:
$stmt $dbh->prepare("call bug_6364_sp('p1','p2','p3',?,?)");
13:
14:
$out_param1 "a";
15:
$out_param2 "a";
16:
17:
$stmt->bindParam(1$out_param1,PDO::PARAM_STR1024);
18:
$stmt->bindParam(2$out_param2,PDO::PARAM_STR1024);
19:
20:
$stmt->execute() or die ("Execution error: " var_dump($dbh->errorInfo()));
21:
22:
var_dump($out_param1);
23:
var_dump($out_param2);
24:
25: foreach (
$dbh->query("select * from bug_6364_t") as $row) {
26:     
var_dump($row);
27: }
28:
29: print 
"Done\n";
30:
31:
// Cleanup
32:
$dbh->exec ("drop procedure bug_6364_sp");
33:
$dbh->exec ("drop table bug_6364_t");
34:
35:
?>
36:

37:

Report

==19627== Invalid read of size 16
==19627==    at 0xB5520C9: __intel_new_memcpy (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==19627==    by 0xA04A217: kpureq (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==19627==    by 0x9F26F81: OCIStmtPrepare (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==19627==    by 0x8DE18A: oci_handle_doer (oci_driver.c:335)
==19627==    by 0x8BBF6C: zim_PDO_exec (pdo_dbh.c:962)
==19627==    by 0xDBB770: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==19627==    by 0xDBC0B5: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:430)
==19627==    by 0xDBA7C7: execute (zend_vm_execute.h:107)
==19627==    by 0xD6DC67: zend_execute_scripts (zend.c:1259)
==19627==    by 0xCB9C74: php_execute_script (main.c:2316)
==19627==    by 0xEB1008: main (php_cli.c:1189)
==19627==  Address 0x14f2cea0 is 208 bytes inside a block of size 221 alloc'd
==19627==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==19627==    by 0xD354D4: _emalloc (zend_alloc.c:2348)
==19627==    by 0xD35AA8: _estrndup (zend_alloc.c:2503)
==19627==    by 0xD698FF: _zval_copy_ctor_func (zend_variables.c:122)
==19627==    by 0xDB37F3: _zval_copy_ctor (zend_variables.h:45)
==19627==    by 0xDC1E3A: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_vm_execute.h:1760)
==19627==    by 0xDBA7C7: execute (zend_vm_execute.h:107)
==19627==    by 0xD6DC67: zend_execute_scripts (zend.c:1259)
==19627==    by 0xCB9C74: php_execute_script (main.c:2316)
==19627==    by 0xEB1008: main (php_cli.c:1189)
==19627== 

 

Generated at Wed, 23 Jul 2014 19:58:46 +0000 (47 hours ago)

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