ID: 48680 User updated by: ms419 at freezone dot co dot uk Reported By: ms419 at freezone dot co dot uk -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Debian PHP Version: 5.3CVS-2009-06-24 (snap) New Comment:
Thanks for your help rasmus and johannes, I thought it was going to be very difficult to isolate this bug in a sample script, but with the help of dump_bt, it was not so hard. Thanks for that advice! Here's a sample script which exposes the bug I think I'm experiencing in our project. It works in 5.2 but segfaults in 5.3. <?php class A { public function x() { } } class B extends A { public function x() { $args = func_get_args(); return call_user_func_array(array($this, 'parent::x'), $args); } } class C extends B { } $c = new C; $c->x(); Previous Comments: ------------------------------------------------------------------------ [2009-06-25 11:43:08] johan...@php.net I tried to reproduce it, fetched the tree, configured the database, the application didn't properly run but didn'T segfault. Running fro mthe command line as in your backtrace gave me some HTML output. So please try to make the scrit shorter so we have a chance to understand it. A good starting point might be a PHP-level backtrace to generate this we have a .gdbinit file with a dump_bt macro. source /path/to/php-src/.gdbinit help dump_bt Should get oyu started there. Thanks! ------------------------------------------------------------------------ [2009-06-24 21:22:07] ras...@php.net Any chance you could extract a simple reproducing case from that code? It is obviously related to the call_user_func_array() call there, so if you could figure out the exact arguments to the call and create a simple test case that causes the crash it would speed this up. ------------------------------------------------------------------------ [2009-06-24 21:20:36] paj...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2009-06-24 21:16:03] ms419 at freezone dot co dot uk Description: ------------ http://www.sfu.ca/~jdbates/tmp/php/200906240/core The project I contribute to works with PHP 5.2, but causes PHP 5.3 to segfault, http://qubit-toolkit.org/wiki/index.php?title=Main_Page The project source is available from Subversion, http://qubit-toolkit.googlecode.com/svn/trunk/ I downloaded and built the latest 5.3 snapshot, $ ./configure --enable-debug --with-pdo-mysql [...] $ make [...] I got a backtrace with gdb, http://www.sfu.ca/~jdbates/tmp/php/200906240/screenlog ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48680&edit=1