|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-22 05:56 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 14:00:01 2025 UTC |
The following code segfaults. class Class2 extends Class1 { } class Class1 { function Class2(){ return new Class2; } } Class1::Class2(); I don't actually know if it's valid PHP code or not, but I don't think it should segfault either way. Conditions: It only happens if Class2 extends Class1. It only happens if Class2 does not have a constructor. Confirmed with 4.2.2 and 4.3.0RC1 on Slackware 8.1, 2.4.19 and 4.2.3 on FreeBSD 4.4-RELEASE. Configure line: './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs' I've never done a backtrace before, and I'm not sure I did it right, but hopefully this is of some use to someone... :) (gdb) run Starting program: /usr/local/bin/php index.html Program received signal SIGSEGV, Segmentation fault. 0x0812cda5 in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1002 1002 EX(fbc) = NULL; (gdb) bt #0 0x0812cda5 in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1002 #1 0x081322ea in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1639 #2 0x081322ea in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1639 #3 0x081322ea in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1639 #4 0x081322ea in execute (op_array=0x81b6c34) at /usr/src/php-4.3.0RC1/Zend/zend_execute.c:1639