PHP  
 PHP_7_0
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

==16310== Invalid read of size 4
==16310==    at 0x5F3DA82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==16310==    by 0x5F2F759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==16310==    by 0x87408A: _php_ibase_free_stmt_handle (ibase_query.c:127)
==16310==    by 0x8742DD: _php_ibase_free_query (ibase_query.c:169)
==16310==    by 0x874405: php_ibase_free_query_rsrc (ibase_query.c:189)
==16310==    by 0x1004971: zend_resource_dtor (zend_list.c:76)
==16310==    by 0x1005377: zend_close_rsrc (zend_list.c:230)
==16310==    by 0xFFB7D5: zend_hash_reverse_apply (zend_hash.c:1628)
==16310==    by 0x10053C1: zend_close_rsrc_list (zend_list.c:238)
==16310==    by 0xF93F87: shutdown_executor (zend_execute_API.c:351)
==16310==    by 0xFC2AB5: zend_deactivate (zend.c:985)
==16310==    by 0xEBFED4: php_request_shutdown (main.c:1856)
==16310==  Address 0x14fc6ed0 is 0 bytes inside a block of size 32 free'd
==16310==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==16310==    by 0xF65569: _efree (zend_alloc.c:2488)
==16310==    by 0x870438: _php_ibase_close_link (interbase.c:643)
==16310==    by 0x1004971: zend_resource_dtor (zend_list.c:76)
==16310==    by 0x1004A49: zend_list_close (zend_list.c:89)
==16310==    by 0x871B12: _php_ibase_connect (interbase.c:943)
==16310==    by 0x872569: zif_ibase_connect (interbase.c:1037)
==16310==    by 0x1094BF6: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586)
==16310==    by 0x10929C9: execute_ex (zend_vm_execute.h:417)
==16310==    by 0xF975FF: zend_call_function (zend_execute_API.c:867)
==16310==    by 0xF95E32: call_user_function_ex (zend_execute_API.c:675)
==16310==    by 0xF95D1E: call_user_function (zend_execute_API.c:657)
==16310==  Block was alloc'd at
==16310==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==16310==    by 0xF66BE4: __zend_malloc (zend_alloc.c:2882)
==16310==    by 0xF6031E: _emalloc_32 (zend_alloc.c:2396)
==16310==    by 0x871F44: _php_ibase_connect (interbase.c:988)
==16310==    by 0x872569: zif_ibase_connect (interbase.c:1037)
==16310==    by 0x1094BF6: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586)
==16310==    by 0x10929C9: execute_ex (zend_vm_execute.h:417)
==16310==    by 0x10935EF: zend_execute (zend_vm_execute.h:458)
==16310==    by 0xFC4B84: zend_execute_scripts (zend.c:1445)
==16310==    by 0xEC20CA: php_execute_script (main.c:2518)
==16310==    by 0x11C7AF5: do_cli (php_cli.c:977)
==16310==    by 0x11C9485: main (php_cli.c:1347)
==16310== 

 

Generated at Wed, 08 Nov 2017 19:36:35 +0000 (11 days ago)

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