[php-src] Issue #7749: Segfault when recursive call is made

From: Date: Sun, 12 Dec 2021 01:03:05 +0000
Subject: [php-src] Issue #7749: Segfault when recursive call is made
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238348@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7749 Comment Author: damianwadley I don't know what "execution time" and "event loop" you're talking about, but this whole reported issue is about infinite recursion. If you were confused by the magic calls that cmb69 mentioned, it is specifically about magic property access - not all magic methods, which is why your new example with __call doesn't change anything. And what PHP does with magic properties is not to "prevent recursion" but rather to take a different code path the second time you attempt to invoke a given magic property method on a given property name. Specifically, the magic behavior works the first time as usual and then _disables itself_ any additional times in the same call stack; for example, externally accessing a private property will "magically" invoke __get once, but if there's another attempt to access it in the same stack, PHP will not invoke __get again (and instead warn that the property is inaccessible). But again: that's only for properties and their related magic methods, and only because there are specific rationales for suppressing the magic behaviors.

« previous php.bugs (#238348) next »