Bug #81062 [Com]: Infinite recursion causes a segmentation fault
| From: | wyrihaximus@php.net | Date: | Thu, 20 May 2021 22:00:53 +0000 |
| Subject: | Bug #81062 [Com]: Infinite recursion causes a segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233937@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81062&edit=1
ID: 81062
Comment by: wyrihaximus@php.net
Reported by: me at matthewturland dot com
Summary: Infinite recursion causes a segmentation fault
Status: Not a bug
Type: Bug
Package: Reproducible crash
Operating System: Fedora 33
PHP Version: 8.0.6
Block user comment: N
Private report: N
New Comment:
Any code that can make PHP segfault is a bug, especially when no special extensions are at play.
This specific bug has been in PHP for years, at least early PHP 7 maybe even late PHP 5, it's
been a while. And PHP will report the runtime/memory limit error if you give it a bit more memory.
Which makes me think it's about to do that but then runs out of memory and segfaults as a
result. (Guessing a bit here tbh.)
Previous Comments:
------------------------------------------------------------------------
[2021-05-20 21:26:42] requinix@php.net
PHP will give you memory and/or execution time warnings *if they happen*. If you manage to smash the
stack before they happen then you won't get any warnings.
------------------------------------------------------------------------
[2021-05-20 20:41:47] me at matthewturland dot com
Description:
------------
See the referenced test script URL, which includes an explanation and a reproduceable test case.
Test script:
---------------
See https://github.com/elazar/php-segfault.
Expected result:
----------------
PHP should either block or emit an error indicating that memory_limit or max_execution_time was
exceeded or something of that nature.
Actual result:
--------------
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81062&edit=1