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

==4079== Invalid read of size 4
==4079==    at 0x5F3DA82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==4079==    by 0x5F2F759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==4079==    by 0x889692: _php_ibase_free_stmt_handle (ibase_query.c:127)
==4079==    by 0x8898E5: _php_ibase_free_query (ibase_query.c:169)
==4079==    by 0x889A0D: php_ibase_free_query_rsrc (ibase_query.c:189)
==4079==    by 0x102CB2D: zend_resource_dtor (zend_list.c:76)
==4079==    by 0x102D533: zend_close_rsrc (zend_list.c:230)
==4079==    by 0x10237B8: zend_hash_reverse_apply (zend_hash.c:1598)
==4079==    by 0x102D57D: zend_close_rsrc_list (zend_list.c:238)
==4079==    by 0xFB7AAF: shutdown_executor (zend_execute_API.c:353)
==4079==    by 0xFE9DD3: zend_deactivate (zend.c:1005)
==4079==    by 0xEDDE15: php_request_shutdown (main.c:1902)
==4079==  Address 0x15082dd0 is 0 bytes inside a block of size 32 free'd
==4079==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==4079==    by 0xF84A41: _efree (zend_alloc.c:2444)
==4079==    by 0x885A40: _php_ibase_close_link (interbase.c:643)
==4079==    by 0x102CB2D: zend_resource_dtor (zend_list.c:76)
==4079==    by 0x102CC05: zend_list_close (zend_list.c:89)
==4079==    by 0x88711A: _php_ibase_connect (interbase.c:943)
==4079==    by 0x887B71: zif_ibase_connect (interbase.c:1037)
==4079==    by 0x10CC0AE: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==4079==    by 0x10C92C6: execute_ex (zend_vm_execute.h:432)
==4079==    by 0xFBB4EA: zend_call_function (zend_execute_API.c:855)
==4079==    by 0xFB9912: _call_user_function_ex (zend_execute_API.c:672)
==4079==    by 0xCF3121: user_shutdown_function_call (basic_functions.c:5017)
==4079==  Block was alloc'd at
==4079==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==4079==    by 0xF8609B: __zend_malloc (zend_alloc.c:2838)
==4079==    by 0xF7F7F6: _emalloc_32 (zend_alloc.c:2352)
==4079==    by 0x88754C: _php_ibase_connect (interbase.c:988)
==4079==    by 0x887B71: zif_ibase_connect (interbase.c:1037)
==4079==    by 0x10CC0AE: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==4079==    by 0x10C92C6: execute_ex (zend_vm_execute.h:432)
==4079==    by 0x10C9F13: zend_execute (zend_vm_execute.h:474)
==4079==    by 0xFEC038: zend_execute_scripts (zend.c:1482)
==4079==    by 0xEE0014: php_execute_script (main.c:2577)
==4079==    by 0x1232EF5: do_cli (php_cli.c:993)
==4079==    by 0x123489C: main (php_cli.c:1381)
==4079== 

 

Generated at Mon, 12 Feb 2018 03:40:49 +0000 (7 days ago)

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