2026-10-24 21:19 UTC
#php2shell is based on PHP using longjmp(3) to bail out of OOM conditions. They fixed that by actually properly unwinding the call stack under those conditions -- that's the "replace bailout with UnwindExit" part in the massive diff that touches 389 files here:
https://github.com/php/php-src/commit/01a40e89fb
Cool. But.
There are still dozens of other places where PHP longjmp(3)'s, and frankly, I don't think that can possibly be a safe error handling approach in a long-lived, server-side process.
Replies (2)
-
@kboyd@phpc.social 2026-10-24 21:20
@jschauma@mstdn.social "long-lived"?
-
@peterhoneyman@a2mi.social 2026-10-25 13:06
@jschauma@mstdn.social I remember when I first encountered longjmp (in the 70s!) and thought “wow how extremely nifty” and also “this seems dangerous!”