Skip to content

phpdbg: Assertion failure on i funcs #15901

Closed

Description

@YuanchengJiang

Description

The following code:

i funcs

Resulted in this output:

/php-src/sapi/phpdbg/phpdbg_info.c:448: phpdbg_do_info_funcs: Assertion `(((__ht)->u.flags & (1<<2)) != 0)' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Activity

  1. cmb69 commented on Sep 16, 2024

    @cmb69
    Member

    Indeed, that happens when no userland function has been defined, in which case the following loop is invalid:

    ZEND_HASH_PACKED_FOREACH_PTR(&functions, zf) {

    That loop may be guarded with

    	if (HT_IS_PACKED(&functions)) {

    The same happens for i classes,

  2. ndossche commented on Sep 16, 2024

    @ndossche
    Member

    @cmb69 Looks right to me, feel free to make a PR.

  3. changed the title [-]Core dumped in phpdbg `i funcs`[/-] [+]phpdbg: Assertion failure on `i funcs`[/+] on Sep 16, 2024
  4. added a commit that references this issue on Sep 16, 2024
    4902687
  5. self-assigned this
    on Sep 16, 2024
  6. added 2 commits that reference this issue on Sep 18, 2024
    422aa17
    c76913f
  7. added a commit that references this issue on Sep 18, 2024
    7a8767f
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