[php-src] master: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Sat, 21 Nov 2026 14:10:55 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-144004@lists.php.net to get a copy of this message
Author: David Carlier (devnexen) Date: 2026-11-21T14:09:30Z Commit: https://github.com/php/php-src/commit/668c9ee6fa3bdd8e3fa78db16ff7b014b7f0e077 Raw diff: https://github.com/php/php-src/commit/668c9ee6fa3bdd8e3fa78db16ff7b014b7f0e077.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Zend: Fix stack limit fallback on FreeBSD threads Changed paths: M Zend/zend_call_stack.h Diff: diff --git a/Zend/zend_call_stack.h b/Zend/zend_call_stack.h index f70b9edae302..82462eac4269 100644 --- a/Zend/zend_call_stack.h +++ b/Zend/zend_call_stack.h @@ -26,6 +26,9 @@ #ifdef __APPLE__ # include <pthread.h> #endif +#ifdef __FreeBSD__ +# include <pthread_np.h> +#endif #ifdef _MSC_VER #include <intrin.h> @@ -79,7 +82,14 @@ static inline size_t zend_call_stack_default_size(void) #ifdef __linux__ return 8 * 1024 * 1024; #endif -#if defined(__FreeBSD__) || defined(__NetBSD__) +#ifdef __FreeBSD__ + // libthr: THR_STACK_DEFAULT in lib/libthr/thread/thr_private.h + if (pthread_main_np() == 0) { + return sizeof(void *) / 4 * 1024 * 1024; + } + return 4 * 1024 * 1024; +#endif +#ifdef __NetBSD__ return 4 * 1024 * 1024; #endif #if defined(__DragonFly__)

« previous php.cvs (#144004) next »