Skip to content

Assertion failure in Zend AST parser during malformed constant definition with typed property (zend_ast_get_list) #20113

Description

@vi3tL0u1s

Description

The following code:

<?php
class X {
    public int $foo = 3;
}
const C_USER_OBJECT = new X(...);
?>

Resulted in this output:

php: Zend/zend_ast.h:363: zend_ast_list *zend_ast_get_list(zend_ast *): Assertion `zend_ast_is_list(ast)' failed.
Aborted (core dumped)

Commit

baa5319632b7fd2f4c424f25cda18a8bbf5eb64d

Build Configuration:

CC="clang" CXX="clang++" CFLAGS="-fsanitize=address -g -O0" CXXFLAGS="-fsanitize=address -g -O0" ./configure --enable-debug --enable-address-sanitizer --disable-shared --with-pic

PHP Version

PHP 8.6.0-dev (cli) (built: Oct  9 2025 14:54:39) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.6.0-dev, Copyright (c), by Zend Technologies

Operating System

Ubuntu 22.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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