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

==6557== Invalid read of size 4
==6557==    at 0x6157A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==6557==    by 0x6149759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==6557==    by 0x87FA7B: _php_ibase_free_stmt_handle (ibase_query.c:127)
==6557==    by 0x87FCD6: _php_ibase_free_query (ibase_query.c:169)
==6557==    by 0x87FDFF: php_ibase_free_query_rsrc (ibase_query.c:189)
==6557==    by 0x10366FD: zend_resource_dtor (zend_list.c:76)
==6557==    by 0x1037122: zend_close_rsrc (zend_list.c:230)
==6557==    by 0x102CCCA: zend_hash_reverse_apply (zend_hash.c:1598)
==6557==    by 0x103716E: zend_close_rsrc_list (zend_list.c:238)
==6557==    by 0xFC03C7: shutdown_executor (zend_execute_API.c:353)
==6557==    by 0xFF35DB: zend_deactivate (zend.c:1005)
==6557==    by 0xEE6A74: php_request_shutdown (main.c:1902)
==6557==  Address 0x15c82140 is 0 bytes inside a block of size 32 free'd
==6557==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6557==    by 0xF8ADDC: _efree (zend_alloc.c:2444)
==6557==    by 0x87BCC1: _php_ibase_close_link (interbase.c:643)
==6557==    by 0x10366FD: zend_resource_dtor (zend_list.c:76)
==6557==    by 0x10367D8: zend_list_close (zend_list.c:89)
==6557==    by 0x87D350: _php_ibase_connect (interbase.c:943)
==6557==    by 0x87DE80: zif_ibase_connect (interbase.c:1037)
==6557==    by 0x10D708A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==6557==    by 0x10D41E5: execute_ex (zend_vm_execute.h:429)
==6557==    by 0xFC4022: zend_call_function (zend_execute_API.c:855)
==6557==    by 0xFC241F: _call_user_function_ex (zend_execute_API.c:672)
==6557==    by 0xCF970B: user_shutdown_function_call (basic_functions.c:5017)
==6557==  Block was alloc'd at
==6557==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6557==    by 0xF8C3BA: __zend_malloc (zend_alloc.c:2838)
==6557==    by 0xF85B76: _emalloc_32 (zend_alloc.c:2352)
==6557==    by 0x87D73F: _php_ibase_connect (interbase.c:988)
==6557==    by 0x87DE80: zif_ibase_connect (interbase.c:1037)
==6557==    by 0x10D708A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==6557==    by 0x10D41E5: execute_ex (zend_vm_execute.h:429)
==6557==    by 0x10D4DD5: zend_execute (zend_vm_execute.h:474)
==6557==    by 0xFF563E: zend_execute_scripts (zend.c:1482)
==6557==    by 0xEE8CD8: php_execute_script (main.c:2577)
==6557==    by 0x123DEAB: do_cli (php_cli.c:993)
==6557==    by 0x123F944: main (php_cli.c:1381)
==6557== 

 

Generated at Tue, 13 Nov 2018 22:33:50 +0000 (4 hours ago)

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