[php-src] Issue #21720: Segmentation fault (EXC_BAD_ACCESS) when running make test on PHP 8.6-dev (macOS ARM64)

[email protected] (arshidkv12)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/21720
Author: arshidkv12

### Description

```bash 
make test TESTS="tests/basic/001.phpt"                


Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /Users/arshid/Downloads/php-src/sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src/tmp-php.ini
More .INIs  :
---------------------------------------------------------------------
PHP         : /Users/arshid/Downloads/php-src/sapi/cgi/php-cgi
PHP_SAPI    : cgi-fcgi
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src/tmp-php.ini
More .INIs  :
---------------------------------------------------------------------
---------------------------------------------------------------------
PHP         : /Users/arshid/Downloads/php-src/sapi/phpdbg/phpdbg
PHP_SAPI    : phpdbg
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src/tmp-php.ini
More .INIs  :
---------------------------------------------------------------------
CWD         : /Users/arshid/Downloads/php-src
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
/bin/sh: line 1: 25648 Segmentation fault: 11  TEST_PHP_EXECUTABLE=/Users/arshid/Downloads/php-src/sapi/cli/php TEST_PHP_SRCDIR=/Users/arshid/Downloads/php-src CC="cc" /Users/arshid/Downloads/php-src/sapi/cli/php -n -c /Users/arshid/Downloads/php-src/tmp-php.ini -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' /Users/arshid/Downloads/php-src/run-tests.php -n -c /Users/arshid/Downloads/php-src/tmp-php.ini -d extension_dir=/Users/arshid/Downloads/php-src/modules/ ` if test "x" != "x"; then for i in ""; do . $i; if test "x$dlname" != "xdl_test.so"; then /Users/arshid/Downloads/php-src/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; if test "x" != "x"; then for i in ""; do . $i; /Users/arshid/Downloads/php-src/build/shtool echo -n -- " -d zend_extension=/Users/arshid/Downloads/php-src/modules/$dlname"; done; fi` tests/basic/001.phpt
make: *** [test] Error 139 
```

```bash
sudo lldb -b -o "run" -o "frame select 0" -o "source list" -o "quit" -- ./sapi/cli/php run-tests.php tests/basic/001.phpt
Password:
(lldb) target create "./sapi/cli/php"
Current executable set to '/Users/arshid/Downloads/php-src/sapi/cli/php' (arm64).
(lldb) settings set -- target.run-args  "run-tests.php" "tests/basic/001.phpt"
(lldb) run

=====================================================================
PHP         : /Users/arshid/Downloads/php-src/sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src
More .INIs  :
---------------------------------------------------------------------
PHP         : /Users/arshid/Downloads/php-src/sapi/cgi/php-cgi
PHP_SAPI    : cgi-fcgi
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src
More .INIs  :
---------------------------------------------------------------------
---------------------------------------------------------------------
PHP         : /Users/arshid/Downloads/php-src/sapi/phpdbg/phpdbg
PHP_SAPI    : phpdbg
PHP_VERSION : 8.6.0-dev
ZEND_VERSION: 4.6.0-dev
PHP_OS      : Darwin - Darwin Arshids-MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:41 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8132 arm64
INI actual  : /Users/arshid/Downloads/php-src
More .INIs  :
---------------------------------------------------------------------
CWD         : /Users/arshid/Downloads/php-src
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
Process 25731 launched: '/Users/arshid/Downloads/php-src/sapi/cli/php' (arm64)
Process 25731 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
```


```bash
Target 0: (php) stopped.
(lldb) frame select 0
frame #0: 0x0000000000000000
error: memory read failed for 0x0
(lldb) list
   1299                 }
   1300
   1301                 descriptors[ndesc].index = (int)nindex;
   1302
   1303                 ZVAL_DEREF(descitem);
   1304                 if (Z_TYPE_P(descitem) == IS_RESOURCE) {
   1305                         if (set_proc_descriptor_from_resource(descitem, &descriptors[ndesc], ndesc) == FAILURE) {
(lldb) 
   1306                                 goto exit_fail;
   1307                         }
```


### PHP Version

```plain
PHP 8.6.0-dev (cli) (built: Apr 11 2026 08:56:25) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.6.0-dev, Copyright (c), by Zend Technologies
```

### Operating System

Mac OS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.