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

==20219== Invalid read of size 4
==20219==    at 0x6157A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==20219==    by 0x6149759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==20219==    by 0x89E419: _php_ibase_free_stmt_handle (ibase_query.c:127)
==20219==    by 0x89E674: _php_ibase_free_query (ibase_query.c:169)
==20219==    by 0x89E79D: php_ibase_free_query_rsrc (ibase_query.c:189)
==20219==    by 0x10554C7: zend_resource_dtor (zend_list.c:76)
==20219==    by 0x1055EEC: zend_close_rsrc (zend_list.c:230)
==20219==    by 0x104BA95: zend_hash_reverse_apply (zend_hash.c:1598)
==20219==    by 0x1055F38: zend_close_rsrc_list (zend_list.c:238)
==20219==    by 0xFDF388: shutdown_executor (zend_execute_API.c:353)
==20219==    by 0x10124EB: zend_deactivate (zend.c:1005)
==20219==    by 0xF05958: php_request_shutdown (main.c:1902)
==20219==  Address 0x15ca85e0 is 0 bytes inside a block of size 32 free'd
==20219==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==20219==    by 0xFA9DC3: _efree (zend_alloc.c:2444)
==20219==    by 0x89A65F: _php_ibase_close_link (interbase.c:643)
==20219==    by 0x10554C7: zend_resource_dtor (zend_list.c:76)
==20219==    by 0x10555A2: zend_list_close (zend_list.c:89)
==20219==    by 0x89BCEE: _php_ibase_connect (interbase.c:943)
==20219==    by 0x89C81E: zif_ibase_connect (interbase.c:1037)
==20219==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==20219==    by 0x10F2D8F: execute_ex (zend_vm_execute.h:429)
==20219==    by 0xFE2FE3: zend_call_function (zend_execute_API.c:855)
==20219==    by 0xFE13E0: _call_user_function_ex (zend_execute_API.c:672)
==20219==    by 0xD18DC4: user_shutdown_function_call (basic_functions.c:5017)
==20219==  Block was alloc'd at
==20219==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==20219==    by 0xFAB3A1: __zend_malloc (zend_alloc.c:2838)
==20219==    by 0xFA4B5D: _emalloc_32 (zend_alloc.c:2352)
==20219==    by 0x89C0DD: _php_ibase_connect (interbase.c:988)
==20219==    by 0x89C81E: zif_ibase_connect (interbase.c:1037)
==20219==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==20219==    by 0x10F2D8F: execute_ex (zend_vm_execute.h:429)
==20219==    by 0x10F397F: zend_execute (zend_vm_execute.h:474)
==20219==    by 0x101454E: zend_execute_scripts (zend.c:1482)
==20219==    by 0xF07BBE: php_execute_script (main.c:2577)
==20219==    by 0x125C620: do_cli (php_cli.c:993)
==20219==    by 0x125E0B9: main (php_cli.c:1381)
==20219== 

 

Generated at Sun, 23 Feb 2020 16:49:06 +0000 (2 days ago)

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