Skip to content

Assertion failure in Zend/zend_execute_API.c:1022 #16515

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
class Foo {
public function &__call($method, $args) {
}
}
$foo = new Foo;
$bar = $foo->bar(...);
$fusion = $bar;
$fiber = new Fiber($fusion);
$fiber->start();

Resulted in this output:

/php-src/Zend/zend_execute_API.c:1022: zend_result zend_call_function(zend_fcall_info *, zend_fcall_info_cache *): Assertion `(call->func->common.fn_flags & (1 << 12)) ? (zval_get_type(&(*(fci->retval))) == 10) : !(zval_get_type(&(*(fci->retval))) == 10)' failed.
Aborted (core dumped)

PHP Version

nightly

Operating System

ubuntu 22.04

Activity

  1. cmb69 commented on Oct 20, 2024

    @cmb69
    Member

    This doesn't look fiber specific, but is rather a general issue with functions called via zend_call_function(). We may want to skip these assertions for userland functions (I think they only have been introduced to catch errenous behavior of internal functions).

  2. cmb69 commented on Oct 20, 2024

    @cmb69
    Member

    Oh, no, the closure is an internal function. (albeit one with a seriously messed up function_name)

  3. self-assigned this
    on Oct 21, 2024
  4. added 2 commits that reference this issue on Oct 21, 2024
    1b88afe
    8720063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions