|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-04 23:16 UTC] requinix@php.net
-Status: Open
+Status: Duplicate
[2018-01-04 23:16 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ Hello, The PHP interpreter crashes with "Segmentation fault: 11" if the __clone() function is overriden to clone the object iself creating an infinite recursive call. Test script: --------------- <?php class Crash { public function __clone() { return clone $this; } } $crash_obj = new Crash(); clone $crash_obj; Expected result: ---------------- The interpreter should suicide gracefully when hits the stack size limit. Actual result: -------------- Segmentation fault: 11