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/oci8/tests/bug47281.phpt ('Bug #47281 ($php_errormsg is limited in size of characters)')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"create or replace procedure bug47281_sp as
9:     begin
10:     raise_application_error(-20000, 
11:         'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccDeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeFggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhIjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjKlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllM');
12:     end;"
13:
);
14:
15:
oci8_test_sql_execute($c$stmtarray);
16:
17:
// Run Test
18:
19:
echo "Test 1\n";
20:
21:
$s oci_parse($c'begin bug47281_sp; end;');
22:
$r = @oci_execute($s);
23:
24: if (!
$r) {
25:     
$m oci_error($s);
26:     echo 
$m['message'], "\n";
27: }
28:
29: echo 
"Test 2\n";
30:
31: echo 
$php_errormsg"\n";
32:
33:
// Clean up
34:
35:
$stmtarray = array(
36:     
"drop procedure bug47281_sp"
37:
);
38:
39:
oci8_test_sql_execute($c$stmtarray);
40:
41:
?>
42:
===DONE===
43:

Report

==7717== Invalid read of size 16
==7717==    at 0xB5510C9: __intel_new_memcpy (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0xA049217: kpureq (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0xA04CB10: kpuStmtPrep2New (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0xA14E153: kpuStmtCachePrepare2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0xA04BB1E: kpureq2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0x9F25E43: OCIStmtPrepare2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==7717==    by 0x8850B3: php_oci_statement_create (oci8_statement.c:60)
==7717==    by 0x89DD79: zif_oci_parse (oci8_interface.c:1724)
==7717==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==7717==    by 0xDC1AA3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==7717==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==7717==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==7717==  Address 0x14f2bac0 is 3,600 bytes inside a block of size 3,611 alloc'd
==7717==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==7717==    by 0xD354D0: _emalloc (zend_alloc.c:2348)
==7717==    by 0xD35AA4: _estrndup (zend_alloc.c:2503)
==7717==    by 0xD698FB: _zval_copy_ctor_func (zend_variables.c:122)
==7717==    by 0xDB37EF: _zval_copy_ctor (zend_variables.h:45)
==7717==    by 0xDCC87D: ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER (zend_vm_execute.h:4086)
==7717==    by 0xDCCBB3: ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER (zend_vm_execute.h:4133)
==7717==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==7717==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==7717==    by 0xCB9C70: php_execute_script (main.c:2316)
==7717==    by 0xEB1004: main (php_cli.c:1189)
==7717== 

 

Generated at Fri, 18 Apr 2014 07:01:42 +0000 (7 days ago)

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