Skip to content

SplFixedArray assertion failure with get_object_vars #17198

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
class MySplFixedArray extends SplFixedArray {
public $x;
}
class X {}
$array = new MySplFixedArray(2);
$array->{0} = new X();
try {get_object_vars($array);} catch (Exception $e) { echo($e); }

Resulted in this output:

php: /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_hash.c:1163: zval *_zend_hash_index_add_or_update_i(HashTable *, zend_ulong, zval *, uint32_t): Assertion `(flag & (1<<3)) == 0' failed.
Aborted (core dumped)

PHP Version

nightly

Operating System

ubuntu 22.04

Activity

  1. ndossche commented on Dec 17, 2024

    @ndossche
    Member

    Doesn't repro on 8.3, but it does on 8.4.

  2. ndossche commented on Dec 17, 2024

    @ndossche
    Member

    Bisected to 780a828 (property hooks)

  3. ndossche commented on Dec 17, 2024

    @ndossche
    Member
  4. self-assigned this
    on Dec 17, 2024
  5. changed the title [-]Assertion failure Zend/zend_hash.c:1163[/-] [+]SplFixedArray assertion failure with get_object_vars[/+] on Dec 17, 2024
  6. added a commit that references this issue on Dec 17, 2024
    13821a4
  7. added a commit that references this issue on Dec 17, 2024
    5f13c62
  8. added a commit that references this issue on Dec 17, 2024
    4d140f7
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