Fix incorrect GC_NUM2ADDR usage

Both first_unused and GC_MAX_UNCOMPRESSED are addresses, so we
should compare them directly.
This commit is contained in:
Nikita Popov 2018-03-05 16:29:46 +01:00
parent 4838e9799f
commit a0563aa7bc

View file

@ -609,7 +609,7 @@ ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref)
GC_REF_SET_INFO(ref, 0);
/* Perform decopression only in case of large buffers */
if (UNEXPECTED(GC_G(first_unused) >= GC_NUM2ADDR(GC_MAX_UNCOMPRESSED))) {
if (UNEXPECTED(GC_G(first_unused) >= GC_MAX_UNCOMPRESSED)) {
gc_remove_compressed(ref, addr);
return;
}