Skip to content

Assertion failure in Zend/zend_API.c:501 #16405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YuanchengJiang opened this issue Oct 13, 2024 · 3 comments
Closed

Assertion failure in Zend/zend_API.c:501 #16405

YuanchengJiang opened this issue Oct 13, 2024 · 3 comments

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
$b = gmp_init(17);
var_dump($fusion << $b);

Resulted in this output:

/php-src/Zend/zend_API.c:501: _Bool zend_null_arg_deprecated(const char *, uint32_t): Assertion `func->common.fn_flags & (1 << 14)' failed.
Aborted (core dumped)

Related: #16354

PHP Version

nightly

Operating System

ubuntu 22.04

@devnexen
Copy link
Member

It is kind of the same issue only this time, it expects it to be a variable length args function. @cmb69 did I got it right ?

@cmb69
Copy link
Member

cmb69 commented Oct 13, 2024

@devnexen, the problem is again that operator overloading is used, but not a function. The implementation of zend_parse_arg_long_slow() calls zend_null_arg_deprecated() for NULL arguments, and that function always expects to be called from a PHP function. PR #16015 would solve this by rejecting NULL values for operator overloading.

@php php deleted a comment from Starfishht Oct 22, 2024
@nielsdos
Copy link
Member

nielsdos commented Nov 2, 2024

This was fixed by #16015

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

No branches or pull requests

4 participants