Skip to content

Reference invariant broken in mb_convert_variables() #16261

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
class Test {
public string $x;
}
$test = new Test;
$ref = "";
$test->x =& $ref;
$fusion = $test;
$b = array(&$fusion);
$c = &$b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);

Resulted in this output:

/php-src/Zend/zend_variables.c:73: void zend_reference_destroy(zend_reference *): Assertion `!((ref)->sources.ptr != ((void*)0))' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions