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/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

==26231== Invalid read of size 4
==26231==    at 0x5D27A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==26231==    by 0x5D19759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==26231==    by 0x8E5F62: _php_ibase_free_stmt_handle (ibase_query.c:127)
==26231==    by 0x8E61B5: _php_ibase_free_query (ibase_query.c:169)
==26231==    by 0x8E62DD: php_ibase_free_query_rsrc (ibase_query.c:189)
==26231==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==26231==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==26231==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==26231==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==26231==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==26231==    by 0x10CB834: zend_deactivate (zend.c:1050)
==26231==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==26231==  Address 0x14f3d280 is 0 bytes inside a block of size 32 free'd
==26231==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==26231==    by 0x10603FD: _efree (zend_alloc.c:2499)
==26231==    by 0x8E243A: _php_ibase_close_link (interbase.c:643)
==26231==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==26231==    by 0x110F167: zend_list_close (zend_list.c:89)
==26231==    by 0x8E3AF6: _php_ibase_connect (interbase.c:946)
==26231==    by 0x8E4405: zif_ibase_connect (interbase.c:1035)
==26231==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==26231==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==26231==    by 0x109BEC8: zend_call_function (zend_execute_API.c:791)
==26231==    by 0x109A7AF: _call_user_function_ex (zend_execute_API.c:626)
==26231==    by 0xD90B9D: user_shutdown_function_call (basic_functions.c:4988)
==26231==  Block was alloc'd at
==26231==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==26231==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==26231==    by 0x105B1B2: _emalloc_32 (zend_alloc.c:2407)
==26231==    by 0x8E3F28: _php_ibase_connect (interbase.c:991)
==26231==    by 0x8E4405: zif_ibase_connect (interbase.c:1035)
==26231==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==26231==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==26231==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==26231==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==26231==    by 0xFB7DFA: php_execute_script (main.c:2469)
==26231==    by 0x133D4F8: do_cli (php_cli.c:1011)
==26231==    by 0x133EEE9: main (php_cli.c:1404)
==26231== 

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (6 days ago)

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