Bug #64280 [Com]: __destruct loop segfaults

From: Date: Mon, 27 Nov 2017 06:51:57 +0000
Subject: Bug #64280 [Com]: __destruct loop segfaults
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212737@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64280&edit=1

 ID:                 64280
 Comment by:         valentiny510 at gmail dot com
 Reported by:        bobwei9 at hotmail dot com
 Summary:            __destruct loop segfaults
 Status:             Open
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Mac OS X Mountain Lion
 PHP Version:        master-Git-2013-02-22 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

Related to this... the same happens when you call self::__construct inside __construct. Test code:

class V {
   function __construct( ) {
      self::__construct( );
   }
}
new V;


Previous Comments:
------------------------------------------------------------------------
[2017-08-11 20:58:44] nikic@php.net

Related To: Bug #75033

------------------------------------------------------------------------
[2016-03-26 23:31:57] nikic@php.net

Related To: Bug #46156

------------------------------------------------------------------------
[2013-02-24 10:18:14] bobwei9 at hotmail dot com

Exactly. But it is a) hard to find out what's going wrong (like a function produces an error
which is also called accidentally in the error handler. How to find out the error without analyzing
the globals of the core dump?) and b) more user friendly for debugging as you cannot suppose an user
knows how to use gdb. I don't see any disadvantages here...

------------------------------------------------------------------------
[2013-02-24 04:49:54] laruence@php.net

I doubt whether this is necessary, it's a narrow wrong usage after all.

------------------------------------------------------------------------
[2013-02-23 12:00:11] bobwei9 at hotmail dot com

I'd consider creating a int implicit_function_call_count to the EG and incrementing it in
zend_call_function (in zend_execute_API.h) (before the next call to f.ex. zend_execute) and then
decrement? And check then there for a limit and abort it necessary with an E_ERROR? Should not be
loads of code?

xdebug? Does everything have to be external to the core?

------------------------------------------------------------------------


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=64280


--
Edit this bug report at https://bugs.php.net/bug.php?id=64280&edit=1


Thread (6 messages)

« previous php.bugs (#212737) next »