Edit report at https://bugs.php.net/bug.php?id=60104&edit=1
ID: 60104 Updated by: dmi...@php.net Reported by: patrickalla...@php.net Summary: Segmentation Fault in pdo_sqlite when using sqliteCreateFunction() -Status: Assigned +Status: Closed Type: Bug Package: Reproducible crash Operating System: Gentoo Linux PHP Version: trunk-SVN-2011-10-20 (SVN) Assigned To: dmitry Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-11-08 10:11:18] dmi...@php.net Automatic comment from SVN on behalf of dmitry Revision: http://svn.php.net/viewvc/?view=revision&revision=318907 Log: Fixed bug #60104 (Segmentation Fault in pdo_sqlite when using sqliteCreateFunction()) ------------------------------------------------------------------------ [2011-11-08 10:00:10] patrickalla...@php.net If 2) is implemented right now, could 1) be made for a minor version of 5.4 without breaking the ABI? ------------------------------------------------------------------------ [2011-11-08 07:19:25] dmi...@php.net I would say that the problem in "magic" PDO extension design. It creates and destroys method tables at runtime. See pdo_hash_methods() at pdo_dbh.c. As result ZE can't cache bindings of for such methods. The problem may be solved in few ways. 1) Fix PDO 2) Introduce additional fn_flag that disables method caching 3) Disable method caching for classes with custom get_method handler I think (2) is the simplest solution that won't make performance degradation. PDO fix would make it faster and reduce memory usage, but it's much more serious task. I just don't have time to do it myself. ------------------------------------------------------------------------ [2011-11-04 19:51:45] tony2...@php.net Dmitry, could you take a look at it? Looks like something is wrong with that caching thingie in the executor.. (gdb) f 0 #0 ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER (execute_data=0x7ffff7f9d1c0) at /local/qa/5_4_valgrind/Zend/zend_vm_execute.h:28949 28949 if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { (gdb) p *execute_data.fbc $10 = {type = 90 'Z', common = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a}, op_array = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a, refcount = 0x5a5a5a5a5a5a5a5a, opcodes = 0x5a5a5a5a5a5a5a5a, last = 1515870810, vars = 0x5a5a5a5a5a5a5a5a, last_var = 1515870810, T = 1515870810, brk_cont_array = 0x5a5a5a5a5a5a5a5a, last_brk_cont = 1515870810, try_catch_array = 0x5a5a5a5a5a5a5a5a, last_try_catch = 1515870810, static_variables = 0x5a5a5a5a5a5a5a5a, this_var = 1515870810, filename = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, line_start = 1515870810, line_end = 1515870810, doc_comment = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, doc_comment_len = 1515870810, early_binding = 1515870810, literals = 0x5a5a5a5a5a5a5a5a, last_literal = 1515870810, run_time_cache = 0x5a5a5a5a5a5a5a5a, last_cache_slot = 1515870810, reserved = {0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a}}, internal_function = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a, handler = 0x5a5a5a5a5a5a5a5a, module = 0x5a5a5a5a5a5a5a5a}} ------------------------------------------------------------------------ [2011-11-04 19:13:31] patrickalla...@php.net Automatic comment from SVN on behalf of patrickallaert Revision: http://svn.php.net/viewvc/?view=revision&revision=318784 Log: Added test for #60104 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60104 -- Edit this bug report at https://bugs.php.net/bug.php?id=60104&edit=1