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

==6844== Invalid read of size 4
==6844==    at 0x65F7A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==6844==    by 0x65E9759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==6844==    by 0x79C130: _php_ibase_free_stmt_handle (ibase_query.c:127)
==6844==    by 0x79C38B: _php_ibase_free_query (ibase_query.c:169)
==6844==    by 0x79C4B4: php_ibase_free_query_rsrc (ibase_query.c:189)
==6844==    by 0x102A02D: zend_resource_dtor (zend_list.c:74)
==6844==    by 0x102AA54: zend_close_rsrc (zend_list.c:228)
==6844==    by 0x102013F: zend_hash_reverse_apply (zend_hash.c:1836)
==6844==    by 0x102AAA0: zend_close_rsrc_list (zend_list.c:236)
==6844==    by 0xFB7B93: shutdown_executor (zend_execute_API.c:265)
==6844==    by 0xFE9E9B: zend_deactivate (zend.c:1144)
==6844==    by 0xED7B06: php_request_shutdown (main.c:1932)
==6844==  Address 0x15fd2180 is 0 bytes inside a block of size 32 free'd
==6844==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6844==    by 0xF7C850: _efree (zend_alloc.c:2497)
==6844==    by 0x79852B: _php_ibase_close_link (interbase.c:643)
==6844==    by 0x102A02D: zend_resource_dtor (zend_list.c:74)
==6844==    by 0x102A110: zend_list_close (zend_list.c:87)
==6844==    by 0x799B97: _php_ibase_connect (interbase.c:943)
==6844==    by 0x79A507: zif_ibase_connect (interbase.c:1030)
==6844==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==6844==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==6844==    by 0xFBB8CE: zend_call_function (zend_execute_API.c:758)
==6844==    by 0xFBA1F9: _call_user_function_ex (zend_execute_API.c:600)
==6844==    by 0xC7CADD: user_shutdown_function_call (basic_functions.c:5056)
==6844==    by 0x101EC1E: zend_hash_apply (zend_hash.c:1753)
==6844==  Block was alloc'd at
==6844==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6844==    by 0xF8058A: __zend_malloc (zend_alloc.c:2893)
==6844==    by 0xF77668: _emalloc_32 (zend_alloc.c:2410)
==6844==    by 0x799FA2: _php_ibase_connect (interbase.c:988)
==6844==    by 0x79A507: zif_ibase_connect (interbase.c:1030)
==6844==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==6844==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==6844==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==6844==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==6844==    by 0xED9F70: php_execute_script (main.c:2643)
==6844==    by 0x1236556: do_cli (php_cli.c:997)
==6844==    by 0x1238014: main (php_cli.c:1390)
==6844== 

 

Generated at Tue, 06 Nov 2018 09:43:32 +0000 (11 days ago)

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