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

==25996== Invalid read of size 4
==25996==    at 0x5D27A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==25996==    by 0x5D19759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==25996==    by 0x8E5F62: _php_ibase_free_stmt_handle (ibase_query.c:127)
==25996==    by 0x8E61B5: _php_ibase_free_query (ibase_query.c:169)
==25996==    by 0x8E62DD: php_ibase_free_query_rsrc (ibase_query.c:189)
==25996==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==25996==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==25996==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==25996==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==25996==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==25996==    by 0x10CB834: zend_deactivate (zend.c:1050)
==25996==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==25996==  Address 0x14f3daf0 is 0 bytes inside a block of size 32 free'd
==25996==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==25996==    by 0x10603FD: _efree (zend_alloc.c:2499)
==25996==    by 0x8E243A: _php_ibase_close_link (interbase.c:643)
==25996==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==25996==    by 0x110F167: zend_list_close (zend_list.c:89)
==25996==    by 0x8E3AF6: _php_ibase_connect (interbase.c:946)
==25996==    by 0x8E4405: zif_ibase_connect (interbase.c:1035)
==25996==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==25996==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==25996==    by 0x109BEC8: zend_call_function (zend_execute_API.c:791)
==25996==    by 0x109A7AF: _call_user_function_ex (zend_execute_API.c:626)
==25996==    by 0xD90B9D: user_shutdown_function_call (basic_functions.c:4988)
==25996==  Block was alloc'd at
==25996==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==25996==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==25996==    by 0x105B1B2: _emalloc_32 (zend_alloc.c:2407)
==25996==    by 0x8E3F28: _php_ibase_connect (interbase.c:991)
==25996==    by 0x8E4405: zif_ibase_connect (interbase.c:1035)
==25996==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==25996==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==25996==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==25996==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==25996==    by 0xFB7DFA: php_execute_script (main.c:2469)
==25996==    by 0x133D4F8: do_cli (php_cli.c:1011)
==25996==    by 0x133EEE9: main (php_cli.c:1404)
==25996== 

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (5 days ago)

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