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

==29043== Invalid read of size 4
==29043==    at 0x5F2FA82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==29043==    by 0x5F21759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==29043==    by 0x91DDCA: _php_ibase_free_stmt_handle (ibase_query.c:127)
==29043==    by 0x91E01D: _php_ibase_free_query (ibase_query.c:169)
==29043==    by 0x91E145: php_ibase_free_query_rsrc (ibase_query.c:189)
==29043==    by 0x11496B3: zend_resource_dtor (zend_list.c:76)
==29043==    by 0x114A0BB: zend_close_rsrc (zend_list.c:230)
==29043==    by 0x113EDCA: zend_hash_reverse_apply (zend_hash.c:1664)
==29043==    by 0x114A105: zend_close_rsrc_list (zend_list.c:238)
==29043==    by 0x10CF998: shutdown_executor (zend_execute_API.c:262)
==29043==    by 0x1104B24: zend_deactivate (zend.c:1078)
==29043==    by 0xFED6EF: php_request_shutdown (main.c:1765)
==29043==  Address 0x14ef3640 is 0 bytes inside a block of size 32 free'd
==29043==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==29043==    by 0x10989DD: _efree (zend_alloc.c:2499)
==29043==    by 0x91A286: _php_ibase_close_link (interbase.c:643)
==29043==    by 0x11496B3: zend_resource_dtor (zend_list.c:76)
==29043==    by 0x1149793: zend_list_close (zend_list.c:89)
==29043==    by 0x91B942: _php_ibase_connect (interbase.c:946)
==29043==    by 0x91C26D: zif_ibase_connect (interbase.c:1035)
==29043==    by 0x11ECC6A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==29043==    by 0x135470A: execute_ex (zend_vm_execute.h:57836)
==29043==    by 0x10D3CCD: zend_call_function (zend_execute_API.c:792)
==29043==    by 0x10D25B4: _call_user_function_ex (zend_execute_API.c:628)
==29043==    by 0xDC995C: user_shutdown_function_call (basic_functions.c:5042)
==29043==  Block was alloc'd at
==29043==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==29043==    by 0x109C748: __zend_malloc (zend_alloc.c:2884)
==29043==    by 0x1093792: _emalloc_32 (zend_alloc.c:2407)
==29043==    by 0x91BD90: _php_ibase_connect (interbase.c:991)
==29043==    by 0x91C26D: zif_ibase_connect (interbase.c:1035)
==29043==    by 0x11ECC6A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==29043==    by 0x135470A: execute_ex (zend_vm_execute.h:57836)
==29043==    by 0x1354D5D: zend_execute (zend_vm_execute.h:61747)
==29043==    by 0x1106C44: zend_execute_scripts (zend.c:1538)
==29043==    by 0xFEFA6D: php_execute_script (main.c:2467)
==29043==    by 0x135A51C: do_cli (php_cli.c:1011)
==29043==    by 0x135BF0D: main (php_cli.c:1404)
==29043== 

 

Generated at Mon, 15 Jan 2018 23:48:43 +0000 (6 days ago)

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