| 1 | Patch-Source: https://github.com/igbinary/igbinary/pull/417
|
| 2 | From 65d529ae14e4bf28c70497f94dfdb40c78835c42 Mon Sep 17 00:00:00 2001
|
| 3 | From: Paavo-Einari Kaipila <[email protected]>
|
| 4 | Date: Wed, 3 Jun 2026 05:33:31 +0300
|
| 5 | Subject: [PATCH] replace zval_dtor with zval_ptr_dtor_nogc
|
| 6 |
|
| 7 | Fixes build with PHP 8.6 at least currently
|
| 8 | https://github.com/php/php-src/commit/df8ce6ddbd713d7e9163dd60d19648e2e4a8bb80
|
| 9 | ---
|
| 10 | src/php7/igbinary.c | 14 +++++++-------
|
| 11 | 1 file changed, 7 insertions(+), 7 deletions(-)
|
| 12 |
|
| 13 | diff --git a/src/php7/igbinary.c b/src/php7/igbinary.c
|
| 14 | index 17eee3ca..b0a14185 100644
|
| 15 | |
| 16 | |
| 17 | @@ -2601,7 +2601,7 @@ zend_always_inline static int igbinary_unserialize_array(struct igbinary_unseria
|
| 18 | if (IGB_NEEDS_MORE_DATA(igsd, 1)) {
|
| 19 | zend_error(E_WARNING, "igbinary_unserialize_array: end-of-data");
|
| 20 | cleanup:
|
| 21 | - zval_dtor(z);
|
| 22 | + zval_ptr_dtor_nogc(z);
|
| 23 | ZVAL_NULL(z);
|
| 24 | return 1;
|
| 25 | }
|
| 26 | @@ -2759,7 +2759,7 @@ inline static int igbinary_unserialize_object_properties(struct igbinary_unseria
|
| 27 |
|
| 28 | if (IGB_NEEDS_MORE_DATA(igsd, 1)) {
|
| 29 | zend_error(E_WARNING, "igbinary_unserialize_object_properties: end-of-data");
|
| 30 | - zval_dtor(z);
|
| 31 | + zval_ptr_dtor_nogc(z);
|
| 32 | ZVAL_NULL(z);
|
| 33 | return 1;
|
| 34 | }
|
| 35 | @@ -2778,13 +2778,13 @@ inline static int igbinary_unserialize_object_properties(struct igbinary_unseria
|
| 36 | {
|
| 37 | zend_long key_index = 0;
|
| 38 | if (UNEXPECTED(igbinary_unserialize_long(igsd, key_type, &key_index))) {
|
| 39 | - zval_dtor(z);
|
| 40 | + zval_ptr_dtor_nogc(z);
|
| 41 | ZVAL_UNDEF(z);
|
| 42 | return 1;
|
| 43 | }
|
| 44 | key_str = zend_long_to_str(key_index);
|
| 45 | if (UNEXPECTED(key_str == NULL)) {
|
| 46 | - zval_dtor(z);
|
| 47 | + zval_ptr_dtor_nogc(z);
|
| 48 | ZVAL_UNDEF(z);
|
| 49 | return 1;
|
| 50 | }
|
| 51 | @@ -2795,7 +2795,7 @@ inline static int igbinary_unserialize_object_properties(struct igbinary_unseria
|
| 52 | case igbinary_type_string_id32:
|
| 53 | key_str = igbinary_unserialize_string(igsd, key_type);
|
| 54 | if (UNEXPECTED(key_str == NULL)) {
|
| 55 | - zval_dtor(z);
|
| 56 | + zval_ptr_dtor_nogc(z);
|
| 57 | ZVAL_UNDEF(z);
|
| 58 | return 1;
|
| 59 | }
|
| 60 | @@ -2806,7 +2806,7 @@ inline static int igbinary_unserialize_object_properties(struct igbinary_unseria
|
| 61 | case igbinary_type_string64:
|
| 62 | key_str = igbinary_unserialize_chararray(igsd, key_type, 1);
|
| 63 | if (UNEXPECTED(key_str == NULL)) {
|
| 64 | - zval_dtor(z);
|
| 65 | + zval_ptr_dtor_nogc(z);
|
| 66 | ZVAL_UNDEF(z);
|
| 67 | return 1;
|
| 68 | }
|
| 69 | @@ -2818,7 +2818,7 @@ inline static int igbinary_unserialize_object_properties(struct igbinary_unseria
|
| 70 | continue; /* Skip unserializing this element, serialized with no value. In C, this applies to loop, not switch. */
|
| 71 | default:
|
| 72 | zend_error(E_WARNING, "igbinary_unserialize_object_properties: unknown key type '%02x', position %zu", key_type, (size_t)IGB_BUFFER_OFFSET(igsd));
|
| 73 | - zval_dtor(z);
|
| 74 | + zval_ptr_dtor_nogc(z);
|
| 75 | ZVAL_UNDEF(z);
|
| 76 | return 1;
|
| 77 | }
|