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

==3173== Invalid read of size 16
==3173==    at 0xB5520C9: __intel_new_memcpy (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0xA04A217: kpureq (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0xA04DB10: kpuStmtPrep2New (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0xA14F153: kpuStmtCachePrepare2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0xA04CB1E: kpureq2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0x9F26E43: OCIStmtPrepare2 (in /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1)
==3173==    by 0x8850B3: php_oci_statement_create (oci8_statement.c:60)
==3173==    by 0x89DD79: zif_oci_parse (oci8_interface.c:1724)
==3173==    by 0xDBB770: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==3173==    by 0xDC1AA7: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==3173==    by 0xDBA7C7: execute (zend_vm_execute.h:107)
==3173==    by 0xD6DC67: zend_execute_scripts (zend.c:1259)
==3173==  Address 0x14f2f480 is 3,600 bytes inside a block of size 3,611 alloc'd
==3173==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==3173==    by 0xD354D4: _emalloc (zend_alloc.c:2348)
==3173==    by 0xD35AA8: _estrndup (zend_alloc.c:2503)
==3173==    by 0xD698FF: _zval_copy_ctor_func (zend_variables.c:122)
==3173==    by 0xDB37F3: _zval_copy_ctor (zend_variables.h:45)
==3173==    by 0xDCC881: ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER (zend_vm_execute.h:4086)
==3173==    by 0xDCCBB7: ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER (zend_vm_execute.h:4133)
==3173==    by 0xDBA7C7: execute (zend_vm_execute.h:107)
==3173==    by 0xD6DC67: zend_execute_scripts (zend.c:1259)
==3173==    by 0xCB9C74: php_execute_script (main.c:2316)
==3173==    by 0xEB1008: main (php_cli.c:1189)
==3173== 

 

Generated at Sun, 27 Jul 2014 12:58:43 +0000 (45 hours ago)

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