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

==13123== Invalid read of size 4
==13123==    at 0x6368A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==13123==    by 0x635A759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==13123==    by 0x74BC1D: _php_ibase_free_stmt_handle (ibase_query.c:127)
==13123==    by 0x74BE78: _php_ibase_free_query (ibase_query.c:169)
==13123==    by 0x74BFA1: php_ibase_free_query_rsrc (ibase_query.c:189)
==13123==    by 0xFE5690: zend_resource_dtor (zend_list.c:74)
==13123==    by 0xFE612C: zend_close_rsrc_list (zend_list.c:229)
==13123==    by 0xF71B29: shutdown_executor (zend_execute_API.c:263)
==13123==    by 0xFA558F: zend_deactivate (zend.c:1175)
==13123==    by 0xE92902: php_request_shutdown (main.c:1906)
==13123==    by 0x1257C08: do_cli (php_cli.c:1159)
==13123==    by 0x125853D: main (php_cli.c:1384)
==13123==  Address 0x14fc92b0 is 0 bytes inside a block of size 32 free'd
==13123==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==13123==    by 0xF37857: _efree (zend_alloc.c:2530)
==13123==    by 0x748018: _php_ibase_close_link (interbase.c:643)
==13123==    by 0xFE5690: zend_resource_dtor (zend_list.c:74)
==13123==    by 0xFE5773: zend_list_close (zend_list.c:87)
==13123==    by 0x749684: _php_ibase_connect (interbase.c:943)
==13123==    by 0x749FF4: zif_ibase_connect (interbase.c:1030)
==13123==    by 0x1225E32: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==13123==    by 0x1225E32: execute_ex (zend_vm_execute.h:61468)
==13123==    by 0xF75919: zend_call_function (zend_execute_API.c:769)
==13123==    by 0xF74359: _call_user_function_ex (zend_execute_API.c:622)
==13123==    by 0xC37572: user_shutdown_function_call (basic_functions.c:5049)
==13123==    by 0xFDA281: zend_hash_apply (zend_hash.c:1775)
==13123==  Block was alloc'd at
==13123==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==13123==    by 0xF3B51D: __zend_malloc (zend_alloc.c:2926)
==13123==    by 0xF3266F: _emalloc_32 (zend_alloc.c:2443)
==13123==    by 0x749A8F: _php_ibase_connect (interbase.c:988)
==13123==    by 0x749FF4: zif_ibase_connect (interbase.c:1030)
==13123==    by 0x1225E32: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==13123==    by 0x1225E32: execute_ex (zend_vm_execute.h:61468)
==13123==    by 0x1250B8E: zend_execute (zend_vm_execute.h:67896)
==13123==    by 0xFA74BF: zend_execute_scripts (zend.c:1639)
==13123==    by 0xE94CE8: php_execute_script (main.c:2607)
==13123==    by 0x1256A7F: do_cli (php_cli.c:992)
==13123==    by 0x125853D: main (php_cli.c:1384)
==13123== 

 

Generated at Tue, 05 Feb 2019 02:38:19 +0000 (12 days ago)

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