Skip to content

Assertion failure Zend/zend_string.h #17410

@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$regex = '
(?<types>
(?:
(?:\{ (?&types) \})
| (a)
)
)
';
$res2 = preg_match('{^' . $regex . '$}xx', '{a}', $matches2, PREG_OFFSET_CAPTURE);
define('PREG_CACHE_SIZE', 4096+1);
for ($i=0; $i < PREG_CACHE_SIZE; ++$i) {
$re .= '.';
if (!preg_match("/$re/", $str)) {
}
}

Resulted in this output:

php: Zend/zend_string.h:361: void zend_string_release_ex(zend_string *, _Bool): Assertion `!(zval_gc_flags((s)->gc.u.type_info) & (1<<7))' failed.
Aborted (core dumped)

need waiting a bit till the loop end.

PHP Version

nightly

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions