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

Valgrind Report for ext/interbase/tests/bug45373.phpt ('Bug #45373 (php crash on query with errors in params)')

Script

1: <?php
2:
3:     
require("interbase.inc");
4:     
5:     
$db ibase_connect($test_base);
6:
7:
8:     
$sql "select * from test1 where i = ? and c = ?";
9:
10:     
$q ibase_prepare($db$sql);
11:     
$r ibase_execute($q1'test table not created with isql');
12:     
var_dump(ibase_fetch_assoc($r));
13:     
ibase_free_result($r);
14:     
15:     
$r ibase_execute($q1'test table not created with isql'1);
16:     
var_dump(ibase_fetch_assoc($r));
17:     
ibase_free_result($r);
18:     
19:     
$r ibase_execute($q1);
20:     
var_dump(ibase_fetch_assoc($r));
21:
22:
?>
23:

Report

==17758== Invalid read of size 4
==17758==    at 0x6149A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==17758==    by 0x613B759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==17758==    by 0x912414: _php_ibase_free_stmt_handle (ibase_query.c:127)
==17758==    by 0x91266F: _php_ibase_free_query (ibase_query.c:169)
==17758==    by 0x912798: php_ibase_free_query_rsrc (ibase_query.c:189)
==17758==    by 0x1186930: zend_resource_dtor (zend_list.c:76)
==17758==    by 0x1187357: zend_close_rsrc (zend_list.c:230)
==17758==    by 0x117C089: zend_hash_reverse_apply (zend_hash.c:1752)
==17758==    by 0x11873A3: zend_close_rsrc_list (zend_list.c:238)
==17758==    by 0x1114C61: shutdown_executor (zend_execute_API.c:263)
==17758==    by 0x1146E95: zend_deactivate (zend.c:1106)
==17758==    by 0x1035097: php_request_shutdown (main.c:1904)
==17758==  Address 0x14f372c0 is 0 bytes inside a block of size 32 free'd
==17758==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==17758==    by 0x10D9476: _efree (zend_alloc.c:2506)
==17758==    by 0x90E802: _php_ibase_close_link (interbase.c:643)
==17758==    by 0x1186930: zend_resource_dtor (zend_list.c:76)
==17758==    by 0x1186A13: zend_list_close (zend_list.c:89)
==17758==    by 0x90FE6E: _php_ibase_connect (interbase.c:943)
==17758==    by 0x9107DE: zif_ibase_connect (interbase.c:1030)
==17758==    by 0x136A0AB: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690)
==17758==    by 0x136A0AB: execute_ex (zend_vm_execute.h:54926)
==17758==    by 0x111902D: zend_call_function (zend_execute_API.c:770)
==17758==    by 0x111795A: _call_user_function_ex (zend_execute_API.c:612)
==17758==    by 0xDE8AEB: user_shutdown_function_call (basic_functions.c:5051)
==17758==    by 0x117AB68: zend_hash_apply (zend_hash.c:1669)
==17758==  Block was alloc'd at
==17758==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==17758==    by 0x10DD159: __zend_malloc (zend_alloc.c:2898)
==17758==    by 0x10D428E: _emalloc_32 (zend_alloc.c:2419)
==17758==    by 0x910279: _php_ibase_connect (interbase.c:988)
==17758==    by 0x9107DE: zif_ibase_connect (interbase.c:1030)
==17758==    by 0x136A0AB: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690)
==17758==    by 0x136A0AB: execute_ex (zend_vm_execute.h:54926)
==17758==    by 0x1391814: zend_execute (zend_vm_execute.h:60358)
==17758==    by 0x1148D89: zend_execute_scripts (zend.c:1564)
==17758==    by 0x10374AC: php_execute_script (main.c:2608)
==17758==    by 0x1397550: do_cli (php_cli.c:1002)
==17758==    by 0x139900E: main (php_cli.c:1395)
==17758== 

 

Generated at Thu, 19 Jul 2018 09:51:32 +0000 (3 days ago)

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