[php-src] Issue #10248: Assertion `!(zval_get_type(&(*(property))) == 10)' failed.
| From: | Changochen | Date: | Fri, 06 Jan 2023 20:29:45 +0000 |
| Subject: | [php-src] Issue #10248: Assertion `!(zval_get_type(&(*(property))) == 10)' failed. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243360@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10248
Author: Changochen
### Description
The following code:
```php
<?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_