[php-src] Issue #23106: zend_memnstr: Assertion `end >= p' failed.
[email protected] (lmaltsis)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <x96kzLh95pcDWDSsqRnyqqZr0EjBi9ilYP09E6fd0iE@main.internal.php.net> |
Issue: https://github.com/php/php-src/issues/23106
Author: lmaltsis
### Description
The following code:
```php
<?
mb_strpos("AA\xf0\x90", "xyz", 3);
```
Resulted in this output:
```
php: src/Zend/zend_operators.h:197: zend_memnstr: Assertion `end >= p' failed.
Aborted (core dumped)
```
### PHP Version
```plain
PHP 8.5.9 (cli) (built: Aug 7 2026 18:15:17) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.5.9, Copyright (c) Zend Technologies
with Zend OPcache v8.5.9, Copyright (c), by Zend Technologies
also triggers on trunk
```
### Operating System
Ubuntu 24.04