[php-src] Issue #19209: PCRE JIT allocation error when compiling PHP <= 8.0 on macOS 15 (Apple Silicon M4)

From: Date: Tue, 22 Jul 2025 06:01:51 +0000
Subject: [php-src] Issue #19209: PCRE JIT allocation error when compiling PHP <= 8.0 on macOS 15 (Apple Silicon M4)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250470@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19209 Author: adeshmrane ### Description I'm trying to compile PHP 8.0.30 (and earlier versions) on macOS 15 Sequoia, running on an Apple Silicon M4 chip. During the build process, I encountered the following fatal error related to PCRE JIT memory allocation while generating phar.phar: `Fatal error: Uncaught InvalidArgumentException: RegexIterator::__construct(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php:1133 Stack trace:` #0 /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php(1133): RegexIterator->__construct(Object(RecursiveIteratorIterator), '/\\.svn/') #1 /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php(1077): PharCommand::phar_add(Object(Phar), 0, '/Users/pc/Deskt...', NULL, '/\\.svn/', Object(SplFileInfo), NULL, true) #2 /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php(225): PharCommand->cli_cmd_run_pack(Array) #3 /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php(2089): CLICommand->__construct(19, Array) `#4 {main} thrown in /Users/pc/Desktop/nsetup/setups/src/php-8.0.30/ext/phar/phar.php on line 1133 make: *** [ext/phar/phar.phar] Error 255 ` Steps to Reproduce: 1. Download PHP 8.0.30 source from php.net 2. Run the following configuration on macOS 15 (M4): ./configure --with-iconv=shared,/Applications/AMPPS/apps && make 3. Compilation fails when building phar.phar This issue does not occur when compiling PHP 8.1 or newer on the same system. ### PHP Version ```plain PHP 8.0.30 ``` ### Operating System Macos 15

« previous php.bugs (#250470) next »