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($q, 1, 'test table not created with isql'); 12: var_dump(ibase_fetch_assoc($r)); 13: ibase_free_result($r); 14: 15: $r = ibase_execute($q, 1, 'test table not created with isql', 1); 16: var_dump(ibase_fetch_assoc($r)); 17: ibase_free_result($r); 18: 19: $r = ibase_execute($q, 1); 20: var_dump(ibase_fetch_assoc($r)); 21: 22: ?> 23:
Report
==15810== Invalid read of size 4
==15810== at 0x6149A82: ??? (in /usr/lib64/libfbclient.so.2.5.7)
==15810== by 0x613B759: isc_database_info (in /usr/lib64/libfbclient.so.2.5.7)
==15810== by 0x91155C: _php_ibase_free_stmt_handle (ibase_query.c:127)
==15810== by 0x9117B7: _php_ibase_free_query (ibase_query.c:169)
==15810== by 0x9118E0: php_ibase_free_query_rsrc (ibase_query.c:189)
==15810== by 0x1179F36: zend_resource_dtor (zend_list.c:76)
==15810== by 0x117A95D: zend_close_rsrc (zend_list.c:230)
==15810== by 0x116F80F: zend_hash_reverse_apply (zend_hash.c:1700)
==15810== by 0x117A9A9: zend_close_rsrc_list (zend_list.c:238)
==15810== by 0x110215A: shutdown_executor (zend_execute_API.c:262)
==15810== by 0x1137FC8: zend_deactivate (zend.c:1106)
==15810== by 0x10266CA: php_request_shutdown (main.c:1765)
==15810== Address 0x14ee9560 is 0 bytes inside a block of size 32 free'd
==15810== at 0x4C28BD4: free (vg_replace_malloc.c:529)
==15810== by 0x10C8A2E: _efree (zend_alloc.c:2494)
==15810== by 0x90D8F3: _php_ibase_close_link (interbase.c:643)
==15810== by 0x1179F36: zend_resource_dtor (zend_list.c:76)
==15810== by 0x117A019: zend_list_close (zend_list.c:89)
==15810== by 0x90EF5F: _php_ibase_connect (interbase.c:946)
==15810== by 0x90F926: zif_ibase_connect (interbase.c:1035)
==15810== by 0x135A545: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==15810== by 0x135A545: execute_ex (zend_vm_execute.h:54803)
==15810== by 0x1106547: zend_call_function (zend_execute_API.c:792)
==15810== by 0x1104EB9: _call_user_function_ex (zend_execute_API.c:628)
==15810== by 0xDE1EE8: user_shutdown_function_call (basic_functions.c:5051)
==15810== by 0x116E2EE: zend_hash_apply (zend_hash.c:1617)
==15810== Block was alloc'd at
==15810== at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==15810== by 0x10CC64D: __zend_malloc (zend_alloc.c:2886)
==15810== by 0x10C37C8: _emalloc_32 (zend_alloc.c:2407)
==15810== by 0x90F36A: _php_ibase_connect (interbase.c:991)
==15810== by 0x90F926: zif_ibase_connect (interbase.c:1035)
==15810== by 0x135A545: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==15810== by 0x135A545: execute_ex (zend_vm_execute.h:54803)
==15810== by 0x1381EB3: zend_execute (zend_vm_execute.h:59987)
==15810== by 0x1139F02: zend_execute_scripts (zend.c:1566)
==15810== by 0x1028AD1: php_execute_script (main.c:2467)
==15810== by 0x1387A92: do_cli (php_cli.c:1011)
==15810== by 0x1389550: main (php_cli.c:1404)
==15810==
Generated at Thu, 19 Apr 2018 02:25:01 +0000 (4 days ago)
|