[php-src] Issue #19983: GC Assertion Failure: Unaligned Reference Pointer in gc_collect_roots()
| From: | vi3tL0u1s | Date: | Sun, 28 Sep 2025 06:23:24 +0000 |
| Subject: | [php-src] Issue #19983: GC Assertion Failure: Unaligned Reference Pointer in gc_collect_roots() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250923@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/19983
Author: vi3tL0u1s
### Description
The following fuzzer-generated input:
https://github.com/vi3tL0u1s/poc/blob/master/php-src-assertion-gc-collect-roots
Resulted in this output:
```
php: /path/to/php-src/Zend/zend_gc.c:1712: int gc_collect_roots(uint32_t *, gc_stack *): Assertion
`((((uintptr_t)(ref)) & 0x3) == 0x0)' failed.
Aborted
```
To reproduce:
```bash
curl -s https://raw.githubusercontent.com/vi3tL0u1s/poc/master/php-src-assertion-gc-collect-roots
| ./php-src/sapi/cli/php
```
Commit:
```
ee2da6d9e9745ec83b02b1e5c5a07e8dbd5f9f98
```
Configurations:
```bash
CC="clang" CXX="clang++" CFLAGS="-fsanitize=address -g -O0"
CXXFLAGS="-fsanitize=address -g -O0" ./configure --enable-debug --enable-address-sanitizer
--disable-shared --with-pic
```
### PHP Version
```plain
PHP 8.5.0-dev (cli) (built: Sep 28 2025 16:08:25) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies
```
### Operating System
Ubuntu 22.04