You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixGH-18173: ext/hash relies on implementation-defined malloc alignment
XXH3_state_t requires 64-byte alignment for its acc, customSecret, and
buffer members. php_hash_alloc_context() used ecalloc() which only
guarantees alignof(max_align_t) alignment -- typically 16 bytes on
x86_64. When heap layout broke that assumption, xxhash's aligned loads
would segfault.
Add a context_align field to php_hash_ops. When set, php_hash_alloc_context()
over-allocates and manually aligns the returned pointer, storing the
offset for php_hash_free_context() to recover the original allocation.
0 commit comments