[php-src] PR #14432: Fix GH-14361: Deep recursion in zend_cfg.c causes segfault instead of error

From: Date: Sun, 02 Jun 2024 11:30:45 +0000
Subject: [php-src] PR #14432: Fix GH-14361: Deep recursion in zend_cfg.c causes segfault instead of error
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-26483@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/14432 Author: nielsdos Building the CFG for JIT or optimizations can run into deep recursion, and depending on the stack limit cause a segfault. This patch uses the stack limit check to fail out of those cases. This prevents a segfault. We use this check elsewhere in the compiler as well. However, in this case we just make optimizations or JIT fail without aborting the application such that code can still execute. The attached test case will succeed both without and with this patch, it is mainly intended to test if propagating failure doesn't cause crashes. To reproduce the issue, set a low stack limit using ulimit -s and run the original test case from https://github.com/php/php-src/issues/14361

« previous php.git-pulls (#26483) next »