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

==10734== Invalid read of size 4
==10734==    at 0x5F3DA82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==10734==    by 0x5F2F759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==10734==    by 0x8896AE: _php_ibase_free_stmt_handle (ibase_query.c:127)
==10734==    by 0x889901: _php_ibase_free_query (ibase_query.c:169)
==10734==    by 0x889A29: php_ibase_free_query_rsrc (ibase_query.c:189)
==10734==    by 0x102C4D1: zend_resource_dtor (zend_list.c:76)
==10734==    by 0x102CED7: zend_close_rsrc (zend_list.c:230)
==10734==    by 0x102315C: zend_hash_reverse_apply (zend_hash.c:1598)
==10734==    by 0x102CF21: zend_close_rsrc_list (zend_list.c:238)
==10734==    by 0xFB7427: shutdown_executor (zend_execute_API.c:353)
==10734==    by 0xFE974B: zend_deactivate (zend.c:1005)
==10734==    by 0xEDD791: php_request_shutdown (main.c:1902)
==10734==  Address 0x15081d60 is 0 bytes inside a block of size 32 free'd
==10734==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10734==    by 0xF843BD: _efree (zend_alloc.c:2444)
==10734==    by 0x885A5C: _php_ibase_close_link (interbase.c:643)
==10734==    by 0x102C4D1: zend_resource_dtor (zend_list.c:76)
==10734==    by 0x102C5A9: zend_list_close (zend_list.c:89)
==10734==    by 0x887136: _php_ibase_connect (interbase.c:943)
==10734==    by 0x887B8D: zif_ibase_connect (interbase.c:1037)
==10734==    by 0x10CBA0A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==10734==    by 0x10C8C22: execute_ex (zend_vm_execute.h:432)
==10734==    by 0xFBAE62: zend_call_function (zend_execute_API.c:855)
==10734==    by 0xFB928A: _call_user_function_ex (zend_execute_API.c:672)
==10734==    by 0xCF2AF5: user_shutdown_function_call (basic_functions.c:5017)
==10734==  Block was alloc'd at
==10734==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10734==    by 0xF85A17: __zend_malloc (zend_alloc.c:2838)
==10734==    by 0xF7F172: _emalloc_32 (zend_alloc.c:2352)
==10734==    by 0x887568: _php_ibase_connect (interbase.c:988)
==10734==    by 0x887B8D: zif_ibase_connect (interbase.c:1037)
==10734==    by 0x10CBA0A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==10734==    by 0x10C8C22: execute_ex (zend_vm_execute.h:432)
==10734==    by 0x10C986F: zend_execute (zend_vm_execute.h:474)
==10734==    by 0xFEB9B0: zend_execute_scripts (zend.c:1482)
==10734==    by 0xEDF990: php_execute_script (main.c:2577)
==10734==    by 0x123291D: do_cli (php_cli.c:993)
==10734==    by 0x12342C4: main (php_cli.c:1381)
==10734== 

 

Generated at Fri, 01 Dec 2017 18:56:15 +0000 (10 days ago)

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