Bug #25410 [Com]: strange crash & freeze bug when reassigning global var to method's return

From: Date: Wed, 01 Sep 2021 18:53:39 +0000
Subject: Bug #25410 [Com]: strange crash & freeze bug when reassigning global var to method's return
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236364@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=25410&edit=1 ID: 25410 Comment by: lildurk25410 at gmail dot com Reported by: xuefer at 21cn dot com Summary: strange crash & freeze bug when reassigning global var to method's return Status: Closed Type: Bug Package: Scripting Engine problem Operating System: win PHP Version: 4.3.3 Block user comment: N Private report: N New Comment: Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults aged 19 and older. We’re an exclusively online retailer and wholesaler for recreational cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe our work is meaningful and we take pride in our mandate to promote the socially responsible use of legal cannabis. https://lildurk.com/ Previous Comments: ------------------------------------------------------------------------ [2021-09-01 18:52:55] lildurk25410 at gmail dot com Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults aged 19 and older. We’re an exclusively online retailer and wholesaler for recreational cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe our work is meaningful and we take pride in our mandate to promote the socially responsible use of legal cannabis. https://lildurk.com/ ------------------------------------------------------------------------ [2003-09-07 11:11:02] sniper@php.net Fixed in PHP 5. (ZE2, won't fix in PHP 4) ------------------------------------------------------------------------ [2003-09-07 06:13:39] xuefer at 21cn dot com Description: ------------ the 1st code make apache crash, and the 2nd make apache freeze, taking full cpu usage notice that the "exit" statement is important noting will happend when "exit" is removed only class methods is affected, not function Reproduce code: --------------- crash: <?php class A { function &getInstance() { if (empty($GLOBALS['a'])) { $GLOBALS['a'] = &new A(); } return $GLOBALS['a']; } } $a = &A::getInstance(); exit; ?> freeze: <?php class A { function &getInstance() { return $GLOBALS['a']; } } $a = &A::getInstance(); exit; ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=25410&edit=1

« previous php.bugs (#236364) next »