Skip to content

Assertion `!(zval_get_type(&(*(property))) == 10)' failed. #10248

Closed
@Changochen

Description

@Changochen

Description

The following code:

<?php
class a extends ArrayIterator
{
    public ?b $nint;
}
function c($f, $d)
{
    try {
        $f->$d;
    } catch (e) {
    }
}
function g($f, $d)
{
    try {
        $f->$d = &$b;
    } catch (e) {
    }
}
$f = new a();
g($f, "nint");
c($f, "nint");

Resulted in this output:

php_asan/Zend/zend_execute.c:953: _Bool i_zend_check_property_type(const zend_property_info *, zval *, _Bool): Assertion `!(zval_get_type(&(*(property))) == 10)' failed.

Build config:

./configure --disable-all --enable-address-sanitizer --disable-phpdbg --disable-cgi --with-pic --enable-debug-assertions
make -j
./sapi/cli/php -f poc.php

PHP Version

PHP 8.3.0-dev

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions