msgpack / msgpack-php

msgpack.org[PHP]
BSD 3-Clause "New" or "Revised" License
774 stars 120 forks source link

PHP 8.2 - msgpack_check_ht_is_map assertion error in ZEND_HASH_FOREACH_BUCKET #165

Closed TysonAndre closed 2 years ago

TysonAndre commented 2 years ago

!zend_array_is_list(array) can be used instead - it's internally used by https://php.net/array_is_list for PHP 8.1+

In PHP 8.2, the zend_array implementation was split into 2 implementations: (1) the original (aka MAP), (2) a separate, more memory efficient case (PACKED) for the representation of packed arrays - packed arrays only store the values, not the buckets

php: /msgpack-php/msgpack_pack.c:28: msgpack_check_ht_is_map: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.                                                                                                               
Aborted (core dumped)                                                                                                     

Termsig=6