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/ibase_free_query_001.phpt ('ibase_free_query(): Basic test')

Script

1: <?php
2:
3:
require("interbase.inc");
4:
5:
$x ibase_connect($test_base);
6:
7:
$q =ibase_prepare($x'SELECT 1 FROM test1 WHERE i = ?');
8:
$q =ibase_prepare($x'SELECT 1 FROM test1 WHERE i = ?');
9:
$q ibase_prepare($x'SELECT 1 FROM test1 WHERE i = ?');
10:
11:
var_dump(ibase_free_query($q));
12:
var_dump(ibase_free_query($q));
13:
var_dump(ibase_free_query($x));
14:
15:
?>
16:

Report

==20250== Invalid read of size 4
==20250==    at 0x6157A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==20250==    by 0x6149759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==20250==    by 0x87EB7D: _php_ibase_free_stmt_handle (ibase_query.c:127)
==20250==    by 0x87EDD8: _php_ibase_free_query (ibase_query.c:169)
==20250==    by 0x87EF01: php_ibase_free_query_rsrc (ibase_query.c:189)
==20250==    by 0x1030012: zend_resource_dtor (zend_list.c:76)
==20250==    by 0x1030A37: zend_close_rsrc (zend_list.c:230)
==20250==    by 0x10265DF: zend_hash_reverse_apply (zend_hash.c:1598)
==20250==    by 0x1030A83: zend_close_rsrc_list (zend_list.c:238)
==20250==    by 0xFB9CDC: shutdown_executor (zend_execute_API.c:353)
==20250==    by 0xFECEF0: zend_deactivate (zend.c:1005)
==20250==    by 0xEE059F: php_request_shutdown (main.c:1902)
==20250==  Address 0x1509c4f0 is 0 bytes inside a block of size 32 free'd
==20250==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==20250==    by 0xF846F1: _efree (zend_alloc.c:2444)
==20250==    by 0x87ADC3: _php_ibase_close_link (interbase.c:643)
==20250==    by 0x1030012: zend_resource_dtor (zend_list.c:76)
==20250==    by 0x10300ED: zend_list_close (zend_list.c:89)
==20250==    by 0x87C452: _php_ibase_connect (interbase.c:943)
==20250==    by 0x87CF82: zif_ibase_connect (interbase.c:1037)
==20250==    by 0x10D00F7: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==20250==    by 0x10CD252: execute_ex (zend_vm_execute.h:429)
==20250==    by 0xFBD937: zend_call_function (zend_execute_API.c:855)
==20250==    by 0xFBBD34: _call_user_function_ex (zend_execute_API.c:672)
==20250==    by 0xCF305C: user_shutdown_function_call (basic_functions.c:5017)
==20250==  Block was alloc'd at
==20250==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==20250==    by 0xF85CCF: __zend_malloc (zend_alloc.c:2838)
==20250==    by 0xF7F48B: _emalloc_32 (zend_alloc.c:2352)
==20250==    by 0x87C841: _php_ibase_connect (interbase.c:988)
==20250==    by 0x87CF82: zif_ibase_connect (interbase.c:1037)
==20250==    by 0x10D00F7: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==20250==    by 0x10CD252: execute_ex (zend_vm_execute.h:429)
==20250==    by 0x10CDE42: zend_execute (zend_vm_execute.h:474)
==20250==    by 0xFEEF53: zend_execute_scripts (zend.c:1482)
==20250==    by 0xEE2803: php_execute_script (main.c:2577)
==20250==    by 0x1236E10: do_cli (php_cli.c:993)
==20250==    by 0x12388A9: main (php_cli.c:1381)
==20250== 

 

Generated at Sat, 19 May 2018 03:02:55 +0000 (6 days ago)

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