From 284f61ee227878a9641c6d215c9a10c4ab90b51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 14 Dec 2022 17:43:43 +0100 Subject: [PATCH 001/895] [ci skip] Fix typo in `unserialize()` function name in NEWS see dd8de1e726a41fdbca6cbd4348ae63a74830a888 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 03fa5acc2a4eb..70d117fde579d 100644 --- a/NEWS +++ b/NEWS @@ -72,7 +72,7 @@ PHP NEWS . Added socket_atmark if send/recv needs using MSG_OOB. (David Carlier) - Standard: - . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. (timwolla) + . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. From f9a1a903805a0c260c97bcc8bf2c14f2dd76ca76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 14 Dec 2022 17:48:47 +0100 Subject: [PATCH 002/895] Add Randomizer::nextFloat() and Randomizer::getFloat() (#9679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * random: Add Randomizer::nextFloat() * random: Check that doubles are IEEE-754 in Randomizer::nextFloat() * random: Add Randomizer::nextFloat() tests * random: Add Randomizer::getFloat() implementing the y-section algorithm The algorithm is published in: Drawing Random Floating-Point Numbers from an Interval. Frédéric Goualard, ACM Trans. Model. Comput. Simul., 32:3, 2022. https://doi.org/10.1145/3503512 * random: Implement getFloat_gamma() optimization see https://github.com/php/php-src/pull/9679/files#r994668327 * random: Add Random\IntervalBoundary * random: Split the implementation of γ-section into its own file * random: Add tests for Randomizer::getFloat() * random: Fix γ-section for 32-bit systems * random: Replace check for __STDC_IEC_559__ by compile-time check for DBL_MANT_DIG * random: Drop nextFloat_spacing.phpt * random: Optimize Randomizer::getFloat() implementation * random: Reject non-finite parameters in Randomizer::getFloat() * random: Add NEWS/UPGRADING for Randomizer’s float functionality --- NEWS | 1 + UPGRADING | 2 + ext/random/config.m4 | 1 + ext/random/config.w32 | 2 +- ext/random/gammasection.c | 115 +++++++++++++++++ ext/random/php_random.h | 10 ++ ext/random/random.c | 14 ++- ext/random/random.stub.php | 11 ++ ext/random/random_arginfo.h | 34 ++++- ext/random/randomizer.c | 109 ++++++++++++++++ .../tests/03_randomizer/methods/getFloat.phpt | 50 ++++++++ .../03_randomizer/methods/getFloat_error.phpt | 119 ++++++++++++++++++ .../03_randomizer/methods/nextFloat.phpt | 49 ++++++++ 13 files changed, 511 insertions(+), 6 deletions(-) create mode 100644 ext/random/gammasection.c create mode 100644 ext/random/tests/03_randomizer/methods/getFloat.phpt create mode 100644 ext/random/tests/03_randomizer/methods/getFloat_error.phpt create mode 100644 ext/random/tests/03_randomizer/methods/nextFloat.phpt diff --git a/NEWS b/NEWS index 70d117fde579d..b40460bd30f9a 100644 --- a/NEWS +++ b/NEWS @@ -60,6 +60,7 @@ PHP NEWS - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) + . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. (timwolla) - Reflection: . Fix GH-9470 (ReflectionMethod constructor should not find private parent diff --git a/UPGRADING b/UPGRADING index fb40184c7d54d..7a6fdac636bb1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -66,6 +66,8 @@ PHP 8.3 UPGRADE NOTES - Random: . Added Randomizer::getBytesFromString(). RFC: https://wiki.php.net/rfc/randomizer_additions + . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. + RFC: https://wiki.php.net/rfc/randomizer_additions - Sockets: . Added socket_atmark to checks if the socket is OOB marked. diff --git a/ext/random/config.m4 b/ext/random/config.m4 index a8e6d5a568991..8ed67b9fddaca 100644 --- a/ext/random/config.m4 +++ b/ext/random/config.m4 @@ -25,6 +25,7 @@ PHP_NEW_EXTENSION(random, engine_xoshiro256starstar.c \ engine_secure.c \ engine_user.c \ + gammasection.c \ randomizer.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_INSTALL_HEADERS([ext/random], [php_random.h]) diff --git a/ext/random/config.w32 b/ext/random/config.w32 index bfbd153c1680d..e66e094039d19 100644 --- a/ext/random/config.w32 +++ b/ext/random/config.w32 @@ -1,4 +1,4 @@ EXTENSION("random", "random.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); PHP_RANDOM="yes"; -ADD_SOURCES(configure_module_dirname, "engine_combinedlcg.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_xoshiro256starstar.c engine_secure.c engine_user.c randomizer.c", "random"); +ADD_SOURCES(configure_module_dirname, "engine_combinedlcg.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_xoshiro256starstar.c engine_secure.c engine_user.c gammasection.c randomizer.c", "random"); PHP_INSTALL_HEADERS("ext/random", "php_random.h"); diff --git a/ext/random/gammasection.c b/ext/random/gammasection.c new file mode 100644 index 0000000000000..fb0c2cd3bf94d --- /dev/null +++ b/ext/random/gammasection.c @@ -0,0 +1,115 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | https://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Tim Düsterhus | + | | + | Based on code from: Frédéric Goualard | + +----------------------------------------------------------------------+ +*/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "php.h" +#include "php_random.h" +#include + +/* This file implements the γ-section algorithm as published in: + * + * Drawing Random Floating-Point Numbers from an Interval. Frédéric + * Goualard, ACM Trans. Model. Comput. Simul., 32:3, 2022. + * https://doi.org/10.1145/3503512 + */ + +static double gamma_low(double x) +{ + return x - nextafter(x, -DBL_MAX); +} + +static double gamma_high(double x) +{ + return nextafter(x, DBL_MAX) - x; +} + +static double gamma_max(double x, double y) +{ + return (fabs(x) > fabs(y)) ? gamma_high(x) : gamma_low(y); +} + +static uint64_t ceilint(double a, double b, double g) +{ + double s = b / g - a / g; + double e; + + if (fabs(a) <= fabs(b)) { + e = -a / g - (s - b / g); + } else { + e = b / g - (s + a / g); + } + + double si = ceil(s); + + return (s != si) ? (uint64_t)si : (uint64_t)si + (e > 0); +} + +PHPAPI double php_random_gammasection_closed_open(const php_random_algo *algo, php_random_status *status, double min, double max) +{ + double g = gamma_max(min, max); + uint64_t hi = ceilint(min, max, g); + uint64_t k = 1 + php_random_range64(algo, status, hi - 1); /* [1, hi] */ + + if (fabs(min) <= fabs(max)) { + return k == hi ? min : max - k * g; + } else { + return min + (k - 1) * g; + } +} + +PHPAPI double php_random_gammasection_closed_closed(const php_random_algo *algo, php_random_status *status, double min, double max) +{ + double g = gamma_max(min, max); + uint64_t hi = ceilint(min, max, g); + uint64_t k = php_random_range64(algo, status, hi); /* [0, hi] */ + + if (fabs(min) <= fabs(max)) { + return k == hi ? min : max - k * g; + } else { + return k == hi ? max : min + k * g; + } +} + +PHPAPI double php_random_gammasection_open_closed(const php_random_algo *algo, php_random_status *status, double min, double max) +{ + double g = gamma_max(min, max); + uint64_t hi = ceilint(min, max, g); + uint64_t k = php_random_range64(algo, status, hi - 1); /* [0, hi - 1] */ + + if (fabs(min) <= fabs(max)) { + return max - k * g; + } else { + return k == (hi - 1) ? max : min + (k + 1) * g; + } +} + +PHPAPI double php_random_gammasection_open_open(const php_random_algo *algo, php_random_status *status, double min, double max) +{ + double g = gamma_max(min, max); + uint64_t hi = ceilint(min, max, g); + uint64_t k = 1 + php_random_range64(algo, status, hi - 2); /* [1, hi - 1] */ + + if (fabs(min) <= fabs(max)) { + return max - k * g; + } else { + return min + k * g; + } +} diff --git a/ext/random/php_random.h b/ext/random/php_random.h index a4665b5d10aca..52a6b787edde5 100644 --- a/ext/random/php_random.h +++ b/ext/random/php_random.h @@ -270,8 +270,11 @@ extern PHPAPI zend_class_entry *random_ce_Random_Engine_PcgOneseq128XslRr64; extern PHPAPI zend_class_entry *random_ce_Random_Engine_Mt19937; extern PHPAPI zend_class_entry *random_ce_Random_Engine_Xoshiro256StarStar; extern PHPAPI zend_class_entry *random_ce_Random_Engine_Secure; + extern PHPAPI zend_class_entry *random_ce_Random_Randomizer; +extern PHPAPI zend_class_entry *random_ce_Random_IntervalBoundary; + static inline php_random_engine *php_random_engine_from_obj(zend_object *object) { return (php_random_engine *)((char *)(object) - XtOffsetOf(php_random_engine, std)); } @@ -290,6 +293,8 @@ PHPAPI void php_random_status_free(php_random_status *status, const bool persist PHPAPI php_random_engine *php_random_engine_common_init(zend_class_entry *ce, zend_object_handlers *handlers, const php_random_algo *algo); PHPAPI void php_random_engine_common_free_object(zend_object *object); PHPAPI zend_object *php_random_engine_common_clone_object(zend_object *object); +PHPAPI uint32_t php_random_range32(const php_random_algo *algo, php_random_status *status, uint32_t umax); +PHPAPI uint64_t php_random_range64(const php_random_algo *algo, php_random_status *status, uint64_t umax); PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status *status, zend_long min, zend_long max); PHPAPI const php_random_algo *php_random_default_algo(void); PHPAPI php_random_status *php_random_default_status(void); @@ -306,6 +311,11 @@ PHPAPI void php_random_pcgoneseq128xslrr64_advance(php_random_status_state_pcgon PHPAPI void php_random_xoshiro256starstar_jump(php_random_status_state_xoshiro256starstar *state); PHPAPI void php_random_xoshiro256starstar_jump_long(php_random_status_state_xoshiro256starstar *state); +PHPAPI double php_random_gammasection_closed_open(const php_random_algo *algo, php_random_status *status, double min, double max); +PHPAPI double php_random_gammasection_closed_closed(const php_random_algo *algo, php_random_status *status, double min, double max); +PHPAPI double php_random_gammasection_open_closed(const php_random_algo *algo, php_random_status *status, double min, double max); +PHPAPI double php_random_gammasection_open_open(const php_random_algo *algo, php_random_status *status, double min, double max); + extern zend_module_entry random_module_entry; # define phpext_random_ptr &random_module_entry diff --git a/ext/random/random.c b/ext/random/random.c index 5f6ae0c720681..e35b3bbba47eb 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -26,6 +26,7 @@ #include "php.h" +#include "Zend/zend_enum.h" #include "Zend/zend_exceptions.h" #include "php_random.h" @@ -76,6 +77,8 @@ PHPAPI zend_class_entry *random_ce_Random_Engine_Secure; PHPAPI zend_class_entry *random_ce_Random_Randomizer; +PHPAPI zend_class_entry *random_ce_Random_IntervalBoundary; + PHPAPI zend_class_entry *random_ce_Random_RandomError; PHPAPI zend_class_entry *random_ce_Random_BrokenRandomEngineError; PHPAPI zend_class_entry *random_ce_Random_RandomException; @@ -86,7 +89,7 @@ static zend_object_handlers random_engine_xoshiro256starstar_object_handlers; static zend_object_handlers random_engine_secure_object_handlers; static zend_object_handlers random_randomizer_object_handlers; -static inline uint32_t rand_range32(const php_random_algo *algo, php_random_status *status, uint32_t umax) +PHPAPI uint32_t php_random_range32(const php_random_algo *algo, php_random_status *status, uint32_t umax) { uint32_t result, limit; size_t total_size = 0; @@ -142,7 +145,7 @@ static inline uint32_t rand_range32(const php_random_algo *algo, php_random_stat return result % umax; } -static inline uint64_t rand_range64(const php_random_algo *algo, php_random_status *status, uint64_t umax) +PHPAPI uint64_t php_random_range64(const php_random_algo *algo, php_random_status *status, uint64_t umax) { uint64_t result, limit; size_t total_size = 0; @@ -310,10 +313,10 @@ PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status zend_ulong umax = (zend_ulong) max - (zend_ulong) min; if (umax > UINT32_MAX) { - return (zend_long) (rand_range64(algo, status, umax) + min); + return (zend_long) (php_random_range64(algo, status, umax) + min); } - return (zend_long) (rand_range32(algo, status, umax) + min); + return (zend_long) (php_random_range32(algo, status, umax) + min); } /* }}} */ @@ -896,6 +899,9 @@ PHP_MINIT_FUNCTION(random) random_randomizer_object_handlers.free_obj = randomizer_free_obj; random_randomizer_object_handlers.clone_obj = NULL; + /* Random\IntervalBoundary */ + random_ce_Random_IntervalBoundary = register_class_Random_IntervalBoundary(); + register_random_symbols(module_number); return SUCCESS; diff --git a/ext/random/random.stub.php b/ext/random/random.stub.php index 69049a837b2c2..e87aec3a27ced 100644 --- a/ext/random/random.stub.php +++ b/ext/random/random.stub.php @@ -133,6 +133,10 @@ public function __construct(?Engine $engine = null) {} public function nextInt(): int {} + public function nextFloat(): float {} + + public function getFloat(float $min, float $max, IntervalBoundary $boundary = IntervalBoundary::ClosedOpen): float {} + public function getInt(int $min, int $max): int {} public function getBytes(int $length): string {} @@ -150,6 +154,13 @@ public function __serialize(): array {} public function __unserialize(array $data): void {} } + enum IntervalBoundary { + case ClosedOpen; + case ClosedClosed; + case OpenClosed; + case OpenOpen; + } + /** * @strict-properties */ diff --git a/ext/random/random_arginfo.h b/ext/random/random_arginfo.h index 1da1b8576b196..5fc34c95aee63 100644 --- a/ext/random/random_arginfo.h +++ b/ext/random/random_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a4226bc7838eba98c5a935b279f681a7d083c0b2 */ + * Stub hash: 7b9594d2eadb778ecec34114b67f2d0ae8bbb58a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_lcg_value, 0, 0, IS_DOUBLE, 0) ZEND_END_ARG_INFO() @@ -90,6 +90,14 @@ ZEND_END_ARG_INFO() #define arginfo_class_Random_Randomizer_nextInt arginfo_mt_getrandmax +#define arginfo_class_Random_Randomizer_nextFloat arginfo_lcg_value + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Randomizer_getFloat, 0, 2, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, min, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, max, IS_DOUBLE, 0) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, boundary, Random\\IntervalBoundary, 0, "Random\\IntervalBoundary::ClosedOpen") +ZEND_END_ARG_INFO() + #define arginfo_class_Random_Randomizer_getInt arginfo_random_int #define arginfo_class_Random_Randomizer_getBytes arginfo_random_bytes @@ -136,6 +144,8 @@ ZEND_METHOD(Random_Engine_Xoshiro256StarStar, jump); ZEND_METHOD(Random_Engine_Xoshiro256StarStar, jumpLong); ZEND_METHOD(Random_Randomizer, __construct); ZEND_METHOD(Random_Randomizer, nextInt); +ZEND_METHOD(Random_Randomizer, nextFloat); +ZEND_METHOD(Random_Randomizer, getFloat); ZEND_METHOD(Random_Randomizer, getInt); ZEND_METHOD(Random_Randomizer, getBytes); ZEND_METHOD(Random_Randomizer, getBytesFromString); @@ -213,6 +223,8 @@ static const zend_function_entry class_Random_CryptoSafeEngine_methods[] = { static const zend_function_entry class_Random_Randomizer_methods[] = { ZEND_ME(Random_Randomizer, __construct, arginfo_class_Random_Randomizer___construct, ZEND_ACC_PUBLIC) ZEND_ME(Random_Randomizer, nextInt, arginfo_class_Random_Randomizer_nextInt, ZEND_ACC_PUBLIC) + ZEND_ME(Random_Randomizer, nextFloat, arginfo_class_Random_Randomizer_nextFloat, ZEND_ACC_PUBLIC) + ZEND_ME(Random_Randomizer, getFloat, arginfo_class_Random_Randomizer_getFloat, ZEND_ACC_PUBLIC) ZEND_ME(Random_Randomizer, getInt, arginfo_class_Random_Randomizer_getInt, ZEND_ACC_PUBLIC) ZEND_ME(Random_Randomizer, getBytes, arginfo_class_Random_Randomizer_getBytes, ZEND_ACC_PUBLIC) ZEND_ME(Random_Randomizer, getBytesFromString, arginfo_class_Random_Randomizer_getBytesFromString, ZEND_ACC_PUBLIC) @@ -225,6 +237,11 @@ static const zend_function_entry class_Random_Randomizer_methods[] = { }; +static const zend_function_entry class_Random_IntervalBoundary_methods[] = { + ZEND_FE_END +}; + + static const zend_function_entry class_Random_RandomError_methods[] = { ZEND_FE_END }; @@ -332,6 +349,21 @@ static zend_class_entry *register_class_Random_Randomizer(void) return class_entry; } +static zend_class_entry *register_class_Random_IntervalBoundary(void) +{ + zend_class_entry *class_entry = zend_register_internal_enum("Random\\IntervalBoundary", IS_UNDEF, class_Random_IntervalBoundary_methods); + + zend_enum_add_case_cstr(class_entry, "ClosedOpen", NULL); + + zend_enum_add_case_cstr(class_entry, "ClosedClosed", NULL); + + zend_enum_add_case_cstr(class_entry, "OpenClosed", NULL); + + zend_enum_add_case_cstr(class_entry, "OpenOpen", NULL); + + return class_entry; +} + static zend_class_entry *register_class_Random_RandomError(zend_class_entry *class_entry_Error) { zend_class_entry ce, *class_entry; diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index a95e6b0fdd8a8..0a801e35c74c6 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -24,6 +24,7 @@ #include "ext/standard/php_array.h" #include "ext/standard/php_string.h" +#include "Zend/zend_enum.h" #include "Zend/zend_exceptions.h" static inline void randomizer_common_init(php_random_randomizer *randomizer, zend_object *engine_object) { @@ -88,6 +89,114 @@ PHP_METHOD(Random_Randomizer, __construct) } /* }}} */ +/* {{{ Generate a float in [0, 1) */ +PHP_METHOD(Random_Randomizer, nextFloat) +{ + php_random_randomizer *randomizer = Z_RANDOM_RANDOMIZER_P(ZEND_THIS); + uint64_t result; + size_t total_size; + + ZEND_PARSE_PARAMETERS_NONE(); + + result = 0; + total_size = 0; + do { + uint64_t r = randomizer->algo->generate(randomizer->status); + result = result | (r << (total_size * 8)); + total_size += randomizer->status->last_generated_size; + if (EG(exception)) { + RETURN_THROWS(); + } + } while (total_size < sizeof(uint64_t)); + + /* A double has 53 bits of precision, thus we must not + * use the full 64 bits of the uint64_t, because we would + * introduce a bias / rounding error. + */ +#if DBL_MANT_DIG != 53 +# error "Random_Randomizer::nextFloat(): Requires DBL_MANT_DIG == 53 to work." +#endif + const double step_size = 1.0 / (1ULL << 53); + + /* Use the upper 53 bits, because some engine's lower bits + * are of lower quality. + */ + result = (result >> 11); + + RETURN_DOUBLE(step_size * result); +} +/* }}} */ + +/* {{{ Generates a random float within a configurable interval. + * + * This method uses the γ-section algorithm by Frédéric Goualard. + */ +PHP_METHOD(Random_Randomizer, getFloat) +{ + php_random_randomizer *randomizer = Z_RANDOM_RANDOMIZER_P(ZEND_THIS); + double min, max; + zend_object *bounds = NULL; + int bounds_type = 'C' + sizeof("ClosedOpen") - 1; + + ZEND_PARSE_PARAMETERS_START(2, 3) + Z_PARAM_DOUBLE(min) + Z_PARAM_DOUBLE(max) + Z_PARAM_OPTIONAL + Z_PARAM_OBJ_OF_CLASS(bounds, random_ce_Random_IntervalBoundary); + ZEND_PARSE_PARAMETERS_END(); + + if (!zend_finite(min)) { + zend_argument_value_error(1, "must be finite"); + RETURN_THROWS(); + } + + if (!zend_finite(max)) { + zend_argument_value_error(2, "must be finite"); + RETURN_THROWS(); + } + + if (bounds) { + zval *case_name = zend_enum_fetch_case_name(bounds); + zend_string *bounds_name = Z_STR_P(case_name); + + bounds_type = ZSTR_VAL(bounds_name)[0] + ZSTR_LEN(bounds_name); + } + + switch (bounds_type) { + case 'C' + sizeof("ClosedOpen") - 1: + if (UNEXPECTED(max <= min)) { + zend_argument_value_error(2, "must be greater than argument #1 ($min)"); + RETURN_THROWS(); + } + + RETURN_DOUBLE(php_random_gammasection_closed_open(randomizer->algo, randomizer->status, min, max)); + case 'C' + sizeof("ClosedClosed") - 1: + if (UNEXPECTED(max < min)) { + zend_argument_value_error(2, "must be greater than or equal to argument #1 ($min)"); + RETURN_THROWS(); + } + + RETURN_DOUBLE(php_random_gammasection_closed_closed(randomizer->algo, randomizer->status, min, max)); + case 'O' + sizeof("OpenClosed") - 1: + if (UNEXPECTED(max <= min)) { + zend_argument_value_error(2, "must be greater than argument #1 ($min)"); + RETURN_THROWS(); + } + + RETURN_DOUBLE(php_random_gammasection_open_closed(randomizer->algo, randomizer->status, min, max)); + case 'O' + sizeof("OpenOpen") - 1: + if (UNEXPECTED(max <= min)) { + zend_argument_value_error(2, "must be greater than argument #1 ($min)"); + RETURN_THROWS(); + } + + RETURN_DOUBLE(php_random_gammasection_open_open(randomizer->algo, randomizer->status, min, max)); + default: + ZEND_UNREACHABLE(); + } +} +/* }}} */ + /* {{{ Generate positive random number */ PHP_METHOD(Random_Randomizer, nextInt) { diff --git a/ext/random/tests/03_randomizer/methods/getFloat.phpt b/ext/random/tests/03_randomizer/methods/getFloat.phpt new file mode 100644 index 0000000000000..1fcec7f3e223a --- /dev/null +++ b/ext/random/tests/03_randomizer/methods/getFloat.phpt @@ -0,0 +1,50 @@ +--TEST-- +Random: Randomizer: getFloat(): Basic functionality +--FILE-- +getFloat(-$i, $i, IntervalBoundary::ClosedClosed); + + if ($result > $i || $result < -$i) { + die("failure: out of range at {$i}"); + } + } +} + +die('success'); + +?> +--EXPECT-- +Random\Engine\Mt19937 +Random\Engine\Mt19937 +Random\Engine\PcgOneseq128XslRr64 +Random\Engine\Xoshiro256StarStar +Random\Engine\Secure +Random\Engine\Test\TestShaEngine +success diff --git a/ext/random/tests/03_randomizer/methods/getFloat_error.phpt b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt new file mode 100644 index 0000000000000..1e200f2507a69 --- /dev/null +++ b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt @@ -0,0 +1,119 @@ +--TEST-- +Random: Randomizer: getFloat(): Parameters are correctly validated +--FILE-- +name, PHP_EOL; + + try { + var_dump(randomizer()->getFloat(NAN, 0.0, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(INF, 0.0, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(-INF, 0.0, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(0.0, NAN, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(0.0, INF, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(0.0, -INF, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(0.0, -0.1, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + var_dump(randomizer()->getFloat(0.0, 0.0, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } + + try { + // Both values round to the same float. + var_dump(randomizer()->getFloat(100_000_000_000_000_000.0, 100_000_000_000_000_000.1, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } +} + +?> +--EXPECT-- +ClosedClosed +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) +float(0) +float(1.0E+17) +ClosedOpen +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +OpenClosed +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +OpenOpen +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) diff --git a/ext/random/tests/03_randomizer/methods/nextFloat.phpt b/ext/random/tests/03_randomizer/methods/nextFloat.phpt new file mode 100644 index 0000000000000..4a583d00e78d9 --- /dev/null +++ b/ext/random/tests/03_randomizer/methods/nextFloat.phpt @@ -0,0 +1,49 @@ +--TEST-- +Random: Randomizer: nextFloat(): Basic functionality +--FILE-- +nextFloat(); + + if ($result >= 1 || $result < 0) { + die("failure: out of range at {$i}"); + } + } +} + +die('success'); + +?> +--EXPECT-- +Random\Engine\Mt19937 +Random\Engine\Mt19937 +Random\Engine\PcgOneseq128XslRr64 +Random\Engine\Xoshiro256StarStar +Random\Engine\Secure +Random\Engine\Test\TestShaEngine +success From b9cd1cdb4f236b7e336b688b16d58a913f4d5c69 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 5 Dec 2022 00:01:23 +0200 Subject: [PATCH 003/895] Implement mb_substr_count using fast text conversion filters The performance gain from this change depends on the text encoding and input string size. For very small strings, other overheads tend to swamp the performance gains to some extent, such that the speedup is less than 2x. For medium-length strings (~100 bytes or so), the speedup is typically around 2.5x. The greatest performance gains are for UTF-8 strings which have already been marked as valid (using the GC flags on the zend_string object); for those, the speedup is more than 10x in many cases. The previous implementation first converted the haystack and needle to wchars, then searched for matches between the two sequences of wchars. Because we use -1 as an error marker when converting to wchars, error markers from invalid byte sequences in the haystack would match error markers from invalid byte sequences in the needle, even if the specific invalid byte sequence was different. I am not sure whether this behavior is really desirable or not, but anyways, this new implementation follows the same behavior so as not to cause BC breaks. --- ext/mbstring/libmbfl/mbfl/mbfilter.c | 132 ----------------------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 10 +- ext/mbstring/libmbfl/mbfl/mbfl_convert.c | 21 +++- ext/mbstring/mbstring.c | 91 ++++++++++++---- ext/mbstring/tests/mb_substr_count.phpt | 53 +++++++-- 5 files changed, 132 insertions(+), 175 deletions(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 22a64d3210415..75382723caa01 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -429,138 +429,6 @@ const mbfl_encoding *mbfl_identify_encoding(mbfl_string *string, const mbfl_enco return enc; } -/* - * strpos - */ -struct collector_strpos_data { - mbfl_convert_filter *next_filter; - mbfl_wchar_device needle; - size_t needle_len; - size_t start; - size_t output; - size_t found_pos; - size_t needle_pos; - size_t matched_pos; -}; - -static int -collector_strpos(int c, void* data) -{ - int *p, *h, *m; - ssize_t n; - struct collector_strpos_data *pc = (struct collector_strpos_data*)data; - - if (pc->output >= pc->start) { - if (c == (int)pc->needle.buffer[pc->needle_pos]) { - if (pc->needle_pos == 0) { - pc->found_pos = pc->output; /* found position */ - } - pc->needle_pos++; /* needle pointer */ - if (pc->needle_pos >= pc->needle_len) { - pc->matched_pos = pc->found_pos; /* matched position */ - pc->needle_pos--; - goto retry; - } - } else if (pc->needle_pos != 0) { -retry: - h = (int *)pc->needle.buffer; - h++; - for (;;) { - pc->found_pos++; - p = h; - m = (int *)pc->needle.buffer; - n = pc->needle_pos - 1; - while (n > 0 && *p == *m) { - n--; - p++; - m++; - } - if (n <= 0) { - if (*m != c) { - pc->needle_pos = 0; - } - break; - } else { - h++; - pc->needle_pos--; - } - } - } - } - - pc->output++; - return 0; -} - -/* - * substr_count - */ - -size_t -mbfl_substr_count( - mbfl_string *haystack, - mbfl_string *needle - ) -{ - size_t n, result = 0; - unsigned char *p; - mbfl_convert_filter *filter; - struct collector_strpos_data pc; - - /* needle is converted into wchar */ - mbfl_wchar_device_init(&pc.needle); - filter = mbfl_convert_filter_new( - needle->encoding, - &mbfl_encoding_wchar, - mbfl_wchar_device_output, 0, &pc.needle); - ZEND_ASSERT(filter); - mbfl_convert_filter_feed_string(filter, needle->val, needle->len); - mbfl_convert_filter_flush(filter); - mbfl_convert_filter_delete(filter); - pc.needle_len = pc.needle.pos; - if (pc.needle.buffer == NULL) { - return MBFL_ERROR_ENCODING; - } - if (pc.needle_len == 0) { - mbfl_wchar_device_clear(&pc.needle); - return MBFL_ERROR_EMPTY; - } - /* initialize filter and collector data */ - filter = mbfl_convert_filter_new( - haystack->encoding, - &mbfl_encoding_wchar, - collector_strpos, 0, &pc); - ZEND_ASSERT(filter); - pc.start = 0; - pc.output = 0; - pc.needle_pos = 0; - pc.found_pos = 0; - pc.matched_pos = MBFL_ERROR_NOT_FOUND; - - /* feed data */ - p = haystack->val; - n = haystack->len; - if (p != NULL) { - while (n > 0) { - if ((*filter->filter_function)(*p++, filter) < 0) { - pc.matched_pos = MBFL_ERROR_ENCODING; - break; - } - if (pc.matched_pos != MBFL_ERROR_NOT_FOUND) { - ++result; - pc.matched_pos = MBFL_ERROR_NOT_FOUND; - pc.needle_pos = 0; - } - n--; - } - } - mbfl_convert_filter_flush(filter); - mbfl_convert_filter_delete(filter); - mbfl_wchar_device_clear(&pc.needle); - - return result; -} - /* * strcut */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index b986aaaee6bb7..472d9577e7089 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -112,13 +112,11 @@ #define MBFL_VERSION_MINOR 3 #define MBFL_VERSION_TEENY 2 -/* - * convert filter - */ #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE 0 #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR 1 #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG 2 #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY 3 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8 4 /* For internal use only; deliberately uses invalid UTF-8 byte sequence as error marker */ /* * convenience macros @@ -195,12 +193,6 @@ static inline int mbfl_is_error(size_t len) { #define MBFL_ERROR_EMPTY ((size_t) -8) #define MBFL_ERROR_OFFSET ((size_t) -16) -/* - * substr_count - */ -MBFLAPI extern size_t -mbfl_substr_count(mbfl_string *haystack, mbfl_string *needle); - /* * If specified as length, the substr until the end of the string is taken. */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index bda704a529bab..02bcb73b0367d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -394,9 +394,15 @@ static size_t mb_illegal_marker(uint32_t bad_cp, uint32_t *out, unsigned int err { uint32_t *start = out; - if (bad_cp == MBFL_BAD_INPUT && err_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { - *out++ = replacement_char; + if (bad_cp == MBFL_BAD_INPUT) { + /* Input string contained a byte sequence which was invalid in the 'from' encoding + * Unless the error handling mode is set to NONE, insert the replacement character */ + if (err_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + *out++ = replacement_char; + } } else { + /* Input string contained a byte sequence which was valid in the 'from' encoding, + * but decoded to a Unicode codepoint which cannot be represented in the 'to' encoding */ switch (err_mode) { case MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR: *out++ = replacement_char; @@ -427,6 +433,17 @@ void mb_illegal_output(uint32_t bad_cp, mb_from_wchar_fn fn, mb_convert_buf* buf uint32_t repl_char = buf->replacement_char; unsigned int err_mode = buf->error_mode; + if (err_mode == MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8) { + /* This mode is for internal use only, when converting a string to + * UTF-8 before searching it; it uses a byte which is illegal in + * UTF-8 as an error marker. This ensures that error markers will + * never 'accidentally' match valid text, as could happen when a + * character like '?' is used as an error marker. */ + MB_CONVERT_BUF_ENSURE(buf, buf->out, buf->limit, 1); + buf->out = mb_convert_buf_add(buf->out, 0xFF); + return; + } + size_t len = mb_illegal_marker(bad_cp, temp, err_mode, repl_char); /* Avoid infinite loop if `fn` is not able to handle `repl_char` */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index a73247cb64eaa..e219a6bdb7943 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1961,10 +1961,10 @@ static size_t mb_find_strpos(zend_string *haystack, zend_string *needle, const m } out: - if (haystack_u8 != NULL && haystack_u8 != haystack) { + if (haystack_u8 != haystack) { zend_string_free(haystack_u8); } - if (needle_u8 != NULL && needle_u8 != needle) { + if (needle_u8 != needle) { zend_string_free(needle_u8); } return result; @@ -2263,42 +2263,89 @@ PHP_FUNCTION(mb_strrichr) #undef MB_STRISTR #undef MB_STRRICHR -/* {{{ Count the number of substring occurrences */ PHP_FUNCTION(mb_substr_count) { - mbfl_string haystack, needle; - char *haystack_val, *needle_val; - zend_string *enc_name = NULL; + zend_string *haystack, *needle, *enc_name = NULL, *haystack_u8 = NULL, *needle_u8 = NULL; ZEND_PARSE_PARAMETERS_START(2, 3) - Z_PARAM_STRING(haystack_val, haystack.len) - Z_PARAM_STRING(needle_val, needle.len) + Z_PARAM_STR(haystack) + Z_PARAM_STR(needle) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(enc_name) ZEND_PARSE_PARAMETERS_END(); - haystack.val = (unsigned char*)haystack_val; - needle.val = (unsigned char*)needle_val; - - if (needle.len == 0) { + if (ZSTR_LEN(needle) == 0) { zend_argument_value_error(2, "must not be empty"); RETURN_THROWS(); } - haystack.encoding = needle.encoding = php_mb_get_encoding(enc_name, 3); - if (!haystack.encoding) { + const mbfl_encoding *enc = php_mb_get_encoding(enc_name, 3); + if (!enc) { RETURN_THROWS(); } - size_t n = mbfl_substr_count(&haystack, &needle); - /* An error can only occur if needle is empty, - * an encoding error happens (which should not happen at this stage and is a bug) - * or the haystack is more than sizeof(size_t) bytes - * If one of these things occur this is a bug and should be flagged as such */ - ZEND_ASSERT(!mbfl_is_error(n)); - RETVAL_LONG(n); + if (php_mb_is_no_encoding_utf8(enc->no_encoding)) { + /* No need to do any conversion if haystack/needle are already known-valid UTF-8 + * (If they are not valid, then not passing them through conversion filters could affect output) */ + if (GC_FLAGS(haystack) & IS_STR_VALID_UTF8) { + haystack_u8 = haystack; + } else { + unsigned int num_errors = 0; + haystack_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); + if (!num_errors && !ZSTR_IS_INTERNED(haystack)) { + GC_ADD_FLAGS(haystack, IS_STR_VALID_UTF8); + } + } + + if (GC_FLAGS(needle) & IS_STR_VALID_UTF8) { + needle_u8 = needle; + } else { + unsigned int num_errors = 0; + needle_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); + if (!num_errors && !ZSTR_IS_INTERNED(needle)) { + GC_ADD_FLAGS(needle, IS_STR_VALID_UTF8); + } + } + } else { + unsigned int num_errors = 0; + haystack_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); + needle_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); + /* A string with >0 bytes may convert to 0 codepoints; for example, the contents + * may be only escape sequences */ + if (ZSTR_LEN(needle_u8) == 0) { + zend_string_free(haystack_u8); + zend_string_free(needle_u8); + zend_argument_value_error(2, "must not be empty"); + RETURN_THROWS(); + } + } + + size_t result = 0; + + if (ZSTR_LEN(haystack_u8) < ZSTR_LEN(needle_u8)) { + goto out; + } + + const char *p = ZSTR_VAL(haystack_u8), *e = p + ZSTR_LEN(haystack_u8); + while (true) { + p = zend_memnstr(p, ZSTR_VAL(needle_u8), ZSTR_LEN(needle_u8), e); + if (!p) { + break; + } + p += ZSTR_LEN(needle_u8); + result++; + } + +out: + if (haystack_u8 != haystack) { + zend_string_free(haystack_u8); + } + if (needle_u8 != needle) { + zend_string_free(needle_u8); + } + + RETVAL_LONG(result); } -/* }}} */ /* {{{ Returns part of a string */ PHP_FUNCTION(mb_substr) diff --git a/ext/mbstring/tests/mb_substr_count.phpt b/ext/mbstring/tests/mb_substr_count.phpt index 0ccaa4e420eeb..2927419930b39 100644 --- a/ext/mbstring/tests/mb_substr_count.phpt +++ b/ext/mbstring/tests/mb_substr_count.phpt @@ -7,6 +7,8 @@ output_handler= --FILE-- getMessage() . \PHP_EOL; } + try { + // Although the needle below contains 3 bytes, it decodes to zero Unicode codepoints + // So the needle is actually 'empty', although it doesn't appear so + var_dump(mb_substr_count("abcdef", "\x1B(B", "ISO-2022-JP")); + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + } - var_dump(mb_substr_count("", "")); - var_dump(mb_substr_count("", "")); + print "== Return value for empty haystack should always be zero ==\n"; + var_dump(mb_substr_count("", "\xA4\xA2")); var_dump(mb_substr_count("", chr(0))); + print "== Try searching using various encodings ==\n"; $a = str_repeat("abcacba", 100); - var_dump(@mb_substr_count($a, "bca")); + var_dump(mb_substr_count($a, "bca")); - $a = str_repeat("", 100); - $b = ""; - var_dump(@mb_substr_count($a, $b)); + $a = str_repeat("\xA4\xA2\xA4\xA4\xA4\xA6\xA4\xA2\xA4\xA6\xA4\xA4\xA4\xA2", 100); + $b = "\xA4\xA4\xA4\xA6\xA4\xA2"; + var_dump(mb_substr_count($a, $b)); $to_enc = "UTF-8"; - var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc), + var_dump(mb_substr_count(mb_convert_encoding($a, $to_enc), mb_convert_encoding($b, $to_enc), $to_enc)); $to_enc = "Shift_JIS"; - var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc), + var_dump(mb_substr_count(mb_convert_encoding($a, $to_enc), mb_convert_encoding($b, $to_enc), $to_enc)); $a = str_repeat("abcacbabca", 100); - var_dump(@mb_substr_count($a, "bca")); + var_dump(mb_substr_count($a, "bca")); + + print "== Regression tests ==\n"; + + // The old implementation had a bug; it could only recognize a maximum of one + // match for each byte that it fed into the decoder, even if feeding in that + // byte caused two codepoints to be emitted (because the decoder was holding + // cached data), and both of those codepoints matched a 1-codepoint needle + // (For this example, two error markers are emitted for the final byte 0xFF) + echo mb_substr_count("\xef\xff", "\xf8", "UTF-8"), "\n"; + + // Another thing about the old implementation: if a final codepoint was emitted + // by a decoder flush function, and that codepoint finished a match with the + // needle, that match would be disregarded and not counted in the returned value + // (In practice, the only thing emitted from decoder flush functions is an error + // marker, if the string ended in an illegal state) + echo mb_substr_count("+", "+", "UTF7-IMAP"), "\n"; + ?> --EXPECT-- +== Empty needle should raise an error == mb_substr_count(): Argument #2 ($needle) must not be empty mb_substr_count(): Argument #2 ($needle) must not be empty +mb_substr_count(): Argument #2 ($needle) must not be empty +== Return value for empty haystack should always be zero == int(0) int(0) -int(0) +== Try searching using various encodings == int(100) int(100) int(100) int(100) int(200) +== Regression tests == +2 +1 From 60cf9fbee066303b160c16183d2c3aa1ec8d7fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 13 Dec 2022 20:24:24 +0100 Subject: [PATCH 004/895] Replace another root XML element format to the "canonical" one --- build/gen_stub.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 8cf319ceaea39..5f6bffd8b09f3 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -4261,16 +4261,18 @@ function replaceClassSynopses(string $targetDirectory, array $classMap, iterable $replacedXml = preg_replace( [ "/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/", - "//i", - "//i", - "//i", - "//i", + '//i', + '//i', + '//i', + '//i', + '//i', ], [ "&$1", "", "", "", + "", "", ], $replacedXml @@ -4494,8 +4496,8 @@ function replaceMethodSynopses(string $targetDirectory, array $funcMap, array $a $replacedXml = preg_replace( [ "/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/", - "//i", - "//i", + '//i', + '//i', ], [ "&$1", From b4df038cee08694263ac279677d92f4c594f6251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 13 Dec 2022 20:27:09 +0100 Subject: [PATCH 005/895] Remove the superfluous closing parentheses from class synopsis page includes --- build/gen_stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 5f6bffd8b09f3..1be94cd00434c 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2807,7 +2807,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $parentReference = self::getClassSynopsisReference($parent); $includeElement = $this->createIncludeElement( $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedParentName'])" ); $classSynopsis->appendChild($includeElement); } From 0fc60fab7265fabcfdaba4438f7fa0fae826cd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 13 Dec 2022 20:41:16 +0100 Subject: [PATCH 006/895] Always include the constructor on the class manual pages --- build/gen_stub.php | 56 +++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 1be94cd00434c..945f9aa548742 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2760,40 +2760,36 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera "&InheritedProperties;" ); - if (!empty($this->funcInfos)) { - $classSynopsis->appendChild(new DOMText("\n\n ")); - $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); - $classSynopsisInfo->setAttribute("role", "comment"); - $classSynopsis->appendChild($classSynopsisInfo); + $classSynopsis->appendChild(new DOMText("\n\n ")); + $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); + $classSynopsisInfo->setAttribute("role", "comment"); + $classSynopsis->appendChild($classSynopsisInfo); - $classReference = self::getClassSynopsisReference($this->name); + $classReference = self::getClassSynopsisReference($this->name); - if ($this->hasConstructor()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" - ); - $classSynopsis->appendChild($includeElement); - } + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" + ); + $classSynopsis->appendChild($includeElement); - if ($this->hasMethods()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" - ); - $classSynopsis->appendChild($includeElement); - } + if ($this->hasMethods()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" + ); + $classSynopsis->appendChild($includeElement); + } - if ($this->hasDestructor()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])" - ); - $classSynopsis->appendChild($includeElement); - } + if ($this->hasDestructor()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])" + ); + $classSynopsis->appendChild($includeElement); } if (!empty($parentsWithInheritedMethods)) { From 6aa5e58414e4fe6e689e70c36c4709cc745f277d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 16 Dec 2022 12:07:23 +0100 Subject: [PATCH 007/895] Backport methodsynopsis role attributes changes from master Commits https://github.com/php/php-src/commit/93605f286d11876da44d2ecd41c13d7e3f0aae66 and https://github.com/php/php-src/commit/d6651426f405342f74cdfe930448912ef68e23c4 --- build/gen_stub.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 945f9aa548742..6af9e06d16acb 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1487,14 +1487,10 @@ public function getMethodSynopsisElement(array $funcMap, array $aliasMap, DOMDoc $methodSynopsis = $doc->createElement($synopsisType); - $aliasedFunc = $this->aliasType === "alias" && isset($funcMap[$this->alias->__toString()]) ? $funcMap[$this->alias->__toString()] : null; - $aliasFunc = $aliasMap[$this->name->__toString()] ?? null; - - if (($this->aliasType === "alias" && $aliasedFunc !== null && $aliasedFunc->isMethod() !== $this->isMethod()) || - ($aliasFunc !== null && $aliasFunc->isMethod() !== $this->isMethod()) - ) { + if ($this->isMethod()) { + assert($this->name instanceof MethodName); $role = $doc->createAttribute("role"); - $role->value = $this->isMethod() ? "oop" : "procedural"; + $role->value = addslashes($this->name->className->__toString()); $methodSynopsis->appendChild($role); } @@ -2766,11 +2762,12 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $classSynopsis->appendChild($classSynopsisInfo); $classReference = self::getClassSynopsisReference($this->name); + $escapedName = addslashes($this->name->__toString()); $classSynopsis->appendChild(new DOMText("\n ")); $includeElement = $this->createIncludeElement( $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])" ); $classSynopsis->appendChild($includeElement); @@ -2778,7 +2775,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $classSynopsis->appendChild(new DOMText("\n ")); $includeElement = $this->createIncludeElement( $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])" ); $classSynopsis->appendChild($includeElement); } @@ -2787,7 +2784,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $classSynopsis->appendChild(new DOMText("\n ")); $includeElement = $this->createIncludeElement( $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])" + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])" ); $classSynopsis->appendChild($includeElement); } @@ -2801,6 +2798,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera foreach ($parentsWithInheritedMethods as $parent) { $classSynopsis->appendChild(new DOMText("\n ")); $parentReference = self::getClassSynopsisReference($parent); + $escapedParentName = addslashes($parent->__toString()); $includeElement = $this->createIncludeElement( $doc, "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedParentName'])" From b8ac2071b897481938c6207989654cc3132ff317 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 16 Dec 2022 12:16:38 +0100 Subject: [PATCH 008/895] Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create() There is no `ldap_create()`, but rather `ldap_connect()`. Closes GH-10115. --- NEWS | 4 ++++ ext/ldap/ldap.c | 2 +- ext/ldap/tests/ldap_constructor.phpt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9994834a7f526..6d165ca1a707f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ PHP NEWS - Apache: . Fixed bug GH-9949 (Partial content on incomplete POST request). (cmb) +- LDAP: + . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). + (cmb) + - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 6e0f28f68080e..19b6e05d4ecf1 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -119,7 +119,7 @@ static zend_object *ldap_link_create_object(zend_class_entry *class_type) { } static zend_function *ldap_link_get_constructor(zend_object *object) { - zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_create() instead"); + zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_connect() instead"); return NULL; } diff --git a/ext/ldap/tests/ldap_constructor.phpt b/ext/ldap/tests/ldap_constructor.phpt index 37db6112dcee5..6c79dee8b3982 100644 --- a/ext/ldap/tests/ldap_constructor.phpt +++ b/ext/ldap/tests/ldap_constructor.phpt @@ -11,4 +11,4 @@ try { echo "Exception: ", $ex->getMessage(), "\n"; } --EXPECT-- -Exception: Cannot directly construct LDAP\Connection, use ldap_create() instead +Exception: Cannot directly construct LDAP\Connection, use ldap_connect() instead From 416420b362bebb17dd94f82a00331fe178f16720 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 16 Dec 2022 14:45:00 +0100 Subject: [PATCH 009/895] [ci skip] Remove duplicated NEWS entry --- NEWS | 1 - 1 file changed, 1 deletion(-) diff --git a/NEWS b/NEWS index b40460bd30f9a..7453697c66bed 100644 --- a/NEWS +++ b/NEWS @@ -35,7 +35,6 @@ PHP NEWS (CVE-2022-37454) (nicky at mouha dot be) - Intl: - . Added pattern format error infos for msgfmt_set_pattern. (David Carlier) . Added pattern format error infos for numfmt_set_pattern. (David Carlier) - JSON: From d832125b8ed8d2b8d4c33a5e1b8bb9bb55378341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 16 Dec 2022 17:02:24 +0100 Subject: [PATCH 010/895] Only include the default constructor for non-abstract class synopses --- build/gen_stub.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 6af9e06d16acb..7e89007948fe6 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2756,20 +2756,26 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera "&InheritedProperties;" ); - $classSynopsis->appendChild(new DOMText("\n\n ")); - $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); - $classSynopsisInfo->setAttribute("role", "comment"); - $classSynopsis->appendChild($classSynopsisInfo); + $isConcreteClass = ($this->type === "class" && !($this->flags & Class_::MODIFIER_ABSTRACT)); + + if ($isConcreteClass || !empty($this->funcInfos)) { + $classSynopsis->appendChild(new DOMText("\n\n ")); + $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); + $classSynopsisInfo->setAttribute("role", "comment"); + $classSynopsis->appendChild($classSynopsisInfo); + } $classReference = self::getClassSynopsisReference($this->name); $escapedName = addslashes($this->name->__toString()); - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])" - ); - $classSynopsis->appendChild($includeElement); + if ($isConcreteClass || $this->hasConstructor()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])" + ); + $classSynopsis->appendChild($includeElement); + } if ($this->hasMethods()) { $classSynopsis->appendChild(new DOMText("\n ")); From a11c8a30399e90c17c287b9656c0077bc5131c9c Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 16 Dec 2022 08:44:26 -0800 Subject: [PATCH 011/895] Limit stack size (#9104) --- .appveyor.yml | 1 + .cirrus.yml | 1 + .github/actions/test-linux/action.yml | 1 + .github/actions/test-macos/action.yml | 1 + Zend/Zend.m4 | 32 +- Zend/tests/stack_limit/stack_limit_001.phpt | 77 ++++ Zend/tests/stack_limit/stack_limit_002.phpt | 80 ++++ Zend/tests/stack_limit/stack_limit_003.phpt | 62 +++ Zend/tests/stack_limit/stack_limit_004.phpt | 50 +++ Zend/tests/stack_limit/stack_limit_005.phpt | 64 +++ Zend/tests/stack_limit/stack_limit_006.phpt | 320 ++++++++++++++ Zend/tests/stack_limit/stack_limit_007.phpt | 41 ++ Zend/tests/stack_limit/stack_limit_008.phpt | 54 +++ Zend/tests/stack_limit/stack_limit_009.phpt | 24 + Zend/tests/stack_limit/stack_limit_010.phpt | 48 ++ Zend/tests/stack_limit/stack_limit_011.phpt | 48 ++ Zend/tests/stack_limit/stack_limit_012.inc | 54 +++ Zend/tests/stack_limit/stack_limit_012.phpt | 37 ++ Zend/zend.c | 66 ++- Zend/zend_call_stack.c | 457 ++++++++++++++++++++ Zend/zend_call_stack.h | 91 ++++ Zend/zend_compile.c | 9 + Zend/zend_execute.c | 9 + Zend/zend_execute_API.c | 1 + Zend/zend_fibers.c | 42 ++ Zend/zend_fibers.h | 4 + Zend/zend_globals.h | 13 + Zend/zend_vm_def.h | 6 + Zend/zend_vm_execute.h | 16 + Zend/zend_vm_execute.skl | 10 + build/php.m4 | 20 + configure.ac | 4 +- ext/opcache/jit/zend_jit_helpers.c | 7 +- ext/opcache/jit/zend_jit_vm_helpers.c | 2 +- ext/zend_test/fiber.c | 4 + ext/zend_test/test.c | 60 +++ ext/zend_test/test.stub.php | 5 + ext/zend_test/test_arginfo.h | 24 +- sapi/phpdbg/phpdbg_utils.c | 2 +- win32/build/config.w32 | 7 +- win32/build/config.w32.h.in | 2 +- 41 files changed, 1844 insertions(+), 12 deletions(-) create mode 100644 Zend/tests/stack_limit/stack_limit_001.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_002.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_003.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_004.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_005.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_006.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_007.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_008.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_009.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_010.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_011.phpt create mode 100644 Zend/tests/stack_limit/stack_limit_012.inc create mode 100644 Zend/tests/stack_limit/stack_limit_012.phpt create mode 100644 Zend/zend_call_stack.c create mode 100644 Zend/zend_call_stack.h diff --git a/.appveyor.yml b/.appveyor.yml index 7567578af258d..350fac2c026bb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -28,6 +28,7 @@ environment: #PDO_MYSQL_TEST_PASS: Password12! #PGSQL_TEST_CONNSTR: "host=127.0.0.1 dbname=test port=5432 user=postgres password=Password12!" #PDO_PGSQL_TEST_DSN: "pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=Password12!" + STACK_LIMIT_DEFAULTS_CHECK: 1 #build permutations matrix: - THREAD_SAFE: 0 diff --git a/.cirrus.yml b/.cirrus.yml index 10558901ad167..a7676803d1fe3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -201,4 +201,5 @@ freebsd_task: tests_script: - export SKIP_IO_CAPTURE_TESTS=1 - export CI_NO_IPV6=1 + - export STACK_LIMIT_DEFAULTS_CHECK=1 - sapi/cli/php run-tests.php -P -q -j2 -g FAIL,BORK,LEAK,XLEAK --no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 2c1d53f4d6da5..c505a45c9aa74 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -30,6 +30,7 @@ runs: export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 export TEST_PHP_JUNIT=junit.out.xml + export STACK_LIMIT_DEFAULTS_CHECK=1 sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -j$(/usr/bin/nproc) \ -g FAIL,BORK,LEAK,XLEAK \ diff --git a/.github/actions/test-macos/action.yml b/.github/actions/test-macos/action.yml index 3deafde06200c..8284b8905ef74 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -15,6 +15,7 @@ runs: export SKIP_IO_CAPTURE_TESTS=1 export CI_NO_IPV6=1 export TEST_PHP_JUNIT=junit.out.xml + export STACK_LIMIT_DEFAULTS_CHECK=1 sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -j$(sysctl -n hw.ncpu) \ -g FAIL,BORK,LEAK,XLEAK \ diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index fd00dc7270de5..3bd30bf78e984 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -146,7 +146,37 @@ _LT_AC_TRY_DLOPEN_SELF([ ]) dnl Checks for library functions. -AC_CHECK_FUNCS(getpid kill sigsetjmp) +AC_CHECK_FUNCS(getpid kill sigsetjmp pthread_getattr_np pthread_attr_get_np pthread_get_stackaddr_np pthread_attr_getstack gettid) + +dnl Test whether the stack grows downwards +dnl Assumes contiguous stack +AC_MSG_CHECKING(whether the stack grows downwards) + +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include + +int (*volatile f)(uintptr_t); + +int stack_grows_downwards(uintptr_t arg) { + int local; + return (uintptr_t)&local < arg; +} + +int main() { + int local; + + f = stack_grows_downwards; + return f((uintptr_t)&local) ? 0 : 1; +} +]])], [ + AC_DEFINE([ZEND_STACK_GROWS_DOWNWARDS], 1, [Define if the stack grows downwards]) + AC_DEFINE([ZEND_CHECK_STACK_LIMIT], 1, [Define if checking the stack limit is supported]) + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) +], [ + AC_MSG_RESULT(no) +]) ZEND_CHECK_FLOAT_PRECISION ]) diff --git a/Zend/tests/stack_limit/stack_limit_001.phpt b/Zend/tests/stack_limit/stack_limit_001.phpt new file mode 100644 index 0000000000000..626ec3fe570fa --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_001.phpt @@ -0,0 +1,77 @@ +--TEST-- +Stack limit 001 - Stack limit checks with max_allowed_stack_size detection +--EXTENSIONS-- +zend_test +--INI-- +; The test may use a large amount of memory on systems with a large stack limit +memory_limit=2G +--FILE-- +getMessage(), "\n"; +} + +try { + clone new Test2; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +try { + serialize(new Test3); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +try { + replace(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_002.phpt b/Zend/tests/stack_limit/stack_limit_002.phpt new file mode 100644 index 0000000000000..2459df3649083 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_002.phpt @@ -0,0 +1,80 @@ +--TEST-- +Stack limit 002 - Stack limit checks with max_allowed_stack_size detection (fibers) +--EXTENSIONS-- +zend_test +--INI-- +fiber.stack_size=512k +--FILE-- +getMessage(), "\n"; + } + + try { + clone new Test2; + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } + + try { + serialize(new Test3); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } + + try { + replace(); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } +}); + +$fiber->start(); + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_003.phpt b/Zend/tests/stack_limit/stack_limit_003.phpt new file mode 100644 index 0000000000000..51bf51f2ab26b --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_003.phpt @@ -0,0 +1,62 @@ +--TEST-- +Stack limit 003 - Stack limit checks with fixed max_allowed_stack_size +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- +getMessage(), "\n"; +} + +try { + clone new Test2; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +try { + replace(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_004.phpt b/Zend/tests/stack_limit/stack_limit_004.phpt new file mode 100644 index 0000000000000..a3da4664edb03 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_004.phpt @@ -0,0 +1,50 @@ +--TEST-- +Stack limit 004 - Stack limit checks with fixed max_allowed_stack_size (fibers) +--EXTENSIONS-- +zend_test +--FILE-- +getTrace()); + } + + throw new \Exception(); +}; + +ini_set('fiber.stack_size', '400K'); +$fiber = new Fiber($callback); +$fiber->start(); +$depth1 = $fiber->getReturn(); + +ini_set('fiber.stack_size', '200K'); +$fiber = new Fiber($callback); +$fiber->start(); +$depth2 = $fiber->getReturn(); + +var_dump($depth1 > $depth2); + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +bool(true) diff --git a/Zend/tests/stack_limit/stack_limit_005.phpt b/Zend/tests/stack_limit/stack_limit_005.phpt new file mode 100644 index 0000000000000..6e50bd34e7e8e --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_005.phpt @@ -0,0 +1,64 @@ +--TEST-- +Stack limit 005 - Internal stack limit check in zend_compile_expr() +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- +f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() +; + +--EXPECTF-- +Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d diff --git a/Zend/tests/stack_limit/stack_limit_006.phpt b/Zend/tests/stack_limit/stack_limit_006.phpt new file mode 100644 index 0000000000000..61da8b9dab04c --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_006.phpt @@ -0,0 +1,320 @@ +--TEST-- +Stack limit 006 - env size affects __libc_stack_end +--EXTENSIONS-- +zend_test +--INI-- +; TODO +memory_limit=2G +--ENV-- +ENV001=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV002=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV003=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV004=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV005=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV006=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV007=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV008=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV009=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV010=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV011=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV012=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV013=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV014=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV015=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV016=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV017=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV018=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV019=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV020=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV021=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV022=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV023=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV024=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV025=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV026=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV027=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV028=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV029=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV030=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV031=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV032=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV033=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV034=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV035=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV036=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV037=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV038=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV039=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV040=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV041=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV042=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV043=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV044=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV045=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV046=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV047=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV048=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV049=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV050=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV051=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV052=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV053=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV054=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV055=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV056=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV057=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV058=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV059=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV060=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV061=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV062=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV063=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV064=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV065=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV066=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV067=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV068=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV069=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV070=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV071=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV072=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV073=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV074=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV075=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV076=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV077=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV078=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV079=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV080=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV081=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV082=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV083=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV084=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV085=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV086=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV087=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV088=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV089=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV090=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV091=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV092=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV093=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV094=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV095=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV096=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV097=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV098=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV099=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV100=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV101=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV102=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV103=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV104=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV105=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV106=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV107=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV108=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV109=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV110=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV111=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV112=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV113=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV114=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV115=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV116=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV117=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV118=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV119=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV120=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV121=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV122=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV123=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV124=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV125=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV126=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV127=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV128=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV129=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV130=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV131=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV132=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV133=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV134=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV135=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV136=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV137=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV138=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV139=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV140=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV141=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV142=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV143=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV144=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV145=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV146=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV147=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV148=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV149=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV150=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV151=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV152=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV153=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV154=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV155=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV156=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV157=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV158=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV159=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV160=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV161=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV162=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV163=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV164=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV165=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV166=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV167=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV168=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV169=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV170=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV171=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV172=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV173=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV174=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV175=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV176=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV177=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV178=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV179=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV180=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV181=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV182=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV183=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV184=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV185=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV186=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV187=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV188=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV189=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV190=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV191=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV192=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV193=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV194=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV195=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV196=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV197=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV198=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV199=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV200=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV201=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV202=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV203=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV204=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV205=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV206=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV207=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV208=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV209=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV210=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV211=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV212=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV213=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV214=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV215=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV216=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV217=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV218=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV219=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV220=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV221=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV222=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV223=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV224=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV225=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV226=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV227=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV228=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV229=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV230=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV231=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV232=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV233=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV234=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV235=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV236=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV237=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV238=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV239=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV240=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV241=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV242=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV243=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV244=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV245=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV246=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV247=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV248=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV249=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV250=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV251=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV252=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV253=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV254=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV255=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ENV256=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +--FILE-- +getMessage(), "\n"; +} + +try { + clone new Test2; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +try { + replace(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_007.phpt b/Zend/tests/stack_limit/stack_limit_007.phpt new file mode 100644 index 0000000000000..7994bb66f1e3b --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_007.phpt @@ -0,0 +1,41 @@ +--TEST-- +Stack limit 007 - Exception handling +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- +getMessage(), "\n"; + // We should not enter the catch block if we haven't executed at + // least one op in the try block + printf("Try executed: %d\n", $tryExecuted ?? 0); + } + }, 'x'); +} + +replace(); + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Try executed: 1 diff --git a/Zend/tests/stack_limit/stack_limit_008.phpt b/Zend/tests/stack_limit/stack_limit_008.phpt new file mode 100644 index 0000000000000..9609667bf3be7 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_008.phpt @@ -0,0 +1,54 @@ +--TEST-- +Stack limit 008 - Exception handling +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- +getMessage(); + } + } + }, 'x'); +} + +function replace2() { + return preg_replace_callback('#.#', function () { + try { + return ''; + } finally { + // We should not enter the finally block if we haven't executed at + // least one op in the try block + echo "Finally block: This should not execute\n"; + } + }, 'x'); +} + +replace(); + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Will throw: +Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_009.phpt b/Zend/tests/stack_limit/stack_limit_009.phpt new file mode 100644 index 0000000000000..08f14495e4370 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_009.phpt @@ -0,0 +1,24 @@ +--TEST-- +Stack limit 009 - Check that we can actually use all the stack +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +int(%d) diff --git a/Zend/tests/stack_limit/stack_limit_010.phpt b/Zend/tests/stack_limit/stack_limit_010.phpt new file mode 100644 index 0000000000000..c9ca8c7d7f743 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_010.phpt @@ -0,0 +1,48 @@ +--TEST-- +Stack limit 010 - Check stack size detection against known defaults +--EXTENSIONS-- +zend_test +--SKIPIF-- + +--FILE-- + 8*1024*1024, + 'FreeBSD' => match(php_uname('m')) { + 'amd64' => 512*1024*1024 - 4096, + 'i386' => 64*1024*1024 - 4096, + }, + 'Linux' => match (getenv('GITHUB_ACTIONS')) { + 'true' => 16*1024*1024, // https://github.com/actions/runner-images/pull/3328 + default => 8*1024*1024, + }, + 'Windows NT' => 67108864 - 4*4096, // Set by sapi/cli/config.w32 +}; + +printf("Expected max_size: 0x%x\n", $expectedMaxSize); +printf("Actual max_size: %s\n", $stack['max_size']); + +var_dump($stack['max_size'] === sprintf('0x%x', $expectedMaxSize)); + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Expected max_size: 0x%x +Actual max_size: 0x%x +bool(true) diff --git a/Zend/tests/stack_limit/stack_limit_011.phpt b/Zend/tests/stack_limit/stack_limit_011.phpt new file mode 100644 index 0000000000000..3c5daf59f6b66 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_011.phpt @@ -0,0 +1,48 @@ +--TEST-- +Stack limit 011 - Stack limit exhaustion during unwinding +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- +getMessage(), "\n"; + echo 'Previous: ', $e->getPrevious()->getMessage(), "\n"; +} + +?> +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} +Maximum call stack size of %d bytes reached. Infinite recursion? +Previous: Maximum call stack size of %d bytes reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_012.inc b/Zend/tests/stack_limit/stack_limit_012.inc new file mode 100644 index 0000000000000..f6ad9c7428a90 --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_012.inc @@ -0,0 +1,54 @@ +f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() + ->f()->f()->f()->f()->f()->f()->f()->f()->f()->f() +; diff --git a/Zend/tests/stack_limit/stack_limit_012.phpt b/Zend/tests/stack_limit/stack_limit_012.phpt new file mode 100644 index 0000000000000..c4920a928d62b --- /dev/null +++ b/Zend/tests/stack_limit/stack_limit_012.phpt @@ -0,0 +1,37 @@ +--TEST-- +Stack limit 012 - Stack limit exhaustion during unwinding +--EXTENSIONS-- +zend_test +--INI-- +zend.max_allowed_stack_size=128K +--FILE-- + +--EXPECTF-- +array(4) { + ["base"]=> + string(%d) "0x%x" + ["max_size"]=> + string(%d) "0x%x" + ["position"]=> + string(%d) "0x%x" + ["EG(stack_limit)"]=> + string(%d) "0x%x" +} + +Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d diff --git a/Zend/zend.c b/Zend/zend.c index 46a0e1b4c0ea3..0eec5f89019d9 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -35,6 +35,7 @@ #include "zend_attributes.h" #include "zend_observer.h" #include "zend_fibers.h" +#include "zend_call_stack.h" #include "Optimizer/zend_optimizer.h" static size_t global_map_ptr_last = 0; @@ -173,6 +174,52 @@ static ZEND_INI_MH(OnSetExceptionStringParamMaxLen) /* {{{ */ } /* }}} */ +#ifdef ZEND_CHECK_STACK_LIMIT +static ZEND_INI_MH(OnUpdateMaxAllowedStackSize) /* {{{ */ +{ + zend_long size = zend_ini_parse_quantity_warn(new_value, entry->name); + + if (size < ZEND_MAX_ALLOWED_STACK_SIZE_UNCHECKED) { + zend_error(E_WARNING, "Invalid \"%s\" setting. Value must be >= %d, but got " ZEND_LONG_FMT, + ZSTR_VAL(entry->name), ZEND_MAX_ALLOWED_STACK_SIZE_UNCHECKED, size); + return FAILURE; + } + + EG(max_allowed_stack_size) = size; + + return SUCCESS; +} +/* }}} */ + +static ZEND_INI_MH(OnUpdateReservedStackSize) /* {{{ */ +{ + zend_ulong size = zend_ini_parse_uquantity_warn(new_value, entry->name); + + /* Min value accounts for alloca, PCRE2 START_FRAMES_SIZE, and some buffer + * for normal function calls. + * We could reduce this on systems without alloca if we also add stack size + * checks before pcre2_match(). */ +#ifdef ZEND_ALLOCA_MAX_SIZE + zend_ulong min = ZEND_ALLOCA_MAX_SIZE + 16*1024; +#else + zend_ulong min = 32*1024; +#endif + + if (size == 0) { + size = min; + } else if (size < min) { + zend_error(E_WARNING, "Invalid \"%s\" setting. Value must be >= " ZEND_ULONG_FMT ", but got " ZEND_ULONG_FMT "\n", + ZSTR_VAL(entry->name), min, size); + return FAILURE; + } + + EG(reserved_stack_size) = size; + + return SUCCESS; +} +/* }}} */ +#endif /* ZEND_CHECK_STACK_LIMIT */ + static ZEND_INI_MH(OnUpdateFiberStackSize) /* {{{ */ { if (new_value) { @@ -203,6 +250,12 @@ ZEND_INI_BEGIN() STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals) STD_ZEND_INI_ENTRY("zend.exception_string_param_max_len", "15", ZEND_INI_ALL, OnSetExceptionStringParamMaxLen, exception_string_param_max_len, zend_executor_globals, executor_globals) STD_ZEND_INI_ENTRY("fiber.stack_size", NULL, ZEND_INI_ALL, OnUpdateFiberStackSize, fiber_stack_size, zend_executor_globals, executor_globals) +#ifdef ZEND_CHECK_STACK_LIMIT + /* The maximum allowed call stack size. 0: auto detect, -1: no limit. For fibers, this is fiber.stack_size. */ + STD_ZEND_INI_ENTRY("zend.max_allowed_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateMaxAllowedStackSize, max_allowed_stack_size, zend_executor_globals, executor_globals) + /* Substracted from the max allowed stack size, as a buffer, when checking for overflow. 0: auto detect. */ + STD_ZEND_INI_ENTRY("zend.reserved_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateReservedStackSize, reserved_stack_size, zend_executor_globals, executor_globals) +#endif ZEND_INI_END() @@ -796,6 +849,10 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{ executor_globals->record_errors = false; executor_globals->num_errors = 0; executor_globals->errors = NULL; +#ifdef ZEND_CHECK_STACK_LIMIT + executor_globals->stack_limit = (void*)0; + executor_globals->stack_base = (void*)0; +#endif } /* }}} */ @@ -817,6 +874,9 @@ static void zend_new_thread_end_handler(THREAD_T thread_id) /* {{{ */ { zend_copy_ini_directives(); zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP); +#ifdef ZEND_CHECK_STACK_LIMIT + zend_call_stack_init(); +#endif } /* }}} */ #endif @@ -982,7 +1042,7 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */ CG(map_ptr_base) = ZEND_MAP_PTR_BIASED_BASE(NULL); CG(map_ptr_size) = 0; CG(map_ptr_last) = 0; -#endif +#endif /* ZTS */ EG(error_reporting) = E_ALL & ~E_NOTICE; zend_interned_strings_init(); @@ -1077,6 +1137,10 @@ zend_result zend_post_startup(void) /* {{{ */ global_map_ptr_last = CG(map_ptr_last); #endif +#ifdef ZEND_CHECK_STACK_LIMIT + zend_call_stack_init(); +#endif + return SUCCESS; } /* }}} */ diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c new file mode 100644 index 0000000000000..dadaa60dcb208 --- /dev/null +++ b/Zend/zend_call_stack.c @@ -0,0 +1,457 @@ +/* + +----------------------------------------------------------------------+ + | Zend Engine | + +----------------------------------------------------------------------+ + | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.00 of the Zend license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.zend.com/license/2_00.txt. | + | If you did not receive a copy of the Zend license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@zend.com so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Arnaud Le Blanc | + +----------------------------------------------------------------------+ +*/ + +/* Inspired from Chromium's stack_util.cc */ + +#include "zend.h" +#include "zend_globals.h" +#include "zend_portability.h" +#include "zend_call_stack.h" +#include +#ifdef ZEND_WIN32 +# include +# include +#else /* ZEND_WIN32 */ +# include +# ifdef HAVE_UNISTD_H +# include +# endif +# ifdef HAVE_SYS_TYPES_H +# include +# endif +#endif /* ZEND_WIN32 */ +#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) +# include +#endif +#ifdef __FreeBSD__ +# include +# include +# include +# include +#endif +#ifdef __linux__ +#include +#endif + +#ifdef ZEND_CHECK_STACK_LIMIT + +/* Called once per process or thread */ +ZEND_API void zend_call_stack_init(void) { + if (!zend_call_stack_get(&EG(call_stack))) { + EG(call_stack) = (zend_call_stack){0}; + } + + switch (EG(max_allowed_stack_size)) { + case ZEND_MAX_ALLOWED_STACK_SIZE_DETECT: { + void *base = EG(call_stack).base; + size_t size = EG(call_stack).max_size; + if (UNEXPECTED(base == (void*)0)) { + base = zend_call_stack_position(); + size = zend_call_stack_default_size(); + /* base is not the actual stack base */ + size -= 32 * 1024; + } + EG(stack_base) = base; + EG(stack_limit) = zend_call_stack_limit(base, size, EG(reserved_stack_size)); + break; + } + case ZEND_MAX_ALLOWED_STACK_SIZE_UNCHECKED: { + EG(stack_base) = (void*)0; + EG(stack_limit) = (void*)0; + break; + } + default: { + ZEND_ASSERT(EG(max_allowed_stack_size) > 0); + void *base = EG(call_stack).base; + if (UNEXPECTED(base == (void*)0)) { + base = zend_call_stack_position(); + } + EG(stack_base) = base; + EG(stack_limit) = zend_call_stack_limit(base, EG(max_allowed_stack_size), EG(reserved_stack_size)); + break; + } + } +} + +#ifdef __linux__ +static bool zend_call_stack_is_main_thread(void) { +# ifdef HAVE_GETTID + return getpid() == gettid(); +# else + return getpid() == syscall(SYS_gettid); +# endif +} + +# ifdef HAVE_PTHREAD_GETATTR_NP +static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack) +{ + pthread_attr_t attr; + int error; + void *addr; + size_t max_size; + + /* pthread_getattr_np() will return bogus values for the main thread with + * musl or with some old glibc versions */ + ZEND_ASSERT(!zend_call_stack_is_main_thread()); + + error = pthread_getattr_np(pthread_self(), &attr); + if (error) { + return false; + } + + error = pthread_attr_getstack(&attr, &addr, &max_size); + if (error) { + return false; + } + +# if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)) + { + size_t guard_size; + /* In glibc prior to 2.8, addr and size include the guard pages */ + error = pthread_attr_getguardsize(&attr, &guard_size); + if (error) { + return false; + } + + addr = (int8_t*)addr + guard_size; + max_size -= guard_size; + } +# endif /* glibc < 2.8 */ + + stack->base = (int8_t*)addr + max_size; + stack->max_size = max_size; + + return true; +} +# else /* HAVE_PTHREAD_GETATTR_NP */ +static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack) +{ + return false; +} +# endif /* HAVE_PTHREAD_GETATTR_NP */ + +static bool zend_call_stack_get_linux_proc_maps(zend_call_stack *stack) +{ + FILE *f; + char buffer[4096]; + uintptr_t addr_on_stack = (uintptr_t)&buffer; + uintptr_t start, end, prev_end = 0; + size_t max_size; + bool found = false; + struct rlimit rlim; + int error; + + /* This method is relevant only for the main thread */ + ZEND_ASSERT(zend_call_stack_is_main_thread()); + + /* Scan the process memory mappings to find the one containing the stack. + * + * The end of the stack mapping is the base of the stack. The start is + * adjusted by the kernel as the stack grows. The maximum stack size is + * determined by RLIMIT_STACK and the previous mapping. + * + * + * ^ Higher addresses ^ + * : : + * : : + * Mapping end --> |-------------------| <-- Stack base (stack start) + * | | ^ + * | Stack Mapping | | Stack size + * | | v + * Mapping start --> |-------------------| <-- Current stack end + * (adjusted : : + * downwards as the . . + * stack grows) : : + * |-------------------| + * | Some Mapping | The previous mapping may prevent + * |-------------------| stack growth + * : : + * : : + * v Lower addresses v + */ + + f = fopen("/proc/self/maps", "r"); + if (!f) { + return false; + } + + while (fgets(buffer, sizeof(buffer), f) && sscanf(buffer, "%" SCNxPTR "-%" SCNxPTR, &start, &end) == 2) { + if (start <= addr_on_stack && end >= addr_on_stack) { + found = true; + break; + } + prev_end = end; + } + + fclose(f); + + if (!found) { + return false; + } + + error = getrlimit(RLIMIT_STACK, &rlim); + if (error || rlim.rlim_cur == RLIM_INFINITY) { + return false; + } + + max_size = rlim.rlim_cur; + + /* Previous mapping may prevent the stack from growing */ + if (end - max_size < prev_end) { + max_size = prev_end - end; + } + + stack->base = (void*)end; + stack->max_size = max_size; + + return true; +} + +static bool zend_call_stack_get_linux(zend_call_stack *stack) +{ + if (zend_call_stack_is_main_thread()) { + return zend_call_stack_get_linux_proc_maps(stack); + } + + return zend_call_stack_get_linux_pthread(stack); +} +#else /* __linux__ */ +static bool zend_call_stack_get_linux(zend_call_stack *stack) +{ + return false; +} +#endif /* __linux__ */ + +#ifdef __FreeBSD__ +static bool zend_call_stack_is_main_thread(void) +{ + int is_main = pthread_main_np(); + return is_main == -1 || is_main == 1; +} + +# if defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GET_STACK) +static bool zend_call_stack_get_freebsd_pthread(zend_call_stack *stack) +{ + pthread_attr_t attr; + int error; + void *addr; + size_t max_size; + size_t guard_size; + + /* pthread will return bogus values for the main thread */ + ZEND_ASSERT(!zend_call_stack_is_main_thread()); + + pthread_attr_init(&attr); + + error = pthread_attr_get_np(pthread_self(), &attr); + if (error) { + goto fail; + } + + error = pthread_attr_getstack(&attr, &addr, &max_size); + if (error) { + goto fail; + } + + stack->base = (int8_t*)addr + max_size; + stack->max_size = max_size; + + pthread_attr_destroy(&attr); + return true; + +fail: + pthread_attr_destroy(&attr); + return false; +} +# else /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GET_STACK) */ +static bool zend_call_stack_get_freebsd_pthread(zend_call_stack *stack) +{ + return false; +} +# endif /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GET_STACK) */ + +static bool zend_call_stack_get_freebsd_sysctl(zend_call_stack *stack) +{ + void *stack_base; + int mib[2] = {CTL_KERN, KERN_USRSTACK}; + size_t len = sizeof(stack_base); + struct rlimit rlim; + + /* This method is relevant only for the main thread */ + ZEND_ASSERT(zend_call_stack_is_main_thread()); + + if (sysctl(mib, sizeof(mib)/sizeof(*mib), &stack_base, &len, NULL, 0) != 0) { + return false; + } + + if (getrlimit(RLIMIT_STACK, &rlim) != 0) { + return false; + } + + if (rlim.rlim_cur == RLIM_INFINITY) { + return false; + } + + size_t guard_size = getpagesize(); + + stack->base = stack_base; + stack->max_size = rlim.rlim_cur - guard_size; + + return true; +} + +static bool zend_call_stack_get_freebsd(zend_call_stack *stack) +{ + if (zend_call_stack_is_main_thread()) { + return zend_call_stack_get_freebsd_sysctl(stack); + } + + return zend_call_stack_get_freebsd_pthread(stack); +} +#else +static bool zend_call_stack_get_freebsd(zend_call_stack *stack) +{ + return false; +} +#endif /* __FreeBSD__ */ + +#ifdef ZEND_WIN32 +static bool zend_call_stack_get_win32(zend_call_stack *stack) +{ + ULONG_PTR low_limit, high_limit; + ULONG size; + MEMORY_BASIC_INFORMATION guard_region = {0}, uncommitted_region = {0}; + size_t result_size, page_size; + + /* The stack consists of three regions: committed, guard, and uncommitted. + * Memory is committed when the guard region is accessed. If only one page + * is left in the uncommitted region, a stack overflow error is raised + * instead. + * + * The total useable stack size is the size of the committed and uncommitted + * regions less one page. + * + * http://blogs.msdn.com/b/satyem/archive/2012/08/13/thread-s-stack-memory-management.aspx + * https://learn.microsoft.com/en-us/windows/win32/procthread/thread-stack-size + * + * ^ Higher addresses ^ + * : : + * : : + * high_limit --> |--------------------| + * ^ | | + * | | Committed region | + * | | | + * | |------------------- | <-- guard_region.BaseAddress + * reserved | | | + guard_region.RegionSize + * size | | Guard region | + * | | | + * | |--------------------| <-- guard_region.BaseAddress, + * | | | uncommitted_region.BaseAddress + * | | Uncommitted region | + uncommitted_region.RegionSize + * v | | + * low_limit --> |------------------- | <-- uncommitted_region.BaseAddress + * : : + * : : + * v Lower addresses v + */ + + GetCurrentThreadStackLimits(&low_limit, &high_limit); + + result_size = VirtualQuery((void*)low_limit, + &uncommitted_region, sizeof(uncommitted_region)); + ZEND_ASSERT(result_size >= sizeof(uncommitted_region)); + + result_size = VirtualQuery((int8_t*)uncommitted_region.BaseAddress + uncommitted_region.RegionSize, + &guard_region, sizeof(guard_region)); + ZEND_ASSERT(result_size >= sizeof(uncommitted_region)); + + stack->base = (void*)high_limit; + stack->max_size = (uintptr_t)high_limit - (uintptr_t)low_limit; + + ZEND_ASSERT(stack->max_size > guard_region.RegionSize); + stack->max_size -= guard_region.RegionSize; + + /* The uncommitted region does not shrink below 1 page */ + page_size = zend_get_page_size(); + ZEND_ASSERT(stack->max_size > page_size); + stack->max_size -= page_size; + + return true; +} +#else /* ZEND_WIN32 */ +static bool zend_call_stack_get_win32(zend_call_stack *stack) +{ + return false; +} +#endif /* ZEND_WIN32 */ + +#if defined(__APPLE__) && defined(HAVE_PTHREAD_GET_STACKADDR_NP) +static bool zend_call_stack_get_macos(zend_call_stack *stack) +{ + void *base = pthread_get_stackaddr_np(pthread_self()); + size_t max_size; + + if (pthread_main_np()) { + /* pthread_get_stacksize_np() returns a too low value for the main + * thread in OSX 10.9, 10.10: + * https://mail.openjdk.org/pipermail/hotspot-dev/2013-October/011353.html + * https://github.com/rust-lang/rust/issues/43347 + */ + + /* Stack size is 8MiB by default for main threads + * https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html */ + max_size = 8 * 1024 * 1024; + } else { + max_size = pthread_get_stacksize_np(pthread_self()); + } + + stack->base = base; + stack->max_size = max_size; + + return true; +} +#else /* defined(__APPLE__) && defined(HAVE_PTHREAD_GET_STACKADDR_NP) */ +static bool zend_call_stack_get_macos(zend_call_stack *stack) +{ + return false; +} +#endif /* defined(__APPLE__) && defined(HAVE_PTHREAD_GET_STACKADDR_NP) */ + +/** Get the stack information for the calling thread */ +ZEND_API bool zend_call_stack_get(zend_call_stack *stack) +{ + if (zend_call_stack_get_linux(stack)) { + return true; + } + + if (zend_call_stack_get_freebsd(stack)) { + return true; + } + + if (zend_call_stack_get_win32(stack)) { + return true; + } + + if (zend_call_stack_get_macos(stack)) { + return true; + } + + return false; +} + +#endif /* ZEND_CHECK_STACK_LIMIT */ diff --git a/Zend/zend_call_stack.h b/Zend/zend_call_stack.h new file mode 100644 index 0000000000000..d73c333eeeae2 --- /dev/null +++ b/Zend/zend_call_stack.h @@ -0,0 +1,91 @@ +/* + +----------------------------------------------------------------------+ + | Zend Engine | + +----------------------------------------------------------------------+ + | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.00 of the Zend license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.zend.com/license/2_00.txt. | + | If you did not receive a copy of the Zend license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@zend.com so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Arnaud Le Blanc | + +----------------------------------------------------------------------+ +*/ + +#ifndef ZEND_CALL_STACK_H +#define ZEND_CALL_STACK_H + +#include "zend.h" +#include "zend_portability.h" +#ifdef __APPLE__ +# include +#endif + +#ifdef ZEND_CHECK_STACK_LIMIT + +typedef struct _zend_call_stack { + void *base; + size_t max_size; +} zend_call_stack; + +ZEND_API void zend_call_stack_init(void); + +ZEND_API bool zend_call_stack_get(zend_call_stack *stack); + +/** Returns an approximation of the current stack position */ +static zend_always_inline void *zend_call_stack_position(void) { +#ifdef ZEND_WIN32 + return _AddressOfReturnAddress(); +#elif HAVE_BUILTIN_FRAME_ADDRESS + return __builtin_frame_address(0); +#else + void *a; + void *pos = (void*)&a; + return pos; +#endif +} + +static zend_always_inline bool zend_call_stack_overflowed(void *stack_limit) { + return (uintptr_t) zend_call_stack_position() <= (uintptr_t) stack_limit; +} + +static inline void* zend_call_stack_limit(void *base, size_t size, size_t reserved_size) +{ + if (UNEXPECTED(size > (uintptr_t)base)) { + return (void*)0; + } + + base = (int8_t*)base - size; + + if (UNEXPECTED(UINTPTR_MAX - (uintptr_t)base < reserved_size)) { + return (void*)UINTPTR_MAX; + } + + return (int8_t*)base + reserved_size; +} + +static inline size_t zend_call_stack_default_size(void) +{ +#ifdef __linux__ + return 8 * 1024 * 1024; +#endif +#ifdef __FreeBSD__ + return 8 * 1024 * 1024; +#endif +#ifdef __APPLE__ + // https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html + if (pthread_main_np()) { + return 8 * 1024 * 1024; + } + return 512 * 1024; +#endif + + return 2 * 1024 * 1024; +} + +#endif /* ZEND_CHECK_STACK_LIMIT */ +#endif /* ZEND_CALL_STACK_H */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index fc5216b797082..4cb9b9c85305b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -34,6 +34,7 @@ #include "zend_vm.h" #include "zend_enum.h" #include "zend_observer.h" +#include "zend_call_stack.h" #define SET_NODE(target, src) do { \ target ## _type = (src)->op_type; \ @@ -10425,6 +10426,14 @@ static void zend_compile_expr_inner(znode *result, zend_ast *ast) /* {{{ */ static void zend_compile_expr(znode *result, zend_ast *ast) { +#ifdef ZEND_CHECK_STACK_LIMIT + if (UNEXPECTED(zend_call_stack_overflowed(EG(stack_limit)))) { + zend_error_noreturn(E_COMPILE_ERROR, + "Maximum call stack size of %zu bytes reached during compilation. Try splitting expression", + (size_t) ((uintptr_t) EG(stack_base) - (uintptr_t) EG(stack_limit))); + } +#endif /* ZEND_CHECK_STACK_LIMIT */ + uint32_t checkpoint = zend_short_circuiting_checkpoint(); zend_compile_expr_inner(result, ast); zend_short_circuiting_commit(checkpoint, result, ast); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index fc54a8e0262e1..b0f87eccb11c9 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -42,6 +42,7 @@ #include "zend_smart_str.h" #include "zend_observer.h" #include "zend_system_id.h" +#include "zend_call_stack.h" #include "Optimizer/zend_func_info.h" /* Virtual current working directory support */ @@ -2228,6 +2229,14 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_new_element_for_s zend_throw_error(NULL, "[] operator not supported for strings"); } +#ifdef ZEND_CHECK_STACK_LIMIT +static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_call_stack_size_error(void) +{ + zend_throw_error(NULL, "Maximum call stack size of %zu bytes reached. Infinite recursion?", + (size_t) ((uintptr_t) EG(stack_base) - (uintptr_t) EG(stack_limit))); +} +#endif /* ZEND_CHECK_STACK_LIMIT */ + static ZEND_COLD void zend_binary_assign_op_dim_slow(zval *container, zval *dim OPLINE_DC EXECUTE_DATA_DC) { if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 3c29ac7dc6090..17c3caae21432 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -37,6 +37,7 @@ #include "zend_weakrefs.h" #include "zend_inheritance.h" #include "zend_observer.h" +#include "zend_call_stack.h" #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index f5246e74251dd..f6065561793da 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -108,6 +108,10 @@ typedef struct _zend_fiber_vm_state { uint32_t jit_trace_num; JMP_BUF *bailout; zend_fiber *active_fiber; +#ifdef ZEND_CHECK_STACK_LIMIT + void *stack_base; + void *stack_limit; +#endif } zend_fiber_vm_state; static zend_always_inline void zend_fiber_capture_vm_state(zend_fiber_vm_state *state) @@ -121,6 +125,10 @@ static zend_always_inline void zend_fiber_capture_vm_state(zend_fiber_vm_state * state->jit_trace_num = EG(jit_trace_num); state->bailout = EG(bailout); state->active_fiber = EG(active_fiber); +#ifdef ZEND_CHECK_STACK_LIMIT + state->stack_base = EG(stack_base); + state->stack_limit = EG(stack_limit); +#endif } static zend_always_inline void zend_fiber_restore_vm_state(zend_fiber_vm_state *state) @@ -134,6 +142,10 @@ static zend_always_inline void zend_fiber_restore_vm_state(zend_fiber_vm_state * EG(jit_trace_num) = state->jit_trace_num; EG(bailout) = state->bailout; EG(active_fiber) = state->active_fiber; +#ifdef ZEND_CHECK_STACK_LIMIT + EG(stack_base) = state->stack_base; + EG(stack_limit) = state->stack_limit; +#endif } #ifdef ZEND_FIBER_UCONTEXT @@ -294,6 +306,31 @@ static void zend_fiber_stack_free(zend_fiber_stack *stack) efree(stack); } + +#ifdef ZEND_CHECK_STACK_LIMIT +ZEND_API void* zend_fiber_stack_limit(zend_fiber_stack *stack) +{ + zend_ulong reserve = EG(reserved_stack_size); + +#ifdef __APPLE__ + /* On Apple Clang, the stack probing function ___chkstk_darwin incorrectly + * probes a location that is twice the entered function's stack usage away + * from the stack pointer, when using an alternative stack. + * https://openradar.appspot.com/radar?id=5497722702397440 + */ + reserve = reserve * 2; +#endif + + /* stack->pointer is the end of the stack */ + return (int8_t*)stack->pointer + reserve; +} + +ZEND_API void* zend_fiber_stack_base(zend_fiber_stack *stack) +{ + return (void*)((uintptr_t)stack->pointer + stack->size); +} +#endif + #ifdef ZEND_FIBER_UCONTEXT static ZEND_NORETURN void zend_fiber_trampoline(void) #else @@ -535,6 +572,11 @@ static ZEND_STACK_ALIGNED void zend_fiber_execute(zend_fiber_transfer *transfer) EG(jit_trace_num) = 0; EG(error_reporting) = error_reporting; +#ifdef ZEND_CHECK_STACK_LIMIT + EG(stack_base) = zend_fiber_stack_base(fiber->context.stack); + EG(stack_limit) = zend_fiber_stack_limit(fiber->context.stack); +#endif + fiber->fci.retval = &fiber->result; zend_call_function(&fiber->fci, &fiber->fci_cache); diff --git a/Zend/zend_fibers.h b/Zend/zend_fibers.h index 2673e7814b093..5faa788f4ef68 100644 --- a/Zend/zend_fibers.h +++ b/Zend/zend_fibers.h @@ -136,6 +136,10 @@ struct _zend_fiber { ZEND_API bool zend_fiber_init_context(zend_fiber_context *context, void *kind, zend_fiber_coroutine coroutine, size_t stack_size); ZEND_API void zend_fiber_destroy_context(zend_fiber_context *context); ZEND_API void zend_fiber_switch_context(zend_fiber_transfer *transfer); +#ifdef ZEND_CHECK_STACK_LIMIT +ZEND_API void* zend_fiber_stack_limit(zend_fiber_stack *stack); +ZEND_API void* zend_fiber_stack_base(zend_fiber_stack *stack); +#endif /* ZEND_CHECK_STACK_LIMIT */ ZEND_API void zend_fiber_switch_block(void); ZEND_API void zend_fiber_switch_unblock(void); diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 17469fab0c11e..66ba9a6a32706 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -37,6 +37,7 @@ #include "zend_multibyte.h" #include "zend_multiply.h" #include "zend_arena.h" +#include "zend_call_stack.h" /* Define ZTS if you want a thread-safe Zend */ /*#undef ZTS*/ @@ -54,6 +55,10 @@ END_EXTERN_C() #define SYMTABLE_CACHE_SIZE 32 +#ifdef ZEND_CHECK_STACK_LIMIT +# define ZEND_MAX_ALLOWED_STACK_SIZE_UNCHECKED -1 +# define ZEND_MAX_ALLOWED_STACK_SIZE_DETECT 0 +#endif #include "zend_compile.h" @@ -193,6 +198,8 @@ struct _zend_executor_globals { zend_atomic_bool vm_interrupt; zend_atomic_bool timed_out; zend_long hard_timeout; + void *stack_base; + void *stack_limit; #ifdef ZEND_WIN32 OSVERSIONINFOEX windows_version_info; @@ -271,6 +278,12 @@ struct _zend_executor_globals { zend_string *filename_override; zend_long lineno_override; +#ifdef ZEND_CHECK_STACK_LIMIT + zend_call_stack call_stack; + zend_long max_allowed_stack_size; + zend_ulong reserved_stack_size; +#endif + void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 202bc3ad0097e..ff2cae79e414e 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -7928,6 +7928,12 @@ ZEND_VM_HELPER(zend_dispatch_try_catch_finally_helper, ANY, ANY, uint32_t try_ca ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) { const zend_op *throw_op = EG(opline_before_exception); + + /* Exception was thrown before executing any op */ + if (UNEXPECTED(!throw_op)) { + ZEND_VM_DISPATCH_TO_HELPER(zend_dispatch_try_catch_finally_helper, try_catch_offset, -1, 0, 0); + } + uint32_t throw_op_num = throw_op - EX(func)->op_array.opcodes; int i, current_try_catch_offset = -1; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 7d1545ba0fce1..8008cfd8b2794 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3181,6 +3181,12 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_dispatch_try static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { const zend_op *throw_op = EG(opline_before_exception); + + /* Exception was thrown before executing any op */ + if (UNEXPECTED(!throw_op)) { + ZEND_VM_TAIL_CALL(zend_dispatch_try_catch_finally_helper_SPEC(-1, 0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC)); + } + uint32_t throw_op_num = throw_op - EX(func)->op_array.opcodes; int i, current_try_catch_offset = -1; @@ -55774,6 +55780,16 @@ ZEND_API void execute_ex(zend_execute_data *ex) LOAD_OPLINE(); ZEND_VM_LOOP_INTERRUPT_CHECK(); +#ifdef ZEND_CHECK_STACK_LIMIT + if (UNEXPECTED(zend_call_stack_overflowed(EG(stack_limit)))) { + zend_call_stack_size_error(); + /* No opline was executed before exception */ + EG(opline_before_exception) = NULL; + LOAD_OPLINE(); + /* Fall through to handle exception below. */ + } +#endif /* ZEND_CHECK_STACK_LIMIT */ + while (1) { #if !defined(ZEND_VM_FP_GLOBAL_REG) || !defined(ZEND_VM_IP_GLOBAL_REG) int ret; diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl index 582ec490e2d77..a131eead57205 100644 --- a/Zend/zend_vm_execute.skl +++ b/Zend/zend_vm_execute.skl @@ -16,6 +16,16 @@ ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *ex) LOAD_OPLINE(); ZEND_VM_LOOP_INTERRUPT_CHECK(); +#ifdef ZEND_CHECK_STACK_LIMIT + if (UNEXPECTED(zend_call_stack_overflowed(EG(stack_limit)))) { + zend_call_stack_size_error(); + /* No opline was executed before exception */ + EG(opline_before_exception) = NULL; + LOAD_OPLINE(); + /* Fall through to handle exception below. */ + } +#endif /* ZEND_CHECK_STACK_LIMIT */ + while (1) { {%ZEND_VM_CONTINUE_LABEL%} {%ZEND_VM_DISPATCH%} { diff --git a/build/php.m4 b/build/php.m4 index e4bef9d9f2d14..34652da7d8d29 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2733,6 +2733,26 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [ [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports]) ]) +dnl +dnl PHP_CHECK_BUILTIN_FRAME_ADDRESS +dnl +AC_DEFUN([PHP_CHECK_BUILTIN_FRAME_ADDRESS], [ + AC_MSG_CHECKING([for __builtin_frame_address]) + + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ + return __builtin_frame_address(0) != (void*)0; + ]])], [ + have_builtin_frame_address=1 + AC_MSG_RESULT([yes]) + ], [ + have_builtin_frame_address=0 + AC_MSG_RESULT([no]) + ]) + + AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_FRAME_ADDRESS], + [$have_builtin_frame_address], [Whether the compiler supports __builtin_frame_address]) +]) + dnl dnl PHP_PATCH_CONFIG_HEADERS([FILE]) dnl diff --git a/configure.ac b/configure.ac index a64ca2d042f72..690b6ad0a26e4 100644 --- a/configure.ac +++ b/configure.ac @@ -510,6 +510,8 @@ dnl Check __builtin_cpu_init PHP_CHECK_BUILTIN_CPU_INIT dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS +dnl Check __builtin_frame_address +PHP_CHECK_BUILTIN_FRAME_ADDRESS dnl Check prctl PHP_CHECK_PRCTL dnl Check procctl @@ -1701,7 +1703,7 @@ PHP_ADD_SOURCES_X(/main, internal_functions_cli.c, -DZEND_ENABLE_STATIC_TSRMLS_C PHP_ADD_SOURCES(Zend, \ zend_language_parser.c zend_language_scanner.c \ zend_ini_parser.c zend_ini_scanner.c \ - zend_alloc.c zend_compile.c zend_constants.c zend_dtrace.c \ + zend_alloc.c zend_call_stack.c zend_compile.c zend_constants.c zend_dtrace.c \ zend_execute_API.c zend_highlight.c zend_llist.c \ zend_vm_opcodes.c zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \ zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \ diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 6d9b7ec8ffdcd..b2539f5c3f429 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -21,7 +21,7 @@ static ZEND_COLD void undef_result_after_exception(void) { const zend_op *opline = EG(opline_before_exception); ZEND_ASSERT(EG(exception)); - if (opline->result_type & (IS_VAR | IS_TMP_VAR)) { + if (opline && opline->result_type & (IS_VAR | IS_TMP_VAR)) { zend_execute_data *execute_data = EG(current_execute_data); ZVAL_UNDEF(EX_VAR(opline->result.var)); } @@ -785,7 +785,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di if (UNEXPECTED(opline->opcode == ZEND_HANDLE_EXCEPTION)) { opline = EG(opline_before_exception); } - if (!zend_jit_undefined_op_helper_write(ht, opline->op2.var)) { + if (opline && !zend_jit_undefined_op_helper_write(ht, opline->op2.var)) { if (opline->result_type & (IS_VAR | IS_TMP_VAR)) { if (EG(exception)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -1003,7 +1003,8 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim default: zend_jit_illegal_offset(); undef_result_after_exception(); - if ((EG(opline_before_exception)+1)->opcode == ZEND_OP_DATA + if (EG(opline_before_exception) + && (EG(opline_before_exception)+1)->opcode == ZEND_OP_DATA && ((EG(opline_before_exception)+1)->op1_type & (IS_VAR|IS_TMP_VAR))) { zend_execute_data *execute_data = EG(current_execute_data); diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 5342731fc81b7..8e02fbbbfeac2 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -183,7 +183,7 @@ bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D) zend_execute_data *execute_data = EG(current_execute_data); #endif const zend_op *opline = EG(opline_before_exception); - if (RETURN_VALUE_USED(opline)) { + if (opline && RETURN_VALUE_USED(opline)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); } diff --git a/ext/zend_test/fiber.c b/ext/zend_test/fiber.c index f67c0217d050f..428ecc0682dac 100644 --- a/ext/zend_test/fiber.c +++ b/ext/zend_test/fiber.c @@ -95,6 +95,10 @@ static ZEND_STACK_ALIGNED void zend_test_fiber_execute(zend_fiber_transfer *tran EG(current_execute_data) = execute_data; EG(jit_trace_num) = 0; +#ifdef ZEND_CHECK_STACK_LIMIT + EG(stack_base) = zend_fiber_stack_base(fiber->context.stack); + EG(stack_limit) = zend_fiber_stack_limit(fiber->context.stack); +#endif fiber->fci.retval = &retval; zend_call_function(&fiber->fci, &fiber->fci_cache); diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index afba5a3614efd..9ec9455023319 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -30,6 +30,7 @@ #include "zend_weakrefs.h" #include "Zend/Optimizer/zend_optimizer.h" #include "test_arginfo.h" +#include "zend_call_stack.h" ZEND_DECLARE_MODULE_GLOBALS(zend_test) @@ -456,6 +457,65 @@ static ZEND_FUNCTION(zend_test_parameter_with_attribute) RETURN_LONG(1); } +#ifdef ZEND_CHECK_STACK_LIMIT +static ZEND_FUNCTION(zend_test_zend_call_stack_get) +{ + zend_call_stack stack; + + ZEND_PARSE_PARAMETERS_NONE(); + + if (zend_call_stack_get(&stack)) { + zend_string *str; + + array_init(return_value); + + str = strpprintf(0, "%p", stack.base); + add_assoc_str(return_value, "base", str); + + str = strpprintf(0, "0x%zx", stack.max_size); + add_assoc_str(return_value, "max_size", str); + + str = strpprintf(0, "%p", zend_call_stack_position()); + add_assoc_str(return_value, "position", str); + + str = strpprintf(0, "%p", EG(stack_limit)); + add_assoc_str(return_value, "EG(stack_limit)", str); + + return; + } + + RETURN_NULL(); +} + +zend_long (*volatile zend_call_stack_use_all_fun)(void *limit); + +static zend_long zend_call_stack_use_all(void *limit) +{ + if (zend_call_stack_overflowed(limit)) { + return 1; + } + + return 1 + zend_call_stack_use_all_fun(limit); +} + +static ZEND_FUNCTION(zend_test_zend_call_stack_use_all) +{ + zend_call_stack stack; + + ZEND_PARSE_PARAMETERS_NONE(); + + if (!zend_call_stack_get(&stack)) { + return; + } + + zend_call_stack_use_all_fun = zend_call_stack_use_all; + + void *limit = zend_call_stack_limit(stack.base, stack.max_size, 4096); + + RETURN_LONG(zend_call_stack_use_all(limit)); +} +#endif /* ZEND_CHECK_STACK_LIMIT */ + static zend_object *zend_test_class_new(zend_class_entry *class_type) { zend_object *obj = zend_objects_new(class_type); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index a0a042a8297df..95b26fabd0093 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -161,6 +161,11 @@ function zend_test_zend_ini_parse_quantity(string $str): int {} function zend_test_zend_ini_parse_uquantity(string $str): int {} function zend_test_zend_ini_str(): string {} + +#ifdef ZEND_CHECK_STACK_LIMIT + function zend_test_zend_call_stack_get(): ?array {} + function zend_test_zend_call_stack_use_all(): int {} +#endif } namespace ZendTestNS { diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 14e9c29bd103d..52fd88d008c93 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 786b35a1fbff38215431d5ae46a5816c70defce5 */ + * Stub hash: 5c7af89178bc4ea0f49fbf516d81f4fdaebece22 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -97,6 +97,16 @@ ZEND_END_ARG_INFO() #define arginfo_zend_test_zend_ini_str arginfo_zend_get_current_func_name +#if defined(ZEND_CHECK_STACK_LIMIT) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_call_stack_get, 0, 0, IS_ARRAY, 1) +ZEND_END_ARG_INFO() +#endif + +#if defined(ZEND_CHECK_STACK_LIMIT) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_call_stack_use_all, 0, 0, IS_LONG, 0) +ZEND_END_ARG_INFO() +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -185,6 +195,12 @@ static ZEND_FUNCTION(zend_call_method); static ZEND_FUNCTION(zend_test_zend_ini_parse_quantity); static ZEND_FUNCTION(zend_test_zend_ini_parse_uquantity); static ZEND_FUNCTION(zend_test_zend_ini_str); +#if defined(ZEND_CHECK_STACK_LIMIT) +static ZEND_FUNCTION(zend_test_zend_call_stack_get); +#endif +#if defined(ZEND_CHECK_STACK_LIMIT) +static ZEND_FUNCTION(zend_test_zend_call_stack_use_all); +#endif static ZEND_FUNCTION(ZendTestNS2_namespaced_func); static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func); static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func); @@ -235,6 +251,12 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(zend_test_zend_ini_parse_quantity, arginfo_zend_test_zend_ini_parse_quantity) ZEND_FE(zend_test_zend_ini_parse_uquantity, arginfo_zend_test_zend_ini_parse_uquantity) ZEND_FE(zend_test_zend_ini_str, arginfo_zend_test_zend_ini_str) +#if defined(ZEND_CHECK_STACK_LIMIT) + ZEND_FE(zend_test_zend_call_stack_get, arginfo_zend_test_zend_call_stack_get) +#endif +#if defined(ZEND_CHECK_STACK_LIMIT) + ZEND_FE(zend_test_zend_call_stack_use_all, arginfo_zend_test_zend_call_stack_use_all) +#endif ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func) ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func) ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func) diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 344b9c73e476d..b381f574fc10a 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -611,7 +611,7 @@ PHPDBG_API bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zend_obj uint32_t op_num, i; zend_op_array *op_array = &execute_data->func->op_array; - if (execute_data->opline >= EG(exception_op) && execute_data->opline < EG(exception_op) + 3) { + if (execute_data->opline >= EG(exception_op) && execute_data->opline < EG(exception_op) + 3 && EG(opline_before_exception)) { op = EG(opline_before_exception); } else { op = execute_data->opline; diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 0b1736c8ab70d..20fcf2409922f 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -228,8 +228,8 @@ STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \ - zend_ini_parser.c zend_ini_scanner.c zend_alloc.c zend_compile.c \ - zend_constants.c zend_exceptions.c \ + zend_ini_parser.c zend_ini_scanner.c zend_alloc.c zend_call_stack.c \ + zend_compile.c zend_constants.c zend_exceptions.c \ zend_execute_API.c zend_highlight.c \ zend_llist.c zend_vm_opcodes.c zend_opcode.c zend_operators.c zend_ptr_stack.c \ zend_stack.c zend_variables.c zend.c zend_API.c zend_extensions.c \ @@ -303,6 +303,9 @@ if (VS_TOOLSET && VCVERS >= 1914) { AC_DEFINE('HAVE_STRNLEN', 1); +AC_DEFINE('ZEND_STACK_GROWS_DOWNWARDS', 1) +AC_DEFINE('ZEND_CHECK_STACK_LIMIT', 1) + ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c \ userspace.c transports.c xp_socket.c mmap.c glob_wrapper.c"); ADD_FLAG("CFLAGS_BD_MAIN_STREAMS", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 7686fb83a4a32..b513776eef70d 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -5,7 +5,7 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x0601 +#define _WIN32_WINNT 0x0602 #define NTDDI_VERSION 0x06010000 /* Default PHP / PEAR directories */ From 0ff4a9accd32279d93c52ee6b1c8bbcc611d44c0 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 16 Dec 2022 18:03:48 +0100 Subject: [PATCH 012/895] [ci skip] UPGRADING --- UPGRADING.INTERNALS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 47f37cf1c92cf..d6911af58db1d 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -16,6 +16,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES * zend_class_entry now possesses a default_object_handlers field, which provides a default object handler when create_object() is not overriding it. +* Custom Fiber implementations have to initialize EG(stack_limit) and + EG(stack_base). +* EG(opline_before_exception) may now be null if the VM throws an exception + before executing any opline. ======================== 2. Build system changes @@ -28,6 +32,7 @@ PHP 8.3 INTERNALS UPGRADE NOTES a. ext/json - A new function php_json_validate_ex has been added to check if the provided C string is valid for the given depth and options. + ======================== 4. OpCode changes ======================== @@ -35,3 +40,6 @@ PHP 8.3 INTERNALS UPGRADE NOTES ======================== 5. SAPI changes ======================== + +* SAPIs that may execute in alternative stacks have to set EG(stack_limit) and + EG(stack_base) From 027add9e1bf935c2d874f736105cced87fdeb226 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 16 Dec 2022 18:14:22 +0100 Subject: [PATCH 013/895] [ci skip] UPGRADING --- UPGRADING | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/UPGRADING b/UPGRADING index 7a6fdac636bb1..a321d89ee04a1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,12 @@ PHP 8.3 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- Core: + . Programs that were very close to overflowing the call stack may now throw an + Error when using more than + `zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack + (`fiber.stack_size-zend.reserved_stack_size` for fibers). + ======================================== 2. New Features ======================================== @@ -104,6 +110,26 @@ PHP 8.3 UPGRADE NOTES 11. Changes to INI File Handling ======================================== +- zend.max_allowed_stack_size + . New INI directive to set the maximum allowed stack size. Possible + values are `0` (detect the process or thread maximum stack size), `-1` + (no limit), or a positive number of bytes. The default is `0`. When it + is not possible to detect the the process or thread maximum stack size, + a known system default is used. Setting this value too high has the same + effect as disabling the stack size limit. Fibers use fiber.stack_size + as maximum allowed stack size. An Error is thrown when the process call + stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size` + bytes, to prevent stack-overflow-induced segmentation faults, with + the goal of making debugging easier. The stack size increases during + uncontrolled recursions involving internal functions or the magic methods + __toString, __clone, __sleep, __destruct. This is not related to stack + buffer overflows, and is not a security feature. + +- zend.reserved_stack_size + . New INI directive to set the reserved stack size, in bytes. This is + subtracted from the max allowed stack size, as a buffer, when checking the + stack size. + ======================================== 12. Windows Support ======================================== @@ -112,6 +138,13 @@ PHP 8.3 UPGRADE NOTES 13. Other Changes ======================================== +- Core: + . An Error is now thrown when the process call stack exceeds a certain size, + to prevent stack-overflow-induced segmentation faults, with the goal of + making debugging easier. The maximum allowed stack size is controlled + by the INI directives zend.max_allowed_stack_size, zend.reserved_stack_size, + and fiber.stack_size. + - FFI: . FFI::load() is now allowed during preloading when opcache.preload_user is the current system user. Previously, calling FFI::load() was not possible during From 6d9d2eb3552c1bfc72486e9680bdbc90a63cca3e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 17 Dec 2022 12:47:02 +0100 Subject: [PATCH 014/895] Optimize JMP[N]Z_EX to BOOL instead of QM_ASSIGN (#10108) && and || should always evaluate to a boolean instead of the lhs/rhs. This optimization never gets triggered for any of our tests. Additionally, even if triggered this instruction gets optimized away because the else branch of the JMP instruction will overwrite the tmp value. --- Zend/Optimizer/dfa_pass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/Optimizer/dfa_pass.c b/Zend/Optimizer/dfa_pass.c index 970557daf9a22..0594993421cb9 100644 --- a/Zend/Optimizer/dfa_pass.c +++ b/Zend/Optimizer/dfa_pass.c @@ -847,7 +847,7 @@ static int zend_dfa_optimize_jmps(zend_op_array *op_array, zend_ssa *ssa) goto optimize_jmpz; } else if (opline->op1_type == IS_CONST) { if (zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { - opline->opcode = ZEND_QM_ASSIGN; + opline->opcode = ZEND_BOOL; take_successor_1(ssa, block_num, block); } } @@ -861,7 +861,7 @@ static int zend_dfa_optimize_jmps(zend_op_array *op_array, zend_ssa *ssa) goto optimize_jmpnz; } else if (opline->op1_type == IS_CONST) { if (!zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { - opline->opcode = ZEND_QM_ASSIGN; + opline->opcode = ZEND_BOOL; take_successor_1(ssa, block_num, block); } } From e2884383738c5b4f6546b3c9b78002eb0f98bf62 Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Sun, 18 Dec 2022 03:19:10 +0100 Subject: [PATCH 015/895] Remove unnecessary check of p in phpdbg_trim (#10122) The check checks whether p is non-NULL. But if it were NULL the function would crash in later code, so the check is useless. It seems like *p was intended, but that is redundant as well because isspace would return false on '\0'. --- sapi/phpdbg/phpdbg_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index b381f574fc10a..17c550f71735d 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -199,7 +199,7 @@ PHPDBG_API char *phpdbg_trim(const char *str, size_t len, size_t *new_len) /* {{ const char *p = str; char *new = NULL; - while (p && isspace(*p)) { + while (isspace(*p)) { ++p; --len; } From 744ca16e73cfdf4fdd40cc58e62aa56f39f42aa2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 14 Dec 2022 14:11:10 +0200 Subject: [PATCH 016/895] Speed boost for mb_stripos (when not using UTF-8) Instead of case-folding a string and then converting it to UTF-8 as a separate operation, why not convert it to UTF-8 at the same time as we fold case? For non-UTF-8 encodings, this typically makes mb_stripos about 2x faster. --- ext/mbstring/mbstring.c | 8 ++++---- ext/mbstring/php_unicode.c | 4 ++-- ext/mbstring/php_unicode.h | 2 +- ext/mbstring/tests/mb_stripos.phpt | 23 +++++++++++------------ 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index e219a6bdb7943..d0d724f640af9 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2878,7 +2878,7 @@ PHP_FUNCTION(mb_convert_encoding) static zend_string *mbstring_convert_case(php_case_mode case_mode, const char *str, size_t str_len, const mbfl_encoding *enc) { - return php_unicode_convert_case(case_mode, str, str_len, enc, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); + return php_unicode_convert_case(case_mode, str, str_len, enc, enc, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); } PHP_FUNCTION(mb_convert_case) @@ -4858,10 +4858,10 @@ MBSTRING_API size_t php_mb_stripos(bool mode, zend_string *haystack, zend_string { /* We're using simple case-folding here, because we'd have to deal with remapping of * offsets otherwise. */ - zend_string *haystack_conv = mbstring_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc); - zend_string *needle_conv = mbstring_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(needle), ZSTR_LEN(needle), enc); + zend_string *haystack_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); + zend_string *needle_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); - size_t n = mb_find_strpos(haystack_conv, needle_conv, enc, offset, mode); + size_t n = mb_find_strpos(haystack_conv, needle_conv, &mbfl_encoding_utf8, offset, mode); zend_string_free(haystack_conv); zend_string_free(needle_conv); diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index e07490c884e7d..bd1d5684163dc 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -238,7 +238,7 @@ static uint32_t *emit_special_casing_sequence(uint32_t w, uint32_t *out) return out; } -MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, const char *srcstr, size_t in_len, const mbfl_encoding *src_encoding, int illegal_mode, uint32_t illegal_substchar) +MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, const char *srcstr, size_t in_len, const mbfl_encoding *src_encoding, const mbfl_encoding *dst_encoding, int illegal_mode, uint32_t illegal_substchar) { /* A Unicode codepoint can expand out to up to 3 codepoints when uppercased, lowercased, or title cased * See http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt */ @@ -363,7 +363,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons } ZEND_ASSERT(p - converted_buf <= 192); - src_encoding->from_wchar(converted_buf, p - converted_buf, &buf, !in_len); + dst_encoding->from_wchar(converted_buf, p - converted_buf, &buf, !in_len); } return mb_convert_buf_result(&buf); diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h index b65b347df1ba0..1326761943dc5 100644 --- a/ext/mbstring/php_unicode.h +++ b/ext/mbstring/php_unicode.h @@ -91,7 +91,7 @@ typedef enum { MBSTRING_API zend_string *php_unicode_convert_case( php_case_mode case_mode, const char *srcstr, size_t srclen, - const mbfl_encoding *src_encoding, int illegal_mode, uint32_t illegal_substchar); + const mbfl_encoding *src_encoding, const mbfl_encoding *dst_encoding, int illegal_mode, uint32_t illegal_substchar); /* Optimize the common ASCII case for lower/upper */ diff --git a/ext/mbstring/tests/mb_stripos.phpt b/ext/mbstring/tests/mb_stripos.phpt index 1383cd5ed2e7a..7f4898a0f5169 100644 --- a/ext/mbstring/tests/mb_stripos.phpt +++ b/ext/mbstring/tests/mb_stripos.phpt @@ -9,9 +9,8 @@ mbstring ini_set('include_path','.'); include_once('common.inc'); - // Test string -$euc_jp = '0123ʸܸǤEUC-JPȤäƤޤ0123ܸݽ'; +$euc_jp = "0123\xA4\xB3\xA4\xCE\xCA\xB8\xBB\xFA\xCE\xF3\xA4\xCF\xC6\xFC\xCB\xDC\xB8\xEC\xA4\xC7\xA4\xB9\xA1\xA3EUC-JP\xA4\xF2\xBB\xC8\xA4\xC3\xA4\xC6\xA4\xA4\xA4\xDE\xA4\xB9\xA1\xA30123\xC6\xFC\xCB\xDC\xB8\xEC\xA4\xCF\xCC\xCC\xC5\xDD\xBD\xAD\xA4\xA4\xA1\xA3"; $slen = mb_strlen($euc_jp, 'EUC-JP'); echo "String len: $slen\n"; @@ -21,11 +20,11 @@ mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); echo "== POSITIVE OFFSET ==\n"; -print mb_stripos($euc_jp, 'ܸ', 0, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 0, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, '0', 0, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, 0, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, 0, 'EUC-JP') . "\n"; -print mb_stripos($euc_jp, 'ܸ', 15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, '0', 15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, 15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, 15, 'EUC-JP') . "\n"; @@ -34,7 +33,7 @@ print mb_stripos($euc_jp, 0, 15, 'EUC-JP') . "\n"; // Negative offset echo "== NEGATIVE OFFSET ==\n"; -print mb_stripos($euc_jp, 'ܸ', -15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, '0', -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, -15, 'EUC-JP') . "\n"; @@ -44,7 +43,7 @@ print mb_stripos($euc_jp, 0, -43, 'EUC-JP') . "\n"; // Out of range - should return false print ("== OUT OF RANGE ==\n"); -$r = mb_stripos($euc_jp, 'ܸ', 40, 'EUC-JP'); +$r = mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, '0', 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; @@ -52,7 +51,7 @@ $r = mb_stripos($euc_jp, 3, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, 0, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_stripos($euc_jp, 'ܸ', -3, 'EUC-JP'); +$r = mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, '0', -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; @@ -65,7 +64,7 @@ $r = mb_stripos($euc_jp, 0, -3, 'EUC-JP'); // Non-existent echo "== NON-EXISTENT ==\n"; -$r = mb_stripos($euc_jp, 'ڹ', 0, 'EUC-JP'); +$r = mb_stripos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_stripos($euc_jp, "\n", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -76,12 +75,12 @@ echo "== NO ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_stripos($euc_jp, 'ܸ', 0) . "\n"; +print mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 0) . "\n"; print mb_stripos($euc_jp, '0', 0) . "\n"; print mb_stripos($euc_jp, 3, 0) . "\n"; print mb_stripos($euc_jp, 0, 0) . "\n"; -$r = mb_stripos($euc_jp, 'ڹ', 0); +$r = mb_stripos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC", 0); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_stripos($euc_jp, "\n", 0); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -91,12 +90,12 @@ echo "== NO OFFSET AND ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_stripos($euc_jp, 'ܸ') . "\n"; +print mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC") . "\n"; print mb_stripos($euc_jp, '0') . "\n"; print mb_stripos($euc_jp, 3) . "\n"; print mb_stripos($euc_jp, 0) . "\n"; -$r = mb_stripos($euc_jp, 'ڹ'); +$r = mb_stripos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC"); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_stripos($euc_jp, "\n"); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; From 7f445595167335d9be71b03b1945b3c2e481f16d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 14 Dec 2022 15:57:58 +0200 Subject: [PATCH 017/895] mb_str{i,}pos does not match illegal byte sequences against occurrences of mb_substitute_char In GitHub issue 9613, it was reported that mb_strpos wrongly matches the character '?' against any invalid string, even when the character '?' clearly does not appear in the invalid string. This behavior has existed at least since PHP 5.2. The reason for the behavior is that mb_strpos internally converts the haystack and needle to UTF-8 before performing a search. When converting to UTF-8, regardless of the setting of mb_substitute_character, libmbfl would use '?' as an error marker for invalid byte sequences. Once those invalid input sequences were replaced with '?', then naturally, they would match against occurrences of the actual character '?' (when it appeared as a 'normal' character, not as an error marker). This would happen regardless of whether the error was in the haystack and '?' was used in the needle, or whether the error was in the needle and '?' was used in the haystack. Why would libmbfl use '?' rather than the mb_substitute_character set by the user? Remember that libmbfl was originally a separate library which was imported into the PHP codebase. mb_substitute_character is an mbstring API function, not something built into libmbfl. When mbstring would call into libmbfl, it would provide the error replacement character to libmbfl as a parameter. However, when libmbfl would perform conversion operations internally, and not because of a direct call from mbstring, it would use its own error replacement character. Example: no_encoding)) { - haystack_u8 = php_mb_convert_encoding_ex(ZSTR_VAL(haystack), ZSTR_LEN(haystack), &mbfl_encoding_utf8, enc); - needle_u8 = php_mb_convert_encoding_ex(ZSTR_VAL(needle), ZSTR_LEN(needle), &mbfl_encoding_utf8, enc); + unsigned int num_errors = 0; + haystack_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); + needle_u8 = mb_fast_convert((unsigned char*)ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, 0, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, &num_errors); } else { haystack_u8 = haystack; needle_u8 = needle; @@ -4858,8 +4859,8 @@ MBSTRING_API size_t php_mb_stripos(bool mode, zend_string *haystack, zend_string { /* We're using simple case-folding here, because we'd have to deal with remapping of * offsets otherwise. */ - zend_string *haystack_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); - zend_string *needle_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); + zend_string *haystack_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(haystack), ZSTR_LEN(haystack), enc, &mbfl_encoding_utf8, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, 0); + zend_string *needle_conv = php_unicode_convert_case(PHP_UNICODE_CASE_FOLD_SIMPLE, ZSTR_VAL(needle), ZSTR_LEN(needle), enc, &mbfl_encoding_utf8, MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8, 0); size_t n = mb_find_strpos(haystack_conv, needle_conv, &mbfl_encoding_utf8, offset, mode); diff --git a/ext/mbstring/tests/mb_stripos.phpt b/ext/mbstring/tests/mb_stripos.phpt index 7f4898a0f5169..9e7e33dadd954 100644 --- a/ext/mbstring/tests/mb_stripos.phpt +++ b/ext/mbstring/tests/mb_stripos.phpt @@ -41,7 +41,7 @@ print mb_stripos($euc_jp, 0, -43, 'EUC-JP') . "\n"; // Out of range - should return false -print ("== OUT OF RANGE ==\n"); +print "== OUT OF RANGE ==\n"; $r = mb_stripos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; @@ -100,6 +100,22 @@ $r = mb_stripos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC"); $r = mb_stripos($euc_jp, "\n"); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; +echo "== INVALID STRINGS ==\n"; + +// Previously, mb_stripos would internally convert invalid byte sequences to the +// mb_substitute_char BEFORE performing search +// So invalid byte sequences would match the substitute char, both from haystack +// to needle and needle to haystack + +mb_substitute_character(0x25); // '%' +var_dump(mb_stripos("abc%%", "\xFF", 0, "UTF-8")); // should be false +var_dump(mb_stripos("abc\xFF", "%", 0, "UTF-8")); // should be false + +// However, invalid byte sequences can still match invalid byte sequences: +var_dump(mb_stripos("abc\x80\x80", "\xFF", 0, "UTF-8")); +var_dump(mb_stripos("abc\xFF", "c\x80", 0, "UTF-8")); + + ?> --EXPECT-- String len: 43 @@ -144,3 +160,8 @@ OK_NEWLINE 0 OK_STR OK_NEWLINE +== INVALID STRINGS == +bool(false) +bool(false) +int(3) +int(2) diff --git a/ext/mbstring/tests/mb_strpos.phpt b/ext/mbstring/tests/mb_strpos.phpt index 2b9e13543942e..f0f16a806e7b3 100644 --- a/ext/mbstring/tests/mb_strpos.phpt +++ b/ext/mbstring/tests/mb_strpos.phpt @@ -11,7 +11,7 @@ include_once('common.inc'); // Test string -$euc_jp = '0123ʸܸǤEUC-JPȤäƤޤ0123ܸݽ'; +$euc_jp = "0123\xA4\xB3\xA4\xCE\xCA\xB8\xBB\xFA\xCE\xF3\xA4\xCF\xC6\xFC\xCB\xDC\xB8\xEC\xA4\xC7\xA4\xB9\xA1\xA3EUC-JP\xA4\xF2\xBB\xC8\xA4\xC3\xA4\xC6\xA4\xA4\xA4\xDE\xA4\xB9\xA1\xA30123\xC6\xFC\xCB\xDC\xB8\xEC\xA4\xCF\xCC\xCC\xC5\xDD\xBD\xAD\xA4\xA4\xA1\xA3"; $slen = mb_strlen($euc_jp, 'EUC-JP'); echo "String len: $slen\n"; @@ -21,11 +21,11 @@ mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); echo "== POSITIVE OFFSET ==\n"; -print mb_strpos($euc_jp, 'ܸ', 0, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 0, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, '0', 0, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, 0, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, 0, 'EUC-JP') . "\n"; -print mb_strpos($euc_jp, 'ܸ', 15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, '0', 15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, 15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n"; @@ -34,7 +34,7 @@ print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n"; // Negative offset echo "== NEGATIVE OFFSET ==\n"; -print mb_strpos($euc_jp, 'ܸ', -15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, '0', -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, -15, 'EUC-JP') . "\n"; @@ -44,7 +44,7 @@ print mb_strpos($euc_jp, 0, -43, 'EUC-JP') . "\n"; // Non-existent echo "== NON-EXISTENT ==\n"; -$r = mb_strpos($euc_jp, 'ڹ', 0, 'EUC-JP'); +$r = mb_strpos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_strpos($euc_jp, "\n", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -55,12 +55,12 @@ echo "== NO ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_strpos($euc_jp, 'ܸ', 0) . "\n"; +print mb_strpos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC", 0) . "\n"; print mb_strpos($euc_jp, '0', 0) . "\n"; print mb_strpos($euc_jp, 3, 0) . "\n"; print mb_strpos($euc_jp, 0, 0) . "\n"; -$r = mb_strpos($euc_jp, 'ڹ', 0); +$r = mb_strpos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC", 0); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_strpos($euc_jp, "\n", 0); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -70,16 +70,39 @@ echo "== NO OFFSET AND ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_strpos($euc_jp, 'ܸ') . "\n"; +print mb_strpos($euc_jp, "\xC6\xFC\xCB\xDC\xB8\xEC") . "\n"; print mb_strpos($euc_jp, '0') . "\n"; print mb_strpos($euc_jp, 3) . "\n"; print mb_strpos($euc_jp, 0) . "\n"; -$r = mb_strpos($euc_jp, 'ڹ'); +$r = mb_strpos($euc_jp, "\xB4\xDA\xB9\xF1\xB8\xEC"); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; $r = mb_strpos($euc_jp, "\n"); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; +echo "== INVALID STRINGS ==\n"; + +// Previously, mb_strpos would internally convert invalid byte sequences to '?' +// BEFORE performing search +// (This was regardless of the setting of mb_substitute_char) +// So invalid byte sequences would match '?', both from haystack to needle +// and needle to haystack + +var_dump(mb_strpos("abc??", "\xFF", 0, "UTF-8")); // should be false +var_dump(mb_strpos("abc\xFF", "?", 0, "UTF-8")); // should be false + +// However, invalid byte sequences can still match other invalid byte +// sequences for non-UTF-8 encodings only: +var_dump(mb_strpos("\x00a\x00b\x00c\xDF\xFF", "\xDB\x00", 0, "UTF-16BE")); + +// For UTF-8, invalid byte sequences match the exact same invalid sequence, +// but not a different one +var_dump(mb_strpos("abc\x80\x80", "\xFF", 0, "UTF-8")); // should be false +var_dump(mb_strpos("abc\xFF", "c\x80", 0, "UTF-8")); // should be false + +var_dump(mb_strpos("abc\x80\x80", "\x80", 0, "UTF-8")); +var_dump(mb_strpos("abc\xFF", "c\xFF", 0, "UTF-8")); + ?> --EXPECT-- String len: 43 @@ -115,3 +138,11 @@ OK_NEWLINE 0 OK_STR OK_NEWLINE +== INVALID STRINGS == +bool(false) +bool(false) +int(3) +bool(false) +bool(false) +int(3) +int(2) From 921b6813da3237a83e908998483f46ae3d8bacba Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 31 Oct 2022 17:20:23 +0100 Subject: [PATCH 018/895] Fix #81740: PDO::quote() may return unquoted string `sqlite3_snprintf()` expects its first parameter to be `int`; we need to avoid overflow. --- ext/pdo_sqlite/sqlite_driver.c | 3 +++ ext/pdo_sqlite/tests/bug81740.phpt | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ext/pdo_sqlite/tests/bug81740.phpt diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 4233ff10ff2ee..5a72a1eda23f4 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -232,6 +232,9 @@ static char *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t /* NB: doesn't handle binary strings... use prepared stmts for that */ static int sqlite_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type paramtype ) { + if (unquotedlen > (INT_MAX - 3) / 2) { + return 0; + } *quoted = safe_emalloc(2, unquotedlen, 3); sqlite3_snprintf(2*unquotedlen + 3, *quoted, "'%q'", unquoted); *quotedlen = strlen(*quoted); diff --git a/ext/pdo_sqlite/tests/bug81740.phpt b/ext/pdo_sqlite/tests/bug81740.phpt new file mode 100644 index 0000000000000..99fb07c3048b0 --- /dev/null +++ b/ext/pdo_sqlite/tests/bug81740.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #81740 (PDO::quote() may return unquoted string) +--SKIPIF-- + +--INI-- +memory_limit=-1 +--FILE-- +quote($string)); +?> +--EXPECT-- +bool(false) From 5f90134bb69a345c7edb5013e6461e84caa32dbc Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 18 Dec 2022 22:52:30 -0700 Subject: [PATCH 019/895] Make build work with newer OpenSSL --- ext/openssl/openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 45a7e794400d0..9827c75871668 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1325,7 +1325,9 @@ PHP_MINIT_FUNCTION(openssl) REGISTER_LONG_CONSTANT("OPENSSL_CMS_NOSIGS", CMS_NOSIGS, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); +#ifdef RSA_SSLV23_PADDING REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); From a6a80eefe0413c91acd922bc58590a4db7979af0 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 18 Dec 2022 23:20:29 -0700 Subject: [PATCH 020/895] Improve fix for bug #81740 --- ext/pdo/pdo_dbh.c | 10 ++++++++-- ext/pdo/pdo_sql_parser.re | 7 +++++++ ext/pdo_sqlite/sqlite_driver.c | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 5d3efe12e55f7..4c8af0597a28c 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1161,7 +1161,7 @@ PHP_METHOD(PDO, query) PHP_METHOD(PDO, quote) { pdo_dbh_t *dbh = Z_PDO_DBH_P(ZEND_THIS); - zend_string *str; + zend_string *str, *quoted; zend_long paramtype = PDO_PARAM_STR; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -1177,8 +1177,14 @@ PHP_METHOD(PDO, quote) pdo_raise_impl_error(dbh, NULL, "IM001", "driver does not support quoting"); RETURN_FALSE; } + quoted = dbh->methods->quoter(dbh, str, paramtype); - RETURN_STR(dbh->methods->quoter(dbh, str, paramtype)); + if (quoted == NULL) { + PDO_HANDLE_DBH_ERR(); + RETURN_FALSE; + } + + RETURN_STR(quoted); } /* }}} */ diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 4c20700379731..6bb0837fb31f9 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -242,6 +242,13 @@ safe: if (buf) { zend_string_release_ex(buf, 0); } + if (plc->quoted == NULL) { + /* bork */ + ret = -1; + strncpy(stmt->error_code, stmt->dbh->error_code, 6); + goto clean_up; + } + } else { pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource"); ret = -1; diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 15e06fc0302cf..6d5015e0ba6c2 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -227,8 +227,8 @@ static zend_string *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const zend_string static zend_string* sqlite_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype) { char *quoted; - if (unquotedlen > (INT_MAX - 3) / 2) { - return 0; + if (ZSTR_LEN(unquoted) > (INT_MAX - 3) / 2) { + return NULL; } quoted = safe_emalloc(2, ZSTR_LEN(unquoted), 3); /* TODO use %Q format? */ From 05c35137cd9eba8950249f62b86212af24cbfb33 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 18 Dec 2022 23:24:53 -0700 Subject: [PATCH 021/895] Add NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 0874b812f83cf..c6b0036b600b9 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2022, PHP 8.0.27 +- PDO/SQLite: + . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) + (cmb) + 24 Nov 2022, PHP 8.0.26 - CLI: From 683285165e94bbe8ed387e3850b0b776b804f948 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 19 Dec 2022 12:11:16 +0300 Subject: [PATCH 022/895] Fix memory leak Fixes oss-fuzz #54320 --- Zend/tests/class_constants_007.phpt | 13 +++++++++++++ Zend/zend_inheritance.c | 1 + 2 files changed, 14 insertions(+) create mode 100644 Zend/tests/class_constants_007.phpt diff --git a/Zend/tests/class_constants_007.phpt b/Zend/tests/class_constants_007.phpt new file mode 100644 index 0000000000000..d09a12e8c17b8 --- /dev/null +++ b/Zend/tests/class_constants_007.phpt @@ -0,0 +1,13 @@ +--TEST-- +Ownership of constant expression inhereted from immutable class should be transfered to class +--FILE-- + +--EXPECT-- +string(2) " " diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index acff1da1798e9..e91195bb15a6b 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1354,6 +1354,7 @@ static void do_inherit_class_constant(zend_string *name, zend_class_constant *pa c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant)); memcpy(c, parent_const, sizeof(zend_class_constant)); parent_const = c; + Z_CONSTANT_FLAGS(c->value) |= CONST_OWNED; } } if (ce->type & ZEND_INTERNAL_CLASS) { From e0e587cdb808982179536a5b657d831992b6f9b2 Mon Sep 17 00:00:00 2001 From: Yuya Hamada Date: Mon, 28 Nov 2022 08:41:53 +0900 Subject: [PATCH 023/895] mbstring: Do not stop when mbstring test failed I way want to confirm different on mbstring PHP 8.1 or newer and PHP 8.0 or older, but when I port to PHP 8.0 from PHP 8.1 or newer phpt files, it stopped die() function when test failed. I want to make a list, so I don't want to stop it. If you execute full test, set $testFailedLimit to -1 in encoding_tests.inc. --- ext/mbstring/tests/encoding_tests.inc | 46 +++++++++++++++++++++------ 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/ext/mbstring/tests/encoding_tests.inc b/ext/mbstring/tests/encoding_tests.inc index cbf5071456df2..978cb8db399c0 100644 --- a/ext/mbstring/tests/encoding_tests.inc +++ b/ext/mbstring/tests/encoding_tests.inc @@ -3,6 +3,26 @@ // Common code for tests which focus on conversion and verification of text // in some specific encoding +// Test failed limit. If you want to execute all tests, set to -1. +$testFailedLimit = 1000; +// Test failed counter +$testFailedCounter = 0; + +// Count tests failed. If tests failed are more than $testFailedLimit, stop testing. +function testFailedIncrement() { + global $testFailedCounter, $testFailedLimit; + + // $testFailedLimit is -1, no limit. + if ($testFailedLimit === -1) + return; + + $testFailedCounter++; + if ($testFailedCounter < $testFailedLimit) + return; + + die("=== Failed test " . $testFailedLimit . " times exceeded, stop testing ==="); +} + // Read a file with one character and its equivalent Unicode codepoint on each // line, delimited by tabs function readConversionTable($path, &$from, &$to, $utf32 = false) { @@ -51,27 +71,33 @@ function dbgPrint($str) { function identifyValidString($goodString, $encoding) { $result = mb_check_encoding($goodString, $encoding); - if (!$result) - die("mb_check_encoding failed on good $encoding string: " . dbgPrint($goodString)); + if (!$result) { + echo "mb_check_encoding failed on good $encoding string: " . dbgPrint($goodString) . PHP_EOL; + testFailedIncrement(); + } } function identifyInvalidString($badString, $encoding) { $result = mb_check_encoding($badString, $encoding); if ($result) - die("mb_check_encoding passed on bad $encoding string: " . dbgPrint($badString)); + echo "mb_check_encoding passed on bad $encoding string: " . dbgPrint($badString) . PHP_EOL; } function testConversion($fromString, $toString, $fromEncoding, $toEncoding) { $result = mb_convert_encoding($fromString, $toEncoding, $fromEncoding); - if ($result !== $toString) - die("mb_convert_encoding not working on $fromEncoding input: " . dbgPrint($fromString) . "\nExpected $toEncoding: " . dbgPrint($toString) . "\nActually got: " . dbgPrint($result)); + if ($result !== $toString) { + echo "mb_convert_encoding not working on $fromEncoding input: " . dbgPrint($fromString) . "\nExpected $toEncoding: " . dbgPrint($toString) . "\nActually got: " . dbgPrint($result) . PHP_EOL; + testFailedIncrement(); + } } function testValidConversion($fromString, $toString, $fromEncoding, $toEncoding) { $illegalChars = mb_get_info('illegal_chars'); testConversion($fromString, $toString, $fromEncoding, $toEncoding); - if (mb_get_info('illegal_chars') !== $illegalChars) - die("mb_convert_encoding incremented illegal_chars on valid $fromEncoding string: " . dbgPrint($fromString) . " when converting to $toEncoding"); + if (mb_get_info('illegal_chars') !== $illegalChars) { + echo "mb_convert_encoding incremented illegal_chars on valid $fromEncoding string: " . dbgPrint($fromString) . " when converting to $toEncoding" . PHP_EOL; + testFailedIncrement(); + } } function convertValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays = true) { @@ -83,8 +109,10 @@ function convertValidString($fromString, $toString, $fromEncoding, $toEncoding, function convertInvalidString($fromString, $toString, $fromEncoding, $toEncoding) { $illegalChars = mb_get_info('illegal_chars'); testConversion($fromString, $toString, $fromEncoding, $toEncoding); - if (mb_get_info('illegal_chars') <= $illegalChars) - die("mb_convert_encoding did not increment illegal_chars on invalid $fromEncoding string: " . dbgPrint($fromString) . " when converting to $toEncoding"); + if (mb_get_info('illegal_chars') <= $illegalChars) { + echo "mb_convert_encoding did not increment illegal_chars on invalid $fromEncoding string: " . dbgPrint($fromString) . " when converting to $toEncoding" . PHP_EOL; + testFailedIncrement(); + } } function testValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays = true) { From cf5dac07d248b8cdd082d6b327d3b4c91900bd1e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 19 Dec 2022 15:56:56 +0100 Subject: [PATCH 024/895] Skip newly added test on 32bit platforms That bug didn't affect 32bit platforms, and besides, it is rather unlikely that allocating a 2GB string works on such platforms. --- ext/pdo_sqlite/tests/bug81740.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/pdo_sqlite/tests/bug81740.phpt b/ext/pdo_sqlite/tests/bug81740.phpt index 99fb07c3048b0..dc33641ae864e 100644 --- a/ext/pdo_sqlite/tests/bug81740.phpt +++ b/ext/pdo_sqlite/tests/bug81740.phpt @@ -3,6 +3,7 @@ Bug #81740 (PDO::quote() may return unquoted string) --SKIPIF-- --INI-- From da5cbca23ec1292cc15385f69ebc43bc8f51addd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 19 Dec 2022 16:14:00 +0100 Subject: [PATCH 025/895] Force extension loading for new test --- ext/pdo_sqlite/tests/bug81740.phpt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/pdo_sqlite/tests/bug81740.phpt b/ext/pdo_sqlite/tests/bug81740.phpt index dc33641ae864e..2b8b9447f0fed 100644 --- a/ext/pdo_sqlite/tests/bug81740.phpt +++ b/ext/pdo_sqlite/tests/bug81740.phpt @@ -1,8 +1,10 @@ --TEST-- Bug #81740 (PDO::quote() may return unquoted string) +--EXTENSIONS-- +pdo +pdo_sqlite --SKIPIF-- From cf77762970c7d67c9477bdd29df25900926a4005 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Mon, 19 Dec 2022 21:25:00 +0100 Subject: [PATCH 026/895] Skip tests under MSAN Stack overflows can be detected as long as C stack frames between two execute_ex() calls use less than zend.reserved_stack_size bytes of stack. The default value of zend.reserved_stack_size accounts for the largest stack users, but MSAN instrumentation increases usage considerably: php_pcre2_match uses more than 200KiB of stack in some MSAN build, compared to 20KiB without MSAN according to -fstack-usage. --- Zend/tests/stack_limit/stack_limit_001.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_002.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_006.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_009.phpt | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/Zend/tests/stack_limit/stack_limit_001.phpt b/Zend/tests/stack_limit/stack_limit_001.phpt index 626ec3fe570fa..534c3cf6574b9 100644 --- a/Zend/tests/stack_limit/stack_limit_001.phpt +++ b/Zend/tests/stack_limit/stack_limit_001.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 001 - Stack limit checks with max_allowed_stack_size detection +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_002.phpt b/Zend/tests/stack_limit/stack_limit_002.phpt index 2459df3649083..337900ae84669 100644 --- a/Zend/tests/stack_limit/stack_limit_002.phpt +++ b/Zend/tests/stack_limit/stack_limit_002.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 002 - Stack limit checks with max_allowed_stack_size detection (fibers) +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_006.phpt b/Zend/tests/stack_limit/stack_limit_006.phpt index 61da8b9dab04c..3f03807783d69 100644 --- a/Zend/tests/stack_limit/stack_limit_006.phpt +++ b/Zend/tests/stack_limit/stack_limit_006.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 006 - env size affects __libc_stack_end +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_009.phpt b/Zend/tests/stack_limit/stack_limit_009.phpt index 08f14495e4370..b0567336b55c3 100644 --- a/Zend/tests/stack_limit/stack_limit_009.phpt +++ b/Zend/tests/stack_limit/stack_limit_009.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 009 - Check that we can actually use all the stack +--SKIPIF-- + --EXTENSIONS-- zend_test --FILE-- From d19a70c9a0293d668fa66870610107764137d309 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 20 Dec 2022 14:41:13 +0000 Subject: [PATCH 027/895] Fix GH-9891: DateTime modify with unixtimestamp (@) must work like setTimestamp --- NEWS | 4 ++++ ext/date/php_date.c | 4 ++++ ext/date/tests/gh9891.phpt | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 ext/date/tests/gh9891.phpt diff --git a/NEWS b/NEWS index 6d165ca1a707f..0098d6f769991 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ PHP NEWS - Apache: . Fixed bug GH-9949 (Partial content on incomplete POST request). (cmb) +- Date: + . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like + setTimestamp). (Derick) + - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 4aeb17a8391b7..0305873eea0e6 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2897,6 +2897,10 @@ static int php_date_modify(zval *object, char *modify, size_t modify_len) /* {{{ dateobj->time->us = tmp_time->us; } + if (tmp_time->have_zone && tmp_time->zone_type == TIMELIB_ZONETYPE_OFFSET) { + timelib_set_timezone_from_offset(dateobj->time, tmp_time->z); + } + timelib_time_dtor(tmp_time); timelib_update_ts(dateobj->time, NULL); diff --git a/ext/date/tests/gh9891.phpt b/ext/date/tests/gh9891.phpt new file mode 100644 index 0000000000000..6d8832b0d9237 --- /dev/null +++ b/ext/date/tests/gh9891.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug GH-9891 (DateTime modify with unixtimestamp (@) must work like setTimestamp) +--FILE-- +modify('@1234567890'); +var_dump($m->getTimeStamp()); + +echo "=======\n"; + +$a = new DateTime('2022-11-01 13:30:00', new DateTimezone('America/Lima')); +$b = clone $a; +echo '$a: ', $a->format(DateTime::ATOM), "\n"; +echo '$b: ', $b->format(DateTime::ATOM), "\n"; +echo '$a: @', $a->getTimestamp(), "\n"; +echo '$b: setTimestamp(', $b->getTimestamp(), ")\n"; +$a->modify('@' . $a->getTimestamp()); +$b->setTimestamp($b->getTimestamp()); +echo '$a: ', $a->format(DateTime::ATOM), "\n"; +echo '$b: ', $b->format(DateTime::ATOM), "\n"; +?> +--EXPECT-- +int(1234567890) +======= +$a: 2022-11-01T13:30:00-05:00 +$b: 2022-11-01T13:30:00-05:00 +$a: @1667327400 +$b: setTimestamp(1667327400) +$a: 2022-11-01T18:30:00+00:00 +$b: 2022-11-01T13:30:00-05:00 From bfa56cf62bfdb07afa93c63ec263ce24a591261d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 20 Dec 2022 15:24:15 +0100 Subject: [PATCH 028/895] Fix #10133 set variables_order en ensure $ENV is set --- Zend/tests/traits/constant_016.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/tests/traits/constant_016.phpt b/Zend/tests/traits/constant_016.phpt index 9cb2b29bcc095..0754c15716377 100644 --- a/Zend/tests/traits/constant_016.phpt +++ b/Zend/tests/traits/constant_016.phpt @@ -2,6 +2,8 @@ Compatibility of values of same name trait constants is checked after their constant expressions are evaluated --ENV-- ENSURE_CONSTANT_IS_DEFINED_AT_RUNTIME=1 +--INI-- +variables_order=EGPCS --FILE-- Date: Tue, 29 Nov 2022 21:47:53 +0000 Subject: [PATCH 029/895] Fix bug #77106: Missing separator in FPM FastCGI errors --- NEWS | 3 ++ sapi/fpm/fpm/fpm_main.c | 16 +++++-- sapi/fpm/tests/bug77106-fcgi-missing-nl.phpt | 46 ++++++++++++++++++++ sapi/fpm/tests/response.inc | 36 +++++++++++++-- 4 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 sapi/fpm/tests/bug77106-fcgi-missing-nl.phpt diff --git a/NEWS b/NEWS index 0e1c6bfa3d664..d9d6d5787bb7c 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.2 +- FPM: + . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) + - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index a8d77ef3bed21..aa43e0c5da407 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -149,6 +149,7 @@ typedef struct _php_cgi_globals_struct { bool force_redirect; bool discard_path; bool fcgi_logging; + bool fcgi_logging_request_started; char *redirect_status_env; HashTable user_config_cache; char *error_header; @@ -598,11 +599,16 @@ void sapi_cgi_log_fastcgi(int level, char *message, size_t len) * - logging is enabled (fastcgi.logging in php.ini) * - we are currently dealing with a request * - the message is not empty - * - the fcgi_write did not fail */ - if (CGIG(fcgi_logging) && request && message && len > 0 - && fcgi_write(request, FCGI_STDERR, message, len) < 0) { - php_handle_aborted_connection(); + if (CGIG(fcgi_logging) && request && message && len > 0) { + if (CGIG(fcgi_logging_request_started)) { + fcgi_write(request, FCGI_STDERR, "; ", 2); + } else { + CGIG(fcgi_logging_request_started) = true; + } + if (fcgi_write(request, FCGI_STDERR, message, len) < 0) { + php_handle_aborted_connection(); + } } } /* }}} */ @@ -1403,6 +1409,7 @@ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals) php_cgi_globals->fix_pathinfo = 1; php_cgi_globals->discard_path = 0; php_cgi_globals->fcgi_logging = 1; + php_cgi_globals->fcgi_logging_request_started = false; zend_hash_init(&php_cgi_globals->user_config_cache, 0, NULL, user_config_cache_entry_dtor, 1); php_cgi_globals->error_header = NULL; php_cgi_globals->fpm_config = NULL; @@ -1820,6 +1827,7 @@ consult the installation file that came with this distribution, or visit \n\ char *primary_script = NULL; request_body_fd = -1; SG(server_context) = (void *) request; + CGIG(fcgi_logging_request_started) = false; init_request_info(); fpm_request_info(); diff --git a/sapi/fpm/tests/bug77106-fcgi-missing-nl.phpt b/sapi/fpm/tests/bug77106-fcgi-missing-nl.phpt new file mode 100644 index 0000000000000..c4c7adf382545 --- /dev/null +++ b/sapi/fpm/tests/bug77106-fcgi-missing-nl.phpt @@ -0,0 +1,46 @@ +--TEST-- +FPM: bug77106 - Missing new lines in FCGI error stream +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +$tester->request()->expectErrorPattern( + '/Undefined variable \$a in .+ on line \d+; PHP message: PHP Warning:/' +); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/response.inc b/sapi/fpm/tests/response.inc index dd74e42990b08..c91c33f1cbe86 100644 --- a/sapi/fpm/tests/response.inc +++ b/sapi/fpm/tests/response.inc @@ -41,6 +41,11 @@ class Response */ private $expectInvalid; + /** + * @var bool + */ + private bool $debugOutputted = false; + /** * @param string|array|null $data * @param bool $expectInvalid @@ -71,9 +76,9 @@ class Response $body = implode("\n", $body); } - if (!$this->checkIfValid()) { + if ( ! $this->checkIfValid()) { $this->error('Response is invalid'); - } elseif (!$this->checkDefaultHeaders($contentType)) { + } elseif ( ! $this->checkDefaultHeaders($contentType)) { $this->error('Response default headers not found'); } elseif ($body !== $this->rawBody) { if ($multiLine) { @@ -134,6 +139,26 @@ class Response return $this; } + /** + * Expect error pattern in the response. + * + * @param string $errorMessagePattern Expected error message RegExp patter. + * + * @return Response + */ + public function expectErrorPattern(string $errorMessagePattern): Response + { + $errorData = $this->getErrorData(); + if (preg_match($errorMessagePattern, $errorData) === 0) { + $this->error( + "The expected error pattern $errorMessagePattern does not match the returned error '$errorData'" + ); + $this->debugOutput(); + } + + return $this; + } + /** * Expect no error in the response. * @@ -187,6 +212,8 @@ class Response echo "----------------- ERR -----------------\n"; echo $this->data['err_response'] . "\n"; echo "---------------------------------------\n\n"; + + $this->debugOutputted = true; } /** @@ -331,8 +358,11 @@ class Response * * @return bool */ - private function error($message): bool + private function error(string $message): bool { + if ( ! $this->debugOutputted) { + $this->debugOutput(); + } echo "ERROR: $message\n"; return false; From d3a6eedf4ae2bde358d22970ec3c92244bc02552 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Dec 2022 14:53:21 +0100 Subject: [PATCH 030/895] ext/opcache/jit/zend_jit: fix inverted bailout value in zend_runtime_jit() (#10144) In the "catch" block, do_bailout must be set to true, not false, or else zend_bailout() never gets called. --- ext/opcache/jit/zend_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d241a42d4bb55..28404f2d2bdf0 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4287,7 +4287,7 @@ static int ZEND_FASTCALL zend_runtime_jit(void) /* perform real JIT for this function */ zend_real_jit_func(op_array, NULL, NULL); } zend_catch { - do_bailout = 0; + do_bailout = true; } zend_end_try(); zend_jit_protect(); From 6de376a2b47917f1e875bf7afb7461b893e7a337 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Wed, 21 Dec 2022 14:55:21 +0100 Subject: [PATCH 031/895] [ci skip] NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 0098d6f769991..16ee8ebb05b6a 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,9 @@ PHP NEWS . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) +- Opcache: + . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). + - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) From 9b57295d5686737ea856410da598a2bad1d328c9 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Wed, 21 Dec 2022 14:55:53 +0100 Subject: [PATCH 032/895] [ci skip] NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index d9d6d5787bb7c..7e0e5336ea43b 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) +- Opcache: + . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). + 05 Jan 2023, PHP 8.2.1 - Core: From 7b2c3c11b2c9121421a81e416e893ce6114369d1 Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Thu, 22 Dec 2022 14:00:28 +0100 Subject: [PATCH 033/895] Cleanup redundant lookups in phar_object.c (#10150) --- ext/phar/phar_object.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 5421b12198e8b..41c55b75898a2 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -2606,16 +2606,14 @@ PHP_METHOD(Phar, delete) zend_throw_exception_ex(phar_ce_PharException, 0, "phar \"%s\" is persistent, unable to copy on write", phar_obj->archive->fname); RETURN_THROWS(); } - if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { - if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { - if (entry->is_deleted) { - /* entry is deleted, but has not been flushed to disk yet */ - RETURN_TRUE; - } else { - entry->is_deleted = 1; - entry->is_modified = 1; - phar_obj->archive->is_modified = 1; - } + if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { + if (entry->is_deleted) { + /* entry is deleted, but has not been flushed to disk yet */ + RETURN_TRUE; + } else { + entry->is_deleted = 1; + entry->is_modified = 1; + phar_obj->archive->is_modified = 1; } } else { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Entry %s does not exist and cannot be deleted", fname); @@ -3420,18 +3418,16 @@ PHP_METHOD(Phar, copy) RETURN_THROWS(); } - if (!zend_hash_str_exists(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len) || NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len)) || oldentry->is_deleted) { + if (NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len)) || oldentry->is_deleted) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "file \"%s\" cannot be copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->archive->fname); RETURN_THROWS(); } - if (zend_hash_str_exists(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) { - if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) || !temp->is_deleted) { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, - "file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->archive->fname); - RETURN_THROWS(); - } + if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) && !temp->is_deleted) { + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, + "file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->archive->fname); + RETURN_THROWS(); } tmp_len = newfile_len; From c4487b7a12bf80523deb70982c9bdbb9bf4b876c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 17 Dec 2022 16:02:55 +0100 Subject: [PATCH 034/895] Initialize ping_auto_globals_mask to prevent undefined behaviour Closes GH-10121 --- NEWS | 1 + ext/opcache/ZendAccelerator.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 16ee8ebb05b6a..8995c9e5ab8a4 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS - Opcache: . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). + . Fix access to uninitialized variable in accel_preload(). (nielsdos) - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index e5d7f650045ca..99bb33573f3b2 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4444,6 +4444,8 @@ static int accel_preload(const char *config, bool in_child) if (PG(auto_globals_jit)) { ping_auto_globals_mask = zend_accel_get_auto_globals(); + } else { + ping_auto_globals_mask = 0; } if (EG(zend_constants)) { From 23fe58c3a86012f73bcbd1c6840229442349ab7f Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Thu, 22 Dec 2022 15:01:21 +0100 Subject: [PATCH 035/895] Remove _zend_ast_decl->lex_pos (#10046) This struct member was only written to, but never read. --- Zend/zend_ast.c | 1 - Zend/zend_ast.h | 1 - Zend/zend_language_parser.y | 1 - 3 files changed, 3 deletions(-) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 816caae12a7d6..70646856d3a11 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -121,7 +121,6 @@ ZEND_API zend_ast *zend_ast_create_decl( ast->start_lineno = start_lineno; ast->end_lineno = CG(zend_lineno); ast->flags = flags; - ast->lex_pos = LANG_SCNG(yy_text); ast->doc_comment = doc_comment; ast->name = name; ast->child[0] = child0; diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index 77c277f960115..b5df2a55a2098 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -208,7 +208,6 @@ typedef struct _zend_ast_decl { uint32_t start_lineno; uint32_t end_lineno; uint32_t flags; - unsigned char *lex_pos; zend_string *doc_comment; zend_string *name; zend_ast *child[5]; diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 6e7b09365b112..c4b241cf505b8 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -1250,7 +1250,6 @@ inline_function: T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags { $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $3, zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $5, NULL, $11, $7, NULL); - ((zend_ast_decl *) $$)->lex_pos = $10; CG(extra_fn_flags) = $9; } ; From 84988d2093fc69c4708cfad7086bcbf5ffae7764 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 17 Dec 2022 23:49:25 +0000 Subject: [PATCH 036/895] cli server addressing few todos. Closes GH-10124. --- sapi/cli/php_cli_server.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 4a33ca6a68261..901281ddfdfca 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -270,10 +270,10 @@ static bool php_cli_server_get_system_time(char *buf) { gettimeofday(&tv, NULL); - /* TODO: should be checked for NULL tm/return value */ - php_localtime_r(&tv.tv_sec, &tm); - php_asctime_r(&tm, buf); - return true; + if (!php_localtime_r(&tv.tv_sec, &tm)) { + return false; + } + return php_asctime_r(&tm, buf) != NULL; } #endif @@ -865,7 +865,6 @@ static int php_cli_server_poller_poll(php_cli_server_poller *poller, struct time return php_select(poller->max_fd + 1, &poller->active.rfds, &poller->active.wfds, NULL, tv); } /* }}} */ -// TODO Return value is unused, refactor? static zend_result php_cli_server_poller_iter_on_active(php_cli_server_poller *poller, void *opaque, zend_result(*callback)(void *, php_socket_t fd, int events)) /* {{{ */ { zend_result retval = SUCCESS; @@ -2214,10 +2213,9 @@ static void php_cli_server_request_shutdown(php_cli_server *server, php_cli_serv } /* }}} */ -// TODO Use bool, return value is strange -static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server_client *client) /* {{{ */ +static bool php_cli_server_dispatch_router(php_cli_server *server, php_cli_server_client *client) /* {{{ */ { - int decline = 0; + bool decline = false; zend_file_handle zfd; char *old_cwd; @@ -2253,7 +2251,6 @@ static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server } /* }}} */ -// TODO Return FAILURE on error? Or voidify as return value of function not checked static zend_result php_cli_server_dispatch(php_cli_server *server, php_cli_server_client *client) /* {{{ */ { int is_static_file = 0; @@ -2269,7 +2266,7 @@ static zend_result php_cli_server_dispatch(php_cli_server *server, php_cli_serve if (server->router || !is_static_file) { if (FAILURE == php_cli_server_request_startup(server, client)) { php_cli_server_request_shutdown(server, client); - return SUCCESS; + return FAILURE; } } @@ -2610,8 +2607,7 @@ static zend_result php_cli_server_recv_event_read_request(php_cli_server *server return php_cli_server_send_error_page(server, client, 501); } php_cli_server_poller_remove(&server->poller, POLLIN, client->sock); - php_cli_server_dispatch(server, client); - return SUCCESS; + return php_cli_server_dispatch(server, client); case 0: php_cli_server_poller_add(&server->poller, POLLIN, client->sock); return SUCCESS; @@ -2657,7 +2653,6 @@ typedef struct php_cli_server_do_event_for_each_fd_callback_params { zend_result(*whandler)(php_cli_server*, php_cli_server_client*); } php_cli_server_do_event_for_each_fd_callback_params; -// TODO return FAILURE on failure??? static zend_result php_cli_server_do_event_for_each_fd_callback(void *_params, php_socket_t fd, int event) /* {{{ */ { php_cli_server_do_event_for_each_fd_callback_params *params = _params; @@ -2677,12 +2672,12 @@ static zend_result php_cli_server_do_event_for_each_fd_callback(void *_params, p efree(errstr); } pefree(sa, 1); - return SUCCESS; + return FAILURE; } if (SUCCESS != php_set_sock_blocking(client_sock, 0)) { pefree(sa, 1); closesocket(client_sock); - return SUCCESS; + return FAILURE; } client = pemalloc(sizeof(php_cli_server_client), 1); @@ -2717,10 +2712,11 @@ static void php_cli_server_do_event_for_each_fd(php_cli_server *server, whandler }; - php_cli_server_poller_iter_on_active(&server->poller, ¶ms, php_cli_server_do_event_for_each_fd_callback); + if (SUCCESS != php_cli_server_poller_iter_on_active(&server->poller, ¶ms, php_cli_server_do_event_for_each_fd_callback)) { + php_cli_server_logf(PHP_CLI_SERVER_LOG_ERROR, "Failed to poll event"); + } } /* }}} */ -// TODO Return value of function is not used static zend_result php_cli_server_do_event_loop(php_cli_server *server) /* {{{ */ { zend_result retval = SUCCESS; @@ -2763,7 +2759,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */ { char *php_optarg = NULL; int php_optind = 1; - int c; + int c, r; const char *server_bind_address = NULL; extern const opt_struct OPTIONS[]; const char *document_root = NULL; @@ -2841,6 +2837,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */ sapi_module.phpinfo_as_text = 0; { + r = 0; bool ipv6 = strchr(server.host, ':'); php_cli_server_logf( PHP_CLI_SERVER_LOG_PROCESS, @@ -2859,7 +2856,9 @@ int do_cli_server(int argc, char **argv) /* {{{ */ zend_signal_init(); - php_cli_server_do_event_loop(&server); + if (SUCCESS != php_cli_server_do_event_loop(&server)) { + r = 1; + } php_cli_server_dtor(&server); - return 0; + return r; } /* }}} */ From 9c2572565ac87943e6182379b2ad73b37fa37ed5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 21 Dec 2022 16:31:18 +0000 Subject: [PATCH 037/895] sockets adding TCP_QUICKACK constant. having tigher control on ACK delays, difference is the setting is `volatile` as it can be turned off by the kernel if not set explicitally set otherwise on the socket. Closes GH-10145. --- NEWS | 2 ++ UPGRADING | 1 + ext/sockets/sockets.stub.php | 7 +++++++ ext/sockets/sockets_arginfo.h | 5 ++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7453697c66bed..10ee8cebe65d0 100644 --- a/NEWS +++ b/NEWS @@ -70,6 +70,8 @@ PHP NEWS over socket binding for a cpu core. (David Carlier) . Added SKF_AD_QUEUE for cbpf filters. (David Carlier) . Added socket_atmark if send/recv needs using MSG_OOB. (David Carlier) + . Added TCP_QUICKACK constant, to give tigher control over + ACK delays. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index a321d89ee04a1..efec12d162c43 100644 --- a/UPGRADING +++ b/UPGRADING @@ -105,6 +105,7 @@ PHP 8.3 UPGRADE NOTES - Sockets: . SO_ATTACH_REUSEPORT_CBPF (Linux only). + . TCP_QUICKACK (Linux only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index b4457db185198..90c084b9a64fc 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -1699,6 +1699,13 @@ */ const SO_DETACH_BPF = UNKNOWN; #endif +#if defined(TCP_QUICKACK) +/** + * @var int + * @cvalue TCP_QUICKACK + */ +const TCP_QUICKACK = UNKNOWN; +#endif /** * @strict-properties diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 4171018b188a9..bd97d5fd6c3fe 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4fb48cdd2188e8834fd2210027adc1072e885d6e */ + * Stub hash: abec5e538a69c27451c0cac0a19a92fc6df667eb */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -988,6 +988,9 @@ static void register_sockets_symbols(int module_number) #if defined(SO_DETACH_BPF) REGISTER_LONG_CONSTANT("SO_DETACH_BPF", SO_DETACH_BPF, CONST_PERSISTENT); #endif +#if defined(TCP_QUICKACK) + REGISTER_LONG_CONSTANT("TCP_QUICKACK", TCP_QUICKACK, CONST_PERSISTENT); +#endif } static zend_class_entry *register_class_Socket(void) From bbad29b9c128c41508f26064d2cbf425b8984522 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 18 Dec 2022 14:16:01 +0100 Subject: [PATCH 038/895] Add a regression test for auto_globals_jit=0 with preloading on --- .../tests/preloading_no_auto_globals_jit.inc | 6 ++++++ .../tests/preloading_no_auto_globals_jit.phpt | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 ext/opcache/tests/preloading_no_auto_globals_jit.inc create mode 100644 ext/opcache/tests/preloading_no_auto_globals_jit.phpt diff --git a/ext/opcache/tests/preloading_no_auto_globals_jit.inc b/ext/opcache/tests/preloading_no_auto_globals_jit.inc new file mode 100644 index 0000000000000..ad80df7733d1d --- /dev/null +++ b/ext/opcache/tests/preloading_no_auto_globals_jit.inc @@ -0,0 +1,6 @@ + +--FILE-- +count_global_server()); +?> +--EXPECTF-- +int(%d) From 5f1311a92c4370f0894268f47357410e45597e81 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:03:45 +0100 Subject: [PATCH 039/895] Fix undefined behaviour in phpdbg_load_module_or_extension If zend_register_module_ex were to return NULL, then module_entry will be set to NULL, and the if's body will load module_entry->name. Since module_entry is NULL, loading the name would cause a NULL pointer dereference. However, since a NULL pointer dereference is undefined behaviour, the compiler is free to remove the check. Fix it by using *name instead of module_entry->name. Closes GH-10157 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ sapi/phpdbg/phpdbg_prompt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8995c9e5ab8a4..33fb5644fba51 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). . Fix access to uninitialized variable in accel_preload(). (nielsdos) +- PHPDBG: + . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) + - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 6597f5fe42cf8..4c50653ce66f9 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1321,7 +1321,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, const char * module_entry->handle = handle; if ((module_entry = zend_register_module_ex(module_entry)) == NULL) { - phpdbg_error("Unable to register module %s", module_entry->name); + phpdbg_error("Unable to register module %s", *name); goto quit; } From a24659e70ccc61bb6231907971b58e9a9ac73c9b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 23 Dec 2022 15:29:09 +0100 Subject: [PATCH 040/895] Update test for changed behaviour of GMP constructor Closed GH-10160 Signed-off-by: George Peter Banyard --- ext/gmp/tests/gmp_dynamic_property.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gmp/tests/gmp_dynamic_property.phpt b/ext/gmp/tests/gmp_dynamic_property.phpt index 547fe51a7f6a3..ff3d4ac94e012 100644 --- a/ext/gmp/tests/gmp_dynamic_property.phpt +++ b/ext/gmp/tests/gmp_dynamic_property.phpt @@ -5,7 +5,7 @@ gmp --FILE-- {1} = 123; $serialized = serialize($g); From 233ffccc354f2da7ec7f1df162208462b12bb1e2 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 12 Dec 2022 14:22:41 +0000 Subject: [PATCH 041/895] Fix GH-10072: PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code --- Zend/tests/gh10072.phpt | 105 ++++++++++++++++++++++++++++++++++++++++ Zend/zend_vm_def.h | 6 ++- Zend/zend_vm_execute.h | 12 +++-- 3 files changed, 117 insertions(+), 6 deletions(-) create mode 100644 Zend/tests/gh10072.phpt diff --git a/Zend/tests/gh10072.phpt b/Zend/tests/gh10072.phpt new file mode 100644 index 0000000000000..2499ab0ca02fb --- /dev/null +++ b/Zend/tests/gh10072.phpt @@ -0,0 +1,105 @@ +--TEST-- +GH-10072 (PHP crashes when execute_ex is overridden and a trampoline is used from internal code) +--EXTENSIONS-- +zend_test +--INI-- +zend_test.replace_zend_execute_ex=1 +--FILE-- +handle; + } + + + public function stream_close(): void + { + } + + public function stream_open(string $path, string $mode, int $options = 0, ?string &$openedPath = null): bool + { + return true; + } + + + public function stream_read(int $count) + { + return 0; + } + + + public function stream_seek(int $offset, int $whence = SEEK_SET): bool + { + return true; + } + + + public function stream_set_option(int $option, int $arg1, ?int $arg2): bool + { + return false; + } + + + public function stream_stat() + { + return []; + } + + + public function stream_tell() + { + return []; + } + + + public function stream_truncate(int $newSize): bool + { + return true; + } + + + public function stream_write(string $data) + { + } + + + public function unlink(string $path): bool + { + return false; + } +} + +class TrampolineTest { + /** @var resource|null */ + public $context; + + /** @var object|null */ + private $wrapper; + + public function __call(string $name, array $arguments) { + if (!$this->wrapper) { + $this->wrapper = new DummyStreamWrapper(); + } + echo 'Trampoline for ', $name, PHP_EOL; + return $this->wrapper->$name(...$arguments); + } + +} + +stream_wrapper_register('custom', TrampolineTest::class); + + +$fp = fopen("custom://myvar", "r+"); +?> +--EXPECT-- +Trampoline for stream_open +Trampoline for stream_close diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index eb40d3023066f..d869116c33e33 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8663,7 +8663,9 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY, SPEC(OBSERVER)) SAVE_OPLINE_EX(); ZEND_OBSERVER_FCALL_BEGIN(execute_data); execute_data = EX(prev_execute_data); - LOAD_OPLINE(); + if (execute_data) { + LOAD_OPLINE(); + } ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP); zend_execute_ex(call); } @@ -8713,7 +8715,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY, SPEC(OBSERVER)) execute_data = EG(current_execute_data); - if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { + if (!execute_data || !EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { ZEND_VM_RETURN(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a0b4efd737286..c22a1a104e93c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3319,7 +3319,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z SAVE_OPLINE_EX(); execute_data = EX(prev_execute_data); - LOAD_OPLINE(); + if (execute_data) { + LOAD_OPLINE(); + } ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP); zend_execute_ex(call); } @@ -3369,7 +3371,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z execute_data = EG(current_execute_data); - if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { + if (!execute_data || !EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { ZEND_VM_RETURN(); } @@ -3456,7 +3458,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_ SAVE_OPLINE_EX(); zend_observer_fcall_begin(execute_data); execute_data = EX(prev_execute_data); - LOAD_OPLINE(); + if (execute_data) { + LOAD_OPLINE(); + } ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP); zend_execute_ex(call); } @@ -3506,7 +3510,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_ execute_data = EG(current_execute_data); - if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { + if (!execute_data || !EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { ZEND_VM_RETURN(); } From b489e0f2b847f21cdd8decbd3c1c9e83d0c61c1e Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 12 Dec 2022 15:29:48 +0000 Subject: [PATCH 042/895] Make sure to disable JIT when overriding execute_ex --- Zend/tests/gh10072.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/tests/gh10072.phpt b/Zend/tests/gh10072.phpt index 2499ab0ca02fb..95a0d43450525 100644 --- a/Zend/tests/gh10072.phpt +++ b/Zend/tests/gh10072.phpt @@ -4,6 +4,7 @@ GH-10072 (PHP crashes when execute_ex is overridden and a trampoline is used fro zend_test --INI-- zend_test.replace_zend_execute_ex=1 +opcache.jit=disable --FILE-- Date: Tue, 13 Dec 2022 07:30:21 +0000 Subject: [PATCH 043/895] Add secondary test that registers a trampoline as a shutdown function --- Zend/tests/gh10072-2.phpt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Zend/tests/gh10072-2.phpt diff --git a/Zend/tests/gh10072-2.phpt b/Zend/tests/gh10072-2.phpt new file mode 100644 index 0000000000000..3de75a2b6c09f --- /dev/null +++ b/Zend/tests/gh10072-2.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10072 (PHP crashes when execute_ex is overridden and a trampoline is used from internal code during shutdown) +--EXTENSIONS-- +zend_test +--INI-- +zend_test.replace_zend_execute_ex=1 +opcache.jit=disable +--FILE-- + +--EXPECT-- +Trampoline for shutdown From a3891d9d1a7067105cbd8a4dabfd7947dde14674 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 22 Dec 2022 18:32:16 +0000 Subject: [PATCH 044/895] Fix GH-9981: FPM does not reset fastcgi.error_header --- NEWS | 4 ++ sapi/fpm/fpm/fpm_main.c | 3 ++ .../gh9981-fastcgi-error-header-reset.phpt | 51 +++++++++++++++++++ sapi/fpm/tests/response.inc | 30 +++++++++++ 4 files changed, 88 insertions(+) create mode 100644 sapi/fpm/tests/gh9981-fastcgi-error-header-reset.phpt diff --git a/NEWS b/NEWS index bdcce4579ec07..5cde54978395f 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ PHP NEWS . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like setTimestamp). (Derick) +- FPM: + . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). + (Jakub Zelenka) + - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index eb8fab8e832c0..5d83ee08af2c7 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1911,6 +1911,9 @@ consult the installation file that came with this distribution, or visit \n\ fpm_request_executing(); + /* Reset exit status from the previous execution */ + EG(exit_status) = 0; + php_execute_script(&file_handle); fastcgi_request_done: diff --git a/sapi/fpm/tests/gh9981-fastcgi-error-header-reset.phpt b/sapi/fpm/tests/gh9981-fastcgi-error-header-reset.phpt new file mode 100644 index 0000000000000..5a1d65f1cb0bd --- /dev/null +++ b/sapi/fpm/tests/gh9981-fastcgi-error-header-reset.phpt @@ -0,0 +1,51 @@ +--TEST-- +FPM: gh9981 - fastcgi.error_header is not reset +--SKIPIF-- + +--FILE-- +start(iniEntries: [ + 'fastcgi.error_header' => '"HTTP/1.1 500 PHP Error"', + 'output_buffering' => 4096, +]); +$tester->expectLogStartNotices(); +$tester->request()->expectStatus('500 PHP Error'); +$tester->request('q=1')->expectNoStatus(); +$tester->terminate(); +$tester->expectLogTerminatingNotices(); +$tester->expectNoLogPattern('/Cannot modify header information/'); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/response.inc b/sapi/fpm/tests/response.inc index 9112da6ed7756..99290e72f41d4 100644 --- a/sapi/fpm/tests/response.inc +++ b/sapi/fpm/tests/response.inc @@ -134,6 +134,36 @@ class Response return $this; } + /** + * Expect response status. + * + * @param string|null $status Expected status. + * + * @return Response + */ + public function expectStatus(string|null $status): Response { + $headers = $this->getHeaders(); + if (is_null($status) && !isset($headers['status'])) { + return $this; + } + if (!is_null($status) && !isset($headers['status'])) { + $this->error('Status is expected but not supplied'); + } elseif ($status !== $headers['status']) { + $statusMessage = $status === null ? "expected not to be set": "expected to be $status"; + $this->error("Status is $statusMessage but the actual value is {$headers['status']}"); + } + return $this; + } + + /** + * Expect response status not to be set. + * + * @return Response + */ + public function expectNoStatus(): Response { + return $this->expectStatus(null); + } + /** * Expect no error in the response. * From 0464524292635eb5de1764845f52e7aa877138e7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 26 Dec 2022 13:20:55 +0300 Subject: [PATCH 045/895] Fix memory leak because of incorrect optimization Fixes oss-fuzz #54488 --- Zend/Optimizer/block_pass.c | 7 +++++++ ext/opcache/tests/opt/match_002.phpt | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ext/opcache/tests/opt/match_002.phpt diff --git a/Zend/Optimizer/block_pass.c b/Zend/Optimizer/block_pass.c index b176ba2704e26..e522f65067d89 100644 --- a/Zend/Optimizer/block_pass.c +++ b/Zend/Optimizer/block_pass.c @@ -256,6 +256,13 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array } break; + case ZEND_MATCH_ERROR: + if (opline->op1_type == IS_TMP_VAR) { + src = VAR_SOURCE(opline->op1); + VAR_SOURCE(opline->op1) = NULL; + } + break; + case ZEND_FREE: if (opline->op1_type == IS_TMP_VAR) { src = VAR_SOURCE(opline->op1); diff --git a/ext/opcache/tests/opt/match_002.phpt b/ext/opcache/tests/opt/match_002.phpt new file mode 100644 index 0000000000000..ecda31ee7c0ec --- /dev/null +++ b/ext/opcache/tests/opt/match_002.phpt @@ -0,0 +1,15 @@ +--TEST-- +Match 002: memory leak because of incorrect optimization +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "y" in %smatch_002.php:2 +Stack trace: +#0 {main} + thrown in %smatch_002.php on line 2 From 21d8980d274e38ea8f9987498dde5ddb1b4b2f90 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 23 Dec 2022 19:24:57 +0000 Subject: [PATCH 046/895] Fix bug #68591: Configuration test does not perform UID lookups Addition check in fpm config test to verify existence of user, group, listen.owner and listen.group. Closes GH-10165 --- NEWS | 2 + sapi/fpm/fpm/fpm_conf.c | 7 ++ sapi/fpm/fpm/fpm_unix.c | 75 +++++++++++++++---- sapi/fpm/fpm/fpm_unix.h | 2 + sapi/fpm/tests/bug68591-conf-test-group.phpt | 38 ++++++++++ .../bug68591-conf-test-listen-group.phpt | 38 ++++++++++ .../bug68591-conf-test-listen-owner.phpt | 38 ++++++++++ sapi/fpm/tests/bug68591-conf-test-user.phpt | 38 ++++++++++ sapi/fpm/tests/tester.inc | 29 ++++--- 9 files changed, 242 insertions(+), 25 deletions(-) create mode 100644 sapi/fpm/tests/bug68591-conf-test-group.phpt create mode 100644 sapi/fpm/tests/bug68591-conf-test-listen-group.phpt create mode 100644 sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt create mode 100644 sapi/fpm/tests/bug68591-conf-test-user.phpt diff --git a/NEWS b/NEWS index 26ce34b3cea7f..2c52262b7ff8a 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). (Jakub Zelenka) + . Fixed bug #68591 (Configuration test does not perform UID lookups). + (Jakub Zelenka) - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index f2d9d3c088a75..ef9b35a9994aa 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -34,6 +34,7 @@ #include "fpm_status.h" #include "fpm_log.h" #include "fpm_events.h" +#include "fpm_unix.h" #include "zlog.h" #ifdef HAVE_SYSTEMD #include "fpm_systemd.h" @@ -1854,6 +1855,12 @@ int fpm_conf_init_main(int test_conf, int force_daemon) /* {{{ */ } if (test_conf) { + for (struct fpm_worker_pool_s *wp = fpm_worker_all_pools; wp; wp = wp->next) { + if (!fpm_unix_test_config(wp)) { + return -1; + } + } + if (test_conf > 1) { fpm_conf_dump(); } diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c index b1127b35949d3..d10a6f3254b24 100644 --- a/sapi/fpm/fpm/fpm_unix.c +++ b/sapi/fpm/fpm/fpm_unix.c @@ -46,6 +46,55 @@ size_t fpm_pagesize; + +static inline bool fpm_unix_is_id(const char* name) +{ + return strlen(name) == strspn(name, "0123456789"); +} + +static struct passwd *fpm_unix_get_passwd(struct fpm_worker_pool_s *wp, const char *name, int flags) +{ + struct passwd *pwd = getpwnam(name); + if (!pwd) { + zlog(flags, "[pool %s] cannot get uid for user '%s'", wp->config->name, name); + return NULL; + } + + return pwd; +} + +static inline bool fpm_unix_check_passwd(struct fpm_worker_pool_s *wp, const char *name, int flags) +{ + return !name || fpm_unix_is_id(name) || fpm_unix_get_passwd(wp, name, flags); +} + +static struct group *fpm_unix_get_group(struct fpm_worker_pool_s *wp, const char *name, int flags) +{ + struct group *group = getgrnam(name); + if (!group) { + zlog(flags, "[pool %s] cannot get gid for group '%s'", wp->config->name, name); + return NULL; + } + + return group; +} + +static inline bool fpm_unix_check_group(struct fpm_worker_pool_s *wp, const char *name, int flags) +{ + return !name || fpm_unix_is_id(name) || fpm_unix_get_group(wp, name, flags); +} + +bool fpm_unix_test_config(struct fpm_worker_pool_s *wp) +{ + struct fpm_worker_pool_config_s *config = wp->config; + return ( + fpm_unix_check_passwd(wp, config->user, ZLOG_ERROR) && + fpm_unix_check_group(wp, config->group, ZLOG_ERROR) && + fpm_unix_check_passwd(wp, config->listen_owner, ZLOG_SYSERROR) && + fpm_unix_check_group(wp, config->listen_group, ZLOG_SYSERROR) + ); +} + int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ { struct fpm_worker_pool_config_s *c = wp->config; @@ -105,11 +154,10 @@ int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ if ((end = strchr(p, ','))) { *end++ = 0; } - pwd = getpwnam(p); + pwd = fpm_unix_get_passwd(wp, p, ZLOG_SYSERROR); if (pwd) { zlog(ZLOG_DEBUG, "[pool %s] user '%s' have uid=%d", wp->config->name, p, pwd->pw_uid); } else { - zlog(ZLOG_SYSERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, p); acl_free(acl); efree(tmp); return -1; @@ -138,11 +186,10 @@ int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ if ((end = strchr(p, ','))) { *end++ = 0; } - grp = getgrnam(p); + grp = fpm_unix_get_group(wp, p, ZLOG_SYSERROR); if (grp) { zlog(ZLOG_DEBUG, "[pool %s] group '%s' have gid=%d", wp->config->name, p, grp->gr_gid); } else { - zlog(ZLOG_SYSERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, p); acl_free(acl); efree(tmp); return -1; @@ -175,14 +222,13 @@ int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ #endif if (c->listen_owner && *c->listen_owner) { - if (strlen(c->listen_owner) == strspn(c->listen_owner, "0123456789")) { + if (fpm_unix_is_id(c->listen_owner)) { wp->socket_uid = strtoul(c->listen_owner, 0, 10); } else { struct passwd *pwd; - pwd = getpwnam(c->listen_owner); + pwd = fpm_unix_get_passwd(wp, c->listen_owner, ZLOG_SYSERROR); if (!pwd) { - zlog(ZLOG_SYSERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, c->listen_owner); return -1; } @@ -192,14 +238,13 @@ int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ } if (c->listen_group && *c->listen_group) { - if (strlen(c->listen_group) == strspn(c->listen_group, "0123456789")) { + if (fpm_unix_is_id(c->listen_group)) { wp->socket_gid = strtoul(c->listen_group, 0, 10); } else { struct group *grp; - grp = getgrnam(c->listen_group); + grp = fpm_unix_get_group(wp, c->listen_group, ZLOG_SYSERROR); if (!grp) { - zlog(ZLOG_SYSERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, c->listen_group); return -1; } wp->socket_gid = grp->gr_gid; @@ -279,7 +324,7 @@ static int fpm_unix_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */ if (is_root) { if (wp->config->user && *wp->config->user) { - if (strlen(wp->config->user) == strspn(wp->config->user, "0123456789")) { + if (fpm_unix_is_id(wp->config->user)) { wp->set_uid = strtoul(wp->config->user, 0, 10); pwd = getpwuid(wp->set_uid); if (pwd) { @@ -289,9 +334,8 @@ static int fpm_unix_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */ } else { struct passwd *pwd; - pwd = getpwnam(wp->config->user); + pwd = fpm_unix_get_passwd(wp, wp->config->user, ZLOG_ERROR); if (!pwd) { - zlog(ZLOG_ERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, wp->config->user); return -1; } @@ -304,14 +348,13 @@ static int fpm_unix_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */ } if (wp->config->group && *wp->config->group) { - if (strlen(wp->config->group) == strspn(wp->config->group, "0123456789")) { + if (fpm_unix_is_id(wp->config->group)) { wp->set_gid = strtoul(wp->config->group, 0, 10); } else { struct group *grp; - grp = getgrnam(wp->config->group); + grp = fpm_unix_get_group(wp, wp->config->group, ZLOG_ERROR); if (!grp) { - zlog(ZLOG_ERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, wp->config->group); return -1; } wp->set_gid = grp->gr_gid; diff --git a/sapi/fpm/fpm/fpm_unix.h b/sapi/fpm/fpm/fpm_unix.h index 0bb22687b02f9..6fc9e5e8450dc 100644 --- a/sapi/fpm/fpm/fpm_unix.h +++ b/sapi/fpm/fpm/fpm_unix.h @@ -5,6 +5,8 @@ #include "fpm_worker_pool.h" +bool fpm_unix_test_config(struct fpm_worker_pool_s *wp); + int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp); int fpm_unix_set_socket_permissions(struct fpm_worker_pool_s *wp, const char *path); int fpm_unix_free_socket_permissions(struct fpm_worker_pool_s *wp); diff --git a/sapi/fpm/tests/bug68591-conf-test-group.phpt b/sapi/fpm/tests/bug68591-conf-test-group.phpt new file mode 100644 index 0000000000000..14d6390801163 --- /dev/null +++ b/sapi/fpm/tests/bug68591-conf-test-group.phpt @@ -0,0 +1,38 @@ +--TEST-- +FPM: bug68591 - config test group existence +--SKIPIF-- + +--FILE-- +testConfig(); + +?> +Done +--EXPECT-- +ERROR: [pool unconfined] cannot get gid for group 'aaaaaa' +ERROR: FPM initialization failed +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/bug68591-conf-test-listen-group.phpt b/sapi/fpm/tests/bug68591-conf-test-listen-group.phpt new file mode 100644 index 0000000000000..a98f32aa40a6c --- /dev/null +++ b/sapi/fpm/tests/bug68591-conf-test-listen-group.phpt @@ -0,0 +1,38 @@ +--TEST-- +FPM: bug68591 - config test listen group existence +--SKIPIF-- + +--FILE-- +testConfig(); + +?> +Done +--EXPECTF-- +ERROR: [pool unconfined] cannot get gid for group 'aaaaaa': %s +ERROR: FPM initialization failed +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt b/sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt new file mode 100644 index 0000000000000..e649117026750 --- /dev/null +++ b/sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt @@ -0,0 +1,38 @@ +--TEST-- +FPM: bug68591 - config test listen owner existence +--SKIPIF-- + +--FILE-- +testConfig(); + +?> +Done +--EXPECTF-- +ERROR: [pool unconfined] cannot get uid for user 'aaaaaa': %s +ERROR: FPM initialization failed +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/bug68591-conf-test-user.phpt b/sapi/fpm/tests/bug68591-conf-test-user.phpt new file mode 100644 index 0000000000000..5627151f3f13e --- /dev/null +++ b/sapi/fpm/tests/bug68591-conf-test-user.phpt @@ -0,0 +1,38 @@ +--TEST-- +FPM: bug68591 - config test user existence +--SKIPIF-- + +--FILE-- +testConfig(); + +?> +Done +--EXPECT-- +ERROR: [pool unconfined] cannot get uid for user 'aaaaaa' +ERROR: FPM initialization failed +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index 50de960aa8dde..db8f0c04f4a61 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -269,10 +269,11 @@ class Tester static public function skipIfConfigFails(string $configTemplate) { $tester = new self($configTemplate, '', [], self::getCallerFileName()); - $testResult = $tester->testConfig(); + $testResult = $tester->testConfig(true); if ($testResult !== null) { self::clean(2); - die("skip $testResult"); + $message = $testResult[0] ?? 'Config failed'; + die("skip $message"); } } @@ -378,17 +379,26 @@ class Tester /** * Test configuration file. * - * @return null|string + * @return null|array * @throws \Exception */ - public function testConfig() + public function testConfig($silent = false) { $configFile = $this->createConfig(); $cmd = self::findExecutable() . ' -tt -y ' . $configFile . ' 2>&1'; $this->trace('Testing config using command', $cmd, true); exec($cmd, $output, $code); if ($code) { - return preg_replace("/\[.+?\]/", "", $output[0]); + $messages = []; + foreach ($output as $outputLine) { + $message = preg_replace("/\[.+?\]/", "", $outputLine, 1); + $messages[] = $message; + if ( ! $silent) { + $this->error($message, null, false); + } + } + + return $messages; } return null; @@ -1259,14 +1269,15 @@ class Tester /** * Display error. * - * @param string $msg - * @param \Exception|null $exception + * @param string $msg Error message. + * @param \Exception|null $exception If there is an exception, log its message + * @param bool $prefix Whether to prefix the error message * * @return false */ - private function error($msg, \Exception $exception = null): bool + private function error(string $msg, \Exception $exception = null, bool $prefix = true): bool { - $this->error = 'ERROR: ' . $msg; + $this->error = $prefix ? 'ERROR: ' . $msg : ltrim($msg); if ($exception) { $this->error .= '; EXCEPTION: ' . $exception->getMessage(); } From b26b758952d0073156d861f0145e5b36f943e0df Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 Dec 2022 13:02:52 +0100 Subject: [PATCH 047/895] ext/opcache/jit: handle zend_jit_find_trace() failures Commit 6c25413 added the flag ZEND_JIT_EXIT_INVALIDATE which resets the trace handlers in zend_jit_trace_exit(), but forgot to consider that on ZEND_JIT_TRACE_STOP_LINK, this changed handler gets passed to zend_jit_find_trace(), causing it to fail, either by returning 0 (results in bogus data) or by aborting due to ZEND_UNREACHABLE(). In either case, this crashes the PHP process. I'm not quite sure how to fix this multi-threading problem properly; my suggestion is to just fail the zend_jit_trace() call. After all, the whole ZEND_JIT_EXIT_INVALIDATE fix was about reloading modified scripts, so there's probably no point in this pending zend_jit_trace() call. --- NEWS | 1 + ext/opcache/jit/zend_jit_trace.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5cde54978395f..2ef70d371d116 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ PHP NEWS - Opcache: . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). . Fix access to uninitialized variable in accel_preload(). (nielsdos) + . Fix zend_jit_find_trace() crashes. (Max Kellermann) - PHPDBG: . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 5aa450d096bdc..fc42add8bf1e3 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -247,6 +247,13 @@ static void zend_jit_trace_add_code(const void *start, uint32_t size) t->code_size = size; } +/** + * Locate a trace in the #zend_jit_traces array with the specified + * #code_start address. + * + * @return the #zend_jit_traces index or 0 if no such #code_start + * address was found + */ static uint32_t zend_jit_find_trace(const void *addr) { uint32_t i; @@ -256,7 +263,6 @@ static uint32_t zend_jit_find_trace(const void *addr) return i; } } - ZEND_UNREACHABLE(); return 0; } @@ -6843,6 +6849,15 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par const void *timeout_exit_addr = NULL; t->link = zend_jit_find_trace(p->opline->handler); + if (t->link == 0) { + /* this can happen if ZEND_JIT_EXIT_INVALIDATE was handled + * by zend_jit_trace_exit() in another thread after this + * thread set ZEND_JIT_TRACE_STOP_LINK in zend_jit_trace_execute(); + * ZEND_JIT_EXIT_INVALIDATE resets the opline handler to one of + * the "_counter_handler" functions, and these are not registered + * tracer functions */ + goto jit_failure; + } if ((zend_jit_traces[t->link].flags & ZEND_JIT_TRACE_USES_INITIAL_IP) && !zend_jit_set_ip(&dasm_state, p->opline)) { goto jit_failure; From 4cee2c0127431a7ebee2adc53be10b5b199f6344 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 28 Dec 2022 13:35:19 +0000 Subject: [PATCH 048/895] Use proper int|float union type instead of numeric (#10162) --- Zend/zend_API.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index b74fa0fc7a0e1..89b223a6a1f47 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -136,7 +136,7 @@ ZEND_API const char *zend_get_type_by_const(int type) /* {{{ */ case IS_MIXED: return "mixed"; case _IS_NUMBER: - return "number"; + return "int|float"; EMPTY_SWITCH_DEFAULT_CASE() } } From ca5f668f7cfa741cdbf3e7f9daa008e803abc923 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 29 Dec 2022 12:40:46 +0300 Subject: [PATCH 049/895] Added missed return --- ext/opcache/jit/zend_jit_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 128522ade4cef..7b27f6a209a25 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1146,6 +1146,7 @@ static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, u } else if (!(tssa->var_info[tssa->ops[idx].op2_use].type & (MAY_BE_LONG|MAY_BE_DOUBLE))) { return 0; } + return 1; } else if (opline->opcode == ZEND_PRE_DEC || opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_DEC From e217138b4004dcc92a465a39b5fedff117d5d946 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 19 Dec 2022 22:35:22 +0100 Subject: [PATCH 050/895] ext/opcache/jit/zend_jit_trace: add missing lock for EXIT_INVALIDATE Commit 6c254131831 added the flag ZEND_JIT_EXIT_INVALIDATE which resets the trace handlers in zend_jit_trace_exit(), but forgot to lock the shared memory section. This could cause another worker process who still saw the ZEND_JIT_TRACE_JITED flag to schedule ZEND_JIT_TRACE_STOP_LINK, but when it arrived at the ZEND_JIT_DEBUG_TRACE_STOP, the handler was already reverted by the first worker process and thus zend_jit_find_trace() fails. This in turn generated a bogus jump offset in the JITed code, crashing the PHP process. --- NEWS | 1 + ext/opcache/jit/zend_jit_trace.c | 36 +++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 2ef70d371d116..39260e4f70475 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ PHP NEWS . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). . Fix access to uninitialized variable in accel_preload(). (nielsdos) . Fix zend_jit_find_trace() crashes. (Max Kellermann) + . Added missing lock for EXIT_INVALIDATE in zend_jit_trace_exit. (Max Kellermann) - PHPDBG: . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index fc42add8bf1e3..56b01e7daca04 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -8141,22 +8141,34 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf t = &zend_jit_traces[num]; } - SHM_UNPROTECT(); - zend_jit_unprotect(); + zend_shared_alloc_lock(); jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(t->op_array); - if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_LOOP) { - ((zend_op*)(t->opline))->handler = (const void*)zend_jit_loop_trace_counter_handler; - } else if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_ENTER) { - ((zend_op*)(t->opline))->handler = (const void*)zend_jit_func_trace_counter_handler; - } else if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_RETURN) { - ((zend_op*)(t->opline))->handler = (const void*)zend_jit_ret_trace_counter_handler; + + /* Checks under lock, just in case something has changed while we were waiting for the lock */ + if (!(ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & (ZEND_JIT_TRACE_JITED|ZEND_JIT_TRACE_BLACKLISTED))) { + /* skip: not JIT-ed nor blacklisted */ + } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { + /* skip: too many root traces */ + } else { + SHM_UNPROTECT(); + zend_jit_unprotect(); + + if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_LOOP) { + ((zend_op*)(t->opline))->handler = (const void*)zend_jit_loop_trace_counter_handler; + } else if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_ENTER) { + ((zend_op*)(t->opline))->handler = (const void*)zend_jit_func_trace_counter_handler; + } else if (ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_START_RETURN) { + ((zend_op*)(t->opline))->handler = (const void*)zend_jit_ret_trace_counter_handler; + } + ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags &= + ZEND_JIT_TRACE_START_LOOP|ZEND_JIT_TRACE_START_ENTER|ZEND_JIT_TRACE_START_RETURN; + + zend_jit_protect(); + SHM_PROTECT(); } - ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags &= - ZEND_JIT_TRACE_START_LOOP|ZEND_JIT_TRACE_START_ENTER|ZEND_JIT_TRACE_START_RETURN; - zend_jit_protect(); - SHM_PROTECT(); + zend_shared_alloc_unlock(); return 0; } From f7a19181d7a38c4930b589af5c6876ca85d5ec53 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 28 Dec 2022 19:41:43 +0200 Subject: [PATCH 051/895] Allow 'h' and 'k' flags to be combined for mb_convert_kana The 'h' flag makes mb_convert_kana convert zenkaku hiragana to hankaku katakana; 'k' makes it convert zenkaku katakana to hankaku katakana. When working on the implementation of mb_convert_kana, I added some additional checks to catch combinations of flags which do not make sense; but there is no conflict between 'h' and 'k' (they control conversions for two disjoint ranges of codepoints) and this combination should not have been restricted. Thanks to the GitHub user 'akira345' for reporting this problem. Closes GH-10174. --- ext/mbstring/mbstring.c | 5 +---- ext/mbstring/tests/mb_convert_kana.phpt | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 9735bfef80bb2..34678ea3d0f7f 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3185,10 +3185,7 @@ PHP_FUNCTION(mb_convert_kana) * or all FW hiragana to FW katakana, or all FW katakana to FW hiragana, but not * more than one of these */ if (opt & MBFL_ZEN2HAN_HIRAGANA) { - if (opt & MBFL_ZEN2HAN_KATAKANA) { - zend_argument_value_error(2, "must not combine 'h' and 'k' flags"); - RETURN_THROWS(); - } else if (opt & MBFL_ZENKAKU_HIRA2KATA) { + if (opt & MBFL_ZENKAKU_HIRA2KATA) { zend_argument_value_error(2, "must not combine 'h' and 'C' flags"); RETURN_THROWS(); } else if (opt & MBFL_ZENKAKU_KATA2HIRA) { diff --git a/ext/mbstring/tests/mb_convert_kana.phpt b/ext/mbstring/tests/mb_convert_kana.phpt index 69ea5560d4803..b263fec0f1b67 100644 --- a/ext/mbstring/tests/mb_convert_kana.phpt +++ b/ext/mbstring/tests/mb_convert_kana.phpt @@ -78,6 +78,7 @@ echo bin2hex(mb_convert_kana("\x30\x9B", 'k', 'UTF-16BE')), "\n"; echo bin2hex(mb_convert_kana("\x30\x9C", 'k', 'UTF-16BE')), "\n"; echo bin2hex(mb_convert_kana("\x30\xFC", 'k', 'UTF-16BE')), "\n"; echo bin2hex(mb_convert_kana("\x30\xFB", 'k', 'UTF-16BE')), "\n"; +echo bin2hex(mb_convert_kana("fooあいうエオ", "rnaskh", "UTF-8")), "\n"; echo "Including one which will expand to two codepoints:\n"; echo bin2hex(mb_convert_kana("\x30\x52", 'h', 'UTF-16BE')), "\n\n"; @@ -117,7 +118,6 @@ tryIncompatibleFlags('R', 'r'); tryIncompatibleFlags('N', 'n'); tryIncompatibleFlags('S', 's'); tryIncompatibleFlags('K', 'H'); -tryIncompatibleFlags('k', 'h'); tryIncompatibleFlags('C', 'c'); tryIncompatibleFlags('M', 'm'); tryIncompatibleFlags('h', 'C'); @@ -204,6 +204,7 @@ ff9e ff9f ff70 ff65 +666f6fefbdb1efbdb2efbdb3efbdb4efbdb5 Including one which will expand to two codepoints: ff79ff9e @@ -237,8 +238,6 @@ mb_convert_kana(): Argument #2 ($mode) must not combine 'S' and 's' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'S' and 's' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'H' and 'K' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'H' and 'K' flags -mb_convert_kana(): Argument #2 ($mode) must not combine 'h' and 'k' flags -mb_convert_kana(): Argument #2 ($mode) must not combine 'h' and 'k' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'C' and 'c' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'C' and 'c' flags mb_convert_kana(): Argument #2 ($mode) must not combine 'M' and 'm' flags From 3e48e52d936546994e8242ceb2b5c7b35b5753f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 29 Dec 2022 23:17:02 +0100 Subject: [PATCH 052/895] Register parameter attributes via stub in ext/zend_test (#10183) --- ext/zend_test/test.c | 49 ------------------------------------ ext/zend_test/test.stub.php | 20 ++++++++++++--- ext/zend_test/test_arginfo.h | 43 ++++++++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 54 deletions(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 9ec9455023319..d82bcfa54c66b 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -747,61 +747,12 @@ PHP_MINIT_FUNCTION(zend_test) zend_test_parameter_attribute = register_class_ZendTestParameterAttribute(); zend_mark_internal_attribute(zend_test_parameter_attribute); - { - zend_attribute *attr; - - attr = zend_add_parameter_attribute( - zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), - 0, - zend_test_parameter_attribute->name, - 1 - ); - - ZVAL_PSTRING(&attr->args[0].value, "value1"); - } - zend_test_property_attribute = register_class_ZendTestPropertyAttribute(); zend_mark_internal_attribute(zend_test_property_attribute); zend_test_class_with_method_with_parameter_attribute = register_class_ZendTestClassWithMethodWithParameterAttribute(); - - { - zend_attribute *attr; - - attr = zend_add_parameter_attribute( - zend_hash_str_find_ptr(&zend_test_class_with_method_with_parameter_attribute->function_table, "no_override", sizeof("no_override") - 1), - 0, - zend_test_parameter_attribute->name, - 1 - ); - - ZVAL_PSTRING(&attr->args[0].value, "value2"); - - attr = zend_add_parameter_attribute( - zend_hash_str_find_ptr(&zend_test_class_with_method_with_parameter_attribute->function_table, "override", sizeof("override") - 1), - 0, - zend_test_parameter_attribute->name, - 1 - ); - - ZVAL_PSTRING(&attr->args[0].value, "value3"); - } - zend_test_child_class_with_method_with_parameter_attribute = register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_test_class_with_method_with_parameter_attribute); - { - zend_attribute *attr; - - attr = zend_add_parameter_attribute( - zend_hash_str_find_ptr(&zend_test_child_class_with_method_with_parameter_attribute->function_table, "override", sizeof("override") - 1), - 0, - zend_test_parameter_attribute->name, - 1 - ); - - ZVAL_PSTRING(&attr->args[0].value, "value4"); - } - zend_test_forbid_dynamic_call = register_class_ZendTestForbidDynamicCall(); zend_test_ns_foo_class = register_class_ZendTestNS_Foo(); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 95b26fabd0093..76f08a2831a51 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -74,12 +74,21 @@ public function __construct(string $parameter) {} } class ZendTestClassWithMethodWithParameterAttribute { - final public function no_override(string $parameter): int {} - public function override(string $parameter): int {} + final public function no_override( + #[ZendTestParameterAttribute("value2")] + string $parameter + ): int {} + public function override( + #[ZendTestParameterAttribute("value3")] + string $parameter + ): int {} } class ZendTestChildClassWithMethodWithParameterAttribute extends ZendTestClassWithMethodWithParameterAttribute { - public function override(string $parameter): int {} + public function override( + #[ZendTestParameterAttribute("value4")] + string $parameter + ): int {} } final class ZendTestForbidDynamicCall { @@ -151,7 +160,10 @@ function zend_weakmap_dump(): array {} function zend_get_unit_enum(): ZendTestUnitEnum {} - function zend_test_parameter_with_attribute(string $parameter): int {} + function zend_test_parameter_with_attribute( + #[ZendTestParameterAttribute("value1")] + string $parameter + ): int {} function zend_get_current_func_name(): string {} diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 52fd88d008c93..025bd791b190e 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5c7af89178bc4ea0f49fbf516d81f4fdaebece22 */ + * Stub hash: f19c545e86b40d999d43008882f0c151d26be121 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -373,6 +373,17 @@ static const zend_function_entry class_ZendTestNS2_ZendSubNS_Foo_methods[] = { static void register_test_symbols(int module_number) { REGISTER_LONG_CONSTANT("ZEND_TEST_DEPRECATED", 42, CONST_PERSISTENT | CONST_DEPRECATED); + + +#if (PHP_VERSION_ID >= 80200) + zend_string *attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); + zend_attribute *attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), 0, attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0, 1); + zend_string_release(attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0); + zval attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0; + zend_string *attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0_str = zend_string_init("value1", strlen("value1"), 1); + ZVAL_STR(&attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0, attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0_str); + ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0->args[0].value, &attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0); +#endif } static zend_class_entry *register_class__ZendTestInterface(void) @@ -569,6 +580,25 @@ static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttr INIT_CLASS_ENTRY(ce, "ZendTestClassWithMethodWithParameterAttribute", class_ZendTestClassWithMethodWithParameterAttribute_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); +#if (PHP_VERSION_ID >= 80200) + + + zend_string *attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); + zend_attribute *attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "no_override", sizeof("no_override") - 1), 0, attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0, 1); + zend_string_release(attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0); + zval attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0_arg0; + zend_string *attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0_arg0_str = zend_string_init("value2", strlen("value2"), 1); + ZVAL_STR(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0_arg0, attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0_arg0_str); + ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0->args[0].value, &attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0_arg0); + + zend_string *attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); + zend_attribute *attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0, 1); + zend_string_release(attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0); + zval attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0; + zend_string *attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0_str = zend_string_init("value3", strlen("value3"), 1); + ZVAL_STR(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0, attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0_str); + ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0->args[0].value, &attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0); +#endif return class_entry; } @@ -579,6 +609,17 @@ static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParamete INIT_CLASS_ENTRY(ce, "ZendTestChildClassWithMethodWithParameterAttribute", class_ZendTestChildClassWithMethodWithParameterAttribute_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute); +#if (PHP_VERSION_ID >= 80200) + + + zend_string *attribute_name_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); + zend_attribute *attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0, 1); + zend_string_release(attribute_name_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0); + zval attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0; + zend_string *attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0_str = zend_string_init("value4", strlen("value4"), 1); + ZVAL_STR(&attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0, attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0_str); + ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0->args[0].value, &attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0); +#endif return class_entry; } From 3a44c78f14015625e5cea9d999b642afc153285a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 26 Dec 2022 21:43:53 +0100 Subject: [PATCH 053/895] Fix null pointer dereference of param When the validation logic for param->type was added, the logic did not account for the case where param could be NULL. The existing code did take that into account as can be seen in the `if (param)` check below. Furthermore, phpdbg_set_breakpoint_expression even calls phpdbg_create_conditional_break with param == NULL. Fix it by placing the validation logic inside a NULL check. --- NEWS | 1 + sapi/phpdbg/phpdbg_bp.c | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 39260e4f70475..8553567777a4f 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ PHP NEWS - PHPDBG: . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) + . Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos) - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index e48ed5ceba2a9..aa35402cfe6e6 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -829,19 +829,21 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co uint32_t cops = CG(compiler_options); zend_string *bp_code; - switch (param->type) { - case STR_PARAM: - case NUMERIC_FUNCTION_PARAM: - case METHOD_PARAM: - case NUMERIC_METHOD_PARAM: - case FILE_PARAM: - case ADDR_PARAM: - /* do nothing */ - break; + if (param) { + switch (param->type) { + case STR_PARAM: + case NUMERIC_FUNCTION_PARAM: + case METHOD_PARAM: + case NUMERIC_METHOD_PARAM: + case FILE_PARAM: + case ADDR_PARAM: + /* do nothing */ + break; - default: - phpdbg_error("Invalid parameter type for conditional breakpoint"); - return; + default: + phpdbg_error("Invalid parameter type for conditional breakpoint"); + return; + } } PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_COND); From f40c3fca88bd3a7ed516f05ba04999dcb3256ab2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 29 Dec 2022 22:50:13 +0200 Subject: [PATCH 054/895] Improve mb_detect_encoding's recognition of Turkish text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 4 codepoints commonly used to write Turkish text to our table of 'commonly used' Unicode codepoints. These are: • U+011F LATIN SMALL LETTER G WITH BREVE • U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE • U+0131 LATIN SMALL LETTER DOTLESS I • U+015F LATIN SMALL LETTER S WITH CEDILLA --- NEWS | 3 +++ ext/mbstring/common_codepoints.txt | 3 +++ ext/mbstring/rare_cp_bitvec.h | 2 +- ext/mbstring/tests/mb_detect_encoding.phpt | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 10ee8cebe65d0..bc46c635c1f9c 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,9 @@ PHP NEWS - JSON: . Added json_validate(). (Juan Morales) +- MBString: + . mb_detect_encoding is better able to identify the correct encoding for Turkish text. (Alex Dowad) + - Opcache: . Added start, restart and force restart time to opcache's phpinfo section. (Mikhail Galanin) diff --git a/ext/mbstring/common_codepoints.txt b/ext/mbstring/common_codepoints.txt index d89426cedfa27..66c49c5a94ca8 100644 --- a/ext/mbstring/common_codepoints.txt +++ b/ext/mbstring/common_codepoints.txt @@ -6,10 +6,13 @@ 0x0104 0x0107 # Polish 0x010C 0x010F # Czech 0x0118 0x011B # Polish, Czech +0x011F 0x011F # Turkish +0x0130 0x0131 # Turkish 0x0141 0x0144 # Polish 0x0147 0x0148 # Czech 0x0150 0x0151 # Hungarian 0x0158 0x015B # Czech, Polish +0x015F 0x015F # Turkish 0x0160 0x0161 # Used in Slavic names 0x0164 0x0165 # Czech 0x016E 0x016F # Czech diff --git a/ext/mbstring/rare_cp_bitvec.h b/ext/mbstring/rare_cp_bitvec.h index 451c588bd64d6..56a40478b5a34 100644 --- a/ext/mbstring/rare_cp_bitvec.h +++ b/ext/mbstring/rare_cp_bitvec.h @@ -11,7 +11,7 @@ static uint32_t rare_codepoint_bitvec[] = { 0xffffd9ff, 0x00000000, 0x00000000, 0x80000000, 0xffffffff, 0x00002001, 0x00000000, 0x00000000, -0xf0ff0f0f, 0xffffffff, 0xf0fcfe61, 0x81fc3fcc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, +0x70ff0f0f, 0xfffcffff, 0x70fcfe61, 0x81fc3fcc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffff800, 0xffffffff, 0xffffffff, 0x0300ffff, 0x0000280f, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index a9d48ee5f9488..2967eb4adcb19 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -149,6 +149,7 @@ $jpEncodings = [ test($jpStrings, $jpEncodings); $cnStrings = [ + // Headline randomly picked from Chinese news "日本宫内厅宣布,真子公主和小室圭将在10月26日完婚。", // The Dream of Red Mansions "此开卷第一回也。作者自云曾历过一番梦幻之后,故将真事隐去,而借“通灵”说此《石头记》一书也", @@ -312,6 +313,19 @@ test($czechStrings, $czechEncodings); test([$hungarian], ['UTF-8', 'UTF-16', 'Windows-1252']); +$turkishStrings = [ + // Random junk indiscriminately copied from randomly picked Wikipedia articles + "Samsun 19 Mayıs Stadyumu, Samsun'un Tekkeköy ilçesinde bulunan akıllı çok amaçlı stadyumdur. 33.919 koltuk kapasitesiyle Samsunspor'un iç saha maçlarına ev sahipliği yapmaktadır. Toplu Konut İdaresi tarafından yaptırılan ve 2017'de tamamlanan stadyum adını Mustafa Kemal'in Samsun'a çıktığı gün olan 19 Mayıs'tan almaktadır. İlk olarak Nisan 2011'de duyurulan proje 3 Aralık 2012'de Toplu Konut İdaresince yapılan ve Ali Acar İnşaat'ın kazandığı ihale ile resmiyete dökülmüş, 4 Ağustos 2013 tarihindeki temel atma töreni ile de inşa aşamasına geçilmiştir. İnşaatın başlangıç tarihinden itibaren en geç 800 gün içerisinde tamamlanması taahhüt edilse de UEFA'nın standartlarına uyum sağlamak için projede yenileme yapılması, çatının inşasıyla sorumlu şirketin iflas etmesi gibi sebeplerle tamamlanma süresi birkaç kez sarkmıştır. Bu bağlamda, ilk etapta 2014-15 sezonunda hazır hâle geleceği açıklanan stadyumun açılışı önce 2015-16, daha sonra 2016-17 sezonu başına ertelense de bu hedefler de yakalanamamıştır.", + "Lütf-i Celil (Osmanlı Türkçesi: ﻟﻄﻒ ﺟﻠﻴﻞ Anlamı: \"İlahi Lütuf\"), Osmanlı Donanması'nın Lütf-i Celil sınıfının öncü gemisi olan zırhlı savaş gemisidir. Başlangıçta Osmanlı İmparatorluğu'na bağlı özerk bir devlet olan Mısır Hidivliği tarafından sipariş edilen Lütf-i Celil, Osmanlı hükûmetinin Mısır'ı gemiyi teslim etmeye zorlaması ile Fransa'daki Forges et Chantiers de la Gironde tersanesinde yapım aşamasındayken Osmanlılara devredildi. Lütf-i Celil, 1877'de 93 Harbi sırasında aktif görevde bulundu ve Rus güçlerinin Tuna'yı geçmesini önlemek için operasyonlarda bulundu. 11 Mayıs'ta devriye gezerken bir Rus topçu bataryasıyla çatışmaya girdi.", + "Çoğu tarihçinin kanısına göre, ABD'nin üçüncü başkanı Jefferson, karısının ölümünün ardından kölesi Sally Hemings ile 38 yıl süren ilişkisi sırasında onun altı çocuğunun babası olmuştur.", + "2011 İran drama filmi Bir Ayrılık, 61. Berlin Film Festivali'nde Altın Ayı kazanarak, bu ödülü alan ilk İran filmi oldu.", + "Josef Bringas, isyan eden general Nikiforos Fokas'a karşı Konstantinopolis'e birlikler getirdi; asilerin Boğaziçi'ni geçmelerini engellemek için tüm gemileri tuttu; Nikiforos'un babası Bardas'ı rehin aldı ama başarılı olamadı." +]; +// ISO-8859-9 and Windows-1254 are very similar and we can't really distinguish them from each other +// But both of them should be distinguishable from UTF-8 +test($turkishStrings, ['UTF-8', 'UTF-16', 'ISO-8859-9']); +test($turkishStrings, ['UTF-8', 'Windows-1254']); + echo "Done!\n"; ?> From c2b0be5570aeae64c327021677b14d8dc84e4a3b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 30 Dec 2022 15:11:09 +0000 Subject: [PATCH 055/895] Fix memory leak in posix_ttyname() Closes GH-10190 --- NEWS | 3 +++ ext/posix/posix.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8553567777a4f..62a771f4c568b 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ PHP NEWS . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) . Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos) +- Posix: + . Fix memory leak in posix_ttyname() (girgias) + - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index e6655f0d95b3b..d32f1cfa0488d 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -547,15 +547,15 @@ PHP_FUNCTION(posix_ttyname) efree(p); RETURN_FALSE; } - RETURN_STRING(p); + RETVAL_STRING(p); efree(p); #else if (NULL == (p = ttyname(fd))) { POSIX_G(last_error) = errno; RETURN_FALSE; } -#endif RETURN_STRING(p); +#endif } /* }}} */ From 4c9375e504a6ba15de56fcf6b630d8c95155057d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:31:40 +0100 Subject: [PATCH 056/895] Fix GH-10187: Segfault in stripslashes() with arm64 Closes GH-10188 Co-authored-by: todeveni Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/standard/string.c | 18 +++++++++++------- ext/standard/tests/strings/gh10187.phpt | 8 ++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 ext/standard/tests/strings/gh10187.phpt diff --git a/NEWS b/NEWS index 62a771f4c568b..feb6e882ff55a 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ PHP NEWS - Posix: . Fix memory leak in posix_ttyname() (girgias) +- Standard: + . Fix GH-10187 (Segfault in stripslashes() with arm64). (nielsdos) + - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/ext/standard/string.c b/ext/standard/string.c index 8a223b72f4e33..e171448f243e1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3988,19 +3988,23 @@ static zend_always_inline char *php_stripslashes_impl(const char *str, char *out quad_word q; vst1q_u8(q.mem, vceqq_u8(x, vdupq_n_u8('\\'))); if (q.dw[0] | q.dw[1]) { - int i = 0; - for (; i < 16; i++) { + unsigned int i = 0; + while (i < 16) { if (q.mem[i] == 0) { *out++ = str[i]; + i++; continue; } i++; /* skip the slash */ - char s = str[i]; - if (s == '0') - *out++ = '\0'; - else - *out++ = s; /* preserve the next character */ + if (i < len) { + char s = str[i]; + if (s == '0') + *out++ = '\0'; + else + *out++ = s; /* preserve the next character */ + i++; + } } str += i; len -= i; diff --git a/ext/standard/tests/strings/gh10187.phpt b/ext/standard/tests/strings/gh10187.phpt new file mode 100644 index 0000000000000..b42c95e591ed0 --- /dev/null +++ b/ext/standard/tests/strings/gh10187.phpt @@ -0,0 +1,8 @@ +--TEST-- +GH-10187 (Segfault in stripslashes() with arm64) +--FILE-- + +--EXPECT-- +string(15) "1234567890abcde" From 0aa1fdf28d53ef08eb9a4c7d2547bf0cf8d3a2aa Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 30 Dec 2022 16:03:40 +0100 Subject: [PATCH 057/895] Fix variation5-win32(-mb).phpt wrt. parallel test execution Each test should use its own temporary filenames to avoid issues when the tests are executed in parallel[1]. We also silence the `unlink()` calls in the CLEAN section just in case. And while we're at it, we also remove the erroneous comment; there is no symlinking involved for the Windows test variants. [1] Closes GH-10189. --- ext/standard/tests/file/file_variation5-win32-mb.phpt | 6 +++--- ext/standard/tests/file/file_variation5-win32.phpt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/tests/file/file_variation5-win32-mb.phpt b/ext/standard/tests/file/file_variation5-win32-mb.phpt index 18dd399e5b7a9..0e6bbd69e33d0 100644 --- a/ext/standard/tests/file/file_variation5-win32-mb.phpt +++ b/ext/standard/tests/file/file_variation5-win32-mb.phpt @@ -14,7 +14,7 @@ chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "私はガラスを食べられますtestdir"; mkdir($test_dirname); -$filepath = __DIR__ . '/file_variation_5.tmp'; +$filepath = __DIR__ . '/file_variation_5_mb.tmp'; $filename = basename($filepath); $fd = fopen($filepath, "w+"); fwrite($fd, "Line 1\nLine 2\nLine 3"); @@ -35,8 +35,8 @@ chdir($script_directory); --CLEAN-- --EXPECT-- diff --git a/ext/standard/tests/file/file_variation5-win32.phpt b/ext/standard/tests/file/file_variation5-win32.phpt index cde34d83c53f3..948f56e034720 100644 --- a/ext/standard/tests/file/file_variation5-win32.phpt +++ b/ext/standard/tests/file/file_variation5-win32.phpt @@ -36,7 +36,7 @@ chdir($script_directory); --EXPECT-- From eebf3bc0babb60227e7ac891bddeb296e2fc9149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 18 Dec 2022 22:32:37 +0100 Subject: [PATCH 058/895] Better document constructors Until https://github.com/php/php-src/pull/10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way: - documents inherited constructors (along with destructors) - makes it possible to generate/replace the methodsynopsis of implicit default constructors which don't have a stub counterpart --- build/gen_stub.php | 159 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 129 insertions(+), 30 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 7e89007948fe6..8d8344062ef06 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2700,17 +2700,18 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera } $classSynopsisInfo->appendChild(new DOMText("\n ")); - /** @var Name[] $parentsWithInheritedConstants */ + /** @var array $parentsWithInheritedConstants */ $parentsWithInheritedConstants = []; - /** @var Name[] $parentsWithInheritedProperties */ + /** @var array $parentsWithInheritedProperties */ $parentsWithInheritedProperties = []; - /** @var Name[] $parentsWithInheritedMethods */ + /** @var array $parentsWithInheritedMethods */ $parentsWithInheritedMethods = []; $this->collectInheritedMembers( $parentsWithInheritedConstants, $parentsWithInheritedProperties, $parentsWithInheritedMethods, + $this->hasConstructor(), $classMap ); @@ -2756,9 +2757,9 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera "&InheritedProperties;" ); - $isConcreteClass = ($this->type === "class" && !($this->flags & Class_::MODIFIER_ABSTRACT)); + $isConcreteClassWithoutParentConstructor = $this->isConcreteClassWithoutParentConstructor($classMap); - if ($isConcreteClass || !empty($this->funcInfos)) { + if ($isConcreteClassWithoutParentConstructor || !empty($this->funcInfos)) { $classSynopsis->appendChild(new DOMText("\n\n ")); $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); $classSynopsisInfo->setAttribute("role", "comment"); @@ -2768,7 +2769,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $classReference = self::getClassSynopsisReference($this->name); $escapedName = addslashes($this->name->__toString()); - if ($isConcreteClass || $this->hasConstructor()) { + if ($isConcreteClassWithoutParentConstructor || $this->hasConstructor()) { $classSynopsis->appendChild(new DOMText("\n ")); $includeElement = $this->createIncludeElement( $doc, @@ -2802,14 +2803,21 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $classSynopsis->appendChild($classSynopsisInfo); foreach ($parentsWithInheritedMethods as $parent) { - $classSynopsis->appendChild(new DOMText("\n ")); - $parentReference = self::getClassSynopsisReference($parent); - $escapedParentName = addslashes($parent->__toString()); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedParentName'])" - ); - $classSynopsis->appendChild($includeElement); + $parentName = $parent["name"]; + $parentMethodsynopsisTypes = $parent["types"]; + + $parentReference = self::getClassSynopsisReference($parentName); + $escapedParentName = addslashes($parentName->__toString()); + + foreach ($parentMethodsynopsisTypes as $parentMethodsynopsisType) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:{$parentMethodsynopsisType}[@role='$escapedParentName'])" + ); + + $classSynopsis->appendChild($includeElement); + } } } @@ -2818,6 +2826,31 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera return $classSynopsis; } + /** + * @param array $classMap + */ + public function getNonExistentDefaultConstructorForManual(array $classMap): ?FuncInfo { + if (!$this->isConcreteClassWithoutParentConstructor($classMap) || $this->hasConstructor()) { + return null; + } + + return new FuncInfo( + new MethodName($this->name, "__construct"), + $this->flags, + 0, + null, + null, + false, + false, + true, + [], + new ReturnInfo(false, null, null, false, null), + 0, + null, + false + ); + } + private static function createOoElement( DOMDocument $doc, ClassInfo $classInfo, @@ -2867,39 +2900,54 @@ public static function getClassSynopsisReference(Name $name): string { } /** - * @param Name[] $parentsWithInheritedConstants - * @param Name[] $parentsWithInheritedProperties - * @param Name[] $parentsWithInheritedMethods + * @param array $parentsWithInheritedConstants + * @param array $parentsWithInheritedProperties + * @param array $parentsWithInheritedMethods * @param array $classMap */ private function collectInheritedMembers( array &$parentsWithInheritedConstants, array &$parentsWithInheritedProperties, array &$parentsWithInheritedMethods, + bool $hasConstructor, array $classMap ): void { foreach ($this->extends as $parent) { $parentInfo = $classMap[$parent->toString()] ?? null; + $parentName = $parent->toString(); + if (!$parentInfo) { - throw new Exception("Missing parent class " . $parent->toString()); + throw new Exception("Missing parent class $parentName"); } - if (!empty($parentInfo->constInfos) && !isset($parentsWithInheritedConstants[$parent->toString()])) { - $parentsWithInheritedConstants[$parent->toString()] = $parent; + if (!empty($parentInfo->constInfos) && !isset($parentsWithInheritedConstants[$parentName])) { + $parentsWithInheritedConstants[] = $parent; + } + + if (!empty($parentInfo->propertyInfos) && !isset($parentsWithInheritedProperties[$parentName])) { + $parentsWithInheritedProperties[$parentName] = $parent; } - if (!empty($parentInfo->propertyInfos) && !isset($parentsWithInheritedProperties[$parent->toString()])) { - $parentsWithInheritedProperties[$parent->toString()] = $parent; + if (!$hasConstructor && $parentInfo->hasConstructor()) { + $parentsWithInheritedMethods[$parentName]["name"] = $parent; + $parentsWithInheritedMethods[$parentName]["types"][] = "constructorsynopsis"; } - if (!isset($parentsWithInheritedMethods[$parent->toString()]) && $parentInfo->hasMethods()) { - $parentsWithInheritedMethods[$parent->toString()] = $parent; + if ($parentInfo->hasMethods()) { + $parentsWithInheritedMethods[$parentName]["name"] = $parent; + $parentsWithInheritedMethods[$parentName]["types"][] = "methodsynopsis"; + } + + if ($parentInfo->hasDestructor()) { + $parentsWithInheritedMethods[$parentName]["name"] = $parent; + $parentsWithInheritedMethods[$parentName]["types"][] = "destructorsynopsis"; } $parentInfo->collectInheritedMembers( $parentsWithInheritedConstants, $parentsWithInheritedProperties, $parentsWithInheritedMethods, + $hasConstructor, $classMap ); } @@ -2921,6 +2969,7 @@ private function collectInheritedMembers( $parentsWithInheritedConstants, $unusedParentsWithInheritedProperties, $unusedParentsWithInheritedMethods, + $hasConstructor, $classMap ); } @@ -2937,6 +2986,29 @@ private function hasConstructor(): bool return false; } + /** + * @param array $classMap + */ + private function hasParentConstructor(array $classMap): bool + { + foreach ($this->extends as $parentName) { + $parent = $classMap[$parentName->toString()] ?? null; + if ($parent === null) { + throw new Exception("Missing parent class " . $parent->toString()); + } + + if ($parent->hasConstructor()) { + return true; + } + + if ($parent->hasParentConstructor($classMap)) { + return true; + } + } + + return false; + } + private function hasDestructor(): bool { foreach ($this->funcInfos as $funcInfo) { @@ -2959,6 +3031,13 @@ private function hasMethods(): bool return false; } + /** + * @param array $classMap + */ + private function isConcreteClassWithoutParentConstructor(array $classMap) { + return $this->type === "class" && !($this->flags & Class_::MODIFIER_ABSTRACT) && !$this->hasParentConstructor($classMap); + } + private function createIncludeElement(DOMDocument $doc, string $query): DOMElement { $includeElement = $doc->createElement("xi:include"); @@ -3036,6 +3115,18 @@ public function getAllFuncInfos(): iterable { } } + /** + * @return array $classMap + */ + public function getAllNonExistentDefaultConstructorsForManual(array $classMap): iterable { + foreach ($this->classInfos as $classInfo) { + $funcInfo = $classInfo->getNonExistentDefaultConstructorForManual($classMap); + if ($funcInfo !== null) { + yield $funcInfo; + } + } + } + /** * @return iterable */ @@ -4058,14 +4149,14 @@ static function (FuncInfo $funcInfo) use ($allConstInfos) { ); } -/** @param FuncInfo $funcInfos */ -function generateOptimizerInfo(array $funcInfos): string { +/** @param array $funcMap */ +function generateOptimizerInfo(array $funcMap): string { $code = "/* This is a generated file, edit the .stub.php files instead. */\n\n"; $code .= "static const func_info_t func_infos[] = {\n"; - $code .= generateCodeWithConditions($funcInfos, "", static function (FuncInfo $funcInfo) { + $code .= generateCodeWithConditions($funcMap, "", static function (FuncInfo $funcInfo) { return $funcInfo->getOptimizerInfo(); }); @@ -4688,7 +4779,6 @@ function initPhpParser() { foreach ($fileInfos as $fileInfo) { foreach ($fileInfo->getAllFuncInfos() as $funcInfo) { - /** @var FuncInfo $funcInfo */ $funcMap[$funcInfo->name->__toString()] = $funcInfo; // TODO: Don't use aliasMap for methodsynopsis? @@ -4702,6 +4792,15 @@ function initPhpParser() { } } +/** @var array $funcMapForManual */ +$funcMapForManual = $funcMap; + +foreach ($fileInfos as $fileInfo) { + foreach ($fileInfo->getAllNonExistentDefaultConstructorsForManual($classMap) as $funcInfo) { + $funcMapForManual[$funcInfo->name->__toString()] = $funcInfo; + } +} + if ($verify) { $errors = []; @@ -4817,7 +4916,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc if ($generateMethodSynopses) { $methodSynopsesDirectory = getcwd() . "/methodsynopses"; - $methodSynopses = generateMethodSynopses($funcMap, $aliasMap); + $methodSynopses = generateMethodSynopses($funcMapForManual, $aliasMap); if (!empty($methodSynopses)) { if (!file_exists($methodSynopsesDirectory)) { mkdir($methodSynopsesDirectory); @@ -4832,7 +4931,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc } if ($replaceMethodSynopses) { - $methodSynopses = replaceMethodSynopses($targetSynopses, $funcMap, $aliasMap, $verify); + $methodSynopses = replaceMethodSynopses($targetSynopses, $funcMapForManual, $aliasMap, $verify); foreach ($methodSynopses as $filename => $content) { if (file_put_contents($filename, $content)) { From 38e138798d23d46446549053bd8b3b557009e434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 26 Dec 2022 23:20:37 +0100 Subject: [PATCH 059/895] Do not display non-existent constructors --- build/gen_stub.php | 113 ++++++++++++--------------------------------- 1 file changed, 29 insertions(+), 84 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 8d8344062ef06..fed766da794fc 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2757,43 +2757,41 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera "&InheritedProperties;" ); - $isConcreteClassWithoutParentConstructor = $this->isConcreteClassWithoutParentConstructor($classMap); - - if ($isConcreteClassWithoutParentConstructor || !empty($this->funcInfos)) { + if (!empty($this->funcInfos)) { $classSynopsis->appendChild(new DOMText("\n\n ")); $classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;"); $classSynopsisInfo->setAttribute("role", "comment"); $classSynopsis->appendChild($classSynopsisInfo); - } - $classReference = self::getClassSynopsisReference($this->name); - $escapedName = addslashes($this->name->__toString()); + $classReference = self::getClassSynopsisReference($this->name); + $escapedName = addslashes($this->name->__toString()); - if ($isConcreteClassWithoutParentConstructor || $this->hasConstructor()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])" - ); - $classSynopsis->appendChild($includeElement); - } + if ($this->hasConstructor()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])" + ); + $classSynopsis->appendChild($includeElement); + } - if ($this->hasMethods()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])" - ); - $classSynopsis->appendChild($includeElement); - } + if ($this->hasMethods()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])" + ); + $classSynopsis->appendChild($includeElement); + } - if ($this->hasDestructor()) { - $classSynopsis->appendChild(new DOMText("\n ")); - $includeElement = $this->createIncludeElement( - $doc, - "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])" - ); - $classSynopsis->appendChild($includeElement); + if ($this->hasDestructor()) { + $classSynopsis->appendChild(new DOMText("\n ")); + $includeElement = $this->createIncludeElement( + $doc, + "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])" + ); + $classSynopsis->appendChild($includeElement); + } } if (!empty($parentsWithInheritedMethods)) { @@ -2826,31 +2824,6 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera return $classSynopsis; } - /** - * @param array $classMap - */ - public function getNonExistentDefaultConstructorForManual(array $classMap): ?FuncInfo { - if (!$this->isConcreteClassWithoutParentConstructor($classMap) || $this->hasConstructor()) { - return null; - } - - return new FuncInfo( - new MethodName($this->name, "__construct"), - $this->flags, - 0, - null, - null, - false, - false, - true, - [], - new ReturnInfo(false, null, null, false, null), - 0, - null, - false - ); - } - private static function createOoElement( DOMDocument $doc, ClassInfo $classInfo, @@ -3031,13 +3004,6 @@ private function hasMethods(): bool return false; } - /** - * @param array $classMap - */ - private function isConcreteClassWithoutParentConstructor(array $classMap) { - return $this->type === "class" && !($this->flags & Class_::MODIFIER_ABSTRACT) && !$this->hasParentConstructor($classMap); - } - private function createIncludeElement(DOMDocument $doc, string $query): DOMElement { $includeElement = $doc->createElement("xi:include"); @@ -3115,18 +3081,6 @@ public function getAllFuncInfos(): iterable { } } - /** - * @return array $classMap - */ - public function getAllNonExistentDefaultConstructorsForManual(array $classMap): iterable { - foreach ($this->classInfos as $classInfo) { - $funcInfo = $classInfo->getNonExistentDefaultConstructorForManual($classMap); - if ($funcInfo !== null) { - yield $funcInfo; - } - } - } - /** * @return iterable */ @@ -4792,15 +4746,6 @@ function initPhpParser() { } } -/** @var array $funcMapForManual */ -$funcMapForManual = $funcMap; - -foreach ($fileInfos as $fileInfo) { - foreach ($fileInfo->getAllNonExistentDefaultConstructorsForManual($classMap) as $funcInfo) { - $funcMapForManual[$funcInfo->name->__toString()] = $funcInfo; - } -} - if ($verify) { $errors = []; @@ -4916,7 +4861,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc if ($generateMethodSynopses) { $methodSynopsesDirectory = getcwd() . "/methodsynopses"; - $methodSynopses = generateMethodSynopses($funcMapForManual, $aliasMap); + $methodSynopses = generateMethodSynopses($funcMap, $aliasMap); if (!empty($methodSynopses)) { if (!file_exists($methodSynopsesDirectory)) { mkdir($methodSynopsesDirectory); @@ -4931,7 +4876,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc } if ($replaceMethodSynopses) { - $methodSynopses = replaceMethodSynopses($targetSynopses, $funcMapForManual, $aliasMap, $verify); + $methodSynopses = replaceMethodSynopses($targetSynopses, $funcMap, $aliasMap, $verify); foreach ($methodSynopses as $filename => $content) { if (file_put_contents($filename, $content)) { From 7b08fe9f2d2f5e701972cd1054bd55fea7d56fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 28 Dec 2022 15:34:50 +0100 Subject: [PATCH 060/895] Do not list private constructors as inherited --- build/gen_stub.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index fed766da794fc..9e6a945a5c4e7 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2901,7 +2901,7 @@ private function collectInheritedMembers( $parentsWithInheritedProperties[$parentName] = $parent; } - if (!$hasConstructor && $parentInfo->hasConstructor()) { + if (!$hasConstructor && $parentInfo->hasNonPrivateConstructor()) { $parentsWithInheritedMethods[$parentName]["name"] = $parent; $parentsWithInheritedMethods[$parentName]["types"][] = "constructorsynopsis"; } @@ -2959,22 +2959,10 @@ private function hasConstructor(): bool return false; } - /** - * @param array $classMap - */ - private function hasParentConstructor(array $classMap): bool + private function hasNonPrivateConstructor(): bool { - foreach ($this->extends as $parentName) { - $parent = $classMap[$parentName->toString()] ?? null; - if ($parent === null) { - throw new Exception("Missing parent class " . $parent->toString()); - } - - if ($parent->hasConstructor()) { - return true; - } - - if ($parent->hasParentConstructor($classMap)) { + foreach ($this->funcInfos as $funcInfo) { + if ($funcInfo->name->isConstructor() && !($funcInfo->flags & Class_::MODIFIER_PRIVATE)) { return true; } } From c2404915e016c63c1873f588cbfeb0909a314e62 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 2 Jan 2023 15:34:03 +0100 Subject: [PATCH 061/895] Fix GH-10200: zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed. This occurs because the array of properties is a single element with an integer key, not an associative array. Therefore it is a packed array and thus the assumption the iteration macro makes is invalid. This restores the behaviour of PHP<8.2. Closes GH-10209 Co-authored-by: Deltik Signed-off-by: George Peter Banyard --- NEWS | 4 ++++ Zend/tests/gh10200.phpt | 20 ++++++++++++++++++++ Zend/zend_builtin_functions.c | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/gh10200.phpt diff --git a/NEWS b/NEWS index 341af094271f5..ba9b1c1142d3c 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.2 +- Core: + . Fixed bug GH-10200 (zif_get_object_vars: + Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed). (nielsdos) + - FPM: . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). diff --git a/Zend/tests/gh10200.phpt b/Zend/tests/gh10200.phpt new file mode 100644 index 0000000000000..5462352e7ae5b --- /dev/null +++ b/Zend/tests/gh10200.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10200 (zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.) +--FILE-- + +https://github.com/php/php-src/issues/10200 not encountered +EOF; + +$xml = simplexml_load_string($xmlData); +$output = get_object_vars($xml); +var_dump($output); + +?> +--EXPECT-- +array(1) { + [0]=> + string(59) "https://github.com/php/php-src/issues/10200 not encountered" +} diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 8813fa9788a97..5cebbbc560894 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -760,7 +760,7 @@ ZEND_FUNCTION(get_object_vars) } else { array_init_size(return_value, zend_hash_num_elements(properties)); - ZEND_HASH_MAP_FOREACH_KEY_VAL(properties, num_key, key, value) { + ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, value) { bool is_dynamic = 1; if (Z_TYPE_P(value) == IS_INDIRECT) { value = Z_INDIRECT_P(value); From a3d2c33b060c24f5646b42bccd56854563ad411b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 2 Jan 2023 15:34:03 +0100 Subject: [PATCH 062/895] Fix GH-10200: zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed. This occurs because the array of properties is a single element with an integer key, not an associative array. Therefore it is a packed array and thus the assumption the iteration macro makes is invalid. This restores the behaviour of PHP<8.2. Closes GH-10209 Co-authored-by: Deltik Signed-off-by: George Peter Banyard --- Zend/tests/gh10200.phpt | 20 ++++++++++++++++++++ Zend/zend_builtin_functions.c | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/gh10200.phpt diff --git a/Zend/tests/gh10200.phpt b/Zend/tests/gh10200.phpt new file mode 100644 index 0000000000000..5462352e7ae5b --- /dev/null +++ b/Zend/tests/gh10200.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10200 (zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.) +--FILE-- + +https://github.com/php/php-src/issues/10200 not encountered +EOF; + +$xml = simplexml_load_string($xmlData); +$output = get_object_vars($xml); +var_dump($output); + +?> +--EXPECT-- +array(1) { + [0]=> + string(59) "https://github.com/php/php-src/issues/10200 not encountered" +} diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b3103393b833d..14ee4512d369e 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -764,7 +764,7 @@ ZEND_FUNCTION(get_object_vars) } else { array_init_size(return_value, zend_hash_num_elements(properties)); - ZEND_HASH_MAP_FOREACH_KEY_VAL(properties, num_key, key, value) { + ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, value) { bool is_dynamic = 1; if (Z_TYPE_P(value) == IS_INDIRECT) { value = Z_INDIRECT_P(value); From e1a25ff2ed1654a00d564c9881dc6b9313e4ca99 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 Dec 2022 12:38:20 +0100 Subject: [PATCH 063/895] ext/opcache/zend_shared_alloc: add assertions on "locked" flag Let the PHP process crash if a bug causes incorrect locking calls. --- ext/opcache/zend_shared_alloc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 3f18a4db6040e..c2b48531bc934 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -453,6 +453,8 @@ void zend_shared_alloc_safe_unlock(void) void zend_shared_alloc_lock(void) { + ZEND_ASSERT(!ZCG(locked)); + #ifndef ZEND_WIN32 struct flock mem_write_lock; @@ -490,6 +492,8 @@ void zend_shared_alloc_lock(void) void zend_shared_alloc_unlock(void) { + ZEND_ASSERT(ZCG(locked)); + #ifndef ZEND_WIN32 struct flock mem_write_unlock; From 10d43c40dd406178af6ff0dfa14194283e123778 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Jan 2023 14:05:57 +0100 Subject: [PATCH 064/895] ext/opcache/zend_shared_alloc: change "locked" check to assertion Calling zend_shared_alloc() without holding the lock is always a bug, not a fatal runtime error. --- ext/opcache/zend_shared_alloc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index c2b48531bc934..703796d51d85c 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -336,6 +336,8 @@ static size_t zend_shared_alloc_get_largest_free_block(void) void *zend_shared_alloc(size_t size) { + ZEND_ASSERT(ZCG(locked)); + int i; unsigned int block_size = ZEND_ALIGNED_SIZE(size); @@ -343,11 +345,6 @@ void *zend_shared_alloc(size_t size) zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Possible integer overflow in shared memory allocation (%zu + %zu)", size, PLATFORM_ALIGNMENT); } -#if 1 - if (!ZCG(locked)) { - zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Shared memory lock not obtained"); - } -#endif if (block_size > ZSMMG(shared_free)) { /* No hope to find a big-enough block */ SHARED_ALLOC_FAILED(); return NULL; From d5f0362e59ec0408518fd0bcc6556650fdb7fa14 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 2 Jan 2023 14:30:11 +0100 Subject: [PATCH 065/895] Fix GH-10202: posix_getgr(gid|nam)_basic.phpt fail The issue was that passwd was empty for the issue reporter, but the test expected passwd to be non-empty. An empty passwd can occur if there is no (encrypted) group password set up. --- ext/posix/tests/posix_getgrgid_basic.phpt | 2 +- ext/posix/tests/posix_getgrnam_basic.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/posix/tests/posix_getgrgid_basic.phpt b/ext/posix/tests/posix_getgrgid_basic.phpt index 6b0daa5e940fc..392e81d491d61 100644 --- a/ext/posix/tests/posix_getgrgid_basic.phpt +++ b/ext/posix/tests/posix_getgrgid_basic.phpt @@ -17,7 +17,7 @@ Basic test of POSIX getgid and getgrid functions Array ( [name] => %s - [passwd] => %a + [passwd] => %A [members] => Array %a diff --git a/ext/posix/tests/posix_getgrnam_basic.phpt b/ext/posix/tests/posix_getgrnam_basic.phpt index 5203d1ea0f056..acf8f4473e5d8 100644 --- a/ext/posix/tests/posix_getgrnam_basic.phpt +++ b/ext/posix/tests/posix_getgrnam_basic.phpt @@ -20,7 +20,7 @@ array(4) { ["name"]=> string(%d) "%s" ["passwd"]=> - string(1) "%s" + string(%d) "%S" ["members"]=> %a ["gid"]=> From a9a672048b7ca095d1455bc81b2926f69c873a98 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 14 Dec 2022 20:16:03 +0200 Subject: [PATCH 066/895] Implement mb_output_handler using fast text conversion filters --- ext/mbstring/mbstring.c | 124 +++++++++++++++------------------------- ext/mbstring/mbstring.h | 3 +- 2 files changed, 49 insertions(+), 78 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 7df09480b3b54..3d33a1579de35 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1023,7 +1023,8 @@ ZEND_TSRMLS_CACHE_UPDATE(); mbstring_globals->illegalchars = 0; mbstring_globals->encoding_translation = 0; mbstring_globals->strict_detection = 0; - mbstring_globals->outconv = NULL; + mbstring_globals->outconv_enabled = false; + mbstring_globals->outconv_state = 0; mbstring_globals->http_output_conv_mimetypes = NULL; #ifdef HAVE_MBREGEX mbstring_globals->mb_regex_globals = php_mb_regex_globals_alloc(); @@ -1144,11 +1145,6 @@ PHP_RSHUTDOWN_FUNCTION(mbstring) MBSTRG(current_detect_order_list) = NULL; MBSTRG(current_detect_order_list_size) = 0; } - if (MBSTRG(outconv) != NULL) { - MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); - mbfl_buffer_converter_delete(MBSTRG(outconv)); - MBSTRG(outconv) = NULL; - } /* clear http input identification. */ MBSTRG(http_input_identify) = NULL; @@ -1166,6 +1162,9 @@ PHP_RSHUTDOWN_FUNCTION(mbstring) MBSTRG(http_output_set) = 0; MBSTRG(http_input_set) = 0; + MBSTRG(outconv_enabled) = false; + MBSTRG(outconv_state) = 0; + #ifdef HAVE_MBREGEX PHP_RSHUTDOWN(mb_regex) (INIT_FUNC_ARGS_PASSTHRU); #endif @@ -1548,112 +1547,83 @@ PHP_FUNCTION(mb_parse_str) } /* }}} */ -/* {{{ Returns string in output buffer converted to the http_output encoding */ PHP_FUNCTION(mb_output_handler) { - char *arg_string; - size_t arg_string_len; + zend_string *str; zend_long arg_status; - mbfl_string string, result; - const char *charset; - char *p; - const mbfl_encoding *encoding; - int last_feed; - size_t len; - unsigned char send_text_mimetype = 0; - char *s, *mimetype = NULL; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_STRING(arg_string, arg_string_len) + Z_PARAM_STR(str) Z_PARAM_LONG(arg_status) ZEND_PARSE_PARAMETERS_END(); - encoding = MBSTRG(current_http_output_encoding); - - /* start phase only */ - if ((arg_status & PHP_OUTPUT_HANDLER_START) != 0) { - /* delete the converter just in case. */ - if (MBSTRG(outconv)) { - MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); - mbfl_buffer_converter_delete(MBSTRG(outconv)); - MBSTRG(outconv) = NULL; - } + const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding); + if (encoding == &mbfl_encoding_pass) { + RETURN_STR(zend_string_copy(str)); + } - if (encoding == &mbfl_encoding_pass) { - RETURN_STRINGL(arg_string, arg_string_len); - } + if (arg_status & PHP_OUTPUT_HANDLER_START) { + bool free_mimetype = false; + char *mimetype = NULL; - /* analyze mime type */ - if (SG(sapi_headers).mimetype && - _php_mb_match_regex( - MBSTRG(http_output_conv_mimetypes), - SG(sapi_headers).mimetype, - strlen(SG(sapi_headers).mimetype))) { - if ((s = strchr(SG(sapi_headers).mimetype,';')) == NULL) { + /* Analyze mime type */ + if (SG(sapi_headers).mimetype && _php_mb_match_regex(MBSTRG(http_output_conv_mimetypes), SG(sapi_headers).mimetype, strlen(SG(sapi_headers).mimetype))) { + char *s; + if ((s = strchr(SG(sapi_headers).mimetype, ';')) == NULL) { mimetype = estrdup(SG(sapi_headers).mimetype); } else { - mimetype = estrndup(SG(sapi_headers).mimetype,s-SG(sapi_headers).mimetype); + mimetype = estrndup(SG(sapi_headers).mimetype, s - SG(sapi_headers).mimetype); } - send_text_mimetype = 1; + free_mimetype = true; } else if (SG(sapi_headers).send_default_content_type) { mimetype = SG(default_mimetype) ? SG(default_mimetype) : SAPI_DEFAULT_MIMETYPE; } - /* if content-type is not yet set, set it and activate the converter */ - if (SG(sapi_headers).send_default_content_type || send_text_mimetype) { - charset = encoding->mime_name; + /* If content-type is not yet set, set it and enable conversion */ + if (SG(sapi_headers).send_default_content_type || free_mimetype) { + const char *charset = encoding->mime_name; if (charset) { - len = spprintf( &p, 0, "Content-Type: %s; charset=%s", mimetype, charset ); + char *p; + size_t len = spprintf(&p, 0, "Content-Type: %s; charset=%s", mimetype, charset); if (sapi_add_header(p, len, 0) != FAILURE) { SG(sapi_headers).send_default_content_type = 0; } } - /* activate the converter */ - MBSTRG(outconv) = mbfl_buffer_converter_new(MBSTRG(current_internal_encoding), encoding, 0); - if (send_text_mimetype){ - efree(mimetype); - } + + MBSTRG(outconv_enabled) = true; + } + + if (free_mimetype) { + efree(mimetype); } } - /* just return if the converter is not activated. */ - if (MBSTRG(outconv) == NULL) { - RETURN_STRINGL(arg_string, arg_string_len); + if (!MBSTRG(outconv_enabled)) { + RETURN_STR(zend_string_copy(str)); } - /* flag */ - last_feed = ((arg_status & PHP_OUTPUT_HANDLER_END) != 0); - /* mode */ - mbfl_buffer_converter_illegal_mode(MBSTRG(outconv), MBSTRG(current_filter_illegal_mode)); - mbfl_buffer_converter_illegal_substchar(MBSTRG(outconv), MBSTRG(current_filter_illegal_substchar)); + mb_convert_buf buf; + mb_convert_buf_init(&buf, ZSTR_LEN(str), MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_illegal_mode)); - /* feed the string */ - mbfl_string_init(&string); - /* these are not needed. convd has encoding info. - string.encoding = MBSTRG(current_internal_encoding); - */ - string.val = (unsigned char *)arg_string; - string.len = arg_string_len; + uint32_t wchar_buf[128]; + unsigned char *in = (unsigned char*)ZSTR_VAL(str); + size_t in_len = ZSTR_LEN(str); + bool last_feed = ((arg_status & PHP_OUTPUT_HANDLER_END) != 0); - mbfl_buffer_converter_feed(MBSTRG(outconv), &string); - if (last_feed) { - mbfl_buffer_converter_flush(MBSTRG(outconv)); + while (in_len) { + size_t out_len = MBSTRG(current_internal_encoding)->to_wchar(&in, &in_len, wchar_buf, 128, &MBSTRG(outconv_state)); + ZEND_ASSERT(out_len <= 128); + encoding->from_wchar(wchar_buf, out_len, &buf, !in_len && last_feed); } - /* get the converter output, and return it */ - mbfl_buffer_converter_result(MBSTRG(outconv), &result); - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)result.val, result.len); /* the string is already strdup()'ed */ - efree(result.val); + MBSTRG(illegalchars) += buf.errors; + RETVAL_STR(mb_convert_buf_result(&buf)); - /* delete the converter if it is the last feed. */ if (last_feed) { - MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); - mbfl_buffer_converter_delete(MBSTRG(outconv)); - MBSTRG(outconv) = NULL; + MBSTRG(outconv_enabled) = false; + MBSTRG(outconv_state) = 0; } } -/* }}} */ /* {{{ Convert a multibyte string to an array. If split_length is specified, break the string down into chunks each split_length characters long. */ diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index aa5b8024cb74b..83952a1d7ed2b 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -94,7 +94,8 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) bool encoding_translation; bool strict_detection; size_t illegalchars; - mbfl_buffer_converter *outconv; + bool outconv_enabled; + unsigned int outconv_state; void *http_output_conv_mimetypes; #ifdef HAVE_MBREGEX struct _zend_mb_regex_globals *mb_regex_globals; From 88c99afdac62d0a4385cc572446475380002f6b8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 14 Dec 2022 21:18:10 +0200 Subject: [PATCH 067/895] Implement mb_str_split using fast text conversion filters There is no great difference between the old and new code for text encodings which either 1) use a fixed number of bytes per codepoint or 2) for which we have an 'mblen' table which enables us to find the length of a multi-byte character using a table lookup indexed by the first byte value. The big difference is for other text encodings, where we have to actually decode the string to split it. For such text encodings, such as ISO-2022-JP and UTF-16, I measured a speedup of 50%-120% over the previous implementation. --- ext/mbstring/mbstring.c | 230 +++++++----------- .../tests/mb_str_split_error_conditions.phpt | 26 ++ ext/mbstring/tests/mb_str_split_other.phpt | 116 +++++++++ 3 files changed, 233 insertions(+), 139 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 3d33a1579de35..3b1cb1c7e6ff0 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -18,6 +18,8 @@ */ /* {{{ includes */ +#include + #include "libmbfl/config.h" #include "php.h" #include "php_ini.h" @@ -1625,64 +1627,28 @@ PHP_FUNCTION(mb_output_handler) } } -/* {{{ Convert a multibyte string to an array. If split_length is specified, - break the string down into chunks each split_length characters long. */ - -/* structure to pass split params to the callback */ -struct mbfl_split_params { - zval *return_value; /* php function return value structure pointer */ - mbfl_string *result_string; /* string to store result chunk */ - size_t mb_chunk_length; /* actual chunk length in chars */ - size_t split_length; /* split length in chars */ - mbfl_convert_filter *next_filter; /* widechar to encoding converter */ -}; - -/* callback function to fill split array */ -static int mbfl_split_output(int c, void *data) -{ - struct mbfl_split_params *params = (struct mbfl_split_params *)data; /* cast passed data */ - - (*params->next_filter->filter_function)(c, params->next_filter); /* decoder filter */ - - if (params->split_length == ++params->mb_chunk_length) { /* if current chunk size reached defined chunk size or last char reached */ - mbfl_convert_filter_flush(params->next_filter);/* concatenate separate decoded chars to the solid string */ - mbfl_memory_device *device = (mbfl_memory_device *)params->next_filter->data; /* chars container */ - mbfl_string *chunk = params->result_string; - mbfl_memory_device_result(device, chunk); /* make chunk */ - add_next_index_stringl(params->return_value, (const char *)chunk->val, chunk->len); /* add chunk to the array */ - efree(chunk->val); - params->mb_chunk_length = 0; /* reset mb_chunk size */ - } - - return 0; -} - PHP_FUNCTION(mb_str_split) { zend_string *str, *encoding = NULL; - size_t mb_len, chunks, chunk_len; - const char *p, *last; /* pointer for the string cursor and last string char */ - mbfl_string string, result_string; - const mbfl_encoding *mbfl_encoding; - zend_long split_length = 1; + zend_long split_len = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(str) Z_PARAM_OPTIONAL - Z_PARAM_LONG(split_length) + Z_PARAM_LONG(split_len) Z_PARAM_STR_OR_NULL(encoding) ZEND_PARSE_PARAMETERS_END(); - if (split_length <= 0) { + if (split_len <= 0) { zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); + } else if (split_len > UINT_MAX / 4) { + zend_argument_value_error(2, "is too large"); + RETURN_THROWS(); } - /* fill mbfl_string structure */ - string.val = (unsigned char *) ZSTR_VAL(str); - string.len = ZSTR_LEN(str); - string.encoding = php_mb_get_encoding(encoding, 3); - if (!string.encoding) { + const mbfl_encoding *enc = php_mb_get_encoding(encoding, 3); + if (!enc) { RETURN_THROWS(); } @@ -1690,106 +1656,92 @@ PHP_FUNCTION(mb_str_split) RETURN_EMPTY_ARRAY(); } - p = ZSTR_VAL(str); /* string cursor pointer */ - last = ZSTR_VAL(str) + ZSTR_LEN(str); /* last string char pointer */ - - mbfl_encoding = string.encoding; - - /* first scenario: 1,2,4-bytes fixed width encodings (head part) */ - if (mbfl_encoding->flag & MBFL_ENCTYPE_SBCS) { /* 1 byte */ - mb_len = string.len; - chunk_len = (size_t)split_length; /* chunk length in bytes */ - } else if (mbfl_encoding->flag & MBFL_ENCTYPE_WCS2) { /* 2 bytes */ - mb_len = string.len / 2; - chunk_len = split_length * 2; - } else if (mbfl_encoding->flag & MBFL_ENCTYPE_WCS4) { /* 4 bytes */ - mb_len = string.len / 4; - chunk_len = split_length * 4; - } else if (mbfl_encoding->mblen_table != NULL) { - /* second scenario: variable width encodings with length table */ - char unsigned const *mbtab = mbfl_encoding->mblen_table; - - /* assume that we have 1-bytes characters */ - array_init_size(return_value, (string.len + split_length) / split_length); /* round up */ - - while (p < last) { /* split cycle work until the cursor has reached the last byte */ - char const *chunk_p = p; /* chunk first byte pointer */ - chunk_len = 0; /* chunk length in bytes */ - zend_long char_count; - - for (char_count = 0; char_count < split_length && p < last; ++char_count) { - char unsigned const m = mbtab[*(const unsigned char *)p]; /* single character length table */ - chunk_len += m; - p += m; + unsigned char *p = (unsigned char*)ZSTR_VAL(str), *e = p + ZSTR_LEN(str); + + unsigned int char_len = enc->flag & (MBFL_ENCTYPE_SBCS | MBFL_ENCTYPE_WCS2 | MBFL_ENCTYPE_WCS4); + if (char_len) { + unsigned int chunk_len = char_len * split_len; + unsigned int chunks = ((ZSTR_LEN(str) / chunk_len) + split_len - 1) / split_len; /* round up */ + array_init_size(return_value, chunks); + while (p < e) { + add_next_index_stringl(return_value, (const char*)p, MIN(chunk_len, e - p)); + p += chunk_len; + } + } else if (enc->mblen_table) { + unsigned char const *mbtab = enc->mblen_table; + + /* Assume that we have 1-byte characters */ + array_init_size(return_value, (ZSTR_LEN(str) + split_len - 1) / split_len); + + while (p < e) { + unsigned char *chunk = p; /* start of chunk */ + + for (int char_count = 0; char_count < split_len && p < e; char_count++) { + p += mbtab[*p]; + } + if (p > e) { + p = e; /* ensure chunk is in bounds */ } - if (p >= last) chunk_len -= p - last; /* check if chunk is in bounds */ - add_next_index_stringl(return_value, chunk_p, chunk_len); + add_next_index_stringl(return_value, (const char*)chunk, p - chunk); } - return; } else { - /* third scenario: other multibyte encodings */ - mbfl_convert_filter *filter, *decoder; - - /* assume that we have 1-bytes characters */ - array_init_size(return_value, (string.len + split_length) / split_length); /* round up */ - - /* decoder filter to decode wchar to encoding */ - mbfl_memory_device device; - mbfl_memory_device_init(&device, split_length + 1, 0); - - decoder = mbfl_convert_filter_new( - &mbfl_encoding_wchar, - string.encoding, - mbfl_memory_device_output, - NULL, - &device); - /* assert that nothing is wrong with the decoder */ - ZEND_ASSERT(decoder != NULL); - - /* wchar filter */ - mbfl_string_init(&result_string); /* mbfl_string to store chunk in the callback */ - struct mbfl_split_params params = { /* init callback function params structure */ - .return_value = return_value, - .result_string = &result_string, - .mb_chunk_length = 0, - .split_length = (size_t)split_length, - .next_filter = decoder, - }; - - filter = mbfl_convert_filter_new( - string.encoding, - &mbfl_encoding_wchar, - mbfl_split_output, - NULL, - ¶ms); - /* assert that nothing is wrong with the filter */ - ZEND_ASSERT(filter != NULL); - - while (p < last - 1) { /* cycle each byte except last with callback function */ - (*filter->filter_function)(*p++, filter); - } - params.mb_chunk_length = split_length - 1; /* force to finish current chunk */ - (*filter->filter_function)(*p++, filter); /* process last char */ - - mbfl_convert_filter_delete(decoder); - mbfl_convert_filter_delete(filter); - mbfl_memory_device_clear(&device); - return; - } - - /* first scenario: 1,2,4-bytes fixed width encodings (tail part) */ - chunks = (mb_len + split_length - 1) / split_length; /* (round up idiom) */ - array_init_size(return_value, chunks); - if (chunks != 0) { - zend_long i; - - for (i = 0; i < chunks - 1; p += chunk_len, ++i) { - add_next_index_stringl(return_value, p, chunk_len); - } - add_next_index_stringl(return_value, p, last - p); + /* Assume that we have 1-byte characters */ + array_init_size(return_value, (ZSTR_LEN(str) + split_len - 1) / split_len); + + uint32_t wchar_buf[128]; + size_t in_len = ZSTR_LEN(str); + unsigned int state = 0, char_count = 0; + + mb_convert_buf buf; + + while (in_len) { + size_t out_len = enc->to_wchar(&p, &in_len, wchar_buf, 128, &state); + ZEND_ASSERT(out_len <= 128); + size_t i = 0; + + /* Is there some output remaining from the previous iteration? */ + if (char_count) { + if (out_len >= split_len - char_count) { + /* Finish off an incomplete chunk from previous iteration + * ('buf' was already initialized; we don't need to do it again) */ + enc->from_wchar(wchar_buf, split_len - char_count, &buf, true); + i += split_len - char_count; + char_count = 0; + add_next_index_str(return_value, mb_convert_buf_result(&buf)); + } else { + /* Output from this iteration is not enough to finish the next chunk; + * output what we can, and leave 'buf' to be used again on next iteration */ + enc->from_wchar(wchar_buf, out_len, &buf, !in_len); + char_count += out_len; + continue; + } + } + + while (i < out_len) { + /* Prepare for the next chunk */ + mb_convert_buf_init(&buf, split_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_illegal_mode)); + + if (out_len - i >= split_len) { + enc->from_wchar(wchar_buf + i, split_len, &buf, true); + i += split_len; + add_next_index_str(return_value, mb_convert_buf_result(&buf)); + } else { + /* The remaining codepoints in wchar_buf aren't enough to finish a chunk; + * leave them for the next iteration */ + enc->from_wchar(wchar_buf + i, out_len - i, &buf, !in_len); + char_count = out_len - i; + break; + } + } + } + + if (char_count) { + /* The main loop above has finished processing the input string, but + * has left a partial chunk in 'buf' */ + add_next_index_str(return_value, mb_convert_buf_result(&buf)); + } } } -/* }}} */ static size_t mb_get_strlen(zend_string *string, const mbfl_encoding *encoding) { diff --git a/ext/mbstring/tests/mb_str_split_error_conditions.phpt b/ext/mbstring/tests/mb_str_split_error_conditions.phpt index 7c4269f68a665..bb307e16fa41f 100644 --- a/ext/mbstring/tests/mb_str_split_error_conditions.phpt +++ b/ext/mbstring/tests/mb_str_split_error_conditions.phpt @@ -26,8 +26,34 @@ try { echo $e->getMessage() . \PHP_EOL; } +// For UTF-8, error markers are not inserted +echo "== INVALID UTF-8 ==\n"; +$array = mb_str_split("abc\xFFabc", 2, "UTF-8"); +echo "[", implode(', ', array_map('bin2hex', $array)), "]\n"; + +// For most other encodings, they are +echo "== INVALID HZ ==\n"; +// The last string emitted by mb_str_split will include '?' as an error marker, +// since ά cannot be represented in HZ +$array = mb_str_split(mb_convert_encoding("ελληνικά", "HZ", "UTF-8"), 2, "HZ"); +echo "[", implode(', ', array_map('bin2hex', $array)), "]\n"; + +// HTML entity error markers +mb_substitute_character("entity"); +echo "== INVALID HZ IN 'ENTITY' ERROR OUTPUT MODE ==\n"; +// The output here will actually include an HTML entity #x3AC; +// It will be split into segments of 2 characters each by mb_str_split +$array = mb_str_split(mb_convert_encoding("ελληνικά", "HZ", "UTF-8"), 2, "HZ"); +echo "[", implode(', ', array_map('bin2hex', $array)), "]\n"; + ?> --EXPECT-- mb_str_split(): Argument #2 ($length) must be greater than 0 mb_str_split(): Argument #2 ($length) must be greater than 0 mb_str_split(): Argument #3 ($encoding) must be a valid encoding, "BAD_ENCODING" given +== INVALID UTF-8 == +[6162, 63ff, 6162, 63] +== INVALID HZ == +[7e7b2645264b7e7d, 7e7b264b26477e7d, 7e7b264d26497e7d, 7e7b264a7e7d3f] +== INVALID HZ IN 'ENTITY' ERROR OUTPUT MODE == +[7e7b2645264b7e7d, 7e7b264b26477e7d, 7e7b264d26497e7d, 7e7b264a7e7d26, 2378, 3341, 433b] diff --git a/ext/mbstring/tests/mb_str_split_other.phpt b/ext/mbstring/tests/mb_str_split_other.phpt index a237f80753c96..4b0f901a90387 100644 --- a/ext/mbstring/tests/mb_str_split_other.phpt +++ b/ext/mbstring/tests/mb_str_split_other.phpt @@ -6,6 +6,122 @@ mbstring getMessage() . \PHP_EOL; +} + ?> --EXPECT-- [00010203, 04050607] +== HZ == +[74, 65, 73, 74, 20, 7e7b252b7e7d, 7e7b253f7e7d, 7e7b252b7e7d, 7e7b254a7e7d, 20, 7e7b3a3a7e7d, 7e7b57567e7d] +[7465, 7374, 207e7b252b7e7d, 7e7b253f252b7e7d, 7e7b254a7e7d20, 7e7b3a3a57567e7d] +[746573, 74207e7b252b7e7d, 7e7b253f252b254a7e7d, 207e7b3a3a57567e7d] +[74657374, 207e7b252b253f252b7e7d, 7e7b254a7e7d207e7b3a3a57567e7d] +[7465737420, 7e7b252b253f252b254a7e7d20, 7e7b3a3a57567e7d] +[74657374207e7b252b7e7d, 7e7b253f252b254a7e7d207e7b3a3a57567e7d] +[74657374207e7b252b253f7e7d, 7e7b252b254a7e7d207e7b3a3a57567e7d] +[74657374207e7b252b253f252b7e7d, 7e7b254a7e7d207e7b3a3a57567e7d] +[74657374207e7b252b253f252b254a7e7d, 207e7b3a3a57567e7d] +[74657374207e7b252b253f252b254a7e7d20, 7e7b3a3a57567e7d] +[74657374207e7b252b253f252b254a7e7d207e7b3a3a7e7d, 7e7b57567e7d] +[74657374207e7b252b253f252b254a7e7d207e7b3a3a57567e7d] +== BIG-5 == +[74, 65, 73, 74, 20, c743, c757, c743, c762, 20, ba7e, a672] +[7465, 7374, 20c743, c757c743, c76220, ba7ea672] +[746573, 7420c743, c757c743c762, 20ba7ea672] +[74657374, 20c743c757c743, c76220ba7ea672] +[7465737420, c743c757c743c76220, ba7ea672] +[7465737420c743, c757c743c76220ba7ea672] +[7465737420c743c757, c743c76220ba7ea672] +[7465737420c743c757c743, c76220ba7ea672] +[7465737420c743c757c743c762, 20ba7ea672] +[7465737420c743c757c743c76220, ba7ea672] +[7465737420c743c757c743c76220ba7e, a672] +[7465737420c743c757c743c76220ba7ea672] +== ISO-8859-1 == +[74, 65, 73, 74, 20, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf] +[7465, 7374, 20c0, c1c2, c3c4, c5c6, c7c8, c9ca, cbcc, cdce, cf] +[746573, 7420c0, c1c2c3, c4c5c6, c7c8c9, cacbcc, cdcecf] +[74657374, 20c0c1c2, c3c4c5c6, c7c8c9ca, cbcccdce, cf] +[7465737420, c0c1c2c3c4, c5c6c7c8c9, cacbcccdce, cf] +[7465737420c0, c1c2c3c4c5c6, c7c8c9cacbcc, cdcecf] +[7465737420c0c1, c2c3c4c5c6c7c8, c9cacbcccdcecf] +[7465737420c0c1c2, c3c4c5c6c7c8c9ca, cbcccdcecf] +[7465737420c0c1c2c3, c4c5c6c7c8c9cacbcc, cdcecf] +[7465737420c0c1c2c3c4, c5c6c7c8c9cacbcccdce, cf] +[7465737420c0c1c2c3c4c5, c6c7c8c9cacbcccdcecf] +[7465737420c0c1c2c3c4c5c6, c7c8c9cacbcccdcecf] +[7465737420c0c1c2c3c4c5c6c7, c8c9cacbcccdcecf] +[7465737420c0c1c2c3c4c5c6c7c8, c9cacbcccdcecf] +[7465737420c0c1c2c3c4c5c6c7c8c9, cacbcccdcecf] +[7465737420c0c1c2c3c4c5c6c7c8c9ca, cbcccdcecf] +[7465737420c0c1c2c3c4c5c6c7c8c9cacb, cccdcecf] +[7465737420c0c1c2c3c4c5c6c7c8c9cacbcc, cdcecf] +[7465737420c0c1c2c3c4c5c6c7c8c9cacbcccd, cecf] +[7465737420c0c1c2c3c4c5c6c7c8c9cacbcccdce, cf] +[7465737420c0c1c2c3c4c5c6c7c8c9cacbcccdcecf] +== Regression tests == +[1b28494a4a1b2842, 1b28494a4a1b2842] +[5a] +mb_str_split(): Argument #2 ($length) is too large From e2654a532a99d6c6a721a5775a886907c377e764 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 15 Dec 2022 22:12:04 +0200 Subject: [PATCH 068/895] Mark default interned strings as valid UTF-8 where appropriate Aside from being used by the pcre extension, various functions in mbstring are faster if the input strings are known to be valid UTF-8. We might as well mark the default interned strings (which are initialized when PHP starts up) as valid UTF-8 where appropriate. --- Zend/zend_string.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Zend/zend_string.c b/Zend/zend_string.c index b4214bc38cd6f..68e6084fdf60f 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -102,11 +102,15 @@ ZEND_API void zend_interned_strings_init(void) str = zend_string_alloc(sizeof("")-1, 1); ZSTR_VAL(str)[0] = '\000'; zend_empty_string = zend_new_interned_string_permanent(str); + GC_ADD_FLAGS(zend_empty_string, IS_STR_VALID_UTF8); s[1] = 0; for (i = 0; i < 256; i++) { s[0] = i; zend_one_char_string[i] = zend_new_interned_string_permanent(zend_string_init(s, 1, 1)); + if (i < 0x80) { + GC_ADD_FLAGS(zend_one_char_string[i], IS_STR_VALID_UTF8); + } } /* known strings */ @@ -114,6 +118,7 @@ ZEND_API void zend_interned_strings_init(void) for (i = 0; i < (sizeof(known_strings) / sizeof(known_strings[0])) - 1; i++) { str = zend_string_init(known_strings[i], strlen(known_strings[i]), 1); zend_known_strings[i] = zend_new_interned_string_permanent(str); + GC_ADD_FLAGS(zend_known_strings[i], IS_STR_VALID_UTF8); } } From 953864661abe86942b22bc8433ff27e51e129f7b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 15 Dec 2022 22:19:06 +0200 Subject: [PATCH 069/895] Implement php_mb_zend_encoding_converter using fast text conversion filters --- ext/mbstring/libmbfl/mbfl/mbfilter.c | 124 --------------------------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 22 ----- ext/mbstring/mbstring.c | 39 ++------- 3 files changed, 7 insertions(+), 178 deletions(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 75382723caa01..859fc73b8e352 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -95,130 +95,6 @@ #include "rare_cp_bitvec.h" -/* - * buffering converter - */ -mbfl_buffer_converter * -mbfl_buffer_converter_new( - const mbfl_encoding *from, - const mbfl_encoding *to, - size_t buf_initsz) -{ - mbfl_buffer_converter *convd = emalloc(sizeof(mbfl_buffer_converter)); - convd->to = to; - - /* create convert filter */ - convd->filter1 = NULL; - convd->filter2 = NULL; - if (mbfl_convert_filter_get_vtbl(from, to) != NULL) { - convd->filter1 = mbfl_convert_filter_new(from, to, mbfl_memory_device_output, NULL, &convd->device); - } else { - convd->filter2 = mbfl_convert_filter_new(&mbfl_encoding_wchar, to, mbfl_memory_device_output, NULL, &convd->device); - if (convd->filter2 != NULL) { - convd->filter1 = mbfl_convert_filter_new(from, - &mbfl_encoding_wchar, - (output_function_t)convd->filter2->filter_function, - (flush_function_t)convd->filter2->filter_flush, - convd->filter2); - if (convd->filter1 == NULL) { - mbfl_convert_filter_delete(convd->filter2); - } - } - } - if (convd->filter1 == NULL) { - efree(convd); - return NULL; - } - - mbfl_memory_device_init(&convd->device, buf_initsz, buf_initsz/4); - - return convd; -} - -void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd) -{ - mbfl_convert_filter_delete(convd->filter1); - if (convd->filter2) { - mbfl_convert_filter_delete(convd->filter2); - } - mbfl_memory_device_clear(&convd->device); - efree((void*)convd); -} - -void mbfl_buffer_converter_illegal_mode(mbfl_buffer_converter *convd, int mode) -{ - if (convd->filter2) { - convd->filter2->illegal_mode = mode; - } else { - convd->filter1->illegal_mode = mode; - } -} - -void mbfl_buffer_converter_illegal_substchar(mbfl_buffer_converter *convd, uint32_t substchar) -{ - if (convd->filter2) { - convd->filter2->illegal_substchar = substchar; - } else { - convd->filter1->illegal_substchar = substchar; - } -} - -size_t mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string) -{ - size_t n; - unsigned char *p; - mbfl_convert_filter *filter; - - ZEND_ASSERT(convd); - ZEND_ASSERT(string); - - mbfl_memory_device_realloc(&convd->device, convd->device.pos + string->len, string->len/4); - /* feed data */ - n = string->len; - p = string->val; - - filter = convd->filter1; - if (filter != NULL) { - while (n > 0) { - if ((*filter->filter_function)(*p++, filter) < 0) { - return p - string->val; - } - n--; - } - } - return p - string->val; -} - -void mbfl_buffer_converter_flush(mbfl_buffer_converter *convd) -{ - mbfl_convert_filter_flush(convd->filter1); -} - -mbfl_string* mbfl_buffer_converter_result(mbfl_buffer_converter *convd, mbfl_string *result) -{ - result->encoding = convd->to; - return mbfl_memory_device_result(&convd->device, result); -} - -mbfl_string* mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string, mbfl_string *result) -{ - mbfl_buffer_converter_feed(convd, string); - mbfl_convert_filter_flush(convd->filter1); - result->encoding = convd->to; - return mbfl_memory_device_result(&convd->device, result); -} - -size_t mbfl_buffer_illegalchars(mbfl_buffer_converter *convd) -{ - size_t num_illegalchars = convd->filter1->num_illegalchar; - - if (convd->filter2) { - num_illegalchars += convd->filter2->num_illegalchar; - } - - return num_illegalchars; -} - /* * encoding detector */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 472d9577e7089..9eaeb4dc13e1f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -125,28 +125,6 @@ #define MIN(a,b) ((a)<(b)?(a):(b)) #endif -/* - * buffering converter - */ -typedef struct _mbfl_buffer_converter mbfl_buffer_converter; - -struct _mbfl_buffer_converter { - mbfl_convert_filter *filter1; - mbfl_convert_filter *filter2; - mbfl_memory_device device; - const mbfl_encoding *to; -}; - -MBFLAPI extern mbfl_buffer_converter * mbfl_buffer_converter_new(const mbfl_encoding *from, const mbfl_encoding *to, size_t buf_initsz); -MBFLAPI extern void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd); -MBFLAPI extern void mbfl_buffer_converter_illegal_mode(mbfl_buffer_converter *convd, int mode); -MBFLAPI extern void mbfl_buffer_converter_illegal_substchar(mbfl_buffer_converter *convd, uint32_t substchar); -MBFLAPI extern size_t mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string); -MBFLAPI extern void mbfl_buffer_converter_flush(mbfl_buffer_converter *convd); -MBFLAPI extern mbfl_string * mbfl_buffer_converter_result(mbfl_buffer_converter *convd, mbfl_string *result); -MBFLAPI extern mbfl_string * mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string, mbfl_string *result); -MBFLAPI extern size_t mbfl_buffer_illegalchars(mbfl_buffer_converter *convd); - /* * encoding detector */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 3b1cb1c7e6ff0..21b9faf2401e6 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -452,40 +452,15 @@ static const zend_encoding *php_mb_zend_encoding_detector(const unsigned char *a static size_t php_mb_zend_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from) { - mbfl_string string, result; - mbfl_buffer_converter *convd; - - /* new encoding */ - /* initialize string */ - string.encoding = (const mbfl_encoding*)encoding_from; - string.val = (unsigned char*)from; - string.len = from_length; - - /* initialize converter */ - convd = mbfl_buffer_converter_new((const mbfl_encoding *)encoding_from, (const mbfl_encoding *)encoding_to, string.len); - if (convd == NULL) { - return (size_t) -1; - } - - mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); - mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); - - /* do it */ - size_t loc = mbfl_buffer_converter_feed(convd, &string); - - mbfl_buffer_converter_flush(convd); - mbfl_string_init(&result); - if (!mbfl_buffer_converter_result(convd, &result)) { - mbfl_buffer_converter_delete(convd); - return (size_t)-1; - } - - *to = result.val; - *to_length = result.len; + unsigned int num_errors = 0; + zend_string *result = mb_fast_convert((unsigned char*)from, from_length, (const mbfl_encoding*)encoding_from, (const mbfl_encoding*)encoding_to, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_illegal_mode), &num_errors); - mbfl_buffer_converter_delete(convd); + *to_length = ZSTR_LEN(result); + *to = emalloc(ZSTR_LEN(result) + 1); /* Include terminating null byte */ + memcpy(*to, ZSTR_VAL(result), ZSTR_LEN(result) + 1); + zend_string_free(result); - return loc; + return from_length; } static zend_result php_mb_zend_encoding_list_parser(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent) From 0e7160b836890d5e3785ae49250bfd5ff1883fec Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 20 Jul 2022 08:53:04 +0200 Subject: [PATCH 070/895] Implement mb_detect_encoding using fast text conversion filters Regarding the optional 3rd `strict` argument to mb_detect_encoding, the documentation states: Controls the behaviour when string is not valid in any of the listed encodings. If strict is set to false, the closest matching encoding will be returned; if strict is set to true, false will be returned. (Ref: https://www.php.net/manual/en/function.mb-detect-encoding.php) Because of bugs in the implementation, mb_detect_encoding did not always behave according to this description when `strict` was false. For example: = (size_t) -16; diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 21b9faf2401e6..83856da239774 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -62,6 +62,9 @@ #include "zend_multibyte.h" #include "mbstring_arginfo.h" + +#include "rare_cp_bitvec.h" + /* }}} */ /* {{{ prototypes */ @@ -84,6 +87,8 @@ static inline bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc); static bool mb_check_str_encoding(zend_string *str, const mbfl_encoding *encoding); +static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding **elist, unsigned int elist_size, bool strict); + /* See mbfilter_cp5022x.c */ uint32_t mb_convert_kana_codepoint(uint32_t c, uint32_t next, bool *consumed, uint32_t *second, int mode); /* }}} */ @@ -437,17 +442,12 @@ static bool php_mb_zend_encoding_lexer_compatibility_checker(const zend_encoding static const zend_encoding *php_mb_zend_encoding_detector(const unsigned char *arg_string, size_t arg_length, const zend_encoding **list, size_t list_size) { - mbfl_string string; - if (!list) { - list = (const zend_encoding **)MBSTRG(current_detect_order_list); + list = (const zend_encoding**)MBSTRG(current_detect_order_list); list_size = MBSTRG(current_detect_order_list_size); } - mbfl_string_init(&string); - string.val = (unsigned char *)arg_string; - string.len = arg_length; - return (const zend_encoding *) mbfl_identify_encoding(&string, (const mbfl_encoding **)list, list_size, 0); + return (const zend_encoding*)mb_guess_encoding((unsigned char*)arg_string, arg_length, (const mbfl_encoding **)list, list_size, false); } static size_t php_mb_zend_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from) @@ -2602,12 +2602,7 @@ MBSTRING_API zend_string* php_mb_convert_encoding(const char *input, size_t leng from_encoding = *from_encodings; } else { /* auto detect */ - mbfl_string string; - mbfl_string_init(&string); - string.val = (unsigned char *)input; - string.len = length; - from_encoding = mbfl_identify_encoding( - &string, from_encodings, num_from_encodings, MBSTRG(strict_detection)); + from_encoding = mb_guess_encoding((unsigned char*)input, length, from_encodings, num_from_encodings, MBSTRG(strict_detection)); if (!from_encoding) { php_error_docref(NULL, E_WARNING, "Unable to detect character encoding"); return NULL; @@ -2712,7 +2707,7 @@ PHP_FUNCTION(mb_convert_encoding) HashTable *input_ht, *from_encodings_ht = NULL; const mbfl_encoding **from_encodings; size_t num_from_encodings; - bool free_from_encodings; + bool free_from_encodings = false; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY_HT_OR_STR(input_ht, input_str) @@ -2730,18 +2725,17 @@ PHP_FUNCTION(mb_convert_encoding) if (php_mb_parse_encoding_array(from_encodings_ht, &from_encodings, &num_from_encodings, 3) == FAILURE) { RETURN_THROWS(); } - free_from_encodings = 1; + free_from_encodings = true; } else if (from_encodings_str) { if (php_mb_parse_encoding_list(ZSTR_VAL(from_encodings_str), ZSTR_LEN(from_encodings_str), &from_encodings, &num_from_encodings, /* persistent */ 0, /* arg_num */ 3, /* allow_pass_encoding */ 0) == FAILURE) { RETURN_THROWS(); } - free_from_encodings = 1; + free_from_encodings = true; } else { from_encodings = &MBSTRG(current_internal_encoding); num_from_encodings = 1; - free_from_encodings = 0; } if (num_from_encodings > 1) { @@ -2847,16 +2841,163 @@ static const mbfl_encoding **duplicate_elist(const mbfl_encoding **elist, size_t return new_elist; } +static unsigned int mb_estimate_encoding_demerits(uint32_t w) +{ + /* Receive wchars decoded from input string using candidate encoding. + * Give the candidate many 'demerits' for each 'rare' codepoint found, + * a smaller number for each ASCII punctuation character, and 1 for + * all other codepoints. + * + * The 'common' codepoints should cover the vast majority of + * codepoints we are likely to see in practice, while only covering + * a small minority of the entire Unicode encoding space. Why? + * Well, if the test string happens to be valid in an incorrect + * candidate encoding, the bogus codepoints which it decodes to will + * be more or less random. By treating the majority of codepoints as + * 'rare', we ensure that in almost all such cases, the bogus + * codepoints will include plenty of 'rares', thus giving the + * incorrect candidate encoding lots of demerits. See + * common_codepoints.txt for the actual list used. + * + * So, why give extra demerits for ASCII punctuation characters? It's + * because there are some text encodings, like UTF-7, HZ, and ISO-2022, + * which deliberately only use bytes in the ASCII range. When + * misinterpreted as ASCII/UTF-8, strings in these encodings will + * have an unusually high number of ASCII punctuation characters. + * So giving extra demerits for such characters will improve + * detection accuracy for UTF-7 and similar encodings. + * + * Finally, why 1 demerit for all other characters? That penalizes + * long strings, meaning we will tend to choose a candidate encoding + * in which the test string decodes to a smaller number of + * codepoints. That prevents single-byte encodings in which almost + * every possible input byte decodes to a 'common' codepoint from + * being favored too much. */ + if (w > 0xFFFF) { + return 40; + } else if (w >= 0x21 && w <= 0x2F) { + return 6; + } else if ((rare_codepoint_bitvec[w >> 5] >> (w & 0x1F)) & 1) { + return 30; + } else { + return 1; + } + return 0; +} + +/* When doing 'strict' detection, any string which is invalid in the candidate encoding + * is rejected. With non-strict detection, we just continue, but apply demerits for + * each invalid byte sequence */ +static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding **elist, unsigned int elist_size, bool strict) +{ + if (elist_size == 0) { + return NULL; + } + if (elist_size == 1) { + if (strict) { + return php_mb_check_encoding((const char*)in, in_len, *elist) ? *elist : NULL; + } else { + return *elist; + } + } + if (in_len == 0) { + return *elist; + } + + uint32_t wchar_buf[128]; + struct conversion_data { + const mbfl_encoding *enc; + unsigned char *in; + size_t in_len; + uint64_t demerits; /* Wide bit size to prevent overflow */ + unsigned int state; + }; + /* Allocate on stack; when we return, this array is automatically freed */ + struct conversion_data *data = alloca(elist_size * sizeof(struct conversion_data)); + + for (unsigned int i = 0; i < elist_size; i++) { + data[i].enc = elist[i]; + data[i].in = in; + data[i].in_len = in_len; + data[i].state = 0; + data[i].demerits = 0; + } + + unsigned int finished = 0; /* For how many candidate encodings have we processed all the input? */ + while (elist_size > 1 && finished < elist_size) { + unsigned int i = 0; +try_next_encoding: + while (i < elist_size) { + /* Do we still have more input to process for this candidate encoding? */ + if (data[i].in_len) { + const mbfl_encoding *enc = data[i].enc; + size_t out_len = enc->to_wchar(&data[i].in, &data[i].in_len, wchar_buf, 128, &data[i].state); + ZEND_ASSERT(out_len <= 128); + /* Check this batch of decoded codepoints; are there any error markers? + * Also sum up the number of demerits */ + while (out_len) { + uint32_t w = wchar_buf[--out_len]; + if (w == MBFL_BAD_INPUT) { + if (strict) { + /* This candidate encoding is not valid, eliminate it from consideration */ + elist_size--; + memmove(&data[i], &data[i+1], (elist_size - i) * sizeof(struct conversion_data)); + goto try_next_encoding; + } else { + data[i].demerits += 1000; + } + } else { + data[i].demerits += mb_estimate_encoding_demerits(w); + } + } + if (data[i].in_len == 0) { + finished++; + } + } + i++; + } + } + + if (strict) { + if (elist_size == 0) { + /* All candidates were eliminated */ + return NULL; + } + /* The above loop might have broken because there was only 1 candidate encoding left + * If in strict mode, we still need to process any remaining input for that candidate */ + if (elist_size == 1 && data[0].in_len) { + const mbfl_encoding *enc = data[0].enc; + unsigned char *in = data[0].in; + size_t in_len = data[0].in_len; + unsigned int state = data[0].state; + while (in_len) { + size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); + while (out_len) { + if (wchar_buf[--out_len] == MBFL_BAD_INPUT) { + return NULL; + } + } + } + } + } + + /* See which remaining candidate encoding has the least demerits */ + unsigned int best = 0; + for (unsigned int i = 1; i < elist_size; i++) { + if (data[i].demerits < data[best].demerits) { + best = i; + } + } + return data[best].enc; +} + /* {{{ Encodings of the given string is returned (as a string) */ PHP_FUNCTION(mb_detect_encoding) { zend_string *str, *encoding_str = NULL; HashTable *encoding_ht = NULL; bool strict = false; - - mbfl_string string; - const mbfl_encoding *ret; - const mbfl_encoding **elist; + const mbfl_encoding *ret, **elist; size_t size; ZEND_PARSE_PARAMETERS_START(1, 3) @@ -2896,14 +3037,10 @@ PHP_FUNCTION(mb_detect_encoding) strict = MBSTRG(strict_detection); } - if (strict && size == 1) { - /* If there is only a single candidate encoding, mb_check_encoding is faster */ - ret = (mb_check_str_encoding(str, *elist)) ? *elist : NULL; + if (size == 1 && *elist == &mbfl_encoding_utf8 && (GC_FLAGS(str) & IS_STR_VALID_UTF8)) { + ret = &mbfl_encoding_utf8; } else { - mbfl_string_init(&string); - string.val = (unsigned char*)ZSTR_VAL(str); - string.len = ZSTR_LEN(str); - ret = mbfl_identify_encoding(&string, elist, size, strict); + ret = mb_guess_encoding((unsigned char*)ZSTR_VAL(str), ZSTR_LEN(str), elist, size, strict); } efree(ZEND_VOIDP(elist)); @@ -4086,9 +4223,8 @@ PHP_FUNCTION(mb_send_mail) orig_str.val = (unsigned char *)subject; orig_str.len = subject_len; orig_str.encoding = MBSTRG(current_internal_encoding); - if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid - || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { - orig_str.encoding = mbfl_identify_encoding(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { + orig_str.encoding = mb_guess_encoding((unsigned char*)subject, subject_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, CRLF, sizeof("Subject: [PHP-jp nnnnnnnn]" CRLF) - 1); if (pstr != NULL) { @@ -4100,9 +4236,8 @@ PHP_FUNCTION(mb_send_mail) orig_str.len = message_len; orig_str.encoding = MBSTRG(current_internal_encoding); - if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid - || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { - orig_str.encoding = mbfl_identify_encoding(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { + orig_str.encoding = mb_guess_encoding((unsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } pstr = NULL; diff --git a/ext/mbstring/tests/bug49536.phpt b/ext/mbstring/tests/bug49536.phpt index 1980dc4988b75..a16a0657a5c90 100644 --- a/ext/mbstring/tests/bug49536.phpt +++ b/ext/mbstring/tests/bug49536.phpt @@ -12,9 +12,16 @@ var_dump(mb_detect_encoding("A\x81", "SJIS", true)); var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false)); // strict mode var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true)); + +// Strict mode with multiple candidate encodings +// This input string is invalid in ALL the candidate encodings: +echo "== INVALID STRING - UTF-8 and SJIS ==\n"; +var_dump(mb_detect_encoding("\xFF\xFF", ['SJIS', 'UTF-8'], true)); ?> --EXPECT-- string(4) "SJIS" bool(false) +string(5) "UTF-8" bool(false) +== INVALID STRING - UTF-8 and SJIS == bool(false) diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index 2967eb4adcb19..7bcf8016f0049 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -19,12 +19,21 @@ $hungarian = "Árvíztűrő tükörfúrógép"; echo "== BASIC TEST ==\n"; -print("SJIS: " . mb_detect_encoding($sjis, 'SJIS') . "\n"); -print("JIS: " . mb_detect_encoding($jis, 'JIS') . "\n"); -print("EUC-JP: " . mb_detect_encoding($euc_jp, 'UTF-8,EUC-JP,JIS') . "\n"); -print("EUC-JP: " . mb_detect_encoding($euc_jp, 'JIS,EUC-JP') . "\n"); -print("UTF-8: " . mb_detect_encoding($polish1, 'UTF-8,UTF-16,ISO-8859-1') . "\n"); -print("UTF-8: " . mb_detect_encoding($polish2, 'UTF-8,UTF-16,ISO-8859-1') . "\n"); +print("Empty String: " . mb_detect_encoding('') . "\n"); +print("Bad ASCII (non-strict): " . mb_detect_encoding("\xDD\x92", ['ASCII', 'UTF-8'], false) . "\n"); +print("Bad ASCII (strict): " . mb_detect_encoding("\xDD\x92", ['ASCII', 'UTF-8'], true) . "\n"); +print("Bad ASCII/UTF-8, with more errors for ASCII (non-strict): " . mb_detect_encoding("\xD6\x8A\x8A", ['ASCII', 'UTF-8'], false) . "\n"); +print("Bad ASCII/UTF-8, with more errors for ASCII (strict): " . var_export(mb_detect_encoding("\xD6\x8A\x8A", ['ASCII', 'UTF-8'], true), true) . "\n"); + +print("SJIS: " . mb_detect_encoding($sjis, 'SJIS', true) . "\n"); +print("JIS: " . mb_detect_encoding($jis, 'JIS', true) . "\n"); +print("EUC-JP (strict): " . mb_detect_encoding($euc_jp, 'UTF-8,EUC-JP,JIS', true) . "\n"); +print("EUC-JP (non-strict): " . mb_detect_encoding($euc_jp, 'UTF-8,EUC-JP,JIS', false) . "\n"); +print("EUC-JP (fewer choices): " . mb_detect_encoding($euc_jp, 'JIS,EUC-JP') . "\n"); +print("UTF-8, polish string 1 (strict): " . mb_detect_encoding($polish1, 'UTF-8,UTF-16,ISO-8859-1', true) . "\n"); +print("UTF-8, polish string 1 (non-strict): " . mb_detect_encoding($polish1, 'UTF-8,UTF-16,ISO-8859-1', false) . "\n"); +print("UTF-8, polish string 2 (strict): " . mb_detect_encoding($polish2, 'UTF-8,UTF-16,ISO-8859-1', true) . "\n"); +print("UTF-8, polish string 2 (non-strict): " . mb_detect_encoding($polish2, 'UTF-8,UTF-16,ISO-8859-1', false) . "\n"); echo "== ARRAY ENCODING LIST ==\n"; @@ -331,12 +340,20 @@ echo "Done!\n"; ?> --EXPECT-- == BASIC TEST == +Empty String: ASCII +Bad ASCII (non-strict): UTF-8 +Bad ASCII (strict): UTF-8 +Bad ASCII/UTF-8, with more errors for ASCII (non-strict): UTF-8 +Bad ASCII/UTF-8, with more errors for ASCII (strict): false SJIS: SJIS JIS: JIS -EUC-JP: EUC-JP -EUC-JP: EUC-JP -UTF-8: UTF-8 -UTF-8: UTF-8 +EUC-JP (strict): EUC-JP +EUC-JP (non-strict): EUC-JP +EUC-JP (fewer choices): EUC-JP +UTF-8, polish string 1 (strict): UTF-8 +UTF-8, polish string 1 (non-strict): UTF-8 +UTF-8, polish string 2 (strict): UTF-8 +UTF-8, polish string 2 (non-strict): UTF-8 == ARRAY ENCODING LIST == JIS: JIS EUC-JP: EUC-JP From 3b5072f6f619b417614a154b7c2f98e1ea337060 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 16 Dec 2022 22:28:30 +0200 Subject: [PATCH 071/895] Use smart_str in mb_http_input rather than mbfl_memory_device For many years, the code has contained a TODO comment indicating that the original author had wanted to do this. Using smart_str makes the code shorter and cleaner, and it is another step towards removing a bunch of legacy mbstring code which will soon be unneeded. --- ext/mbstring/mbstring.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 83856da239774..23408583371ac 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -60,6 +60,7 @@ # include "php_mbregex.h" #endif +#include "zend_smart_str.h" #include "zend_multibyte.h" #include "mbstring_arginfo.h" @@ -1281,19 +1282,15 @@ PHP_FUNCTION(mb_http_input) if (n == 0) { RETURN_FALSE; } - // TODO Use smart_str instead. - mbfl_string result; - mbfl_memory_device device; - mbfl_memory_device_init(&device, n * 12, 0); + + smart_str result = {0}; for (size_t i = 0; i < n; i++, entry++) { - mbfl_memory_device_strcat(&device, (*entry)->name); - mbfl_memory_device_output(',', &device); + if (i > 0) { + smart_str_appendc(&result, ','); + } + smart_str_appends(&result, (*entry)->name); } - mbfl_memory_device_unput(&device); /* Remove trailing comma */ - mbfl_memory_device_result(&device, &result); - RETVAL_STRINGL((const char*)result.val, result.len); - mbfl_string_clear(&result); - return; + RETURN_STR(smart_str_extract(&result)); default: zend_argument_value_error(1, "must be one of \"G\", \"P\", \"C\", \"S\", \"I\", or \"L\""); From 4ce48e9a39073444d526960dd954db28e9a1164a Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 3 Jan 2023 11:36:20 -0300 Subject: [PATCH 072/895] [ci skip] Prepare for PHP 8.0.27 GA --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c6b0036b600b9..3be34b3bfd752 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2022, PHP 8.0.27 +05 Jan 2023, PHP 8.0.27 - PDO/SQLite: . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) From c2737b40d72c323ec51a6b026b720e1b196be85b Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 3 Jan 2023 11:39:21 -0300 Subject: [PATCH 073/895] [ci skip] Next release will be 8.0.28 --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 3be34b3bfd752..907a06b90ec97 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? ????, PHP 8.0.28 + + 05 Jan 2023, PHP 8.0.27 - PDO/SQLite: From 255e08ac56539f07cdbfa2f32922f20f7d21de5c Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 3 Jan 2023 13:00:44 -0300 Subject: [PATCH 074/895] Revert "Make build work with newer OpenSSL" This reverts commit 5f90134bb69a345c7edb5013e6461e84caa32dbc. --- ext/openssl/openssl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 9827c75871668..45a7e794400d0 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1325,9 +1325,7 @@ PHP_MINIT_FUNCTION(openssl) REGISTER_LONG_CONSTANT("OPENSSL_CMS_NOSIGS", CMS_NOSIGS, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); -#ifdef RSA_SSLV23_PADDING REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); -#endif REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); From bbb90d4d05ff517fc44214a6711d3ba423be4b58 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 3 Jan 2023 14:27:16 -0500 Subject: [PATCH 075/895] [ci skip] Add missing CVE in NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index ba9b1c1142d3c..22b1a57967447 100644 --- a/NEWS +++ b/NEWS @@ -84,6 +84,10 @@ PHP NEWS . Fixed bug GH-9971 (Incorrect NUMERIC value returned from PDO_Firebird). (cmb) +- PDO/SQLite: + . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) + (cmb) + - Session: . Fixed GH-9932 (session name silently fails with . and [). (David Carlier) From 275bf3beaeb2699e6a0efc7ff488399d28ef9068 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Wed, 4 Jan 2023 00:03:23 -0600 Subject: [PATCH 076/895] Update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index feb6e882ff55a..6833d8a4ee4a7 100644 --- a/NEWS +++ b/NEWS @@ -89,6 +89,10 @@ PHP NEWS . Fixed bug GH-9971 (Incorrect NUMERIC value returned from PDO_Firebird). (cmb) +- PDO/SQLite: + . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) + (cmb) + - Session: . Fixed GH-9932 (session name silently fails with . and [). (David Carlier) From 5e9b335e24b5c69d31b6ca9ed0e7c7ef49025932 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 14:31:37 +0100 Subject: [PATCH 077/895] Zend/zend_ini_scanner: zend_ini_scanner_get_filename() returns const string --- Zend/zend_ini_parser.y | 3 +-- Zend/zend_ini_scanner.h | 2 +- Zend/zend_ini_scanner.l | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 2d4e949d5c475..3934f88095c86 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -187,9 +187,8 @@ static ZEND_COLD void ini_error(const char *msg) { char *error_buf; int error_buf_len; - char *currently_parsed_filename; - currently_parsed_filename = zend_ini_scanner_get_filename(); + const char *const currently_parsed_filename = zend_ini_scanner_get_filename(); if (currently_parsed_filename) { error_buf_len = 128 + (int)strlen(msg) + (int)strlen(currently_parsed_filename); /* should be more than enough */ error_buf = (char *) emalloc(error_buf_len); diff --git a/Zend/zend_ini_scanner.h b/Zend/zend_ini_scanner.h index f3d7f1a82b271..ba28cbdc3dc31 100644 --- a/Zend/zend_ini_scanner.h +++ b/Zend/zend_ini_scanner.h @@ -27,7 +27,7 @@ BEGIN_EXTERN_C() ZEND_COLD int zend_ini_scanner_get_lineno(void); -ZEND_COLD char *zend_ini_scanner_get_filename(void); +ZEND_COLD const char *zend_ini_scanner_get_filename(void); zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode); zend_result zend_ini_prepare_string_for_scanning(char *str, int scanner_mode); int ini_lex(zval *ini_lval); diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 474580ba3af96..52c4ed65f56b1 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -261,7 +261,7 @@ ZEND_COLD int zend_ini_scanner_get_lineno(void) /* }}} */ /* {{{ zend_ini_scanner_get_filename() */ -ZEND_COLD char *zend_ini_scanner_get_filename(void) +ZEND_COLD const char *zend_ini_scanner_get_filename(void) { return ini_filename ? ZSTR_VAL(ini_filename) : "Unknown"; } From 2d662f325d849ee4de3804d079a6d742ab1d3c63 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 14:29:49 +0100 Subject: [PATCH 078/895] Zend/zend_ini_scanner: parse const strings --- Zend/zend_globals.h | 10 +++++----- Zend/zend_ini.h | 2 +- Zend/zend_ini_parser.y | 2 +- Zend/zend_ini_scanner.h | 2 +- Zend/zend_ini_scanner.l | 16 ++++++++-------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 66ba9a6a32706..6fca08e82d3ca 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -297,11 +297,11 @@ struct _zend_ini_scanner_globals { zend_file_handle *yy_out; unsigned int yy_leng; - unsigned char *yy_start; - unsigned char *yy_text; - unsigned char *yy_cursor; - unsigned char *yy_marker; - unsigned char *yy_limit; + const unsigned char *yy_start; + const unsigned char *yy_text; + const unsigned char *yy_cursor; + const unsigned char *yy_marker; + const unsigned char *yy_limit; int yy_state; zend_stack state_stack; diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 56939fa9ea8cb..048d8a3cc3897 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -233,7 +233,7 @@ END_EXTERN_C() typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg); BEGIN_EXTERN_C() ZEND_API int zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); -ZEND_API int zend_parse_ini_string(char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API int zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); END_EXTERN_C() /* INI entries */ diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 3934f88095c86..322424b979eb8 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -238,7 +238,7 @@ ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_e /* }}} */ /* {{{ zend_parse_ini_string() */ -ZEND_API zend_result zend_parse_ini_string(char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) +ZEND_API zend_result zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) { int retval; zend_ini_parser_param ini_parser_param; diff --git a/Zend/zend_ini_scanner.h b/Zend/zend_ini_scanner.h index ba28cbdc3dc31..f0cfac2e7affe 100644 --- a/Zend/zend_ini_scanner.h +++ b/Zend/zend_ini_scanner.h @@ -29,7 +29,7 @@ BEGIN_EXTERN_C() ZEND_COLD int zend_ini_scanner_get_lineno(void); ZEND_COLD const char *zend_ini_scanner_get_filename(void); zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode); -zend_result zend_ini_prepare_string_for_scanning(char *str, int scanner_mode); +zend_result zend_ini_prepare_string_for_scanning(const char *str, int scanner_mode); int ini_lex(zval *ini_lval); void shutdown_ini_scanner(void); END_EXTERN_C() diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 52c4ed65f56b1..84a778b958cde 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -55,9 +55,9 @@ /* emulate flex constructs */ #define BEGIN(state) YYSETCONDITION(STATE(state)) #define YYSTATE YYGETCONDITION() -#define yytext ((char*)SCNG(yy_text)) +#define yytext ((const char*)SCNG(yy_text)) #define yyleng SCNG(yy_leng) -#define yyless(x) do { YYCURSOR = (unsigned char*)yytext + x; \ +#define yyless(x) do { YYCURSOR = (const unsigned char*)yytext + x; \ yyleng = (unsigned int)x; } while(0) /* #define yymore() goto yymore_restart */ @@ -208,9 +208,9 @@ static void yy_pop_state(void) zend_stack_del_top(&SCNG(state_stack)); } -static void yy_scan_buffer(char *str, unsigned int len) +static void yy_scan_buffer(const char *str, unsigned int len) { - YYCURSOR = (YYCTYPE*)str; + YYCURSOR = (const YYCTYPE*)str; SCNG(yy_start) = YYCURSOR; YYLIMIT = YYCURSOR + len; } @@ -288,7 +288,7 @@ zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mo /* }}} */ /* {{{ zend_ini_prepare_string_for_scanning() */ -zend_result zend_ini_prepare_string_for_scanning(char *str, int scanner_mode) +zend_result zend_ini_prepare_string_for_scanning(const char *str, int scanner_mode) { int len = (int)strlen(str); @@ -303,7 +303,7 @@ zend_result zend_ini_prepare_string_for_scanning(char *str, int scanner_mode) /* }}} */ /* {{{ zend_ini_escape_string() */ -static void zend_ini_escape_string(zval *lval, char *str, int len, char quote_type) +static void zend_ini_escape_string(zval *lval, const char *str, int len, char quote_type) { char *s, *t; char *end; @@ -493,7 +493,7 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR}) } {RAW_VALUE_CHARS} { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ - unsigned char *sc = NULL; + const unsigned char *sc = NULL; EAT_LEADING_WHITESPACE(); while (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { @@ -591,7 +591,7 @@ end_raw_value_chars: return 0; } - unsigned char *s = SCNG(yy_text); + const unsigned char *s = SCNG(yy_text); while (s < YYLIMIT) { switch (*s++) { From d53ad4b566a74ff9b95b4f6305cef14df782516c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 22 Mar 2022 21:58:06 +0100 Subject: [PATCH 079/895] main/SAPI: make "ini_entries" a const string --- main/SAPI.h | 2 +- sapi/embed/php_embed.c | 8 +------- sapi/fuzzer/fuzzer-sapi.c | 5 +++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/main/SAPI.h b/main/SAPI.h index 098b7c8c94c30..33c0e280d7390 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -262,7 +262,7 @@ struct _sapi_module_struct { void (*ini_defaults)(HashTable *configuration_hash); int phpinfo_as_text; - char *ini_entries; + const char *ini_entries; const zend_function_entry *additional_functions; unsigned int (*input_filter_init)(void); }; diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index 4b94bd98e66da..4626451f9f68a 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -214,8 +214,7 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv) * allocated so any INI settings added via this callback will have the * lowest precedence and will allow INI files to overwrite them. */ - php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI)); - memcpy(php_embed_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI)); + php_embed_module.ini_entries = HARDCODED_INI; /* SAPI-provided functions. */ php_embed_module.additional_functions = additional_functions; @@ -264,9 +263,4 @@ EMBED_SAPI_API void php_embed_shutdown(void) #ifdef ZTS tsrm_shutdown(); #endif - - if (php_embed_module.ini_entries) { - free(php_embed_module.ini_entries); - php_embed_module.ini_entries = NULL; - } } diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c index 3a79e273106fa..883c3a94ec3ff 100644 --- a/sapi/fuzzer/fuzzer-sapi.c +++ b/sapi/fuzzer/fuzzer-sapi.c @@ -144,7 +144,8 @@ int fuzzer_init_php(const char *extra_ini) if (extra_ini) { ini_len += extra_ini_len + 1; } - char *p = fuzzer_module.ini_entries = malloc(ini_len + 1); + char *p = malloc(ini_len + 1); + fuzzer_module.ini_entries = p; memcpy(p, HARDCODED_INI, sizeof(HARDCODED_INI) - 1); p += sizeof(HARDCODED_INI) - 1; if (extra_ini) { @@ -234,7 +235,7 @@ int fuzzer_shutdown_php(void) php_module_shutdown(); sapi_shutdown(); - free(fuzzer_module.ini_entries); + free((void *)fuzzer_module.ini_entries); return SUCCESS; } From a8eb399ca3e38beaf4a0bb12eac54821cd2ed19f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:41:11 +0100 Subject: [PATCH 080/895] Zend/zend_operators: make several pointers const --- Zend/zend_operators.c | 4 ++-- Zend/zend_operators.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 9af1a6b4756ec..afe068bfeb8d6 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2614,13 +2614,13 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ } /* }}} */ -ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */ +ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op) /* {{{ */ { return (int) i_zend_is_true(op); } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op) /* {{{ */ { zend_object *zobj = Z_OBJ_P(op); zval tmp; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 0fc503f2c12b4..506c27fc50eb3 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -349,13 +349,13 @@ static zend_always_inline bool try_convert_to_string(zval *op) { #define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); } -ZEND_API int ZEND_FASTCALL zend_is_true(zval *op); -ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op); +ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op); +ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op); #define zval_is_true(op) \ zend_is_true(op) -static zend_always_inline bool i_zend_is_true(zval *op) +static zend_always_inline bool i_zend_is_true(const zval *op) { bool result = 0; From f5149535e84f9bf4ed5efd7363690b9cff3a168d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:40:18 +0100 Subject: [PATCH 081/895] Zend/zend_API: make several pointers const --- Zend/zend_API.c | 16 ++++++++-------- Zend/zend_API.h | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 89b223a6a1f47..c06d6119b7aff 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -477,7 +477,7 @@ static ZEND_COLD bool zend_null_arg_deprecated(const char *fallback_type, uint32 return !EG(exception); } -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(const zval *arg, bool *dest, uint32_t arg_num) /* {{{ */ { if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) { if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("bool", arg_num)) { @@ -491,7 +491,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(const zval *arg, bool *dest, uint32_t arg_num) /* {{{ */ { if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) { return 0; @@ -500,7 +500,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */ { if (EXPECTED(Z_TYPE_P(arg) == IS_DOUBLE)) { if (UNEXPECTED(zend_isnan(Z_DVAL_P(arg)))) { @@ -570,7 +570,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(const zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */ { if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) { return 0; @@ -579,7 +579,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(const zval *arg, double *dest, uint32_t arg_num) /* {{{ */ { if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { *dest = (double)Z_LVAL_P(arg); @@ -611,7 +611,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest, uint32_t arg_num) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(const zval *arg, double *dest, uint32_t arg_num) /* {{{ */ { if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { /* SSTH Exception: IS_LONG may be accepted instead as IS_DOUBLE */ @@ -4904,7 +4904,7 @@ ZEND_API ZEND_COLD const char *zend_get_object_type_case(const zend_class_entry } /* }}} */ -ZEND_API bool zend_is_iterable(zval *iterable) /* {{{ */ +ZEND_API bool zend_is_iterable(const zval *iterable) /* {{{ */ { switch (Z_TYPE_P(iterable)) { case IS_ARRAY: @@ -4917,7 +4917,7 @@ ZEND_API bool zend_is_iterable(zval *iterable) /* {{{ */ } /* }}} */ -ZEND_API bool zend_is_countable(zval *countable) /* {{{ */ +ZEND_API bool zend_is_countable(const zval *countable) /* {{{ */ { switch (Z_TYPE_P(countable)) { case IS_ARRAY: diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 635fbdeb60584..a08cce6730425 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -904,9 +904,9 @@ static zend_always_inline const char *zend_get_object_type_uc(const zend_class_e return zend_get_object_type_case(ce, true); } -ZEND_API bool zend_is_iterable(zval *iterable); +ZEND_API bool zend_is_iterable(const zval *iterable); -ZEND_API bool zend_is_countable(zval *countable); +ZEND_API bool zend_is_countable(const zval *countable); ZEND_API zend_result zend_get_default_from_internal_arg_info( zval *default_value_zval, zend_internal_arg_info *arg_info); @@ -2127,18 +2127,18 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char * /* Inlined implementations shared by new and old parameter parsing APIs */ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, bool check_null); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint32_t arg_num); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint32_t arg_num); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, uint32_t arg_num); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, uint32_t arg_num); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest, uint32_t arg_num); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(const zval *arg, bool *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(const zval *arg, bool *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(const zval *arg, zend_long *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, zend_long *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(const zval *arg, double *dest, uint32_t arg_num); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(const zval *arg, double *dest, uint32_t arg_num); ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num); ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest, uint32_t arg_num); ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest, uint32_t arg_num); ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long, uint32_t arg_num); -static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check_null, uint32_t arg_num) +static zend_always_inline bool zend_parse_arg_bool(const zval *arg, bool *dest, bool *is_null, bool check_null, uint32_t arg_num) { if (check_null) { *is_null = 0; @@ -2172,7 +2172,7 @@ static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, b return 1; } -static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool check_null, uint32_t arg_num) +static zend_always_inline bool zend_parse_arg_double(const zval *arg, double *dest, bool *is_null, bool check_null, uint32_t arg_num) { if (check_null) { *is_null = 0; @@ -2283,7 +2283,7 @@ static zend_always_inline bool zend_parse_arg_array(zval *arg, zval **dest, bool return 1; } -static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **dest, bool check_null, bool or_object, bool separate) +static zend_always_inline bool zend_parse_arg_array_ht(const zval *arg, HashTable **dest, bool check_null, bool or_object, bool separate) { if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { *dest = Z_ARRVAL_P(arg); @@ -2342,7 +2342,7 @@ static zend_always_inline bool zend_parse_arg_object(zval *arg, zval **dest, zen return 1; } -static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest, zend_class_entry *ce, bool check_null) +static zend_always_inline bool zend_parse_arg_obj(const zval *arg, zend_object **dest, zend_class_entry *ce, bool check_null) { if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0))) { From 00a918f0cca12a538958ad9f55dc133f6efe9ae7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:44:57 +0100 Subject: [PATCH 082/895] Zend/zend_smart_str: make several pointers const --- Zend/zend_smart_str.c | 4 ++-- Zend/zend_smart_str.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index e6002dcf1d51a..5132043c60e25 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -181,7 +181,7 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) } } -ZEND_API void ZEND_FASTCALL smart_str_append_escaped_truncated(smart_str *str, zend_string *value, size_t length) +ZEND_API void ZEND_FASTCALL smart_str_append_escaped_truncated(smart_str *str, const zend_string *value, size_t length) { smart_str_append_escaped(str, ZSTR_VAL(value), MIN(length, ZSTR_LEN(value))); @@ -190,7 +190,7 @@ ZEND_API void ZEND_FASTCALL smart_str_append_escaped_truncated(smart_str *str, z } } -ZEND_API void ZEND_FASTCALL smart_str_append_scalar(smart_str *dest, zval *value, size_t truncate) { +ZEND_API void ZEND_FASTCALL smart_str_append_scalar(smart_str *dest, const zval *value, size_t truncate) { ZEND_ASSERT(Z_TYPE_P(value) <= IS_STRING); switch (Z_TYPE_P(value)) { diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index d8b72905d0216..e271835e41db9 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -32,8 +32,8 @@ ZEND_API void ZEND_FASTCALL smart_str_append_double( smart_str *str, double num, int precision, bool zero_fraction); ZEND_API void smart_str_append_printf(smart_str *dest, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); -ZEND_API void ZEND_FASTCALL smart_str_append_escaped_truncated(smart_str *str, zend_string *value, size_t length); -ZEND_API void ZEND_FASTCALL smart_str_append_scalar(smart_str *str, zval *value, size_t truncate); +ZEND_API void ZEND_FASTCALL smart_str_append_escaped_truncated(smart_str *str, const zend_string *value, size_t length); +ZEND_API void ZEND_FASTCALL smart_str_append_scalar(smart_str *str, const zval *value, size_t truncate); END_EXTERN_C() static zend_always_inline size_t smart_str_alloc(smart_str *str, size_t len, bool persistent) { From 0caef56ed60a24c0093b12213c7cf57bc5372a79 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:38:56 +0100 Subject: [PATCH 083/895] Zend/zend_execute: make several pointers const --- Zend/zend_execute.c | 56 ++++++++++++++++++++++----------------------- Zend/zend_execute.h | 22 +++++++++--------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b0f87eccb11c9..dc2e0d4953bda 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -756,7 +756,7 @@ static bool zend_verify_weak_scalar_type_hint(uint32_t type_mask, zval *arg) } #if ZEND_DEBUG -static bool can_convert_to_string(zval *zv) { +static bool can_convert_to_string(const zval *zv) { /* We don't call cast_object here, because this check must be side-effect free. As this * is only used for a sanity check of arginfo/zpp consistency, it's okay if we accept * more than actually allowed here. */ @@ -768,7 +768,7 @@ static bool can_convert_to_string(zval *zv) { } /* Used to sanity-check internal arginfo types without performing any actual type conversions. */ -static bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask, zval *arg) +static bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask, const zval *arg) { zend_long lval; double dval; @@ -813,7 +813,7 @@ ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool s return zend_verify_weak_scalar_type_hint(type_mask, arg); } -ZEND_COLD zend_never_inline void zend_verify_property_type_error(zend_property_info *info, zval *property) +ZEND_COLD zend_never_inline void zend_verify_property_type_error(const zend_property_info *info, const zval *property) { zend_string *type_str; @@ -831,7 +831,7 @@ ZEND_COLD zend_never_inline void zend_verify_property_type_error(zend_property_i zend_string_release(type_str); } -ZEND_COLD zend_never_inline void zend_magic_get_property_type_inconsistency_error(zend_property_info *info, zval *property) +ZEND_COLD zend_never_inline void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property) { /* we _may_ land here in case reading already errored and runtime cache thus has not been updated (i.e. it contains a valid but unrelated info) */ if (EG(exception)) { @@ -848,7 +848,7 @@ ZEND_COLD zend_never_inline void zend_magic_get_property_type_inconsistency_erro zend_string_release(type_str); } -ZEND_COLD void zend_match_unhandled_error(zval *value) +ZEND_COLD void zend_match_unhandled_error(const zval *value) { smart_str msg = {0}; @@ -868,18 +868,18 @@ ZEND_COLD void zend_match_unhandled_error(zval *value) } ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error( - zend_property_info *info) { + const zend_property_info *info) { zend_throw_error(NULL, "Cannot modify readonly property %s::$%s", ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name)); } -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(zend_property_info *info) +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(const zend_property_info *info) { zend_throw_error(NULL, "Cannot indirectly modify readonly property %s::$%s", ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name)); } -static zend_class_entry *resolve_single_class_type(zend_string *name, zend_class_entry *self_ce) { +static const zend_class_entry *resolve_single_class_type(zend_string *name, const zend_class_entry *self_ce) { if (zend_string_equals_literal_ci(name, "self")) { return self_ce; } else if (zend_string_equals_literal_ci(name, "parent")) { @@ -889,8 +889,8 @@ static zend_class_entry *resolve_single_class_type(zend_string *name, zend_class } } -static zend_always_inline zend_class_entry *zend_ce_from_type( - zend_property_info *info, zend_type *type) { +static zend_always_inline const zend_class_entry *zend_ce_from_type( + const zend_property_info *info, const zend_type *type) { ZEND_ASSERT(ZEND_TYPE_HAS_NAME(*type)); zend_string *name = ZEND_TYPE_NAME(*type); if (ZSTR_HAS_CE_CACHE(name)) { @@ -904,13 +904,13 @@ static zend_always_inline zend_class_entry *zend_ce_from_type( } static bool zend_check_intersection_for_property_class_type(zend_type_list *intersection_type_list, - zend_property_info *info, zend_class_entry *object_ce) + const zend_property_info *info, const zend_class_entry *object_ce) { zend_type *list_type; ZEND_TYPE_LIST_FOREACH(intersection_type_list, list_type) { ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type)); - zend_class_entry *ce = zend_ce_from_type(info, list_type); + const zend_class_entry *ce = zend_ce_from_type(info, list_type); if (!ce || !instanceof_function(object_ce, ce)) { return false; } @@ -919,7 +919,7 @@ static bool zend_check_intersection_for_property_class_type(zend_type_list *inte } static bool zend_check_and_resolve_property_class_type( - zend_property_info *info, zend_class_entry *object_ce) { + const zend_property_info *info, const zend_class_entry *object_ce) { if (ZEND_TYPE_HAS_LIST(info->type)) { zend_type *list_type; if (ZEND_TYPE_IS_INTERSECTION(info->type)) { @@ -935,7 +935,7 @@ static bool zend_check_and_resolve_property_class_type( continue; } ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type)); - zend_class_entry *ce = zend_ce_from_type(info, list_type); + const zend_class_entry *ce = zend_ce_from_type(info, list_type); if (ce && instanceof_function(object_ce, ce)) { return true; } @@ -943,12 +943,12 @@ static bool zend_check_and_resolve_property_class_type( return false; } } else { - zend_class_entry *ce = zend_ce_from_type(info, &info->type); + const zend_class_entry *ce = zend_ce_from_type(info, &info->type); return ce && instanceof_function(object_ce, ce); } } -static zend_always_inline bool i_zend_check_property_type(zend_property_info *info, zval *property, bool strict) +static zend_always_inline bool i_zend_check_property_type(const zend_property_info *info, zval *property, bool strict) { ZEND_ASSERT(!Z_ISREF_P(property)); if (EXPECTED(ZEND_TYPE_CONTAINS_CODE(info->type, Z_TYPE_P(property)))) { @@ -965,7 +965,7 @@ static zend_always_inline bool i_zend_check_property_type(zend_property_info *in return zend_verify_scalar_type_hint(type_mask, property, strict, 0); } -static zend_always_inline bool i_zend_verify_property_type(zend_property_info *info, zval *property, bool strict) +static zend_always_inline bool i_zend_verify_property_type(const zend_property_info *info, zval *property, bool strict) { if (i_zend_check_property_type(info, property, strict)) { return 1; @@ -975,7 +975,7 @@ static zend_always_inline bool i_zend_verify_property_type(zend_property_info *i return 0; } -ZEND_API bool zend_never_inline zend_verify_property_type(zend_property_info *info, zval *property, bool strict) { +ZEND_API bool zend_never_inline zend_verify_property_type(const zend_property_info *info, zval *property, bool strict) { return i_zend_verify_property_type(info, property, strict); } @@ -3387,7 +3387,7 @@ static zend_always_inline zend_result zend_fetch_static_property_address(zval ** return SUCCESS; } -ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(zend_property_info *prop1, zend_property_info *prop2, zval *zv) { +ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) { zend_string *type1_str = zend_type_to_string(prop1->type); zend_string *type2_str = zend_type_to_string(prop2->type); zend_type_error("Reference with value of type %s held by property %s::$%s of type %s is not compatible with property %s::$%s of type %s", @@ -3403,7 +3403,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(zend_property_info *prop1 zend_string_release(type2_str); } -ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(zend_property_info *prop, zval *zv) { +ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv) { zend_string *type_str = zend_type_to_string(prop->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s", zend_zval_type_name(zv), @@ -3414,7 +3414,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(zend_property_info *prop, zend_string_release(type_str); } -ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(zend_property_info *prop1, zend_property_info *prop2, zval *zv) { +ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) { zend_string *type1_str = zend_type_to_string(prop1->type); zend_string *type2_str = zend_type_to_string(prop2->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s and property %s::$%s of type %s, as this would result in an inconsistent type conversion", @@ -3432,7 +3432,7 @@ ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(zend_property_info /* 1: valid, 0: invalid, -1: may be valid after type coercion */ static zend_always_inline int i_zend_verify_type_assignable_zval( - zend_property_info *info, zval *zv, bool strict) { + const zend_property_info *info, const zval *zv, bool strict) { zend_type type = info->type; uint32_t type_mask; zend_uchar zv_type = Z_TYPE_P(zv); @@ -3474,11 +3474,11 @@ static zend_always_inline int i_zend_verify_type_assignable_zval( ZEND_API bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, bool strict) { - zend_property_info *prop; + const zend_property_info *prop; /* The value must satisfy each property type, and coerce to the same value for each property * type. Remember the first coerced type and value we've seen for this purpose. */ - zend_property_info *first_prop = NULL; + const zend_property_info *first_prop = NULL; zval coerced_value; ZVAL_UNDEF(&coerced_value); @@ -3584,7 +3584,7 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ze return variable_ptr; } -ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context) { +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(const zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context) { zval *val = orig_val; if (Z_ISREF_P(val) && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(val))) { int result; @@ -3601,7 +3601,7 @@ ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(zend_property_ zval tmp; ZVAL_COPY(&tmp, val); if (zend_verify_weak_scalar_type_hint(ZEND_TYPE_FULL_MASK(prop_info->type), &tmp)) { - zend_property_info *ref_prop = ZEND_REF_FIRST_SOURCE(Z_REF_P(orig_val)); + const zend_property_info *ref_prop = ZEND_REF_FIRST_SOURCE(Z_REF_P(orig_val)); zend_throw_ref_type_error_type(ref_prop, prop_info, val); zval_ptr_dtor(&tmp); return 0; @@ -3625,7 +3625,7 @@ ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(zend_property_ return 0; } -ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict) { +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(const zend_property_info *prop_info, zval *orig_val, bool strict) { return zend_verify_prop_assignable_by_ref_ex(prop_info, orig_val, strict, ZEND_VERIFY_PROP_ASSIGNABLE_BY_REF_CONTEXT_ASSIGNMENT); } @@ -3652,7 +3652,7 @@ ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_l source_list->list = ZEND_PROPERTY_INFO_SOURCE_FROM_LIST(list); } -ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, zend_property_info *prop) +ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, const zend_property_info *prop) { zend_property_info_list *list = ZEND_PROPERTY_INFO_SOURCE_TO_LIST(source_list->list); zend_property_info **ptr, **end; diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index ed6d66461863d..de53305090c1a 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -70,17 +70,17 @@ typedef enum { ZEND_VERIFY_PROP_ASSIGNABLE_BY_REF_CONTEXT_ASSIGNMENT, ZEND_VERIFY_PROP_ASSIGNABLE_BY_REF_CONTEXT_MAGIC_GET, } zend_verify_prop_assignable_by_ref_context; -ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context); -ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict); +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(const zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context); +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(const zend_property_info *prop_info, zval *orig_val, bool strict); -ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(zend_property_info *prop, zval *zv); -ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(zend_property_info *prop1, zend_property_info *prop2, zval *zv); +ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv); +ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv); ZEND_API ZEND_COLD zval* ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval); ZEND_API ZEND_COLD zval* ZEND_FASTCALL zend_undefined_index_write(HashTable *ht, zend_string *offset); ZEND_API ZEND_COLD void zend_wrong_string_offset_error(void); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error(zend_property_info *info); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(zend_property_info *info); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error(const zend_property_info *info); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(const zend_property_info *info); ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg); ZEND_API ZEND_COLD void zend_verify_arg_error( @@ -112,7 +112,7 @@ ZEND_API bool zend_verify_internal_return_type(zend_function *zf, zval *ret); ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); -ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); +ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, const zend_property_info *prop); ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict); @@ -455,9 +455,9 @@ ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call); #define ZEND_CLASS_HAS_TYPE_HINTS(ce) ((ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) == ZEND_ACC_HAS_TYPE_HINTS) -ZEND_API bool zend_verify_property_type(zend_property_info *info, zval *property, bool strict); -ZEND_COLD void zend_verify_property_type_error(zend_property_info *info, zval *property); -ZEND_COLD void zend_magic_get_property_type_inconsistency_error(zend_property_info *info, zval *property); +ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict); +ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property); +ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property); #define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \ zend_ref_add_type_source(&ZEND_REF_TYPE_SOURCES(ref), source) @@ -486,7 +486,7 @@ ZEND_COLD void zend_magic_get_property_type_inconsistency_error(zend_property_in } \ } while (0) -ZEND_COLD void zend_match_unhandled_error(zval *value); +ZEND_COLD void zend_match_unhandled_error(const zval *value); END_EXTERN_C() From d48c5372ab00b38ed906d574f27224d4b526e68f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:38:22 +0100 Subject: [PATCH 084/895] Zend/zend_object_handlers: make several pointers const --- Zend/zend_object_handlers.c | 34 +++++++++++++++++----------------- Zend/zend_object_handlers.h | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index d767e83997852..6776fb2c759ee 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -223,7 +223,7 @@ static void zend_std_call_issetter(zend_object *zobj, zend_string *prop_name, zv /* }}} */ -static zend_always_inline bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */ +static zend_always_inline bool is_derived_class(const zend_class_entry *child_class, const zend_class_entry *parent_class) /* {{{ */ { child_class = child_class->parent; while (child_class) { @@ -237,14 +237,14 @@ static zend_always_inline bool is_derived_class(zend_class_entry *child_class, z } /* }}} */ -static zend_never_inline int is_protected_compatible_scope(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ +static zend_never_inline int is_protected_compatible_scope(const zend_class_entry *ce, const zend_class_entry *scope) /* {{{ */ { return scope && (is_derived_class(ce, scope) || is_derived_class(scope, ce)); } /* }}} */ -static zend_never_inline zend_property_info *zend_get_parent_private_property(zend_class_entry *scope, zend_class_entry *ce, zend_string *member) /* {{{ */ +static zend_never_inline zend_property_info *zend_get_parent_private_property(zend_class_entry *scope, const zend_class_entry *ce, zend_string *member) /* {{{ */ { zval *zv; zend_property_info *prop_info; @@ -263,7 +263,7 @@ static zend_never_inline zend_property_info *zend_get_parent_private_property(ze } /* }}} */ -static ZEND_COLD zend_never_inline void zend_bad_property_access(zend_property_info *property_info, zend_class_entry *ce, zend_string *member) /* {{{ */ +static ZEND_COLD zend_never_inline void zend_bad_property_access(const zend_property_info *property_info, const zend_class_entry *ce, const zend_string *member) /* {{{ */ { zend_throw_error(NULL, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(member)); } @@ -276,13 +276,13 @@ static ZEND_COLD zend_never_inline void zend_bad_property_name(void) /* {{{ */ /* }}} */ static ZEND_COLD zend_never_inline void zend_forbidden_dynamic_property( - zend_class_entry *ce, zend_string *member) { + const zend_class_entry *ce, const zend_string *member) { zend_throw_error(NULL, "Cannot create dynamic property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(member)); } static ZEND_COLD zend_never_inline bool zend_deprecated_dynamic_property( - zend_object *obj, zend_string *member) { + zend_object *obj, const zend_string *member) { GC_ADDREF(obj); zend_error(E_DEPRECATED, "Creation of dynamic property %s::$%s is deprecated", ZSTR_VAL(obj->ce->name), ZSTR_VAL(member)); @@ -300,7 +300,7 @@ static ZEND_COLD zend_never_inline bool zend_deprecated_dynamic_property( } static ZEND_COLD zend_never_inline void zend_readonly_property_modification_scope_error( - zend_class_entry *ce, zend_string *member, zend_class_entry *scope, const char *operation) { + const zend_class_entry *ce, const zend_string *member, const zend_class_entry *scope, const char *operation) { zend_throw_error(NULL, "Cannot %s readonly property %s::$%s from %s%s", operation, ZSTR_VAL(ce->name), ZSTR_VAL(member), scope ? "scope " : "global scope", scope ? ZSTR_VAL(scope->name) : ""); @@ -312,7 +312,7 @@ static ZEND_COLD zend_never_inline void zend_readonly_property_unset_error( ZSTR_VAL(ce->name), ZSTR_VAL(member)); } -static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *ce, zend_string *member, int silent, void **cache_slot, zend_property_info **info_ptr) /* {{{ */ +static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *ce, zend_string *member, int silent, void **cache_slot, const zend_property_info **info_ptr) /* {{{ */ { zval *zv; zend_property_info *property_info; @@ -411,14 +411,14 @@ static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *c static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ { - zend_property_info *dummy; + const zend_property_info *dummy; /* Trigger the correct error */ zend_get_property_offset(ce, member, 0, NULL, &dummy); } /* }}} */ -ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent) /* {{{ */ +ZEND_API zend_property_info *zend_get_property_info(const zend_class_entry *ce, zend_string *member, int silent) /* {{{ */ { zval *zv; zend_property_info *property_info; @@ -594,7 +594,7 @@ ZEND_API zval *zend_std_read_property(zend_object *zobj, zend_string *name, int { zval *retval; uintptr_t property_offset; - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; uint32_t *guard = NULL; zend_string *tmp_name = NULL; @@ -767,7 +767,7 @@ static zend_always_inline bool property_uses_strict_types(void) { } static bool verify_readonly_initialization_access( - zend_property_info *prop_info, zend_class_entry *ce, + const zend_property_info *prop_info, const zend_class_entry *ce, zend_string *name, const char *operation) { zend_class_entry *scope; if (UNEXPECTED(EG(fake_scope))) { @@ -782,7 +782,7 @@ static bool verify_readonly_initialization_access( /* We may have redeclared a parent property. In that case the parent should still be * allowed to initialize it. */ if (scope && is_derived_class(ce, scope)) { - zend_property_info *prop_info = zend_hash_find_ptr(&scope->properties_info, name); + const zend_property_info *prop_info = zend_hash_find_ptr(&scope->properties_info, name); if (prop_info) { /* This should be ensured by inheritance. */ ZEND_ASSERT(prop_info->flags & ZEND_ACC_READONLY); @@ -800,7 +800,7 @@ ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zva { zval *variable_ptr, tmp; uintptr_t property_offset; - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; ZEND_ASSERT(!Z_ISREF_P(value)); property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__set != NULL), cache_slot, &prop_info); @@ -1037,7 +1037,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam { zval *retval = NULL; uintptr_t property_offset; - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; #if DEBUG_OBJECT_HANDLERS fprintf(stderr, "Ptr object #%d property: %s\n", zobj->handle, ZSTR_VAL(name)); @@ -1118,7 +1118,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam ZEND_API void zend_std_unset_property(zend_object *zobj, zend_string *name, void **cache_slot) /* {{{ */ { uintptr_t property_offset; - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__unset != NULL), cache_slot, &prop_info); @@ -1750,7 +1750,7 @@ ZEND_API int zend_std_has_property(zend_object *zobj, zend_string *name, int has int result; zval *value = NULL; uintptr_t property_offset; - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; zend_string *tmp_name = NULL; property_offset = zend_get_property_offset(zobj->ce, name, 1, cache_slot, &prop_info); diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 94b7f52cba3aa..79bace9202846 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -205,7 +205,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, int type); ZEND_API ZEND_COLD bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name); ZEND_API zend_function *zend_std_get_constructor(zend_object *object); -ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent); +ZEND_API struct _zend_property_info *zend_get_property_info(const zend_class_entry *ce, zend_string *member, int silent); ZEND_API HashTable *zend_std_get_properties(zend_object *object); ZEND_API HashTable *zend_std_get_gc(zend_object *object, zval **table, int *n); ZEND_API HashTable *zend_std_get_debug_info(zend_object *object, int *is_temp); From efd5ecb0f2b78697fe1da829fd010acef03bf9b4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:37:41 +0100 Subject: [PATCH 085/895] Zend/Optimizer/zend_inference: make several pointers const This allows removing several deconst casts from the JIT. --- Zend/Optimizer/zend_inference.c | 62 ++++++++++++++++---------------- Zend/Optimizer/zend_inference.h | 8 ++--- ext/opcache/jit/zend_jit_trace.c | 10 +++--- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 257a4324c7f91..1aeaa02f7b3d8 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -561,8 +561,8 @@ static void float_div(zend_long a, zend_long b, zend_long *r1, zend_long *r2) { } static bool zend_inference_calc_binary_op_range( - const zend_op_array *op_array, zend_ssa *ssa, - zend_op *opline, zend_ssa_op *ssa_op, zend_uchar opcode, zend_ssa_range *tmp) { + const zend_op_array *op_array, const zend_ssa *ssa, + const zend_op *opline, const zend_ssa_op *ssa_op, zend_uchar opcode, zend_ssa_range *tmp) { zend_long op1_min, op2_min, op1_max, op2_max, t1, t2, t3, t4; switch (opcode) { @@ -845,14 +845,14 @@ static bool zend_inference_calc_binary_op_range( return 0; } -static bool zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp) +static bool zend_inference_calc_range(const zend_op_array *op_array, const zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp) { uint32_t line; - zend_op *opline; - zend_ssa_op *ssa_op; + const zend_op *opline; + const zend_ssa_op *ssa_op; if (ssa->vars[var].definition_phi) { - zend_ssa_phi *p = ssa->vars[var].definition_phi; + const zend_ssa_phi *p = ssa->vars[var].definition_phi; int i; tmp->underflow = 0; @@ -860,7 +860,7 @@ static bool zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *s tmp->max = ZEND_LONG_MIN; tmp->overflow = 0; if (p->pi >= 0 && p->has_range_constraint) { - zend_ssa_range_constraint *constraint = &p->constraint.range; + const zend_ssa_range_constraint *constraint = &p->constraint.range; if (constraint->negative) { int src1 = p->sources[0]; @@ -879,7 +879,7 @@ static bool zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *s case ZEND_PRE_DEC: case ZEND_POST_DEC: if (!tmp->underflow) { - zend_ssa_phi *p = ssa->vars[ssa->ops[line].op1_use].definition_phi; + const zend_ssa_phi *p = ssa->vars[ssa->ops[line].op1_use].definition_phi; if (p && p->pi < 0 && ssa->cfg.blocks[p->block].predecessors_count == 2 @@ -893,7 +893,7 @@ static bool zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *s case ZEND_PRE_INC: case ZEND_POST_INC: if (!tmp->overflow) { - zend_ssa_phi *p = ssa->vars[ssa->ops[line].op1_use].definition_phi; + const zend_ssa_phi *p = ssa->vars[ssa->ops[line].op1_use].definition_phi; if (p && p->pi < 0 && ssa->cfg.blocks[p->block].predecessors_count == 2 @@ -1026,7 +1026,7 @@ static bool zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *s return zend_inference_propagate_range(op_array, ssa, opline, ssa_op, var, tmp); } -ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp) +ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp) { tmp->underflow = 0; tmp->overflow = 0; @@ -1326,8 +1326,8 @@ ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, zend case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: if (ssa_op->result_def == var) { - zend_func_info *func_info = ZEND_FUNC_INFO(op_array); - zend_call_info *call_info; + const zend_func_info *func_info = ZEND_FUNC_INFO(op_array); + const zend_call_info *call_info; if (!func_info || !func_info->call_map) { break; } @@ -1499,7 +1499,7 @@ static bool zend_check_inner_cycles(const zend_op_array *op_array, zend_ssa *ssa } #endif -static void zend_infer_ranges_warmup(const zend_op_array *op_array, zend_ssa *ssa, int *scc_var, int *next_scc_var, int scc) +static void zend_infer_ranges_warmup(const zend_op_array *op_array, zend_ssa *ssa, const int *scc_var, const int *next_scc_var, int scc) { int worklist_len = zend_bitset_len(ssa->vars_count); int j, n; @@ -2153,13 +2153,13 @@ static uint32_t zend_convert_type(const zend_script *script, zend_type type, zen return tmp; } -ZEND_API uint32_t zend_fetch_arg_info_type(const zend_script *script, zend_arg_info *arg_info, zend_class_entry **pce) +ZEND_API uint32_t zend_fetch_arg_info_type(const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce) { return zend_convert_type(script, arg_info->type, pce); } -static zend_property_info *lookup_prop_info(zend_class_entry *ce, zend_string *name, zend_class_entry *scope) { - zend_property_info *prop_info; +static const zend_property_info *lookup_prop_info(const zend_class_entry *ce, zend_string *name, zend_class_entry *scope) { + const zend_property_info *prop_info; /* If the class is linked, reuse the precise runtime logic. */ if ((ce->ce_flags & ZEND_ACC_LINKED) @@ -2185,11 +2185,11 @@ static zend_property_info *lookup_prop_info(zend_class_entry *ce, zend_string *n return NULL; } -static zend_property_info *zend_fetch_prop_info(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op *ssa_op) +static const zend_property_info *zend_fetch_prop_info(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) { - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; if (opline->op2_type == IS_CONST) { - zend_class_entry *ce = NULL; + const zend_class_entry *ce = NULL; if (opline->op1_type == IS_UNUSED) { ce = op_array->scope; @@ -2208,9 +2208,9 @@ static zend_property_info *zend_fetch_prop_info(const zend_op_array *op_array, z return prop_info; } -static zend_property_info *zend_fetch_static_prop_info(const zend_script *script, const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline) +static const zend_property_info *zend_fetch_static_prop_info(const zend_script *script, const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) { - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; if (opline->op1_type == IS_CONST) { zend_class_entry *ce = NULL; if (opline->op2_type == IS_UNUSED) { @@ -2244,7 +2244,7 @@ static zend_property_info *zend_fetch_static_prop_info(const zend_script *script return prop_info; } -static uint32_t zend_fetch_prop_type(const zend_script *script, zend_property_info *prop_info, zend_class_entry **pce) +static uint32_t zend_fetch_prop_type(const zend_script *script, const zend_property_info *prop_info, zend_class_entry **pce) { if (!prop_info) { if (pce) { @@ -2280,7 +2280,7 @@ static zend_always_inline zend_result _zend_update_type_info( zend_ssa *ssa, const zend_script *script, zend_bitset worklist, - zend_op *opline, + const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes, zend_long optimization_level, @@ -2490,7 +2490,7 @@ static zend_always_inline zend_result _zend_update_type_info( case ZEND_ASSIGN_OBJ_OP: case ZEND_ASSIGN_STATIC_PROP_OP: { - zend_property_info *prop_info = NULL; + const zend_property_info *prop_info = NULL; orig = 0; tmp = 0; if (opline->opcode == ZEND_ASSIGN_OBJ_OP) { @@ -3454,13 +3454,13 @@ static zend_always_inline zend_result _zend_update_type_info( tmp |= MAY_BE_NULL; } if (opline->op1_type == IS_UNUSED || (t1 & MAY_BE_OBJECT)) { - zend_property_info *prop_info = zend_fetch_prop_info(op_array, ssa, opline, ssa_op); + const zend_property_info *prop_info = zend_fetch_prop_info(op_array, ssa, opline, ssa_op); tmp |= zend_fetch_prop_type(script, prop_info, &ce); if (opline->opcode != ZEND_FETCH_OBJ_R && opline->opcode != ZEND_FETCH_OBJ_IS) { tmp |= MAY_BE_REF | MAY_BE_INDIRECT; ce = NULL; } else if (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || !(t1 & MAY_BE_RC1)) { - zend_class_entry *ce = NULL; + const zend_class_entry *ce = NULL; if (opline->op1_type == IS_UNUSED) { ce = op_array->scope; @@ -4487,7 +4487,7 @@ ZEND_API zend_result zend_ssa_inference(zend_arena **arena, const zend_op_array } /* }}} */ -ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, uint32_t t1, uint32_t t2) +ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2) { if (opline->op1_type == IS_CV) { if (t1 & MAY_BE_UNDEF) { @@ -4765,8 +4765,8 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op } } if (ssa_op->op1_use) { - zend_ssa_var_info *var_info = ssa->var_info + ssa_op->op1_use; - zend_class_entry *ce = var_info->ce; + const zend_ssa_var_info *var_info = ssa->var_info + ssa_op->op1_use; + const zend_class_entry *ce = var_info->ce; if (var_info->is_instanceof || !ce || ce->create_object || ce->__get || ce->__set || ce->parent) { @@ -4813,7 +4813,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op } if (op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) { uint32_t arg_num = opline->op1.num; - zend_arg_info *cur_arg_info; + const zend_arg_info *cur_arg_info; if (EXPECTED(arg_num <= op_array->num_args)) { cur_arg_info = &op_array->arg_info[arg_num-1]; @@ -4889,7 +4889,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op } } -ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa) +ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa) { return zend_may_throw_ex(opline, ssa_op, op_array, ssa, OP1_INFO(), OP2_INFO()); } diff --git a/Zend/Optimizer/zend_inference.h b/Zend/Optimizer/zend_inference.h index 42dcd50920a5e..f27c5ecdc485b 100644 --- a/Zend/Optimizer/zend_inference.h +++ b/Zend/Optimizer/zend_inference.h @@ -222,18 +222,18 @@ ZEND_API int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_arra ZEND_API uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int insert); -ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp); +ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp); ZEND_API uint32_t zend_fetch_arg_info_type( - const zend_script *script, zend_arg_info *arg_info, zend_class_entry **pce); + const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce); ZEND_API void zend_init_func_return_info( const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret); uint32_t zend_get_return_info_from_signature_only( const zend_function *func, const zend_script *script, zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info); -ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, uint32_t t1, uint32_t t2); -ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa); +ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2); +ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa); ZEND_API zend_result zend_update_type_info( const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script, diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 8c2fce9c021a0..55db634ec8825 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -864,7 +864,7 @@ static void zend_jit_trace_propagate_range(const zend_op_array *op_array, const int def = tssa->vars[ssa_var].definition; if (tssa->vars[ssa_var].alias == NO_ALIAS - && zend_inference_propagate_range(op_array, tssa, (zend_op*)tssa_opcodes[def], (zend_ssa_op*)&tssa->ops[def], ssa_var, &tmp)) { + && zend_inference_propagate_range(op_array, tssa, tssa_opcodes[def], &tssa->ops[def], ssa_var, &tmp)) { tssa->var_info[ssa_var].range.min = tmp.min; tssa->var_info[ssa_var].range.max = tmp.max; tssa->var_info[ssa_var].range.underflow = tmp.underflow; @@ -6281,7 +6281,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } if (type == IS_LONG - && zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->result_def, &tmp)) { + && zend_inference_propagate_range(op_array, ssa, opline, ssa_op, ssa_op->result_def, &tmp)) { ssa->var_info[ssa_op->result_def].range.min = tmp.min; ssa->var_info[ssa_op->result_def].range.max = tmp.max; ssa->var_info[ssa_op->result_def].range.underflow = 0; @@ -6342,7 +6342,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } if (type == IS_LONG - && zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op1_def, &tmp)) { + && zend_inference_propagate_range(op_array, ssa, opline, ssa_op, ssa_op->op1_def, &tmp)) { ssa->var_info[ssa_op->op1_def].range.min = tmp.min; ssa->var_info[ssa_op->op1_def].range.max = tmp.max; ssa->var_info[ssa_op->op1_def].range.underflow = 0; @@ -6383,7 +6383,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } if (type == IS_LONG - && zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op2_def, &tmp)) { + && zend_inference_propagate_range(op_array, ssa, opline, ssa_op, ssa_op->op2_def, &tmp)) { ssa->var_info[ssa_op->op2_def].range.min = tmp.min; ssa->var_info[ssa_op->op2_def].range.max = tmp.max; ssa->var_info[ssa_op->op2_def].range.underflow = 0; @@ -6426,7 +6426,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } if (type == IS_LONG - && zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op1_def, &tmp)) { + && zend_inference_propagate_range(op_array, ssa, opline, ssa_op, ssa_op->op1_def, &tmp)) { ssa->var_info[ssa_op->op1_def].range.min = tmp.min; ssa->var_info[ssa_op->op1_def].range.max = tmp.max; ssa->var_info[ssa_op->op1_def].range.underflow = 0; From 5ea9a7e219c362a75d2b65de6bb531e82bea53e4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Jan 2023 20:29:51 +0100 Subject: [PATCH 086/895] Zend/Optimizer/zend_ssa: make pointer const --- Zend/Optimizer/zend_ssa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/Optimizer/zend_ssa.c b/Zend/Optimizer/zend_ssa.c index d6d0e70eae8a5..67165a9b26d7a 100644 --- a/Zend/Optimizer/zend_ssa.c +++ b/Zend/Optimizer/zend_ssa.c @@ -57,9 +57,9 @@ static bool will_rejoin( return 0; } -static bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ +static bool needs_pi(const zend_op_array *op_array, const zend_dfg *dfg, const zend_ssa *ssa, int from, int to, int var) /* {{{ */ { - zend_basic_block *from_block, *to_block; + const zend_basic_block *from_block, *to_block; int other_successor; if (!DFG_ISSET(dfg->in, dfg->size, to, var)) { From e628c66f9d4173e585081ddef358505433f9a288 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 14:24:28 +0100 Subject: [PATCH 087/895] #include cleanup (#10216) Shift header include In the C file, include the header first so missing #includes are detected by the compiler, and use lighter header dependencies in the header, to speed up compile times. --- Zend/zend_alloc.c | 2 +- Zend/zend_alloc.h | 6 ++---- Zend/zend_hash.c | 1 + Zend/zend_hash.h | 7 +++++-- Zend/zend_portability.h | 6 ++++++ Zend/zend_sort.c | 2 -- Zend/zend_sort.h | 3 +++ Zend/zend_string.c | 1 + Zend/zend_string.h | 4 +++- 9 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 5f11f49b07157..5f2f25c0c48fb 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -51,8 +51,8 @@ * with more specialized routines when the requested size is known. */ -#include "zend.h" #include "zend_alloc.h" +#include "zend.h" #include "zend_globals.h" #include "zend_operators.h" #include "zend_multiply.h" diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 578d4c78cc5c5..0fe1ff98c6f7a 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,10 +21,8 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H -#include - -#include "../TSRM/TSRM.h" -#include "zend.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_result #ifndef ZEND_MM_ALIGNMENT # error "ZEND_MM_ALIGNMENT was not defined during configure" diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index ef7111fafb5b4..29cd57076e701 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -18,6 +18,7 @@ +----------------------------------------------------------------------+ */ +#include "zend_hash.h" #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 93b9f0d4530a4..09495f5fb2ff1 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -21,8 +21,11 @@ #ifndef ZEND_HASH_H #define ZEND_HASH_H -#include "zend.h" -#include "zend_sort.h" +#include "zend_alloc.h" // for pefree() +#include "zend_long.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_sort.h" // for zend_sort() +#include "zend_string.h" // for ZSTR_VAL() #define HASH_KEY_IS_STRING 1 #define HASH_KEY_IS_LONG 2 diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 7fdeedee19bf4..6ddef3cd83129 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -21,6 +21,12 @@ #ifndef ZEND_PORTABILITY_H #define ZEND_PORTABILITY_H +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include "php_config.h" // for HAVE_* +#endif + #ifdef __cplusplus #define BEGIN_EXTERN_C() extern "C" { #define END_EXTERN_C() } diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c index 355d2d1bad581..f43d5cae63f52 100644 --- a/Zend/zend_sort.c +++ b/Zend/zend_sort.c @@ -17,9 +17,7 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" #include "zend_sort.h" -#include static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { if (cmp(a, b) > 0) { diff --git a/Zend/zend_sort.h b/Zend/zend_sort.h index e606935f79029..320b5e56066a1 100644 --- a/Zend/zend_sort.h +++ b/Zend/zend_sort.h @@ -20,6 +20,9 @@ #ifndef ZEND_SORT_H #define ZEND_SORT_H +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for compare_func_t, swap_func_t + BEGIN_EXTERN_C() ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 68e6084fdf60f..eef68c8e8aca2 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -16,6 +16,7 @@ +----------------------------------------------------------------------+ */ +#include "zend_string.h" #include "zend.h" #include "zend_globals.h" diff --git a/Zend/zend_string.h b/Zend/zend_string.h index ed59ef82a14fe..8705b4c300c57 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -19,7 +19,9 @@ #ifndef ZEND_STRING_H #define ZEND_STRING_H -#include "zend.h" +#include "zend_alloc.h" // for pemalloc() +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_string BEGIN_EXTERN_C() From 0f4d37d040d6250ca8edfeb6cb489ea55b5d5b4e Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Wed, 4 Jan 2023 08:47:33 -0700 Subject: [PATCH 088/895] Enforce literals in certain macros (#10111) These macros are designed only for literals. This is a standards compliant trick to ensure they are literals. For example, these are the same: "Hello" " world" "Hello world" --- Zend/zend_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 8705b4c300c57..1c658ae2bbd4a 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -371,10 +371,10 @@ static zend_always_inline bool zend_string_equals(const zend_string *s1, const z (ZSTR_LEN(s1) == ZSTR_LEN(s2) && !zend_binary_strcasecmp(ZSTR_VAL(s1), ZSTR_LEN(s1), ZSTR_VAL(s2), ZSTR_LEN(s2))) #define zend_string_equals_literal_ci(str, c) \ - (ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), sizeof(c) - 1)) + (ZSTR_LEN(str) == sizeof("" c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), sizeof(c) - 1)) #define zend_string_equals_literal(str, literal) \ - zend_string_equals_cstr(str, literal, strlen(literal)) + zend_string_equals_cstr(str, "" literal, sizeof(literal) - 1) static zend_always_inline bool zend_string_starts_with_cstr(const zend_string *str, const char *prefix, size_t prefix_length) { From ef114f94b95f45b33180c352cd20ef013d4f4e6c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 17:35:40 +0200 Subject: [PATCH 089/895] Simplify code for conversion of UHC to Unicode I was hoping to get some performance gains here, but the performance is just the same as before, +/- a fraction of a percent. --- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 2ac351d644cdb..310d03ade5996 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -208,20 +208,24 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, *out++ = c; } else if (c > 0x80 && c < 0xFE && c != 0xC9 && p < e) { unsigned char c2 = *p++; + if (c2 < 0x41 || c2 == 0xFF) { + *out++ = MBFL_BAD_INPUT; + continue; + } unsigned int w = 0; - if (c >= 0x81 && c <= 0xA0 && c2 >= 0x41 && c2 <= 0xFE) { - w = (c - 0x81)*190 + (c2 - 0x41); + if (c <= 0xA0) { + w = (c - 0x81)*190 + c2 - 0x41; if (w < uhc1_ucs_table_size) { w = uhc1_ucs_table[w]; } - } else if (c >= 0xA1 && c <= 0xC6 && c2 >= 0x41 && c2 <= 0xFE) { - w = (c - 0xA1)*190 + (c2 - 0x41); + } else if (c <= 0xC6) { + w = (c - 0xA1)*190 + c2 - 0x41; if (w < uhc2_ucs_table_size) { w = uhc2_ucs_table[w]; } - } else if (c >= 0xC7 && c < 0xFE && c2 >= 0xA1 && c2 <= 0xFE) { - w = (c - 0xC7)*94 + (c2 - 0xA1); + } else if (c2 >= 0xA1) { + w = (c - 0xC7)*94 + c2 - 0xA1; if (w < uhc3_ucs_table_size) { w = uhc3_ucs_table[w]; } From 74319de2f9c174277819ac21f9f6bc2ec3afdffa Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 17:58:51 +0200 Subject: [PATCH 090/895] Combine uhc1_ucs_table and uhc2_ucs_table for UHC/EUC-KR/ISO-2022-KR conversion These two tables cover contiguous ranges of the KSX 1001/KSC 5601 charset. There seems to be no reason to divide them into two tables instead of one. --- .../libmbfl/filters/mbfilter_euc_kr.c | 22 +++++++++-------- .../libmbfl/filters/mbfilter_iso2022_kr.c | 12 +++++----- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 24 +++++-------------- .../libmbfl/filters/unicode_table_uhc.h | 11 ++++----- 4 files changed, 28 insertions(+), 41 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c index 69e6811922e30..522ef812d4e04 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c @@ -118,9 +118,9 @@ int mbfl_filt_conv_euckr_wchar(int c, mbfl_convert_filter *filter) } if (flag > 0 && c >= 0xa1 && c <= 0xfe) { if (flag == 1) { /* 1st: 0xa1..0xc6, 2nd: 0x41..0x7a, 0x81..0xfe */ - w = (c1 - 0xa1)*190 + c - 0x41; - ZEND_ASSERT(w < uhc2_ucs_table_size); - w = uhc2_ucs_table[w]; + w = (c1 - 0x81)*190 + c - 0x41; + ZEND_ASSERT(w < uhc1_ucs_table_size); + w = uhc1_ucs_table[w]; } else { /* 1st: 0xc7..0xc8,0xca..0xfe, 2nd: 0xa1..0xfe */ w = (c1 - 0xc7)*94 + c - 0xa1; ZEND_ASSERT(w < uhc3_ucs_table_size); @@ -216,23 +216,25 @@ static size_t mb_euckr_to_wchar(unsigned char **in, size_t *in_len, uint32_t *bu *out++ = c; } else if (((c >= 0xA1 && c <= 0xAC) || (c >= 0xB0 && c <= 0xFD)) && c != 0xC9 && p < e) { unsigned char c2 = *p++; + if (c2 < 0xA1 || c2 == 0xFF) { + *out++ = MBFL_BAD_INPUT; + continue; + } - if (c >= 0xA1 && c <= 0xC6 && c2 >= 0xA1 && c2 <= 0xFE) { - unsigned int w = (c - 0xA1)*190 + c2 - 0x41; - ZEND_ASSERT(w < uhc2_ucs_table_size); - w = uhc2_ucs_table[w]; + if (c <= 0xC6) { + unsigned int w = (c - 0x81)*190 + c2 - 0x41; + ZEND_ASSERT(w < uhc1_ucs_table_size); + w = uhc1_ucs_table[w]; if (!w) w = MBFL_BAD_INPUT; *out++ = w; - } else if (c >= 0xC7 && c <= 0xFE && c != 0xC9 && c2 >= 0xA1 && c2 <= 0xFE) { + } else { unsigned int w = (c - 0xC7)*94 + c2 - 0xA1; ZEND_ASSERT(w < uhc3_ucs_table_size); w = uhc3_ucs_table[w]; if (!w) w = MBFL_BAD_INPUT; *out++ = w; - } else { - *out++ = MBFL_BAD_INPUT; } } else { *out++ = MBFL_BAD_INPUT; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index c4b2bf0b9f1b9..592e673c12adc 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -119,9 +119,9 @@ int mbfl_filt_conv_2022kr_wchar(int c, mbfl_convert_filter *filter) if (flag > 0 && c > 0x20 && c < 0x7f) { if (flag == 1) { if (c1 != 0x22 || c <= 0x65) { - w = (c1 - 0x21)*190 + (c - 0x41) + 0x80; - ZEND_ASSERT(w < uhc2_ucs_table_size); - w = uhc2_ucs_table[w]; + w = (c1 - 1)*190 + (c - 0x41) + 0x80; + ZEND_ASSERT(w < uhc1_ucs_table_size); + w = uhc1_ucs_table[w]; } } else { w = (c1 - 0x47)*94 + c - 0x21; @@ -329,9 +329,9 @@ static size_t mb_iso2022kr_to_wchar(unsigned char **in, size_t *in_len, uint32_t if (c < 0x47) { if (c != 0x22 || c2 <= 0x65) { - w = (c - 0x21)*190 + (c2 - 0x41) + 0x80; - ZEND_ASSERT(w < uhc2_ucs_table_size); - w = uhc2_ucs_table[w]; + w = (c - 1)*190 + c2 - 0x41 + 0x80; + ZEND_ASSERT(w < uhc1_ucs_table_size); + w = uhc1_ucs_table[w]; } } else if (c != 0x49 && c <= 0x7D) { w = (c - 0x47)*94 + c2 - 0x21; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 310d03ade5996..2231fd3cb3243 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -114,16 +114,11 @@ int mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter) filter->status = 0; int c1 = filter->cache, w = 0; - if (c1 >= 0x81 && c1 <= 0xa0 && c >= 0x41 && c <= 0xfe) { + if (c1 >= 0x81 && c1 <= 0xc6 && c >= 0x41 && c <= 0xfe) { w = (c1 - 0x81)*190 + (c - 0x41); if (w >= 0 && w < uhc1_ucs_table_size) { w = uhc1_ucs_table[w]; } - } else if (c1 >= 0xa1 && c1 <= 0xc6 && c >= 0x41 && c <= 0xfe) { - w = (c1 - 0xa1)*190 + (c - 0x41); - if (w >= 0 && w < uhc2_ucs_table_size) { - w = uhc2_ucs_table[w]; - } } else if (c1 >= 0xc7 && c1 < 0xfe && c >= 0xa1 && c <= 0xfe) { w = (c1 - 0xc7)*94 + (c - 0xa1); if (w >= 0 && w < uhc3_ucs_table_size) { @@ -214,21 +209,14 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, } unsigned int w = 0; - if (c <= 0xA0) { + if (c <= 0xC6) { w = (c - 0x81)*190 + c2 - 0x41; - if (w < uhc1_ucs_table_size) { - w = uhc1_ucs_table[w]; - } - } else if (c <= 0xC6) { - w = (c - 0xA1)*190 + c2 - 0x41; - if (w < uhc2_ucs_table_size) { - w = uhc2_ucs_table[w]; - } + ZEND_ASSERT(w < uhc1_ucs_table_size); + w = uhc1_ucs_table[w]; } else if (c2 >= 0xA1) { w = (c - 0xC7)*94 + c2 - 0xA1; - if (w < uhc3_ucs_table_size) { - w = uhc3_ucs_table[w]; - } + ZEND_ASSERT(w < uhc3_ucs_table_size); + w = uhc3_ucs_table[w]; } if (!w) { w = MBFL_BAD_INPUT; diff --git a/ext/mbstring/libmbfl/filters/unicode_table_uhc.h b/ext/mbstring/libmbfl/filters/unicode_table_uhc.h index a205d1fedf9b1..737d7921619eb 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_uhc.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_uhc.h @@ -790,12 +790,8 @@ const unsigned short uhc1_ucs_table[] = { 0xc876,0xc877,0xc879,0xc87b,0xc87c,0xc87d,0xc87e,0xc87f, 0xc882,0xc884,0xc888,0xc889,0xc88a,0xc88e,0xc88f,0xc890, 0xc891,0xc892,0xc893,0xc895,0xc896,0xc897,0xc898,0xc899, -0xc89a,0xc89b,0xc89c,0xc89e,0xc8a0,0xc8a2,0xc8a3,0xc8a4 -}; - -const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); +0xc89a,0xc89b,0xc89c,0xc89e,0xc8a0,0xc8a2,0xc8a3,0xc8a4, -const unsigned short uhc2_ucs_table[] = { 0xc8a5,0xc8a6,0xc8a7,0xc8a9,0xc8aa,0xc8ab,0xc8ac,0xc8ad, 0xc8ae,0xc8af,0xc8b0,0xc8b1,0xc8b2,0xc8b3,0xc8b4,0xc8b5, 0xc8b6,0xc8b7,0xc8b8,0xc8b9,0xc8ba,0xc8bb,0xc8be,0xc8bf, @@ -1698,9 +1694,10 @@ const unsigned short uhc2_ucs_table[] = { 0xd391,0xd398,0xd399,0xd39c,0xd3a0,0xd3a8,0xd3a9,0xd3ab, 0xd3ad,0xd3b4,0xd3b8,0xd3bc,0xd3c4,0xd3c5,0xd3c8,0xd3c9, 0xd3d0,0xd3d8,0xd3e1,0xd3e3,0xd3ec,0xd3ed,0xd3f0,0xd3f4, -0xd3fc,0xd3fd,0xd3ff,0xd401}; +0xd3fc,0xd3fd,0xd3ff,0xd401 +}; -const int uhc2_ucs_table_size = (sizeof(uhc2_ucs_table)/sizeof(unsigned short)); +const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); const unsigned short uhc3_ucs_table[] = { 0xd408,0xd41d,0xd440,0xd444,0xd45c,0xd460,0xd464,0xd46d, From b15d0a9ba50c27c426571b1f5157786975e935de Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 20:43:05 +0200 Subject: [PATCH 091/895] Remove redundant bounds check for lookup in BIG5 conversion table For CP950 conversion, the bounds check is needed before doing a lookup in big5_ucs_table, since the first byte of a CP950 multibyte character can be up to 0xFE. For BIG5, we only accept 1st bytes up to 0xF9, and it is not possible for the lookup to go out of bounds. --- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index 58f89d1b5759e..b83cae36b0c1a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -400,8 +400,9 @@ static size_t mb_big5_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf unsigned char c2 = *p++; if ((c2 >= 0x40 && c2 <= 0x7E) || (c2 >= 0xA1 && c2 <= 0xFE)) { - unsigned int w = ((c - 0xA1)*157) + c2 - ((c2 <= 0x7E) ? 0x40 : 0xA1 - 0x3F); - w = (w < big5_ucs_table_size) ? big5_ucs_table[w] : 0; + unsigned int w = (c - 0xA1)*157 + c2 - ((c2 <= 0x7E) ? 0x40 : 0xA1 - 0x3F); + ZEND_ASSERT(w < big5_ucs_table_size); + w = big5_ucs_table[w]; if (!w) w = MBFL_BAD_INPUT; *out++ = w; From 54767b10472549e0a4b26288534d41f114ab8029 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 28 Dec 2022 17:03:23 +0000 Subject: [PATCH 092/895] Manually handle int ZPP for posix_isatty()/posix_ttyname() --- ext/posix/posix.c | 38 +++++----- ext/posix/tests/posix_isatty_manual_zpp.phpt | 71 +++++++++++++++++++ ext/posix/tests/posix_ttyname_manual_zpp.phpt | 71 +++++++++++++++++++ ext/posix/tests/posix_ttyname_variation1.phpt | 37 ---------- ext/posix/tests/posix_ttyname_variation2.phpt | 34 --------- ext/posix/tests/posix_ttyname_variation3.phpt | 41 ----------- ext/posix/tests/posix_ttyname_variation5.phpt | 30 -------- ext/posix/tests/posix_ttyname_variation6.phpt | 43 ----------- ext/posix/tests/posix_ttyname_variation7.phpt | 38 ---------- 9 files changed, 163 insertions(+), 240 deletions(-) create mode 100644 ext/posix/tests/posix_isatty_manual_zpp.phpt create mode 100644 ext/posix/tests/posix_ttyname_manual_zpp.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation1.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation2.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation3.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation5.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation6.phpt delete mode 100644 ext/posix/tests/posix_ttyname_variation7.phpt diff --git a/ext/posix/posix.c b/ext/posix/posix.c index ce40a050a1683..f48f3535f659d 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -417,7 +417,7 @@ PHP_FUNCTION(posix_ctermid) /* }}} */ /* Checks if the provides resource is a stream and if it provides a file descriptor */ -static int php_posix_stream_get_fd(zval *zfp, int *fd) /* {{{ */ +static int php_posix_stream_get_fd(zval *zfp, zend_long *fd) /* {{{ */ { php_stream *stream; @@ -444,7 +444,7 @@ PHP_FUNCTION(posix_ttyname) { zval *z_fd; char *p; - int fd; + zend_long fd; #if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX) zend_long buflen; #endif @@ -453,14 +453,16 @@ PHP_FUNCTION(posix_ttyname) Z_PARAM_ZVAL(z_fd) ZEND_PARSE_PARAMETERS_END(); - switch (Z_TYPE_P(z_fd)) { - case IS_RESOURCE: - if (!php_posix_stream_get_fd(z_fd, &fd)) { - RETURN_FALSE; - } - break; - default: + if (Z_TYPE_P(z_fd) == IS_RESOURCE) { + if (!php_posix_stream_get_fd(z_fd, &fd)) { + RETURN_FALSE; + } + } else { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", + zend_zval_type_name(z_fd)); fd = zval_get_long(z_fd); + } } #if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX) buflen = sysconf(_SC_TTY_NAME_MAX); @@ -490,20 +492,22 @@ PHP_FUNCTION(posix_ttyname) PHP_FUNCTION(posix_isatty) { zval *z_fd; - int fd; + zend_long fd; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(z_fd) ZEND_PARSE_PARAMETERS_END(); - switch (Z_TYPE_P(z_fd)) { - case IS_RESOURCE: - if (!php_posix_stream_get_fd(z_fd, &fd)) { - RETURN_FALSE; - } - break; - default: + if (Z_TYPE_P(z_fd) == IS_RESOURCE) { + if (!php_posix_stream_get_fd(z_fd, &fd)) { + RETURN_FALSE; + } + } else { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", + zend_zval_type_name(z_fd)); fd = zval_get_long(z_fd); + } } if (isatty(fd)) { diff --git a/ext/posix/tests/posix_isatty_manual_zpp.phpt b/ext/posix/tests/posix_isatty_manual_zpp.phpt new file mode 100644 index 0000000000000..6a20801af208d --- /dev/null +++ b/ext/posix/tests/posix_isatty_manual_zpp.phpt @@ -0,0 +1,71 @@ +--TEST-- +posix_isatty(): manually validating int ZPP param +--EXTENSIONS-- +posix +gmp +--FILE-- + null, + 'false' => false, + 'true' => true, + 'int' => 1, + 'float no decimal' => 1.0, + 'float decimal' => 5.5, + 'string int' => "1", + 'string float no decimal' => "1.0", + 'string float decimal' => "5.5", + 'string' => "Hello", + 'array' => [], + 'class' => new stdClass(), + 'stringable class' => new classWithToString(), + 'int castable class' => gmp_init(1), +]; + +foreach ($types as $description => $type) { + echo $description, ':'; + var_dump(posix_isatty($type)); +} +?> +--EXPECTF-- +null: +Deprecated: posix_isatty(): Passing null to parameter #1 ($file_descriptor) of type int is deprecated in %s on line %d +bool(false) +false:bool(false) +true:bool(false) +int:bool(false) +float no decimal:bool(false) +float decimal: +Deprecated: Implicit conversion from float 5.5 to int loses precision in %s on line %d +bool(false) +string int:bool(false) +string float no decimal:bool(false) +string float decimal: +Deprecated: Implicit conversion from float-string "5.5" to int loses precision in %s on line %d +bool(false) +string: +Warning: posix_isatty(): Argument #1 ($file_descriptor) must be of type int|resource, string given in %s on line %d +bool(false) +array: +Warning: posix_isatty(): Argument #1 ($file_descriptor) must be of type int|resource, array given in %s on line %d +bool(false) +class: +Warning: posix_isatty(): Argument #1 ($file_descriptor) must be of type int|resource, stdClass given in %s on line %d + +Warning: Object of class stdClass could not be converted to int in %s on line %d +bool(false) +stringable class: +Warning: posix_isatty(): Argument #1 ($file_descriptor) must be of type int|resource, classWithToString given in %s on line %d + +Warning: Object of class classWithToString could not be converted to int in %s on line %d +bool(false) +int castable class: +Warning: posix_isatty(): Argument #1 ($file_descriptor) must be of type int|resource, GMP given in %s on line %d +bool(false) diff --git a/ext/posix/tests/posix_ttyname_manual_zpp.phpt b/ext/posix/tests/posix_ttyname_manual_zpp.phpt new file mode 100644 index 0000000000000..0fd24efd8f81b --- /dev/null +++ b/ext/posix/tests/posix_ttyname_manual_zpp.phpt @@ -0,0 +1,71 @@ +--TEST-- +posix_ttyname(): manually validating int ZPP param +--EXTENSIONS-- +posix +gmp +--FILE-- + null, + 'false' => false, + 'true' => true, + 'int' => 1, + 'float no decimal' => 1.0, + 'float decimal' => 5.5, + 'string int' => "1", + 'string float no decimal' => "1.0", + 'string float decimal' => "5.5", + 'string' => "Hello", + 'array' => [], + 'class' => new stdClass(), + 'stringable class' => new classWithToString(), + 'int castable class' => gmp_init(1), +]; + +foreach ($types as $description => $type) { + echo $description, ':'; + var_dump(posix_ttyname($type)); +} +?> +--EXPECTF-- +null: +Deprecated: posix_ttyname(): Passing null to parameter #1 ($file_descriptor) of type int is deprecated in %s on line %d +bool(false) +false:bool(false) +true:bool(false) +int:bool(false) +float no decimal:bool(false) +float decimal: +Deprecated: Implicit conversion from float 5.5 to int loses precision in %s on line %d +bool(false) +string int:bool(false) +string float no decimal:bool(false) +string float decimal: +Deprecated: Implicit conversion from float-string "5.5" to int loses precision in %s on line %d +bool(false) +string: +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be of type int|resource, string given in %s on line %d +bool(false) +array: +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be of type int|resource, array given in %s on line %d +bool(false) +class: +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be of type int|resource, stdClass given in %s on line %d + +Warning: Object of class stdClass could not be converted to int in %s on line %d +bool(false) +stringable class: +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be of type int|resource, classWithToString given in %s on line %d + +Warning: Object of class classWithToString could not be converted to int in %s on line %d +bool(false) +int castable class: +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be of type int|resource, GMP given in %s on line %d +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation1.phpt b/ext/posix/tests/posix_ttyname_variation1.phpt deleted file mode 100644 index 60357e4e1779f..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation1.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with array values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - 'one', 2 => 'two'); - -$variation_array = array( - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with array values *** -bool(false) -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation2.phpt b/ext/posix/tests/posix_ttyname_variation2.phpt deleted file mode 100644 index 7a51cff3a5df7..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation2.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with boolean values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with boolean values *** -bool(false) -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation3.phpt b/ext/posix/tests/posix_ttyname_variation3.phpt deleted file mode 100644 index 4fab6f104b648..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation3.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with emptyUnsetUndefNull values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation5.phpt b/ext/posix/tests/posix_ttyname_variation5.phpt deleted file mode 100644 index b5290ed2c8fc3..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation5.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with int values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - 12345, - 'int -12345' => -2345, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with int values *** -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt deleted file mode 100644 index 9ecf5ca41516c..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with object values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** - -Warning: Object of class classWithToString could not be converted to int in %s on line %d -bool(false) - -Warning: Object of class classWithoutToString could not be converted to int in %s on line %d -bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation7.phpt b/ext/posix/tests/posix_ttyname_variation7.phpt deleted file mode 100644 index a955bba182f77..0000000000000 --- a/ext/posix/tests/posix_ttyname_variation7.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test function posix_ttyname() by substituting argument 1 with string values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---EXTENSIONS-- -posix ---FILE-- - "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_ttyname( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with string values *** -bool(false) -bool(false) -bool(false) -bool(false) From 31e7d6ef05b86b9414bfd7d8ab85a5270f22361e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 30 Dec 2022 15:02:59 +0000 Subject: [PATCH 093/895] Check that int file descriptor is valid for posix_(isatty|ttyname) --- ext/posix/posix.c | 9 +++++++ .../tests/posix_isatty_value_errors.phpt | 23 ++++++++++++++++ .../tests/posix_ttyname_value_errors.phpt | 26 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 ext/posix/tests/posix_isatty_value_errors.phpt create mode 100644 ext/posix/tests/posix_ttyname_value_errors.phpt diff --git a/ext/posix/posix.c b/ext/posix/posix.c index f48f3535f659d..bfdb0fa4bbc4a 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -463,6 +463,11 @@ PHP_FUNCTION(posix_ttyname) zend_zval_type_name(z_fd)); fd = zval_get_long(z_fd); } + /* fd must fit in an int and be positive */ + if (fd < 0 || fd > INT_MAX) { + php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be between 0 and %d", INT_MAX); + RETURN_FALSE; + } } #if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX) buflen = sysconf(_SC_TTY_NAME_MAX); @@ -510,6 +515,10 @@ PHP_FUNCTION(posix_isatty) } } + /* A valid file descriptor must fit in an int and be positive */ + if (fd < 0 || fd > INT_MAX) { + RETURN_FALSE; + } if (isatty(fd)) { RETURN_TRUE; } else { diff --git a/ext/posix/tests/posix_isatty_value_errors.phpt b/ext/posix/tests/posix_isatty_value_errors.phpt new file mode 100644 index 0000000000000..19dfe62c93019 --- /dev/null +++ b/ext/posix/tests/posix_isatty_value_errors.phpt @@ -0,0 +1,23 @@ +--TEST-- +posix_isatty(): errors for invalid file descriptors +--EXTENSIONS-- +posix +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_value_errors.phpt b/ext/posix/tests/posix_ttyname_value_errors.phpt new file mode 100644 index 0000000000000..0f0c853458fbf --- /dev/null +++ b/ext/posix/tests/posix_ttyname_value_errors.phpt @@ -0,0 +1,26 @@ +--TEST-- +posix_ttyname(): errors for invalid file descriptors +--EXTENSIONS-- +posix +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d +bool(false) + +Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d +bool(false) From 703725e43b6754ee46064afb616c6df1ca86dd4c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 31 Dec 2022 07:22:54 +0200 Subject: [PATCH 094/895] Optimize conversion of CP936 to Unicode In the previous commit, the branch in mb_strlen which implements the function using the mblen_table (when one is available) was removed. This made mb_strlen faster for just about every legacy text encoding which had an mblen_table... except for CP936, which became much slower. This indicated that our decoding filter for CP936 was slow. I checked and found iterating over the PUA table was a major bottleneck. After optimizing that bottleneck out, benchmarks for text encoding conversion speed were as follows: CP936, short - to UTF-8 - faster by 10.44% (0.0003 vs 0.0003) CP936, short - to UTF-16BE - faster by 11.45% (0.0003 vs 0.0003) CP936, medium - to UTF-8 - faster by 139.09% (0.0012 vs 0.0005) CP936, medium - to UTF-16BE - faster by 140.34% (0.0013 vs 0.0005) CP936, long - to UTF-16BE - faster by 215.88% (0.0538 vs 0.0170) CP936, long - to UTF-8 - faster by 232.41% (0.0528 vs 0.0159) This does not fully express how much faster the CP936 decoder is now, since these conversion benchmarks are not only measuring the speed of decoding CP936, but then also re-encoding the codepoints as UTF-8 or UTF-16. For functions like mb_strlen, which just need to decode but not re-encode the text, the gain in performance is much larger. --- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 42 +- .../libmbfl/filters/unicode_table_cp936.h | 467 +++++++++++++----- 2 files changed, 366 insertions(+), 143 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 40ae8c86f9119..b3c6d1a6f2807 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -291,37 +291,45 @@ static size_t mb_cp936_to_wchar(unsigned char **in, size_t *in_len, uint32_t *bu } unsigned char c2 = *p++; + if (c2 < 0x40 || c2 == 0x7F || c2 == 0xFF) { + *out++ = MBFL_BAD_INPUT; + continue; + } - if (((c >= 0xAA && c <= 0xAF) || (c >= 0xF8 && c <= 0xFE)) && (c2 >= 0xA1 && c2 <= 0xFE)) { + if (((c >= 0xAA && c <= 0xAF) || (c >= 0xF8 && c <= 0xFE)) && c2 >= 0xA1) { /* UDA part 1, 2: U+E000-U+E4C5 */ *out++ = 94*(c >= 0xF8 ? c - 0xF2 : c - 0xAA) + (c2 - 0xA1) + 0xE000; - } else if (c >= 0xA1 && c <= 0xA7 && c2 >= 0x40 && c2 < 0xA1 && c2 != 0x7F) { + } else if (c >= 0xA1 && c <= 0xA7 && c2 < 0xA1) { /* UDA part 3: U+E4C6-U+E765*/ *out++ = 96*(c - 0xA1) + c2 - (c2 >= 0x80 ? 0x41 : 0x40) + 0xE4C6; } else { - unsigned int w = (c << 8) | c2; - - if ((w >= 0xA2AB && w <= 0xA9FE) || (w >= 0xD7FA && w <= 0xD7FE) || (w >= 0xFE50 && w <= 0xFEA0)) { - for (int k = 0; k < mbfl_cp936_pua_tbl_max; k++) { - if (w >= mbfl_cp936_pua_tbl[k][2] && w <= mbfl_cp936_pua_tbl[k][2] + mbfl_cp936_pua_tbl[k][1] - mbfl_cp936_pua_tbl[k][0]) { - *out++ = w - mbfl_cp936_pua_tbl[k][2] + mbfl_cp936_pua_tbl[k][0]; - goto next_iteration; + unsigned int w = (c - 0x81)*192 + c2 - 0x40; /* Convert c, c2 into GB 2312 table lookup index */ + + /* For CP936 and GB18030, certain GB 2312 byte combinations are mapped to PUA codepoints, + * whereas the same combinations aren't mapped to any codepoint for HZ and EUC-CN + * To avoid duplicating the entire GB 2312 -> Unicode lookup table, we have three + * auxiliary tables which are consulted instead for specific ranges of lookup indices */ + if (w >= 0x192B) { + if (w <= 0x1EBE) { + *out++ = cp936_pua_tbl1[w - 0x192B]; + continue; + } else if (w >= 0x413A) { + if (w <= 0x413E) { + *out++ = cp936_pua_tbl2[w - 0x413A]; + continue; + } else if (w >= 0x5DD0 && w <= 0x5E20) { + *out++ = cp936_pua_tbl3[w - 0x5DD0]; + continue; } } } - if (c < 0xFF && c > 0x80 && c2 >= 0x40 && c2 < 0xFF && c2 != 0x7F) { - w = (c - 0x81)*192 + c2 - 0x40; - ZEND_ASSERT(w < cp936_ucs_table_size); - *out++ = cp936_ucs_table[w]; - } else { - *out++ = MBFL_BAD_INPUT; - } + ZEND_ASSERT(w < cp936_ucs_table_size); + *out++ = cp936_ucs_table[w]; } } else { *out++ = 0xF8F5; } -next_iteration: ; } *in_len = e - p; diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp936.h b/ext/mbstring/libmbfl/filters/unicode_table_cp936.h index 754a6ec89c1c1..c225c586ffb35 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp936.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_cp936.h @@ -30,8 +30,9 @@ */ #ifdef UNICODE_TABLE_CP936_DEF +/* CP936 -> Unicode, but without PUA codepoints used in CP936 and GB18030 */ const unsigned short cp936_ucs_table[] = { -/* 0x8100 */ +/* 0x8140 */ 0x4e02,0x4e04,0x4e05,0x4e06,0x4e0f,0x4e12,0x4e17,0x4e1f, 0x4e20,0x4e21,0x4e23,0x4e26,0x4e29,0x4e2e,0x4e2f,0x4e31, 0x4e33,0x4e35,0x4e37,0x4e3c,0x4e40,0x4e41,0x4e42,0x4e44, @@ -56,7 +57,7 @@ const unsigned short cp936_ucs_table[] = { 0x4f7d,0x4f80,0x4f81,0x4f82,0x4f85,0x4f86,0x4f87,0x4f8a, 0x4f8c,0x4f8e,0x4f90,0x4f92,0x4f93,0x4f95,0x4f96,0x4f98, 0x4f99,0x4f9a,0x4f9c,0x4f9e,0x4f9f,0x4fa1,0x4fa2,0x0000, -/* 0x8200 */ +/* 0x8240 */ 0x4fa4,0x4fab,0x4fad,0x4fb0,0x4fb1,0x4fb2,0x4fb3,0x4fb4, 0x4fb6,0x4fb7,0x4fb8,0x4fb9,0x4fba,0x4fbb,0x4fbc,0x4fbd, 0x4fbe,0x4fc0,0x4fc1,0x4fc2,0x4fc6,0x4fc7,0x4fc8,0x4fc9, @@ -81,7 +82,7 @@ const unsigned short cp936_ucs_table[] = { 0x509d,0x509e,0x509f,0x50a0,0x50a1,0x50a2,0x50a4,0x50a6, 0x50aa,0x50ab,0x50ad,0x50ae,0x50af,0x50b0,0x50b1,0x50b3, 0x50b4,0x50b5,0x50b6,0x50b7,0x50b8,0x50b9,0x50bc,0x0000, -/* 0x8300 */ +/* 0x8340 */ 0x50bd,0x50be,0x50bf,0x50c0,0x50c1,0x50c2,0x50c3,0x50c4, 0x50c5,0x50c6,0x50c7,0x50c8,0x50c9,0x50ca,0x50cb,0x50cc, 0x50cd,0x50ce,0x50d0,0x50d1,0x50d2,0x50d3,0x50d4,0x50d5, @@ -106,7 +107,7 @@ const unsigned short cp936_ucs_table[] = { 0x51ad,0x51ae,0x51b4,0x51b8,0x51b9,0x51ba,0x51be,0x51bf, 0x51c1,0x51c2,0x51c3,0x51c5,0x51c8,0x51ca,0x51cd,0x51ce, 0x51d0,0x51d2,0x51d3,0x51d4,0x51d5,0x51d6,0x51d7,0x0000, -/* 0x8400 */ +/* 0x8440 */ 0x51d8,0x51d9,0x51da,0x51dc,0x51de,0x51df,0x51e2,0x51e3, 0x51e5,0x51e6,0x51e7,0x51e8,0x51e9,0x51ea,0x51ec,0x51ee, 0x51f1,0x51f2,0x51f4,0x51f7,0x51fe,0x5204,0x5205,0x5209, @@ -131,7 +132,7 @@ const unsigned short cp936_ucs_table[] = { 0x52ee,0x52ef,0x52f1,0x52f2,0x52f3,0x52f4,0x52f5,0x52f6, 0x52f7,0x52f8,0x52fb,0x52fc,0x52fd,0x5301,0x5302,0x5303, 0x5304,0x5307,0x5309,0x530a,0x530b,0x530c,0x530e,0x0000, -/* 0x8500 */ +/* 0x8540 */ 0x5311,0x5312,0x5313,0x5314,0x5318,0x531b,0x531c,0x531e, 0x531f,0x5322,0x5324,0x5325,0x5327,0x5328,0x5329,0x532b, 0x532c,0x532d,0x532f,0x5330,0x5331,0x5332,0x5333,0x5334, @@ -156,7 +157,7 @@ const unsigned short cp936_ucs_table[] = { 0x5470,0x5474,0x5479,0x547a,0x547e,0x547f,0x5481,0x5483, 0x5485,0x5487,0x5488,0x5489,0x548a,0x548d,0x5491,0x5493, 0x5497,0x5498,0x549c,0x549e,0x549f,0x54a0,0x54a1,0x0000, -/* 0x8600 */ +/* 0x8640 */ 0x54a2,0x54a5,0x54ae,0x54b0,0x54b2,0x54b5,0x54b6,0x54b7, 0x54b9,0x54ba,0x54bc,0x54be,0x54c3,0x54c5,0x54ca,0x54cb, 0x54d6,0x54d8,0x54db,0x54e0,0x54e1,0x54e2,0x54e3,0x54e4, @@ -181,7 +182,7 @@ const unsigned short cp936_ucs_table[] = { 0x55da,0x55db,0x55de,0x55e0,0x55e2,0x55e7,0x55e9,0x55ed, 0x55ee,0x55f0,0x55f1,0x55f4,0x55f6,0x55f8,0x55f9,0x55fa, 0x55fb,0x55fc,0x55ff,0x5602,0x5603,0x5604,0x5605,0x0000, -/* 0x8700 */ +/* 0x8740 */ 0x5606,0x5607,0x560a,0x560b,0x560d,0x5610,0x5611,0x5612, 0x5613,0x5614,0x5615,0x5616,0x5617,0x5619,0x561a,0x561c, 0x561d,0x5620,0x5621,0x5622,0x5625,0x5626,0x5628,0x5629, @@ -206,7 +207,7 @@ const unsigned short cp936_ucs_table[] = { 0x56ea,0x56ec,0x56ee,0x56ef,0x56f2,0x56f3,0x56f6,0x56f7, 0x56f8,0x56fb,0x56fc,0x5700,0x5701,0x5702,0x5705,0x5707, 0x570b,0x570c,0x570d,0x570e,0x570f,0x5710,0x5711,0x0000, -/* 0x8800 */ +/* 0x8840 */ 0x5712,0x5713,0x5714,0x5715,0x5716,0x5717,0x5718,0x5719, 0x571a,0x571b,0x571d,0x571e,0x5720,0x5721,0x5722,0x5724, 0x5725,0x5726,0x5727,0x572b,0x5731,0x5732,0x5734,0x5735, @@ -231,7 +232,7 @@ const unsigned short cp936_ucs_table[] = { 0x5823,0x5825,0x5826,0x5827,0x5828,0x5829,0x582b,0x582c, 0x582d,0x582e,0x582f,0x5831,0x5832,0x5833,0x5834,0x5836, 0x5837,0x5838,0x5839,0x583a,0x583b,0x583c,0x583d,0x0000, -/* 0x8900 */ +/* 0x8940 */ 0x583e,0x583f,0x5840,0x5841,0x5842,0x5843,0x5845,0x5846, 0x5847,0x5848,0x5849,0x584a,0x584b,0x584e,0x584f,0x5850, 0x5852,0x5853,0x5855,0x5856,0x5857,0x5859,0x585a,0x585b, @@ -256,7 +257,7 @@ const unsigned short cp936_ucs_table[] = { 0x590e,0x5910,0x5911,0x5912,0x5913,0x5917,0x5918,0x591b, 0x591d,0x591e,0x5920,0x5921,0x5922,0x5923,0x5926,0x5928, 0x592c,0x5930,0x5932,0x5933,0x5935,0x5936,0x593b,0x0000, -/* 0x8a00 */ +/* 0x8A40 */ 0x593d,0x593e,0x593f,0x5940,0x5943,0x5945,0x5946,0x594a, 0x594c,0x594d,0x5950,0x5952,0x5953,0x5959,0x595b,0x595c, 0x595d,0x595e,0x595f,0x5961,0x5963,0x5964,0x5966,0x5967, @@ -281,7 +282,7 @@ const unsigned short cp936_ucs_table[] = { 0x5a45,0x5a47,0x5a48,0x5a4b,0x5a4c,0x5a4d,0x5a4e,0x5a4f, 0x5a50,0x5a51,0x5a52,0x5a53,0x5a54,0x5a56,0x5a57,0x5a58, 0x5a59,0x5a5b,0x5a5c,0x5a5d,0x5a5e,0x5a5f,0x5a60,0x0000, -/* 0x8b00 */ +/* 0x8B40 */ 0x5a61,0x5a63,0x5a64,0x5a65,0x5a66,0x5a68,0x5a69,0x5a6b, 0x5a6c,0x5a6d,0x5a6e,0x5a6f,0x5a70,0x5a71,0x5a72,0x5a73, 0x5a78,0x5a79,0x5a7b,0x5a7c,0x5a7d,0x5a7e,0x5a80,0x5a81, @@ -306,7 +307,7 @@ const unsigned short cp936_ucs_table[] = { 0x5b2d,0x5b2e,0x5b2f,0x5b30,0x5b31,0x5b33,0x5b35,0x5b36, 0x5b38,0x5b39,0x5b3a,0x5b3b,0x5b3c,0x5b3d,0x5b3e,0x5b3f, 0x5b41,0x5b42,0x5b43,0x5b44,0x5b45,0x5b46,0x5b47,0x0000, -/* 0x8c00 */ +/* 0x8C40 */ 0x5b48,0x5b49,0x5b4a,0x5b4b,0x5b4c,0x5b4d,0x5b4e,0x5b4f, 0x5b52,0x5b56,0x5b5e,0x5b60,0x5b61,0x5b67,0x5b68,0x5b6b, 0x5b6d,0x5b6e,0x5b6f,0x5b72,0x5b74,0x5b76,0x5b77,0x5b78, @@ -331,7 +332,7 @@ const unsigned short cp936_ucs_table[] = { 0x5c83,0x5c84,0x5c85,0x5c86,0x5c87,0x5c89,0x5c8a,0x5c8b, 0x5c8e,0x5c8f,0x5c92,0x5c93,0x5c95,0x5c9d,0x5c9e,0x5c9f, 0x5ca0,0x5ca1,0x5ca4,0x5ca5,0x5ca6,0x5ca7,0x5ca8,0x0000, -/* 0x8d00 */ +/* 0x8D40 */ 0x5caa,0x5cae,0x5caf,0x5cb0,0x5cb2,0x5cb4,0x5cb6,0x5cb9, 0x5cba,0x5cbb,0x5cbc,0x5cbe,0x5cc0,0x5cc2,0x5cc3,0x5cc5, 0x5cc6,0x5cc7,0x5cc8,0x5cc9,0x5cca,0x5ccc,0x5ccd,0x5cce, @@ -356,7 +357,7 @@ const unsigned short cp936_ucs_table[] = { 0x5d88,0x5d89,0x5d8a,0x5d8b,0x5d8c,0x5d8d,0x5d8e,0x5d8f, 0x5d90,0x5d91,0x5d92,0x5d93,0x5d94,0x5d95,0x5d96,0x5d97, 0x5d98,0x5d9a,0x5d9b,0x5d9c,0x5d9e,0x5d9f,0x5da0,0x0000, -/* 0x8e00 */ +/* 0x8E40 */ 0x5da1,0x5da2,0x5da3,0x5da4,0x5da5,0x5da6,0x5da7,0x5da8, 0x5da9,0x5daa,0x5dab,0x5dac,0x5dad,0x5dae,0x5daf,0x5db0, 0x5db1,0x5db2,0x5db3,0x5db4,0x5db5,0x5db6,0x5db8,0x5db9, @@ -381,7 +382,7 @@ const unsigned short cp936_ucs_table[] = { 0x5ea4,0x5ea8,0x5ea9,0x5eaa,0x5eab,0x5eac,0x5eae,0x5eaf, 0x5eb0,0x5eb1,0x5eb2,0x5eb4,0x5eba,0x5ebb,0x5ebc,0x5ebd, 0x5ebf,0x5ec0,0x5ec1,0x5ec2,0x5ec3,0x5ec4,0x5ec5,0x0000, -/* 0x8f00 */ +/* 0x8F40 */ 0x5ec6,0x5ec7,0x5ec8,0x5ecb,0x5ecc,0x5ecd,0x5ece,0x5ecf, 0x5ed0,0x5ed4,0x5ed5,0x5ed7,0x5ed8,0x5ed9,0x5eda,0x5edc, 0x5edd,0x5ede,0x5edf,0x5ee0,0x5ee1,0x5ee2,0x5ee3,0x5ee4, @@ -406,7 +407,7 @@ const unsigned short cp936_ucs_table[] = { 0x5fda,0x5fdb,0x5fdc,0x5fde,0x5fdf,0x5fe2,0x5fe3,0x5fe5, 0x5fe6,0x5fe8,0x5fe9,0x5fec,0x5fef,0x5ff0,0x5ff2,0x5ff3, 0x5ff4,0x5ff6,0x5ff7,0x5ff9,0x5ffa,0x5ffc,0x6007,0x0000, -/* 0x9000 */ +/* 0x9040 */ 0x6008,0x6009,0x600b,0x600c,0x6010,0x6011,0x6013,0x6017, 0x6018,0x601a,0x601e,0x601f,0x6022,0x6023,0x6024,0x602c, 0x602d,0x602e,0x6030,0x6031,0x6032,0x6033,0x6034,0x6036, @@ -431,7 +432,7 @@ const unsigned short cp936_ucs_table[] = { 0x612f,0x6130,0x6131,0x6132,0x6133,0x6134,0x6135,0x6136, 0x6137,0x6138,0x6139,0x613a,0x613b,0x613c,0x613d,0x613e, 0x6140,0x6141,0x6142,0x6143,0x6144,0x6145,0x6146,0x0000, -/* 0x9100 */ +/* 0x9140 */ 0x6147,0x6149,0x614b,0x614d,0x614f,0x6150,0x6152,0x6153, 0x6154,0x6156,0x6157,0x6158,0x6159,0x615a,0x615b,0x615c, 0x615e,0x615f,0x6160,0x6161,0x6163,0x6164,0x6165,0x6166, @@ -456,7 +457,7 @@ const unsigned short cp936_ucs_table[] = { 0x6223,0x6226,0x6227,0x6228,0x6229,0x622b,0x622d,0x622f, 0x6230,0x6231,0x6232,0x6235,0x6236,0x6238,0x6239,0x623a, 0x623b,0x623c,0x6242,0x6244,0x6245,0x6246,0x624a,0x0000, -/* 0x9200 */ +/* 0x9240 */ 0x624f,0x6250,0x6255,0x6256,0x6257,0x6259,0x625a,0x625c, 0x625d,0x625e,0x625f,0x6260,0x6261,0x6262,0x6264,0x6265, 0x6268,0x6271,0x6272,0x6274,0x6275,0x6277,0x6278,0x627a, @@ -481,7 +482,7 @@ const unsigned short cp936_ucs_table[] = { 0x6395,0x6397,0x6399,0x639a,0x639b,0x639c,0x639d,0x639e, 0x639f,0x63a1,0x63a4,0x63a6,0x63ab,0x63af,0x63b1,0x63b2, 0x63b5,0x63b6,0x63b9,0x63bb,0x63bd,0x63bf,0x63c0,0x0000, -/* 0x9300 */ +/* 0x9340 */ 0x63c1,0x63c2,0x63c3,0x63c5,0x63c7,0x63c8,0x63ca,0x63cb, 0x63cc,0x63d1,0x63d3,0x63d4,0x63d5,0x63d7,0x63d8,0x63d9, 0x63da,0x63db,0x63dc,0x63dd,0x63df,0x63e2,0x63e4,0x63e5, @@ -506,7 +507,7 @@ const unsigned short cp936_ucs_table[] = { 0x64b9,0x64bb,0x64bd,0x64be,0x64bf,0x64c1,0x64c3,0x64c4, 0x64c6,0x64c7,0x64c8,0x64c9,0x64ca,0x64cb,0x64cc,0x64cf, 0x64d1,0x64d3,0x64d4,0x64d5,0x64d6,0x64d9,0x64da,0x0000, -/* 0x9400 */ +/* 0x9440 */ 0x64db,0x64dc,0x64dd,0x64df,0x64e0,0x64e1,0x64e3,0x64e5, 0x64e7,0x64e8,0x64e9,0x64ea,0x64eb,0x64ec,0x64ed,0x64ee, 0x64ef,0x64f0,0x64f1,0x64f2,0x64f3,0x64f4,0x64f5,0x64f6, @@ -531,7 +532,7 @@ const unsigned short cp936_ucs_table[] = { 0x65c7,0x65c8,0x65c9,0x65ca,0x65cd,0x65d0,0x65d1,0x65d3, 0x65d4,0x65d5,0x65d8,0x65d9,0x65da,0x65db,0x65dc,0x65dd, 0x65de,0x65df,0x65e1,0x65e3,0x65e4,0x65ea,0x65eb,0x0000, -/* 0x9500 */ +/* 0x9540 */ 0x65f2,0x65f3,0x65f4,0x65f5,0x65f8,0x65f9,0x65fb,0x65fc, 0x65fd,0x65fe,0x65ff,0x6601,0x6604,0x6605,0x6607,0x6608, 0x6609,0x660b,0x660d,0x6610,0x6611,0x6612,0x6616,0x6617, @@ -556,7 +557,7 @@ const unsigned short cp936_ucs_table[] = { 0x66e1,0x66e2,0x66e3,0x66e4,0x66e5,0x66e7,0x66e8,0x66ea, 0x66eb,0x66ec,0x66ed,0x66ee,0x66ef,0x66f1,0x66f5,0x66f6, 0x66f8,0x66fa,0x66fb,0x66fd,0x6701,0x6702,0x6703,0x0000, -/* 0x9600 */ +/* 0x9640 */ 0x6704,0x6705,0x6706,0x6707,0x670c,0x670e,0x670f,0x6711, 0x6712,0x6713,0x6716,0x6718,0x6719,0x671a,0x671c,0x671e, 0x6720,0x6721,0x6722,0x6723,0x6724,0x6725,0x6727,0x6729, @@ -581,7 +582,7 @@ const unsigned short cp936_ucs_table[] = { 0x682c,0x682d,0x682e,0x682f,0x6830,0x6831,0x6834,0x6835, 0x6836,0x683a,0x683b,0x683f,0x6847,0x684b,0x684d,0x684f, 0x6852,0x6856,0x6857,0x6858,0x6859,0x685a,0x685b,0x0000, -/* 0x9700 */ +/* 0x9740 */ 0x685c,0x685d,0x685e,0x685f,0x686a,0x686c,0x686d,0x686e, 0x686f,0x6870,0x6871,0x6872,0x6873,0x6875,0x6878,0x6879, 0x687a,0x687b,0x687c,0x687d,0x687e,0x687f,0x6880,0x6882, @@ -606,7 +607,7 @@ const unsigned short cp936_ucs_table[] = { 0x6944,0x6945,0x6946,0x6947,0x6948,0x6949,0x694a,0x694b, 0x694c,0x694d,0x694e,0x694f,0x6950,0x6951,0x6952,0x6953, 0x6955,0x6956,0x6958,0x6959,0x695b,0x695c,0x695f,0x0000, -/* 0x9800 */ +/* 0x9840 */ 0x6961,0x6962,0x6964,0x6965,0x6967,0x6968,0x6969,0x696a, 0x696c,0x696d,0x696f,0x6970,0x6972,0x6973,0x6974,0x6975, 0x6976,0x697a,0x697b,0x697d,0x697e,0x697f,0x6981,0x6983, @@ -631,7 +632,7 @@ const unsigned short cp936_ucs_table[] = { 0x6a3f,0x6a40,0x6a41,0x6a42,0x6a43,0x6a45,0x6a46,0x6a48, 0x6a49,0x6a4a,0x6a4b,0x6a4c,0x6a4d,0x6a4e,0x6a4f,0x6a51, 0x6a52,0x6a53,0x6a54,0x6a55,0x6a56,0x6a57,0x6a5a,0x0000, -/* 0x9900 */ +/* 0x9940 */ 0x6a5c,0x6a5d,0x6a5e,0x6a5f,0x6a60,0x6a62,0x6a63,0x6a64, 0x6a66,0x6a67,0x6a68,0x6a69,0x6a6a,0x6a6b,0x6a6c,0x6a6d, 0x6a6e,0x6a6f,0x6a70,0x6a72,0x6a73,0x6a74,0x6a75,0x6a76, @@ -656,7 +657,7 @@ const unsigned short cp936_ucs_table[] = { 0x6b12,0x6b13,0x6b14,0x6b15,0x6b16,0x6b17,0x6b18,0x6b19, 0x6b1a,0x6b1b,0x6b1c,0x6b1d,0x6b1e,0x6b1f,0x6b25,0x6b26, 0x6b28,0x6b29,0x6b2a,0x6b2b,0x6b2c,0x6b2d,0x6b2e,0x0000, -/* 0x9a00 */ +/* 0x9A40 */ 0x6b2f,0x6b30,0x6b31,0x6b33,0x6b34,0x6b35,0x6b36,0x6b38, 0x6b3b,0x6b3c,0x6b3d,0x6b3f,0x6b40,0x6b41,0x6b42,0x6b44, 0x6b45,0x6b48,0x6b4a,0x6b4b,0x6b4d,0x6b4e,0x6b4f,0x6b50, @@ -681,7 +682,7 @@ const unsigned short cp936_ucs_table[] = { 0x6c33,0x6c36,0x6c37,0x6c39,0x6c3a,0x6c3b,0x6c3c,0x6c3e, 0x6c3f,0x6c43,0x6c44,0x6c45,0x6c48,0x6c4b,0x6c4c,0x6c4d, 0x6c4e,0x6c4f,0x6c51,0x6c52,0x6c53,0x6c56,0x6c58,0x0000, -/* 0x9b00 */ +/* 0x9B40 */ 0x6c59,0x6c5a,0x6c62,0x6c63,0x6c65,0x6c66,0x6c67,0x6c6b, 0x6c6c,0x6c6d,0x6c6e,0x6c6f,0x6c71,0x6c73,0x6c75,0x6c77, 0x6c78,0x6c7a,0x6c7b,0x6c7c,0x6c7f,0x6c80,0x6c84,0x6c87, @@ -706,7 +707,7 @@ const unsigned short cp936_ucs_table[] = { 0x6d9c,0x6da2,0x6da5,0x6dac,0x6dad,0x6db0,0x6db1,0x6db3, 0x6db4,0x6db6,0x6db7,0x6db9,0x6dba,0x6dbb,0x6dbc,0x6dbd, 0x6dbe,0x6dc1,0x6dc2,0x6dc3,0x6dc8,0x6dc9,0x6dca,0x0000, -/* 0x9c00 */ +/* 0x9C40 */ 0x6dcd,0x6dce,0x6dcf,0x6dd0,0x6dd2,0x6dd3,0x6dd4,0x6dd5, 0x6dd7,0x6dda,0x6ddb,0x6ddc,0x6ddf,0x6de2,0x6de3,0x6de5, 0x6de7,0x6de8,0x6de9,0x6dea,0x6ded,0x6def,0x6df0,0x6df2, @@ -731,7 +732,7 @@ const unsigned short cp936_ucs_table[] = { 0x6ec6,0x6ec8,0x6ec9,0x6eca,0x6ecc,0x6ecd,0x6ece,0x6ed0, 0x6ed2,0x6ed6,0x6ed8,0x6ed9,0x6edb,0x6edc,0x6edd,0x6ee3, 0x6ee7,0x6eea,0x6eeb,0x6eec,0x6eed,0x6eee,0x6eef,0x0000, -/* 0x9d00 */ +/* 0x9D40 */ 0x6ef0,0x6ef1,0x6ef2,0x6ef3,0x6ef5,0x6ef6,0x6ef7,0x6ef8, 0x6efa,0x6efb,0x6efc,0x6efd,0x6efe,0x6eff,0x6f00,0x6f01, 0x6f03,0x6f04,0x6f05,0x6f07,0x6f08,0x6f0a,0x6f0b,0x6f0c, @@ -756,7 +757,7 @@ const unsigned short cp936_ucs_table[] = { 0x6fca,0x6fcb,0x6fcc,0x6fcd,0x6fce,0x6fcf,0x6fd0,0x6fd3, 0x6fd4,0x6fd5,0x6fd6,0x6fd7,0x6fd8,0x6fd9,0x6fda,0x6fdb, 0x6fdc,0x6fdd,0x6fdf,0x6fe2,0x6fe3,0x6fe4,0x6fe5,0x0000, -/* 0x9e00 */ +/* 0x9E40 */ 0x6fe6,0x6fe7,0x6fe8,0x6fe9,0x6fea,0x6feb,0x6fec,0x6fed, 0x6ff0,0x6ff1,0x6ff2,0x6ff3,0x6ff4,0x6ff5,0x6ff6,0x6ff7, 0x6ff8,0x6ff9,0x6ffa,0x6ffb,0x6ffc,0x6ffd,0x6ffe,0x6fff, @@ -781,7 +782,7 @@ const unsigned short cp936_ucs_table[] = { 0x70b6,0x70ba,0x70be,0x70bf,0x70c4,0x70c5,0x70c6,0x70c7, 0x70c9,0x70cb,0x70cc,0x70cd,0x70ce,0x70cf,0x70d0,0x70d1, 0x70d2,0x70d3,0x70d4,0x70d5,0x70d6,0x70d7,0x70da,0x0000, -/* 0x9f00 */ +/* 0x9F40 */ 0x70dc,0x70dd,0x70de,0x70e0,0x70e1,0x70e2,0x70e3,0x70e5, 0x70ea,0x70ee,0x70f0,0x70f1,0x70f2,0x70f3,0x70f4,0x70f5, 0x70f6,0x70f8,0x70fa,0x70fb,0x70fc,0x70fe,0x70ff,0x7100, @@ -806,7 +807,7 @@ const unsigned short cp936_ucs_table[] = { 0x71bb,0x71bc,0x71bd,0x71be,0x71bf,0x71c0,0x71c1,0x71c2, 0x71c4,0x71c5,0x71c6,0x71c7,0x71c8,0x71c9,0x71ca,0x71cb, 0x71cc,0x71cd,0x71cf,0x71d0,0x71d1,0x71d2,0x71d3,0x0000, -/* 0xa000 */ +/* 0xA040 */ 0x71d6,0x71d7,0x71d8,0x71d9,0x71da,0x71db,0x71dc,0x71dd, 0x71de,0x71df,0x71e1,0x71e2,0x71e3,0x71e4,0x71e6,0x71e8, 0x71e9,0x71ea,0x71eb,0x71ec,0x71ed,0x71ef,0x71f0,0x71f1, @@ -831,7 +832,7 @@ const unsigned short cp936_ucs_table[] = { 0x72ba,0x72bb,0x72bc,0x72bd,0x72be,0x72bf,0x72c0,0x72c5, 0x72c6,0x72c7,0x72c9,0x72ca,0x72cb,0x72cc,0x72cf,0x72d1, 0x72d3,0x72d4,0x72d5,0x72d6,0x72d8,0x72da,0x72db,0x0000, -/* 0xa100 */ +/* 0xA140 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -856,7 +857,7 @@ const unsigned short cp936_ucs_table[] = { 0x00a4,0xffe0,0xffe1,0x2030,0x00a7,0x2116,0x2606,0x2605, 0x25cb,0x25cf,0x25ce,0x25c7,0x25c6,0x25a1,0x25a0,0x25b3, 0x25b2,0x203b,0x2192,0x2190,0x2191,0x2193,0x3013,0x0000, -/* 0xa200 */ +/* 0xA240 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -881,7 +882,7 @@ const unsigned short cp936_ucs_table[] = { 0x3223,0x3224,0x3225,0x3226,0x3227,0x3228,0x3229,0x0000, 0x0000,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, 0x2167,0x2168,0x2169,0x216a,0x216b,0x0000,0x0000,0x0000, -/* 0xa300 */ +/* 0xA340 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -906,7 +907,7 @@ const unsigned short cp936_ucs_table[] = { 0xff48,0xff49,0xff4a,0xff4b,0xff4c,0xff4d,0xff4e,0xff4f, 0xff50,0xff51,0xff52,0xff53,0xff54,0xff55,0xff56,0xff57, 0xff58,0xff59,0xff5a,0xff5b,0xff5c,0xff5d,0xffe3,0x0000, -/* 0xa400 */ +/* 0xA440 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -931,7 +932,7 @@ const unsigned short cp936_ucs_table[] = { 0x3088,0x3089,0x308a,0x308b,0x308c,0x308d,0x308e,0x308f, 0x3090,0x3091,0x3092,0x3093,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xa500 */ +/* 0xA540 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -956,7 +957,7 @@ const unsigned short cp936_ucs_table[] = { 0x30e8,0x30e9,0x30ea,0x30eb,0x30ec,0x30ed,0x30ee,0x30ef, 0x30f0,0x30f1,0x30f2,0x30f3,0x30f4,0x30f5,0x30f6,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xa600 */ +/* 0xA640 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -981,7 +982,7 @@ const unsigned short cp936_ucs_table[] = { 0xfe41,0xfe42,0xfe43,0xfe44,0x0000,0x0000,0xfe3b,0xfe3c, 0xfe37,0xfe38,0xfe31,0x0000,0xfe33,0xfe34,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xa700 */ +/* 0xA740 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -1006,7 +1007,7 @@ const unsigned short cp936_ucs_table[] = { 0x0446,0x0447,0x0448,0x0449,0x044a,0x044b,0x044c,0x044d, 0x044e,0x044f,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xa800 */ +/* 0xA840 */ 0x02ca,0x02cb,0x02d9,0x2013,0x2015,0x2025,0x2035,0x2105, 0x2109,0x2196,0x2197,0x2198,0x2199,0x2215,0x221f,0x2223, 0x2252,0x2266,0x2267,0x22bf,0x2550,0x2551,0x2552,0x2553, @@ -1031,7 +1032,7 @@ const unsigned short cp936_ucs_table[] = { 0x3128,0x3129,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xa900 */ +/* 0xA940 */ 0x3021,0x3022,0x3023,0x3024,0x3025,0x3026,0x3027,0x3028, 0x3029,0x32a3,0x338e,0x338f,0x339c,0x339d,0x339e,0x33a1, 0x33c4,0x33ce,0x33d1,0x33d2,0x33d5,0xfe30,0xffe2,0xffe4, @@ -1056,7 +1057,7 @@ const unsigned short cp936_ucs_table[] = { 0x2544,0x2545,0x2546,0x2547,0x2548,0x2549,0x254a,0x254b, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xaa00 */ +/* 0xAA40 */ 0x72dc,0x72dd,0x72df,0x72e2,0x72e3,0x72e4,0x72e5,0x72e6, 0x72e7,0x72ea,0x72eb,0x72f5,0x72f6,0x72f9,0x72fd,0x72fe, 0x72ff,0x7300,0x7302,0x7304,0x7305,0x7306,0x7307,0x7308, @@ -1081,7 +1082,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xab00 */ +/* 0xAB40 */ 0x7372,0x7373,0x7374,0x7375,0x7376,0x7377,0x7378,0x7379, 0x737a,0x737b,0x737c,0x737d,0x737f,0x7380,0x7381,0x7382, 0x7383,0x7385,0x7386,0x7388,0x738a,0x738c,0x738d,0x738f, @@ -1106,7 +1107,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xac00 */ +/* 0xAC40 */ 0x73f8,0x73f9,0x73fa,0x73fb,0x73fc,0x73fd,0x73fe,0x73ff, 0x7400,0x7401,0x7402,0x7404,0x7407,0x7408,0x740b,0x740c, 0x740d,0x740e,0x7411,0x7412,0x7413,0x7414,0x7415,0x7416, @@ -1131,7 +1132,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xad00 */ +/* 0xAD40 */ 0x747b,0x747c,0x747d,0x747f,0x7482,0x7484,0x7485,0x7486, 0x7488,0x7489,0x748a,0x748c,0x748d,0x748f,0x7491,0x7492, 0x7493,0x7494,0x7495,0x7496,0x7497,0x7498,0x7499,0x749a, @@ -1156,7 +1157,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xae00 */ +/* 0xAE40 */ 0x74f3,0x74f5,0x74f8,0x74f9,0x74fa,0x74fb,0x74fc,0x74fd, 0x74fe,0x7500,0x7501,0x7502,0x7503,0x7505,0x7506,0x7507, 0x7508,0x7509,0x750a,0x750b,0x750c,0x750e,0x7510,0x7512, @@ -1181,7 +1182,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xaf00 */ +/* 0xAF40 */ 0x7588,0x7589,0x758a,0x758c,0x758d,0x758e,0x7590,0x7593, 0x7595,0x7598,0x759b,0x759c,0x759e,0x75a2,0x75a6,0x75a7, 0x75a8,0x75a9,0x75aa,0x75ad,0x75b6,0x75b7,0x75ba,0x75bb, @@ -1206,7 +1207,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xb000 */ +/* 0xB040 */ 0x7645,0x7646,0x7647,0x7648,0x7649,0x764a,0x764b,0x764e, 0x764f,0x7650,0x7651,0x7652,0x7653,0x7655,0x7657,0x7658, 0x7659,0x765a,0x765b,0x765d,0x765f,0x7660,0x7661,0x7662, @@ -1231,7 +1232,7 @@ const unsigned short cp936_ucs_table[] = { 0x62cc,0x4f34,0x74e3,0x534a,0x529e,0x7eca,0x90a6,0x5e2e, 0x6886,0x699c,0x8180,0x7ed1,0x68d2,0x78c5,0x868c,0x9551, 0x508d,0x8c24,0x82de,0x80de,0x5305,0x8912,0x5265,0x0000, -/* 0xb100 */ +/* 0xB140 */ 0x76c4,0x76c7,0x76c9,0x76cb,0x76cc,0x76d3,0x76d5,0x76d9, 0x76da,0x76dc,0x76dd,0x76de,0x76e0,0x76e1,0x76e2,0x76e3, 0x76e4,0x76e6,0x76e7,0x76e8,0x76e9,0x76ea,0x76eb,0x76ec, @@ -1256,7 +1257,7 @@ const unsigned short cp936_ucs_table[] = { 0x8fab,0x904d,0x6807,0x5f6a,0x8198,0x8868,0x9cd6,0x618b, 0x522b,0x762a,0x5f6c,0x658c,0x6fd2,0x6ee8,0x5bbe,0x6448, 0x5175,0x51b0,0x67c4,0x4e19,0x79c9,0x997c,0x70b3,0x0000, -/* 0xb200 */ +/* 0xB240 */ 0x775d,0x775e,0x775f,0x7760,0x7764,0x7767,0x7769,0x776a, 0x776d,0x776e,0x776f,0x7770,0x7771,0x7772,0x7773,0x7774, 0x7775,0x7776,0x7777,0x7778,0x777a,0x777b,0x777c,0x7781, @@ -1281,7 +1282,7 @@ const unsigned short cp936_ucs_table[] = { 0x8336,0x67e5,0x78b4,0x643d,0x5bdf,0x5c94,0x5dee,0x8be7, 0x62c6,0x67f4,0x8c7a,0x6400,0x63ba,0x8749,0x998b,0x8c17, 0x7f20,0x94f2,0x4ea7,0x9610,0x98a4,0x660c,0x7316,0x0000, -/* 0xb300 */ +/* 0xB340 */ 0x77e6,0x77e8,0x77ea,0x77ef,0x77f0,0x77f1,0x77f2,0x77f4, 0x77f5,0x77f7,0x77f9,0x77fa,0x77fb,0x77fc,0x7803,0x7804, 0x7805,0x7806,0x7807,0x7808,0x780a,0x780b,0x780e,0x780f, @@ -1306,7 +1307,7 @@ const unsigned short cp936_ucs_table[] = { 0x5ba0,0x62bd,0x916c,0x7574,0x8e0c,0x7a20,0x6101,0x7b79, 0x4ec7,0x7ef8,0x7785,0x4e11,0x81ed,0x521d,0x51fa,0x6a71, 0x53a8,0x8e87,0x9504,0x96cf,0x6ec1,0x9664,0x695a,0x0000, -/* 0xb400 */ +/* 0xB440 */ 0x7884,0x7885,0x7886,0x7888,0x788a,0x788b,0x788f,0x7890, 0x7892,0x7894,0x7895,0x7896,0x7899,0x789d,0x789e,0x78a0, 0x78a2,0x78a4,0x78a6,0x78a8,0x78a9,0x78aa,0x78ab,0x78ac, @@ -1331,7 +1332,7 @@ const unsigned short cp936_ucs_table[] = { 0x78cb,0x64ae,0x6413,0x63aa,0x632b,0x9519,0x642d,0x8fbe, 0x7b54,0x7629,0x6253,0x5927,0x5446,0x6b79,0x50a3,0x6234, 0x5e26,0x6b86,0x4ee3,0x8d37,0x888b,0x5f85,0x902e,0x0000, -/* 0xb500 */ +/* 0xB540 */ 0x790d,0x790e,0x790f,0x7910,0x7911,0x7912,0x7914,0x7915, 0x7916,0x7917,0x7918,0x7919,0x791a,0x791b,0x791c,0x791d, 0x791f,0x7920,0x7921,0x7922,0x7923,0x7925,0x7926,0x7927, @@ -1356,7 +1357,7 @@ const unsigned short cp936_ucs_table[] = { 0x4f43,0x7538,0x5e97,0x60e6,0x5960,0x6dc0,0x6bbf,0x7889, 0x53fc,0x96d5,0x51cb,0x5201,0x6389,0x540a,0x9493,0x8c03, 0x8dcc,0x7239,0x789f,0x8776,0x8fed,0x8c0d,0x53e0,0x0000, -/* 0xb600 */ +/* 0xB640 */ 0x7993,0x7994,0x7995,0x7996,0x7997,0x7998,0x7999,0x799b, 0x799c,0x799d,0x799e,0x799f,0x79a0,0x79a1,0x79a2,0x79a3, 0x79a4,0x79a5,0x79a6,0x79a8,0x79a9,0x79aa,0x79ab,0x79ac, @@ -1381,7 +1382,7 @@ const unsigned short cp936_ucs_table[] = { 0x60f0,0x5815,0x86fe,0x5ce8,0x9e45,0x4fc4,0x989d,0x8bb9, 0x5a25,0x6076,0x5384,0x627c,0x904f,0x9102,0x997f,0x6069, 0x800c,0x513f,0x8033,0x5c14,0x9975,0x6d31,0x4e8c,0x0000, -/* 0xb700 */ +/* 0xB740 */ 0x7a1d,0x7a1f,0x7a21,0x7a22,0x7a24,0x7a25,0x7a26,0x7a27, 0x7a28,0x7a29,0x7a2a,0x7a2b,0x7a2c,0x7a2d,0x7a2e,0x7a2f, 0x7a30,0x7a31,0x7a32,0x7a34,0x7a35,0x7a36,0x7a38,0x7a3a, @@ -1406,7 +1407,7 @@ const unsigned short cp936_ucs_table[] = { 0x75af,0x70fd,0x9022,0x51af,0x7f1d,0x8bbd,0x5949,0x51e4, 0x4f5b,0x5426,0x592b,0x6577,0x80a4,0x5b75,0x6276,0x62c2, 0x8f90,0x5e45,0x6c1f,0x7b26,0x4f0f,0x4fd8,0x670d,0x0000, -/* 0xb800 */ +/* 0xB840 */ 0x7aa3,0x7aa4,0x7aa7,0x7aa9,0x7aaa,0x7aab,0x7aae,0x7aaf, 0x7ab0,0x7ab1,0x7ab2,0x7ab4,0x7ab5,0x7ab6,0x7ab7,0x7ab8, 0x7ab9,0x7aba,0x7abb,0x7abc,0x7abd,0x7abe,0x7ac0,0x7ac1, @@ -1431,7 +1432,7 @@ const unsigned short cp936_ucs_table[] = { 0x6b4c,0x6401,0x6208,0x9e3d,0x80f3,0x7599,0x5272,0x9769, 0x845b,0x683c,0x86e4,0x9601,0x9694,0x94ec,0x4e2a,0x5404, 0x7ed9,0x6839,0x8ddf,0x8015,0x66f4,0x5e9a,0x7fb9,0x0000, -/* 0xb900 */ +/* 0xB940 */ 0x7b2f,0x7b30,0x7b32,0x7b34,0x7b35,0x7b36,0x7b37,0x7b39, 0x7b3b,0x7b3d,0x7b3f,0x7b40,0x7b41,0x7b42,0x7b43,0x7b44, 0x7b46,0x7b48,0x7b4a,0x7b4d,0x7b4e,0x7b53,0x7b55,0x7b57, @@ -1456,7 +1457,7 @@ const unsigned short cp936_ucs_table[] = { 0x7845,0x5f52,0x9f9f,0x95fa,0x8f68,0x9b3c,0x8be1,0x7678, 0x6842,0x67dc,0x8dea,0x8d35,0x523d,0x8f8a,0x6eda,0x68cd, 0x9505,0x90ed,0x56fd,0x679c,0x88f9,0x8fc7,0x54c8,0x0000, -/* 0xba00 */ +/* 0xBA40 */ 0x7bc5,0x7bc8,0x7bc9,0x7bca,0x7bcb,0x7bcd,0x7bce,0x7bcf, 0x7bd0,0x7bd2,0x7bd4,0x7bd5,0x7bd6,0x7bd7,0x7bd8,0x7bdb, 0x7bdc,0x7bde,0x7bdf,0x7be0,0x7be2,0x7be3,0x7be4,0x7be7, @@ -1481,7 +1482,7 @@ const unsigned short cp936_ucs_table[] = { 0x9e3f,0x6d2a,0x5b8f,0x5f18,0x7ea2,0x5589,0x4faf,0x7334, 0x543c,0x539a,0x5019,0x540e,0x547c,0x4e4e,0x5ffd,0x745a, 0x58f6,0x846b,0x80e1,0x8774,0x72d0,0x7cca,0x6e56,0x0000, -/* 0xbb00 */ +/* 0xBB40 */ 0x7c43,0x7c44,0x7c45,0x7c46,0x7c47,0x7c48,0x7c49,0x7c4a, 0x7c4b,0x7c4c,0x7c4e,0x7c4f,0x7c50,0x7c51,0x7c52,0x7c53, 0x7c54,0x7c55,0x7c56,0x7c57,0x7c58,0x7c59,0x7c5a,0x7c5b, @@ -1506,7 +1507,7 @@ const unsigned short cp936_ucs_table[] = { 0x660f,0x5a5a,0x9b42,0x6d51,0x6df7,0x8c41,0x6d3b,0x4f19, 0x706b,0x83b7,0x6216,0x60d1,0x970d,0x8d27,0x7978,0x51fb, 0x573e,0x57fa,0x673a,0x7578,0x7a3d,0x79ef,0x7b95,0x0000, -/* 0xbc00 */ +/* 0xBC40 */ 0x7cbf,0x7cc0,0x7cc2,0x7cc3,0x7cc4,0x7cc6,0x7cc9,0x7ccb, 0x7cce,0x7ccf,0x7cd0,0x7cd1,0x7cd2,0x7cd3,0x7cd4,0x7cd8, 0x7cda,0x7cdb,0x7cdd,0x7cde,0x7ce1,0x7ce2,0x7ce3,0x7ce4, @@ -1531,7 +1532,7 @@ const unsigned short cp936_ucs_table[] = { 0x8270,0x5978,0x7f04,0x8327,0x68c0,0x67ec,0x78b1,0x7877, 0x62e3,0x6361,0x7b80,0x4fed,0x526a,0x51cf,0x8350,0x69db, 0x9274,0x8df5,0x8d31,0x89c1,0x952e,0x7bad,0x4ef6,0x0000, -/* 0xbd00 */ +/* 0xBD40 */ 0x7d37,0x7d38,0x7d39,0x7d3a,0x7d3b,0x7d3c,0x7d3d,0x7d3e, 0x7d3f,0x7d40,0x7d41,0x7d42,0x7d43,0x7d44,0x7d45,0x7d46, 0x7d47,0x7d48,0x7d49,0x7d4a,0x7d4b,0x7d4c,0x7d4d,0x7d4e, @@ -1556,7 +1557,7 @@ const unsigned short cp936_ucs_table[] = { 0x501f,0x4ecb,0x75a5,0x8beb,0x5c4a,0x5dfe,0x7b4b,0x65a4, 0x91d1,0x4eca,0x6d25,0x895f,0x7d27,0x9526,0x4ec5,0x8c28, 0x8fdb,0x9773,0x664b,0x7981,0x8fd1,0x70ec,0x6d78,0x0000, -/* 0xbe00 */ +/* 0xBE40 */ 0x7d99,0x7d9a,0x7d9b,0x7d9c,0x7d9d,0x7d9e,0x7d9f,0x7da0, 0x7da1,0x7da2,0x7da3,0x7da4,0x7da5,0x7da7,0x7da8,0x7da9, 0x7daa,0x7dab,0x7dac,0x7dad,0x7daf,0x7db0,0x7db1,0x7db2, @@ -1581,7 +1582,7 @@ const unsigned short cp936_ucs_table[] = { 0x6350,0x9e43,0x5a1f,0x5026,0x7737,0x5377,0x7ee2,0x6485, 0x652b,0x6289,0x6398,0x5014,0x7235,0x89c9,0x51b3,0x8bc0, 0x7edd,0x5747,0x83cc,0x94a7,0x519b,0x541b,0x5cfb,0x0000, -/* 0xbf00 */ +/* 0xBF40 */ 0x7dfb,0x7dfc,0x7dfd,0x7dfe,0x7dff,0x7e00,0x7e01,0x7e02, 0x7e03,0x7e04,0x7e05,0x7e06,0x7e07,0x7e08,0x7e09,0x7e0a, 0x7e0b,0x7e0c,0x7e0d,0x7e0e,0x7e0f,0x7e10,0x7e11,0x7e12, @@ -1606,7 +1607,7 @@ const unsigned short cp936_ucs_table[] = { 0x80ef,0x5757,0x7b77,0x4fa9,0x5feb,0x5bbd,0x6b3e,0x5321, 0x7b50,0x72c2,0x6846,0x77ff,0x7736,0x65f7,0x51b5,0x4e8f, 0x76d4,0x5cbf,0x7aa5,0x8475,0x594e,0x9b41,0x5080,0x0000, -/* 0xc000 */ +/* 0xC040 */ 0x7e5e,0x7e5f,0x7e60,0x7e61,0x7e62,0x7e63,0x7e64,0x7e65, 0x7e66,0x7e67,0x7e68,0x7e69,0x7e6a,0x7e6b,0x7e6c,0x7e6d, 0x7e6e,0x7e6f,0x7e70,0x7e71,0x7e72,0x7e73,0x7e74,0x7e75, @@ -1631,7 +1632,7 @@ const unsigned short cp936_ucs_table[] = { 0x9ece,0x7bf1,0x72f8,0x79bb,0x6f13,0x7406,0x674e,0x91cc, 0x9ca4,0x793c,0x8389,0x8354,0x540f,0x6817,0x4e3d,0x5389, 0x52b1,0x783e,0x5386,0x5229,0x5088,0x4f8b,0x4fd0,0x0000, -/* 0xc100 */ +/* 0xC140 */ 0x7f56,0x7f59,0x7f5b,0x7f5c,0x7f5d,0x7f5e,0x7f60,0x7f63, 0x7f64,0x7f65,0x7f66,0x7f67,0x7f6b,0x7f6c,0x7f6d,0x7f6f, 0x7f70,0x7f73,0x7f75,0x7f76,0x7f77,0x7f78,0x7f7a,0x7f7b, @@ -1656,7 +1657,7 @@ const unsigned short cp936_ucs_table[] = { 0x51cc,0x7075,0x9675,0x5cad,0x9886,0x53e6,0x4ee4,0x6e9c, 0x7409,0x69b4,0x786b,0x998f,0x7559,0x5218,0x7624,0x6d41, 0x67f3,0x516d,0x9f99,0x804b,0x5499,0x7b3c,0x7abf,0x0000, -/* 0xc200 */ +/* 0xC240 */ 0x7fe4,0x7fe7,0x7fe8,0x7fea,0x7feb,0x7fec,0x7fed,0x7fef, 0x7ff2,0x7ff4,0x7ff5,0x7ff6,0x7ff7,0x7ff8,0x7ff9,0x7ffa, 0x7ffd,0x7ffe,0x7fff,0x8002,0x8007,0x8008,0x8009,0x800a, @@ -1681,7 +1682,7 @@ const unsigned short cp936_ucs_table[] = { 0x5988,0x9ebb,0x739b,0x7801,0x8682,0x9a6c,0x9a82,0x561b, 0x5417,0x57cb,0x4e70,0x9ea6,0x5356,0x8fc8,0x8109,0x7792, 0x9992,0x86ee,0x6ee1,0x8513,0x66fc,0x6162,0x6f2b,0x0000, -/* 0xc300 */ +/* 0xC340 */ 0x807e,0x8081,0x8082,0x8085,0x8088,0x808a,0x808d,0x808e, 0x808f,0x8090,0x8091,0x8092,0x8094,0x8095,0x8097,0x8099, 0x809e,0x80a3,0x80a6,0x80a7,0x80a8,0x80ac,0x80b0,0x80b3, @@ -1706,7 +1707,7 @@ const unsigned short cp936_ucs_table[] = { 0x63cf,0x7784,0x85d0,0x79d2,0x6e3a,0x5e99,0x5999,0x8511, 0x706d,0x6c11,0x62bf,0x76bf,0x654f,0x60af,0x95fd,0x660e, 0x879f,0x9e23,0x94ed,0x540d,0x547d,0x8c2c,0x6478,0x0000, -/* 0xc400 */ +/* 0xC440 */ 0x8140,0x8141,0x8142,0x8143,0x8144,0x8145,0x8147,0x8149, 0x814d,0x814e,0x814f,0x8152,0x8156,0x8157,0x8158,0x815b, 0x815c,0x815d,0x815e,0x815f,0x8161,0x8162,0x8163,0x8164, @@ -1731,7 +1732,7 @@ const unsigned short cp936_ucs_table[] = { 0x852b,0x62c8,0x5e74,0x78be,0x64b5,0x637b,0x5ff5,0x5a18, 0x917f,0x9e1f,0x5c3f,0x634f,0x8042,0x5b7d,0x556e,0x954a, 0x954d,0x6d85,0x60a8,0x67e0,0x72de,0x51dd,0x5b81,0x0000, -/* 0xc500 */ +/* 0xC540 */ 0x81d4,0x81d5,0x81d6,0x81d7,0x81d8,0x81d9,0x81da,0x81db, 0x81dc,0x81dd,0x81de,0x81df,0x81e0,0x81e1,0x81e2,0x81e4, 0x81e5,0x81e6,0x81e8,0x81e9,0x81eb,0x81ee,0x81ef,0x81f0, @@ -1756,7 +1757,7 @@ const unsigned short cp936_ucs_table[] = { 0x76c6,0x7830,0x62a8,0x70f9,0x6f8e,0x5f6d,0x84ec,0x68da, 0x787c,0x7bf7,0x81a8,0x670b,0x9e4f,0x6367,0x78b0,0x576f, 0x7812,0x9739,0x6279,0x62ab,0x5288,0x7435,0x6bd7,0x0000, -/* 0xc600 */ +/* 0xC640 */ 0x826a,0x826b,0x826c,0x826d,0x8271,0x8275,0x8276,0x8277, 0x8278,0x827b,0x827c,0x8280,0x8281,0x8283,0x8285,0x8286, 0x8287,0x8289,0x828c,0x8290,0x8293,0x8294,0x8295,0x8296, @@ -1781,7 +1782,7 @@ const unsigned short cp936_ucs_table[] = { 0x7566,0x5d0e,0x8110,0x9f50,0x65d7,0x7948,0x7941,0x9a91, 0x8d77,0x5c82,0x4e5e,0x4f01,0x542f,0x5951,0x780c,0x5668, 0x6c14,0x8fc4,0x5f03,0x6c7d,0x6ce3,0x8bab,0x6390,0x0000, -/* 0xc700 */ +/* 0xC740 */ 0x833e,0x833f,0x8341,0x8342,0x8344,0x8345,0x8348,0x834a, 0x834b,0x834c,0x834d,0x834e,0x8353,0x8355,0x8356,0x8357, 0x8358,0x8359,0x835d,0x8362,0x8370,0x8371,0x8372,0x8373, @@ -1806,7 +1807,7 @@ const unsigned short cp936_ucs_table[] = { 0x6c30,0x60c5,0x9877,0x8bf7,0x5e86,0x743c,0x7a77,0x79cb, 0x4e18,0x90b1,0x7403,0x6c42,0x56da,0x914b,0x6cc5,0x8d8b, 0x533a,0x86c6,0x66f2,0x8eaf,0x5c48,0x9a71,0x6e20,0x0000, -/* 0xc800 */ +/* 0xC840 */ 0x83ee,0x83ef,0x83f3,0x83f4,0x83f5,0x83f6,0x83f7,0x83fa, 0x83fb,0x83fc,0x83fe,0x83ff,0x8400,0x8402,0x8405,0x8407, 0x8408,0x8409,0x840a,0x8410,0x8412,0x8413,0x8414,0x8415, @@ -1831,7 +1832,7 @@ const unsigned short cp936_ucs_table[] = { 0x8fb1,0x4e73,0x6c5d,0x5165,0x8925,0x8f6f,0x962e,0x854a, 0x745e,0x9510,0x95f0,0x6da6,0x82e5,0x5f31,0x6492,0x6d12, 0x8428,0x816e,0x9cc3,0x585e,0x8d5b,0x4e09,0x53c1,0x0000, -/* 0xc900 */ +/* 0xC940 */ 0x847d,0x847e,0x847f,0x8480,0x8481,0x8483,0x8484,0x8485, 0x8486,0x848a,0x848d,0x848f,0x8490,0x8491,0x8492,0x8493, 0x8494,0x8495,0x8496,0x8498,0x849a,0x849b,0x849d,0x849e, @@ -1856,7 +1857,7 @@ const unsigned short cp936_ucs_table[] = { 0x8bbe,0x7837,0x7533,0x547b,0x4f38,0x8eab,0x6df1,0x5a20, 0x7ec5,0x795e,0x6c88,0x5ba1,0x5a76,0x751a,0x80be,0x614e, 0x6e17,0x58f0,0x751f,0x7525,0x7272,0x5347,0x7ef3,0x0000, -/* 0xca00 */ +/* 0xCA40 */ 0x8503,0x8504,0x8505,0x8506,0x8507,0x8508,0x8509,0x850a, 0x850b,0x850d,0x850e,0x850f,0x8510,0x8512,0x8514,0x8515, 0x8516,0x8518,0x8519,0x851b,0x851c,0x851d,0x851e,0x8520, @@ -1881,7 +1882,7 @@ const unsigned short cp936_ucs_table[] = { 0x758f,0x4e66,0x8d4e,0x5b70,0x719f,0x85af,0x6691,0x66d9, 0x7f72,0x8700,0x9ecd,0x9f20,0x5c5e,0x672f,0x8ff0,0x6811, 0x675f,0x620d,0x7ad6,0x5885,0x5eb6,0x6570,0x6f31,0x0000, -/* 0xcb00 */ +/* 0xCB40 */ 0x8582,0x8583,0x8586,0x8588,0x8589,0x858a,0x858b,0x858c, 0x858d,0x858e,0x8590,0x8591,0x8592,0x8593,0x8594,0x8595, 0x8596,0x8597,0x8598,0x8599,0x859a,0x859d,0x859e,0x859f, @@ -1906,7 +1907,7 @@ const unsigned short cp936_ucs_table[] = { 0x9ad3,0x788e,0x5c81,0x7a57,0x9042,0x96a7,0x795f,0x5b59, 0x635f,0x7b0b,0x84d1,0x68ad,0x5506,0x7f29,0x7410,0x7d22, 0x9501,0x6240,0x584c,0x4ed6,0x5b83,0x5979,0x5854,0x0000, -/* 0xcc00 */ +/* 0xCC40 */ 0x85f9,0x85fa,0x85fc,0x85fd,0x85fe,0x8600,0x8601,0x8602, 0x8603,0x8604,0x8606,0x8607,0x8608,0x8609,0x860a,0x860b, 0x860c,0x860d,0x860e,0x860f,0x8610,0x8612,0x8613,0x8614, @@ -1931,7 +1932,7 @@ const unsigned short cp936_ucs_table[] = { 0x60d5,0x6d95,0x5243,0x5c49,0x5929,0x6dfb,0x586b,0x7530, 0x751c,0x606c,0x8214,0x8146,0x6311,0x6761,0x8fe2,0x773a, 0x8df3,0x8d34,0x94c1,0x5e16,0x5385,0x542c,0x70c3,0x0000, -/* 0xcd00 */ +/* 0xCD40 */ 0x866d,0x866f,0x8670,0x8672,0x8673,0x8674,0x8675,0x8676, 0x8677,0x8678,0x8683,0x8684,0x8685,0x8686,0x8687,0x8688, 0x8689,0x868e,0x868f,0x8690,0x8691,0x8692,0x8694,0x8696, @@ -1956,7 +1957,7 @@ const unsigned short cp936_ucs_table[] = { 0x4e38,0x70f7,0x5b8c,0x7897,0x633d,0x665a,0x7696,0x60cb, 0x5b9b,0x5a49,0x4e07,0x8155,0x6c6a,0x738b,0x4ea1,0x6789, 0x7f51,0x5f80,0x65fa,0x671b,0x5fd8,0x5984,0x5a01,0x0000, -/* 0xce00 */ +/* 0xCE40 */ 0x8719,0x871b,0x871d,0x871f,0x8720,0x8724,0x8726,0x8727, 0x8728,0x872a,0x872b,0x872c,0x872d,0x872f,0x8730,0x8732, 0x8733,0x8735,0x8736,0x8738,0x8739,0x873a,0x873c,0x873d, @@ -1981,7 +1982,7 @@ const unsigned short cp936_ucs_table[] = { 0x821e,0x4f0d,0x4fae,0x575e,0x620a,0x96fe,0x6664,0x7269, 0x52ff,0x52a1,0x609f,0x8bef,0x6614,0x7199,0x6790,0x897f, 0x7852,0x77fd,0x6670,0x563b,0x5438,0x9521,0x727a,0x0000, -/* 0xcf00 */ +/* 0xCF40 */ 0x87a5,0x87a6,0x87a7,0x87a9,0x87aa,0x87ae,0x87b0,0x87b1, 0x87b2,0x87b4,0x87b6,0x87b7,0x87b8,0x87b9,0x87bb,0x87bc, 0x87be,0x87bf,0x87c1,0x87c2,0x87c3,0x87c4,0x87c5,0x87c7, @@ -2006,7 +2007,7 @@ const unsigned short cp936_ucs_table[] = { 0x7fd4,0x7965,0x8be6,0x60f3,0x54cd,0x4eab,0x9879,0x5df7, 0x6a61,0x50cf,0x5411,0x8c61,0x8427,0x785d,0x9704,0x524a, 0x54ee,0x56a3,0x9500,0x6d88,0x5bb5,0x6dc6,0x6653,0x0000, -/* 0xd000 */ +/* 0xD040 */ 0x8824,0x8825,0x8826,0x8827,0x8828,0x8829,0x882a,0x882b, 0x882c,0x882d,0x882e,0x882f,0x8830,0x8831,0x8833,0x8834, 0x8835,0x8836,0x8837,0x8838,0x883a,0x883b,0x883d,0x883e, @@ -2031,7 +2032,7 @@ const unsigned short cp936_ucs_table[] = { 0x9700,0x865a,0x5618,0x987b,0x5f90,0x8bb8,0x84c4,0x9157, 0x53d9,0x65ed,0x5e8f,0x755c,0x6064,0x7d6e,0x5a7f,0x7eea, 0x7eed,0x8f69,0x55a7,0x5ba3,0x60ac,0x65cb,0x7384,0x0000, -/* 0xd100 */ +/* 0xD140 */ 0x88ac,0x88ae,0x88af,0x88b0,0x88b2,0x88b3,0x88b4,0x88b5, 0x88b6,0x88b8,0x88b9,0x88ba,0x88bb,0x88bd,0x88be,0x88bf, 0x88c0,0x88c3,0x88c4,0x88c7,0x88c8,0x88ca,0x88cb,0x88cc, @@ -2056,7 +2057,7 @@ const unsigned short cp936_ucs_table[] = { 0x8c1a,0x9a8c,0x6b83,0x592e,0x9e2f,0x79e7,0x6768,0x626c, 0x4f6f,0x75a1,0x7f8a,0x6d0b,0x9633,0x6c27,0x4ef0,0x75d2, 0x517b,0x6837,0x6f3e,0x9080,0x8170,0x5996,0x7476,0x0000, -/* 0xd200 */ +/* 0xD240 */ 0x8938,0x8939,0x893a,0x893b,0x893c,0x893d,0x893e,0x893f, 0x8940,0x8942,0x8943,0x8945,0x8946,0x8947,0x8948,0x8949, 0x894a,0x894b,0x894c,0x894d,0x894e,0x894f,0x8950,0x8951, @@ -2081,7 +2082,7 @@ const unsigned short cp936_ucs_table[] = { 0x8be3,0x8bae,0x8c0a,0x8bd1,0x5f02,0x7ffc,0x7fcc,0x7ece, 0x8335,0x836b,0x56e0,0x6bb7,0x97f3,0x9634,0x59fb,0x541f, 0x94f6,0x6deb,0x5bc5,0x996e,0x5c39,0x5f15,0x9690,0x0000, -/* 0xd300 */ +/* 0xD340 */ 0x89a2,0x89a3,0x89a4,0x89a5,0x89a6,0x89a7,0x89a8,0x89a9, 0x89aa,0x89ab,0x89ac,0x89ad,0x89ae,0x89af,0x89b0,0x89b1, 0x89b2,0x89b3,0x89b4,0x89b5,0x89b6,0x89b7,0x89b8,0x89b9, @@ -2106,7 +2107,7 @@ const unsigned short cp936_ucs_table[] = { 0x4e88,0x5a31,0x96e8,0x4e0e,0x5c7f,0x79b9,0x5b87,0x8bed, 0x7fbd,0x7389,0x57df,0x828b,0x90c1,0x5401,0x9047,0x55bb, 0x5cea,0x5fa1,0x6108,0x6b32,0x72f1,0x80b2,0x8a89,0x0000, -/* 0xd400 */ +/* 0xD440 */ 0x8a1e,0x8a1f,0x8a20,0x8a21,0x8a22,0x8a23,0x8a24,0x8a25, 0x8a26,0x8a27,0x8a28,0x8a29,0x8a2a,0x8a2b,0x8a2c,0x8a2d, 0x8a2e,0x8a2f,0x8a30,0x8a31,0x8a32,0x8a33,0x8a34,0x8a35, @@ -2131,7 +2132,7 @@ const unsigned short cp936_ucs_table[] = { 0x6fa1,0x86a4,0x8e81,0x566a,0x9020,0x7682,0x7076,0x71e5, 0x8d23,0x62e9,0x5219,0x6cfd,0x8d3c,0x600e,0x589e,0x618e, 0x66fe,0x8d60,0x624e,0x55b3,0x6e23,0x672d,0x8f67,0x0000, -/* 0xd500 */ +/* 0xD540 */ 0x8a81,0x8a82,0x8a83,0x8a84,0x8a85,0x8a86,0x8a87,0x8a88, 0x8a8b,0x8a8c,0x8a8d,0x8a8e,0x8a8f,0x8a90,0x8a91,0x8a92, 0x8a94,0x8a95,0x8a96,0x8a97,0x8a98,0x8a99,0x8a9a,0x8a9b, @@ -2156,7 +2157,7 @@ const unsigned short cp936_ucs_table[] = { 0x7827,0x81fb,0x8d1e,0x9488,0x4fa6,0x6795,0x75b9,0x8bca, 0x9707,0x632f,0x9547,0x9635,0x84b8,0x6323,0x7741,0x5f81, 0x72f0,0x4e89,0x6014,0x6574,0x62ef,0x6b63,0x653f,0x0000, -/* 0xd600 */ +/* 0xD640 */ 0x8ae4,0x8ae5,0x8ae6,0x8ae7,0x8ae8,0x8ae9,0x8aea,0x8aeb, 0x8aec,0x8aed,0x8aee,0x8aef,0x8af0,0x8af1,0x8af2,0x8af3, 0x8af4,0x8af5,0x8af6,0x8af7,0x8af8,0x8af9,0x8afa,0x8afb, @@ -2181,7 +2182,7 @@ const unsigned short cp936_ucs_table[] = { 0x9aa4,0x73e0,0x682a,0x86db,0x6731,0x732a,0x8bf8,0x8bdb, 0x9010,0x7af9,0x70db,0x716e,0x62c4,0x77a9,0x5631,0x4e3b, 0x8457,0x67f1,0x52a9,0x86c0,0x8d2e,0x94f8,0x7b51,0x0000, -/* 0xd700 */ +/* 0xD740 */ 0x8b46,0x8b47,0x8b48,0x8b49,0x8b4a,0x8b4b,0x8b4c,0x8b4d, 0x8b4e,0x8b4f,0x8b50,0x8b51,0x8b52,0x8b53,0x8b54,0x8b55, 0x8b56,0x8b57,0x8b58,0x8b59,0x8b5a,0x8b5b,0x8b5c,0x8b5d, @@ -2206,7 +2207,7 @@ const unsigned short cp936_ucs_table[] = { 0x963b,0x7ec4,0x94bb,0x7e82,0x5634,0x9189,0x6700,0x7f6a, 0x5c0a,0x9075,0x6628,0x5de6,0x4f50,0x67de,0x505a,0x4f5c, 0x5750,0x5ea7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xd800 */ +/* 0xD840 */ 0x8c38,0x8c39,0x8c3a,0x8c3b,0x8c3c,0x8c3d,0x8c3e,0x8c3f, 0x8c40,0x8c42,0x8c43,0x8c44,0x8c45,0x8c48,0x8c4a,0x8c4b, 0x8c4d,0x8c4e,0x8c4f,0x8c50,0x8c51,0x8c52,0x8c53,0x8c54, @@ -2231,7 +2232,7 @@ const unsigned short cp936_ucs_table[] = { 0x7f54,0x4ebb,0x4ec3,0x4ec9,0x4ec2,0x4ee8,0x4ee1,0x4eeb, 0x4ede,0x4f1b,0x4ef3,0x4f22,0x4f64,0x4ef5,0x4f25,0x4f27, 0x4f09,0x4f2b,0x4f5e,0x4f67,0x6538,0x4f5a,0x4f5d,0x0000, -/* 0xd900 */ +/* 0xD940 */ 0x8cae,0x8caf,0x8cb0,0x8cb1,0x8cb2,0x8cb3,0x8cb4,0x8cb5, 0x8cb6,0x8cb7,0x8cb8,0x8cb9,0x8cba,0x8cbb,0x8cbc,0x8cbd, 0x8cbe,0x8cbf,0x8cc0,0x8cc1,0x8cc2,0x8cc3,0x8cc4,0x8cc5, @@ -2256,7 +2257,7 @@ const unsigned short cp936_ucs_table[] = { 0x52f9,0x530d,0x8a07,0x5310,0x51eb,0x5919,0x5155,0x4ea0, 0x5156,0x4eb3,0x886e,0x88a4,0x4eb5,0x8114,0x88d2,0x7980, 0x5b34,0x8803,0x7fb8,0x51ab,0x51b1,0x51bd,0x51bc,0x0000, -/* 0xda00 */ +/* 0xDA40 */ 0x8d0e,0x8d0f,0x8d10,0x8d11,0x8d12,0x8d13,0x8d14,0x8d15, 0x8d16,0x8d17,0x8d18,0x8d19,0x8d1a,0x8d1b,0x8d1c,0x8d20, 0x8d51,0x8d52,0x8d57,0x8d5f,0x8d65,0x8d68,0x8d69,0x8d6a, @@ -2281,7 +2282,7 @@ const unsigned short cp936_ucs_table[] = { 0x963c,0x9642,0x9649,0x9654,0x965f,0x9667,0x966c,0x9672, 0x9674,0x9688,0x968d,0x9697,0x96b0,0x9097,0x909b,0x909d, 0x9099,0x90ac,0x90a1,0x90b4,0x90b3,0x90b6,0x90ba,0x0000, -/* 0xdb00 */ +/* 0xDB40 */ 0x8dd5,0x8dd8,0x8dd9,0x8ddc,0x8de0,0x8de1,0x8de2,0x8de5, 0x8de6,0x8de7,0x8de9,0x8ded,0x8dee,0x8df0,0x8df1,0x8df2, 0x8df4,0x8df6,0x8dfc,0x8dfe,0x8dff,0x8e00,0x8e01,0x8e02, @@ -2306,7 +2307,7 @@ const unsigned short cp936_ucs_table[] = { 0x576d,0x5776,0x5773,0x57ad,0x57a4,0x578c,0x57b2,0x57cf, 0x57a7,0x57b4,0x5793,0x57a0,0x57d5,0x57d8,0x57da,0x57d9, 0x57d2,0x57b8,0x57f4,0x57ef,0x57f8,0x57e4,0x57dd,0x0000, -/* 0xdc00 */ +/* 0xDC40 */ 0x8e73,0x8e75,0x8e77,0x8e78,0x8e79,0x8e7a,0x8e7b,0x8e7d, 0x8e7e,0x8e80,0x8e82,0x8e83,0x8e84,0x8e86,0x8e88,0x8e89, 0x8e8a,0x8e8b,0x8e8c,0x8e8d,0x8e8e,0x8e91,0x8e92,0x8e93, @@ -2331,7 +2332,7 @@ const unsigned short cp936_ucs_table[] = { 0x8351,0x835b,0x835c,0x8308,0x8392,0x833c,0x8334,0x8331, 0x839b,0x835e,0x832f,0x834f,0x8347,0x8343,0x835f,0x8340, 0x8317,0x8360,0x832d,0x833a,0x8333,0x8366,0x8365,0x0000, -/* 0xdd00 */ +/* 0xDD40 */ 0x8ee5,0x8ee6,0x8ee7,0x8ee8,0x8ee9,0x8eea,0x8eeb,0x8eec, 0x8eed,0x8eee,0x8eef,0x8ef0,0x8ef1,0x8ef2,0x8ef3,0x8ef4, 0x8ef5,0x8ef6,0x8ef7,0x8ef8,0x8ef9,0x8efa,0x8efb,0x8efc, @@ -2356,7 +2357,7 @@ const unsigned short cp936_ucs_table[] = { 0x84c1,0x84cd,0x84d0,0x84e6,0x84bd,0x84d3,0x84ca,0x84bf, 0x84ba,0x84e0,0x84a1,0x84b9,0x84b4,0x8497,0x84e5,0x84e3, 0x850c,0x750d,0x8538,0x84f0,0x8539,0x851f,0x853a,0x0000, -/* 0xde00 */ +/* 0xDE40 */ 0x8f45,0x8f46,0x8f47,0x8f48,0x8f49,0x8f4a,0x8f4b,0x8f4c, 0x8f4d,0x8f4e,0x8f4f,0x8f50,0x8f51,0x8f52,0x8f53,0x8f54, 0x8f55,0x8f56,0x8f57,0x8f58,0x8f59,0x8f5a,0x8f5b,0x8f5c, @@ -2381,7 +2382,7 @@ const unsigned short cp936_ucs_table[] = { 0x63bc,0x63f2,0x63f8,0x63e0,0x63ff,0x63c4,0x63de,0x63ce, 0x6452,0x63c6,0x63be,0x6445,0x6441,0x640b,0x641b,0x6420, 0x640c,0x6426,0x6421,0x645e,0x6484,0x646d,0x6496,0x0000, -/* 0xdf00 */ +/* 0xDF40 */ 0x9019,0x901c,0x9023,0x9024,0x9025,0x9027,0x9028,0x9029, 0x902a,0x902b,0x902c,0x9030,0x9031,0x9032,0x9033,0x9034, 0x9037,0x9039,0x903a,0x903d,0x903f,0x9040,0x9043,0x9045, @@ -2406,7 +2407,7 @@ const unsigned short cp936_ucs_table[] = { 0x54de,0x551b,0x54e7,0x5520,0x54fd,0x5514,0x54f3,0x5522, 0x5523,0x550f,0x5511,0x5527,0x552a,0x5567,0x558f,0x55b5, 0x5549,0x556d,0x5541,0x5555,0x553f,0x5550,0x553c,0x0000, -/* 0xe000 */ +/* 0xE040 */ 0x90c2,0x90c3,0x90c6,0x90c8,0x90c9,0x90cb,0x90cc,0x90cd, 0x90d2,0x90d4,0x90d5,0x90d6,0x90d8,0x90d9,0x90da,0x90de, 0x90df,0x90e0,0x90e3,0x90e4,0x90e5,0x90e9,0x90ea,0x90ec, @@ -2431,7 +2432,7 @@ const unsigned short cp936_ucs_table[] = { 0x567c,0x5685,0x5693,0x56af,0x56d4,0x56d7,0x56dd,0x56e1, 0x56f5,0x56eb,0x56f9,0x56ff,0x5704,0x570a,0x5709,0x571c, 0x5e0f,0x5e19,0x5e14,0x5e11,0x5e31,0x5e3b,0x5e3c,0x0000, -/* 0xe100 */ +/* 0xE140 */ 0x9145,0x9147,0x9148,0x9151,0x9153,0x9154,0x9155,0x9156, 0x9158,0x9159,0x915b,0x915c,0x915f,0x9160,0x9166,0x9167, 0x9168,0x916b,0x916d,0x9173,0x917a,0x917b,0x917c,0x9180, @@ -2456,7 +2457,7 @@ const unsigned short cp936_ucs_table[] = { 0x5fbc,0x8862,0x5f61,0x72ad,0x72b0,0x72b4,0x72b7,0x72b8, 0x72c3,0x72c1,0x72ce,0x72cd,0x72d2,0x72e8,0x72ef,0x72e9, 0x72f2,0x72f4,0x72f7,0x7301,0x72f3,0x7303,0x72fa,0x0000, -/* 0xe200 */ +/* 0xE240 */ 0x91e6,0x91e7,0x91e8,0x91e9,0x91ea,0x91eb,0x91ec,0x91ed, 0x91ee,0x91ef,0x91f0,0x91f1,0x91f2,0x91f3,0x91f4,0x91f5, 0x91f6,0x91f7,0x91f8,0x91f9,0x91fa,0x91fb,0x91fc,0x91fd, @@ -2481,7 +2482,7 @@ const unsigned short cp936_ucs_table[] = { 0x5fe4,0x5ffe,0x6005,0x6006,0x5fea,0x5fed,0x5ff8,0x6019, 0x6035,0x6026,0x601b,0x600f,0x600d,0x6029,0x602b,0x600a, 0x603f,0x6021,0x6078,0x6079,0x607b,0x607a,0x6042,0x0000, -/* 0xe300 */ +/* 0xE340 */ 0x9246,0x9247,0x9248,0x9249,0x924a,0x924b,0x924c,0x924d, 0x924e,0x924f,0x9250,0x9251,0x9252,0x9253,0x9254,0x9255, 0x9256,0x9257,0x9258,0x9259,0x925a,0x925b,0x925c,0x925d, @@ -2506,7 +2507,7 @@ const unsigned short cp936_ucs_table[] = { 0x6c68,0x6c69,0x6c74,0x6c76,0x6c86,0x6ca9,0x6cd0,0x6cd4, 0x6cad,0x6cf7,0x6cf8,0x6cf1,0x6cd7,0x6cb2,0x6ce0,0x6cd6, 0x6cfa,0x6ceb,0x6cee,0x6cb1,0x6cd3,0x6cef,0x6cfe,0x0000, -/* 0xe400 */ +/* 0xE440 */ 0x92a8,0x92a9,0x92aa,0x92ab,0x92ac,0x92ad,0x92af,0x92b0, 0x92b1,0x92b2,0x92b3,0x92b4,0x92b5,0x92b6,0x92b7,0x92b8, 0x92b9,0x92ba,0x92bb,0x92bc,0x92bd,0x92be,0x92bf,0x92c0, @@ -2531,7 +2532,7 @@ const unsigned short cp936_ucs_table[] = { 0x6ec2,0x6e9f,0x6f62,0x6f46,0x6f47,0x6f24,0x6f15,0x6ef9, 0x6f2f,0x6f36,0x6f4b,0x6f74,0x6f2a,0x6f09,0x6f29,0x6f89, 0x6f8d,0x6f8c,0x6f78,0x6f72,0x6f7c,0x6f7a,0x6fd1,0x0000, -/* 0xe500 */ +/* 0xE540 */ 0x930a,0x930b,0x930c,0x930d,0x930e,0x930f,0x9310,0x9311, 0x9312,0x9313,0x9314,0x9315,0x9316,0x9317,0x9318,0x9319, 0x931a,0x931b,0x931c,0x931d,0x931e,0x931f,0x9320,0x9321, @@ -2556,7 +2557,7 @@ const unsigned short cp936_ucs_table[] = { 0x5f56,0x5f58,0x5c3b,0x54ab,0x5c50,0x5c59,0x5b71,0x5c63, 0x5c66,0x7fbc,0x5f2a,0x5f29,0x5f2d,0x8274,0x5f3c,0x9b3b, 0x5c6e,0x5981,0x5983,0x598d,0x59a9,0x59aa,0x59a3,0x0000, -/* 0xe600 */ +/* 0xE640 */ 0x936c,0x936d,0x936e,0x936f,0x9370,0x9371,0x9372,0x9373, 0x9374,0x9375,0x9376,0x9377,0x9378,0x9379,0x937a,0x937b, 0x937c,0x937d,0x937e,0x937f,0x9380,0x9381,0x9382,0x9383, @@ -2581,7 +2582,7 @@ const unsigned short cp936_ucs_table[] = { 0x9a85,0x9a88,0x9a8a,0x9a90,0x9a92,0x9a93,0x9a96,0x9a98, 0x9a9b,0x9a9c,0x9a9d,0x9a9f,0x9aa0,0x9aa2,0x9aa3,0x9aa5, 0x9aa7,0x7e9f,0x7ea1,0x7ea3,0x7ea5,0x7ea8,0x7ea9,0x0000, -/* 0xe700 */ +/* 0xE740 */ 0x93ce,0x93cf,0x93d0,0x93d1,0x93d2,0x93d3,0x93d4,0x93d5, 0x93d7,0x93d8,0x93d9,0x93da,0x93db,0x93dc,0x93dd,0x93de, 0x93df,0x93e0,0x93e1,0x93e2,0x93e3,0x93e4,0x93e5,0x93e6, @@ -2606,7 +2607,7 @@ const unsigned short cp936_ucs_table[] = { 0x73b7,0x73b3,0x73c0,0x73c9,0x73c8,0x73e5,0x73d9,0x987c, 0x740a,0x73e9,0x73e7,0x73de,0x73ba,0x73f2,0x740f,0x742a, 0x745b,0x7426,0x7425,0x7428,0x7430,0x742e,0x742c,0x0000, -/* 0xe800 */ +/* 0xE840 */ 0x942f,0x9430,0x9431,0x9432,0x9433,0x9434,0x9435,0x9436, 0x9437,0x9438,0x9439,0x943a,0x943b,0x943c,0x943d,0x943f, 0x9440,0x9441,0x9442,0x9443,0x9444,0x9445,0x9446,0x9447, @@ -2631,7 +2632,7 @@ const unsigned short cp936_ucs_table[] = { 0x6883,0x681d,0x6855,0x6866,0x6841,0x6867,0x6840,0x683e, 0x684a,0x6849,0x6829,0x68b5,0x688f,0x6874,0x6877,0x6893, 0x686b,0x68c2,0x696e,0x68fc,0x691f,0x6920,0x68f9,0x0000, -/* 0xe900 */ +/* 0xE940 */ 0x9527,0x9533,0x953d,0x9543,0x9548,0x954b,0x9555,0x955a, 0x9560,0x956e,0x9574,0x9575,0x9577,0x9578,0x9579,0x957a, 0x957b,0x957c,0x957d,0x957e,0x9580,0x9581,0x9582,0x9583, @@ -2656,7 +2657,7 @@ const unsigned short cp936_ucs_table[] = { 0x6b8d,0x6b9a,0x6b9b,0x6ba1,0x6baa,0x8f6b,0x8f6d,0x8f71, 0x8f72,0x8f73,0x8f75,0x8f76,0x8f78,0x8f77,0x8f79,0x8f7a, 0x8f7c,0x8f7e,0x8f81,0x8f82,0x8f84,0x8f87,0x8f8b,0x0000, -/* 0xea00 */ +/* 0xEA40 */ 0x95cc,0x95cd,0x95ce,0x95cf,0x95d0,0x95d1,0x95d2,0x95d3, 0x95d4,0x95d5,0x95d6,0x95d7,0x95d8,0x95d9,0x95da,0x95db, 0x95dc,0x95dd,0x95de,0x95df,0x95e0,0x95e1,0x95e2,0x95e3, @@ -2681,7 +2682,7 @@ const unsigned short cp936_ucs_table[] = { 0x89c7,0x89ca,0x89cb,0x89cc,0x89ce,0x89cf,0x89d0,0x89d1, 0x726e,0x729f,0x725d,0x7266,0x726f,0x727e,0x727f,0x7284, 0x728b,0x728d,0x728f,0x7292,0x6308,0x6332,0x63b0,0x0000, -/* 0xeb00 */ +/* 0xEB40 */ 0x968c,0x968e,0x9691,0x9692,0x9693,0x9695,0x9696,0x969a, 0x969b,0x969d,0x969e,0x969f,0x96a0,0x96a1,0x96a2,0x96a3, 0x96a4,0x96a5,0x96a6,0x96a8,0x96a9,0x96aa,0x96ab,0x96ac, @@ -2706,7 +2707,7 @@ const unsigned short cp936_ucs_table[] = { 0x8153,0x8174,0x8159,0x815a,0x8171,0x8160,0x8169,0x817c, 0x817d,0x816d,0x8167,0x584d,0x5ab5,0x8188,0x8182,0x8191, 0x6ed5,0x81a3,0x81aa,0x81cc,0x6726,0x81ca,0x81bb,0x0000, -/* 0xec00 */ +/* 0xEC40 */ 0x9721,0x9722,0x9723,0x9724,0x9725,0x9726,0x9727,0x9728, 0x9729,0x972b,0x972c,0x972e,0x972f,0x9731,0x9733,0x9734, 0x9735,0x9736,0x9737,0x973a,0x973b,0x973c,0x973d,0x973f, @@ -2731,7 +2732,7 @@ const unsigned short cp936_ucs_table[] = { 0x6248,0x6249,0x793b,0x7940,0x7946,0x7949,0x795b,0x795c, 0x7953,0x795a,0x7962,0x7957,0x7960,0x796f,0x7967,0x797a, 0x7985,0x798a,0x799a,0x79a7,0x79b3,0x5fd1,0x5fd0,0x0000, -/* 0xed00 */ +/* 0xED40 */ 0x979e,0x979f,0x97a1,0x97a2,0x97a4,0x97a5,0x97a6,0x97a7, 0x97a8,0x97a9,0x97aa,0x97ac,0x97ae,0x97b0,0x97b1,0x97b3, 0x97b5,0x97b6,0x97b7,0x97b8,0x97b9,0x97ba,0x97bb,0x97bc, @@ -2756,7 +2757,7 @@ const unsigned short cp936_ucs_table[] = { 0x9f9b,0x9ef9,0x9efb,0x9efc,0x76f1,0x7704,0x770d,0x76f9, 0x7707,0x7708,0x771a,0x7722,0x7719,0x772d,0x7726,0x7735, 0x7738,0x7750,0x7751,0x7747,0x7743,0x775a,0x7768,0x0000, -/* 0xee00 */ +/* 0xEE40 */ 0x980f,0x9810,0x9811,0x9812,0x9813,0x9814,0x9815,0x9816, 0x9817,0x9818,0x9819,0x981a,0x981b,0x981c,0x981d,0x981e, 0x981f,0x9820,0x9821,0x9822,0x9823,0x9824,0x9825,0x9826, @@ -2781,7 +2782,7 @@ const unsigned short cp936_ucs_table[] = { 0x94ca,0x94cb,0x94cc,0x94cd,0x94ce,0x94d0,0x94d1,0x94d2, 0x94d5,0x94d6,0x94d7,0x94d9,0x94d8,0x94db,0x94de,0x94df, 0x94e0,0x94e2,0x94e4,0x94e5,0x94e7,0x94e8,0x94ea,0x0000, -/* 0xef00 */ +/* 0xEF40 */ 0x986f,0x9870,0x9871,0x9872,0x9873,0x9874,0x988b,0x988e, 0x9892,0x9895,0x9899,0x98a3,0x98a8,0x98a9,0x98aa,0x98ab, 0x98ac,0x98ad,0x98ae,0x98af,0x98b0,0x98b1,0x98b2,0x98b3, @@ -2806,7 +2807,7 @@ const unsigned short cp936_ucs_table[] = { 0x9568,0x9569,0x956a,0x956b,0x956c,0x956f,0x9571,0x9572, 0x9573,0x953a,0x77e7,0x77ec,0x96c9,0x79d5,0x79ed,0x79e3, 0x79eb,0x7a06,0x5d47,0x7a03,0x7a02,0x7a1e,0x7a14,0x0000, -/* 0xf000 */ +/* 0xF040 */ 0x9908,0x9909,0x990a,0x990b,0x990c,0x990e,0x990f,0x9911, 0x9912,0x9913,0x9914,0x9915,0x9916,0x9917,0x9918,0x9919, 0x991a,0x991b,0x991c,0x991d,0x991e,0x991f,0x9920,0x9921, @@ -2831,7 +2832,7 @@ const unsigned short cp936_ucs_table[] = { 0x75c2,0x75d6,0x75cd,0x75e3,0x75e8,0x75e6,0x75e4,0x75eb, 0x75e7,0x7603,0x75f1,0x75fc,0x75ff,0x7610,0x7600,0x7605, 0x760c,0x7617,0x760a,0x7625,0x7618,0x7615,0x7619,0x0000, -/* 0xf100 */ +/* 0xF140 */ 0x998c,0x998e,0x999a,0x999b,0x999c,0x999d,0x999e,0x999f, 0x99a0,0x99a1,0x99a2,0x99a3,0x99a4,0x99a6,0x99a7,0x99a9, 0x99aa,0x99ab,0x99ac,0x99ad,0x99ae,0x99af,0x99b0,0x99b1, @@ -2856,7 +2857,7 @@ const unsigned short cp936_ucs_table[] = { 0x8014,0x8016,0x801c,0x8020,0x8022,0x8025,0x8026,0x8027, 0x8029,0x8028,0x8031,0x800b,0x8035,0x8043,0x8046,0x804d, 0x8052,0x8069,0x8071,0x8983,0x9878,0x9880,0x9883,0x0000, -/* 0xf200 */ +/* 0xF240 */ 0x99fa,0x99fb,0x99fc,0x99fd,0x99fe,0x99ff,0x9a00,0x9a01, 0x9a02,0x9a03,0x9a04,0x9a05,0x9a06,0x9a07,0x9a08,0x9a09, 0x9a0a,0x9a0b,0x9a0c,0x9a0d,0x9a0e,0x9a0f,0x9a10,0x9a11, @@ -2881,7 +2882,7 @@ const unsigned short cp936_ucs_table[] = { 0x8729,0x8737,0x873f,0x8782,0x8722,0x877d,0x877e,0x877b, 0x8760,0x8770,0x874c,0x876e,0x878b,0x8753,0x8763,0x877c, 0x8764,0x8759,0x8765,0x8793,0x87af,0x87a8,0x87d2,0x0000, -/* 0xf300 */ +/* 0xF340 */ 0x9a5a,0x9a5b,0x9a5c,0x9a5d,0x9a5e,0x9a5f,0x9a60,0x9a61, 0x9a62,0x9a63,0x9a64,0x9a65,0x9a66,0x9a67,0x9a68,0x9a69, 0x9a6a,0x9a6b,0x9a72,0x9a83,0x9a89,0x9a8d,0x9a8e,0x9a94, @@ -2906,7 +2907,7 @@ const unsigned short cp936_ucs_table[] = { 0x7bac,0x7b9d,0x7ba8,0x7b85,0x7baa,0x7b9c,0x7ba2,0x7bab, 0x7bb4,0x7bd1,0x7bc1,0x7bcc,0x7bdd,0x7bda,0x7be5,0x7be6, 0x7bea,0x7c0c,0x7bfe,0x7bfc,0x7c0f,0x7c16,0x7c0b,0x0000, -/* 0xf400 */ +/* 0xF440 */ 0x9b07,0x9b09,0x9b0a,0x9b0b,0x9b0c,0x9b0d,0x9b0e,0x9b10, 0x9b11,0x9b12,0x9b14,0x9b15,0x9b16,0x9b17,0x9b18,0x9b19, 0x9b1a,0x9b1b,0x9b1c,0x9b1d,0x9b1e,0x9b20,0x9b21,0x9b22, @@ -2931,7 +2932,7 @@ const unsigned short cp936_ucs_table[] = { 0x7ff3,0x7cf8,0x7d77,0x7da6,0x7dae,0x7e47,0x7e9b,0x9eb8, 0x9eb4,0x8d73,0x8d84,0x8d94,0x8d91,0x8db1,0x8d67,0x8d6d, 0x8c47,0x8c49,0x914a,0x9150,0x914e,0x914f,0x9164,0x0000, -/* 0xf500 */ +/* 0xF540 */ 0x9b7c,0x9b7d,0x9b7e,0x9b7f,0x9b80,0x9b81,0x9b82,0x9b83, 0x9b84,0x9b85,0x9b86,0x9b87,0x9b88,0x9b89,0x9b8a,0x9b8b, 0x9b8c,0x9b8d,0x9b8e,0x9b8f,0x9b90,0x9b91,0x9b92,0x9b93, @@ -2956,7 +2957,7 @@ const unsigned short cp936_ucs_table[] = { 0x8e4a,0x8e70,0x8e76,0x8e7c,0x8e6f,0x8e74,0x8e85,0x8e8f, 0x8e94,0x8e90,0x8e9c,0x8e9e,0x8c78,0x8c82,0x8c8a,0x8c85, 0x8c98,0x8c94,0x659b,0x89d6,0x89de,0x89da,0x89dc,0x0000, -/* 0xf600 */ +/* 0xF640 */ 0x9bdc,0x9bdd,0x9bde,0x9bdf,0x9be0,0x9be1,0x9be2,0x9be3, 0x9be4,0x9be5,0x9be6,0x9be7,0x9be8,0x9be9,0x9bea,0x9beb, 0x9bec,0x9bed,0x9bee,0x9bef,0x9bf0,0x9bf1,0x9bf2,0x9bf3, @@ -2981,7 +2982,7 @@ const unsigned short cp936_ucs_table[] = { 0x9ca8,0x9ca9,0x9cab,0x9cad,0x9cae,0x9cb0,0x9cb1,0x9cb2, 0x9cb3,0x9cb4,0x9cb5,0x9cb6,0x9cb7,0x9cba,0x9cbb,0x9cbc, 0x9cbd,0x9cc4,0x9cc5,0x9cc6,0x9cc7,0x9cca,0x9ccb,0x0000, -/* 0xf700 */ +/* 0xF740 */ 0x9c3c,0x9c3d,0x9c3e,0x9c3f,0x9c40,0x9c41,0x9c42,0x9c43, 0x9c44,0x9c45,0x9c46,0x9c47,0x9c48,0x9c49,0x9c4a,0x9c4b, 0x9c4c,0x9c4d,0x9c4e,0x9c4f,0x9c50,0x9c51,0x9c52,0x9c53, @@ -3006,7 +3007,7 @@ const unsigned short cp936_ucs_table[] = { 0x9e92,0x93d6,0x9e9d,0x9e9f,0x9edb,0x9edc,0x9edd,0x9ee0, 0x9edf,0x9ee2,0x9ee9,0x9ee7,0x9ee5,0x9eea,0x9eef,0x9f22, 0x9f2c,0x9f2f,0x9f39,0x9f37,0x9f3d,0x9f3e,0x9f44,0x0000, -/* 0xf800 */ +/* 0xF840 */ 0x9ce3,0x9ce4,0x9ce5,0x9ce6,0x9ce7,0x9ce8,0x9ce9,0x9cea, 0x9ceb,0x9cec,0x9ced,0x9cee,0x9cef,0x9cf0,0x9cf1,0x9cf2, 0x9cf3,0x9cf4,0x9cf5,0x9cf6,0x9cf7,0x9cf8,0x9cf9,0x9cfa, @@ -3031,7 +3032,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xf900 */ +/* 0xF940 */ 0x9d43,0x9d44,0x9d45,0x9d46,0x9d47,0x9d48,0x9d49,0x9d4a, 0x9d4b,0x9d4c,0x9d4d,0x9d4e,0x9d4f,0x9d50,0x9d51,0x9d52, 0x9d53,0x9d54,0x9d55,0x9d56,0x9d57,0x9d58,0x9d59,0x9d5a, @@ -3056,7 +3057,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfa00 */ +/* 0xFA40 */ 0x9da3,0x9da4,0x9da5,0x9da6,0x9da7,0x9da8,0x9da9,0x9daa, 0x9dab,0x9dac,0x9dad,0x9dae,0x9daf,0x9db0,0x9db1,0x9db2, 0x9db3,0x9db4,0x9db5,0x9db6,0x9db7,0x9db8,0x9db9,0x9dba, @@ -3081,7 +3082,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfb00 */ +/* 0xFB40 */ 0x9e03,0x9e04,0x9e05,0x9e06,0x9e07,0x9e08,0x9e09,0x9e0a, 0x9e0b,0x9e0c,0x9e0d,0x9e0e,0x9e0f,0x9e10,0x9e11,0x9e12, 0x9e13,0x9e14,0x9e15,0x9e16,0x9e17,0x9e18,0x9e19,0x9e1a, @@ -3106,7 +3107,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfc00 */ +/* 0xFC40 */ 0x9eab,0x9eac,0x9ead,0x9eae,0x9eaf,0x9eb0,0x9eb1,0x9eb2, 0x9eb3,0x9eb5,0x9eb6,0x9eb7,0x9eb9,0x9eba,0x9ebc,0x9ebf, 0x9ec0,0x9ec1,0x9ec2,0x9ec3,0x9ec5,0x9ec6,0x9ec7,0x9ec8, @@ -3131,7 +3132,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfd00 */ +/* 0xFD40 */ 0x9f32,0x9f33,0x9f34,0x9f35,0x9f36,0x9f38,0x9f3a,0x9f3c, 0x9f3f,0x9f40,0x9f41,0x9f42,0x9f43,0x9f45,0x9f46,0x9f47, 0x9f48,0x9f49,0x9f4a,0x9f4b,0x9f4c,0x9f4d,0x9f4e,0x9f4f, @@ -3156,7 +3157,7 @@ const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfe00 */ +/* 0xFE40 */ 0xfa0c,0xfa0d,0xfa0e,0xfa0f,0xfa11,0xfa13,0xfa14,0xfa18, 0xfa1f,0xfa20,0xfa21,0xfa23,0xfa24,0xfa27,0xfa28,0xfa29, 0x2e81,0x0000,0x0000,0x0000,0x2e84,0x3473,0x3447,0x2e88, @@ -3173,6 +3174,216 @@ const unsigned short cp936_ucs_table[] = { const int cp936_ucs_table_size = (sizeof(cp936_ucs_table)/sizeof(unsigned short)); +const unsigned short cp936_pua_tbl1[] = { +/* 0xA2AB */ +0xE766,0xE767,0xE768,0xE769,0xE76A, +0xE76B,0x2488,0x2489,0x248a,0x248b,0x248c,0x248d,0x248e, +0x248f,0x2490,0x2491,0x2492,0x2493,0x2494,0x2495,0x2496, +0x2497,0x2498,0x2499,0x249a,0x249b,0x2474,0x2475,0x2476, +0x2477,0x2478,0x2479,0x247a,0x247b,0x247c,0x247d,0x247e, +0x247f,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486, +0x2487,0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466, +0x2467,0x2468,0x2469,0xE76C,0xE76D,0x3220,0x3221,0x3222, +0x3223,0x3224,0x3225,0x3226,0x3227,0x3228,0x3229,0xE76E, +0xE76F,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, +0x2167,0x2168,0x2169,0x216a,0x216b,0xE770,0xE771,0x0000, +/* 0xA340 */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0xff01,0xff02,0xff03,0xffe5,0xff05,0xff06,0xff07, +0xff08,0xff09,0xff0a,0xff0b,0xff0c,0xff0d,0xff0e,0xff0f, +0xff10,0xff11,0xff12,0xff13,0xff14,0xff15,0xff16,0xff17, +0xff18,0xff19,0xff1a,0xff1b,0xff1c,0xff1d,0xff1e,0xff1f, +0xff20,0xff21,0xff22,0xff23,0xff24,0xff25,0xff26,0xff27, +0xff28,0xff29,0xff2a,0xff2b,0xff2c,0xff2d,0xff2e,0xff2f, +0xff30,0xff31,0xff32,0xff33,0xff34,0xff35,0xff36,0xff37, +0xff38,0xff39,0xff3a,0xff3b,0xff3c,0xff3d,0xff3e,0xff3f, +0xff40,0xff41,0xff42,0xff43,0xff44,0xff45,0xff46,0xff47, +0xff48,0xff49,0xff4a,0xff4b,0xff4c,0xff4d,0xff4e,0xff4f, +0xff50,0xff51,0xff52,0xff53,0xff54,0xff55,0xff56,0xff57, +0xff58,0xff59,0xff5a,0xff5b,0xff5c,0xff5d,0xffe3,0x0000, +/* 0xA440 */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047, +0x3048,0x3049,0x304a,0x304b,0x304c,0x304d,0x304e,0x304f, +0x3050,0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057, +0x3058,0x3059,0x305a,0x305b,0x305c,0x305d,0x305e,0x305f, +0x3060,0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067, +0x3068,0x3069,0x306a,0x306b,0x306c,0x306d,0x306e,0x306f, +0x3070,0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077, +0x3078,0x3079,0x307a,0x307b,0x307c,0x307d,0x307e,0x307f, +0x3080,0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087, +0x3088,0x3089,0x308a,0x308b,0x308c,0x308d,0x308e,0x308f, +0x3090,0x3091,0x3092,0x3093,0xE772,0xE773,0xE774,0xE775, +0xE776,0xE777,0xE778,0xE779,0xE77A,0xE77B,0xE77C,0x0000, +/* 0xA540 */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x30a1,0x30a2,0x30a3,0x30a4,0x30a5,0x30a6,0x30a7, +0x30a8,0x30a9,0x30aa,0x30ab,0x30ac,0x30ad,0x30ae,0x30af, +0x30b0,0x30b1,0x30b2,0x30b3,0x30b4,0x30b5,0x30b6,0x30b7, +0x30b8,0x30b9,0x30ba,0x30bb,0x30bc,0x30bd,0x30be,0x30bf, +0x30c0,0x30c1,0x30c2,0x30c3,0x30c4,0x30c5,0x30c6,0x30c7, +0x30c8,0x30c9,0x30ca,0x30cb,0x30cc,0x30cd,0x30ce,0x30cf, +0x30d0,0x30d1,0x30d2,0x30d3,0x30d4,0x30d5,0x30d6,0x30d7, +0x30d8,0x30d9,0x30da,0x30db,0x30dc,0x30dd,0x30de,0x30df, +0x30e0,0x30e1,0x30e2,0x30e3,0x30e4,0x30e5,0x30e6,0x30e7, +0x30e8,0x30e9,0x30ea,0x30eb,0x30ec,0x30ed,0x30ee,0x30ef, +0x30f0,0x30f1,0x30f2,0x30f3,0x30f4,0x30f5,0x30f6,0xE77D, +0xE77E,0xE77F,0xE780,0xE781,0xE782,0xE783,0xE784,0x0000, +/* 0xA640 */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397, +0x0398,0x0399,0x039a,0x039b,0x039c,0x039d,0x039e,0x039f, +0x03a0,0x03a1,0x03a3,0x03a4,0x03a5,0x03a6,0x03a7,0x03a8, +0x03a9,0xE785,0xE786,0xE787,0xE788,0xE789,0xE78A,0xE78B, +0xE78C,0x03b1,0x03b2,0x03b3,0x03b4,0x03b5,0x03b6,0x03b7, +0x03b8,0x03b9,0x03ba,0x03bb,0x03bc,0x03bd,0x03be,0x03bf, +0x03c0,0x03c1,0x03c3,0x03c4,0x03c5,0x03c6,0x03c7,0x03c8, +0x03c9,0xE78D,0xE78E,0xE78F,0xE790,0xE791,0xE792,0xE793, +0xfe35,0xfe36,0xfe39,0xfe3a,0xfe3f,0xfe40,0xfe3d,0xfe3e, +0xfe41,0xfe42,0xfe43,0xfe44,0xE794,0xE795,0xfe3b,0xfe3c, +0xfe37,0xfe38,0xfe31,0xE796,0xfe33,0xfe34,0xE797,0xE798, +0xE799,0xE79A,0xE79B,0xE79C,0xE79D,0xE79E,0xE79F,0x0000, +/* 0xA740 */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401, +0x0416,0x0417,0x0418,0x0419,0x041a,0x041b,0x041c,0x041d, +0x041e,0x041f,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425, +0x0426,0x0427,0x0428,0x0429,0x042a,0x042b,0x042c,0x042d, +0x042e,0x042f,0xE7A0,0xE7A1,0xE7A2,0xE7A3,0xE7A4,0xE7A5, +0xE7A6,0xE7A7,0xE7A8,0xE7A9,0xE7AA,0xE7AB,0xE7AC,0xE7AD, +0xE7AE,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451, +0x0436,0x0437,0x0438,0x0439,0x043a,0x043b,0x043c,0x043d, +0x043e,0x043f,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445, +0x0446,0x0447,0x0448,0x0449,0x044a,0x044b,0x044c,0x044d, +0x044e,0x044f,0xE7AF,0xE7B0,0xE7B1,0xE7B2,0xE7B3,0xE7B4, +0xE7B5,0xE7B6,0xE7B7,0xE7B8,0xE7B9,0xE7BA,0xE7BB,0x0000, +/* 0xA840 */ +0x02ca,0x02cb,0x02d9,0x2013,0x2015,0x2025,0x2035,0x2105, +0x2109,0x2196,0x2197,0x2198,0x2199,0x2215,0x221f,0x2223, +0x2252,0x2266,0x2267,0x22bf,0x2550,0x2551,0x2552,0x2553, +0x2554,0x2555,0x2556,0x2557,0x2558,0x2559,0x255a,0x255b, +0x255c,0x255d,0x255e,0x255f,0x2560,0x2561,0x2562,0x2563, +0x2564,0x2565,0x2566,0x2567,0x2568,0x2569,0x256a,0x256b, +0x256c,0x256d,0x256e,0x256f,0x2570,0x2571,0x2572,0x2573, +0x2581,0x2582,0x2583,0x2584,0x2585,0x2586,0x2587,0x0000, +0x2588,0x2589,0x258a,0x258b,0x258c,0x258d,0x258e,0x258f, +0x2593,0x2594,0x2595,0x25bc,0x25bd,0x25e2,0x25e3,0x25e4, +0x25e5,0x2609,0x2295,0x3012,0x301d,0x301e,0xE7BC,0xE7BD, +0xE7BE,0xE7BF,0xE7C0,0xE7C1,0xE7C2,0xE7C3,0xE7C4,0xE7C5, +0xE7C6,0x0101,0x00e1,0x01ce,0x00e0,0x0113,0x00e9,0x011b, +0x00e8,0x012b,0x00ed,0x01d0,0x00ec,0x014d,0x00f3,0x01d2, +0x00f2,0x016b,0x00fa,0x01d4,0x00f9,0x01d6,0x01d8,0x01da, +0x01dc,0x00fc,0x00ea,0x0251,0xE7C7,0x0144,0x0148,0xE7C8, +0x0261,0xE7C9,0xE7CA,0xE7CB,0xE7CC,0x3105,0x3106,0x3107, +0x3108,0x3109,0x310a,0x310b,0x310c,0x310d,0x310e,0x310f, +0x3110,0x3111,0x3112,0x3113,0x3114,0x3115,0x3116,0x3117, +0x3118,0x3119,0x311a,0x311b,0x311c,0x311d,0x311e,0x311f, +0x3120,0x3121,0x3122,0x3123,0x3124,0x3125,0x3126,0x3127, +0x3128,0x3129,0xE7CD,0xE7CE,0xE7CF,0xE7D0,0xE7D1,0xE7D2, +0xE7D3,0xE7D4,0xE7D5,0xE7D6,0xE7D7,0xE7D8,0xE7D9,0xE7DA, +0xE7DB,0xE7DC,0xE7DD,0xE7DE,0xE7DF,0xE7E0,0xE7E1,0x0000, +/* 0xA940 */ +0x3021,0x3022,0x3023,0x3024,0x3025,0x3026,0x3027,0x3028, +0x3029,0x32a3,0x338e,0x338f,0x339c,0x339d,0x339e,0x33a1, +0x33c4,0x33ce,0x33d1,0x33d2,0x33d5,0xfe30,0xffe2,0xffe4, +0xE7E2,0x2121,0x3231,0xE7E3,0x2010,0xE7E4,0xE7E5,0xE7E6, +0x30fc,0x309b,0x309c,0x30fd,0x30fe,0x3006,0x309d,0x309e, +0xfe49,0xfe4a,0xfe4b,0xfe4c,0xfe4d,0xfe4e,0xfe4f,0xfe50, +0xfe51,0xfe52,0xfe54,0xfe55,0xfe56,0xfe57,0xfe59,0xfe5a, +0xfe5b,0xfe5c,0xfe5d,0xfe5e,0xfe5f,0xfe60,0xfe61,0x0000, +0xfe62,0xfe63,0xfe64,0xfe65,0xfe66,0xfe68,0xfe69,0xfe6a, +0xfe6b,0xE7E7,0xE7E8,0xE7E9,0xE7EA,0xE7EB,0xE7EC,0xE7ED, +0xE7EE,0xE7EF,0xE7F0,0xE7F1,0xE7F2,0xE7F3,0x3007,0xE7F4, +0xE7F5,0xE7F6,0xE7F7,0xE7F8,0xE7F9,0xE7FA,0xE7FB,0xE7FC, +0xE7FD,0xE7FE,0xE7FF,0xE800,0x2500,0x2501,0x2502,0x2503, +0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250a,0x250b, +0x250c,0x250d,0x250e,0x250f,0x2510,0x2511,0x2512,0x2513, +0x2514,0x2515,0x2516,0x2517,0x2518,0x2519,0x251a,0x251b, +0x251c,0x251d,0x251e,0x251f,0x2520,0x2521,0x2522,0x2523, +0x2524,0x2525,0x2526,0x2527,0x2528,0x2529,0x252a,0x252b, +0x252c,0x252d,0x252e,0x252f,0x2530,0x2531,0x2532,0x2533, +0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253a,0x253b, +0x253c,0x253d,0x253e,0x253f,0x2540,0x2541,0x2542,0x2543, +0x2544,0x2545,0x2546,0x2547,0x2548,0x2549,0x254a,0x254b, +0xE801,0xE802,0xE803,0xE804,0xE805,0xE806,0xE807,0xE808, +0xE809,0xE80A,0xE80B,0xE80C,0xE80D,0xE80E,0xE80F,0x0000, +}; + +const unsigned short cp936_pua_tbl2[] = { +/* 0xD7FA */ +0xE810,0xE811,0xE812,0xE813,0xE814 +}; + +const unsigned short cp936_pua_tbl3[] = { +/* 0xFE50 */ +0xE815,0xE816,0xE817,0xE818,0xE819,0xE81A,0xE81B,0xE81C, +0xE81D,0xE81E,0xE81F,0xE820,0xE821,0xE822,0xE823,0xE824, +0xE825,0xE826,0xE827,0xE828,0xE829,0xE82A,0xE82B,0xE82C, +0xE82D,0xE82E,0xE82F,0xE830,0xE831,0xE832,0xE833,0xE834, +0xE835,0xE836,0xE837,0xE838,0xE839,0xE83A,0xE83B,0xE83C, +0xE83D,0xE83E,0xE83F,0xE840,0xE841,0xE842,0xE843,0x0000, +0xE844,0xE845,0xE846,0xE847,0xE848,0xE849,0xE84A,0xE84B, +0xE84C,0xE84D,0xE84E,0xE84F,0xE850,0xE851,0xE852,0xE853, +0xE854,0xE855,0xE856,0xE857,0xE858,0xE859,0xE85A,0xE85B, +0xE85C,0xE85D,0xE85E,0xE85F,0xE860,0xE861,0xE862,0xE863, +/* 0xFEA0 */ +0xE864 +}; /* UCS -> CP936 */ const unsigned short ucs_a1_cp936_table[] = { @@ -6426,6 +6637,10 @@ static const int mbfl_cp936_pua_tbl_max = sizeof(mbfl_cp936_pua_tbl)/(sizeof(uns #else extern const unsigned short cp936_ucs_table[]; +extern const unsigned short cp936_pua_tbl1[]; +extern const unsigned short cp936_pua_tbl2[]; +extern const unsigned short cp936_pua_tbl3[]; + extern const unsigned short ucs_a1_cp936_table[]; extern const unsigned short ucs_a2_cp936_table[]; extern const unsigned short ucs_a3_cp936_table[]; From ffbddc484884b275b7f2eb4d6cf7e0035c1c6200 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 31 Dec 2022 11:19:30 +0200 Subject: [PATCH 095/895] Optimize conversion of GB18030 to Unicode As with CP936, iterating over the PUA table and looking for matches in it was a significant bottleneck for GB18030 decoding (though not as severe a bottleneck as for CP936, since more is involved in GB18030 decoding than CP936 decoding). Here are some benchmark results after optimizing out that bottleneck: GB18030, medium - to UTF-16BE - faster by 60.71% (0.0007 vs 0.0017) GB18030, medium - to UTF-8 - faster by 59.88% (0.0007 vs 0.0017) GB18030, long - to UTF-8 - faster by 44.91% (0.0669 vs 0.1214) GB18030, long - to UTF-16BE - faster by 43.05% (0.0672 vs 0.1181) GB18030, short - to UTF-8 - faster by 27.22% (0.0003 vs 0.0004) GB18030, short - to UTF-16BE - faster by 26.98% (0.0003 vs 0.0004) (The 'short' test strings had 0-5 codepoints each, 'medium' ~100 codepoints, and 'long' ~10,000 codepoints. For each benchmark, the test harness cycled through all the test strings 40,000 times.) --- .../libmbfl/filters/mbfilter_gb18030.c | 62 ++++++++++++++----- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index 492df6046244f..361ea158c0ce6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -388,6 +388,22 @@ int mbfl_filt_conv_wchar_gb18030(int c, mbfl_convert_filter *filter) return 0; } +static const unsigned short gb18030_pua_tbl3[] = { +/* 0xFE50 */ +0x0000,0xE816,0xE817,0xE818,0x0000,0x0000,0x0000,0x0000, +0x0000,0xE81E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0xE826,0x0000,0x0000,0x0000,0x0000,0xE82B,0xE82C, +0x0000,0x0000,0x0000,0x0000,0xE831,0xE832,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xE83B,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xE843,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0xE854,0xE855,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +/* 0xFEA0 */ +0xE864 +}; + static size_t mb_gb18030_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) { unsigned char *p = *in, *e = p + *in_len; @@ -398,9 +414,14 @@ static size_t mb_gb18030_to_wchar(unsigned char **in, size_t *in_len, uint32_t * if (c < 0x80) { *out++ = c; - } else if (c > 0x80 && c < 0xFF && p < e) { + } else if (c == 0x80 || c == 0xFF) { + *out++ = MBFL_BAD_INPUT; + } else { + if (p == e) { + *out++ = MBFL_BAD_INPUT; + break; + } unsigned char c2 = *p++; - unsigned int s = (c << 8) | c2; if (((c >= 0x81 && c <= 0x84) || (c >= 0x90 && c <= 0xE3)) && c2 >= 0x30 && c2 <= 0x39) { if (p >= e) { @@ -437,32 +458,39 @@ static size_t mb_gb18030_to_wchar(unsigned char **in, size_t *in_len, uint32_t * } else if (c >= 0xA1 && c <= 0xA7 && c2 >= 0x40 && c2 < 0xA1 && c2 != 0x7F) { /* UDA part 3: U+E4C6-U+E765 */ *out++ = 96*(c - 0xA1) + c2 - (c2 >= 0x80 ? 0x41 : 0x40) + 0xE4C6; - } else { - if ((s >= 0xA2AB && s <= 0xA9FE) || (s >= 0xD7FA && s <= 0xD7FE) || (s >= 0xFE50 && s <= 0xFEA0)) { - for (int i = 0; i < mbfl_gb18030_pua_tbl_max; i++) { - if (s >= mbfl_gb18030_pua_tbl[i][2] && s <= mbfl_gb18030_pua_tbl[i][2] + mbfl_gb18030_pua_tbl[i][1] - mbfl_gb18030_pua_tbl[i][0]) { - *out++ = s - mbfl_gb18030_pua_tbl[i][2] + mbfl_gb18030_pua_tbl[i][0]; - goto next_iteration; + } else if (c2 >= 0x40 && c2 != 0x7F && c2 != 0xFF) { + unsigned int w = (c - 0x81)*192 + c2 - 0x40; + + if (w >= 0x192B) { + if (w <= 0x1EBE) { + if (w != 0x1963 && w != 0x1DBF && (w < 0x1E49 || w > 0x1E55) && w != 0x1E7F) { + *out++ = cp936_pua_tbl1[w - 0x192B]; + continue; + } + } else if (w >= 0x413A) { + if (w <= 0x413E) { + *out++ = cp936_pua_tbl2[w - 0x413A]; + continue; + } else if (w >= 0x5DD0 && w <= 0x5E20) { + unsigned int c = gb18030_pua_tbl3[w - 0x5DD0]; + if (c) { + *out++ = c; + continue; + } } } } - if ((c >= 0xA1 && c <= 0xA9 && c2 >= 0xA1 && c2 <= 0xFE) || - (c >= 0xB0 && c <= 0xf7 && c2 >= 0xa1 && c2 <= 0xfe) || - (c >= 0x81 && c <= 0xa0 && c2 >= 0x40 && c2 <= 0xfe && c2 != 0x7f) || - (c >= 0xAA && c <= 0xfe && c2 >= 0x40 && c2 <= 0xa0 && c2 != 0x7f) || - (c >= 0xA8 && c <= 0xa9 && c2 >= 0x40 && c2 <= 0xa0 && c2 != 0x7F)) { - unsigned int w = (c - 0x81)*192 + c2 - 0x40; + if ((c >= 0x81 && c <= 0xA9) || (c >= 0xB0 && c <= 0xF7 && c2 >= 0xA1) || (c >= 0xAA && c <= 0xFE && c2 <= 0xA0)) { ZEND_ASSERT(w < cp936_ucs_table_size); *out++ = cp936_ucs_table[w]; } else { *out++ = MBFL_BAD_INPUT; } + } else { + *out++ = MBFL_BAD_INPUT; } - } else { - *out++ = MBFL_BAD_INPUT; } -next_iteration: ; } *in_len = e - p; From a76658b329bbbdf167172de5dc889022cdb5ef8a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 18:13:01 +0200 Subject: [PATCH 096/895] Optimize out bounds check in UHC decoder This gives a 25% speed boost for conversion operations on long strings (~10,000 codepoints). For shorter strings, the speed boost is less (as the input gets smaller, it is progressively swamped more and more by the overhead of entering and exiting the conversion function). When benchmarking string conversion speed, we are measuring not only the speed of the decoder, but also the time which it takes to re-encode the string in another encoding like UTF-8 or UTF-16. So the performance increase for functions which only need to decode but not re-encode the input string will be much more than 25%. --- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 2231fd3cb3243..abfd1ac07c1f3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -196,12 +196,16 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, unsigned char *p = *in, *e = p + *in_len; uint32_t *out = buf, *limit = buf + bufsize; + e--; /* Stop the main loop 1 byte short of the end of the input */ + while (p < e && out < limit) { unsigned char c = *p++; if (c < 0x80) { *out++ = c; - } else if (c > 0x80 && c < 0xFE && c != 0xC9 && p < e) { + } else if (c > 0x80 && c < 0xFE && c != 0xC9) { + /* We don't need to check p < e here; it's not possible that this pointer dereference + * will be outside the input string, because of e-- above */ unsigned char c2 = *p++; if (c2 < 0x41 || c2 == 0xFF) { *out++ = MBFL_BAD_INPUT; @@ -227,7 +231,13 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, } } - *in_len = e - p; + /* Finish up last byte of input string if there is one */ + if (p == e && out < limit) { + unsigned char c = *p++; + *out++ = (c < 0x80) ? c : MBFL_BAD_INPUT; + } + + *in_len = e - p + 1; *in = p; return out - buf; } From e837a8800b44719784d75870bbf8e3ffa1a34069 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 21:12:05 +0200 Subject: [PATCH 097/895] Optimize another check out of hot path for UHC decoding This gives about another 8-9% speed boost to UHC decoding. --- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index abfd1ac07c1f3..4f7b70dda7925 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -203,7 +203,7 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, if (c < 0x80) { *out++ = c; - } else if (c > 0x80 && c < 0xFE && c != 0xC9) { + } else if (c > 0x80 && c < 0xFE) { /* We don't need to check p < e here; it's not possible that this pointer dereference * will be outside the input string, because of e-- above */ unsigned char c2 = *p++; @@ -221,6 +221,15 @@ static size_t mb_uhc_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, w = (c - 0xC7)*94 + c2 - 0xA1; ZEND_ASSERT(w < uhc3_ucs_table_size); w = uhc3_ucs_table[w]; + if (!w) { + /* If c == 0xC9, we shouldn't have tried to read a 2-byte char at all... but it is faster + * to fix up that rare case here rather than include an extra check in the hot path */ + if (c == 0xC9) { + p--; + } + *out++ = MBFL_BAD_INPUT; + continue; + } } if (!w) { w = MBFL_BAD_INPUT; From 5c64cf58f7ed2f3251ec8b0a4aa8a62f84e44c1f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 4 Jan 2023 19:59:20 +0000 Subject: [PATCH 098/895] [ci skip] Add UPGRADING entry for posix changes --- UPGRADING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPGRADING b/UPGRADING index efec12d162c43..be2eb3439aeae 100644 --- a/UPGRADING +++ b/UPGRADING @@ -32,6 +32,9 @@ PHP 8.3 UPGRADE NOTES - Posix . posix_getrlimit() now takes an optional $res parameter to allow fetching a single resource limit. + . posix_isatty() now raises type warnings for integers following the usual ZPP semantics + . posix_ttyname() now raises type warnings for integers following the usual ZPP semantics + and value warnings for invalid file descriptor integers. ======================================== 3. Changes in SAPI modules From 9c283850fb36dd4fe71bf9c5699cef28da09b501 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 20:52:25 +0200 Subject: [PATCH 099/895] Optimize out another bounds check in BIG5 decoder This gives about a 9% speed boost for BIG5 encoding conversion. (Not as much as I was hoping!) --- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index b83cae36b0c1a..dafc3f5d3ec89 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -391,12 +391,16 @@ static size_t mb_big5_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf unsigned char *p = *in, *e = p + *in_len; uint32_t *out = buf, *limit = buf + bufsize; + e--; /* Stop the main loop 1 byte short of the end of the input */ + while (p < e && out < limit) { unsigned char c = *p++; if (c <= 0x7F) { *out++ = c; - } else if (c > 0xA0 && c <= 0xF9 && c != 0xC8 && p < e) { + } else if (c > 0xA0 && c <= 0xF9 && c != 0xC8) { + /* We don't need to check p < e here; it's not possible that this pointer dereference + * will be outside the input string, because of e-- above */ unsigned char c2 = *p++; if ((c2 >= 0x40 && c2 <= 0x7E) || (c2 >= 0xA1 && c2 <= 0xFE)) { @@ -414,7 +418,13 @@ static size_t mb_big5_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf } } - *in_len = e - p; + /* Finish up last byte of input string if there is one */ + if (p == e && out < limit) { + unsigned char c = *p++; + *out++ = (c <= 0x7F) ? c : MBFL_BAD_INPUT; + } + + *in_len = e - p + 1; *in = p; return out - buf; } From d75c78b0c8936daed51be1a92bdd5a91d96149a1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 1 Jan 2023 21:22:20 +0200 Subject: [PATCH 100/895] Optimize out checks in hot path for SJIS decoding This gives about a 20% speed boost when converting SJIS to some other encoding. --- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 79 +++++++++++++------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 688c82727a4ff..04027f13a3256 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -410,7 +410,7 @@ int mbfl_filt_conv_wchar_sjis(int c, mbfl_convert_filter *filter) } static const unsigned short sjis_decode_tbl1[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, -6204, -6016, -5828, -5640, -5452, -5264, -5076, -4888, -4700, -4512, -4324, -4136, -3948, -3760, -3572, -3384, -3196, -3008, -2820, -2632, -2444, -2256, -2068, -1880, -1692, -1504, -1316, -1128, -940, -752, -564, -376, -188, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, 5828, 6016, 6204, 6392, 6580, 6768, 6956, 7144, 7332, 7520, 7708, 7896, 8084, 8272, 8460, 8648, 8836, 9024, 9212, 9400, 9588, 9776, 9964, 10152, 10340, 10528, 10716, 10904, 11092 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFF, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, 0xFFFF, -6016, -5828, -5640, -5452, -5264, -5076, -4888, -4700, -4512, -4324, -4136, -3948, -3760, -3572, -3384, -3196, -3008, -2820, -2632, -2444, -2256, -2068, -1880, -1692, -1504, -1316, -1128, -940, -752, -564, -376, -188, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, 5828, 6016, 6204, 6392, 6580, 6768, 6956, 7144, 7332, 7520, 7708, 7896, 8084, 8272, 8460, 8648, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF }; static const unsigned short sjis_decode_tbl2[] = { @@ -422,6 +422,8 @@ static size_t mb_sjis_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf unsigned char *p = *in, *e = p + *in_len; uint32_t *out = buf, *limit = buf + bufsize; + e--; /* Stop the main loop 1 byte short of the end of the input */ + while (p < e && out < limit) { unsigned char c = *p++; @@ -429,12 +431,15 @@ static size_t mb_sjis_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf *out++ = c; } else if (c >= 0xA1 && c <= 0xDF) { /* Kana */ *out++ = 0xFEC0 + c; - } else if (c > 0x80 && c <= 0xEF && c != 0xA0 && p < e) { + } else { + /* Don't need to check p < e; it's not possible to go out of bounds here, due to e-- above */ unsigned char c2 = *p++; /* This is only legal if c2 >= 0x40 && c2 <= 0xFC && c2 != 0x7F * But the values in the above conversion tables have been chosen such that * illegal values of c2 will always result in w > jisx0208_ucs_table_size, - * so we don't need to do a separate bounds check on c2 */ + * so we don't need to do a separate bounds check on c2 + * Likewise, the values in the conversion tables are such that illegal values + * for c will always result in w > jisx0208_ucs_table_size */ uint32_t w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w < jisx0208_ucs_table_size) { w = jisx0208_ucs_table[w]; @@ -442,14 +447,27 @@ static size_t mb_sjis_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf w = MBFL_BAD_INPUT; *out++ = w; } else { + if (c == 0x80 || c == 0xA0 || c > 0xEF) { + p--; + } *out++ = MBFL_BAD_INPUT; } + } + } + + /* Finish up last byte of input string if there is one */ + if (p == e && out < limit) { + unsigned char c = *p++; + if (c <= 0x7F) { + *out++ = c; + } else if (c >= 0xA1 && c <= 0xDF) { + *out++ = 0xFEC0 + c; } else { *out++ = MBFL_BAD_INPUT; } } - *in_len = e - p; + *in_len = e - p + 1; *in = p; return out - buf; } @@ -1057,11 +1075,17 @@ static size_t mb_sjismac_to_wchar(unsigned char **in, size_t *in_len, uint32_t * while (p < e && out < limit) { unsigned char c = *p++; - if (c < 0x80 && c != 0x5C) { - *out++ = c; + if (c <= 0x80 || c == 0xA0) { + if (c == 0x5C) { + *out++ = 0xA5; + } else if (c == 0x80) { + *out++ = 0x5C; + } else { + *out++ = c; + } } else if (c >= 0xA1 && c <= 0xDF) { *out++ = 0xFEC0 + c; - } else if (c > 0x80 && c <= 0xED && c != 0xA0) { + } else if (c <= 0xED) { if (p == e) { *out++ = MBFL_BAD_INPUT; break; @@ -1162,12 +1186,6 @@ static size_t mb_sjismac_to_wchar(unsigned char **in, size_t *in_len, uint32_t * } else { *out++ = MBFL_BAD_INPUT; } - } else if (c == 0x5C) { - *out++ = 0xA5; - } else if (c == 0x80) { - *out++ = 0x5C; - } else if (c == 0xA0) { - *out++ = 0xA0; } else if (c == 0xFD) { *out++ = 0xA9; } else if (c == 0xFE) { @@ -2095,6 +2113,10 @@ int mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter) return 0; } +static const unsigned short sjis_mobile_decode_tbl1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFF, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, 0xFFFF, -6016, -5828, -5640, -5452, -5264, -5076, -4888, -4700, -4512, -4324, -4136, -3948, -3760, -3572, -3384, -3196, -3008, -2820, -2632, -2444, -2256, -2068, -1880, -1692, -1504, -1316, -1128, -940, -752, -564, -376, -188, 0, 188, 376, 564, 752, 940, 1128, 1316, 1504, 1692, 1880, 2068, 2256, 2444, 2632, 2820, 3008, 3196, 3384, 3572, 3760, 3948, 4136, 4324, 4512, 4700, 4888, 5076, 5264, 5452, 5640, 5828, 6016, 6204, 6392, 6580, 6768, 6956, 7144, 7332, 7520, 7708, 7896, 8084, 8272, 8460, 8648, 8836, 9024, 9212, 9400, 9588, 9776, 9964, 10152, 10340, 10528, 10716, 10904, 11092, 0xFFFF, 0xFFFF, 0xFFFF +}; + static size_t mb_sjis_docomo_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) { unsigned char *p = *in, *e = p + *in_len; @@ -2110,14 +2132,14 @@ static size_t mb_sjis_docomo_to_wchar(unsigned char **in, size_t *in_len, uint32 } else if (c >= 0xA1 && c <= 0xDF) { /* Kana */ *out++ = 0xFEC0 + c; - } else if (c > 0x80 && c < 0xFD && c != 0xA0) { + } else { /* Kanji */ if (p == e) { *out++ = MBFL_BAD_INPUT; break; } unsigned char c2 = *p++; - uint32_t w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; + uint32_t w = sjis_mobile_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w <= 137) { if (w == 31) { @@ -2161,13 +2183,14 @@ static size_t mb_sjis_docomo_to_wchar(unsigned char **in, size_t *in_len, uint32 } else if (w >= (94*94) && w < (114*94)) { w = w - (94*94) + 0xE000; } else { + if (c == 0x80 || c == 0xA0 || c >= 0xFD) { + p--; + } *out++ = MBFL_BAD_INPUT; continue; } *out++ = w ? w : MBFL_BAD_INPUT; - } else { - *out++ = MBFL_BAD_INPUT; } } @@ -2337,14 +2360,14 @@ static size_t mb_sjis_kddi_to_wchar(unsigned char **in, size_t *in_len, uint32_t } else if (c >= 0xA1 && c <= 0xDF) { /* Kana */ *out++ = 0xFEC0 + c; - } else if (c > 0x80 && c < 0xFD && c != 0xA0) { + } else { /* Kanji */ if (p == e) { *out++ = MBFL_BAD_INPUT; break; } unsigned char c2 = *p++; - uint32_t w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; + uint32_t w = sjis_mobile_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w <= 137) { if (w == 31) { @@ -2375,7 +2398,7 @@ static size_t mb_sjis_kddi_to_wchar(unsigned char **in, size_t *in_len, uint32_t int snd = 0; w = mbfilter_sjis_emoji_kddi2unicode(w, &snd); if (!w) { - w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; + w = sjis_mobile_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w >= (94*94) && w < (114*94)) { w = w - (94*94) + 0xE000; } @@ -2393,13 +2416,14 @@ static size_t mb_sjis_kddi_to_wchar(unsigned char **in, size_t *in_len, uint32_t } else if (w >= (94*94) && w < (114*94)) { w = w - (94*94) + 0xE000; } else { + if (c == 0x80 || c == 0xA0 || c >= 0xFD) { + p--; + } *out++ = MBFL_BAD_INPUT; continue; } *out++ = w ? w : MBFL_BAD_INPUT; - } else { - *out++ = MBFL_BAD_INPUT; } } @@ -2645,14 +2669,14 @@ static size_t mb_sjis_sb_to_wchar(unsigned char **in, size_t *in_len, uint32_t * } else if (c >= 0xA1 && c <= 0xDF) { /* Kana */ *out++ = 0xFEC0 + c; - } else if (c > 0x80 && c < 0xFD && c != 0xA0) { + } else { /* Kanji */ if (p == e) { *out++ = MBFL_BAD_INPUT; break; } unsigned char c2 = *p++; - uint32_t w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; + uint32_t w = sjis_mobile_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w <= 137) { if (w == 31) { @@ -2683,7 +2707,7 @@ static size_t mb_sjis_sb_to_wchar(unsigned char **in, size_t *in_len, uint32_t * int snd = 0; w = mbfilter_sjis_emoji_sb2unicode(w, &snd); if (!w) { - w = sjis_decode_tbl1[c] + sjis_decode_tbl2[c2]; + w = sjis_mobile_decode_tbl1[c] + sjis_decode_tbl2[c2]; if (w >= cp932ext3_ucs_table_min && w < cp932ext3_ucs_table_max) { w = cp932ext3_ucs_table[w - cp932ext3_ucs_table_min]; } else if (w >= (94*94) && w < (114*94)) { @@ -2703,13 +2727,14 @@ static size_t mb_sjis_sb_to_wchar(unsigned char **in, size_t *in_len, uint32_t * } else if (w >= (94*94) && w < (114*94)) { w = w - (94*94) + 0xE000; } else { + if (c == 0x80 || c == 0xA0 || c >= 0xFD) { + p--; + } *out++ = MBFL_BAD_INPUT; continue; } *out++ = w ? w : MBFL_BAD_INPUT; - } else { - *out++ = MBFL_BAD_INPUT; } } From 204694cc71383eae9e54934a20c8dee885e16ded Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 3 Jan 2023 09:36:46 +0200 Subject: [PATCH 101/895] Optimize out more checks from hot path for BIG5 decoding This boosts the speed of BIG5 encoding conversion by just 1-2%. I tried various other tweaks to the BIG5 decoding routine to see if I could make it faster at the cost of using a larger conversion table, but at least on the machine I am using for benchmarking, these other changes just made things slower. --- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 8 +- .../libmbfl/filters/unicode_table_big5.h | 358 +++++++++++++----- 2 files changed, 268 insertions(+), 98 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index dafc3f5d3ec89..081fc49afc3e1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -398,7 +398,7 @@ static size_t mb_big5_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf if (c <= 0x7F) { *out++ = c; - } else if (c > 0xA0 && c <= 0xF9 && c != 0xC8) { + } else if (c > 0xA0 && c <= 0xF9) { /* We don't need to check p < e here; it's not possible that this pointer dereference * will be outside the input string, because of e-- above */ unsigned char c2 = *p++; @@ -407,8 +407,12 @@ static size_t mb_big5_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf unsigned int w = (c - 0xA1)*157 + c2 - ((c2 <= 0x7E) ? 0x40 : 0xA1 - 0x3F); ZEND_ASSERT(w < big5_ucs_table_size); w = big5_ucs_table[w]; - if (!w) + if (!w) { + if (c == 0xC8) { + p--; + } w = MBFL_BAD_INPUT; + } *out++ = w; } else { *out++ = MBFL_BAD_INPUT; diff --git a/ext/mbstring/libmbfl/filters/unicode_table_big5.h b/ext/mbstring/libmbfl/filters/unicode_table_big5.h index 88f71d808d58a..44daf3595a46b 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_big5.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_big5.h @@ -27,6 +27,7 @@ /* Big5 -> UCS */ static const unsigned short big5_ucs_table[] = { +/* 0xA140 */ 0x3000,0xff0c,0x3001,0x3002,0xff0e,0x2022,0xff1b,0xff1a, 0xff1f,0xff01,0xfe30,0x2026,0x2025,0xfe50,0xff64,0xfe52, 0x00b7,0xfe54,0xfe55,0xfe56,0xfe57,0xff5c,0x2013,0xfe31, @@ -46,7 +47,9 @@ static const unsigned short big5_ucs_table[] = { 0xfe66,0x223c,0x2229,0x222a,0x22a5,0x2220,0x221f,0x22bf, 0x33d2,0x33d1,0x222b,0x222e,0x2235,0x2234,0x2640,0x2642, 0x2641,0x2609,0x2191,0x2193,0x2190,0x2192,0x2196,0x2197, -0x2199,0x2198,0x2225,0x2223,0x0000,0x0000,0xff0f,0xff3c, +0x2199,0x2198,0x2225,0x2223,0x0000, +/* 0xA240 */ +0x0000,0xff0f,0xff3c, 0xff04,0xffe5,0x3012,0x00a2,0x00a3,0xff05,0xff20,0x2103, 0x2109,0xfe69,0xfe6a,0xfe6b,0x33d5,0x339c,0x339d,0x339e, 0x33ce,0x33a1,0x338e,0x338f,0x33c4,0x00b0,0x5159,0x515b, @@ -66,7 +69,9 @@ static const unsigned short big5_ucs_table[] = { 0xff37,0xff38,0xff39,0xff3a,0xff41,0xff42,0xff43,0xff44, 0xff45,0xff46,0xff47,0xff48,0xff49,0xff4a,0xff4b,0xff4c, 0xff4d,0xff4e,0xff4f,0xff50,0xff51,0xff52,0xff53,0xff54, -0xff55,0xff56,0xff57,0xff58,0xff59,0xff5a,0x0391,0x0392, +0xff55,0xff56, +/* 0xA340 */ +0xff57,0xff58,0xff59,0xff5a,0x0391,0x0392, 0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039a, 0x039b,0x039c,0x039d,0x039e,0x039f,0x03a0,0x03a1,0x03a3, 0x03a4,0x03a5,0x03a6,0x03a7,0x03a8,0x03a9,0x03b1,0x03b2, @@ -85,7 +90,9 @@ static const unsigned short big5_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4e00, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +/* 0xA440 */ +0x4e00, 0x4e59,0x4e01,0x4e03,0x4e43,0x4e5d,0x4e86,0x4e8c,0x4eba, 0x513f,0x5165,0x516b,0x51e0,0x5200,0x5201,0x529b,0x5315, 0x5341,0x535c,0x53c8,0x4e09,0x4e0b,0x4e08,0x4e0a,0x4e2b, @@ -105,7 +112,9 @@ static const unsigned short big5_ucs_table[] = { 0x624e,0x652f,0x6587,0x6597,0x65a4,0x65b9,0x65e5,0x66f0, 0x6708,0x6728,0x6b20,0x6b62,0x6b79,0x6bcb,0x6bd4,0x6bdb, 0x6c0f,0x6c34,0x706b,0x722a,0x7236,0x723b,0x7247,0x7259, -0x725b,0x72ac,0x738b,0x4e19,0x4e16,0x4e15,0x4e14,0x4e18, +0x725b,0x72ac,0x738b,0x4e19, +/* 0xA540 */ +0x4e16,0x4e15,0x4e14,0x4e18, 0x4e3b,0x4e4d,0x4e4f,0x4e4e,0x4ee5,0x4ed8,0x4ed4,0x4ed5, 0x4ed6,0x4ed7,0x4ee3,0x4ee4,0x4ed9,0x4ede,0x5145,0x5144, 0x5189,0x518a,0x51ac,0x51f9,0x51fa,0x51f8,0x520a,0x52a0, @@ -125,7 +134,9 @@ static const unsigned short big5_ucs_table[] = { 0x4ea4,0x4ea6,0x4ea5,0x4eff,0x4f09,0x4f19,0x4f0a,0x4f15, 0x4f0d,0x4f10,0x4f11,0x4f0f,0x4ef2,0x4ef6,0x4efb,0x4ef0, 0x4ef3,0x4efd,0x4f01,0x4f0b,0x5149,0x5147,0x5146,0x5148, -0x5168,0x5171,0x518d,0x51b0,0x5217,0x5211,0x5212,0x520e, +0x5168, +/* 0xA640 */ +0x5171,0x518d,0x51b0,0x5217,0x5211,0x5212,0x520e, 0x5216,0x52a3,0x5308,0x5321,0x5320,0x5370,0x5371,0x5409, 0x540f,0x540c,0x540a,0x5410,0x5401,0x540b,0x5404,0x5411, 0x540d,0x5408,0x5403,0x540e,0x5406,0x5412,0x56e0,0x56de, @@ -144,7 +155,9 @@ static const unsigned short big5_ucs_table[] = { 0x826e,0x8272,0x827e,0x866b,0x8840,0x884c,0x8863,0x897f, 0x9621,0x4e32,0x4ea8,0x4f4d,0x4f4f,0x4f47,0x4f57,0x4f5e, 0x4f34,0x4f5b,0x4f55,0x4f30,0x4f50,0x4f51,0x4f3d,0x4f3a, -0x4f38,0x4f43,0x4f54,0x4f3c,0x4f46,0x4f63,0x4f5c,0x4f60, +0x4f38,0x4f43,0x4f54,0x4f3c,0x4f46,0x4f63, +/* 0xA740 */ +0x4f5c,0x4f60, 0x4f2f,0x4f4e,0x4f36,0x4f59,0x4f5d,0x4f48,0x4f5a,0x514c, 0x514b,0x514d,0x5175,0x51b6,0x51b7,0x5225,0x5224,0x5229, 0x522a,0x5228,0x52ab,0x52a9,0x52aa,0x52ac,0x5323,0x5373, @@ -164,7 +177,9 @@ static const unsigned short big5_ucs_table[] = { 0x627e,0x6279,0x6273,0x6292,0x626f,0x6298,0x626e,0x6295, 0x6293,0x6291,0x6286,0x6539,0x653b,0x6538,0x65f1,0x66f4, 0x675f,0x674e,0x674f,0x6750,0x6751,0x675c,0x6756,0x675e, -0x6749,0x6746,0x6760,0x6753,0x6757,0x6b65,0x6bcf,0x6c42, +0x6749,0x6746,0x6760, +/* 0xA840 */ +0x6753,0x6757,0x6b65,0x6bcf,0x6c42, 0x6c5e,0x6c99,0x6c81,0x6c88,0x6c89,0x6c85,0x6c9b,0x6c6a, 0x6c7a,0x6c90,0x6c70,0x6c8c,0x6c68,0x6c96,0x6c92,0x6c7d, 0x6c83,0x6c72,0x6c7e,0x6c74,0x6c86,0x6c76,0x6c8d,0x6c94, @@ -184,6 +199,7 @@ static const unsigned short big5_ucs_table[] = { 0x51fd,0x523b,0x5238,0x5237,0x523a,0x5230,0x522e,0x5236, 0x5241,0x52be,0x52bb,0x5352,0x5354,0x5353,0x5351,0x5366, 0x5377,0x5378,0x5379,0x53d6,0x53d4,0x53d7,0x5473,0x5475, +/* 0xA940 */ 0x5496,0x5478,0x5495,0x5480,0x547b,0x5477,0x5484,0x5492, 0x5486,0x547c,0x5490,0x5471,0x5476,0x548c,0x549a,0x5462, 0x5468,0x548b,0x547d,0x548e,0x56fa,0x5783,0x5777,0x576a, @@ -203,7 +219,9 @@ static const unsigned short big5_ucs_table[] = { 0x62bd,0x62bc,0x62d0,0x62d9,0x62c7,0x62cd,0x62b5,0x62da, 0x62b1,0x62d8,0x62d6,0x62d7,0x62c6,0x62ac,0x62ce,0x653e, 0x65a7,0x65bc,0x65fa,0x6614,0x6613,0x660c,0x6606,0x6602, -0x660e,0x6600,0x660f,0x6615,0x660a,0x6607,0x670d,0x670b, +0x660e,0x6600,0x660f,0x6615,0x660a, +/* 0xAA40 */ +0x6607,0x670d,0x670b, 0x676d,0x678b,0x6795,0x6771,0x679c,0x6773,0x6777,0x6787, 0x679d,0x6797,0x676f,0x6770,0x677f,0x6789,0x677e,0x6790, 0x6775,0x679a,0x6793,0x677c,0x676a,0x6772,0x6b23,0x6b66, @@ -223,7 +241,9 @@ static const unsigned short big5_ucs_table[] = { 0x82b8,0x82a3,0x82b0,0x82be,0x82b7,0x864e,0x8671,0x521d, 0x8868,0x8ecb,0x8fce,0x8fd4,0x8fd1,0x90b5,0x90b8,0x90b1, 0x90b6,0x91c7,0x91d1,0x9577,0x9580,0x961c,0x9640,0x963f, -0x963b,0x9644,0x9642,0x96b9,0x96e8,0x9752,0x975e,0x4e9f, +0x963b,0x9644, +/* 0xAB40 */ +0x9642,0x96b9,0x96e8,0x9752,0x975e,0x4e9f, 0x4ead,0x4eae,0x4fe1,0x4fb5,0x4faf,0x4fbf,0x4fe0,0x4fd1, 0x4fcf,0x4fdd,0x4fc3,0x4fb6,0x4fd8,0x4fdf,0x4fca,0x4fd7, 0x4fae,0x4fd0,0x4fc4,0x4fc2,0x4fda,0x4fce,0x4fde,0x4fb7, @@ -242,7 +262,9 @@ static const unsigned short big5_ucs_table[] = { 0x5f87,0x5f8c,0x5f89,0x6012,0x601d,0x6020,0x6025,0x600e, 0x6028,0x604d,0x6070,0x6068,0x6062,0x6046,0x6043,0x606c, 0x606b,0x606a,0x6064,0x6241,0x62dc,0x6316,0x6309,0x62fc, -0x62ed,0x6301,0x62ee,0x62fd,0x6307,0x62f1,0x62f7,0x62ef, +0x62ed,0x6301,0x62ee,0x62fd,0x6307,0x62f1,0x62f7, +/* 0xAC40 */ +0x62ef, 0x62ec,0x62fe,0x62f4,0x6311,0x6302,0x653f,0x6545,0x65ab, 0x65bd,0x65e2,0x6625,0x662d,0x6620,0x6627,0x662f,0x661f, 0x6628,0x6631,0x6624,0x66f7,0x67ff,0x67d3,0x67f1,0x67d4, @@ -262,7 +284,9 @@ static const unsigned short big5_ucs_table[] = { 0x7814,0x780c,0x780d,0x7946,0x7949,0x7948,0x7947,0x79b9, 0x79ba,0x79d1,0x79d2,0x79cb,0x7a7f,0x7a81,0x7aff,0x7afd, 0x7c7d,0x7d02,0x7d05,0x7d00,0x7d09,0x7d07,0x7d04,0x7d06, -0x7f38,0x7f8e,0x7fbf,0x8004,0x8010,0x800d,0x8011,0x8036, +0x7f38,0x7f8e,0x7fbf,0x8004, +/* 0xAD40 */ +0x8010,0x800d,0x8011,0x8036, 0x80d6,0x80e5,0x80da,0x80c3,0x80c4,0x80cc,0x80e1,0x80db, 0x80ce,0x80de,0x80e4,0x80dd,0x81f4,0x8222,0x82e7,0x8303, 0x8305,0x82e3,0x82db,0x82e6,0x8304,0x82e5,0x8302,0x8309, @@ -282,7 +306,9 @@ static const unsigned short big5_ucs_table[] = { 0x525c,0x5254,0x525b,0x525d,0x532a,0x537f,0x539f,0x539d, 0x53df,0x54e8,0x5510,0x5501,0x5537,0x54fc,0x54e5,0x54f2, 0x5506,0x54fa,0x5514,0x54e9,0x54ed,0x54e1,0x5509,0x54ee, -0x54ea,0x54e6,0x5527,0x5507,0x54fd,0x550f,0x5703,0x5704, +0x54ea, +/* 0xAE40 */ +0x54e6,0x5527,0x5507,0x54fd,0x550f,0x5703,0x5704, 0x57c2,0x57d4,0x57cb,0x57c3,0x5809,0x590f,0x5957,0x5958, 0x595a,0x5a11,0x5a18,0x5a1c,0x5a1f,0x5a1b,0x5a13,0x59ec, 0x5a20,0x5a23,0x5a29,0x5a25,0x5a0c,0x5a09,0x5b6b,0x5c58, @@ -301,7 +327,9 @@ static const unsigned short big5_ucs_table[] = { 0x6851,0x683d,0x67f4,0x6850,0x6840,0x683c,0x6843,0x682a, 0x6845,0x6813,0x6818,0x6841,0x6b8a,0x6b89,0x6bb7,0x6c23, 0x6c27,0x6c28,0x6c26,0x6c24,0x6cf0,0x6d6a,0x6d95,0x6d88, -0x6d87,0x6d66,0x6d78,0x6d77,0x6d59,0x6d93,0x6d6c,0x6d89, +0x6d87,0x6d66,0x6d78,0x6d77,0x6d59,0x6d93, +/* 0xAF40 */ +0x6d6c,0x6d89, 0x6d6e,0x6d5a,0x6d74,0x6d69,0x6d8c,0x6d8a,0x6d79,0x6d85, 0x6d65,0x6d94,0x70ca,0x70d8,0x70e4,0x70d9,0x70c8,0x70cf, 0x7239,0x7279,0x72fc,0x72f9,0x72fd,0x72f8,0x72f7,0x7386, @@ -321,7 +349,9 @@ static const unsigned short big5_ucs_table[] = { 0x81ed,0x81ec,0x8200,0x8210,0x822a,0x822b,0x8228,0x822c, 0x82bb,0x832b,0x8352,0x8354,0x834a,0x8338,0x8350,0x8349, 0x8335,0x8334,0x834f,0x8332,0x8339,0x8336,0x8317,0x8340, -0x8331,0x8328,0x8343,0x8654,0x868a,0x86aa,0x8693,0x86a4, +0x8331,0x8328,0x8343, +/* 0xB040 */ +0x8654,0x868a,0x86aa,0x8693,0x86a4, 0x86a9,0x868c,0x86a3,0x869c,0x8870,0x8877,0x8881,0x8882, 0x887d,0x8879,0x8a18,0x8a10,0x8a0e,0x8a0c,0x8a15,0x8a0a, 0x8a17,0x8a13,0x8a16,0x8a0f,0x8a11,0x8c48,0x8c7a,0x8c79, @@ -341,6 +371,7 @@ static const unsigned short big5_ucs_table[] = { 0x5541,0x5557,0x5708,0x570b,0x5709,0x57df,0x5805,0x580a, 0x5806,0x57e0,0x57e4,0x57fa,0x5802,0x5835,0x57f7,0x57f9, 0x5920,0x5962,0x5a36,0x5a41,0x5a49,0x5a66,0x5a6a,0x5a40, +/* 0xB140 */ 0x5a3c,0x5a62,0x5a5a,0x5a46,0x5a4a,0x5b70,0x5bc7,0x5bc5, 0x5bc4,0x5bc2,0x5bbf,0x5bc6,0x5c09,0x5c08,0x5c07,0x5c60, 0x5c5c,0x5c5d,0x5d07,0x5d06,0x5d0e,0x5d1b,0x5d16,0x5d22, @@ -360,7 +391,9 @@ static const unsigned short big5_ucs_table[] = { 0x6666,0x665e,0x66f9,0x52d7,0x671b,0x6881,0x68af,0x68a2, 0x6893,0x68b5,0x687f,0x6876,0x68b1,0x68a7,0x6897,0x68b0, 0x6883,0x68c4,0x68ad,0x6886,0x6885,0x6894,0x689d,0x68a8, -0x689f,0x68a1,0x6882,0x6b32,0x6bba,0x6beb,0x6bec,0x6c2b, +0x689f,0x68a1,0x6882,0x6b32,0x6bba, +/* 0xB240 */ +0x6beb,0x6bec,0x6c2b, 0x6d8e,0x6dbc,0x6df3,0x6dd9,0x6db2,0x6de1,0x6dcc,0x6de4, 0x6dfb,0x6dfa,0x6e05,0x6dc7,0x6dcb,0x6daf,0x6dd1,0x6dae, 0x6dde,0x6df9,0x6db8,0x6df7,0x6df5,0x6dc5,0x6dd2,0x6e1a, @@ -380,7 +413,9 @@ static const unsigned short big5_ucs_table[] = { 0x8123,0x812b,0x8129,0x8130,0x8124,0x8202,0x8235,0x8237, 0x8236,0x8239,0x838e,0x839e,0x8398,0x8378,0x83a2,0x8396, 0x83bd,0x83ab,0x8392,0x838a,0x8393,0x8389,0x83a0,0x8377, -0x837b,0x837c,0x8386,0x83a7,0x8655,0x5f6a,0x86c7,0x86c0, +0x837b,0x837c, +/* 0xB340 */ +0x8386,0x83a7,0x8655,0x5f6a,0x86c7,0x86c0, 0x86b6,0x86c4,0x86b5,0x86c6,0x86cb,0x86b1,0x86af,0x86c9, 0x8853,0x889e,0x8888,0x88ab,0x8892,0x8896,0x888d,0x888b, 0x8993,0x898f,0x8a2a,0x8a1d,0x8a23,0x8a25,0x8a31,0x8a2d, @@ -399,7 +434,9 @@ static const unsigned short big5_ucs_table[] = { 0x55aa,0x5594,0x5587,0x558b,0x5583,0x55b3,0x55ae,0x559f, 0x553e,0x55b2,0x559a,0x55bb,0x55ac,0x55b1,0x557e,0x5589, 0x55ab,0x5599,0x570d,0x582f,0x582a,0x5834,0x5824,0x5830, -0x5831,0x5821,0x581d,0x5820,0x58f9,0x58fa,0x5960,0x5a77, +0x5831,0x5821,0x581d,0x5820,0x58f9,0x58fa,0x5960, +/* 0xB440 */ +0x5a77, 0x5a9a,0x5a7f,0x5a92,0x5a9b,0x5aa7,0x5b73,0x5b71,0x5bd2, 0x5bcc,0x5bd3,0x5bd0,0x5c0a,0x5c0b,0x5c31,0x5d4c,0x5d50, 0x5d34,0x5d47,0x5dfd,0x5e45,0x5e3d,0x5e40,0x5e43,0x5e7e, @@ -419,7 +456,9 @@ static const unsigned short big5_ucs_table[] = { 0x6c2c,0x6e2f,0x6e38,0x6e54,0x6e21,0x6e32,0x6e67,0x6e4a, 0x6e20,0x6e25,0x6e23,0x6e1b,0x6e5b,0x6e58,0x6e24,0x6e56, 0x6e6e,0x6e2d,0x6e26,0x6e6f,0x6e34,0x6e4d,0x6e3a,0x6e2c, -0x6e43,0x6e1d,0x6e3e,0x6ecb,0x6e89,0x6e19,0x6e4e,0x6e63, +0x6e43,0x6e1d,0x6e3e,0x6ecb, +/* 0xB540 */ +0x6e89,0x6e19,0x6e4e,0x6e63, 0x6e44,0x6e72,0x6e69,0x6e5f,0x7119,0x711a,0x7126,0x7130, 0x7121,0x7136,0x716e,0x711c,0x724c,0x7284,0x7280,0x7336, 0x7325,0x7334,0x7329,0x743a,0x742a,0x7433,0x7422,0x7425, @@ -439,7 +478,9 @@ static const unsigned short big5_ucs_table[] = { 0x83dc,0x8407,0x83d4,0x83df,0x865b,0x86df,0x86d9,0x86ed, 0x86d4,0x86db,0x86e4,0x86d0,0x86de,0x8857,0x88c1,0x88c2, 0x88b1,0x8983,0x8996,0x8a3b,0x8a60,0x8a55,0x8a5e,0x8a3c, -0x8a41,0x8a54,0x8a5b,0x8a50,0x8a46,0x8a34,0x8a3a,0x8a36, +0x8a41, +/* 0xB640 */ +0x8a54,0x8a5b,0x8a50,0x8a46,0x8a34,0x8a3a,0x8a36, 0x8a56,0x8c61,0x8c82,0x8caf,0x8cbc,0x8cb3,0x8cbd,0x8cc1, 0x8cbb,0x8cc0,0x8cb4,0x8cb7,0x8cb6,0x8cbf,0x8cb8,0x8d8a, 0x8d85,0x8d81,0x8dce,0x8ddd,0x8dcb,0x8dda,0x8dd1,0x8dcc, @@ -458,7 +499,9 @@ static const unsigned short big5_ucs_table[] = { 0x55e4,0x55ef,0x55da,0x55e1,0x55c5,0x55c6,0x55e5,0x55c9, 0x5712,0x5713,0x585e,0x5851,0x5858,0x5857,0x585a,0x5854, 0x586b,0x584c,0x586d,0x584a,0x5862,0x5852,0x584b,0x5967, -0x5ac1,0x5ac9,0x5acc,0x5abe,0x5abd,0x5abc,0x5ab3,0x5ac2, +0x5ac1,0x5ac9,0x5acc,0x5abe,0x5abd,0x5abc, +/* 0xB740 */ +0x5ab3,0x5ac2, 0x5ab2,0x5d69,0x5d6f,0x5e4c,0x5e79,0x5ec9,0x5ec8,0x5f12, 0x5f59,0x5fac,0x5fae,0x611a,0x610f,0x6148,0x611f,0x60f3, 0x611b,0x60f9,0x6101,0x6108,0x614e,0x614c,0x6144,0x614d, @@ -478,7 +521,9 @@ static const unsigned short big5_ucs_table[] = { 0x745a,0x7455,0x745f,0x745e,0x7441,0x743f,0x7459,0x745b, 0x745c,0x7576,0x7578,0x7600,0x75f0,0x7601,0x75f2,0x75f1, 0x75fa,0x75ff,0x75f4,0x75f3,0x76de,0x76df,0x775b,0x776b, -0x7766,0x775e,0x7763,0x7779,0x776a,0x776c,0x775c,0x7765, +0x7766,0x775e,0x7763, +/* 0xB840 */ +0x7779,0x776a,0x776c,0x775c,0x7765, 0x7768,0x7762,0x77ee,0x788e,0x78b0,0x7897,0x7898,0x788c, 0x7889,0x787c,0x7891,0x7893,0x787f,0x797a,0x797f,0x7981, 0x842c,0x79bd,0x7a1c,0x7a1a,0x7a20,0x7a14,0x7a1f,0x7a1e, @@ -498,6 +543,7 @@ static const unsigned short big5_ucs_table[] = { 0x8c8a,0x8c89,0x8cca,0x8cc7,0x8cc8,0x8cc4,0x8cb2,0x8cc3, 0x8cc2,0x8cc5,0x8de1,0x8ddf,0x8de8,0x8def,0x8df3,0x8dfa, 0x8dea,0x8de4,0x8de6,0x8eb2,0x8f03,0x8f09,0x8efe,0x8f0a, +/* 0xB940 */ 0x8f9f,0x8fb2,0x904b,0x904a,0x9053,0x9042,0x9054,0x903c, 0x9055,0x9050,0x9047,0x904f,0x904e,0x904d,0x9051,0x903e, 0x9041,0x9112,0x9117,0x916c,0x916a,0x9169,0x91c9,0x9237, @@ -517,7 +563,9 @@ static const unsigned short big5_ucs_table[] = { 0x5ad6,0x5ad8,0x5ae3,0x5b75,0x5bde,0x5be7,0x5be1,0x5be5, 0x5be6,0x5be8,0x5be2,0x5be4,0x5bdf,0x5c0d,0x5c62,0x5d84, 0x5d87,0x5e5b,0x5e63,0x5e55,0x5e57,0x5e54,0x5ed3,0x5ed6, -0x5f0a,0x5f46,0x5f70,0x5fb9,0x6147,0x613f,0x614b,0x6177, +0x5f0a,0x5f46,0x5f70,0x5fb9,0x6147, +/* 0xBA40 */ +0x613f,0x614b,0x6177, 0x6162,0x6163,0x615f,0x615a,0x6158,0x6175,0x622a,0x6487, 0x6458,0x6454,0x64a4,0x6478,0x645f,0x647a,0x6451,0x6467, 0x6434,0x646d,0x647b,0x6572,0x65a1,0x65d7,0x65d6,0x66a2, @@ -537,7 +585,9 @@ static const unsigned short big5_ucs_table[] = { 0x7b8f,0x7bb8,0x7b87,0x7b84,0x7cb9,0x7cbd,0x7cbe,0x7dbb, 0x7db0,0x7d9c,0x7dbd,0x7dbe,0x7da0,0x7dca,0x7db4,0x7db2, 0x7db1,0x7dba,0x7da2,0x7dbf,0x7db5,0x7db8,0x7dad,0x7dd2, -0x7dc7,0x7dac,0x7f70,0x7fe0,0x7fe1,0x7fdf,0x805e,0x805a, +0x7dc7,0x7dac, +/* 0xBB40 */ +0x7f70,0x7fe0,0x7fe1,0x7fdf,0x805e,0x805a, 0x8087,0x8150,0x8180,0x818f,0x8188,0x818a,0x817f,0x8182, 0x81e7,0x81fa,0x8207,0x8214,0x821e,0x824b,0x84c9,0x84bf, 0x84c6,0x84c4,0x8499,0x849e,0x84b2,0x849c,0x84cb,0x84b8, @@ -556,7 +606,9 @@ static const unsigned short big5_ucs_table[] = { 0x97f6,0x9817,0x9818,0x98af,0x98b1,0x9903,0x9905,0x990c, 0x9909,0x99c1,0x9aaf,0x9ab0,0x9ae6,0x9b41,0x9b42,0x9cf4, 0x9cf6,0x9cf3,0x9ebc,0x9f3b,0x9f4a,0x5104,0x5100,0x50fb, -0x50f5,0x50f9,0x5102,0x5108,0x5109,0x5105,0x51dc,0x5287, +0x50f5,0x50f9,0x5102,0x5108,0x5109,0x5105,0x51dc, +/* 0xBC40 */ +0x5287, 0x5288,0x5289,0x528d,0x528a,0x52f0,0x53b2,0x562e,0x563b, 0x5639,0x5632,0x563f,0x5634,0x5629,0x5653,0x564e,0x5657, 0x5674,0x5636,0x562f,0x5630,0x5880,0x589f,0x589e,0x58b3, @@ -576,7 +628,9 @@ static const unsigned short big5_ucs_table[] = { 0x6f66,0x6f54,0x6f86,0x6f6d,0x6f5b,0x6f78,0x6f6e,0x6f8e, 0x6f7a,0x6f70,0x6f64,0x6f97,0x6f58,0x6ed5,0x6f6f,0x6f60, 0x6f5f,0x719f,0x71ac,0x71b1,0x71a8,0x7256,0x729b,0x734e, -0x7357,0x7469,0x748b,0x7483,0x747e,0x7480,0x757f,0x7620, +0x7357,0x7469,0x748b,0x7483, +/* 0xBD40 */ +0x747e,0x7480,0x757f,0x7620, 0x7629,0x761f,0x7624,0x7626,0x7621,0x7622,0x769a,0x76ba, 0x76e4,0x778e,0x7787,0x778c,0x7791,0x778b,0x78cb,0x78c5, 0x78ba,0x78ca,0x78be,0x78d5,0x78bc,0x78d0,0x7a3f,0x7a3c, @@ -596,7 +650,9 @@ static const unsigned short big5_ucs_table[] = { 0x8ce3,0x8cdc,0x8cea,0x8ce1,0x8d6d,0x8d9f,0x8da3,0x8e2b, 0x8e10,0x8e1d,0x8e22,0x8e0f,0x8e29,0x8e1f,0x8e21,0x8e1e, 0x8eba,0x8f1d,0x8f1b,0x8f1f,0x8f29,0x8f26,0x8f2a,0x8f1c, -0x8f1e,0x8f25,0x9069,0x906e,0x9068,0x906d,0x9077,0x9130, +0x8f1e, +/* 0xBE40 */ +0x8f25,0x9069,0x906e,0x9068,0x906d,0x9077,0x9130, 0x912d,0x9127,0x9131,0x9187,0x9189,0x918b,0x9183,0x92c5, 0x92bb,0x92b7,0x92ea,0x92ac,0x92e4,0x92c1,0x92b3,0x92bc, 0x92d2,0x92c7,0x92f0,0x92b2,0x95ad,0x95b1,0x9704,0x9706, @@ -615,7 +671,9 @@ static const unsigned short big5_ucs_table[] = { 0x64d4,0x64be,0x6574,0x66c6,0x66c9,0x66b9,0x66c4,0x66c7, 0x66b8,0x6a3d,0x6a38,0x6a3a,0x6a59,0x6a6b,0x6a58,0x6a39, 0x6a44,0x6a62,0x6a61,0x6a4b,0x6a47,0x6a35,0x6a5f,0x6a48, -0x6b59,0x6b77,0x6c05,0x6fc2,0x6fb1,0x6fa1,0x6fc3,0x6fa4, +0x6b59,0x6b77,0x6c05,0x6fc2,0x6fb1,0x6fa1, +/* 0xBF40 */ +0x6fc3,0x6fa4, 0x6fc1,0x6fa7,0x6fb3,0x6fc0,0x6fb9,0x6fb6,0x6fa6,0x6fa0, 0x6fb4,0x71be,0x71c9,0x71d0,0x71d2,0x71c8,0x71d5,0x71b9, 0x71ce,0x71d9,0x71dc,0x71c3,0x71c4,0x7368,0x749c,0x74a3, @@ -635,7 +693,9 @@ static const unsigned short big5_ucs_table[] = { 0x8e42,0x8e39,0x8e35,0x8f3b,0x8f2f,0x8f38,0x8f33,0x8fa8, 0x8fa6,0x9075,0x9074,0x9078,0x9072,0x907c,0x907a,0x9134, 0x9192,0x9320,0x9336,0x92f8,0x9333,0x932f,0x9322,0x92fc, -0x932b,0x9304,0x931a,0x9310,0x9326,0x9321,0x9315,0x932e, +0x932b,0x9304,0x931a, +/* 0xC040 */ +0x9310,0x9326,0x9321,0x9315,0x932e, 0x9319,0x95bb,0x96a7,0x96a8,0x96aa,0x96d5,0x970e,0x9711, 0x9716,0x970d,0x9713,0x970f,0x975b,0x975c,0x9766,0x9798, 0x9830,0x9838,0x983b,0x9837,0x982d,0x9839,0x9824,0x9910, @@ -655,6 +715,7 @@ static const unsigned short big5_ucs_table[] = { 0x71df,0x71ee,0x71e6,0x71e5,0x71ed,0x71ec,0x71f4,0x71e0, 0x7235,0x7246,0x7370,0x7372,0x74a9,0x74b0,0x74a6,0x74a8, 0x7646,0x7642,0x764c,0x76ea,0x77b3,0x77aa,0x77b0,0x77ac, +/* 0xC140 */ 0x77a7,0x77ad,0x77ef,0x78f7,0x78fa,0x78f4,0x78ef,0x7901, 0x79a7,0x79aa,0x7a57,0x7abf,0x7c07,0x7c0d,0x7bfe,0x7bf7, 0x7c0c,0x7be0,0x7ce0,0x7cdc,0x7cde,0x7ce2,0x7cdf,0x7cd9, @@ -674,7 +735,9 @@ static const unsigned short big5_ucs_table[] = { 0x9382,0x9328,0x9375,0x934a,0x9365,0x934b,0x9318,0x937e, 0x936c,0x935b,0x9370,0x935a,0x9354,0x95ca,0x95cb,0x95cc, 0x95c8,0x95c6,0x96b1,0x96b8,0x96d6,0x971c,0x971e,0x97a0, -0x97d3,0x9846,0x98b6,0x9935,0x9a01,0x99ff,0x9bae,0x9bab, +0x97d3,0x9846,0x98b6,0x9935,0x9a01, +/* 0xC240 */ +0x99ff,0x9bae,0x9bab, 0x9baa,0x9bad,0x9d3b,0x9d3f,0x9e8b,0x9ecf,0x9ede,0x9edc, 0x9edd,0x9edb,0x9f3e,0x9f4b,0x53e2,0x5695,0x56ae,0x58d9, 0x58d8,0x5b38,0x5f5d,0x61e3,0x6233,0x64f4,0x64f2,0x64fe, @@ -694,7 +757,9 @@ static const unsigned short big5_ucs_table[] = { 0x91ab,0x91ac,0x91d0,0x9394,0x938a,0x9396,0x93a2,0x93b3, 0x93ae,0x93ac,0x93b0,0x9398,0x939a,0x9397,0x95d4,0x95d6, 0x95d0,0x95d5,0x96e2,0x96dc,0x96d9,0x96db,0x96de,0x9724, -0x97a3,0x97a6,0x97ad,0x97f9,0x984d,0x984f,0x984c,0x984e, +0x97a3,0x97a6, +/* 0xC340 */ +0x97ad,0x97f9,0x984d,0x984f,0x984c,0x984e, 0x9853,0x98ba,0x993e,0x993f,0x993d,0x992e,0x99a5,0x9a0e, 0x9ac1,0x9b03,0x9b06,0x9b4f,0x9b4e,0x9b4d,0x9bca,0x9bc9, 0x9bfd,0x9bc8,0x9bc0,0x9d51,0x9d5d,0x9d60,0x9ee0,0x9f15, @@ -713,7 +778,9 @@ static const unsigned short big5_ucs_table[] = { 0x8e74,0x8f54,0x8f4e,0x8fad,0x908a,0x908b,0x91b1,0x91ae, 0x93e1,0x93d1,0x93df,0x93c3,0x93c8,0x93dc,0x93dd,0x93d6, 0x93e2,0x93cd,0x93d8,0x93e4,0x93d7,0x93e8,0x95dc,0x96b4, -0x96e3,0x972a,0x9727,0x9761,0x97dc,0x97fb,0x985e,0x9858, +0x96e3,0x972a,0x9727,0x9761,0x97dc,0x97fb,0x985e, +/* 0xC440 */ +0x9858, 0x985b,0x98bc,0x9945,0x9949,0x9a16,0x9a19,0x9b0d,0x9be8, 0x9be7,0x9bd6,0x9bdb,0x9d89,0x9d61,0x9d72,0x9d6a,0x9d6c, 0x9e92,0x9e97,0x9e93,0x9eb4,0x52f8,0x56a8,0x56b7,0x56b6, @@ -733,7 +800,9 @@ static const unsigned short big5_ucs_table[] = { 0x6595,0x66e9,0x6afb,0x6b04,0x6afa,0x6bb2,0x704c,0x721b, 0x72a7,0x74d6,0x74d4,0x7669,0x77d3,0x7c50,0x7e8f,0x7e8c, 0x7fbc,0x8617,0x862d,0x861a,0x8823,0x8822,0x8821,0x881f, -0x896a,0x896c,0x89bd,0x8b74,0x8b77,0x8b7d,0x8d13,0x8e8a, +0x896a,0x896c,0x89bd,0x8b74, +/* 0xC540 */ +0x8b77,0x8b7d,0x8d13,0x8e8a, 0x8e8d,0x8e8b,0x8f5f,0x8faf,0x91ba,0x942e,0x9433,0x9435, 0x943a,0x9438,0x9432,0x942b,0x95e2,0x9738,0x9739,0x9732, 0x97ff,0x9867,0x9865,0x9957,0x9a45,0x9a43,0x9a40,0x9a3e, @@ -753,7 +822,9 @@ static const unsigned short big5_ucs_table[] = { 0x9a5b,0x9a57,0x9ad3,0x9ad4,0x9ad1,0x9c54,0x9c57,0x9c56, 0x9de5,0x9e9f,0x9ef4,0x56d1,0x58e9,0x652c,0x705e,0x7671, 0x7672,0x77d7,0x7f50,0x7f88,0x8836,0x8839,0x8862,0x8b93, -0x8b92,0x8b96,0x8277,0x8d1b,0x91c0,0x946a,0x9742,0x9748, +0x8b92, +/* 0xC640 */ +0x8b96,0x8277,0x8d1b,0x91c0,0x946a,0x9742,0x9748, 0x9744,0x97c6,0x9870,0x9a5f,0x9b22,0x9b58,0x9c5f,0x9df9, 0x9dfa,0x9e7c,0x9e7d,0x9f07,0x9f77,0x9f72,0x5ef3,0x6b16, 0x7063,0x7c6c,0x7c6e,0x883b,0x89c0,0x8ea1,0x91c1,0x9472, @@ -772,7 +843,9 @@ static const unsigned short big5_ucs_table[] = { 0x307d,0x307e,0x307f,0x3080,0x3081,0x3082,0x3083,0x3084, 0x3085,0x3086,0x3087,0x3088,0x3089,0x308a,0x308b,0x308c, 0x308d,0x308e,0x308f,0x3090,0x3091,0x3092,0x3093,0x30a1, -0x30a2,0x30a3,0x30a4,0x30a5,0x30a6,0x30a7,0x30a8,0x30a9, +0x30a2,0x30a3,0x30a4,0x30a5,0x30a6,0x30a7, +/* 0xC740 */ +0x30a8,0x30a9, 0x30aa,0x30ab,0x30ac,0x30ad,0x30ae,0x30af,0x30b0,0x30b1, 0x30b2,0x30b3,0x30b4,0x30b5,0x30b6,0x30b7,0x30b8,0x30b9, 0x30ba,0x30bb,0x30bc,0x30bd,0x30be,0x30bf,0x30c0,0x30c1, @@ -792,26 +865,29 @@ static const unsigned short big5_ucs_table[] = { 0x044b,0x044c,0x044d,0x044e,0x044f,0x2460,0x2461,0x2462, 0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474, 0x2475,0x2476,0x2477,0x2478,0x2479,0x247a,0x247b,0x247c, -0x247d,0x0000,0x0000,0xf7ac,0xf7ad,0xf7ae,0xf7af,0xf7b0, -0xf7b1,0xf7b2,0xf7b3,0xf7b4,0xf7b5,0xf7b6,0xf7b7,0xf7b8, -0xf7b9,0xf7ba,0xf7bb,0xf7bc,0xf7bd,0xf7be,0xf7bf,0xf7c0, -0xf7c1,0xf7c2,0xf7c3,0xf7c4,0xf7c5,0xf7c6,0xf7c7,0xf7c8, -0xf7c9,0xf7ca,0xf7cb,0xf7cc,0xf7cd,0xf7ce,0xf7cf,0xf7d0, -0xf7d1,0xf7d2,0xf7d3,0xf7d4,0xf7d5,0xf7d6,0xf7d7,0xf7d8, -0xf7d9,0xf7da,0xf7db,0xf7dc,0xf7dd,0xf7de,0xf7df,0xf7e0, -0xf7e1,0xf7e2,0xf7e3,0xf7e4,0xf7e5,0xf7e6,0xf7e7,0xf7e8, -0xf7e9,0xf7ea,0xf7eb,0xf7ec,0xf7ed,0xf7ee,0xf7ef,0xf7f0, -0xf7f1,0xf7f2,0xf7f3,0xf7f4,0xf7f5,0xf7f6,0xf7f7,0xf7f8, -0xf7f9,0xf7fa,0xf7fb,0xf7fc,0xf7fd,0xf7fe,0xf7ff,0xf800, -0xf801,0xf802,0xf803,0xf804,0xf805,0xf806,0xf807,0xf808, -0xf809,0xf80a,0xf80b,0xf80c,0xf80d,0xf80e,0xf80f,0xf810, -0xf811,0xf812,0xf813,0xf814,0xf815,0xf816,0xf817,0xf818, -0xf819,0xf81a,0xf81b,0xf81c,0xf81d,0xf81e,0xf81f,0xf820, -0xf821,0xf822,0xf823,0xf824,0xf825,0xf826,0xf827,0xf828, -0xf829,0xf82a,0xf82b,0xf82c,0xf82d,0xf82e,0xf82f,0xf830, -0xf831,0xf832,0xf833,0xf834,0xf835,0xf836,0xf837,0xf838, -0xf839,0xf83a,0xf83b,0xf83c,0xf83d,0xf83e,0xf83f,0xf840, -0xf841,0xf842,0xf843,0xf844,0xf845,0xf846,0xf847,0xf848, +0x247d,0x0000,0x0000, +/* 0xC840 */ +0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +/* 0xC940 */ 0x4e42,0x4e5c,0x51f5,0x531a,0x5382,0x4e07,0x4e0c,0x4e47, 0x4e8d,0x56d7,0xfa0c,0x5c6e,0x5f73,0x4e0f,0x5187,0x4e0e, 0x4e2e,0x4e93,0x4ec2,0x4ec9,0x4ec8,0x5198,0x52fc,0x536c, @@ -831,7 +907,9 @@ static const unsigned short big5_ucs_table[] = { 0x5fcf,0x625c,0x625e,0x6264,0x6261,0x6266,0x6262,0x6259, 0x6260,0x625a,0x6265,0x65ef,0x65ee,0x673e,0x6739,0x6738, 0x673b,0x673a,0x673f,0x673c,0x6733,0x6c18,0x6c46,0x6c52, -0x6c5c,0x6c4f,0x6c4a,0x6c54,0x6c4b,0x6c4c,0x7071,0x725e, +0x6c5c,0x6c4f,0x6c4a,0x6c54,0x6c4b, +/* 0xCA40 */ +0x6c4c,0x7071,0x725e, 0x72b4,0x72b5,0x738e,0x752a,0x767f,0x7a75,0x7f51,0x8278, 0x827c,0x8280,0x827d,0x827f,0x864d,0x897e,0x9099,0x9097, 0x9098,0x909b,0x9094,0x9622,0x9624,0x9620,0x9623,0x4f56, @@ -851,7 +929,9 @@ static const unsigned short big5_ucs_table[] = { 0x5ff4,0x623a,0x6283,0x628c,0x628e,0x628f,0x6294,0x6287, 0x6271,0x627b,0x627a,0x6270,0x6281,0x6288,0x6277,0x627d, 0x6272,0x6274,0x6537,0x65f0,0x65f4,0x65f3,0x65f2,0x65f5, -0x6745,0x6747,0x6759,0x6755,0x674c,0x6748,0x675d,0x674d, +0x6745,0x6747, +/* 0xCB40 */ +0x6759,0x6755,0x674c,0x6748,0x675d,0x674d, 0x675a,0x674b,0x6bd0,0x6c19,0x6c1a,0x6c78,0x6c67,0x6c6b, 0x6c84,0x6c8b,0x6c8f,0x6c71,0x6c6f,0x6c69,0x6c9a,0x6c6d, 0x6c87,0x6c95,0x6c9c,0x6c66,0x6c73,0x6c65,0x6c7b,0x6c8e, @@ -870,7 +950,9 @@ static const unsigned short big5_ucs_table[] = { 0x5488,0x546b,0x547a,0x547e,0x5465,0x546c,0x5474,0x5466, 0x548d,0x546f,0x5461,0x5460,0x5498,0x5463,0x5467,0x5464, 0x56f7,0x56f9,0x576f,0x5772,0x576d,0x576b,0x5771,0x5770, -0x5776,0x5780,0x5775,0x577b,0x5773,0x5774,0x5762,0x5768, +0x5776,0x5780,0x5775,0x577b,0x5773,0x5774,0x5762, +/* 0xCC40 */ +0x5768, 0x577d,0x590c,0x5945,0x59b5,0x59ba,0x59cf,0x59ce,0x59b2, 0x59cc,0x59c1,0x59b6,0x59bc,0x59c3,0x59d6,0x59b1,0x59bd, 0x59c0,0x59c8,0x59b4,0x59c7,0x5b62,0x5b65,0x5b93,0x5b95, @@ -890,7 +972,9 @@ static const unsigned short big5_ucs_table[] = { 0x6783,0x677d,0x6781,0x6778,0x6779,0x6794,0x6b25,0x6b80, 0x6b7e,0x6bde,0x6c1d,0x6c93,0x6cec,0x6ceb,0x6cee,0x6cd9, 0x6cb6,0x6cd4,0x6cad,0x6ce7,0x6cb7,0x6cd0,0x6cc2,0x6cba, -0x6cc3,0x6cc6,0x6ced,0x6cf2,0x6cd2,0x6cdd,0x6cb4,0x6c8a, +0x6cc3,0x6cc6,0x6ced,0x6cf2, +/* 0xCD40 */ +0x6cd2,0x6cdd,0x6cb4,0x6c8a, 0x6c9d,0x6c80,0x6cde,0x6cc0,0x6d30,0x6ccd,0x6cc7,0x6cb0, 0x6cf9,0x6ccf,0x6ce9,0x6cd1,0x7094,0x7098,0x7085,0x7093, 0x7086,0x7084,0x7091,0x7096,0x7082,0x709a,0x7083,0x726a, @@ -910,7 +994,9 @@ static const unsigned short big5_ucs_table[] = { 0x4fd9,0x4fbb,0x4fb3,0x4fdb,0x4fc7,0x4fd6,0x4fba,0x4fc0, 0x4fb9,0x4fec,0x5244,0x5249,0x52c0,0x52c2,0x533d,0x537c, 0x5397,0x5396,0x5399,0x5398,0x54ba,0x54a1,0x54ad,0x54a5, -0x54cf,0x54c3,0x830d,0x54b7,0x54ae,0x54d6,0x54b6,0x54c5, +0x54cf, +/* 0xCE40 */ +0x54c3,0x830d,0x54b7,0x54ae,0x54d6,0x54b6,0x54c5, 0x54c6,0x54a0,0x5470,0x54bc,0x54a2,0x54be,0x5472,0x54de, 0x54b0,0x57b5,0x579e,0x579f,0x57a4,0x578c,0x5797,0x579d, 0x579b,0x5794,0x5798,0x578f,0x5799,0x57a5,0x579a,0x5795, @@ -929,7 +1015,9 @@ static const unsigned short big5_ucs_table[] = { 0x6313,0x6314,0x62fa,0x6315,0x62fb,0x62f0,0x6541,0x6543, 0x65aa,0x65bf,0x6636,0x6621,0x6632,0x6635,0x661c,0x6626, 0x6622,0x6633,0x662b,0x663a,0x661d,0x6634,0x6639,0x662e, -0x670f,0x6710,0x67c1,0x67f2,0x67c8,0x67ba,0x67dc,0x67bb, +0x670f,0x6710,0x67c1,0x67f2,0x67c8,0x67ba, +/* 0xCF40 */ +0x67dc,0x67bb, 0x67f8,0x67d8,0x67c0,0x67b7,0x67c5,0x67eb,0x67e4,0x67df, 0x67b5,0x67cd,0x67b3,0x67f7,0x67f6,0x67ee,0x67e3,0x67c2, 0x67b9,0x67ce,0x67e7,0x67f0,0x67b2,0x67fc,0x67c6,0x67ed, @@ -949,7 +1037,9 @@ static const unsigned short big5_ucs_table[] = { 0x770a,0x76f7,0x76fb,0x76fa,0x77e7,0x77e8,0x7806,0x7811, 0x7812,0x7805,0x7810,0x780f,0x780e,0x7809,0x7803,0x7813, 0x794a,0x794c,0x794b,0x7945,0x7944,0x79d5,0x79cd,0x79cf, -0x79d6,0x79ce,0x7a80,0x7a7e,0x7ad1,0x7b00,0x7b01,0x7c7a, +0x79d6,0x79ce,0x7a80, +/* 0xD040 */ +0x7a7e,0x7ad1,0x7b00,0x7b01,0x7c7a, 0x7c78,0x7c79,0x7c7f,0x7c80,0x7c81,0x7d03,0x7d08,0x7d01, 0x7f58,0x7f91,0x7f8d,0x7fbe,0x8007,0x800e,0x800f,0x8014, 0x8037,0x80d8,0x80c7,0x80e0,0x80d1,0x80c8,0x80c2,0x80d0, @@ -969,6 +1059,7 @@ static const unsigned short big5_ucs_table[] = { 0x525a,0x5252,0x525e,0x525f,0x5255,0x5262,0x52cd,0x530e, 0x539e,0x5526,0x54e2,0x5517,0x5512,0x54e7,0x54f3,0x54e4, 0x551a,0x54ff,0x5504,0x5508,0x54eb,0x5511,0x5505,0x54f1, +/* 0xD140 */ 0x550a,0x54fb,0x54f7,0x54f8,0x54e0,0x550e,0x5503,0x550b, 0x5701,0x5702,0x57cc,0x5832,0x57d5,0x57d2,0x57ba,0x57c6, 0x57bd,0x57bc,0x57b8,0x57b6,0x57bf,0x57c7,0x57d0,0x57b9, @@ -988,7 +1079,9 @@ static const unsigned short big5_ucs_table[] = { 0x6831,0x681c,0x6835,0x682b,0x682d,0x682f,0x684e,0x6844, 0x6834,0x681d,0x6812,0x6814,0x6826,0x6828,0x682e,0x684d, 0x683a,0x6825,0x6820,0x6b2c,0x6b2f,0x6b2d,0x6b31,0x6b34, -0x6b6d,0x8082,0x6b88,0x6be6,0x6be4,0x6be8,0x6be3,0x6be2, +0x6b6d,0x8082,0x6b88,0x6be6,0x6be4, +/* 0xD240 */ +0x6be8,0x6be3,0x6be2, 0x6be7,0x6c25,0x6d7a,0x6d63,0x6d64,0x6d76,0x6d0d,0x6d61, 0x6d92,0x6d58,0x6d62,0x6d6d,0x6d6f,0x6d91,0x6d8d,0x6def, 0x6d7f,0x6d86,0x6d5e,0x6d67,0x6d60,0x6d97,0x6d70,0x6d7c, @@ -1008,7 +1101,9 @@ static const unsigned short big5_ucs_table[] = { 0x7831,0x7954,0x795b,0x794f,0x795c,0x7953,0x7952,0x7951, 0x79eb,0x79ec,0x79e0,0x79ee,0x79ed,0x79ea,0x79dc,0x79de, 0x79dd,0x7a86,0x7a89,0x7a85,0x7a8b,0x7a8c,0x7a8a,0x7a87, -0x7ad8,0x7b10,0x7b04,0x7b13,0x7b05,0x7b0f,0x7b08,0x7b0a, +0x7ad8,0x7b10, +/* 0xD340 */ +0x7b04,0x7b13,0x7b05,0x7b0f,0x7b08,0x7b0a, 0x7b0e,0x7b09,0x7b12,0x7c84,0x7c91,0x7c8a,0x7c8c,0x7c88, 0x7c8d,0x7c85,0x7d1e,0x7d1d,0x7d11,0x7d0e,0x7d18,0x7d16, 0x7d13,0x7d1f,0x7d12,0x7d0f,0x7d0c,0x7f5c,0x7f61,0x7f5e, @@ -1027,7 +1122,9 @@ static const unsigned short big5_ucs_table[] = { 0x8c7b,0x8ca4,0x8ca3,0x8d76,0x8d78,0x8db5,0x8db7,0x8db6, 0x8ed1,0x8ed3,0x8ffe,0x8ff5,0x9002,0x8fff,0x8ffb,0x9004, 0x8ffc,0x8ff6,0x90d6,0x90e0,0x90d9,0x90da,0x90e3,0x90df, -0x90e5,0x90d8,0x90db,0x90d7,0x90dc,0x90e4,0x9150,0x914e, +0x90e5,0x90d8,0x90db,0x90d7,0x90dc,0x90e4,0x9150, +/* 0xD440 */ +0x914e, 0x914f,0x91d5,0x91e2,0x91da,0x965c,0x965f,0x96bc,0x98e3, 0x9adf,0x9b2f,0x4e7f,0x5070,0x506a,0x5061,0x505e,0x5060, 0x5053,0x504b,0x505d,0x5072,0x5048,0x504d,0x5041,0x505b, @@ -1047,7 +1144,9 @@ static const unsigned short big5_ucs_table[] = { 0x5a8e,0x5a3e,0x5a4d,0x5a39,0x5a4c,0x5a70,0x5a69,0x5a47, 0x5a51,0x5a56,0x5a42,0x5a5c,0x5b72,0x5b6e,0x5bc1,0x5bc0, 0x5c59,0x5d1e,0x5d0b,0x5d1d,0x5d1a,0x5d20,0x5d0c,0x5d28, -0x5d0d,0x5d26,0x5d25,0x5d0f,0x5d30,0x5d12,0x5d23,0x5d1f, +0x5d0d,0x5d26,0x5d25,0x5d0f, +/* 0xD540 */ +0x5d30,0x5d12,0x5d23,0x5d1f, 0x5d2e,0x5e3e,0x5e34,0x5eb1,0x5eb4,0x5eb9,0x5eb2,0x5eb3, 0x5f36,0x5f38,0x5f9b,0x5f96,0x5f9f,0x608a,0x6090,0x6086, 0x60be,0x60b0,0x60ba,0x60d3,0x60d4,0x60cf,0x60e4,0x60d9, @@ -1067,7 +1166,9 @@ static const unsigned short big5_ucs_table[] = { 0x6de9,0x6de2,0x6db7,0x6df6,0x6dd4,0x6e00,0x6dc8,0x6de0, 0x6ddf,0x6dd6,0x6dbe,0x6de5,0x6ddc,0x6ddd,0x6ddb,0x6df4, 0x6dca,0x6dbd,0x6ded,0x6df0,0x6dba,0x6dd5,0x6dc2,0x6dcf, -0x6dc9,0x6dd0,0x6df2,0x6dd3,0x6dfd,0x6dd7,0x6dcd,0x6de3, +0x6dc9, +/* 0xD640 */ +0x6dd0,0x6df2,0x6dd3,0x6dfd,0x6dd7,0x6dcd,0x6de3, 0x6dbb,0x70fa,0x710d,0x70f7,0x7117,0x70f4,0x710c,0x70f0, 0x7104,0x70f3,0x7110,0x70fc,0x70ff,0x7106,0x7113,0x7100, 0x70f8,0x70f6,0x710b,0x7102,0x710e,0x727e,0x727b,0x727c, @@ -1086,7 +1187,9 @@ static const unsigned short big5_ucs_table[] = { 0x7ca3,0x7d35,0x7d3d,0x7d38,0x7d36,0x7d3a,0x7d45,0x7d2c, 0x7d29,0x7d41,0x7d47,0x7d3e,0x7d3f,0x7d4a,0x7d3b,0x7d28, 0x7f63,0x7f95,0x7f9c,0x7f9d,0x7f9b,0x7fca,0x7fcb,0x7fcd, -0x7fd0,0x7fd1,0x7fc7,0x7fcf,0x7fc9,0x801f,0x801e,0x801b, +0x7fd0,0x7fd1,0x7fc7,0x7fcf,0x7fc9,0x801f, +/* 0xD740 */ +0x801e,0x801b, 0x8047,0x8043,0x8048,0x8118,0x8125,0x8119,0x811b,0x812d, 0x811f,0x812c,0x811e,0x8121,0x8115,0x8127,0x811d,0x8122, 0x8211,0x8238,0x8233,0x823a,0x8234,0x8232,0x8274,0x8390, @@ -1106,7 +1209,9 @@ static const unsigned short big5_ucs_table[] = { 0x9011,0x901c,0x900c,0x9021,0x90ef,0x90ea,0x90f0,0x90f4, 0x90f2,0x90f3,0x90d4,0x90eb,0x90ec,0x90e9,0x9156,0x9158, 0x915a,0x9153,0x9155,0x91ec,0x91f4,0x91f1,0x91f3,0x91f8, -0x91e4,0x91f9,0x91ea,0x91eb,0x91f7,0x91e8,0x91ee,0x957a, +0x91e4,0x91f9,0x91ea, +/* 0xD840 */ +0x91eb,0x91f7,0x91e8,0x91ee,0x957a, 0x9586,0x9588,0x967c,0x966d,0x966b,0x9671,0x966f,0x96bf, 0x976a,0x9804,0x98e5,0x9997,0x509b,0x5095,0x5094,0x509e, 0x508b,0x50a3,0x5083,0x508c,0x508e,0x509d,0x5068,0x509c, @@ -1126,6 +1231,7 @@ static const unsigned short big5_ucs_table[] = { 0x5d31,0x5d59,0x5d42,0x5d39,0x5d49,0x5d38,0x5d3c,0x5d32, 0x5d36,0x5d40,0x5d45,0x5e44,0x5e41,0x5f58,0x5fa6,0x5fa5, 0x5fab,0x60c9,0x60b9,0x60cc,0x60e2,0x60ce,0x60c4,0x6114, +/* 0xD940 */ 0x60f2,0x610a,0x6116,0x6105,0x60f5,0x6113,0x60f8,0x60fc, 0x60fe,0x60c1,0x6103,0x6118,0x611d,0x6110,0x60ff,0x6104, 0x610b,0x624a,0x6394,0x63b1,0x63b0,0x63ce,0x63e5,0x63e8, @@ -1145,7 +1251,9 @@ static const unsigned short big5_ucs_table[] = { 0x6bbd,0x6bf0,0x6bf2,0x6bf3,0x6c30,0x6dfc,0x6e46,0x6e47, 0x6e1f,0x6e49,0x6e88,0x6e3c,0x6e3d,0x6e45,0x6e62,0x6e2b, 0x6e3f,0x6e41,0x6e5d,0x6e73,0x6e1c,0x6e33,0x6e4b,0x6e40, -0x6e51,0x6e3b,0x6e03,0x6e2e,0x6e5e,0x6e68,0x6e5c,0x6e61, +0x6e51,0x6e3b,0x6e03,0x6e2e,0x6e5e, +/* 0xDA40 */ +0x6e68,0x6e5c,0x6e61, 0x6e31,0x6e28,0x6e60,0x6e71,0x6e6b,0x6e39,0x6e22,0x6e30, 0x6e53,0x6e65,0x6e27,0x6e78,0x6e64,0x6e77,0x6e55,0x6e79, 0x6e52,0x6e66,0x6e35,0x6e36,0x6e5a,0x7120,0x711e,0x712f, @@ -1165,7 +1273,9 @@ static const unsigned short big5_ucs_table[] = { 0x7b58,0x7b45,0x7ca2,0x7c9e,0x7ca8,0x7ca1,0x7d58,0x7d6f, 0x7d63,0x7d53,0x7d56,0x7d67,0x7d6a,0x7d4f,0x7d6d,0x7d5c, 0x7d6b,0x7d52,0x7d54,0x7d69,0x7d51,0x7d5f,0x7d4e,0x7f3e, -0x7f3f,0x7f65,0x7f66,0x7fa2,0x7fa0,0x7fa1,0x7fd7,0x8051, +0x7f3f,0x7f65, +/* 0xDB40 */ +0x7f66,0x7fa2,0x7fa0,0x7fa1,0x7fd7,0x8051, 0x804f,0x8050,0x80fe,0x80d4,0x8143,0x814a,0x8152,0x814f, 0x8147,0x813d,0x814d,0x813a,0x81e6,0x81ee,0x81f7,0x81f8, 0x81f9,0x8204,0x823c,0x823d,0x823f,0x8275,0x833b,0x83cf, @@ -1184,7 +1294,9 @@ static const unsigned short big5_ucs_table[] = { 0x8a48,0x8a51,0x8a4a,0x8a4c,0x8a4f,0x8c5f,0x8c81,0x8c80, 0x8cba,0x8cbe,0x8cb0,0x8cb9,0x8cb5,0x8d84,0x8d80,0x8d89, 0x8dd8,0x8dd3,0x8dcd,0x8dc7,0x8dd6,0x8ddc,0x8dcf,0x8dd5, -0x8dd9,0x8dc8,0x8dd7,0x8dc5,0x8eef,0x8ef7,0x8efa,0x8ef9, +0x8dd9,0x8dc8,0x8dd7,0x8dc5,0x8eef,0x8ef7,0x8efa, +/* 0xDC40 */ +0x8ef9, 0x8ee6,0x8eee,0x8ee5,0x8ef5,0x8ee7,0x8ee8,0x8ef6,0x8eeb, 0x8ef1,0x8eec,0x8ef4,0x8ee9,0x902d,0x9034,0x902f,0x9106, 0x912c,0x9104,0x90ff,0x90fc,0x9108,0x90f9,0x90fb,0x9101, @@ -1204,7 +1316,9 @@ static const unsigned short big5_ucs_table[] = { 0x5868,0x5864,0x584f,0x584d,0x5849,0x586f,0x5855,0x584e, 0x585d,0x5859,0x5865,0x585b,0x583d,0x5863,0x5871,0x58fc, 0x5ac7,0x5ac4,0x5acb,0x5aba,0x5ab8,0x5ab1,0x5ab5,0x5ab0, -0x5abf,0x5ac8,0x5abb,0x5ac6,0x5ab7,0x5ac0,0x5aca,0x5ab4, +0x5abf,0x5ac8,0x5abb,0x5ac6, +/* 0xDD40 */ +0x5ab7,0x5ac0,0x5aca,0x5ab4, 0x5ab6,0x5acd,0x5ab9,0x5a90,0x5bd6,0x5bd8,0x5bd9,0x5c1f, 0x5c33,0x5d71,0x5d63,0x5d4a,0x5d65,0x5d72,0x5d6c,0x5d5e, 0x5d68,0x5d67,0x5d62,0x5df0,0x5e4f,0x5e4e,0x5e4a,0x5e4d, @@ -1224,7 +1338,9 @@ static const unsigned short big5_ucs_table[] = { 0x6958,0x6941,0x6974,0x694c,0x693b,0x694b,0x6937,0x695c, 0x694f,0x6951,0x6932,0x6952,0x692f,0x697b,0x693c,0x6b46, 0x6b45,0x6b43,0x6b42,0x6b48,0x6b41,0x6b9b,0xfa0d,0x6bfb, -0x6bfc,0x6bf9,0x6bf7,0x6bf8,0x6e9b,0x6ed6,0x6ec8,0x6e8f, +0x6bfc, +/* 0xDE40 */ +0x6bf9,0x6bf7,0x6bf8,0x6e9b,0x6ed6,0x6ec8,0x6e8f, 0x6ec0,0x6e9f,0x6e93,0x6e94,0x6ea0,0x6eb1,0x6eb9,0x6ec6, 0x6ed2,0x6ebd,0x6ec1,0x6e9e,0x6ec9,0x6eb7,0x6eb0,0x6ecd, 0x6ea6,0x6ecf,0x6eb2,0x6ebe,0x6ec3,0x6edc,0x6ed8,0x6e99, @@ -1243,7 +1359,9 @@ static const unsigned short big5_ucs_table[] = { 0x7759,0x776d,0x77e0,0x7887,0x789a,0x7894,0x788f,0x7884, 0x7895,0x7885,0x7886,0x78a1,0x7883,0x7879,0x7899,0x7880, 0x7896,0x787b,0x797c,0x7982,0x797d,0x7979,0x7a11,0x7a18, -0x7a19,0x7a12,0x7a17,0x7a15,0x7a22,0x7a13,0x7a1b,0x7a10, +0x7a19,0x7a12,0x7a17,0x7a15,0x7a22,0x7a13, +/* 0xDF40 */ +0x7a1b,0x7a10, 0x7aa3,0x7aa2,0x7a9e,0x7aeb,0x7b66,0x7b64,0x7b6d,0x7b74, 0x7b69,0x7b72,0x7b65,0x7b73,0x7b71,0x7b70,0x7b61,0x7b78, 0x7b76,0x7b63,0x7cb2,0x7cb4,0x7caf,0x7d88,0x7d86,0x7d80, @@ -1263,7 +1381,9 @@ static const unsigned short big5_ucs_table[] = { 0x86f7,0x870c,0x86fa,0x86d6,0x86f5,0x874d,0x86f8,0x870e, 0x8709,0x8701,0x86f6,0x870d,0x8705,0x88d6,0x88cb,0x88cd, 0x88ce,0x88de,0x88db,0x88da,0x88cc,0x88d0,0x8985,0x899b, -0x89df,0x89e5,0x89e4,0x89e1,0x89e0,0x89e2,0x89dc,0x89e6, +0x89df,0x89e5,0x89e4, +/* 0xE040 */ +0x89e1,0x89e0,0x89e2,0x89dc,0x89e6, 0x8a76,0x8a86,0x8a7f,0x8a61,0x8a3f,0x8a77,0x8a82,0x8a84, 0x8a75,0x8a83,0x8a81,0x8a74,0x8a7a,0x8c3c,0x8c4b,0x8c4a, 0x8c65,0x8c64,0x8c66,0x8c86,0x8c84,0x8c85,0x8ccc,0x8d68, @@ -1283,6 +1403,7 @@ static const unsigned short big5_ucs_table[] = { 0x99b5,0x9aad,0x9aab,0x9b5b,0x9cea,0x9ced,0x9ce7,0x9e80, 0x9efd,0x50e6,0x50d4,0x50d7,0x50e8,0x50f3,0x50db,0x50ea, 0x50dd,0x50e4,0x50d3,0x50ec,0x50f0,0x50ef,0x50e3,0x50e0, +/* 0xE140 */ 0x51d8,0x5280,0x5281,0x52e9,0x52eb,0x5330,0x53ac,0x5627, 0x5615,0x560c,0x5612,0x55fc,0x560f,0x561c,0x5601,0x5613, 0x5602,0x55fa,0x561d,0x5604,0x55ff,0x55f9,0x5889,0x587c, @@ -1302,7 +1423,9 @@ static const unsigned short big5_ucs_table[] = { 0x6475,0x6466,0x64a6,0x644e,0x6482,0x645e,0x645c,0x644b, 0x6453,0x6460,0x6450,0x647f,0x643f,0x646c,0x646b,0x6459, 0x6465,0x6477,0x6573,0x65a0,0x66a1,0x66a0,0x669f,0x6705, -0x6704,0x6722,0x69b1,0x69b6,0x69c9,0x69a0,0x69ce,0x6996, +0x6704,0x6722,0x69b1,0x69b6,0x69c9, +/* 0xE240 */ +0x69a0,0x69ce,0x6996, 0x69b0,0x69ac,0x69bc,0x6991,0x6999,0x698e,0x69a7,0x698d, 0x69a9,0x69be,0x69af,0x69bf,0x69c4,0x69bd,0x69a4,0x69d4, 0x69b9,0x69ca,0x699a,0x69cf,0x69b3,0x6993,0x69aa,0x69a1, @@ -1322,7 +1445,9 @@ static const unsigned short big5_ucs_table[] = { 0x7782,0x776e,0x7780,0x776f,0x777e,0x7783,0x78b2,0x78aa, 0x78b4,0x78ad,0x78a8,0x787e,0x78ab,0x789e,0x78a5,0x78a0, 0x78ac,0x78a2,0x78a4,0x7998,0x798a,0x798b,0x7996,0x7995, -0x7994,0x7993,0x7997,0x7988,0x7992,0x7990,0x7a2b,0x7a4a, +0x7994,0x7993, +/* 0xE340 */ +0x7997,0x7988,0x7992,0x7990,0x7a2b,0x7a4a, 0x7a30,0x7a2f,0x7a28,0x7a26,0x7aa8,0x7aab,0x7aac,0x7aee, 0x7b88,0x7b9c,0x7b8a,0x7b91,0x7b90,0x7b96,0x7b8d,0x7b8c, 0x7b9b,0x7b8e,0x7b85,0x7b98,0x5284,0x7b99,0x7ba4,0x7b82, @@ -1341,7 +1466,9 @@ static const unsigned short big5_ucs_table[] = { 0x872c,0x8741,0x873e,0x8746,0x8720,0x8732,0x872a,0x872d, 0x873c,0x8712,0x873a,0x8731,0x8735,0x8742,0x8726,0x8727, 0x8738,0x8724,0x871a,0x8730,0x8711,0x88f7,0x88e7,0x88f1, -0x88f2,0x88fa,0x88fe,0x88ee,0x88fc,0x88f6,0x88fb,0x88f0, +0x88f2,0x88fa,0x88fe,0x88ee,0x88fc,0x88f6,0x88fb, +/* 0xE440 */ +0x88f0, 0x88ec,0x88eb,0x899d,0x89a1,0x899f,0x899e,0x89e9,0x89eb, 0x89e8,0x8aab,0x8a99,0x8a8b,0x8a92,0x8a8f,0x8a96,0x8c3d, 0x8c68,0x8c69,0x8cd5,0x8ccf,0x8cd7,0x8d96,0x8e09,0x8e02, @@ -1361,7 +1488,9 @@ static const unsigned short big5_ucs_table[] = { 0x9cf2,0x9cf5,0x9ea7,0x50ff,0x5103,0x5130,0x50f8,0x5106, 0x5107,0x50f6,0x50fe,0x510b,0x510c,0x50fd,0x510a,0x528b, 0x528c,0x52f1,0x52ef,0x5648,0x5642,0x564c,0x5635,0x5641, -0x564a,0x5649,0x5646,0x5658,0x565a,0x5640,0x5633,0x563d, +0x564a,0x5649,0x5646,0x5658, +/* 0xE540 */ +0x565a,0x5640,0x5633,0x563d, 0x562c,0x563e,0x5638,0x562a,0x563a,0x571a,0x58ab,0x589d, 0x58b1,0x58a0,0x58a3,0x58af,0x58ac,0x58a5,0x58a1,0x58ff, 0x5aff,0x5af4,0x5afd,0x5af7,0x5af6,0x5b03,0x5af8,0x5b02, @@ -1381,7 +1510,9 @@ static const unsigned short big5_ucs_table[] = { 0x6a09,0x6a04,0x6a18,0x6a25,0x6a0f,0x69f6,0x6a26,0x6a07, 0x69f4,0x6a16,0x6b51,0x6ba5,0x6ba3,0x6ba2,0x6ba6,0x6c01, 0x6c00,0x6bff,0x6c02,0x6f41,0x6f26,0x6f7e,0x6f87,0x6fc6, -0x6f92,0x6f8d,0x6f89,0x6f8c,0x6f62,0x6f4f,0x6f85,0x6f5a, +0x6f92, +/* 0xE640 */ +0x6f8d,0x6f89,0x6f8c,0x6f62,0x6f4f,0x6f85,0x6f5a, 0x6f96,0x6f76,0x6f6c,0x6f82,0x6f55,0x6f72,0x6f52,0x6f50, 0x6f57,0x6f94,0x6f93,0x6f5d,0x6f00,0x6f61,0x6f6b,0x6f7d, 0x6f67,0x6f90,0x6f53,0x6f8b,0x6f69,0x6f7f,0x6f95,0x6f63, @@ -1400,7 +1531,9 @@ static const unsigned short big5_ucs_table[] = { 0x7ccc,0x7ccb,0x7df7,0x7ddb,0x7dea,0x7de7,0x7dd7,0x7de1, 0x7e03,0x7dfa,0x7de6,0x7df6,0x7df1,0x7df0,0x7dee,0x7ddf, 0x7f76,0x7fac,0x7fb0,0x7fad,0x7fed,0x7feb,0x7fea,0x7fec, -0x7fe6,0x7fe8,0x8064,0x8067,0x81a3,0x819f,0x819e,0x8195, +0x7fe6,0x7fe8,0x8064,0x8067,0x81a3,0x819f, +/* 0xE740 */ +0x819e,0x8195, 0x81a2,0x8199,0x8197,0x8216,0x824f,0x8253,0x8252,0x8250, 0x824e,0x8251,0x8524,0x853b,0x850f,0x8500,0x8529,0x850e, 0x8509,0x850d,0x851f,0x850a,0x8527,0x851c,0x84fb,0x852b, @@ -1420,7 +1553,9 @@ static const unsigned short big5_ucs_table[] = { 0x8ad9,0x8c3e,0x8c4d,0x8c8f,0x8ce5,0x8cdf,0x8cd9,0x8ce8, 0x8cda,0x8cdd,0x8ce7,0x8da0,0x8d9c,0x8da1,0x8d9b,0x8e20, 0x8e23,0x8e25,0x8e24,0x8e2e,0x8e15,0x8e1b,0x8e16,0x8e11, -0x8e19,0x8e26,0x8e27,0x8e14,0x8e12,0x8e18,0x8e13,0x8e1c, +0x8e19,0x8e26,0x8e27, +/* 0xE840 */ +0x8e14,0x8e12,0x8e18,0x8e13,0x8e1c, 0x8e17,0x8e1a,0x8f2c,0x8f24,0x8f18,0x8f1a,0x8f20,0x8f23, 0x8f16,0x8f17,0x9073,0x9070,0x906f,0x9067,0x906b,0x912f, 0x912b,0x9129,0x912a,0x9132,0x9126,0x912e,0x9185,0x9186, @@ -1440,6 +1575,7 @@ static const unsigned short big5_ucs_table[] = { 0x9cff,0x9cf7,0x9d07,0x9d00,0x9cf9,0x9cfb,0x9d08,0x9d05, 0x9d04,0x9e83,0x9ed3,0x9f0f,0x9f10,0x511c,0x5113,0x5117, 0x511a,0x5111,0x51de,0x5334,0x53e1,0x5670,0x5660,0x566e, +/* 0xE940 */ 0x5673,0x5666,0x5663,0x566d,0x5672,0x565e,0x5677,0x571c, 0x571b,0x58c8,0x58bd,0x58c9,0x58bf,0x58ba,0x58c2,0x58bc, 0x58c6,0x5b17,0x5b19,0x5b1b,0x5b21,0x5b14,0x5b13,0x5b10, @@ -1459,7 +1595,9 @@ static const unsigned short big5_ucs_table[] = { 0x6baa,0x6bab,0x6bc8,0x6bc7,0x6c04,0x6c03,0x6c06,0x6fad, 0x6fcb,0x6fa3,0x6fc7,0x6fbc,0x6fce,0x6fc8,0x6f5e,0x6fc4, 0x6fbd,0x6f9e,0x6fca,0x6fa8,0x7004,0x6fa5,0x6fae,0x6fba, -0x6fac,0x6faa,0x6fcf,0x6fbf,0x6fb8,0x6fa2,0x6fc9,0x6fab, +0x6fac,0x6faa,0x6fcf,0x6fbf,0x6fb8, +/* 0xEA40 */ +0x6fa2,0x6fc9,0x6fab, 0x6fcd,0x6faf,0x6fb2,0x6fb0,0x71c5,0x71c2,0x71bf,0x71b8, 0x71d6,0x71c0,0x71c1,0x71cb,0x71d4,0x71ca,0x71c7,0x71cf, 0x71bd,0x71d8,0x71bc,0x71c6,0x71da,0x71db,0x729d,0x729e, @@ -1479,7 +1617,9 @@ static const unsigned short big5_ucs_table[] = { 0x802a,0x8029,0x806c,0x81b1,0x81a6,0x81ae,0x81b9,0x81b5, 0x81ab,0x81b0,0x81ac,0x81b4,0x81b2,0x81b7,0x81a7,0x81f2, 0x8255,0x8256,0x8257,0x8556,0x8545,0x856b,0x854d,0x8553, -0x8561,0x8558,0x8540,0x8546,0x8564,0x8541,0x8562,0x8544, +0x8561,0x8558, +/* 0xEB40 */ +0x8540,0x8546,0x8564,0x8541,0x8562,0x8544, 0x8551,0x8547,0x8563,0x853e,0x855b,0x8571,0x854e,0x856e, 0x8575,0x8555,0x8567,0x8560,0x858c,0x8566,0x855d,0x8554, 0x8565,0x856c,0x8663,0x8665,0x8664,0x879b,0x878f,0x8797, @@ -1498,7 +1638,9 @@ static const unsigned short big5_ucs_table[] = { 0x931f,0x9306,0x930f,0x937a,0x9338,0x933c,0x931b,0x9323, 0x9312,0x9301,0x9346,0x932d,0x930e,0x930d,0x92cb,0x931d, 0x92fa,0x9325,0x9313,0x92f9,0x92f7,0x9334,0x9302,0x9324, -0x92ff,0x9329,0x9339,0x9335,0x932a,0x9314,0x930c,0x930b, +0x92ff,0x9329,0x9339,0x9335,0x932a,0x9314,0x930c, +/* 0xEC40 */ +0x930b, 0x92fe,0x9309,0x9300,0x92fb,0x9316,0x95bc,0x95cd,0x95be, 0x95b9,0x95ba,0x95b6,0x95bf,0x95b5,0x95bd,0x96a9,0x96d4, 0x970b,0x9712,0x9710,0x9799,0x9797,0x9794,0x97f0,0x97f8, @@ -1518,7 +1660,9 @@ static const unsigned short big5_ucs_table[] = { 0x61e0,0x61e5,0x61e4,0x61e8,0x61de,0x64ef,0x64e9,0x64e3, 0x64eb,0x64e4,0x64e8,0x6581,0x6580,0x65b6,0x65da,0x66d2, 0x6a8d,0x6a96,0x6a81,0x6aa5,0x6a89,0x6a9f,0x6a9b,0x6aa1, -0x6a9e,0x6a87,0x6a93,0x6a8e,0x6a95,0x6a83,0x6aa8,0x6aa4, +0x6a9e,0x6a87,0x6a93,0x6a8e, +/* 0xED40 */ +0x6a95,0x6a83,0x6aa8,0x6aa4, 0x6a91,0x6a7f,0x6aa6,0x6a9a,0x6a85,0x6a8c,0x6a92,0x6b5b, 0x6bad,0x6c09,0x6fcc,0x6fa9,0x6ff4,0x6fd4,0x6fe3,0x6fdc, 0x6fed,0x6fe7,0x6fe6,0x6fde,0x6ff2,0x6fdd,0x6fe2,0x6fe8, @@ -1538,7 +1682,9 @@ static const unsigned short big5_ucs_table[] = { 0x7ff2,0x802c,0x81bb,0x81c4,0x81cc,0x81ca,0x81c5,0x81c7, 0x81bc,0x81e9,0x825b,0x825a,0x825c,0x8583,0x8580,0x858f, 0x85a7,0x8595,0x85a0,0x858b,0x85a3,0x857b,0x85a4,0x859a, -0x859e,0x8577,0x857c,0x8589,0x85a1,0x857a,0x8578,0x8557, +0x859e, +/* 0xEE40 */ +0x8577,0x857c,0x8589,0x85a1,0x857a,0x8578,0x8557, 0x858e,0x8596,0x8586,0x858d,0x8599,0x859d,0x8581,0x85a2, 0x8582,0x8588,0x8585,0x8579,0x8576,0x8598,0x8590,0x859f, 0x8668,0x87be,0x87aa,0x87ad,0x87c5,0x87b0,0x87ac,0x87b9, @@ -1557,7 +1703,9 @@ static const unsigned short big5_ucs_table[] = { 0x9355,0x9352,0x934f,0x9371,0x9377,0x937b,0x9361,0x935e, 0x9363,0x9367,0x9380,0x934e,0x9359,0x95c7,0x95c0,0x95c9, 0x95c3,0x95c5,0x95b7,0x96ae,0x96b0,0x96ac,0x9720,0x971f, -0x9718,0x971d,0x9719,0x979a,0x97a1,0x979c,0x979e,0x979d, +0x9718,0x971d,0x9719,0x979a,0x97a1,0x979c, +/* 0xEF40 */ +0x979e,0x979d, 0x97d5,0x97d4,0x97f1,0x9841,0x9844,0x984a,0x9849,0x9845, 0x9843,0x9925,0x992b,0x992c,0x992a,0x9933,0x9932,0x992f, 0x992d,0x9931,0x9930,0x9998,0x99a3,0x99a1,0x9a02,0x99fa, @@ -1577,7 +1725,9 @@ static const unsigned short big5_ucs_table[] = { 0x6ab7,0x6ac7,0x6ab4,0x6aad,0x6b5e,0x6bc9,0x6c0b,0x7007, 0x700c,0x700d,0x7001,0x7005,0x7014,0x700e,0x6fff,0x7000, 0x6ffb,0x7026,0x6ffc,0x6ff7,0x700a,0x7201,0x71ff,0x71f9, -0x7203,0x71fd,0x7376,0x74b8,0x74c0,0x74b5,0x74c1,0x74be, +0x7203,0x71fd,0x7376, +/* 0xF040 */ +0x74b8,0x74c0,0x74b5,0x74c1,0x74be, 0x74b6,0x74bb,0x74c2,0x7514,0x7513,0x765c,0x7664,0x7659, 0x7650,0x7653,0x7657,0x765a,0x76a6,0x76bd,0x76ec,0x77c2, 0x77ba,0x78ff,0x790c,0x7913,0x7914,0x7909,0x7910,0x7912, @@ -1597,6 +1747,7 @@ static const unsigned short big5_ucs_table[] = { 0x8b26,0x8b36,0x8b2e,0x8b24,0x8b3b,0x8b3d,0x8b3a,0x8c42, 0x8c75,0x8c99,0x8c98,0x8c97,0x8cfe,0x8d04,0x8d02,0x8d00, 0x8e5c,0x8e62,0x8e60,0x8e57,0x8e56,0x8e5e,0x8e65,0x8e67, +/* 0xF140 */ 0x8e5b,0x8e5a,0x8e61,0x8e5d,0x8e69,0x8e54,0x8f46,0x8f47, 0x8f48,0x8f4b,0x9128,0x913a,0x913b,0x913e,0x91a8,0x91a5, 0x91a7,0x91af,0x91aa,0x93b5,0x938c,0x9392,0x93b7,0x939b, @@ -1616,7 +1767,9 @@ static const unsigned short big5_ucs_table[] = { 0x9f00,0x9f16,0x9f25,0x9f2b,0x9f2a,0x9f29,0x9f28,0x9f4c, 0x9f55,0x5134,0x5135,0x5296,0x52f7,0x53b4,0x56ab,0x56ad, 0x56a6,0x56a7,0x56aa,0x56ac,0x58da,0x58dd,0x58db,0x5912, -0x5b3d,0x5b3e,0x5b3f,0x5dc3,0x5e70,0x5fbf,0x61fb,0x6507, +0x5b3d,0x5b3e,0x5b3f,0x5dc3,0x5e70, +/* 0xF240 */ +0x5fbf,0x61fb,0x6507, 0x6510,0x650d,0x6509,0x650c,0x650e,0x6584,0x65de,0x65dd, 0x66de,0x6ae7,0x6ae0,0x6acc,0x6ad1,0x6ad9,0x6acb,0x6adf, 0x6adc,0x6ad0,0x6aeb,0x6acf,0x6acd,0x6ade,0x6b60,0x6bb0, @@ -1636,7 +1789,9 @@ static const unsigned short big5_ucs_table[] = { 0x8808,0x87ff,0x880a,0x8802,0x8962,0x895a,0x895b,0x8957, 0x8961,0x895c,0x8958,0x895d,0x8959,0x8988,0x89b7,0x89b6, 0x89f6,0x8b50,0x8b48,0x8b4a,0x8b40,0x8b53,0x8b56,0x8b54, -0x8b4b,0x8b55,0x8b51,0x8b42,0x8b52,0x8b57,0x8c43,0x8c77, +0x8b4b,0x8b55, +/* 0xF340 */ +0x8b51,0x8b42,0x8b52,0x8b57,0x8c43,0x8c77, 0x8c76,0x8c9a,0x8d06,0x8d07,0x8d09,0x8dac,0x8daa,0x8dad, 0x8dab,0x8e6d,0x8e78,0x8e73,0x8e6a,0x8e6f,0x8e7b,0x8ec2, 0x8f52,0x8f51,0x8f4f,0x8f50,0x8f53,0x8fb4,0x9140,0x913f, @@ -1655,7 +1810,9 @@ static const unsigned short big5_ucs_table[] = { 0x9d86,0x9d8b,0x9d8c,0x9d7d,0x9d6b,0x9d74,0x9d75,0x9d70, 0x9d69,0x9d85,0x9d73,0x9d7b,0x9d82,0x9d6f,0x9d79,0x9d7f, 0x9d87,0x9d68,0x9e94,0x9e91,0x9ec0,0x9efc,0x9f2d,0x9f40, -0x9f41,0x9f4d,0x9f56,0x9f57,0x9f58,0x5337,0x56b2,0x56b5, +0x9f41,0x9f4d,0x9f56,0x9f57,0x9f58,0x5337,0x56b2, +/* 0xF440 */ +0x56b5, 0x56b3,0x58e3,0x5b45,0x5dc6,0x5dc7,0x5eee,0x5eef,0x5fc0, 0x5fc1,0x61f9,0x6517,0x6516,0x6515,0x6513,0x65df,0x66e8, 0x66e3,0x66e4,0x6af3,0x6af0,0x6aea,0x6ae8,0x6af9,0x6af1, @@ -1675,7 +1832,9 @@ static const unsigned short big5_ucs_table[] = { 0x91b7,0x91b5,0x91b2,0x91b3,0x940b,0x9413,0x93fb,0x9420, 0x940f,0x9414,0x93fe,0x9415,0x9410,0x9428,0x9419,0x940d, 0x93f5,0x9400,0x93f7,0x9407,0x940e,0x9416,0x9412,0x93fa, -0x9409,0x93f8,0x940a,0x93ff,0x93fc,0x940c,0x93f6,0x9411, +0x9409,0x93f8,0x940a,0x93ff, +/* 0xF540 */ +0x93fc,0x940c,0x93f6,0x9411, 0x9406,0x95de,0x95e0,0x95df,0x972e,0x972f,0x97b9,0x97bb, 0x97fd,0x97fe,0x9860,0x9862,0x9863,0x985f,0x98c1,0x98c2, 0x9950,0x994e,0x9959,0x994c,0x994b,0x9953,0x9a32,0x9a34, @@ -1695,7 +1854,9 @@ static const unsigned short big5_ucs_table[] = { 0x7cf2,0x7e8a,0x7e87,0x7e88,0x7e8b,0x7e86,0x7e8d,0x7f4d, 0x7fbb,0x8030,0x81dd,0x8618,0x862a,0x8626,0x861f,0x8623, 0x861c,0x8619,0x8627,0x862e,0x8621,0x8620,0x8629,0x861e, -0x8625,0x8829,0x881d,0x881b,0x8820,0x8824,0x881c,0x882b, +0x8625, +/* 0xF640 */ +0x8829,0x881d,0x881b,0x8820,0x8824,0x881c,0x882b, 0x884a,0x896d,0x8969,0x896e,0x896b,0x89fa,0x8b79,0x8b78, 0x8b45,0x8b7a,0x8b7b,0x8d10,0x8d14,0x8daf,0x8e8e,0x8e8c, 0x8f5e,0x8f5b,0x8f5d,0x9146,0x9144,0x9145,0x91b9,0x943f, @@ -1714,7 +1875,9 @@ static const unsigned short big5_ucs_table[] = { 0x6520,0x6526,0x6522,0x6b0b,0x6b08,0x6b09,0x6c0d,0x7055, 0x7056,0x7057,0x7052,0x721e,0x721f,0x72a9,0x737f,0x74d8, 0x74d5,0x74d9,0x74d7,0x766d,0x76ad,0x7935,0x79b4,0x7a70, -0x7a71,0x7c57,0x7c5c,0x7c59,0x7c5b,0x7c5a,0x7cf4,0x7cf1, +0x7a71,0x7c57,0x7c5c,0x7c59,0x7c5b,0x7c5a, +/* 0xF740 */ +0x7cf4,0x7cf1, 0x7e91,0x7f4f,0x7f87,0x81de,0x826b,0x8634,0x8635,0x8633, 0x862c,0x8632,0x8636,0x882c,0x8828,0x8826,0x882a,0x8825, 0x8971,0x89bf,0x89be,0x89fb,0x8b7e,0x8b84,0x8b82,0x8b86, @@ -1734,7 +1897,9 @@ static const unsigned short big5_ucs_table[] = { 0x705b,0x705a,0x7222,0x7382,0x7381,0x7383,0x7670,0x77d4, 0x7c67,0x7c66,0x7e95,0x826c,0x863a,0x8640,0x8639,0x863c, 0x8631,0x863b,0x863e,0x8830,0x8832,0x882e,0x8833,0x8976, -0x8974,0x8973,0x89fe,0x8b8c,0x8b8e,0x8b8b,0x8b88,0x8c45, +0x8974,0x8973,0x89fe, +/* 0xF840 */ +0x8b8c,0x8b8e,0x8b8b,0x8b88,0x8c45, 0x8d19,0x8e98,0x8f64,0x8f63,0x91bc,0x9462,0x9455,0x945d, 0x9457,0x945e,0x97c4,0x97c5,0x9800,0x9a56,0x9a59,0x9b1e, 0x9b1f,0x9b20,0x9c52,0x9c58,0x9c50,0x9c4a,0x9c4d,0x9c4b, @@ -1754,6 +1919,7 @@ static const unsigned short big5_ucs_table[] = { 0x9e04,0x9ea0,0x9f1e,0x9f46,0x9f74,0x9f75,0x9f76,0x56d4, 0x652e,0x65b8,0x6b18,0x6b19,0x6b17,0x6b1a,0x7062,0x7226, 0x72aa,0x77d8,0x77d9,0x7939,0x7c69,0x7c6b,0x7cf6,0x7e9a, +/* 0xF940 */ 0x7e98,0x7e9b,0x7e99,0x81e0,0x81e1,0x8646,0x8647,0x8648, 0x8979,0x897a,0x897c,0x897b,0x89ff,0x8b98,0x8b99,0x8ea5, 0x8ea4,0x8ea3,0x946e,0x946d,0x946f,0x9471,0x9473,0x9749, From d104481af822bcae68d9e3b0e0cf192297420b7f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Jan 2023 08:49:31 +0200 Subject: [PATCH 102/895] Correct entry for 0x80,0xFD-FF in SJIS multi-byte character length table As a performance optimization, mbstring implements some functions using tables which give the (byte) length of a multi-byte character using a lookup based on the value of the first byte. These tables are called `mblen_table`. For many years, the mblen_table for SJIS has had '2' in position 0x80. That is wrong; it should have been '1'. Reasons: For SJIS, SJIS-2004, and mobile variants of SJIS, 0x80 has never been treated as the first byte of a 2-byte character. It has always been treated as a single erroneous byte. On the other hand, 0x80 is a valid character in MacJapanese... but a 1-byte character, not a 2-byte one. The same applies to bytes 0xFD-FF; these are 1-byte characters in MacJapanese, and in other SJIS variants, they are not valid (as the first byte of a character). Thanks to the GitHub user 'youkidearitai' for finding this problem. --- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 6 +- ext/mbstring/tests/mb_str_split_jp.phpt | 24 +++ ext/mbstring/tests/mb_strlen.phpt | 72 ++++++--- ext/mbstring/tests/mb_substr.phpt | 156 ++++++++++++++++++- 4 files changed, 233 insertions(+), 25 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index cf03e9cc0db2d..9e0b053d0da73 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -38,7 +38,7 @@ static int mbfl_filt_conv_sjis_wchar_flush(mbfl_convert_filter *filter); -const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ +const unsigned char mblen_table_sjis[] = { /* 0x81-0x9F,0xE0-0xFC */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -47,14 +47,14 @@ const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1 }; static const char *mbfl_encoding_sjis_aliases[] = {"x-sjis", "SHIFT-JIS", NULL}; diff --git a/ext/mbstring/tests/mb_str_split_jp.phpt b/ext/mbstring/tests/mb_str_split_jp.phpt index f57531eeb25dd..674298ce3be98 100644 --- a/ext/mbstring/tests/mb_str_split_jp.phpt +++ b/ext/mbstring/tests/mb_str_split_jp.phpt @@ -62,6 +62,17 @@ if(end($array) !== $enc){ last array element: %s expected: %s\n", unpack("H*", end($array))[1],unpack("H*", $enc)[1]); } +/* SJIS byte 0x80 was previously wrongly treated as the starting byte for a 2-byte character */ +echo "== Regression test for SJIS byte 0x80 ==\n"; +foreach (['SJIS', 'SJIS-2004', 'MacJapanese', 'SJIS-Mobile#DOCOMO', 'SJIS-Mobile#KDDI', 'SJIS-Mobile#SoftBank'] as $encoding) { + $array = mb_str_split("\x80\xA1abc\x80\xA1", 2, $encoding); + echo "$encoding: [" . implode(', ', array_map('bin2hex', $array)) . "]\n"; + + // Also try bytes 0xFD, 0xFE, and 0xFF + $array = mb_str_split("abc\xFD\xFE\xFFab\xFD\xFE\xFF", 2, $encoding); + echo "$encoding: [" . implode(', ', array_map('bin2hex', $array)) . "]\n"; +} + ?> --EXPECT-- BIG-5: a4e9 a5bb @@ -73,3 +84,16 @@ UTF-16LE: e565 2c67 UTF-32BE: 000065e5 0000672c UTF-32LE: e5650000 2c670000 UTF-8: e697a5 e69cac +== Regression test for SJIS byte 0x80 == +SJIS: [80a1, 6162, 6380, a1] +SJIS: [6162, 63fd, feff, 6162, fdfe, ff] +SJIS-2004: [80a1, 6162, 6380, a1] +SJIS-2004: [6162, 63fd, feff, 6162, fdfe, ff] +MacJapanese: [80a1, 6162, 6380, a1] +MacJapanese: [6162, 63fd, feff, 6162, fdfe, ff] +SJIS-Mobile#DOCOMO: [80a1, 6162, 6380, a1] +SJIS-Mobile#DOCOMO: [6162, 63fd, feff, 6162, fdfe, ff] +SJIS-Mobile#KDDI: [80a1, 6162, 6380, a1] +SJIS-Mobile#KDDI: [6162, 63fd, feff, 6162, fdfe, ff] +SJIS-Mobile#SoftBank: [80a1, 6162, 6380, a1] +SJIS-Mobile#SoftBank: [6162, 63fd, feff, 6162, fdfe, ff] diff --git a/ext/mbstring/tests/mb_strlen.phpt b/ext/mbstring/tests/mb_strlen.phpt index 11225917140c2..5ebfcd1aec065 100644 --- a/ext/mbstring/tests/mb_strlen.phpt +++ b/ext/mbstring/tests/mb_strlen.phpt @@ -13,43 +13,59 @@ include_once('common.inc'); mb_detect_order('auto'); // Test string -$euc_jp = '0123ʸܸǤEUC-JPȤäƤޤ0123ܸݽ'; +$euc_jp = mb_convert_encoding("0123この文字列は日本語です。EUC-JPを使っています。0123日本語は面倒臭い。", 'EUC-JP', 'UTF-8'); $ascii = 'abcdefghijklmnopqrstuvwxyz;]=#0123456789'; -// ASCII echo "== ASCII ==\n"; -print mb_strlen($ascii,'ASCII') . "\n"; -print strlen($ascii) . "\n"; +print mb_strlen($ascii,'ASCII') . "\n"; +print strlen($ascii) . "\n"; -// EUC-JP echo "== EUC-JP ==\n"; -print mb_strlen($euc_jp,'EUC-JP') . "\n"; +print mb_strlen($euc_jp,'EUC-JP') . "\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print strlen($euc_jp) . "\n"; +print strlen($euc_jp) . "\n"; -// SJIS echo "== SJIS ==\n"; $sjis = mb_convert_encoding($euc_jp, 'SJIS','EUC-JP'); -print mb_strlen($sjis,'SJIS') . "\n"; +print mb_strlen($sjis,'SJIS') . "\n"; mb_internal_encoding('SJIS') or print("mb_internal_encoding() failed\n"); -print strlen($sjis) . "\n"; +print strlen($sjis) . "\n"; +print "-- Testing illegal bytes 0x80,0xFD-FF --\n"; +// mb_strlen used to wrongly treat 0x80 as the starting byte of a 2-byte SJIS character +print mb_strlen("\x80\xA1", 'SJIS') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'SJIS') . "\n"; + +echo "== MacJapanese ==\n"; +print mb_strlen("\x80\xA1", 'MacJapanese') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'MacJapanese') . "\n"; + +echo "== SJIS-2004 ==\n"; +print mb_strlen("\x80\xA1", 'SJIS-2004') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-2004') . "\n"; + +echo "== SJIS-Mobile#DOCOMO ==\n"; +print mb_strlen("\x80\xA1", 'SJIS-Mobile#DOCOMO') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#DOCOMO') . "\n"; + +echo "== SJIS-Mobile#KDDI ==\n"; +print mb_strlen("\x80\xA1", 'SJIS-Mobile#KDDI') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#KDDI') . "\n"; + +echo "== SJIS-Mobile#SoftBank ==\n"; +print mb_strlen("\x80\xA1", 'SJIS-Mobile#SoftBank') . "\n"; +print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#SoftBank') . "\n"; -// JIS -// Note: either convert_encoding or strlen has problem echo "== JIS ==\n"; $jis = mb_convert_encoding($euc_jp, 'JIS','EUC-JP'); -print mb_strlen($jis,'JIS') . "\n"; +print mb_strlen($jis,'JIS') . "\n"; mb_internal_encoding('JIS') or print("mb_internal_encoding() failed\n"); -print strlen($jis) . "\n"; +print strlen($jis) . "\n"; -// UTF-8 -// Note: either convert_encoding or strlen has problem echo "== UTF-8 ==\n"; $utf8 = mb_convert_encoding($euc_jp, 'UTF-8','EUC-JP'); -print mb_strlen($utf8,'UTF-8') . "\n"; +print mb_strlen($utf8,'UTF-8') . "\n"; mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); -print strlen($utf8) . "\n"; - +print strlen($utf8) . "\n"; // Wrong Parameters echo "== WRONG PARAMETERS ==\n"; @@ -72,6 +88,24 @@ try { == SJIS == 43 72 +-- Testing illegal bytes 0x80,0xFD-FF -- +2 +6 +== MacJapanese == +2 +6 +== SJIS-2004 == +2 +6 +== SJIS-Mobile#DOCOMO == +2 +6 +== SJIS-Mobile#KDDI == +2 +6 +== SJIS-Mobile#SoftBank == +2 +6 == JIS == 43 90 diff --git a/ext/mbstring/tests/mb_substr.phpt b/ext/mbstring/tests/mb_substr.phpt index 366173eab8661..b027eaa90848e 100644 --- a/ext/mbstring/tests/mb_substr.phpt +++ b/ext/mbstring/tests/mb_substr.phpt @@ -11,7 +11,21 @@ ini_set('include_path','.'); include_once('common.inc'); // EUC-JP -$euc_jp = '0123ʸܸǤEUC-JPȤäƤޤܸݽ'; +$euc_jp = mb_convert_encoding('0123この文字列は日本語です。EUC-JPを使っています。日本語は面倒臭い。', 'EUC-JP', 'UTF-8'); +// SJIS +$sjis = mb_convert_encoding('日本語テキストです。0123456789。', 'SJIS', 'UTF-8'); +// ISO-2022-JP +$iso2022jp = "\x1B\$B\x21\x21!r\x1B(BABC"; +// GB-18030 +$gb18030 = mb_convert_encoding('密码用户名密码名称名称', 'GB18030', 'UTF-8'); +// HZ +$hz = "The next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye."; +// UTF-8 +$utf8 = "Greek: Σὲ γνωρίζω ἀπὸ τὴν κόψη Russian: Зарегистрируйтесь"; +// UTF-32 +$utf32 = mb_convert_encoding($utf8, 'UTF-32', 'UTF-8'); +// UTF-7 +$utf7 = mb_convert_encoding($utf8, 'UTF-7', 'UTF-8'); print "1: ". bin2hex(mb_substr($euc_jp, 10, 10,'EUC-JP')) . "\n"; print "2: ". bin2hex(mb_substr($euc_jp, 0, 100,'EUC-JP')) . "\n"; @@ -20,8 +34,82 @@ $str = mb_substr($euc_jp, 100, 10,'EUC-JP'); // Note: returns last character ($str === "") ? print "3 OK\n" : print "NG: ".bin2hex($str)."\n"; -$str = mb_substr($euc_jp, -100, 10,'EUC-JP'); -($str !== "") ? print "4 OK: ".bin2hex($str)."\n" : print "NG: ".bin2hex($str)."\n"; +$str = mb_substr($euc_jp, -100, 10, 'EUC-JP'); +print ($str !== "") ? "4 OK: " . bin2hex($str) . "\n" : "BAD: " . bin2hex($str) . "\n"; + +echo "SJIS:\n"; +print "1: " . bin2hex(mb_substr($sjis, 0, 3, 'SJIS')) . "\n"; +print "2: " . bin2hex(mb_substr($sjis, -1, null, 'SJIS')) . "\n"; +print "3: " . bin2hex(mb_substr($sjis, -5, 3, 'SJIS')) . "\n"; +print "4: " . bin2hex(mb_substr($sjis, 1, null, 'SJIS')) . "\n"; +print "5:" . bin2hex(mb_substr($sjis, 10, 0, 'SJIS')) . "\n"; +echo "-- Testing illegal SJIS byte 0x80 --\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS')) . "\n"; + +echo "SJIS-2004:\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS-2004')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS-2004')) . "\n"; + +echo "MacJapanese:\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'MacJapanese')) . "\n"; + +echo "SJIS-Mobile#DOCOMO:\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS-Mobile#DOCOMO')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS-Mobile#DOCOMO')) . "\n"; + +echo "SJIS-Mobile#KDDI:\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS-Mobile#KDDI')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS-Mobile#KDDI')) . "\n"; + +echo "SJIS-Mobile#SoftBank:\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS-Mobile#SoftBank')) . "\n"; +print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS-Mobile#SoftBank')) . "\n"; + +echo "ISO-2022-JP:\n"; +print "1: " . bin2hex(mb_substr($iso2022jp, 0, 3, 'ISO-2022-JP')) . "\n"; +print "2: " . bin2hex(mb_substr($iso2022jp, -1, null, 'ISO-2022-JP')) . "\n"; +print "3: " . bin2hex(mb_substr($iso2022jp, -6, 3, 'ISO-2022-JP')) . "\n"; +print "4: " . bin2hex(mb_substr($iso2022jp, -3, 2, 'ISO-2022-JP')) . "\n"; +print "5: " . bin2hex(mb_substr($iso2022jp, 1, null, 'ISO-2022-JP')) . "\n"; +print "6:" . bin2hex(mb_substr($iso2022jp, 10, 0, 'ISO-2022-JP')) . "\n"; +print "7:" . bin2hex(mb_substr($iso2022jp, 100, 10, 'ISO-2022-JP')) . "\n"; + +echo "GB-18030:\n"; +print "1: " . bin2hex(mb_substr($gb18030, 0, 3, 'GB-18030')) . "\n"; +print "2: " . bin2hex(mb_substr($gb18030, -1, null, 'GB-18030')) . "\n"; +print "3: " . bin2hex(mb_substr($gb18030, -5, 3, 'GB-18030')) . "\n"; +print "4: " . bin2hex(mb_substr($gb18030, 1, null, 'GB-18030')) . "\n"; +print "5:" . bin2hex(mb_substr($gb18030, 10, 0, 'GB-18030')) . "\n"; + +echo "HZ:\n"; +print "1: " . mb_substr($hz, 0, 3, 'HZ') . "\n"; +print "2: " . mb_substr($hz, -1, null, 'HZ') . "\n"; +print "3: " . mb_substr($hz, -5, 3, 'HZ') . "\n"; +print "4: " . mb_substr($hz, 1, null, 'HZ') . "\n"; +print "5:" . mb_substr($hz, 10, 0, 'HZ') . "\n"; + +echo "UTF-8:\n"; +print "1: " . mb_substr($utf8, 0, 3, 'UTF-8') . "\n"; +print "2: " . mb_substr($utf8, -1, null, 'UTF-8') . "\n"; +print "3: " . mb_substr($utf8, -5, 3, 'UTF-8') . "\n"; +print "4: " . mb_substr($utf8, 1, null, 'UTF-8') . "\n"; +print "5:" . mb_substr($utf8, 10, 0, 'UTF-8') . "\n"; + +echo "UTF-32:\n"; +print "1: " . mb_convert_encoding(mb_substr($utf32, 0, 3, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n"; +print "2: " . mb_convert_encoding(mb_substr($utf32, -1, null, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n"; +print "3: " . mb_convert_encoding(mb_substr($utf32, -5, 3, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n"; +print "4: " . mb_convert_encoding(mb_substr($utf32, 1, null, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n"; +print "5:" . mb_convert_encoding(mb_substr($utf32, 10, 0, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n"; + +echo "UTF-7:\n"; +print "1: " . mb_convert_encoding(mb_substr($utf7, 0, 3, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n"; +print "2: " . mb_convert_encoding(mb_substr($utf7, -1, null, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n"; +print "3: " . mb_convert_encoding(mb_substr($utf7, -5, 3, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n"; +print "4: " . mb_convert_encoding(mb_substr($utf7, 1, null, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n"; +print "5:" . mb_convert_encoding(mb_substr($utf7, 10, 0, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n"; ?> --EXPECT-- @@ -29,3 +117,65 @@ $str = mb_substr($euc_jp, -100, 10,'EUC-JP'); 2: 30313233a4b3a4cecab8bbfacef3a4cfc6fccbdcb8eca4c7a4b9a1a34555432d4a50a4f2bbc8a4c3a4c6a4a4a4dea4b9a1a3c6fccbdcb8eca4cfccccc5ddbdada4a4a1a3 3 OK 4 OK: 30313233a4b3a4cecab8bbfacef3a4cf +SJIS: +1: 93fa967b8cea +2: 8142 +3: 825582568257 +4: 967b8cea8365834c8358836782c582b781423031323334825482558256825782588142 +5: +-- Testing illegal SJIS byte 0x80 -- +6380 +806162 +SJIS-2004: +6380 +806162 +MacJapanese: +6380 +806162 +SJIS-Mobile#DOCOMO: +6380 +806162 +SJIS-Mobile#KDDI: +6380 +806162 +SJIS-Mobile#SoftBank: +6380 +806162 +ISO-2022-JP: +1: 1b2442212121721b284241 +2: 43 +3: 1b2442212121721b284241 +4: 4142 +5: 1b244221721b2842414243 +6: +7: +GB-18030: +1: c3dcc2ebd3c3 +2: b3c6 +3: c2ebc3fbb3c6 +4: c2ebd3c3bba7c3fbc3dcc2ebc3fbb3c6c3fbb3c6 +5: +HZ: +1: The +2: . +3: ~{!#~}By +4: he next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye. +5: +UTF-8: +1: Gre +2: ь +3: йте +4: reek: Σὲ γνωρίζω ἀπὸ τὴν κόψη Russian: Зарегистрируйтесь +5: +UTF-32: +1: Gre +2: ь +3: йте +4: reek: Σὲ γνωρίζω ἀπὸ τὴν κόψη Russian: Зарегистрируйтесь +5: +UTF-7: +1: Gre +2: ь +3: йте +4: reek: Σὲ γνωρίζω ἀπὸ τὴν κόψη Russian: Зарегистрируйтесь +5: From de633c31dd492a158c4db2979f76c98372cc017a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 5 Jan 2023 13:10:28 +0000 Subject: [PATCH 103/895] Add missing EXTENSIONS section to test file gh10200 --- Zend/tests/gh10200.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/tests/gh10200.phpt b/Zend/tests/gh10200.phpt index 5462352e7ae5b..ad02d45bfe63c 100644 --- a/Zend/tests/gh10200.phpt +++ b/Zend/tests/gh10200.phpt @@ -1,5 +1,7 @@ --TEST-- GH-10200 (zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.) +--EXTENSIONS-- +simplexml --FILE-- Date: Thu, 5 Jan 2023 15:24:44 +0200 Subject: [PATCH 104/895] Close GH-10217: Use strlen() for determining the class_name length Closes GH-10231. --- NEWS | 2 ++ Zend/zend_API.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 415f67ea6abe4..e4f75e23ba2d6 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ PHP NEWS . Added shadow stack support for fibers. (Chen Hu) . Fix bug GH-9965 (Fix accidental caching of default arguments with side effects). (ilutov) + . Implement GH-10217 (Use strlen() for determining the class_name length). + (Dennis Buteyn) - Fileinfo: . Upgrade bundled libmagic to 5.43. (Anatol) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index a08cce6730425..cbc455eaab0b5 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -267,7 +267,7 @@ typedef struct _zend_fcall_info_cache { #endif #define INIT_CLASS_ENTRY(class_container, class_name, functions) \ - INIT_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions) + INIT_CLASS_ENTRY_EX(class_container, class_name, strlen(class_name), functions) #define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \ { \ From 6f785b033d53605325b6bf388c00ce78a56bce7d Mon Sep 17 00:00:00 2001 From: Marcos Marcolin Date: Thu, 5 Jan 2023 13:25:43 -0300 Subject: [PATCH 105/895] chore: remove semicolon left over. Closes GH-10236. --- ext/ffi/ffi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index c4a4d91d24348..749c64dc9c692 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -1107,7 +1107,7 @@ static zval *zend_ffi_cdata_get(zend_object *obj, zend_string *member, int read_ if (UNEXPECTED(!zend_string_equals_literal(member, "cdata"))) { zend_throw_error(zend_ffi_exception_ce, "Only 'cdata' property may be read"); - return &EG(uninitialized_zval);; + return &EG(uninitialized_zval); } zend_ffi_cdata_to_zval(cdata, cdata->ptr, type, BP_VAR_R, rv, 0, 0, 0); @@ -1123,13 +1123,13 @@ static zval *zend_ffi_cdata_set(zend_object *obj, zend_string *member, zval *val #if 0 if (UNEXPECTED(!cdata->ptr)) { zend_throw_error(zend_ffi_exception_ce, "NULL pointer dereference"); - return &EG(uninitialized_zval);; + return &EG(uninitialized_zval); } #endif if (UNEXPECTED(!zend_string_equals_literal(member, "cdata"))) { zend_throw_error(zend_ffi_exception_ce, "Only 'cdata' property may be set"); - return &EG(uninitialized_zval);; + return &EG(uninitialized_zval); } zend_ffi_zval_to_cdata(cdata->ptr, type, value); @@ -2648,7 +2648,7 @@ static zend_result zend_ffi_pass_arg(zval *arg, zend_ffi_type *type, ffi_type ** zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); if (zend_ffi_is_compatible_type(type, ZEND_FFI_TYPE(cdata->type))) { - *pass_type = zend_ffi_make_fake_struct_type(type);; + *pass_type = zend_ffi_make_fake_struct_type(type); arg_values[n] = cdata->ptr; break; } @@ -5770,7 +5770,7 @@ void zend_ffi_resolve_typedef(const char *name, size_t name_len, zend_ffi_dcl *d if (FFI_G(symbols)) { sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len); if (sym && sym->kind == ZEND_FFI_SYM_TYPE) { - dcl->type = ZEND_FFI_TYPE(sym->type);; + dcl->type = ZEND_FFI_TYPE(sym->type); if (sym->is_const) { dcl->attr |= ZEND_FFI_ATTR_CONST; } From 3152b7b26f2c44fe52c7c35fdcd548fc553555cb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Jan 2023 11:34:33 +0200 Subject: [PATCH 106/895] Use different mblen_table for different SJIS variants --- NEWS | 3 +++ ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 4 +-- .../libmbfl/filters/mbfilter_sjis_2004.c | 4 +-- .../libmbfl/filters/mbfilter_sjis_mac.c | 21 +++++++++++++-- .../libmbfl/filters/mbfilter_sjis_mobile.c | 26 ++++++++++++++++--- 5 files changed, 48 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 6833d8a4ee4a7..76c801f136a59 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) +- MBString: + . Fixed: mb_strlen (and a couple of other mbstring functions) would wrongly treat 0x80, 0xFD, 0xFE, 0xFF, and certain other byte values as the first byte of a 2-byte SJIS character. (Alex Dowad) + - Opcache: . Fix inverted bailout value in zend_runtime_jit() (Max Kellermann). . Fix access to uninitialized variable in accel_preload(). (nielsdos) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 9e0b053d0da73..3406cc0cf4bfd 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -38,7 +38,7 @@ static int mbfl_filt_conv_sjis_wchar_flush(mbfl_convert_filter *filter); -const unsigned char mblen_table_sjis[] = { /* 0x81-0x9F,0xE0-0xFC */ +const unsigned char mblen_table_sjis[] = { /* 0x81-0x9F,0xE0-0xEF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -54,7 +54,7 @@ const unsigned char mblen_table_sjis[] = { /* 0x81-0x9F,0xE0-0xFC */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static const char *mbfl_encoding_sjis_aliases[] = {"x-sjis", "SHIFT-JIS", NULL}; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 95816206d5629..6a6fe92f49722 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -39,7 +39,7 @@ #include "unicode_table_jis2004.h" #include "unicode_table_jis.h" -extern const unsigned char mblen_table_sjis[]; +extern const unsigned char mblen_table_sjis_mobile[]; extern int mbfl_bisec_srch(int w, const unsigned short *tbl, int n); extern int mbfl_bisec_srch2(int w, const unsigned short tbl[], int n); @@ -51,7 +51,7 @@ const mbfl_encoding mbfl_encoding_sjis2004 = { "SJIS-2004", "Shift_JIS", mbfl_encoding_sjis2004_aliases, - mblen_table_sjis, + mblen_table_sjis_mobile, /* Leading byte values used for SJIS-2004 are the same as mobile SJIS variants */ MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis2004_wchar, &vtbl_wchar_sjis2004 diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c index bbc6895ce8fae..3f85cb5eecb5a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c @@ -35,7 +35,24 @@ #include "sjis_mac2uni.h" -extern const unsigned char mblen_table_sjis[]; +const unsigned char mblen_table_sjismac[] = { /* 0x81-0x9F,0xE0-0xED */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; static int mbfl_filt_conv_wchar_sjis_mac_flush(mbfl_convert_filter *filter); static int mbfl_filt_conv_sjis_mac_wchar_flush(mbfl_convert_filter *filter); @@ -47,7 +64,7 @@ const mbfl_encoding mbfl_encoding_sjis_mac = { "SJIS-mac", "Shift_JIS", mbfl_encoding_sjis_mac_aliases, - mblen_table_sjis, + mblen_table_sjismac, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_mac_wchar, &vtbl_wchar_sjis_mac diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index f2c230b0cbcb1..cecfe063121fe 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -35,8 +35,26 @@ #include "emoji2uni.h" +const unsigned char mblen_table_sjis_mobile[] = { /* 0x81-0x9F,0xE0-0xFC */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1 +}; + extern int mbfl_bisec_srch2(int w, const unsigned short tbl[], int n); -extern const unsigned char mblen_table_sjis[]; static int mbfl_filt_conv_sjis_wchar_flush(mbfl_convert_filter *filter); @@ -49,7 +67,7 @@ const mbfl_encoding mbfl_encoding_sjis_docomo = { "SJIS-Mobile#DOCOMO", "Shift_JIS", mbfl_encoding_sjis_docomo_aliases, - mblen_table_sjis, + mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_docomo_wchar, &vtbl_wchar_sjis_docomo @@ -60,7 +78,7 @@ const mbfl_encoding mbfl_encoding_sjis_kddi = { "SJIS-Mobile#KDDI", "Shift_JIS", mbfl_encoding_sjis_kddi_aliases, - mblen_table_sjis, + mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_kddi_wchar, &vtbl_wchar_sjis_kddi @@ -71,7 +89,7 @@ const mbfl_encoding mbfl_encoding_sjis_sb = { "SJIS-Mobile#SOFTBANK", "Shift_JIS", mbfl_encoding_sjis_sb_aliases, - mblen_table_sjis, + mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_sb_wchar, &vtbl_wchar_sjis_sb From 69d49e4dd7f38efe018db50c157056ee0cb772b9 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 5 Jan 2023 22:30:04 +0000 Subject: [PATCH 107/895] posix adding posix_pathconf. to get configuration variables from a directory/file. Closes GH-10238. --- NEWS | 1 + UPGRADING | 1 + ext/posix/posix.c | 25 ++++++++++ ext/posix/posix.stub.php | 72 +++++++++++++++++++++++++++++ ext/posix/posix_arginfo.h | 39 +++++++++++++++- ext/posix/tests/posix_pathconf.phpt | 16 +++++++ 6 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 ext/posix/tests/posix_pathconf.phpt diff --git a/NEWS b/NEWS index e4f75e23ba2d6..75d2b9562e5eb 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,7 @@ PHP NEWS - Posix: . Added posix_sysconf. (David Carlier) + . Added posix_pathconf. (David Carlier) - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) diff --git a/UPGRADING b/UPGRADING index be2eb3439aeae..f3254ab678144 100644 --- a/UPGRADING +++ b/UPGRADING @@ -71,6 +71,7 @@ PHP 8.3 UPGRADE NOTES - Posix: . Added posix_sysconf call to get runtime informations. + . Added posix_pathconf call to get configuration value from a directory/file. - Random: . Added Randomizer::getBytesFromString(). diff --git a/ext/posix/posix.c b/ext/posix/posix.c index bfdb0fa4bbc4a..feecfaa119f7d 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1196,3 +1196,28 @@ PHP_FUNCTION(posix_sysconf) RETURN_LONG(sysconf(conf_id)); } + +PHP_FUNCTION(posix_pathconf) +{ + zend_long name, ret; + char *path; + size_t path_len; + + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_STRING(path, path_len) + Z_PARAM_LONG(name); + ZEND_PARSE_PARAMETERS_END(); + + if (path_len == 0) { + RETURN_FALSE; + } + + ret = pathconf(path, name); + + if (ret < 0 && errno != 0) { + POSIX_G(last_error) = errno; + RETURN_FALSE; + } + + RETURN_LONG(ret); +} diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index cc73901444fbb..94caf3cc261eb 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -219,6 +219,76 @@ */ const POSIX_SC_NPROCESSORS_ONLN = UNKNOWN; #endif +#ifdef _PC_LINK_MAX +/** + * @var int + * @cvalue _PC_LINK_MAX + */ +const POSIX_PC_LINK_MAX = UNKNOWN; +#endif +#ifdef _PC_MAX_CANON +/** + * @var int + * @cvalue _PC_MAX_CANON + */ +const POSIX_PC_MAX_CANON = UNKNOWN; +#endif +#ifdef _PC_MAX_INPUT +/** + * @var int + * @cvalue _PC_MAX_INPUT + */ +const POSIX_PC_MAX_INPUT = UNKNOWN; +#endif +#ifdef _PC_NAME_MAX +/** + * @var int + * @cvalue _PC_NAME_MAX + */ +const POSIX_PC_NAME_MAX = UNKNOWN; +#endif +#ifdef _PC_PATH_MAX +/** + * @var int + * @cvalue _PC_PATH_MAX + */ +const POSIX_PC_PATH_MAX = UNKNOWN; +#endif +#ifdef _PC_PIPE_BUF +/** + * @var int + * @cvalue _PC_PIPE_BUF + */ +const POSIX_PC_PIPE_BUF = UNKNOWN; +#endif +#ifdef _PC_CHOWN_RESTRICTED +/** + * @var int + * @cvalue _PC_CHOWN_RESTRICTED + */ +const POSIX_PC_CHOWN_RESTRICTED = UNKNOWN; +#endif +#ifdef _PC_NO_TRUNC +/** + * @var int + * @cvalue _PC_NO_TRUNC + */ +const POSIX_PC_NO_TRUNC = UNKNOWN; +#endif +#ifdef _PC_ALLOC_SIZE_MIN +/** + * @var int + * @cvalue _PC_ALLOC_SIZE_MIN + */ +const POSIX_PC_ALLOC_SIZE_MIN = UNKNOWN; +#endif +#ifdef _PC_SYMLINK_MAX +/** + * @var int + * @cvalue _PC_SYMLINK_MAX + */ +const POSIX_PC_SYMLINK_MAX = UNKNOWN; +#endif function posix_kill(int $process_id, int $signal): bool {} @@ -357,3 +427,5 @@ function posix_initgroups(string $username, int $group_id): bool {} #endif function posix_sysconf(int $conf_id): int {} + +function posix_pathconf(string $path, int $name): int|false {} diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index bc7f4791ef086..6bbf4ca25dce9 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a6ba91179f2a7ca3622aed0c28e8431868076567 */ + * Stub hash: 68daa5f0b270b307501a785ca6a197ea161a2ded */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) @@ -164,6 +164,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_sysconf, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, conf_id, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_pathconf, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) +ZEND_END_ARG_INFO() + ZEND_FUNCTION(posix_kill); ZEND_FUNCTION(posix_getpid); @@ -228,6 +233,7 @@ ZEND_FUNCTION(posix_strerror); ZEND_FUNCTION(posix_initgroups); #endif ZEND_FUNCTION(posix_sysconf); +ZEND_FUNCTION(posix_pathconf); static const zend_function_entry ext_functions[] = { @@ -295,6 +301,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(posix_initgroups, arginfo_posix_initgroups) #endif ZEND_FE(posix_sysconf, arginfo_posix_sysconf) + ZEND_FE(posix_pathconf, arginfo_posix_pathconf) ZEND_FE_END }; @@ -388,4 +395,34 @@ static void register_posix_symbols(int module_number) #if defined(_SC_NPROCESSORS_ONLN) REGISTER_LONG_CONSTANT("POSIX_SC_NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN, CONST_PERSISTENT); #endif +#if defined(_PC_LINK_MAX) + REGISTER_LONG_CONSTANT("POSIX_PC_LINK_MAX", _PC_LINK_MAX, CONST_PERSISTENT); +#endif +#if defined(_PC_MAX_CANON) + REGISTER_LONG_CONSTANT("POSIX_PC_MAX_CANON", _PC_MAX_CANON, CONST_PERSISTENT); +#endif +#if defined(_PC_MAX_INPUT) + REGISTER_LONG_CONSTANT("POSIX_PC_MAX_INPUT", _PC_MAX_INPUT, CONST_PERSISTENT); +#endif +#if defined(_PC_NAME_MAX) + REGISTER_LONG_CONSTANT("POSIX_PC_NAME_MAX", _PC_NAME_MAX, CONST_PERSISTENT); +#endif +#if defined(_PC_PATH_MAX) + REGISTER_LONG_CONSTANT("POSIX_PC_PATH_MAX", _PC_PATH_MAX, CONST_PERSISTENT); +#endif +#if defined(_PC_PIPE_BUF) + REGISTER_LONG_CONSTANT("POSIX_PC_PIPE_BUF", _PC_PIPE_BUF, CONST_PERSISTENT); +#endif +#if defined(_PC_CHOWN_RESTRICTED) + REGISTER_LONG_CONSTANT("POSIX_PC_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED, CONST_PERSISTENT); +#endif +#if defined(_PC_NO_TRUNC) + REGISTER_LONG_CONSTANT("POSIX_PC_NO_TRUNC", _PC_NO_TRUNC, CONST_PERSISTENT); +#endif +#if defined(_PC_ALLOC_SIZE_MIN) + REGISTER_LONG_CONSTANT("POSIX_PC_ALLOC_SIZE_MIN", _PC_ALLOC_SIZE_MIN, CONST_PERSISTENT); +#endif +#if defined(_PC_SYMLINK_MAX) + REGISTER_LONG_CONSTANT("POSIX_PC_SYMLINK_MAX", _PC_SYMLINK_MAX, CONST_PERSISTENT); +#endif } diff --git a/ext/posix/tests/posix_pathconf.phpt b/ext/posix/tests/posix_pathconf.phpt new file mode 100644 index 0000000000000..7214e32c186ed --- /dev/null +++ b/ext/posix/tests/posix_pathconf.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test posix_pathconf +--EXTENSIONS-- +posix +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +bool(true) +int(%d) From 84af629e7e33dba755d93dceff93fccdd9996ecd Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 6 Jan 2023 18:03:59 +0000 Subject: [PATCH 108/895] follow-up on GH-10238. (#10243) fixes based on feedback. --- ext/posix/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index feecfaa119f7d..cff46f398aa88 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1204,11 +1204,11 @@ PHP_FUNCTION(posix_pathconf) size_t path_len; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_STRING(path, path_len) + Z_PARAM_PATH(path, path_len) Z_PARAM_LONG(name); ZEND_PARSE_PARAMETERS_END(); - if (path_len == 0) { + if (path_len == 0 || php_check_open_basedir(path)) { RETURN_FALSE; } From df96346f9c3f487e52ab90f0f8166f445a01c5b3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 6 Jan 2023 23:06:17 +0100 Subject: [PATCH 109/895] Move test for GH-10200 to the simplexml extension test directory Closes GH-10252 Signed-off-by: George Peter Banyard --- {Zend => ext/simplexml}/tests/gh10200.phpt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {Zend => ext/simplexml}/tests/gh10200.phpt (100%) diff --git a/Zend/tests/gh10200.phpt b/ext/simplexml/tests/gh10200.phpt similarity index 100% rename from Zend/tests/gh10200.phpt rename to ext/simplexml/tests/gh10200.phpt From 32f503e4e358126238f8f7c30f490c64302da3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 7 Jan 2023 14:03:13 +0100 Subject: [PATCH 110/895] random: Fix check before closing `random_fd` (#10247) If, for whatever reason, the random_fd has been assigned file descriptor `0` it previously failed to close during module shutdown, thus leaking the descriptor. --- NEWS | 3 +++ ext/random/random.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 22b1a57967447..57e947cf59fbd 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,9 @@ PHP NEWS - Posix: . Fix memory leak in posix_ttyname() (girgias) +- Random: + . Fixed bug GH-10247 (Theoretical file descriptor leak for /dev/urandom). (timwolla) + - Standard: . Fix GH-10187 (Segfault in stripslashes() with arm64). (nielsdos) diff --git a/ext/random/random.c b/ext/random/random.c index 161eb8e685203..64e30e5087186 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -828,7 +828,7 @@ static PHP_GINIT_FUNCTION(random) /* {{{ PHP_GSHUTDOWN_FUNCTION */ static PHP_GSHUTDOWN_FUNCTION(random) { - if (random_globals->random_fd > 0) { + if (random_globals->random_fd >= 0) { close(random_globals->random_fd); random_globals->random_fd = -1; } From 58d741c0425839997c8cc9829d28111df817725f Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Sun, 8 Jan 2023 12:09:20 +0100 Subject: [PATCH 111/895] Remove unnecessary NULL-checks on ctx (#10256) ctx can never be zero in these functions because they are dispatched virtually by looking up their entries in ctx. Furthermore, 2 of these checks never actually worked because ctx was dereferenced before ctx was NULL-checked. --- ext/gd/gd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 227698f92ba5c..47090c04c34af 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3987,9 +3987,7 @@ static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) static void _php_image_output_ctxfree(struct gdIOCtx *ctx) /* {{{ */ { - if(ctx) { - efree(ctx); - } + efree(ctx); } /* }}} */ static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) /* {{{ */ { @@ -4009,21 +4007,16 @@ static void _php_image_stream_ctxfree(struct gdIOCtx *ctx) /* {{{ */ if(ctx->data) { ctx->data = NULL; } - if(ctx) { - efree(ctx); - } + efree(ctx); } /* }}} */ static void _php_image_stream_ctxfreeandclose(struct gdIOCtx *ctx) /* {{{ */ { - if(ctx->data) { php_stream_close((php_stream *) ctx->data); ctx->data = NULL; } - if(ctx) { - efree(ctx); - } + efree(ctx); } /* }}} */ static gdIOCtx *create_stream_context_from_zval(zval *to_zval) { From cca4ca6d3dda8c2e1c5c1b053550f94b3d6fb6bf Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 31 Dec 2022 07:08:01 +0200 Subject: [PATCH 112/895] Remove 'fast path' using mblen_table from mb_get_strlen (it's actually a slow path) Various mbstring legacy text encodings have what is called an 'mblen_table'; a table which gives the length of a multi-byte character using a lookup on the first byte value. Several mbstring functions have a 'fast path' which uses this table when it is available. However, it turns out that iterating through a string using the mblen_table is surprisingly slow. I found that by deleting this 'fast path' from mb_strlen, while mb_strlen becomes a few percent slower on very small strings (0-5 bytes), very large performance gains can be achieved on medium to long input strings. Part of the reason for this is because our text decoding filters are so much faster now. Here are some benchmarks: EUC-KR, short (0-5 chars) - master faster by 11.90% (0.0000 vs 0.0000) EUC-JP, short (0-5 chars) - master faster by 10.88% (0.0000 vs 0.0000) BIG-5, short (0-5 chars) - master faster by 10.66% (0.0000 vs 0.0000) UTF-8, short (0-5 chars) - master faster by 8.91% (0.0000 vs 0.0000) CP936, short (0-5 chars) - master faster by 6.27% (0.0000 vs 0.0000) UHC, short (0-5 chars) - master faster by 5.38% (0.0000 vs 0.0000) SJIS, short (0-5 chars) - master faster by 5.20% (0.0000 vs 0.0000) UTF-8, medium (~100 chars) - new faster by 127.51% (0.0004 vs 0.0002) UTF-8, long (~10000 chars) - new faster by 87.94% (0.0319 vs 0.0170) UTF-8, very long (~100000 chars) - new faster by 88.25% (0.3199 vs 0.1699) SJIS, medium (~100 chars) - new faster by 208.89% (0.0004 vs 0.0001) SJIS, long (~10000 chars) - new faster by 253.57% (0.0319 vs 0.0090) CP936, medium (~100 chars) - new faster by 126.08% (0.0004 vs 0.0002) CP936, long (~10000 chars) - new faster by 200.48% (0.0319 vs 0.0106) EUC-KR, medium (~100 chars) - new faster by 146.71% (0.0004 vs 0.0002) EUC-KR, long (~10000 chars) - new faster by 212.05% (0.0319 vs 0.0102) EUC-JP, medium (~100 chars) - new faster by 186.68% (0.0004 vs 0.0001) EUC-JP, long (~10000 chars) - new faster by 295.37% (0.0320 vs 0.0081) BIG-5, medium (~100 chars) - new faster by 173.07% (0.0004 vs 0.0001) BIG-5, long (~10000 chars) - new faster by 269.19% (0.0319 vs 0.0086) UHC, medium (~100 chars) - new faster by 196.99% (0.0004 vs 0.0001) UHC, long (~10000 chars) - new faster by 256.39% (0.0323 vs 0.0091) This does raise the question: is using the 'mblen_table' worthwhile for other mbstring functions, such as mb_str_split? The answer is yes, it is worthwhile; you see, while mb_strlen only needs to decode the input string but not re-encode it, when mb_str_split is implemented using the conversion filters, it needs to both decode the string and then re-encode it. This means that there is more potential to gain performance by using the 'mblen_table'. Benchmarking shows that in a few cases, mb_str_split becomes faster when the 'mblen_table fast path' is deleted, but in the majority of cases, it becomes slower. --- ext/mbstring/mbstring.c | 33 +++++++++++-------------------- ext/mbstring/tests/mb_strlen.phpt | 2 +- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 23408583371ac..dff766d9d5780 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1717,30 +1717,19 @@ PHP_FUNCTION(mb_str_split) static size_t mb_get_strlen(zend_string *string, const mbfl_encoding *encoding) { - size_t len = 0; + unsigned int char_len = encoding->flag & (MBFL_ENCTYPE_SBCS | MBFL_ENCTYPE_WCS2 | MBFL_ENCTYPE_WCS4); + if (char_len) { + return ZSTR_LEN(string) / char_len; + } - if (encoding->flag & MBFL_ENCTYPE_SBCS) { - return ZSTR_LEN(string); - } else if (encoding->flag & MBFL_ENCTYPE_WCS2) { - return ZSTR_LEN(string) / 2; - } else if (encoding->flag & MBFL_ENCTYPE_WCS4) { - return ZSTR_LEN(string) / 4; - } else if (encoding->mblen_table) { - const unsigned char *mbtab = encoding->mblen_table; - unsigned char *p = (unsigned char*)ZSTR_VAL(string), *e = p + ZSTR_LEN(string); - while (p < e) { - p += mbtab[*p]; - len++; - } - } else { - uint32_t wchar_buf[128]; - unsigned char *in = (unsigned char*)ZSTR_VAL(string); - size_t in_len = ZSTR_LEN(string); - unsigned int state = 0; + uint32_t wchar_buf[128]; + unsigned char *in = (unsigned char*)ZSTR_VAL(string); + size_t in_len = ZSTR_LEN(string); + unsigned int state = 0; + size_t len = 0; - while (in_len) { - len += encoding->to_wchar(&in, &in_len, wchar_buf, 128, &state); - } + while (in_len) { + len += encoding->to_wchar(&in, &in_len, wchar_buf, 128, &state); } return len; diff --git a/ext/mbstring/tests/mb_strlen.phpt b/ext/mbstring/tests/mb_strlen.phpt index 5ebfcd1aec065..e32e9e9370580 100644 --- a/ext/mbstring/tests/mb_strlen.phpt +++ b/ext/mbstring/tests/mb_strlen.phpt @@ -93,7 +93,7 @@ try { 6 == MacJapanese == 2 -6 +7 == SJIS-2004 == 2 6 From d8b5b9fa559c4bbd7bba56e15e566f812a530e1c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 8 Jan 2023 13:40:26 +0200 Subject: [PATCH 113/895] Add unit tests for mb_str_split/mb_substr on MacJapanese encoding MacJapanese has a somewhat unusual feature that when mapped to Unicode, many characters map to sequences of several codepoints. Add test cases demonstrating how mb_str_split and mb_substr behave in this situation. When adding these tests, I found the behavior of mb_substr was wrong due to an inconsistency between the string "length" as measured by mb_strlen and the number of native MacJapanese characters which mb_substr would count when iterating over the string using the mblen_table. This has been fixed. I believe that mb_strstr will also return wrong results in some cases for MacJapanese. I still need to come up with unit tests which demonstrate the problem and figure out how to fix it. --- ext/mbstring/mbstring.c | 21 +++++++++++++++++++-- ext/mbstring/tests/mb_str_split_jp.phpt | 20 ++++++++++++++++++++ ext/mbstring/tests/mb_substr.phpt | 17 +++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index dff766d9d5780..3fd4d43f3bf24 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2041,7 +2041,10 @@ static zend_string* mb_get_substr(zend_string *input, size_t from, size_t len, c len = in_len; } return zend_string_init_fast((const char*)in, len); - } else if (enc->mblen_table != NULL) { + } else if (enc->mblen_table) { + /* The use of the `mblen_table` means that for encodings like MacJapanese, + * we treat each character in its native charset as "1 character", even if it + * maps to a sequence of several codepoints */ const unsigned char *mbtab = enc->mblen_table; unsigned char *limit = in + in_len; while (from && in < limit) { @@ -2254,7 +2257,21 @@ PHP_FUNCTION(mb_substr) size_t mblen = 0; if (from < 0 || (!len_is_null && len < 0)) { - mblen = mb_get_strlen(str, enc); + if (enc->mblen_table) { + /* Because we use the `mblen_table` when iterating over the string and + * extracting the requested part, we also need to use it here for counting + * the "length" of the string + * Otherwise, we can get wrong results for text encodings like MacJapanese, + * where one native 'character' can map to a sequence of several codepoints */ + const unsigned char *mbtab = enc->mblen_table; + unsigned char *p = (unsigned char*)ZSTR_VAL(str), *e = p + ZSTR_LEN(str); + while (p < e) { + p += mbtab[*p]; + mblen++; + } + } else { + mblen = mb_get_strlen(str, enc); + } } /* if "from" position is negative, count start position from the end diff --git a/ext/mbstring/tests/mb_str_split_jp.phpt b/ext/mbstring/tests/mb_str_split_jp.phpt index 41a123d58975f..9e879f4fd96f2 100644 --- a/ext/mbstring/tests/mb_str_split_jp.phpt +++ b/ext/mbstring/tests/mb_str_split_jp.phpt @@ -80,6 +80,23 @@ foreach (['SJIS', 'SJIS-2004', 'MacJapanese', 'SJIS-Mobile#DOCOMO', 'SJIS-Mobile echo "$encoding: [" . implode(', ', array_map('bin2hex', $array)) . "]\n"; } +/* +Some MacJapanese characters map to a sequence of several Unicode codepoints. Examples: + +0x85AB 0xF862+0x0058+0x0049+0x0049+0x0049 # roman numeral thirteen +0x85AC 0xF861+0x0058+0x0049+0x0056 # roman numeral fourteen +0x85AD 0xF860+0x0058+0x0056 # roman numeral fifteen +0x85BF 0xF862+0x0078+0x0069+0x0069+0x0069 # small roman numeral thirteen +0x85C0 0xF861+0x0078+0x0069+0x0076 # small roman numeral fourteen +0x85C1 0xF860+0x0078+0x0076 # small roman numeral fifteen + +Even though they map to multiple codepoints, mb_str_split treats these as ONE character each +*/ + +echo "== MacJapanese characters which map to 3-5 codepoints each ==\n"; +echo "[", implode(', ', array_map('bin2hex', mb_str_split("abc\x85\xAB\x85\xAC\x85\xAD", 1, 'MacJapanese'))), "]\n"; +echo "[", implode(', ', array_map('bin2hex', mb_str_split("abc\x85\xBF\x85\xC0\x85\xC1", 2, 'MacJapanese'))), "]\n"; + ?> --EXPECT-- BIG-5: a4e9 a5bb @@ -104,3 +121,6 @@ SJIS-Mobile#KDDI: [80a1, 6162, 6380, a1] SJIS-Mobile#KDDI: [6162, 63fd, feff, 6162, fdfe, ff] SJIS-Mobile#SoftBank: [80a1, 6162, 6380, a1] SJIS-Mobile#SoftBank: [6162, 63fd, feff, 6162, fdfe, ff] +== MacJapanese characters which map to 3-5 codepoints each == +[61, 62, 63, 85ab, 85ac, 85ad] +[6162, 6385bf, 85c085c1] diff --git a/ext/mbstring/tests/mb_substr.phpt b/ext/mbstring/tests/mb_substr.phpt index 45714858bf417..ef37ca6dc192a 100644 --- a/ext/mbstring/tests/mb_substr.phpt +++ b/ext/mbstring/tests/mb_substr.phpt @@ -64,6 +64,16 @@ echo "SJIS-Mobile#SoftBank:\n"; print bin2hex(mb_substr("\x80abc\x80\xA1", 3, 2, 'SJIS-Mobile#SoftBank')) . "\n"; print bin2hex(mb_substr("\x80abc\x80\xA1", 0, 3, 'SJIS-Mobile#SoftBank')) . "\n"; +echo "-- Testing MacJapanese characters which map to 3-5 codepoints each --\n"; + +/* There are many characters in MacJapanese which map to sequences of several codepoints */ +print bin2hex(mb_substr("abc\x85\xAB\x85\xAC\x85\xAD", 0, 3, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("abc\x85\xAB\x85\xAC\x85\xAD", 3, 2, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("abc\x85\xAB\x85\xAC\x85\xAD", -2, 1, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("abc\x85\xBF\x85\xC0\x85\xC1", 0, 3, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("abc\x85\xBF\x85\xC0\x85\xC1", 3, 2, 'MacJapanese')) . "\n"; +print bin2hex(mb_substr("abc\x85\xBF\x85\xC0\x85\xC1", -2, 1, 'MacJapanese')) . "\n"; + echo "ISO-2022-JP:\n"; print "1: " . bin2hex(mb_substr($iso2022jp, 0, 3, 'ISO-2022-JP')) . "\n"; print "2: " . bin2hex(mb_substr($iso2022jp, -1, null, 'ISO-2022-JP')) . "\n"; @@ -145,6 +155,13 @@ SJIS-Mobile#KDDI: SJIS-Mobile#SoftBank: 6380 806162 +-- Testing MacJapanese characters which map to 3-5 codepoints each -- +616263 +85ab85ac +85ac +616263 +85bf85c0 +85c0 ISO-2022-JP: 1: 1b2442212121721b284241 2: 43 From 092ad3e4624f86a43648e6afb1c22ae7e3406699 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Jan 2023 22:41:23 +0200 Subject: [PATCH 114/895] Optimize branch structure of UTF-8 decoder routine I like the asm which gcc -O3 generates on this modified code... and guess what: my CPU likes it too! (The asm is noticeably tighter, without any extra operations in the path which dispatches to the code for decoding a 1-byte, 2-byte, 3-byte, or 4-byte character. It's just CMP, conditional jump, CMP, conditional jump, CMP, conditional jump. ...Though I was admittedly impressed to see gcc could implement the boolean expression `c >= 0xC2 && c <= 0xDF` with just 3 instructions: add, CMP, then conditional jump. Pretty slick stuff there, guys.) Benchmark results: UTF-8, short - to UTF-16LE faster by 7.36% (0.0001 vs 0.0002) UTF-8, short - to UTF-16BE faster by 6.24% (0.0001 vs 0.0002) UTF-8, medium - to UTF-16BE faster by 4.56% (0.0003 vs 0.0003) UTF-8, medium - to UTF-16LE faster by 4.00% (0.0003 vs 0.0003) UTF-8, long - to UTF-16BE faster by 1.02% (0.0215 vs 0.0217) UTF-8, long - to UTF-16LE faster by 1.01% (0.0209 vs 0.0211) --- ext/mbstring/libmbfl/filters/mbfilter_utf8.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index 46bddd17a7365..c34477bcf2000 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -225,7 +225,9 @@ static size_t mb_utf8_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf if (c < 0x80) { *out++ = c; - } else if (c >= 0xC2 && c <= 0xDF) { /* 2 byte character */ + } else if (c < 0xC2) { + *out++ = MBFL_BAD_INPUT; + } else if (c <= 0xDF) { /* 2 byte character */ if (p < e) { unsigned char c2 = *p++; if ((c2 & 0xC0) != 0x80) { @@ -237,7 +239,7 @@ static size_t mb_utf8_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf } else { *out++ = MBFL_BAD_INPUT; } - } else if (c >= 0xE0 && c <= 0xEF) { /* 3 byte character */ + } else if (c <= 0xEF) { /* 3 byte character */ if ((e - p) >= 2) { unsigned char c2 = *p++; unsigned char c3 = *p++; @@ -262,7 +264,7 @@ static size_t mb_utf8_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf } } } - } else if (c >= 0xF0 && c <= 0xF4) { /* 4 byte character */ + } else if (c <= 0xF4) { /* 4 byte character */ if ((e - p) >= 3) { unsigned char c2 = *p++; unsigned char c3 = *p++; From 8ff2b6abb2cd0993f6c5c60e25feba094cdb6272 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:11:15 +0100 Subject: [PATCH 115/895] Fix GH-9710: phpdbg memory leaks by option "-h" Closes GH-10237 Signed-off-by: George Peter Banyard --- NEWS | 1 + sapi/phpdbg/phpdbg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 76c801f136a59..24b7c9a9e70f3 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ PHP NEWS - PHPDBG: . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) . Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos) + . Fix GH-9710: phpdbg memory leaks by option "-h" (nielsdos) - Posix: . Fix memory leak in posix_ttyname() (girgias) diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 221803f88e7e9..e1824ecb1fc7a 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1414,6 +1414,8 @@ int main(int argc, char **argv) /* {{{ */ get_zend_version() ); } + PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; + php_module_shutdown(); sapi_deactivate(); sapi_shutdown(); if (ini_entries) { From d03025bf590dc03b69e75d1159ed4b2e6ee6ad37 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 7 Jan 2023 13:49:24 +0100 Subject: [PATCH 116/895] Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed. zend_get_property_guard previously assumed that at least "str" has a pre-computed hash. This is not always the case, for example when a string is created by bitwise operations, its hash is not set. Instead of forcing a computation of the hashes, drop the hash comparison. Closes GH-10254 Co-authored-by: Changochen Signed-off-by: George Peter Banyard --- NEWS | 1 + Zend/tests/gh10251.phpt | 24 ++++++++++++++++++++++++ Zend/zend_object_handlers.c | 5 ++--- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/gh10251.phpt diff --git a/NEWS b/NEWS index 24b7c9a9e70f3..ad29b8f611839 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ PHP NEWS - Core: . Fixed bug GH-10072 (PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code). (Derick) + . Fix GH-10251 (Assertion `(flag & (1<<3)) == 0' failed). (nielsdos) - Date: . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like diff --git a/Zend/tests/gh10251.phpt b/Zend/tests/gh10251.phpt new file mode 100644 index 0000000000000..eb942824802ac --- /dev/null +++ b/Zend/tests/gh10251.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-10251 (Assertion `(flag & (1<<3)) == 0' failed.) +--FILE-- +$p = $v; + } +} +$a = new A(); +$pp = ""; +$op = $pp & ""; +// Bitwise operators on strings don't compute the hash. +// The code below previously assumed a hash was actually computed, leading to a crash. +$a->$op = 0; +echo "Done\n"; +?> +--EXPECTF-- +Warning: Undefined variable $v in %s on line %d + +Warning: Undefined variable $p in %s on line %d +Done diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 5fa80c1adc5e5..e4ae4450b534f 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -535,9 +535,8 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe if (EXPECTED(Z_TYPE_P(zv) == IS_STRING)) { zend_string *str = Z_STR_P(zv); if (EXPECTED(str == member) || - /* "str" always has a pre-calculated hash value here */ - (EXPECTED(ZSTR_H(str) == zend_string_hash_val(member)) && - EXPECTED(zend_string_equal_content(str, member)))) { + /* str and member don't necessarily have a pre-calculated hash value here */ + EXPECTED(zend_string_equal_content(str, member))) { return &Z_PROPERTY_GUARD_P(zv); } else if (EXPECTED(Z_PROPERTY_GUARD_P(zv) == 0)) { zval_ptr_dtor_str(zv); From 6faeb9571d11b0e92efa94439262deb9cd19a69c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 8 Jan 2023 18:04:10 +0100 Subject: [PATCH 117/895] Fix recently introduced gh10251.phpt As of PHP 8.2.0, creation of dynamic properties is deprecated, so we slap a `AllowDynamicProperties` attribute on the class. --- Zend/tests/gh10251.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/tests/gh10251.phpt b/Zend/tests/gh10251.phpt index eb942824802ac..da8d8767a3656 100644 --- a/Zend/tests/gh10251.phpt +++ b/Zend/tests/gh10251.phpt @@ -2,6 +2,7 @@ GH-10251 (Assertion `(flag & (1<<3)) == 0' failed.) --FILE-- Date: Fri, 30 Dec 2022 11:11:26 +0200 Subject: [PATCH 118/895] Add fast SSE2-based implementation of mb_strlen for known-valid UTF-8 strings One small piece of this was obtained from Stack Overflow. According to Stack Overflow's Terms of Service, all user-contributed code on SO is provided under a Creative Commons license. I believe this license is compatible with the code being included in PHP. Benchmarking results (UTF-8 only, for strings which have already been checked using mb_check_encoding): For very short (0-5 byte) strings, mb_strlen is 12% faster. The speedup gets greater and greater on longer input strings; for strings around 100KB, mb_strlen is 23 times faster. Currently the 'fast' code is gated behind a GC flag check which ensures it is only used on strings which have already been checked for UTF-8 validity. This is because the accelerated code will return different results on some invalid UTF-8 strings. --- ext/mbstring/mbstring.c | 81 ++++++++++++++++++++++++++++--- ext/mbstring/tests/mb_strlen.phpt | 34 ++++++++++--- 2 files changed, 101 insertions(+), 14 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 3fd4d43f3bf24..51e279acbdc1f 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1715,13 +1715,85 @@ PHP_FUNCTION(mb_str_split) } } +#ifdef __SSE2__ +/* Thanks to StackOverflow user 'Paul R' (https://stackoverflow.com/users/253056/paul-r) + * From: https://stackoverflow.com/questions/36998538/fastest-way-to-horizontally-sum-sse-unsigned-byte-vector + * Takes a 128-bit XMM register, treats each byte as an 8-bit integer, and sums up all + * 16 of them, returning the sum in an ordinary scalar register */ +static inline uint32_t _mm_sum_epu8(const __m128i v) +{ + /* We don't have any dedicated instruction to sum up 8-bit values from a 128-bit register + * _mm_sad_epu8 takes the differences between corresponding bytes of two different XMM registers, + * sums up those differences, and stores them as two 16-byte integers in the top and bottom + * halves of the destination XMM register + * By using a zeroed-out XMM register as one operand, we ensure the "differences" which are + * summed up will actually just be the 8-bit values from `v` */ + __m128i vsum = _mm_sad_epu8(v, _mm_setzero_si128()); + /* If _mm_sad_epu8 had stored the sum of those bytes as a single integer, we would just have + * to extract it here; but it stored the sum as two different 16-bit values + * _mm_cvtsi128_si32 extracts one of those values into a scalar register + * _mm_extract_epi16 extracts the other one into another scalar register; then we just add them */ + return _mm_cvtsi128_si32(vsum) + _mm_extract_epi16(vsum, 4); +} +#endif + +/* This assumes that `string` is valid UTF-8 + * In UTF-8, the only bytes which do not start a new codepoint are 0x80-0xBF (continuation bytes) + * Interpreted as signed integers, those are all byte values less than -64 + * A fast way to get the length of a UTF-8 string is to start with its byte length, + * then subtract off the number of continuation bytes */ +static size_t mb_fast_strlen_utf8(unsigned char *p, size_t len) +{ + unsigned char *e = p + len; + +#ifdef __SSE2__ + if (len >= sizeof(__m128i)) { + const __m128i threshold = _mm_set1_epi8(-64); + const __m128i delta = _mm_set1_epi8(1); + __m128i counter = _mm_set1_epi8(0); /* Vector of 16 continuation-byte counters */ + + int reset_counter = 255; + do { + __m128i operand = _mm_loadu_si128((__m128i*)p); /* Load 16 bytes */ + __m128i lt = _mm_cmplt_epi8(operand, threshold); /* Find all which are continuation bytes */ + counter = _mm_add_epi8(counter, _mm_and_si128(lt, delta)); /* Update the 16 counters */ + + /* The counters can only go up to 255, so every 255 iterations, fold them into `len` + * and reset them to zero */ + if (--reset_counter == 0) { + len -= _mm_sum_epu8(counter); + counter = _mm_set1_epi8(0); + reset_counter = 255; + } + + p += sizeof(__m128i); + } while (p + sizeof(__m128i) <= e); + + len -= _mm_sum_epu8(counter); /* Fold in any remaining non-zero values in the 16 counters */ + } +#endif + + /* Check for continuation bytes in the 0-15 remaining bytes at the end of the string */ + while (p < e) { + signed char c = *p++; + if (c < -64) { + len--; + } + } + + return len; +} + static size_t mb_get_strlen(zend_string *string, const mbfl_encoding *encoding) { unsigned int char_len = encoding->flag & (MBFL_ENCTYPE_SBCS | MBFL_ENCTYPE_WCS2 | MBFL_ENCTYPE_WCS4); if (char_len) { return ZSTR_LEN(string) / char_len; + } else if (php_mb_is_no_encoding_utf8(encoding->no_encoding) && GC_FLAGS(string) & IS_STR_VALID_UTF8) { + return mb_fast_strlen_utf8((unsigned char*)ZSTR_VAL(string), ZSTR_LEN(string)); } + uint32_t wchar_buf[128]; unsigned char *in = (unsigned char*)ZSTR_VAL(string); size_t in_len = ZSTR_LEN(string); @@ -1789,14 +1861,7 @@ static unsigned char* offset_to_pointer_utf8(unsigned char *str, unsigned char * } static size_t pointer_to_offset_utf8(unsigned char *start, unsigned char *pos) { - size_t result = 0; - while (pos > start) { - unsigned char c = *--pos; - if (c < 0x80 || (c & 0xC0) != 0x80) { - result++; - } - } - return result; + return mb_fast_strlen_utf8(start, pos - start); } static size_t mb_find_strpos(zend_string *haystack, zend_string *needle, const mbfl_encoding *enc, ssize_t offset, bool reverse) diff --git a/ext/mbstring/tests/mb_strlen.phpt b/ext/mbstring/tests/mb_strlen.phpt index e32e9e9370580..b3fb28309bcbe 100644 --- a/ext/mbstring/tests/mb_strlen.phpt +++ b/ext/mbstring/tests/mb_strlen.phpt @@ -62,10 +62,26 @@ mb_internal_encoding('JIS') or print("mb_internal_encoding() failed\n"); print strlen($jis) . "\n"; echo "== UTF-8 ==\n"; -$utf8 = mb_convert_encoding($euc_jp, 'UTF-8','EUC-JP'); -print mb_strlen($utf8,'UTF-8') . "\n"; -mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); -print strlen($utf8) . "\n"; +$utf8 = mb_convert_encoding($euc_jp, 'UTF-8', 'EUC-JP'); +print mb_strlen($utf8,'UTF-8') . " codepoints\n"; +mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); +print strlen($utf8) . " bytes\n"; + +$utf8 = "abcde あいうえお 汉字 ελληνικά"; +$long_utf8 = str_repeat($utf8, 100); +print mb_strlen($utf8, 'UTF-8') . "\n"; +print mb_strlen($long_utf8, 'UTF-8') . "\n"; + +echo "== UTF-8 with performance optimizations ==\n"; +// Optimized mb_strlen can be used on UTF-8 strings after they are checked for validity +mb_check_encoding($utf8); +mb_check_encoding($long_utf8); +print mb_strlen($utf8, 'UTF-8') . "\n"; +print mb_strlen($long_utf8, 'UTF-8') . "\n"; + +$str = str_repeat('Σ', 2048); // 2-byte UTF-8 character +mb_check_encoding($str, 'UTF-8'); +print mb_strlen($str, 'UTF-8') . "\n"; // Wrong Parameters echo "== WRONG PARAMETERS ==\n"; @@ -110,7 +126,13 @@ try { 43 90 == UTF-8 == -43 -101 +43 codepoints +101 bytes +23 +2300 +== UTF-8 with performance optimizations == +23 +2300 +2048 == WRONG PARAMETERS == mb_strlen(): Argument #2 ($encoding) must be a valid encoding, "BAD_NAME" given From bcc5d268f6b90be3964b6d64e19bf71b6110f0c4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 9 Jan 2023 07:50:30 +0100 Subject: [PATCH 119/895] ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace() (#10146) A copy of this piece of code exists in zend_jit_compile_side_trace(), but there, the leak bug does not exist. This bug exists since both copies of this piece of code were added in commit 4bf2d09edeb14 --- ext/opcache/jit/zend_jit_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 56b01e7daca04..555a868b2d553 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -7114,6 +7114,7 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace if (t->stack_map_size) { zend_jit_trace_stack *shared_stack_map = (zend_jit_trace_stack*)zend_shared_alloc(t->stack_map_size * sizeof(zend_jit_trace_stack)); if (!shared_stack_map) { + efree(t->stack_map); ret = ZEND_JIT_TRACE_STOP_NO_SHM; goto exit; } From 4d4a53beee2b815ccd9f2905efd4f7f177c18ec8 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 9 Jan 2023 13:51:57 +0300 Subject: [PATCH 120/895] Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values) --- Zend/Optimizer/dfa_pass.c | 2 +- ext/opcache/tests/opt/assign_op_002.phpt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/opt/assign_op_002.phpt diff --git a/Zend/Optimizer/dfa_pass.c b/Zend/Optimizer/dfa_pass.c index a1124199bb447..754dec7ee60cf 100644 --- a/Zend/Optimizer/dfa_pass.c +++ b/Zend/Optimizer/dfa_pass.c @@ -1687,7 +1687,7 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx && Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG && Z_LVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == 1 && ssa->ops[op_1].op1_use >= 0 - && !(ssa->var_info[ssa->ops[op_1].op1_use].type & (MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) { + && !(ssa->var_info[ssa->ops[op_1].op1_use].type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) { // op_1: ASSIGN_SUB #?.CV [undef,null,int,foat] -> #v.CV, int(1) => PRE_DEC #?.CV ->#v.CV diff --git a/ext/opcache/tests/opt/assign_op_002.phpt b/ext/opcache/tests/opt/assign_op_002.phpt new file mode 100644 index 0000000000000..63746ac1c86b6 --- /dev/null +++ b/ext/opcache/tests/opt/assign_op_002.phpt @@ -0,0 +1,18 @@ +--TEST-- +ASSIGN_OP 002: Incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--FILE-- + +--EXPECT-- +int(1) +int(-1) From a9e7b90cc2e2a120f24c97a0186b39debbfdc5dd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 21 Oct 2022 20:11:35 +0200 Subject: [PATCH 121/895] Adapt ext/intl tests for ICU 72.1 This version replaces SPACEs before the meridian with NARROW NO-BREAK SPACEs. Thus, we split the affected test cases as usual. (cherry picked from commit 8dd51b462d72bd3abeeb82f602a269e0b087b901) Fixes GH-10262. --- .../tests/dateformat_calendars_variant3.phpt | 1 + .../dateformat_calendars_variant_icu72-1.phpt | 48 +++ ext/intl/tests/dateformat_create_default.phpt | 2 + .../dateformat_create_default_icu72-1.phpt | 26 ++ ...format_formatObject_calendar_variant5.phpt | 1 + ...formatObject_calendar_variant_icu72-1.phpt | 37 +++ ...format_formatObject_datetime_variant5.phpt | 1 + ...formatObject_datetime_variant_icu72-1.phpt | 30 ++ .../dateformat_format_parse_version2.phpt | 1 + ...teformat_format_parse_version_icu72-1.phpt | 296 ++++++++++++++++++ .../tests/dateformat_set_timezone_id3.phpt | 1 + .../dateformat_set_timezone_id_icu72-1.phpt | 85 +++++ ...datepatterngenerator_get_best_pattern.phpt | 2 + ...erngenerator_get_best_pattern_icu72-1.phpt | 38 +++ ext/intl/tests/msgfmt_format_datetime.phpt | 2 + .../tests/msgfmt_format_datetime_icu72-1.phpt | 29 ++ ...t_format_simple_types_numeric_strings.phpt | 2 + ..._simple_types_numeric_strings_icu72-1.phpt | 54 ++++ ...cebundle_null_mandatory_args_variant2.phpt | 1 + ...e_null_mandatory_args_variant_icu72-1.phpt | 24 ++ 20 files changed, 681 insertions(+) create mode 100644 ext/intl/tests/dateformat_calendars_variant_icu72-1.phpt create mode 100644 ext/intl/tests/dateformat_create_default_icu72-1.phpt create mode 100644 ext/intl/tests/dateformat_formatObject_calendar_variant_icu72-1.phpt create mode 100644 ext/intl/tests/dateformat_formatObject_datetime_variant_icu72-1.phpt create mode 100644 ext/intl/tests/dateformat_format_parse_version_icu72-1.phpt create mode 100644 ext/intl/tests/dateformat_set_timezone_id_icu72-1.phpt create mode 100644 ext/intl/tests/datepatterngenerator_get_best_pattern_icu72-1.phpt create mode 100644 ext/intl/tests/msgfmt_format_datetime_icu72-1.phpt create mode 100644 ext/intl/tests/msgfmt_format_simple_types_numeric_strings_icu72-1.phpt create mode 100644 ext/intl/tests/resourcebundle_null_mandatory_args_variant_icu72-1.phpt diff --git a/ext/intl/tests/dateformat_calendars_variant3.phpt b/ext/intl/tests/dateformat_calendars_variant3.phpt index 0e7f8b0183d71..bf2f1e918f172 100644 --- a/ext/intl/tests/dateformat_calendars_variant3.phpt +++ b/ext/intl/tests/dateformat_calendars_variant3.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 54.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000'))); + +new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + -1); +?> +==DONE== +--EXPECTF-- +string(49) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(49) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(46) "Sunday, 6 Tevet 5772 at 5:12:00 AM GMT+05:12" + +Fatal error: Uncaught IntlException: IntlDateFormatter::__construct(): datefmt_create: Invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %s:%d +Stack trace: +#0 %s(%d): IntlDateFormatter->__construct('en_US@calendar=...', 0, 0, 'GMT+05:12', -1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/dateformat_create_default.phpt b/ext/intl/tests/dateformat_create_default.phpt index eddac36f5ea39..1479ee9a98476 100644 --- a/ext/intl/tests/dateformat_create_default.phpt +++ b/ext/intl/tests/dateformat_create_default.phpt @@ -4,6 +4,8 @@ IntlDateFormatter::create() with default date and time types intl --INI-- date.timezone=UTC +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format($ts), "\n"; + +$fmt = new IntlDateFormatter('en_US'); +echo $fmt->format($ts), "\n"; + +$fmt = datefmt_create('en_US'); +echo $fmt->format($ts), "\n"; + +?> +--EXPECT-- +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time diff --git a/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt b/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt index 494b66768906f..9eb9f39a917a7 100644 --- a/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt +++ b/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt @@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): IntlCalendar tests intl --SKIPIF-- = 55.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +setTime(strtotime('2012-01-01 00:00:00')*1000.); +echo IntlDateFormatter::formatObject($cal), "\n"; +echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL, "en-US"), "\n"; + +?> +--EXPECTF-- +01/01/2012, 00:00:00 +domingo, 1 de janeiro de 2012 às 00:00:00 Hora padrão %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard Time +Sun 2012-01-1 00,00,00.000 Portugal Time +domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00 +06/02/1433, 00:00:00 +Sunday, Safar 6, 1433 at 12:00:00 AM Western European Standard Time diff --git a/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt b/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt index b51a46d7f3976..b3c2ecc8e7932 100644 --- a/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt +++ b/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt @@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): DateTime tests intl --SKIPIF-- = 55.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- +--FILE-- + +--EXPECTF-- +01/01/2012, 00:00:00 +domingo, 1 de janeiro de 2012 às 00:00:00 Hora padrão %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard Time +Sun 2012-01-1 00,00,00.000 Portugal Time +domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00 diff --git a/ext/intl/tests/dateformat_format_parse_version2.phpt b/ext/intl/tests/dateformat_format_parse_version2.phpt index 19e7d914adcfd..1293d29c383bf 100644 --- a/ext/intl/tests/dateformat_format_parse_version2.phpt +++ b/ext/intl/tests/dateformat_format_parse_version2.phpt @@ -4,6 +4,7 @@ datefmt_format_code() and datefmt_parse_code() intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- + 24 , + 'tm_min' => 3, + 'tm_hour' => 19, + 'tm_mday' => 3, + 'tm_mon' => 3, + 'tm_year' => 105, + ); + $localtime_arr2 = array ( + 'tm_sec' => 21, + 'tm_min' => 5, + 'tm_hour' => 7, + 'tm_mday' => 13, + 'tm_mon' => 7, + 'tm_year' => 205, + ); + $localtime_arr3 = array ( + 'tm_sec' => 11, + 'tm_min' => 13, + 'tm_hour' => 0, + 'tm_mday' => 17, + 'tm_mon' => 11, + 'tm_year' => -5 + ); + + $localtime_arr = array ( + $localtime_arr1, + $localtime_arr2, + $localtime_arr3 + ); + + //Test format and parse with a timestamp : long + foreach( $time_arr as $timestamp_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput timestamp is : $timestamp_entry"; + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted = ut_datefmt_format( $fmt , $timestamp_entry); + $res_str .= "\nFormatted timestamp is : $formatted"; + $parsed = ut_datefmt_parse( $fmt , $formatted); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nParsed timestamp is : $parsed"; + }else{ + $res_str .= "\nError while parsing as: '".intl_get_error_message()."'"; + } + } + } + } + + //Test format and parse with a localtime :array + foreach( $localtime_arr as $localtime_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput localtime is : "; + foreach( $localtime_entry as $key => $value){ + $res_str .= "$key : '$value' , "; + } + + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nFormatted localtime_array is : $formatted1"; + }else{ + $res_str .= "\nError while formatting as: '".intl_get_error_message()."'"; + } + //Parsing + $parsed_arr = ut_datefmt_localtime( $fmt, $formatted1 ); + + if( $parsed_arr){ + $res_str .= "\nParsed array is: "; + foreach( $parsed_arr as $key => $value){ + $res_str .= "$key : '$value' , "; + } + } +/* + else{ + //$res_str .= "No values found from LocaleTime parsing."; + $res_str .= "\tError : '".intl_get_error_message()."'"; + } +*/ + } + } + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +------------ + +Input timestamp is : 0 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 5:00:00 AM GMT+05:00 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 5:00:00 AM GMT+5 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 5:00:00 AM +Parsed timestamp is : 0 +------------ + +Input timestamp is : -1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, December 18, 1969 at 7:40:00 AM GMT+05:00 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 18, 1969 at 7:40:00 AM GMT+5 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 18, 1969, 7:40:00 AM +Parsed timestamp is : -1200000 +------------ + +Input timestamp is : 1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 15, 1970 at 2:20:00 AM GMT+05:00 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 15, 1970 at 2:20:00 AM GMT+5 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 15, 1970, 2:20:00 AM +Parsed timestamp is : 1200000 +------------ + +Input timestamp is : 2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Monday, September 19, 2039 at 4:06:40 AM GMT+05:00 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : September 19, 2039 at 4:06:40 AM GMT+5 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Sep 19, 2039, 4:06:40 AM +Parsed timestamp is : 2200000000 +------------ + +Input timestamp is : -2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Sunday, April 15, 1900 at 5:53:20 AM GMT+05:00 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : April 15, 1900 at 5:53:20 AM GMT+5 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Apr 15, 1900, 5:53:20 AM +Parsed timestamp is : -2200000000 +------------ + +Input timestamp is : 90099999 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, November 9, 1972 at 12:46:39 AM GMT+05:00 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : November 9, 1972 at 12:46:39 AM GMT+5 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Nov 9, 1972, 12:46:39 AM +Parsed timestamp is : 90099999 +------------ + +Input timestamp is : 3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 6:00:00 AM GMT+05:00 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 6:00:00 AM GMT+5 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 6:00:00 AM +Parsed timestamp is : 3600 +------------ + +Input timestamp is : -3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 4:00:00 AM GMT+05:00 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 4:00:00 AM GMT+5 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 4:00:00 AM +Parsed timestamp is : -3600 +------------ + +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT+05:00 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT+5 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '7' , tm_year : '205' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Thursday, August 13, 2105 at 7:05:21 AM GMT+05:00 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : August 13, 2105 at 7:05:21 AM GMT+5 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Aug 13, 2105, 7:05:21 AM +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT+05:00 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT+5 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , diff --git a/ext/intl/tests/dateformat_set_timezone_id3.phpt b/ext/intl/tests/dateformat_set_timezone_id3.phpt index e0d7cd0e52607..a4952eb5a3dcb 100644 --- a/ext/intl/tests/dateformat_set_timezone_id3.phpt +++ b/ext/intl/tests/dateformat_set_timezone_id3.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 4.8 +--INI-- +date.timezone=Atlantic/Azores +--EXTENSIONS-- +intl +--SKIPIF-- += 72.1'); ?> +--FILE-- + +--EXPECTF-- +Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: No such time zone: 'CN' in %sut_common.inc on line %d + +Warning: datefmt_set_timezone(): datefmt_set_timezone: No such time zone: 'CN' in %sut_common.inc on line %d + +After creation of the dateformatter : timezone_id= US/Pacific +----------- +Trying to set timezone_id= America/New_York +After call to set_timezone_id : timezone_id= America/New_York +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Eastern Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 8:00:00 PM Eastern Standard Time +----------- +Trying to set timezone_id= America/Los_Angeles +After call to set_timezone_id : timezone_id= America/Los_Angeles +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 4:00:00 PM Pacific Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 5:00:00 PM Pacific Standard Time +----------- +Trying to set timezone_id= America/Chicago +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time +----------- +Trying to set timezone_id= CN +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time diff --git a/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt b/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt index 9e29bc90493e9..279554123b795 100644 --- a/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt +++ b/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt @@ -2,6 +2,8 @@ IntlDatePatternGenerator::getBestPattern() --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +getBestPattern("jjmm"), "\n"; +echo $dtpg2->getBestPattern("jjmm"), "\n"; +echo $dtpg3->getBestPattern("YYYYMMMdd"), "\n"; +echo $dtpg4->getBestPattern("YYYYMMMdd"), "\n"; + +echo $dtpg->getBestPattern(""), "\n"; + +try { + $dtpg->getBestPattern(); +} catch(\ArgumentCountError $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +h:mm a +HH:mm +MMM dd, YYYY +dd. MMM YYYY + +IntlDatePatternGenerator::getBestPattern() expects exactly 1 argument, 0 given diff --git a/ext/intl/tests/msgfmt_format_datetime.phpt b/ext/intl/tests/msgfmt_format_datetime.phpt index 8b3e37ab30f5d..e6a7451906f77 100644 --- a/ext/intl/tests/msgfmt_format_datetime.phpt +++ b/ext/intl/tests/msgfmt_format_datetime.phpt @@ -4,6 +4,8 @@ MessageFormatter::format(): DateTime accepted to format dates and times date.timezone=Atlantic/Azores --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(array($dt))); +var_dump($mf->format(array($dti))); + +?> +--EXPECT-- +string(24) "May 6, 2012 5:00:42 PM" +string(24) "May 6, 2012 5:00:42 PM" diff --git a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt index 9bc38b683cd0a..f92eaa2bdb54a 100644 --- a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt +++ b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt @@ -4,6 +4,8 @@ MessageFormatter::format(): simple types handling with numeric strings date.timezone=Atlantic/Azores --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(array( +'a' => $ex, +'b' => $ex, +'c' => $ex, +'d' => $ex, +'e' => $ex, +'f' => " 1336317965.5", +'g' => " 1336317965.5", +'h' => $ex, +'i' => $ex, +'j' => $ex, +))); + +?> +--EXPECTF-- +string(%d) " + none 1336317965.5 str + number 1,336,317,965.5 + number integer 1,336,317,965 + number currency $1,336,317,965.50 + number percent 133,631,796,550% + date May %d, 2012 + time 3:26:05 PM + spellout one billion three hundred thirty-six million three hundred seventeen thousand nine hundred sixty-five point five + ordinal 1,336,317,966th + duration 371,199:26:06 +" diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt index 31250027184b3..5aefcf268dff5 100644 --- a/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt +++ b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); + +ini_set('intl.default_locale', 'pt_PT'); +$r = new ResourceBundle(NULL, NULL); +$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); +?> +--EXPECT-- +string(16) "h:mm:ss a zzzz" +string(13) "HH:mm:ss zzzz" From 13b82eef8426f16960ff6d895d1d5949c55d9ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 10 Jan 2023 10:16:33 +0100 Subject: [PATCH 122/895] random: Randomizer::getFloat(): Fix check for empty open intervals (#10185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * random: Randomizer::getFloat(): Fix check for empty open intervals The check for invalid parameters for the IntervalBoundary::OpenOpen variant was not correct: If two consecutive doubles are passed as parameters, the resulting interval is empty, resulting in an uint64 underflow in the γ-section implementation. Instead of checking whether `$min < $max`, we must check that there is at least one more double between `$min` and `$max`, i.e. it must hold that: nextafter($min, $max) != $max Instead of duplicating the comparatively complicated and expensive `nextafter` logic for a rare error case we instead return `NAN` from the γ-section implementation when the parameters result in an empty interval and thus underflow. This allows us to reliably detect this specific error case *after* the fact, but without modifying the engine state. It also provides reliable error reporting for other internal functions that might use the γ-section implementation. * random: γ-section: Also check that that min is smaller than max This extends the empty-interval check in the γ-section implementation with a check that min is actually the smaller of the two parameters. * random: Use PHP_FLOAT_EPSILON in getFloat_error.phpt Co-authored-by: Christoph M. Becker --- ext/random/gammasection.c | 20 +++++++++++++++++++ ext/random/randomizer.c | 9 ++++++++- .../03_randomizer/methods/getFloat_error.phpt | 13 +++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ext/random/gammasection.c b/ext/random/gammasection.c index fb0c2cd3bf94d..aa4531fba22f7 100644 --- a/ext/random/gammasection.c +++ b/ext/random/gammasection.c @@ -66,6 +66,11 @@ PHPAPI double php_random_gammasection_closed_open(const php_random_algo *algo, p { double g = gamma_max(min, max); uint64_t hi = ceilint(min, max, g); + + if (UNEXPECTED(max <= min || hi < 1)) { + return NAN; + } + uint64_t k = 1 + php_random_range64(algo, status, hi - 1); /* [1, hi] */ if (fabs(min) <= fabs(max)) { @@ -79,6 +84,11 @@ PHPAPI double php_random_gammasection_closed_closed(const php_random_algo *algo, { double g = gamma_max(min, max); uint64_t hi = ceilint(min, max, g); + + if (UNEXPECTED(max < min)) { + return NAN; + } + uint64_t k = php_random_range64(algo, status, hi); /* [0, hi] */ if (fabs(min) <= fabs(max)) { @@ -92,6 +102,11 @@ PHPAPI double php_random_gammasection_open_closed(const php_random_algo *algo, p { double g = gamma_max(min, max); uint64_t hi = ceilint(min, max, g); + + if (UNEXPECTED(max <= min || hi < 1)) { + return NAN; + } + uint64_t k = php_random_range64(algo, status, hi - 1); /* [0, hi - 1] */ if (fabs(min) <= fabs(max)) { @@ -105,6 +120,11 @@ PHPAPI double php_random_gammasection_open_open(const php_random_algo *algo, php { double g = gamma_max(min, max); uint64_t hi = ceilint(min, max, g); + + if (UNEXPECTED(max <= min || hi < 2)) { + return NAN; + } + uint64_t k = 1 + php_random_range64(algo, status, hi - 2); /* [1, hi - 1] */ if (fabs(min) <= fabs(max)) { diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 0a801e35c74c6..75e88c8b01012 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -190,7 +190,14 @@ PHP_METHOD(Random_Randomizer, getFloat) RETURN_THROWS(); } - RETURN_DOUBLE(php_random_gammasection_open_open(randomizer->algo, randomizer->status, min, max)); + RETVAL_DOUBLE(php_random_gammasection_open_open(randomizer->algo, randomizer->status, min, max)); + + if (UNEXPECTED(isnan(Z_DVAL_P(return_value)))) { + zend_value_error("The given interval is empty, there are no floats between argument #1 ($min) and argument #2 ($max)."); + RETURN_THROWS(); + } + + return; default: ZEND_UNREACHABLE(); } diff --git a/ext/random/tests/03_randomizer/methods/getFloat_error.phpt b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt index 1e200f2507a69..286435e1752fb 100644 --- a/ext/random/tests/03_randomizer/methods/getFloat_error.phpt +++ b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt @@ -73,10 +73,17 @@ foreach ([ } catch (ValueError $e) { echo $e->getMessage(), PHP_EOL; } + + try { + // There is no float between the two parameters, thus making the OpenOpen interval empty. + var_dump(randomizer()->getFloat(1.0, 1 + PHP_FLOAT_EPSILON, $boundary)); + } catch (ValueError $e) { + echo $e->getMessage(), PHP_EOL; + } } ?> ---EXPECT-- +--EXPECTF-- ClosedClosed Random\Randomizer::getFloat(): Argument #1 ($min) must be finite Random\Randomizer::getFloat(): Argument #1 ($min) must be finite @@ -87,6 +94,7 @@ Random\Randomizer::getFloat(): Argument #2 ($max) must be finite Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) float(0) float(1.0E+17) +float(%f) ClosedOpen Random\Randomizer::getFloat(): Argument #1 ($min) must be finite Random\Randomizer::getFloat(): Argument #1 ($min) must be finite @@ -97,6 +105,7 @@ Random\Randomizer::getFloat(): Argument #2 ($max) must be finite Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +float(1) OpenClosed Random\Randomizer::getFloat(): Argument #1 ($min) must be finite Random\Randomizer::getFloat(): Argument #1 ($min) must be finite @@ -107,6 +116,7 @@ Random\Randomizer::getFloat(): Argument #2 ($max) must be finite Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +float(1.0000000000000002) OpenOpen Random\Randomizer::getFloat(): Argument #1 ($min) must be finite Random\Randomizer::getFloat(): Argument #1 ($min) must be finite @@ -117,3 +127,4 @@ Random\Randomizer::getFloat(): Argument #2 ($max) must be finite Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +The given interval is empty, there are no floats between argument #1 ($min) and argument #2 ($max). From 01e5ffc85cd4357fd7b5b7ceefa29f2d10ca26b7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 16:36:26 +0100 Subject: [PATCH 123/895] UPGRADING.INTERNALS: mention the header cleanups --- UPGRADING.INTERNALS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index d6911af58db1d..770300a350c0e 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -20,6 +20,12 @@ PHP 8.3 INTERNALS UPGRADE NOTES EG(stack_base). * EG(opline_before_exception) may now be null if the VM throws an exception before executing any opline. +* Many C header files have been cleaned up and include dependencies + have been reduced. Many headers which used to be always included by + Zend headers (e.g. "errno.h") are no longer implied, and this may + break the build of third-party extensions which relied on this + implementation detail. Those extensions may need to add the missing + #include lines. ======================== 2. Build system changes From 928685eba2b2f0ded90e7f78fd806ea164002f6e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 14:59:41 +0100 Subject: [PATCH 124/895] Zend/zend_signal: include cleanup --- Zend/zend_signal.c | 9 ++++++--- Zend/zend_signal.h | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index aa74bdd147c98..8fd55942f86f5 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -28,11 +28,14 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif -#include -#include "zend.h" -#include "zend_globals.h" +#include "zend_signal.h" +#include "zend_alloc.h" +#include "zend.h" // for zend_output_debug_string(), zend_error(), ... + +#include #include +#include #ifdef HAVE_UNISTD_H #include diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h index 93edc1f0e0213..53ef58fa53f96 100644 --- a/Zend/zend_signal.h +++ b/Zend/zend_signal.h @@ -21,9 +21,18 @@ #ifndef ZEND_SIGNAL_H #define ZEND_SIGNAL_H +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include "php_config.h" // for ZEND_SIGNALS +#endif + #ifdef ZEND_SIGNALS +#include "zend_portability.h" // for BEGIN_EXTERN_C + #include +#include #ifndef NSIG #define NSIG 65 From cd4a7c1d90562ebb5f89caf94d00d579631b9fbe Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 14:46:42 +0100 Subject: [PATCH 125/895] Zend/zend_ini: include cleanup --- Zend/zend_ini.c | 4 +++- Zend/zend_ini.h | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 77fab940d664d..e2979e76444cd 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -16,16 +16,18 @@ +----------------------------------------------------------------------+ */ +#include "zend_ini.h" #include "zend.h" #include "zend_sort.h" #include "zend_API.h" -#include "zend_ini.h" #include "zend_alloc.h" #include "zend_operators.h" #include "zend_strtod.h" #include "zend_modules.h" #include "zend_smart_str.h" + #include +#include static HashTable *registered_zend_ini_directives; diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 048d8a3cc3897..ce5af258d8706 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -19,12 +19,24 @@ #ifndef ZEND_INI_H #define ZEND_INI_H +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_result + +#include + #define ZEND_INI_USER (1<<0) #define ZEND_INI_PERDIR (1<<1) #define ZEND_INI_SYSTEM (1<<2) #define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM) +// forward declarations +typedef struct _zend_file_handle zend_file_handle; +typedef struct _zend_ini_entry zend_ini_entry; +typedef struct _zend_module_entry zend_module_entry; +typedef struct _zend_string zend_string; +typedef struct _zend_array HashTable; + #define ZEND_INI_MH(name) int name(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage) #define ZEND_INI_DISP(name) ZEND_COLD void name(zend_ini_entry *ini_entry, int type) From 9fdbefacd3c382d731aa175b7bdc002ec9cb2b30 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 14:40:25 +0100 Subject: [PATCH 126/895] main/s[np]printf: include cleanup --- main/snprintf.c | 2 +- main/snprintf.h | 3 +++ main/spprintf.c | 3 ++- main/spprintf.h | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main/snprintf.c b/main/snprintf.c index 3c379c5c2ce18..d00fb83286e26 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -17,7 +17,7 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif -#include "php.h" +#include "snprintf.h" #include diff --git a/main/snprintf.h b/main/snprintf.h index 2ff7116c3fbb4..99c746d994acd 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -66,6 +66,9 @@ spprintf is the dynamical version of snprintf. It allocates the buffer in size #ifndef SNPRINTF_H #define SNPRINTF_H +#include "php.h" // for PHPAPI +#include "zend_portability.h" // for BEGIN_EXTERN_C + #include BEGIN_EXTERN_C() diff --git a/main/spprintf.c b/main/spprintf.c index 37b81dc6d530b..f4faf0d894c5e 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -75,7 +75,8 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif -#include "php.h" +#include "spprintf.h" +#include "zend_strtod.h" #include #include diff --git a/main/spprintf.h b/main/spprintf.h index 4da224845b3b9..73d9286d47433 100644 --- a/main/spprintf.h +++ b/main/spprintf.h @@ -18,6 +18,8 @@ #define SPPRINTF_H #include "snprintf.h" +#include "php.h" // for PHPAPI +#include "zend_portability.h" // for BEGIN_EXTERN_C #include "zend_smart_str_public.h" #include "zend_smart_string_public.h" From 738fb5ca5412f5e833a7fab82b11519e635a3357 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 10:05:17 +0100 Subject: [PATCH 127/895] Zend/zend_smart_str: include cleanup --- Zend/zend_smart_str.c | 4 +++- Zend/zend_smart_str.h | 9 +++++++-- Zend/zend_smart_str_public.h | 5 +++++ Zend/zend_smart_string.h | 5 +++-- Zend/zend_smart_string_public.h | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index 5132043c60e25..689989059c2d3 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -14,9 +14,11 @@ +----------------------------------------------------------------------+ */ -#include #include "zend_smart_str.h" #include "zend_smart_string.h" +#include "zend_globals_macros.h" // for EG() +#include "zend_globals.h" // struct _zend_executor_globals +#include "zend_strtod.h" // for zend_gcvt() #define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1) #define SMART_STR_START_SIZE 256 diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index e271835e41db9..ac5b18db97e2e 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -17,10 +17,15 @@ #ifndef ZEND_SMART_STR_H #define ZEND_SMART_STR_H -#include -#include "zend_globals.h" #include "zend_smart_str_public.h" +#include "zend_operators.h" // for zend_print_long_to_buf() +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_string.h" + +// forward declarations +typedef struct _zval_struct zval; + BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len); diff --git a/Zend/zend_smart_str_public.h b/Zend/zend_smart_str_public.h index e81a6839b3bbb..84fc3758ae7c4 100644 --- a/Zend/zend_smart_str_public.h +++ b/Zend/zend_smart_str_public.h @@ -17,6 +17,11 @@ #ifndef ZEND_SMART_STR_PUBLIC_H #define ZEND_SMART_STR_PUBLIC_H +#include // for size_t + +// forward declarations +typedef struct _zend_string zend_string; + typedef struct { /** See smart_str_extract() */ zend_string *s; diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h index 8149b29fb3330..08eb6a8eced7f 100644 --- a/Zend/zend_smart_string.h +++ b/Zend/zend_smart_string.h @@ -20,8 +20,9 @@ #include "zend_smart_string_public.h" -#include -#include +#include "zend_alloc.h" // for pefree() +#include "zend_operators.h" // for zend_print_long_to_buf() +#include "zend_portability.h" // for ZEND_FASTCALL /* wrapper */ diff --git a/Zend/zend_smart_string_public.h b/Zend/zend_smart_string_public.h index 543e1d37a4efe..e61bdd2d36f4a 100644 --- a/Zend/zend_smart_string_public.h +++ b/Zend/zend_smart_string_public.h @@ -18,7 +18,7 @@ #ifndef PHP_SMART_STRING_PUBLIC_H #define PHP_SMART_STRING_PUBLIC_H -#include +#include // for size_t typedef struct { char *c; From 16203b53e1822a37b6ba6f2ab198bb435d05fdad Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 15:03:56 +0100 Subject: [PATCH 128/895] main: add missing includes --- main/main.c | 2 ++ main/streams/plain_wrapper.c | 3 +++ main/streams/streams.c | 3 +++ main/streams/xp_socket.c | 3 +++ 4 files changed, 11 insertions(+) diff --git a/main/main.c b/main/main.c index 2605e554c7ce6..17da657d17721 100644 --- a/main/main.c +++ b/main/main.c @@ -82,6 +82,8 @@ #include "rfc1867.h" #include "ext/standard/html_tables.h" + +#include // for DBL_*, used by main_arginfo.h #include "main_arginfo.h" /* }}} */ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index e9a30f3334016..a7013a6f8fb1b 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -42,6 +42,9 @@ # include "win32/readdir.h" #endif +#include +#include // for strerror() + #define php_stream_fopen_from_fd_int(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC) #define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC) #define php_stream_fopen_from_file_int(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_CC) diff --git a/main/streams/streams.c b/main/streams/streams.c index 1231dbebd63ae..fc167a28728b9 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -32,6 +32,9 @@ #include #include "php_streams_int.h" +#include +#include // for strerror() + /* {{{ resource and registration code */ /* Global wrapper hash, copied to FG(stream_wrappers) on registration of volatile wrapper */ static HashTable url_stream_wrappers_hash; diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 3a4beca9f077b..aa10f598d6282 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -25,8 +25,11 @@ #ifdef AF_UNIX #include +#include // for strerror() #endif +#include + #ifndef MSG_DONTWAIT # define MSG_DONTWAIT 0 #endif From 308fd311ea6fcf3094b448df7f2b264f08e4fe4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 10:54:26 +0100 Subject: [PATCH 129/895] ext/{standard,json,random,...}: add missing includes --- ext/intl/collator/collator_is_numeric.c | 3 +++ ext/json/json_encoder.c | 1 + ext/json/json_scanner.re | 1 + ext/mbstring/libmbfl/filters/mbfilter_base64.c | 1 + ext/mysqlnd/mysql_float_to_double.h | 1 + ext/mysqlnd/mysqlnd_connection.c | 2 ++ ext/mysqlnd/mysqlnd_wireprotocol.c | 1 + ext/oci8/oci8_collection.c | 1 + ext/opcache/jit/zend_jit.c | 4 ++++ ext/opcache/zend_file_cache.c | 1 + ext/openssl/xp_ssl.c | 2 ++ ext/pcre/php_pcre.c | 1 + ext/pdo_pgsql/pgsql_driver.c | 2 ++ ext/pgsql/pgsql.c | 1 + ext/phar/phar_object.c | 2 ++ ext/random/gammasection.c | 2 ++ ext/random/random.c | 1 + ext/random/randomizer.c | 2 ++ ext/shmop/shmop.c | 4 +++- ext/soap/php_encoding.c | 2 ++ ext/sockets/conversions.c | 1 + ext/sockets/multicast.c | 1 + ext/sockets/sendrecvmsg.c | 2 ++ ext/sockets/sockaddr_conv.c | 1 + ext/spl/spl_directory.c | 3 +++ ext/standard/array.c | 1 + ext/standard/basic_functions.c | 4 ++++ ext/standard/dns.c | 3 +++ ext/standard/exec.c | 4 ++++ ext/standard/formatted_print.c | 1 + ext/standard/ftok.c | 4 ++++ ext/standard/hrtime.c | 1 + ext/standard/mail.c | 2 ++ ext/standard/math.c | 1 + ext/standard/net.c | 3 +++ ext/standard/php_fopen_wrapper.c | 3 +++ ext/standard/proc_open.c | 3 +++ ext/standard/streamsfuncs.c | 3 +++ ext/standard/var.c | 1 + ext/standard/var_unserializer.re | 1 + ext/sysvmsg/sysvmsg.c | 5 ++++- 41 files changed, 81 insertions(+), 2 deletions(-) diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index 823fb4088d8fd..0f6c216502da5 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -14,6 +14,9 @@ */ #include "collator_is_numeric.h" +#include "zend_strtod.h" + +#include /* {{{ Taken from PHP6:zend_u_strtod() */ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */ diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index adb53598326bd..a3e136ec9b5e1 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -28,6 +28,7 @@ #include "php_json_encoder.h" #include #include "zend_enum.h" +#include "zend_strtod.h" // for ZEND_DOUBLE_MAX_LENGTH static const char digits[] = "0123456789abcdef"; diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re index 1db43dd081a56..014f29bd56414 100644 --- a/ext/json/json_scanner.re +++ b/ext/json/json_scanner.re @@ -18,6 +18,7 @@ #include "php_json_scanner.h" #include "php_json_scanner_defs.h" #include "php_json_parser.h" +#include "zend_strtod.h" #include "json_parser.tab.h" #define YYCTYPE php_json_ctype diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index ede3eef18ce7c..bc06c6a1abf12 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -30,6 +30,7 @@ #include "mbfilter.h" #include "mbfilter_base64.h" +#include "zend_multiply.h" // for zend_safe_address_guarded() static size_t mb_base64_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_base64(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); diff --git a/ext/mysqlnd/mysql_float_to_double.h b/ext/mysqlnd/mysql_float_to_double.h index a15458b52de25..b868aa67aa4c1 100644 --- a/ext/mysqlnd/mysql_float_to_double.h +++ b/ext/mysqlnd/mysql_float_to_double.h @@ -20,6 +20,7 @@ #include "main/php.h" #include #include "main/snprintf.h" +#include "zend_strtod.h" #define MAX_CHAR_BUF_LEN 255 diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index ed4d1af277ddc..666ab6662158c 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -30,6 +30,8 @@ #include "mysqlnd_ext_plugin.h" #include "zend_smart_str.h" +#include +#include // for strerror() extern MYSQLND_CHARSET *mysqlnd_charsets; diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index fce042ec5be5c..25f178e0b57d9 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -23,6 +23,7 @@ #include "mysqlnd_wireprotocol.h" #include "mysqlnd_statistics.h" #include "mysqlnd_debug.h" +#include "zend_strtod.h" #define BAIL_IF_NO_MORE_DATA \ if (UNEXPECTED((size_t)(p - begin) > packet->header.size)) { \ diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index dcad335647518..b3529354b8a72 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -35,6 +35,7 @@ #include "php_oci8.h" #include "php_oci8_int.h" +#include "zend_strtod.h" /* {{{ php_oci_collection_create() Create and return connection handle */ diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 429d8dbd49f5a..b7af6f83d31a8 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -51,6 +51,10 @@ #include #endif +#ifdef HAVE_MPROTECT +#include +#endif + #ifdef ZTS int jit_globals_id; #else diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 1cd639403f68b..f98bd66fa04a0 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -42,6 +42,7 @@ #include #include +#include #include #if HAVE_UNISTD_H diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 048076808925d..d245fab5a78fb 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -36,6 +36,8 @@ #include #include +#include + #ifdef PHP_WIN32 #include "win32/winutil.h" #include "win32/time.h" diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index f4fd60e96ebef..099e1e5bbbc49 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -20,6 +20,7 @@ #include "php_pcre.h" #include "ext/standard/info.h" #include "ext/standard/basic_functions.h" +#include "zend_multiply.h" // for zend_safe_address_guarded() #include "zend_smart_str.h" #include "SAPI.h" diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index ec4d5ec65866b..cdd9b6ddae321 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -34,6 +34,8 @@ #include "zend_exceptions.h" #include "pgsql_driver_arginfo.h" +#include + static bool pgsql_handle_in_transaction(pdo_dbh_t *dbh); static char * _pdo_pgsql_trim_message(const char *message, int persistent) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 00bdf15286e00..0679b2b6c4638 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -39,6 +39,7 @@ #include "php_pgsql.h" #include "php_globals.h" #include "zend_exceptions.h" +#include "zend_strtod.h" #ifdef HAVE_PGSQL diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 41c55b75898a2..27e9ad204b91a 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -21,6 +21,8 @@ #include "func_interceptors.h" #include "phar_object_arginfo.h" +#include + static zend_class_entry *phar_ce_archive; static zend_class_entry *phar_ce_data; static zend_class_entry *phar_ce_PharException; diff --git a/ext/random/gammasection.c b/ext/random/gammasection.c index aa4531fba22f7..b8d32c3c2fe9c 100644 --- a/ext/random/gammasection.c +++ b/ext/random/gammasection.c @@ -24,6 +24,8 @@ #include "php_random.h" #include +#include // for DBL_MAX + /* This file implements the γ-section algorithm as published in: * * Drawing Random Floating-Point Numbers from an Interval. Frédéric diff --git a/ext/random/random.c b/ext/random/random.c index 4177bfc885f3d..a66f18c7a5ced 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -41,6 +41,7 @@ # include #else # include +# include #endif #ifdef __linux__ diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 75e88c8b01012..23860ada8a2a3 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -27,6 +27,8 @@ #include "Zend/zend_enum.h" #include "Zend/zend_exceptions.h" +#include // for DBL_MANT_DIG + static inline void randomizer_common_init(php_random_randomizer *randomizer, zend_object *engine_object) { if (engine_object->ce->type == ZEND_INTERNAL_CLASS) { /* Internal classes always php_random_engine struct */ diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index be4f57ad27162..dfb301788dd09 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -33,11 +33,13 @@ #include "tsrm_win32.h" #endif - #ifdef HAVE_SHMOP #include "ext/standard/info.h" +#include +#include // for strerror() + /* {{{ shmop_module_entry */ zend_module_entry shmop_module_entry = { STANDARD_MODULE_HEADER, diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 3b7d6c3885dcb..6fc81d30686f0 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -25,6 +25,8 @@ #include "zend_strtod.h" #include "zend_interfaces.h" +#include + /* zval type decode */ static zval *to_zval_double(zval* ret, encodeTypePtr type, xmlNodePtr data); static zval *to_zval_long(zval* ret, encodeTypePtr type, xmlNodePtr data); diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index ae90cbe59d2a7..bb314b4bb4dc2 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -24,6 +24,7 @@ # include #endif +#include #include #include #include diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index ef32661be09ff..00e7b8f0488c0 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -39,6 +39,7 @@ #include "sockaddr_conv.h" #include "main/php_network.h" +#include enum source_op { JOIN_SOURCE, diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index 5623b556aa000..eac78bda4137e 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -28,6 +28,8 @@ #include #endif +#include + #define MAX_USER_BUFF_SIZE ((size_t)(100*1024*1024)) #define DEFAULT_BUFF_SIZE 8192 #define MAX_ARRAY_KEY_SIZE 128 diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c index 6ec540931f725..2e8686bf5abab 100644 --- a/ext/sockets/sockaddr_conv.c +++ b/ext/sockets/sockaddr_conv.c @@ -5,6 +5,7 @@ #ifdef PHP_WIN32 #include "windows_common.h" #else +#include #include #include #endif diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 5c32e2f9ee359..fc806b457a195 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -36,6 +36,9 @@ #include "spl_directory_arginfo.h" #include "spl_exceptions.h" +#include +#include // for strerror() + #define SPL_HAS_FLAG(flags, test_flag) ((flags & test_flag) ? 1 : 0) /* declare the class handlers */ diff --git a/ext/standard/array.c b/ext/standard/array.c index 6252b61d2042a..96a32da8e0552 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -40,6 +40,7 @@ #include "zend_smart_str.h" #include "zend_bitset.h" #include "zend_exceptions.h" +#include "zend_strtod.h" #include "ext/spl/spl_array.h" #include "ext/random/php_random.h" diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f65a71a7266dd..4e10cac38c71b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -117,6 +117,10 @@ PHPAPI php_basic_globals basic_globals; #include "streamsfuncs.h" #include "basic_functions_arginfo.h" +#if defined(HAVE_NANOSLEEP) || !defined(PHP_WIN32) +#include +#endif + typedef struct _user_tick_function_entry { zend_fcall_info fci; zend_fcall_info_cache fci_cache; diff --git a/ext/standard/dns.c b/ext/standard/dns.c index d229b998a4b6b..a5a5d86483e0b 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -57,6 +57,9 @@ extern void __res_ndestroy(res_state statp); #endif #endif +#include +#include // for strerror() + #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 255 #endif diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 1b1b0ab9e9ce1..108c7d282f885 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -46,6 +46,10 @@ #include #endif +#ifdef HAVE_NICE +#include +#endif + #include #ifdef PHP_WIN32 diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index b988422df21ca..a98d410a228f8 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -19,6 +19,7 @@ #include "ext/standard/head.h" #include "php_string.h" #include "zend_execute.h" +#include "zend_strtod.h" // for zend_gcvt() #include #include diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index 1a046b3de6979..d00dd6d75e5bd 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -27,6 +27,10 @@ #endif #ifdef HAVE_FTOK + +#include +#include // for strerror() + /* {{{ Convert a pathname and a project identifier to a System V IPC key */ PHP_FUNCTION(ftok) { diff --git a/ext/standard/hrtime.c b/ext/standard/hrtime.c index 7dca135c920aa..5fe4f950f31e0 100644 --- a/ext/standard/hrtime.c +++ b/ext/standard/hrtime.c @@ -17,6 +17,7 @@ #include "php.h" #include "hrtime.h" +#include "zend_strtod.h" /* {{{ */ /* This file reuses code parts from the cross-platform timer library diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 55790e6100fce..b5e7efe8e45a3 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -44,6 +44,8 @@ #ifdef PHP_WIN32 # include "win32/sendmail.h" +#else +# include #endif #define SKIP_LONG_HEADER_SEP(str, pos) \ diff --git a/ext/standard/math.c b/ext/standard/math.c index ad2823ea49bf6..5b2d74a2de9e8 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -23,6 +23,7 @@ #include "zend_exceptions.h" #include "zend_portability.h" #include "zend_bitset.h" +#include "zend_strtod.h" #include #include diff --git a/ext/standard/net.c b/ext/standard/net.c index b22f304c8eb33..83d3e21704200 100644 --- a/ext/standard/net.c +++ b/ext/standard/net.c @@ -47,6 +47,9 @@ # include #endif +#include +#include // for strerror() + PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) { socklen_t addrlen = sizeof(struct sockaddr_in); diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 8926485025a3b..8f70ba2094cc0 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -29,6 +29,9 @@ #include "php_fopen_wrappers.h" #include "SAPI.h" +#include +#include // for strerror() + static ssize_t php_stream_output_write(php_stream *stream, const char *buf, size_t count) /* {{{ */ { PHPWRITE(buf, count); diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 53ec6faa1019e..4281be769da24 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -36,6 +36,9 @@ #include #endif +#include +#include // for strerror() + /* This symbol is defined in ext/standard/config.m4. * Essentially, it is set if you HAVE_FORK || PHP_WIN32 * Other platforms may modify that configure check and add suitable #ifdefs diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index ac2c777eea52b..5af3ec3d638d5 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -40,6 +40,9 @@ typedef unsigned long long php_timeout_ull; typedef unsigned __int64 php_timeout_ull; #endif +#include +#include // for strerror() + #define GET_CTX_OPT(stream, wrapper, name, val) (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), wrapper, name))) static php_stream_context *decode_context_param(zval *contextresource); diff --git a/ext/standard/var.c b/ext/standard/var.c index 7c6f79aba75ff..7074745099813 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -28,6 +28,7 @@ #include "php_incomplete_class.h" #include "zend_enum.h" #include "zend_exceptions.h" +#include "zend_strtod.h" // for zend_gcvt() /* }}} */ struct php_serialize_data { diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 12b0ff47c803e..fee8f9a73bf62 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -19,6 +19,7 @@ #include "php_incomplete_class.h" #include "zend_portability.h" #include "zend_exceptions.h" +#include "zend_strtod.h" /* {{{ reference-handling for unserializer: var_* */ #define VAR_ENTRIES_MAX 1018 /* 1024 - offsetof(php_unserialize_data, entries) / sizeof(void*) */ diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index debb8b675b0c2..caaa5eccef35b 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -22,10 +22,13 @@ #include "php_globals.h" #include "ext/standard/info.h" #include "php_sysvmsg.h" -#include "sysvmsg_arginfo.h" #include "ext/standard/php_var.h" #include "zend_smart_str.h" +#include +#include "sysvmsg_arginfo.h" + +#include // for strerror() #include #include #include From aa1cd02a4367834026ea2205ea13a2f904455aa1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 15:23:13 +0100 Subject: [PATCH 130/895] Zend/zend_fibers: include cleanup --- Zend/zend_fibers.c | 5 +++++ Zend/zend_fibers.h | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index f6065561793da..57d080d4dd13f 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -17,6 +17,8 @@ +----------------------------------------------------------------------+ */ +#include "zend_fibers.h" +#include "zend_objects.h" // for zend_object_std_init() #include "zend.h" #include "zend_API.h" #include "zend_ini.h" @@ -42,6 +44,9 @@ # include # include +# include +# include // for strerror() + # if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # endif diff --git a/Zend/zend_fibers.h b/Zend/zend_fibers.h index 5faa788f4ef68..15f7d43979d9a 100644 --- a/Zend/zend_fibers.h +++ b/Zend/zend_fibers.h @@ -20,14 +20,18 @@ #ifndef ZEND_FIBERS_H #define ZEND_FIBERS_H -#include "zend_API.h" -#include "zend_types.h" +#include "zend_API.h" // for struct zend_fcall_info +#include "zend_portability.h" // for BEGIN_EXTERN_C + +#include #define ZEND_FIBER_GUARD_PAGES 1 #define ZEND_FIBER_DEFAULT_C_STACK_SIZE (4096 * (((sizeof(void *)) < 8) ? 256 : 512)) #define ZEND_FIBER_VM_STACK_SIZE (1024 * sizeof(zval)) +typedef struct _zend_fiber_context zend_fiber_context; + BEGIN_EXTERN_C() typedef enum { From 6b34de8eba9f66882ae16e6073af28783670ac53 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 16:12:50 +0100 Subject: [PATCH 131/895] sapi/*: add missing includes --- sapi/cgi/cgi_main.c | 2 ++ sapi/cli/php_cli.c | 2 ++ sapi/cli/php_cli_server.c | 3 +++ sapi/fpm/fpm/fpm_main.c | 3 +++ sapi/phpdbg/phpdbg_io.c | 2 ++ 5 files changed, 12 insertions(+) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b45468031fcd0..f4f37537e722a 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -95,6 +95,8 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; # include "valgrind/callgrind.h" #endif +#include + #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index cc9a26c41389d..c2c91574d5789 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -92,6 +92,8 @@ # include "openssl/applink.c" #endif +#include + PHPAPI extern char *php_ini_opened_path; PHPAPI extern char *php_ini_scanned_path; PHPAPI extern char *php_ini_scanned_files; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 901281ddfdfca..5bc1cd4683ffb 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -106,6 +106,9 @@ #include "php_cli_process_title.h" #include "php_cli_process_title_arginfo.h" +#include +#include // for strerror() + #define OUTPUT_NOT_CHECKED -1 #define OUTPUT_IS_TTY 1 #define OUTPUT_NOT_TTY 0 diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index c5972f10d1800..7071f26a237c4 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -93,6 +93,9 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; #include "fpm_log.h" #include "zlog.h" +#include +#include // for strerror() + /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index 14ae71a0ebd1b..6cf827c1be010 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -20,6 +20,8 @@ #include "phpdbg_io.h" +#include + ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* is easy to generalize ... but not needed for now */ From 694ec1deea36e366b28b6349a52be49824e1a1a8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 10:28:20 +0100 Subject: [PATCH 132/895] Zend/zend_{operators,variables}: include cleanup --- Zend/zend.c | 1 + Zend/zend_operators.c | 8 +++++--- Zend/zend_operators.h | 13 ++++++------- Zend/zend_variables.c | 2 +- Zend/zend_variables.h | 1 + 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 0eec5f89019d9..99d3cc0270902 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -36,6 +36,7 @@ #include "zend_observer.h" #include "zend_fibers.h" #include "zend_call_stack.h" +#include "zend_strtod.h" #include "Optimizer/zend_optimizer.h" static size_t global_map_ptr_last = 0; diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index afe068bfeb8d6..e3b899c2b5dff 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -18,18 +18,20 @@ +----------------------------------------------------------------------+ */ -#include - -#include "zend.h" #include "zend_operators.h" +#include "zend.h" #include "zend_variables.h" +#include "zend_objects.h" // for zend_objects_new() #include "zend_globals.h" +#include "zend_multiply.h" // for ZEND_SIGNED_MULTIPLY_LONG() #include "zend_list.h" #include "zend_API.h" #include "zend_strtod.h" #include "zend_exceptions.h" #include "zend_closures.h" +#include + #include #ifdef HAVE_LANGINFO_H # include diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 506c27fc50eb3..f448c7bd56703 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -21,20 +21,19 @@ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H -#include +#include "zend_hash.h" // for zend_hash_num_elements() +#include "zend_object_handlers.h" // for struct _zend_object_handlers +#include "zend_portability.h" // for BEGIN_EXTERN_ +#include "zend_types.h" // for zend_result +#include "zend_string.h" // for zend_string_copy() + #include -#include #include #ifdef HAVE_IEEEFP_H #include #endif -#include "zend_portability.h" -#include "zend_strtod.h" -#include "zend_multiply.h" -#include "zend_object_handlers.h" - #define LONG_SIGN_MASK ZEND_LONG_MIN BEGIN_EXTERN_C() diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 06483d581df37..69cb54dbc7dbd 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -#include +#include "zend_variables.h" #include "zend.h" #include "zend_API.h" #include "zend_ast.h" diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index ea3fd9c5efcb8..c07fdfe7acf0f 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -21,6 +21,7 @@ #ifndef ZEND_VARIABLES_H #define ZEND_VARIABLES_H +#include "zend_hash.h" // for zend_array_dup() #include "zend_types.h" #include "zend_gc.h" From b4ba16fe189b109144aff669e11d81365160104b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:15:15 +0100 Subject: [PATCH 133/895] Zend/zend_object_handlers: include cleanup --- Zend/zend_object_handlers.c | 2 +- Zend/zend_object_handlers.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index c5af76e97b66a..923dce5972969 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -18,13 +18,13 @@ +----------------------------------------------------------------------+ */ +#include "zend_object_handlers.h" #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" #include "zend_API.h" #include "zend_objects.h" #include "zend_objects_API.h" -#include "zend_object_handlers.h" #include "zend_interfaces.h" #include "zend_exceptions.h" #include "zend_closures.h" diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 79bace9202846..4d78c70cf20a4 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -20,6 +20,8 @@ #ifndef ZEND_OBJECT_HANDLERS_H #define ZEND_OBJECT_HANDLERS_H +#include "zend_types.h" + struct _zend_property_info; #define ZEND_WRONG_PROPERTY_INFO \ From f377e15751d3aa48b69cd9bcc366ede7803d511f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:03:33 +0100 Subject: [PATCH 134/895] Zend/zend_ptr_stack: include cleanup --- Zend/zend_ptr_stack.c | 2 +- Zend/zend_ptr_stack.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index 80c77e11d73e6..acecae477e3ad 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -17,8 +17,8 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" #include "zend_ptr_stack.h" + #include ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, bool persistent) diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index 1126da5800d1b..b1dc6c29af3a0 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -20,6 +20,9 @@ #ifndef ZEND_PTR_STACK_H #define ZEND_PTR_STACK_H +#include "zend_alloc.h" // for safe_perealloc() +#include "zend_portability.h" // for BEGIN_EXTERN_C + typedef struct _zend_ptr_stack { int top, max; void **elements; From 588a07f7371ee2b5fac17de147926780e427fae6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:15:08 +0100 Subject: [PATCH 135/895] Zend/zend_multibyte: include cleanup --- Zend/zend_multibyte.c | 6 +++--- Zend/zend_multibyte.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c index f8dab668751a1..fc07a2be6af5f 100644 --- a/Zend/zend_multibyte.c +++ b/Zend/zend_multibyte.c @@ -17,10 +17,10 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_compile.h" -#include "zend_operators.h" #include "zend_multibyte.h" +#include "zend_alloc.h" +#include "zend_globals.h" // for struct _zend_compiler_globals +#include "zend_globals_macros.h" // for LANG_SCNG() #include "zend_ini.h" static const zend_encoding *dummy_encoding_fetcher(const char *encoding_name) diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 5466840cd900a..08ee63089759c 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -20,6 +20,12 @@ #ifndef ZEND_MULTIBYTE_H #define ZEND_MULTIBYTE_H +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_result + +#include +#include // for size_t + typedef struct _zend_encoding zend_encoding; typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); From ecc880f491d66081298a16634629f149459706a9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:19:19 +0100 Subject: [PATCH 136/895] Zend/zend_execute: include cleanup --- Zend/zend_execute.c | 26 ++++++++++---------------- Zend/zend_execute.h | 14 ++++++++++---- Zend/zend_execute_API.c | 16 ++++------------ 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index dc2e0d4953bda..02a044727275e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -20,34 +20,25 @@ #define ZEND_INTENSIVE_DEBUGGING 0 -#include -#include - -#include "zend.h" -#include "zend_compile.h" #include "zend_execute.h" -#include "zend_API.h" -#include "zend_ptr_stack.h" +#include "zend_API.h" // for ZEND_FUNCTION() +#include "zend_arena.h" #include "zend_constants.h" #include "zend_extensions.h" #include "zend_ini.h" #include "zend_exceptions.h" -#include "zend_interfaces.h" #include "zend_closures.h" -#include "zend_generators.h" -#include "zend_vm.h" -#include "zend_dtrace.h" -#include "zend_inheritance.h" -#include "zend_type_info.h" +#include "zend_generators.h" // for zend_ce_generator +#include "zend_inheritance.h" // for zend_do_link_class() #include "zend_smart_str.h" #include "zend_observer.h" -#include "zend_system_id.h" -#include "zend_call_stack.h" -#include "Optimizer/zend_func_info.h" /* Virtual current working directory support */ #include "zend_virtual_cwd.h" +#include +#include + #ifdef HAVE_GCC_GLOBAL_REGS # if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386) # define ZEND_VM_FP_GLOBAL_REG "%esi" @@ -5283,6 +5274,9 @@ static zend_always_inline zend_execute_data *_zend_vm_stack_push_call_frame(uint /* This callback disables optimization of "vm_stack_data" variable in VM */ ZEND_API void (ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data) = NULL; +#include "zend_fibers.h" // needed by zend_vm_execute.h +#include "zend_interfaces.h" // needed by zend_vm_execute.h +#include "zend_objects.h" // needed by zend_vm_execute.h #include "zend_vm_execute.h" ZEND_API zend_result zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index de53305090c1a..b7aa52764718b 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -21,10 +21,15 @@ #ifndef ZEND_EXECUTE_H #define ZEND_EXECUTE_H -#include "zend_compile.h" -#include "zend_hash.h" -#include "zend_operators.h" -#include "zend_variables.h" +#include "zend_compile.h" // for zend_op_array +#include "zend_list.h" // for zend_rsrc_list_get_rsrc_type() +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_execute_data + +#if ZEND_DEBUG +#include "zend_globals.h" // for struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() +#endif BEGIN_EXTERN_C() struct _zend_fcall_info; @@ -182,6 +187,7 @@ ZEND_API zend_result ZEND_FASTCALL zval_update_constant_ex(zval *pp, zend_class_ ZEND_API zend_result ZEND_FASTCALL zval_update_constant_with_ctx(zval *pp, zend_class_entry *scope, zend_ast_evaluate_ctx *ctx); /* dedicated Zend executor functions - do not use! */ +typedef struct _zend_vm_stack *zend_vm_stack; struct _zend_vm_stack { zval *top; zval *end; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 17c3caae21432..066c45d1eb40f 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -18,26 +18,18 @@ +----------------------------------------------------------------------+ */ -#include -#include - -#include "zend.h" -#include "zend_compile.h" -#include "zend_execute.h" #include "zend_API.h" -#include "zend_stack.h" #include "zend_constants.h" #include "zend_extensions.h" #include "zend_exceptions.h" #include "zend_closures.h" -#include "zend_generators.h" -#include "zend_vm.h" -#include "zend_float.h" #include "zend_fibers.h" #include "zend_weakrefs.h" -#include "zend_inheritance.h" #include "zend_observer.h" -#include "zend_call_stack.h" + +#include +#include + #ifdef HAVE_SYS_TIME_H #include #endif From 61cf7d49ab2a52d7aa90fdb7bff7c71dc2f0f8c2 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 7 Jan 2023 14:04:18 +0000 Subject: [PATCH 137/895] posix_pathconf throwing ValueError on empty path --- ext/posix/posix.c | 6 +++++- ext/posix/tests/posix_pathconf.phpt | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index cff46f398aa88..f521fffb2b66f 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1208,7 +1208,11 @@ PHP_FUNCTION(posix_pathconf) Z_PARAM_LONG(name); ZEND_PARSE_PARAMETERS_END(); - if (path_len == 0 || php_check_open_basedir(path)) { + if (path_len == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); + } else if (php_check_open_basedir(path)) { + php_error_docref(NULL, E_WARNING, "Invalid path supplied: %s", path); RETURN_FALSE; } diff --git a/ext/posix/tests/posix_pathconf.phpt b/ext/posix/tests/posix_pathconf.phpt index 7214e32c186ed..a9d827cb59048 100644 --- a/ext/posix/tests/posix_pathconf.phpt +++ b/ext/posix/tests/posix_pathconf.phpt @@ -4,13 +4,17 @@ Test posix_pathconf posix --FILE-- getMessage(). "\n"; +} var_dump(posix_pathconf(str_repeat('non_existent', 4096), POSIX_PC_NAME_MAX)); var_dump(posix_errno() != 0); var_dump(posix_pathconf(sys_get_temp_dir(), POSIX_PC_PATH_MAX)); ?> --EXPECTF-- -bool(false) +posix_pathconf(): Argument #1 ($path) cannot be empty bool(false) bool(true) int(%d) From d12ba111e03fa4e6d76a66a029f5dbe6265b1ea9 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 10 Jan 2023 15:15:49 +0000 Subject: [PATCH 138/895] Fixed GH-10218: DateTimeZone fails to parse time zones that contain the "+" character --- NEWS | 2 ++ ext/date/lib/parse_date.c | 4 ++-- ext/date/lib/parse_date.re | 2 +- ext/date/tests/gh10218.phpt | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 ext/date/tests/gh10218.phpt diff --git a/NEWS b/NEWS index ad29b8f611839..0f8bbc310013e 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ PHP NEWS - Date: . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like setTimestamp). (Derick) + . Fixed bug GH-10218 (DateTimeZone fails to parse time zones that contain the + "+" character). (Derick) - FPM: . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 99ec21baf56e6..78feb7420813c 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.15.3 on Thu Dec 1 10:57:42 2022 */ +/* Generated by re2c 0.15.3 on Tue Jan 10 15:14:08 2023 */ #line 1 "ext/date/lib/parse_date.re" /* * The MIT License (MIT) @@ -761,7 +761,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab (**ptr >= 'A' && **ptr <= 'Z') || (**ptr >= 'a' && **ptr <= 'z') || (**ptr >= '0' && **ptr <= '9') || - **ptr == '/' || **ptr == '_' || **ptr == '-' + **ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+' ) { ++*ptr; } diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 923091ea89f45..f0db34d302b31 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -759,7 +759,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab (**ptr >= 'A' && **ptr <= 'Z') || (**ptr >= 'a' && **ptr <= 'z') || (**ptr >= '0' && **ptr <= '9') || - **ptr == '/' || **ptr == '_' || **ptr == '-' + **ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+' ) { ++*ptr; } diff --git a/ext/date/tests/gh10218.phpt b/ext/date/tests/gh10218.phpt new file mode 100644 index 0000000000000..ff1b493ce7f01 --- /dev/null +++ b/ext/date/tests/gh10218.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug GH-10218 (DateTimeZone fails to parse time zones that contain the "+" character) +--FILE-- + +--EXPECTF-- +object(DateTime)#%d (%d) { + ["date"]=> + string(%d) "%s" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(9) "Etc/GMT+1" +} From 55514a111935153ff33ef26aac0545567b8e12f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 10 Jan 2023 10:02:49 +0100 Subject: [PATCH 139/895] fix: indirect_return compilation warning Closes GH-10274 Signed-off-by: George Peter Banyard --- Zend/zend_portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 74f8be3c1a26c..8f545ecba807c 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -679,7 +679,7 @@ extern "C++" { # define ZEND_VOIDP(ptr) (ptr) #endif -#if defined(__GNUC__) && ZEND_GCC_VERSION >= 9000 +#if __has_attribute(__indirect_return__) # define ZEND_INDIRECT_RETURN __attribute__((__indirect_return__)) #else # define ZEND_INDIRECT_RETURN From e7c0f4e816407353860ddf6a2ed3903b4bdc9d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 10 Jan 2023 18:46:57 +0100 Subject: [PATCH 140/895] random: Rely on `free(NULL)` being safe for random status freeing (#10246) * random: Rely on `free(NULL)` being safe for random status freeing * random: Restructure `php_random_status_free()` to not early-return --- ext/random/random.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/random/random.c b/ext/random/random.c index a66f18c7a5ced..cfa32ee0ba14c 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -235,7 +235,7 @@ static zend_object *php_random_randomizer_new(zend_class_entry *ce) static void randomizer_free_obj(zend_object *object) { php_random_randomizer *randomizer = php_random_randomizer_from_obj(object); - if (randomizer->is_userland_algo && randomizer->status) { + if (randomizer->is_userland_algo) { php_random_status_free(randomizer->status, false); } @@ -262,9 +262,10 @@ PHPAPI php_random_status *php_random_status_copy(const php_random_algo *algo, ph PHPAPI void php_random_status_free(php_random_status *status, const bool persistent) { - if (status->state) { + if (status != NULL) { pefree(status->state, persistent); } + pefree(status, persistent); } @@ -286,10 +287,7 @@ PHPAPI void php_random_engine_common_free_object(zend_object *object) { php_random_engine *engine = php_random_engine_from_obj(object); - if (engine->status) { - php_random_status_free(engine->status, false); - } - + php_random_status_free(engine->status, false); zend_object_std_dtor(object); } From 4427b2e1ab6cc51a1b328cbb3f216ab4c955f672 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 10 Jan 2023 20:54:11 +0200 Subject: [PATCH 141/895] Mark UTF-8 strings emitted by mbstring functions as valid UTF-8 We now have a couple of mbstring functions which have fast paths for strings marked as 'valid UTF-8'. Later, we may likely have more. So that these fast paths can be used more frequently, mark UTF-8 strings emitted by mbstring as 'valid UTF-8'. This is always a correct thing to do, because mbstring never returns invalid UTF-8 as the result of a conversion (or similar) operation. Internally, we do have a conversion mode which deliberately emits invalid UTF-8 in some cases. (This is done to prevent unwanted matches when we are converting strings to UTF-8 before performing matching operations on them.) For such strings, don't set the 'valid UTF-8' flag. It probably wouldn't hurt anything to set it, because strings generated using that special conversion mode should *never* be returned to userland, and I don't think we do anything with them which cares about the IS_STR_VALID_UTF8 flag... but still, it would likely cause confusion for developers. --- ext/mbstring/libmbfl/mbfl/mbfl_consts.h | 6 ++++++ ext/mbstring/libmbfl/mbfl/mbfl_convert.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 14 +++++++++++++- ext/mbstring/mbstring.c | 20 +++++++++++--------- ext/mbstring/php_unicode.c | 2 +- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index 36588ad259311..32504a3fc3b99 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -47,4 +47,10 @@ #define MBFL_QPRINT_STS_MIME_HEADER 0x1000000 #define MBFL_BASE64_STS_MIME_HEADER 0x1000000 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE 0 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR 1 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG 2 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY 3 +#define MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8 4 /* For internal use only; deliberately uses invalid UTF-8 byte sequence as error marker */ + #endif /* MBFL_CONSTS_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index 02bcb73b0367d..edad3a3b57599 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -365,7 +365,7 @@ zend_string* mb_fast_convert(unsigned char *in, size_t in_len, const mbfl_encodi } *num_errors = buf.errors; - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, to); } static uint32_t* convert_cp_to_hex(uint32_t cp, uint32_t *out) diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index e5ae285098ea0..93ea632a83503 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -32,6 +32,7 @@ #define MBFL_ENCODING_H #include "mbfl_defs.h" +#include "mbfl_consts.h" #include "zend.h" enum mbfl_no_encoding { @@ -208,7 +209,7 @@ static inline unsigned char* mb_convert_buf_add4(unsigned char *out, char c1, ch return out; } -static inline zend_string* mb_convert_buf_result(mb_convert_buf *buf) +static inline zend_string* mb_convert_buf_result_raw(mb_convert_buf *buf) { ZEND_ASSERT(buf->out <= buf->limit); zend_string *ret = buf->str; @@ -234,6 +235,17 @@ typedef struct { mb_from_wchar_fn from_wchar; } mbfl_encoding; +extern const mbfl_encoding mbfl_encoding_utf8; + +static inline zend_string* mb_convert_buf_result(mb_convert_buf *buf, const mbfl_encoding *enc) +{ + zend_string *ret = mb_convert_buf_result_raw(buf); + if (enc == &mbfl_encoding_utf8 && buf->error_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_BADUTF8) { + GC_ADD_FLAGS(ret, IS_STR_VALID_UTF8); + } + return ret; +} + MBFLAPI extern const mbfl_encoding *mbfl_name2encoding(const char *name); MBFLAPI extern const mbfl_encoding *mbfl_no2encoding(enum mbfl_no_encoding no_encoding); MBFLAPI extern enum mbfl_no_encoding mbfl_name2no_encoding(const char *name); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 51e279acbdc1f..d2ff3079f0d73 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1591,7 +1591,7 @@ PHP_FUNCTION(mb_output_handler) } MBSTRG(illegalchars) += buf.errors; - RETVAL_STR(mb_convert_buf_result(&buf)); + RETVAL_STR(mb_convert_buf_result_raw(&buf)); if (last_feed) { MBSTRG(outconv_enabled) = false; @@ -1679,7 +1679,7 @@ PHP_FUNCTION(mb_str_split) enc->from_wchar(wchar_buf, split_len - char_count, &buf, true); i += split_len - char_count; char_count = 0; - add_next_index_str(return_value, mb_convert_buf_result(&buf)); + add_next_index_str(return_value, mb_convert_buf_result(&buf, enc)); } else { /* Output from this iteration is not enough to finish the next chunk; * output what we can, and leave 'buf' to be used again on next iteration */ @@ -1696,7 +1696,7 @@ PHP_FUNCTION(mb_str_split) if (out_len - i >= split_len) { enc->from_wchar(wchar_buf + i, split_len, &buf, true); i += split_len; - add_next_index_str(return_value, mb_convert_buf_result(&buf)); + add_next_index_str(return_value, mb_convert_buf_result(&buf, enc)); } else { /* The remaining codepoints in wchar_buf aren't enough to finish a chunk; * leave them for the next iteration */ @@ -1710,7 +1710,7 @@ PHP_FUNCTION(mb_str_split) if (char_count) { /* The main loop above has finished processing the input string, but * has left a partial chunk in 'buf' */ - add_next_index_str(return_value, mb_convert_buf_result(&buf)); + add_next_index_str(return_value, mb_convert_buf_result(&buf, enc)); } } } @@ -2076,7 +2076,7 @@ static zend_string* mb_get_substr_slow(unsigned char *in, size_t in_len, size_t } } - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, enc); } static zend_string* mb_get_substr(zend_string *input, size_t from, size_t len, const mbfl_encoding *enc) @@ -2590,7 +2590,9 @@ static zend_string* mb_trim_string(zend_string *input, zend_string *marker, cons buf.out += ZSTR_LEN(marker); } - return mb_convert_buf_result(&buf); + /* Even if `enc` is UTF-8, don't mark the output string as valid UTF-8, because + * we have no guarantee that the trim marker string is valid UTF-8 */ + return mb_convert_buf_result_raw(&buf); } /* Trim the string to terminal width; optional, add a 'trim marker' if it was truncated */ @@ -3298,7 +3300,7 @@ static zend_string* jp_kana_convert(zend_string *input, const mbfl_encoding *enc encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); } - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, encoding); } char mb_convert_kana_flags[17] = { @@ -3697,7 +3699,7 @@ static zend_string* html_numeric_entity_encode(zend_string *input, const mbfl_en encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); } - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, encoding); } /* {{{ Converts specified characters to HTML numeric entities */ @@ -3929,7 +3931,7 @@ static zend_string* html_numeric_entity_decode(zend_string *input, const mbfl_en encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); } - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, encoding); } /* {{{ Converts HTML numeric entities to character code */ diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index bd1d5684163dc..b1ffb06c31f47 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -366,5 +366,5 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons dst_encoding->from_wchar(converted_buf, p - converted_buf, &buf, !in_len); } - return mb_convert_buf_result(&buf); + return mb_convert_buf_result(&buf, dst_encoding); } From 1b48a5c80228cc1a115298840084682a4cd060cf Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 12 Jan 2023 11:55:14 +0000 Subject: [PATCH 142/895] Fix ASAN reported leak in FPM config test This happens because config test does not shutdown SAPI. In addition this commit also fixes few failures when running FPM tests under root. Closes GH-10296 --- NEWS | 1 + sapi/fpm/fpm/fpm_main.c | 3 ++- sapi/fpm/tests/bug68591-conf-test-group.phpt | 1 + sapi/fpm/tests/bug68591-conf-test-listen-group.phpt | 1 + sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index def6114b30f19..44631c9b610ff 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ PHP NEWS (Jakub Zelenka) . Fixed bug #68591 (Configuration test does not perform UID lookups). (Jakub Zelenka) + . Fixed memory leak when running FPM config test. (Jakub Zelenka) - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index c5972f10d1800..0a61abacd70df 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1798,7 +1798,8 @@ consult the installation file that came with this distribution, or visit \n\ zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); close(fpm_globals.send_config_pipe[1]); } - return FPM_EXIT_CONFIG; + exit_status = FPM_EXIT_CONFIG; + goto out; } if (fpm_globals.send_config_pipe[1]) { diff --git a/sapi/fpm/tests/bug68591-conf-test-group.phpt b/sapi/fpm/tests/bug68591-conf-test-group.phpt index 14d6390801163..d496d0549e87f 100644 --- a/sapi/fpm/tests/bug68591-conf-test-group.phpt +++ b/sapi/fpm/tests/bug68591-conf-test-group.phpt @@ -14,6 +14,7 @@ $cfg = << Date: Tue, 10 Jan 2023 17:56:48 +0100 Subject: [PATCH 143/895] Zend/zend_build.h: include php_config.h Without this, the macros ZTS, ZEND_DEBUG and PHP_COMPILER_ID may be unavailable. --- Zend/zend_build.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Zend/zend_build.h b/Zend/zend_build.h index c604fb311a74e..795f2fa9fd531 100644 --- a/Zend/zend_build.h +++ b/Zend/zend_build.h @@ -19,6 +19,12 @@ #ifndef ZEND_BUILD_H #define ZEND_BUILD_H +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include "php_config.h" +#endif + #define ZEND_TOSTR_(x) #x #define ZEND_TOSTR(x) ZEND_TOSTR_(x) From 9521d21681b22a471f21b3c56e32b883acac3301 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Jan 2023 18:09:51 +0100 Subject: [PATCH 144/895] main/php_globals.h: add missing include for PHPAPI --- main/php_globals.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main/php_globals.h b/main/php_globals.h index cbf0271c7b763..9a9653f4c1e08 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -17,6 +17,7 @@ #ifndef PHP_GLOBALS_H #define PHP_GLOBALS_H +#include "php.h" // for PHPAPI #include "zend_globals.h" typedef struct _php_core_globals php_core_globals; From cd985de190534c8e3567a4c5547eb98c45337fa0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:30:43 +0100 Subject: [PATCH 145/895] ext/standard/md5: include cleanup --- ext/standard/md5.c | 1 - ext/standard/md5.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 899ff6aaeecb0..b7cff21d02419 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -#include "php.h" #include "md5.h" PHPAPI void make_digest(char *md5str, const unsigned char *digest) /* {{{ */ diff --git a/ext/standard/md5.h b/ext/standard/md5.h index 0003a934be62d..5814142f1968c 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -18,6 +18,10 @@ #ifndef MD5_H #define MD5_H +#include "php.h" // for PHPAPI + +#include + PHPAPI void make_digest(char *md5str, const unsigned char *digest); PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len); From 4831e48708e19346ace0fa5f3f085ee8afd43267 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:29:01 +0100 Subject: [PATCH 146/895] Zend/zend_system_id: include cleanup --- Zend/zend_system_id.c | 5 ++--- Zend/zend_system_id.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Zend/zend_system_id.c b/Zend/zend_system_id.c index 8390bba8b0f25..deb3e27823e23 100644 --- a/Zend/zend_system_id.c +++ b/Zend/zend_system_id.c @@ -15,11 +15,10 @@ +----------------------------------------------------------------------+ */ -#include "php.h" #include "zend_system_id.h" -#include "zend_extensions.h" +#include "zend_extensions.h" // for ZEND_EXTENSION_BUILD_ID #include "ext/standard/md5.h" -#include "ext/hash/php_hash.h" +#include "ext/hash/php_hash.h" // for php_hash_bin2hex() ZEND_API char zend_system_id[32]; diff --git a/Zend/zend_system_id.h b/Zend/zend_system_id.h index 60514e15a0976..3c008637694ed 100644 --- a/Zend/zend_system_id.h +++ b/Zend/zend_system_id.h @@ -17,6 +17,9 @@ #ifndef ZEND_SYSTEM_ID_H #define ZEND_SYSTEM_ID_H +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for ZEND_RESULT_CODE + BEGIN_EXTERN_C() /* True global; Write-only during MINIT/startup */ extern ZEND_API char zend_system_id[32]; From 94f9a20ce6451b54e8346cc474de6b4f9b8897a4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 22:06:12 +0100 Subject: [PATCH 147/895] Zend/zend_arena: include cleanup --- Zend/zend_arena.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h index a44082e52fb9c..45ef617cf190a 100644 --- a/Zend/zend_arena.h +++ b/Zend/zend_arena.h @@ -19,7 +19,10 @@ #ifndef _ZEND_ARENA_H_ #define _ZEND_ARENA_H_ -#include "zend.h" +#include "zend_multiply.h" // for zend_safe_address() +#include "zend.h" // for zend_error() + +#include // for size_t #ifndef ZEND_TRACK_ARENA_ALLOC From b1d48774a79592e7fb1ba85d3a2bd6717f25acec Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 10:12:01 +0100 Subject: [PATCH 148/895] Zend/zend_multiply: include cleanup --- Zend/zend_multiply.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h index a99e858bd7798..417ee9990a800 100644 --- a/Zend/zend_multiply.h +++ b/Zend/zend_multiply.h @@ -17,11 +17,12 @@ +----------------------------------------------------------------------+ */ -#include "zend_portability.h" - #ifndef ZEND_MULTIPLY_H #define ZEND_MULTIPLY_H +#include "zend_portability.h" +#include "zend.h" // for zend_error_noreturn() + #if PHP_HAVE_BUILTIN_SMULL_OVERFLOW && SIZEOF_LONG == SIZEOF_ZEND_LONG #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ From b088575119b3244a4d08f6a300251111a221c66b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:28:03 +0100 Subject: [PATCH 149/895] Zend/zend_extensions: include cleanup --- Zend/zend_extensions.c | 5 ++++- Zend/zend_extensions.h | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 1f3687642ab67..4e6fe95917d95 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -18,7 +18,10 @@ */ #include "zend_extensions.h" -#include "zend_system_id.h" +#include "zend_arena.h" +#include "zend_globals.h" // for struct _zend_compiler_globals +#include "zend_globals_macros.h" // for CG() +#include "zend_system_id.h" // for zend_add_system_entropy() ZEND_API zend_llist zend_extensions; ZEND_API uint32_t zend_extension_flags = 0; diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 14ba9054d9b6a..ff28a14509ace 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -20,8 +20,15 @@ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H -#include "zend_compile.h" -#include "zend_build.h" +#include "zend_build.h" // for ZEND_TOSTR() +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_result + +#include // for size_t + +typedef struct _zend_execute_data zend_execute_data; +typedef struct _zend_op_array zend_op_array; +typedef struct _zend_llist zend_llist; /* The constants below are derived from ext/opcache/ZendAccelerator.h From f061a035e44d3f6bbc71774f2101525d74fbf16f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:34:55 +0100 Subject: [PATCH 150/895] Zend/zend_float: include cleanup --- Zend/zend_float.c | 4 ++-- Zend/zend_float.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Zend/zend_float.c b/Zend/zend_float.c index 90af0c4a5f900..ca2ed83282de8 100644 --- a/Zend/zend_float.c +++ b/Zend/zend_float.c @@ -16,9 +16,9 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_compile.h" #include "zend_float.h" +#include "zend_globals.h" // struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() ZEND_API void zend_init_fpu(void) /* {{{ */ { diff --git a/Zend/zend_float.h b/Zend/zend_float.h index c8e91122a3590..d4d67592a5f16 100644 --- a/Zend/zend_float.h +++ b/Zend/zend_float.h @@ -19,6 +19,8 @@ #ifndef ZEND_FLOAT_H #define ZEND_FLOAT_H +#include "zend_portability.h" // for BEGIN_EXTERN_C + BEGIN_EXTERN_C() /* From b5aeb3a4d40dbf38da65975d12b9d2c593b83bdd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:37:20 +0100 Subject: [PATCH 151/895] Zend/zend_stream: include cleanup --- Zend/zend_stream.c | 6 ++++-- Zend/zend_stream.h | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 8e11841ad2658..41b89d1d86b5f 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -19,9 +19,11 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_compile.h" #include "zend_stream.h" +#include "zend_globals.h" // struct _zend_compiler_globals +#include "zend_globals_macros.h" // for CG() +#include "zend_string.h" +#include "zend.h" // for zend_stream_open_function ZEND_DLIMPORT int isatty(int fd); diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 047719e175a04..22541bf8d929e 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -22,9 +22,16 @@ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H -#include +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_uchar + +#include +#include // for FILE +#include // for ssize_t #include +typedef struct _zend_string zend_string; + /* Lightweight stream implementation for the ZE scanners. * These functions are private to the engine. * */ From a55c0c5fc3f624a685f42281df26cf87f445be43 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:42:29 +0100 Subject: [PATCH 152/895] Zend/Optimizer/zend_cfg: include cleanup --- Zend/Optimizer/zend_cfg.c | 9 ++++----- Zend/Optimizer/zend_cfg.h | 7 +++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Zend/Optimizer/zend_cfg.c b/Zend/Optimizer/zend_cfg.c index 6d538f71316cc..e99051542c465 100644 --- a/Zend/Optimizer/zend_cfg.c +++ b/Zend/Optimizer/zend_cfg.c @@ -16,13 +16,12 @@ +----------------------------------------------------------------------+ */ -#include "zend_compile.h" #include "zend_cfg.h" -#include "zend_func_info.h" -#include "zend_worklist.h" -#include "zend_optimizer.h" +#include "zend_func_info.h" // for ZEND_FUNC_FREE_LOOP_VAR +#include "zend_globals.h" // struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() #include "zend_optimizer_internal.h" -#include "zend_sort.h" +#include "zend_worklist.h" static void zend_mark_reachable(zend_op *opcodes, zend_cfg *cfg, zend_basic_block *b) /* {{{ */ { diff --git a/Zend/Optimizer/zend_cfg.h b/Zend/Optimizer/zend_cfg.h index 93d455060686e..cf0a591b36307 100644 --- a/Zend/Optimizer/zend_cfg.h +++ b/Zend/Optimizer/zend_cfg.h @@ -19,6 +19,13 @@ #ifndef ZEND_CFG_H #define ZEND_CFG_H +#include "zend_portability.h" // for BEGIN_EXTERN_C + +#include + +typedef struct _zend_arena zend_arena; +typedef struct _zend_op_array zend_op_array; + /* zend_basic_block.flags */ #define ZEND_BB_START (1<<0) /* first block */ #define ZEND_BB_FOLLOW (1<<1) /* follows the next block */ From 1a067b84ee423a6fb06a5debd92b4cafefeac4e4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:45:57 +0100 Subject: [PATCH 153/895] Zend/Optimizer/zend_optimizer: include cleanup --- Zend/Optimizer/zend_optimizer.c | 19 +++++++++---------- Zend/Optimizer/zend_optimizer.h | 7 +++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Zend/Optimizer/zend_optimizer.c b/Zend/Optimizer/zend_optimizer.c index b5841159bf12c..dcbb355ff99e2 100644 --- a/Zend/Optimizer/zend_optimizer.c +++ b/Zend/Optimizer/zend_optimizer.c @@ -21,17 +21,16 @@ #include "Optimizer/zend_optimizer.h" #include "Optimizer/zend_optimizer_internal.h" -#include "zend_API.h" -#include "zend_constants.h" -#include "zend_execute.h" -#include "zend_vm.h" -#include "zend_cfg.h" -#include "zend_func_info.h" -#include "zend_call_graph.h" -#include "zend_inference.h" -#include "zend_dump.h" -#include "php.h" +#include "php_globals.h" // for PG() +#include "zend_API.h" // for ZVAL_EMPTY_STRING() +#include "zend_arena.h" +#include "zend_call_graph.h" // for struct _zend_func_info +#include "zend_dump.h" // for zend_dump_op_array() +#include "zend_inference.h" // for OP1_INFO(), ... +#include "zend_ini.h" #include "zend_observer.h" +#include "zend_virtual_cwd.h" //for IS_ABSOLUTE_PATH() +#include "zend_vm.h" #ifndef ZEND_OPTIMIZER_MAX_REGISTERED_PASSES # define ZEND_OPTIMIZER_MAX_REGISTERED_PASSES 32 diff --git a/Zend/Optimizer/zend_optimizer.h b/Zend/Optimizer/zend_optimizer.h index 16bfd75520d89..ae794b1ae6659 100644 --- a/Zend/Optimizer/zend_optimizer.h +++ b/Zend/Optimizer/zend_optimizer.h @@ -22,8 +22,11 @@ #ifndef ZEND_OPTIMIZER_H #define ZEND_OPTIMIZER_H -#include "zend.h" -#include "zend_compile.h" +#include "zend_compile.h" // for zend_op_array +#include "zend_hash.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_string zend_string; #define ZEND_OPTIMIZER_PASS_1 (1<<0) /* Simple local optimizations */ #define ZEND_OPTIMIZER_PASS_2 (1<<1) /* */ From d28d323ca20976ed776171330b90588cc3857dd6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:45:32 +0100 Subject: [PATCH 154/895] Zend/Optimizer/zend_ssa: include cleanup --- Zend/Optimizer/zend_ssa.c | 9 +++++---- Zend/Optimizer/zend_ssa.h | 8 +++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Zend/Optimizer/zend_ssa.c b/Zend/Optimizer/zend_ssa.c index 67165a9b26d7a..84f0d4d260fe9 100644 --- a/Zend/Optimizer/zend_ssa.c +++ b/Zend/Optimizer/zend_ssa.c @@ -17,12 +17,13 @@ +----------------------------------------------------------------------+ */ -#include "zend_compile.h" -#include "zend_dfg.h" #include "zend_ssa.h" +#include "zend_arena.h" +#include "zend_optimizer_internal.h" +#include "zend_dfg.h" #include "zend_dump.h" -#include "zend_inference.h" -#include "Optimizer/zend_optimizer_internal.h" +#include "zend_inference.h" // for zend_sub_will_overflow() +#include "zend_type_info.h" // for MAY_BE_REF static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { diff --git a/Zend/Optimizer/zend_ssa.h b/Zend/Optimizer/zend_ssa.h index 9fde352c79cc1..035cce5cae2eb 100644 --- a/Zend/Optimizer/zend_ssa.h +++ b/Zend/Optimizer/zend_ssa.h @@ -19,8 +19,14 @@ #ifndef ZEND_SSA_H #define ZEND_SSA_H -#include "zend_optimizer.h" #include "zend_cfg.h" +#include "zend_compile.h" // for struct _zend_op +#include "zend_long.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zend_result + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_script zend_script; typedef struct _zend_ssa_range { zend_long min; From e7434c124772c05fe836832e02196d50bec10c23 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:43:27 +0100 Subject: [PATCH 155/895] Zend/zend_long: include cleanup --- Zend/zend_long.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Zend/zend_long.h b/Zend/zend_long.h index 3796f1c5ababb..f2d3ee81bd699 100644 --- a/Zend/zend_long.h +++ b/Zend/zend_long.h @@ -19,6 +19,12 @@ #ifndef ZEND_LONG_H #define ZEND_LONG_H +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include "php_config.h" // for SIZEOF_SIZE_T +#endif + #include #include From 623e2e9fc6a23b8eb7f22010eaf99bf6f638917d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 09:24:24 +0100 Subject: [PATCH 156/895] ext/opcache/zend_accelerator_hash: include cleanup --- ext/opcache/zend_accelerator_hash.c | 2 -- ext/opcache/zend_accelerator_hash.h | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 676ed32ce8ff3..2354409fd51e5 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -19,9 +19,7 @@ +----------------------------------------------------------------------+ */ -#include "ZendAccelerator.h" #include "zend_accelerator_hash.h" -#include "zend_hash.h" #include "zend_shared_alloc.h" /* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */ diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h index 755d3f13ec516..c868427491ef4 100644 --- a/ext/opcache/zend_accelerator_hash.h +++ b/ext/opcache/zend_accelerator_hash.h @@ -22,7 +22,12 @@ #ifndef ZEND_ACCELERATOR_HASH_H #define ZEND_ACCELERATOR_HASH_H -#include "zend.h" +#include "zend_long.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C + +#include + +typedef struct _zend_string zend_string; /* zend_accel_hash - is a hash table allocated in shared memory and From 46371f4eb339f7e7615a8732d61f2369f8d9129e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:56:30 +0100 Subject: [PATCH 157/895] Zend/zend_bitset: include cleanup --- Zend/zend_bitset.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index fdb6ab79a1e86..0a573852a49ad 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -19,6 +19,13 @@ #ifndef _ZEND_BITSET_H_ #define _ZEND_BITSET_H_ +#include "zend_portability.h" // for zend_always_inline + +#include "zend_long.h" + +#include +#include + typedef zend_ulong *zend_bitset; #define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong) From c5933409b47bea760977cf9c9ea04cbb63aaafe5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:55:34 +0100 Subject: [PATCH 158/895] Zend/Optimizer/scdf: include cleanup --- Zend/Optimizer/scdf.c | 3 ++- Zend/Optimizer/scdf.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Zend/Optimizer/scdf.c b/Zend/Optimizer/scdf.c index 54925e8287b62..fb7337a100998 100644 --- a/Zend/Optimizer/scdf.c +++ b/Zend/Optimizer/scdf.c @@ -16,8 +16,9 @@ +----------------------------------------------------------------------+ */ -#include "Optimizer/zend_optimizer_internal.h" #include "Optimizer/scdf.h" +#include "Optimizer/zend_optimizer_internal.h" +#include "zend_arena.h" /* This defines a generic framework for sparse conditional dataflow propagation. The algorithm is * based on "Sparse conditional constant propagation" by Wegman and Zadeck. We're using a diff --git a/Zend/Optimizer/scdf.h b/Zend/Optimizer/scdf.h index 840a99065bcb0..f72b2ca151ff8 100644 --- a/Zend/Optimizer/scdf.h +++ b/Zend/Optimizer/scdf.h @@ -20,6 +20,11 @@ #define _SCDF_H #include "zend_bitset.h" +#include "zend_long.h" +#include "zend_ssa.h" + +typedef struct _zend_op_array zend_op_array; +typedef struct _zend_optimizer_ctx zend_optimizer_ctx; typedef struct _scdf_ctx { zend_op_array *op_array; From cd27d5e07f01172ac8a701996d260a731489d856 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:55:37 +0100 Subject: [PATCH 159/895] Zend/Optimizer/dce: include cleanup --- Zend/Optimizer/dce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/Optimizer/dce.c b/Zend/Optimizer/dce.c index 4aca34c943ca7..7bb5020c5a58e 100644 --- a/Zend/Optimizer/dce.c +++ b/Zend/Optimizer/dce.c @@ -22,6 +22,7 @@ #include "Optimizer/zend_ssa.h" #include "Optimizer/zend_func_info.h" #include "Optimizer/zend_call_graph.h" +#include "zend_arena.h" #include "zend_bitset.h" /* This pass implements a form of dead code elimination (DCE). The algorithm optimistically assumes From 308adb915c1b659ab377f752fb27b408a455d7ed Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 22:18:07 +0100 Subject: [PATCH 160/895] Zend/Optimizer/sccp: include cleanup --- Zend/Optimizer/sccp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/Optimizer/sccp.c b/Zend/Optimizer/sccp.c index 9373ad2adc63d..45ae762737624 100644 --- a/Zend/Optimizer/sccp.c +++ b/Zend/Optimizer/sccp.c @@ -18,8 +18,11 @@ */ #include "zend_API.h" +#include "zend_arena.h" +#include "zend_multiply.h" // for zend_safe_address_guarded() #include "zend_exceptions.h" #include "zend_ini.h" +#include "zend_optimizer.h" #include "zend_type_info.h" #include "Optimizer/zend_optimizer_internal.h" #include "Optimizer/zend_call_graph.h" From c7a4633891392d16d40b08135598807b3f0443b0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:55:41 +0100 Subject: [PATCH 161/895] Zend/Optimizer/zend_call_graph: include cleanup --- Zend/Optimizer/zend_call_graph.c | 10 +++------- Zend/Optimizer/zend_call_graph.h | 5 +++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Zend/Optimizer/zend_call_graph.c b/Zend/Optimizer/zend_call_graph.c index c2b7b00cbee13..70342c0654742 100644 --- a/Zend/Optimizer/zend_call_graph.c +++ b/Zend/Optimizer/zend_call_graph.c @@ -16,15 +16,11 @@ +----------------------------------------------------------------------+ */ -#include "zend_compile.h" -#include "zend_extensions.h" -#include "Optimizer/zend_optimizer.h" -#include "zend_optimizer_internal.h" -#include "zend_inference.h" #include "zend_call_graph.h" +#include "zend_arena.h" +#include "zend_bitset.h" #include "zend_func_info.h" -#include "zend_inference.h" -#include "zend_call_graph.h" +#include "zend_optimizer_internal.h" static void zend_op_array_calc(zend_op_array *op_array, void *context) { diff --git a/Zend/Optimizer/zend_call_graph.h b/Zend/Optimizer/zend_call_graph.h index 5b1634d561dc3..7dd6430dd4e88 100644 --- a/Zend/Optimizer/zend_call_graph.h +++ b/Zend/Optimizer/zend_call_graph.h @@ -20,8 +20,9 @@ #define ZEND_CALL_GRAPH_H #include "zend_ssa.h" -#include "zend_func_info.h" -#include "zend_optimizer.h" + +typedef struct _zend_func_info zend_func_info; +typedef struct _zend_call_info zend_call_info; typedef struct _zend_send_arg_info { zend_op *opline; From 492523a779dced91eb09215183287e0856b693bf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 22:15:15 +0100 Subject: [PATCH 162/895] Zend/zend_inference: include cleanup --- Zend/Optimizer/zend_inference.c | 8 +++++--- Zend/Optimizer/zend_inference.h | 9 ++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 1aeaa02f7b3d8..532e8985688d0 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -16,13 +16,15 @@ +----------------------------------------------------------------------+ */ -#include "zend_compile.h" -#include "zend_generators.h" #include "zend_inference.h" +#include "zend_closures.h" // for zend_ce_closure +#include "zend_generators.h" // for zend_ce_generator #include "zend_func_info.h" +#include "zend_globals.h" // struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() #include "zend_call_graph.h" -#include "zend_closures.h" #include "zend_worklist.h" +#include "zend_optimizer.h" #include "zend_optimizer_internal.h" /* The used range inference algorithm is described in: diff --git a/Zend/Optimizer/zend_inference.h b/Zend/Optimizer/zend_inference.h index f27c5ecdc485b..65b48ee6a8697 100644 --- a/Zend/Optimizer/zend_inference.h +++ b/Zend/Optimizer/zend_inference.h @@ -19,12 +19,11 @@ #ifndef ZEND_INFERENCE_H #define ZEND_INFERENCE_H -#include "zend_optimizer.h" +#include "zend_cfg.h" // for CRT_CONSTANT() +#include "zend_compile.h" // for struct _zend_op +#include "zend_portability.h" // for BEGIN_EXTERN_C #include "zend_ssa.h" -#include "zend_bitset.h" - -/* Bitmask for type inference (zend_ssa_var_info.type) */ -#include "zend_type_info.h" +#include "zend_type_info.h" // for MAY_BE_* #define MAY_BE_PACKED_GUARD (1<<27) /* needs packed array guard */ #define MAY_BE_CLASS_GUARD (1<<27) /* needs class guard */ From 1eb71c3f155a42ad6867cd5e2f6d921a99506a37 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:25:22 +0100 Subject: [PATCH 163/895] Zend/zend_map_ptr: include cleanup --- Zend/zend_map_ptr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_map_ptr.h b/Zend/zend_map_ptr.h index aa726e0cdd32d..0ab1a357eecfb 100644 --- a/Zend/zend_map_ptr.h +++ b/Zend/zend_map_ptr.h @@ -19,7 +19,7 @@ #ifndef ZEND_MAP_PTR_H #define ZEND_MAP_PTR_H -#include "zend_portability.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C #define ZEND_MAP_PTR_KIND_PTR 0 #define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET 1 @@ -69,6 +69,8 @@ # error "Unknown ZEND_MAP_PTR_KIND" #endif +typedef struct _zend_string zend_string; + BEGIN_EXTERN_C() ZEND_API void zend_map_ptr_reset(void); From 45a128c9de93bf60956102d85d15f1fe8913bb70 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:38:38 +0100 Subject: [PATCH 164/895] Zend/zend_types: include cleanup --- Zend/zend_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/zend_types.h b/Zend/zend_types.h index df64541749d4c..1b1f804a3c75b 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -24,6 +24,8 @@ #include "zend_portability.h" #include "zend_long.h" +#include "zend_type_info.h" // for MAY_BE_* + #include #ifdef __SSE2__ From b47bfd698d9554c504b68313e988d7e68ccc27bc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Mar 2022 19:28:34 +0100 Subject: [PATCH 165/895] ext/opcache: C++ compatibility Just in case somebody includes those headers from C++ code. The same already exists in other opcache headers. --- ext/opcache/zend_accelerator_debug.h | 4 ++++ ext/opcache/zend_persist.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ext/opcache/zend_accelerator_debug.h b/ext/opcache/zend_accelerator_debug.h index f4887a2c3fcab..4a19da57b5e62 100644 --- a/ext/opcache/zend_accelerator_debug.h +++ b/ext/opcache/zend_accelerator_debug.h @@ -28,7 +28,11 @@ #define ACCEL_LOG_INFO 3 #define ACCEL_LOG_DEBUG 4 +BEGIN_EXTERN_C() + void zend_accel_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_NORETURN void zend_accel_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); +END_EXTERN_C() + #endif /* _ZEND_ACCELERATOR_DEBUG_H */ diff --git a/ext/opcache/zend_persist.h b/ext/opcache/zend_persist.h index 4c7d6f2eeee15..930430c9589b7 100644 --- a/ext/opcache/zend_persist.h +++ b/ext/opcache/zend_persist.h @@ -22,6 +22,8 @@ #ifndef ZEND_PERSIST_H #define ZEND_PERSIST_H +BEGIN_EXTERN_C() + uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, int for_shm); zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, int for_shm); @@ -31,4 +33,6 @@ void zend_update_parent_ce(zend_class_entry *ce); void zend_persist_warnings_calc(uint32_t num_warnings, zend_error_info **warnings); zend_error_info **zend_persist_warnings(uint32_t num_warnings, zend_error_info **warnings); +END_EXTERN_C() + #endif /* ZEND_PERSIST_H */ From 24b311bdd70cabec31e8d5876d86e9dfaa916e76 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Jan 2023 18:14:43 +0100 Subject: [PATCH 166/895] ext/opcache/zend_shared_alloc: rename _register_xlat_entry() params The name "new" happens to be a C++ keyword, which was the my reason to rethink those names. The "xlat_table" is not only used to translate pointers for persisting scripts to shared memory, but is also used to annoate pointers (e.g. by the JIT to associate an op_array with its jit_extension). The names "old" and "new" aren't good for that; often, there's nothing "old" or "new" about them. It's actually a generic lookup table, and "old" shall be named "key" (which it is called internally already), and "new" is renamed to simply "value". --- ext/opcache/zend_shared_alloc.c | 10 +++++----- ext/opcache/zend_shared_alloc.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 703796d51d85c..f32f8c46eae48 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -541,18 +541,18 @@ void zend_shared_alloc_restore_xlat_table(uint32_t checkpoint) zend_hash_discard(&ZCG(xlat_table), checkpoint); } -void zend_shared_alloc_register_xlat_entry(const void *old, const void *new) +void zend_shared_alloc_register_xlat_entry(const void *key_pointer, const void *value) { - zend_ulong key = (zend_ulong)old; + zend_ulong key = (zend_ulong)key_pointer; key = zend_rotr3(key); - zend_hash_index_add_new_ptr(&ZCG(xlat_table), key, (void*)new); + zend_hash_index_add_new_ptr(&ZCG(xlat_table), key, (void*)value); } -void *zend_shared_alloc_get_xlat_entry(const void *old) +void *zend_shared_alloc_get_xlat_entry(const void *key_pointer) { void *retval; - zend_ulong key = (zend_ulong)old; + zend_ulong key = (zend_ulong)key_pointer; key = zend_rotr3(key); if ((retval = zend_hash_index_find_ptr(&ZCG(xlat_table), key)) == NULL) { diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 1caf678e36fe4..c56bd2bc8f4b2 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -185,8 +185,8 @@ void zend_shared_alloc_destroy_xlat_table(void); void zend_shared_alloc_clear_xlat_table(void); uint32_t zend_shared_alloc_checkpoint_xlat_table(void); void zend_shared_alloc_restore_xlat_table(uint32_t checkpoint); -void zend_shared_alloc_register_xlat_entry(const void *old, const void *new); -void *zend_shared_alloc_get_xlat_entry(const void *old); +void zend_shared_alloc_register_xlat_entry(const void *key, const void *value); +void *zend_shared_alloc_get_xlat_entry(const void *key); size_t zend_shared_alloc_get_free_memory(void); void zend_shared_alloc_save_state(void); From 39b46a5398978d383e448fa93c2680b0cb0b59e7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 7 Jan 2023 20:27:59 +0200 Subject: [PATCH 167/895] Implement Unicode conditional casing rules for Greek letter sigma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The capital Greek letter sigma (Σ) should be lowercased as σ except when it appears at the end of a word; in that case, it should be lowercased as the special form ς. This rule is included in the Unicode data file SpecialCasing.txt. The condition for applying the rule is called "Final_Sigma" and is defined in Unicode technical report 21. The rule is: • For the special casing form to apply, the capital letter sigma must be preceded by 0 or more "case-ignorable" characters, preceded by at least 1 "cased" character. • Further, capital sigma must NOT be followed by 0 or more case-ignorable characters and then at least 1 cased character. "Case-ignorable" characters include certain punctuation marks, like the apostrophe, as well as various accent marks. There are actually close to 500 different case-ignorable characters, including accent marks from Cyrillic, Hebrew, Armenian, Arabic, Syriac, Bengali, Gujarati, Telugu, Tibetan, and many other alphabets. This category also includes zero-width spaces, codepoints which indicate RTL/LTR text direction, certain musical symbols, etc. Since the rule involves scanning over "0 or more" of such case-ignorable characters, it may be necessary to scan arbitrarily far to the left and right of capital sigma to determine whether the special lowercase form should be used or not. However, since we are trying to be both memory-efficient and CPU-efficient, this implementation limits how far to the left we will scan. Generally, we scan up to 63 characters to the left looking for a "cased" character, but not more. When scanning to the right, we go up to the end of the string if necessary, even if it means scanning over thousands of characters. Anyways, it is almost impossible to imagine that natural text will include "words" with more than 63 successive apostrophes (for example) followed by a capital sigma. Closes GH-8096. --- NEWS | 4 ++ UPGRADING | 6 ++ ext/mbstring/php_unicode.c | 80 +++++++++++++++++++++ ext/mbstring/tests/casemapping.phpt | 10 +++ ext/mbstring/tests/mb_strtolower_basic.phpt | 44 ++++++++++++ 5 files changed, 144 insertions(+) diff --git a/NEWS b/NEWS index 75d2b9562e5eb..b3039bb92c179 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,10 @@ PHP NEWS . mb_detect_encoding's "non-strict" mode now behaves as described in the documentation. Previously, it would return false if the very first byte of the input string was invalid in all candidate encodings. (Alex Dowad) + . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional + casing rules for the Greek letter sigma. For mb_convert_case, conditional + casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to + MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. (Alex Dowad) - Opcache: . Added start, restart and force restart time to opcache's diff --git a/UPGRADING b/UPGRADING index f3254ab678144..e5e4e7c210db9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -56,6 +56,12 @@ PHP 8.3 UPGRADE NOTES "buffer_size" => int See GH-9336 +- MBString: + . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional + casing rules for the Greek letter sigma. For mb_convert_case, conditional + casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to + MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. (Alex Dowad) + - Standard: . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index b1ffb06c31f47..3e4b683924b06 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -238,6 +238,45 @@ static uint32_t *emit_special_casing_sequence(uint32_t w, uint32_t *out) return out; } +/* Used when determining whether special casing rules should be applied to Greek letter sigma */ +static bool scan_ahead_for_cased_letter(unsigned char *in, size_t in_len, unsigned int state, const mbfl_encoding *encoding) +{ + uint32_t wchar_buf[64]; + + while (in_len) { + size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf, 64, &state); + ZEND_ASSERT(out_len <= 64); + for (unsigned int i = 0; i < out_len; i++) { + uint32_t w = wchar_buf[i]; + if (php_unicode_is_cased(w)) { + return true; + } + if (!php_unicode_is_case_ignorable(w)) { + return false; + } + } + } + + return false; +} + +/* Used when determining whether special casing rules should be applied to Greek letter sigma */ +static bool scan_back_for_cased_letter(uint32_t *begin, uint32_t *end) +{ + if (end != NULL) { + while (--end >= begin) { + uint32_t w = *end; + if (php_unicode_is_cased(w)) { + return true; + } + if (!php_unicode_is_case_ignorable(w)) { + return false; + } + } + } + return false; +} + MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, const char *srcstr, size_t in_len, const mbfl_encoding *src_encoding, const mbfl_encoding *dst_encoding, int illegal_mode, uint32_t illegal_substchar) { /* A Unicode codepoint can expand out to up to 3 codepoints when uppercased, lowercased, or title cased @@ -246,6 +285,9 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons unsigned int state = 0, title_mode = 0; unsigned char *in = (unsigned char*)srcstr; enum mbfl_no_encoding enc = src_encoding->no_encoding; + /* In rare cases, we need to scan backwards through the previously converted codepoints to see + * if special conversion rules should be used for the Greek letter sigma */ + uint32_t *converted_end = NULL; mb_convert_buf buf; mb_convert_buf_init(&buf, in_len + 1, illegal_substchar, illegal_mode); @@ -315,6 +357,43 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } + if (w == 0x3A3) { + /* For Greek capital letter sigma, there is a special casing rule; + * if it is the last letter in a word, it should be downcased to U+03C2 + * (GREEK SMALL LETTER FINAL SIGMA) + * Specifically, we need to check if this codepoint is preceded by any + * number of case-ignorable codepoints, preceded by a cased letter, AND + * is NOT followed by any number of case-ignorable codepoints followed + * by a cased letter. + * Ref: http://www.unicode.org/reports/tr21/tr21-5.html + * Ref: https://unicode.org/Public/UNIDATA/SpecialCasing.txt + * + * While the special casing rules say we should scan backwards through "any number" + * of case-ignorable codepoints, that is a great implementation burden + * It would basically mean we need to keep all the codepoints in a big buffer + * during this conversion operation, but we don't want to do that (to reduce the + * amount of temporary scratch memory used) + * Hence, we only scan back through the codepoints in wchar_buf, and if we hit the + * beginning of the buffer, whatever codepoints have not yet been overwritten in + * the latter part of converted_buf */ + int j = i - 1; + while (j >= 0 && php_unicode_is_case_ignorable(wchar_buf[j])) { + j--; + } + if (j >= 0 ? php_unicode_is_cased(wchar_buf[j]) : scan_back_for_cased_letter(p, converted_end)) { + /* Now scan ahead to look for a cased letter */ + j = i + 1; + while (j < out_len && php_unicode_is_case_ignorable(wchar_buf[j])) { + j++; + } + /* If we hit the end of wchar_buf, convert more of the input string into + * codepoints and continue scanning */ + if (j >= out_len ? !scan_ahead_for_cased_letter(in, in_len, state, src_encoding) : !php_unicode_is_cased(wchar_buf[j])) { + *p++ = 0x3C2; + continue; + } + } + } w = php_unicode_tolower_raw(w, enc); if (UNEXPECTED(w > 0xFFFFFF)) { p = emit_special_casing_sequence(w, p); @@ -362,6 +441,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons EMPTY_SWITCH_DEFAULT_CASE() } + converted_end = p; ZEND_ASSERT(p - converted_buf <= 192); dst_encoding->from_wchar(converted_buf, p - converted_buf, &buf, !in_len); } diff --git a/ext/mbstring/tests/casemapping.phpt b/ext/mbstring/tests/casemapping.phpt index 85f5140e2bfef..85a21494a6ff8 100644 --- a/ext/mbstring/tests/casemapping.phpt +++ b/ext/mbstring/tests/casemapping.phpt @@ -58,6 +58,12 @@ echo bin2hex(mb_convert_case($str, MB_CASE_UPPER_SIMPLE)), "\n"; echo bin2hex(mb_convert_case($str, MB_CASE_FOLD)), "\n"; echo bin2hex(mb_convert_case($str, MB_CASE_FOLD_SIMPLE)), "\n"; +// Check handling of Greek letter capital sigma +echo mb_convert_case("ΚΑΛΗΣΠΕΡΑ ΣΑΣ", MB_CASE_TITLE, "UTF-8"), "\n"; +echo mb_convert_case("ΚΑΛΗΣΠΕΡΑ ΣΑΣ", MB_CASE_TITLE_SIMPLE, "UTF-8"), "\n"; +echo mb_convert_case("ΚΑΛΗΣΠΕΡΑ ΣΑΣ", MB_CASE_LOWER, "UTF-8"), "\n"; +echo mb_convert_case("ΚΑΛΗΣΠΕΡΑ ΣΑΣ", MB_CASE_LOWER_SIMPLE, "UTF-8"), "\n"; + ?> --EXPECT-- String: ß @@ -109,3 +115,7 @@ dd dd 69 69 +Καλησπερα Σασ +Καλησπερα Σασ +καλησπερα σας +καλησπερα σασ diff --git a/ext/mbstring/tests/mb_strtolower_basic.phpt b/ext/mbstring/tests/mb_strtolower_basic.phpt index debb42cd9ed74..10b3282d33c99 100644 --- a/ext/mbstring/tests/mb_strtolower_basic.phpt +++ b/ext/mbstring/tests/mb_strtolower_basic.phpt @@ -35,6 +35,33 @@ if ($mb == $greek_lower) { echo "Incorrectly converted\n"; } +echo "\n-- Greek letter sigma --\n"; +var_dump(mb_strtolower("Σ", 'UTF-8')); +var_dump(mb_strtolower("aΣ", 'UTF-8')); +var_dump(mb_strtolower("aΣb", 'UTF-8')); +var_dump(mb_strtolower("aΣ b", 'UTF-8')); +var_dump(mb_strtolower(" ΣΣΣΣ ", 'UTF-8')); + +// Apostrophe, full stop, colon, etc. are "case-ignorable" +// When checking whether capital sigma is at the end of a word or not, we skip over +// any number of case-ignorable characters, both when scanning back and when scanning forward +var_dump(mb_strtolower("'Σ", 'UTF-8')); +var_dump(mb_strtolower("ab'Σ", 'UTF-8')); +var_dump(mb_strtolower("Σ'", 'UTF-8')); +var_dump(mb_strtolower("Σ'a", 'UTF-8')); +var_dump(mb_strtolower("a'Σ'a", 'UTF-8')); + +// We scan back by at least 63 characters when necessary, +// but there is no guarantee that we will scan back further than that +var_dump(mb_strtolower('a' . str_repeat('.', 63) . "Σ", 'UTF-8')); +var_dump(mb_strtolower('a' . str_repeat('.', 64) . "Σ", 'UTF-8')); // Context-sensitive casing doesn't work here! + +// When scanning forward to confirm if capital sigma is at the end of a word or not, +// there is no limit as to how far we will scan +var_dump(mb_strtolower("abcΣ" . str_repeat('.', 64) . ' abc', 'UTF-8')); +var_dump(mb_strtolower("abcΣ" . str_repeat('.', 64) . 'a abc', 'UTF-8')); +var_dump(mb_strtolower("abcΣ" . str_repeat('.', 256) . ' abc', 'UTF-8')); + echo "Done"; ?> --EXPECT-- @@ -47,4 +74,21 @@ Correctly converted -- Multibyte String -- string(64) "zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J" Correctly converted + +-- Greek letter sigma -- +string(2) "σ" +string(3) "aς" +string(4) "aσb" +string(5) "aς b" +string(10) " σσσς " +string(3) "'σ" +string(5) "ab'ς" +string(3) "σ'" +string(4) "σ'a" +string(6) "a'σ'a" +string(66) "a...............................................................ς" +string(67) "a................................................................σ" +string(73) "abcς................................................................ abc" +string(74) "abcσ................................................................a abc" +string(265) "abcς................................................................................................................................................................................................................................................................ abc" Done From 290efe842dfe4c50cd7248d495267f34db13b213 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 9 Jan 2023 13:16:28 +0200 Subject: [PATCH 168/895] Adjust code which checks if encoding is ISO-8859-9 when converting case Instead of checking the 'encoding number' to see if we are converting case for ISO-8859-9 text, compare pointers instead. This should free up 1 register in php_unicode_convert_case. --- ext/mbstring/php_unicode.c | 45 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 3e4b683924b06..546096bf326cd 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -35,6 +35,8 @@ #include "php_unicode.h" #include "unicode_data.h" +extern const mbfl_encoding mbfl_encoding_8859_9; + ZEND_EXTERN_MODULE_GLOBALS(mbstring) static bool prop_lookup(unsigned long code, unsigned long n) @@ -118,14 +120,14 @@ static inline unsigned mph_lookup( mph_lookup(code, _uccase_##type##_g, _uccase_##type##_g_size, \ _uccase_##type##_table, _uccase_##type##_table_size) -static unsigned php_unicode_toupper_raw(unsigned code, enum mbfl_no_encoding enc) +static unsigned php_unicode_toupper_raw(unsigned code, const mbfl_encoding *enc) { /* After the ASCII characters, the first codepoint with an uppercase version * is 0xB5 (MICRO SIGN) */ if (code < 0xB5) { /* Fast path for ASCII */ if (code >= 0x61 && code <= 0x7A) { - if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x69)) { + if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x69)) { return 0x130; } return code - 0x20; @@ -140,14 +142,14 @@ static unsigned php_unicode_toupper_raw(unsigned code, enum mbfl_no_encoding enc } } -static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc) +static unsigned php_unicode_tolower_raw(unsigned code, const mbfl_encoding *enc) { /* After the ASCII characters, the first codepoint with a lowercase version * is 0xC0 (LATIN CAPITAL LETTER A WITH GRAVE) */ if (code < 0xC0) { /* Fast path for ASCII */ if (code >= 0x41 && code <= 0x5A) { - if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) { + if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x0049L)) { return 0x0131L; } return code + 0x20; @@ -156,7 +158,7 @@ static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc } else { unsigned new_code = CASE_LOOKUP(code, lower); if (new_code != CODE_NOT_FOUND) { - if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { + if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x130)) { return 0x69; } return new_code; @@ -165,7 +167,7 @@ static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc } } -static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc) +static unsigned php_unicode_totitle_raw(unsigned code, const mbfl_encoding *enc) { unsigned new_code = CASE_LOOKUP(code, title); if (new_code != CODE_NOT_FOUND) { @@ -176,12 +178,12 @@ static unsigned php_unicode_totitle_raw(unsigned code, enum mbfl_no_encoding enc return php_unicode_toupper_raw(code, enc); } -static unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) +static unsigned php_unicode_tofold_raw(unsigned code, const mbfl_encoding *enc) { if (code < 0x80) { /* Fast path for ASCII */ if (code >= 0x41 && code <= 0x5A) { - if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x49)) { + if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x49)) { return 0x131; } return code + 0x20; @@ -190,7 +192,7 @@ static unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) } else { unsigned new_code = CASE_LOOKUP(code, fold); if (new_code != CODE_NOT_FOUND) { - if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x130)) { + if (UNEXPECTED(enc == &mbfl_encoding_8859_9 && code == 0x130)) { return 0x69; } return new_code; @@ -199,28 +201,28 @@ static unsigned php_unicode_tofold_raw(unsigned code, enum mbfl_no_encoding enc) } } -static inline unsigned php_unicode_tolower_simple(unsigned code, enum mbfl_no_encoding enc) { +static inline unsigned php_unicode_tolower_simple(unsigned code, const mbfl_encoding *enc) { code = php_unicode_tolower_raw(code, enc); if (UNEXPECTED(code > 0xffffff)) { return _uccase_extra_table[code & 0xffffff]; } return code; } -static inline unsigned php_unicode_toupper_simple(unsigned code, enum mbfl_no_encoding enc) { +static inline unsigned php_unicode_toupper_simple(unsigned code, const mbfl_encoding *enc) { code = php_unicode_toupper_raw(code, enc); if (UNEXPECTED(code > 0xffffff)) { return _uccase_extra_table[code & 0xffffff]; } return code; } -static inline unsigned php_unicode_totitle_simple(unsigned code, enum mbfl_no_encoding enc) { +static inline unsigned php_unicode_totitle_simple(unsigned code, const mbfl_encoding *enc) { code = php_unicode_totitle_raw(code, enc); if (UNEXPECTED(code > 0xffffff)) { return _uccase_extra_table[code & 0xffffff]; } return code; } -static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { +static inline unsigned php_unicode_tofold_simple(unsigned code, const mbfl_encoding *enc) { code = php_unicode_tofold_raw(code, enc); if (UNEXPECTED(code > 0xffffff)) { return _uccase_extra_table[code & 0xffffff]; @@ -284,7 +286,6 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons uint32_t wchar_buf[64], converted_buf[192]; unsigned int state = 0, title_mode = 0; unsigned char *in = (unsigned char*)srcstr; - enum mbfl_no_encoding enc = src_encoding->no_encoding; /* In rare cases, we need to scan backwards through the previously converted codepoints to see * if special conversion rules should be used for the Greek letter sigma */ uint32_t *converted_end = NULL; @@ -302,21 +303,21 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons case PHP_UNICODE_CASE_UPPER_SIMPLE: for (int i = 0; i < out_len; i++) { uint32_t w = wchar_buf[i]; - *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_toupper_simple(w, enc); + *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_toupper_simple(w, src_encoding); } break; case PHP_UNICODE_CASE_LOWER_SIMPLE: for (int i = 0; i < out_len; i++) { uint32_t w = wchar_buf[i]; - *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_tolower_simple(w, enc); + *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_tolower_simple(w, src_encoding); } break; case PHP_UNICODE_CASE_FOLD_SIMPLE: for (int i = 0; i < out_len; i++) { uint32_t w = wchar_buf[i]; - *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_tofold_simple(w, enc); + *p++ = (UNEXPECTED(w > 0xFFFFFF)) ? w : php_unicode_tofold_simple(w, src_encoding); } break; @@ -327,7 +328,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } - *p++ = title_mode ? php_unicode_tolower_simple(w, enc) : php_unicode_totitle_simple(w, enc); + *p++ = title_mode ? php_unicode_tolower_simple(w, src_encoding) : php_unicode_totitle_simple(w, src_encoding); if (!php_unicode_is_case_ignorable(w)) { title_mode = php_unicode_is_cased(w); } @@ -341,7 +342,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } - w = php_unicode_toupper_raw(w, enc); + w = php_unicode_toupper_raw(w, src_encoding); if (UNEXPECTED(w > 0xFFFFFF)) { p = emit_special_casing_sequence(w, p); } else { @@ -394,7 +395,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons } } } - w = php_unicode_tolower_raw(w, enc); + w = php_unicode_tolower_raw(w, src_encoding); if (UNEXPECTED(w > 0xFFFFFF)) { p = emit_special_casing_sequence(w, p); } else { @@ -410,7 +411,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } - w = php_unicode_tofold_raw(w, enc); + w = php_unicode_tofold_raw(w, src_encoding); if (UNEXPECTED(w > 0xFFFFFF)) { p = emit_special_casing_sequence(w, p); } else { @@ -426,7 +427,7 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } - uint32_t w2 = title_mode ? php_unicode_tolower_raw(w, enc) : php_unicode_totitle_raw(w, enc); + uint32_t w2 = title_mode ? php_unicode_tolower_raw(w, src_encoding) : php_unicode_totitle_raw(w, src_encoding); if (UNEXPECTED(w2 > 0xFFFFFF)) { p = emit_special_casing_sequence(w2, p); } else { From a90358639d693df14b2bb82babffbfd4eea07e83 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 9 Jan 2023 13:21:31 +0200 Subject: [PATCH 169/895] Implement conditional casing for Greek letter sigma when title-casing text --- ext/mbstring/php_unicode.c | 24 +++++++++- ext/mbstring/tests/casemapping.phpt | 2 +- .../tests/mb_convert_case_various_mode.phpt | 44 +++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 546096bf326cd..af48ba4287f5f 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -427,12 +427,34 @@ MBSTRING_API zend_string *php_unicode_convert_case(php_case_mode case_mode, cons *p++ = w; continue; } - uint32_t w2 = title_mode ? php_unicode_tolower_raw(w, src_encoding) : php_unicode_totitle_raw(w, src_encoding); + uint32_t w2; + if (title_mode) { + if (w == 0x3A3) { + int j = i - 1; + while (j >= 0 && php_unicode_is_case_ignorable(wchar_buf[j])) { + j--; + } + if (j >= 0 ? php_unicode_is_cased(wchar_buf[j]) : scan_back_for_cased_letter(p, converted_end)) { + j = i + 1; + while (j < out_len && php_unicode_is_case_ignorable(wchar_buf[j])) { + j++; + } + if (j >= out_len ? !scan_ahead_for_cased_letter(in, in_len, state, src_encoding) : !php_unicode_is_cased(wchar_buf[j])) { + *p++ = 0x3C2; + goto set_title_mode; + } + } + } + w2 = php_unicode_tolower_raw(w, src_encoding); + } else { + w2 = php_unicode_totitle_raw(w, src_encoding); + } if (UNEXPECTED(w2 > 0xFFFFFF)) { p = emit_special_casing_sequence(w2, p); } else { *p++ = w2; } +set_title_mode: if (!php_unicode_is_case_ignorable(w)) { title_mode = php_unicode_is_cased(w); } diff --git a/ext/mbstring/tests/casemapping.phpt b/ext/mbstring/tests/casemapping.phpt index 85a21494a6ff8..050ebc94e25d1 100644 --- a/ext/mbstring/tests/casemapping.phpt +++ b/ext/mbstring/tests/casemapping.phpt @@ -115,7 +115,7 @@ dd dd 69 69 -Καλησπερα Σασ +Καλησπερα Σας Καλησπερα Σασ καλησπερα σας καλησπερα σασ diff --git a/ext/mbstring/tests/mb_convert_case_various_mode.phpt b/ext/mbstring/tests/mb_convert_case_various_mode.phpt index 10c5bdb3aa6c3..70dcbfcd66a25 100644 --- a/ext/mbstring/tests/mb_convert_case_various_mode.phpt +++ b/ext/mbstring/tests/mb_convert_case_various_mode.phpt @@ -21,6 +21,33 @@ try { echo $e->getMessage() . \PHP_EOL; } +echo "\n-- Greek letter sigma --\n"; +var_dump(mb_convert_case("Σ", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("aΣ", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("aΣb", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("aΣ b", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case(" ΣΣΣΣ ", MB_CASE_TITLE, 'UTF-8')); + +// Apostrophe, full stop, colon, etc. are "case-ignorable" +// When checking whether capital sigma is at the end of a word or not, we skip over +// any number of case-ignorable characters, both when scanning back and when scanning forward +var_dump(mb_convert_case("'Σ", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("ab'Σ", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("Σ'", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("Σ'a", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("a'Σ'a", MB_CASE_TITLE, 'UTF-8')); + +// We scan back by at least 63 characters when necessary, +// but there is no guarantee that we will scan back further than that +var_dump(mb_convert_case('a' . str_repeat('.', 63) . "Σ", MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case('a' . str_repeat('.', 64) . "Σ", MB_CASE_TITLE, 'UTF-8')); // Context-sensitive casing doesn't work here! + +// When scanning forward to confirm if capital sigma is at the end of a word or not, +// there is no limit as to how far we will scan +var_dump(mb_convert_case("abcΣ" . str_repeat('.', 64) . ' abc', MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("abcΣ" . str_repeat('.', 64) . 'a abc', MB_CASE_TITLE, 'UTF-8')); +var_dump(mb_convert_case("abcΣ" . str_repeat('.', 256) . ' abc', MB_CASE_TITLE, 'UTF-8')); + /* Regression test for new implementation; * When converting a codepoint, if we overwrite it with the converted version before * checking whether we should shift in/out of 'title mode', then the conversion will be incorrect */ @@ -38,5 +65,22 @@ string(13) "foo bar spaß" string(13) "Foo Bar Spaß" string(13) "foo bar spaß" mb_convert_case(): Argument #2 ($mode) must be one of the MB_CASE_* constants + +-- Greek letter sigma -- +string(2) "Σ" +string(3) "Aς" +string(4) "Aσb" +string(5) "Aς B" +string(10) " Σσσς " +string(3) "'Σ" +string(5) "Ab'ς" +string(3) "Σ'" +string(4) "Σ'a" +string(6) "A'σ'a" +string(66) "A...............................................................ς" +string(67) "A................................................................σ" +string(73) "Abcς................................................................ Abc" +string(74) "Abcσ................................................................a Abc" +string(265) "Abcς................................................................................................................................................................................................................................................................ Abc" string(12) "02bc004e012d" string(8) "0149012d" From 1f715f5658f5909a9346f56812fa605744d23880 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sun, 8 Jan 2023 19:15:55 +0100 Subject: [PATCH 170/895] Use absolute paths in OPCache tests when calling `opcache_compile_file()` This make sure the tests do not fail if they are not run from the repository root. Closes GH-10266 Signed-off-by: George Peter Banyard --- ext/opcache/tests/gh9968-1.inc | 2 +- ext/opcache/tests/preload_const_autoload.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/tests/gh9968-1.inc b/ext/opcache/tests/gh9968-1.inc index 468178c78483f..0f2b14673513c 100644 --- a/ext/opcache/tests/gh9968-1.inc +++ b/ext/opcache/tests/gh9968-1.inc @@ -1,3 +1,3 @@ Date: Thu, 12 Jan 2023 19:55:54 +0100 Subject: [PATCH 171/895] unserialize: Strictly check for `:{` at object start (#10214) * unserialize: Strictly check for `:{` at object start * unserialize: Update CVE tests It's unlikely that the object syntax error contributed to the actual CVE. The CVE is rather caused by the incorrect object serialization data of the `C` format. Add a second string without such a syntax error to ensure that path is still executed as well to ensure the CVE is absent. * Fix test expectation in gmp/tests/bug74670.phpt No changes to the input required, because the test actually is intended to verify the behavior for a missing `}`, it's just that the report position changed. * NEWS * UPGRADING --- NEWS | 2 ++ UPGRADING | 4 +++ ext/gmp/tests/bug74670.phpt | 2 +- ext/spl/tests/bug73029.phpt | 13 +++++++- ext/standard/tests/serialize/bug73341.phpt | 9 +++++ ext/standard/tests/serialize/bug74111.phpt | 2 +- .../serialize/serialization_objects_017.phpt | 17 ++++++++++ .../serialize/serialization_objects_018.phpt | 33 +++++++++++++++++++ ext/standard/var_unserializer.re | 24 ++++++++++++++ 9 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 ext/standard/tests/serialize/serialization_objects_017.phpt create mode 100644 ext/standard/tests/serialize/serialization_objects_018.phpt diff --git a/NEWS b/NEWS index 44631c9b610ff..d1f9267b44149 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,8 @@ PHP NEWS - Standard: . Fix GH-10187 (Segfault in stripslashes() with arm64). (nielsdos) + . Fixed bug GH-10214 (Incomplete validation of object syntax during + unserialize()). (timwolla) 05 Jan 2023, PHP 8.2.1 diff --git a/UPGRADING b/UPGRADING index 5f69712a4b02b..bc92affa46e80 100644 --- a/UPGRADING +++ b/UPGRADING @@ -223,6 +223,10 @@ PHP 8.2 UPGRADE NOTES widened to iterable from Iterator, allowing arrays to be passed. RFC: https://wiki.php.net/rfc/iterator_xyz_accept_array +- Standard + . unserialize() now performs a stricter validation of the structure of serialized + objects. + - XML . xml_parser_set_option() now actually returns false when attempting to set a negative tag start. Previously it returned true while emitting an E_WARNING. diff --git a/ext/gmp/tests/bug74670.phpt b/ext/gmp/tests/bug74670.phpt index 5f9de9330e591..1d09509a91316 100644 --- a/ext/gmp/tests/bug74670.phpt +++ b/ext/gmp/tests/bug74670.phpt @@ -8,5 +8,5 @@ $str = 'C:3:"GMP":4:{s:6666666666:""}'; var_dump(unserialize($str)); ?> --EXPECTF-- -Notice: unserialize(): Error at offset 13 of 29 bytes in %s on line %d +Notice: unserialize(): Error at offset 17 of 29 bytes in %s on line %d bool(false) diff --git a/ext/spl/tests/bug73029.phpt b/ext/spl/tests/bug73029.phpt index 5c3cd8420da8d..9e002f1182939 100644 --- a/ext/spl/tests/bug73029.phpt +++ b/ext/spl/tests/bug73029.phpt @@ -3,6 +3,13 @@ Bug #73029: Missing type check when unserializing SplArray --FILE-- getMessage() . "\n"; +} +try { $a = 'C:11:"ArrayObject":19:0x:i:0;r:2;;m:a:0:{}}'; $m = unserialize($a); $x = $m[2]; @@ -11,6 +18,10 @@ $x = $m[2]; } ?> DONE ---EXPECT-- +--EXPECTF-- Error at offset 10 of 19 bytes + +Notice: unserialize(): Error at offset 22 of 43 bytes in %s on line %d + +Warning: Trying to access array offset on value of type bool in %s on line %d DONE diff --git a/ext/standard/tests/serialize/bug73341.phpt b/ext/standard/tests/serialize/bug73341.phpt index 2f38949c1ae8f..3bdad06440be0 100644 --- a/ext/standard/tests/serialize/bug73341.phpt +++ b/ext/standard/tests/serialize/bug73341.phpt @@ -2,6 +2,13 @@ Bug #73144 (Use-afte-free in ArrayObject Deserialization) --FILE-- getMessage()."\n"; +} + try { $token = 'a:2:{i:0;O:1:"0":2:0s:1:"0";i:0;s:1:"0";a:1:{i:0;C:11:"ArrayObject":7:{x:i:0;r}'; $obj = unserialize($token); @@ -20,5 +27,7 @@ unserialize($exploit); --EXPECTF-- Error at offset 6 of 7 bytes +Notice: unserialize(): Error at offset 19 of 79 bytes in %s on line %d + Notice: ArrayObject::unserialize(): Unexpected end of serialized data in %sbug73341.php on line %d Error at offset 24 of 34 bytes diff --git a/ext/standard/tests/serialize/bug74111.phpt b/ext/standard/tests/serialize/bug74111.phpt index 62922bea55ae0..2062687aa271e 100644 --- a/ext/standard/tests/serialize/bug74111.phpt +++ b/ext/standard/tests/serialize/bug74111.phpt @@ -6,5 +6,5 @@ $s = 'O:8:"stdClass":00000000'; var_dump(unserialize($s)); ?> --EXPECTF-- -Notice: unserialize(): Error at offset 25 of 23 bytes in %s on line %d +Notice: unserialize(): Error at offset 23 of 23 bytes in %s on line %d bool(false) diff --git a/ext/standard/tests/serialize/serialization_objects_017.phpt b/ext/standard/tests/serialize/serialization_objects_017.phpt new file mode 100644 index 0000000000000..901d73f2b24aa --- /dev/null +++ b/ext/standard/tests/serialize/serialization_objects_017.phpt @@ -0,0 +1,17 @@ +--TEST-- +Object serialization / unserialization: Strict format +--FILE-- + +--EXPECTF-- +Notice: unserialize(): Error at offset 9 of 22 bytes in %s on line %d +bool(false) + +Notice: unserialize(): Error at offset 10 of 22 bytes in %s on line %d +bool(false) diff --git a/ext/standard/tests/serialize/serialization_objects_018.phpt b/ext/standard/tests/serialize/serialization_objects_018.phpt new file mode 100644 index 0000000000000..e05ff5ca04608 --- /dev/null +++ b/ext/standard/tests/serialize/serialization_objects_018.phpt @@ -0,0 +1,33 @@ +--TEST-- +Object serialization / unserialization: Strict format (2) +--FILE-- + +--EXPECTF-- +Notice: unserialize(): Error at offset 9 of 15 bytes in %s on line %d +bool(false) + +Notice: unserialize(): Error at offset 10 of 15 bytes in %s on line %d +bool(false) + +Notice: unserialize(): Error at offset 14 of 15 bytes in %s on line %d +bool(false) + +Notice: unserialize(): Error at offset 8 of 8 bytes in %s on line %d +bool(false) diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index bcf19002fc0a2..313d7fadeb394 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -743,6 +743,19 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) datalen = parse_iv2((*p) + 2, p); + if (max - (*p) < 2) { + return 0; + } + + if ((*p)[0] != ':') { + return 0; + } + + if ((*p)[1] != '{') { + (*p) += 1; + return 0; + } + (*p) += 2; if (datalen < 0 || (max - (*p)) <= datalen) { @@ -754,6 +767,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) * with unserialize reading past the end of the passed buffer if the string is not * appropriately terminated (usually NUL terminated, but '}' is also sufficient.) */ if ((*p)[datalen] != '}') { + (*p) += datalen; return 0; } @@ -1293,6 +1307,16 @@ object ":" uiv ":" ["] { return 0; } + YYCURSOR = *p; + + if (*(YYCURSOR) != ':') { + return 0; + } + if (*(YYCURSOR+1) != '{') { + *p = YYCURSOR+1; + return 0; + } + *p += 2; has_unserialize = !incomplete_class && ce->__unserialize; From 71bdcce9f823d8f83321bd511dd584c74044b31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 12 Jan 2023 20:07:31 +0100 Subject: [PATCH 172/895] Stop using the deprecated `set-output` command in nightly_matrix.php (#10302) see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- .github/nightly_matrix.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/nightly_matrix.php b/.github/nightly_matrix.php index 4a8dd1648fc60..18e0df0d9eaa8 100644 --- a/.github/nightly_matrix.php +++ b/.github/nightly_matrix.php @@ -88,5 +88,7 @@ function get_matrix_include(array $branches) { $branches = get_branches(); $matrix_include = get_matrix_include($branches); -echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n"; -echo '::set-output name=matrix-include::' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n"; +$f = fopen(getenv('GITHUB_OUTPUT'), 'a'); +fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n"); +fwrite($f, 'matrix-include=' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n"); +fclose($f); From 833b45ac4482dade13e3a25c0a46ac492ca1d54b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 10 Jan 2023 22:55:20 +0100 Subject: [PATCH 173/895] Fix GH-10249: Assertion `size >= page_size + 1 * page_size' failed. Co-authored-by: Changochen Closes GH-10284 --- NEWS | 3 +++ Zend/tests/fibers/gh10249.phpt | 17 +++++++++++++++++ Zend/zend_fibers.c | 6 +++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/fibers/gh10249.phpt diff --git a/NEWS b/NEWS index 0f8bbc310013e..9bcd519364550 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ PHP NEWS . Fixed bug GH-10218 (DateTimeZone fails to parse time zones that contain the "+" character). (Derick) +- Fiber: + . Fix assertion on stack allocation size. (nielsdos) + - FPM: . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). (Jakub Zelenka) diff --git a/Zend/tests/fibers/gh10249.phpt b/Zend/tests/fibers/gh10249.phpt new file mode 100644 index 0000000000000..efbef9c42a2ed --- /dev/null +++ b/Zend/tests/fibers/gh10249.phpt @@ -0,0 +1,17 @@ +--TEST-- +GH-10249 (Assertion `size >= page_size + 1 * page_size' failed.) +--FILE-- +start(); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +?> +--EXPECTF-- +Fiber stack size is too small, it needs to be at least %d bytes diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 1fec85528fbb3..543da605bda44 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -174,8 +174,12 @@ static zend_fiber_stack *zend_fiber_stack_allocate(size_t size) { void *pointer; const size_t page_size = zend_fiber_get_page_size(); + const size_t minimum_stack_size = page_size + ZEND_FIBER_GUARD_PAGES * page_size; - ZEND_ASSERT(size >= page_size + ZEND_FIBER_GUARD_PAGES * page_size); + if (size < minimum_stack_size) { + zend_throw_exception_ex(NULL, 0, "Fiber stack size is too small, it needs to be at least %zu bytes", minimum_stack_size); + return NULL; + } const size_t stack_size = (size + page_size - 1) / page_size * page_size; const size_t alloc_size = stack_size + ZEND_FIBER_GUARD_PAGES * page_size; From 55d19eee4911c5af10ea9aaec7c47773af76f516 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 7 Jan 2023 08:34:56 +0000 Subject: [PATCH 174/895] posix adding posix_fpathconf. follow-up on GH-10238 but with the file descriptor flavor. Close GH-10253 --- NEWS | 1 + UPGRADING | 1 + ext/posix/posix.c | 32 ++++++++++++++++++++++++++++ ext/posix/posix.stub.php | 2 ++ ext/posix/posix_arginfo.h | 9 +++++++- ext/posix/tests/posix_fpathconf.phpt | 22 +++++++++++++++++++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 ext/posix/tests/posix_fpathconf.phpt diff --git a/NEWS b/NEWS index b3039bb92c179..b723a692bdba3 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ PHP NEWS - Posix: . Added posix_sysconf. (David Carlier) . Added posix_pathconf. (David Carlier) + . Added posix_fpathconf. (David Carlier) - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) diff --git a/UPGRADING b/UPGRADING index e5e4e7c210db9..a2ce94a74c40d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -78,6 +78,7 @@ PHP 8.3 UPGRADE NOTES - Posix: . Added posix_sysconf call to get runtime informations. . Added posix_pathconf call to get configuration value from a directory/file. + . Added posix_fpathconf call to get configuration value from a file descriptor. - Random: . Added Randomizer::getBytesFromString(). diff --git a/ext/posix/posix.c b/ext/posix/posix.c index f521fffb2b66f..295a60a32cd12 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1225,3 +1225,35 @@ PHP_FUNCTION(posix_pathconf) RETURN_LONG(ret); } + +PHP_FUNCTION(posix_fpathconf) +{ + zend_long name, ret, fd; + zval *z_fd; + + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_ZVAL(z_fd) + Z_PARAM_LONG(name); + ZEND_PARSE_PARAMETERS_END(); + + if (Z_TYPE_P(z_fd) == IS_RESOURCE) { + if (!php_posix_stream_get_fd(z_fd, &fd)) { + RETURN_FALSE; + } + } else { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + zend_argument_type_error(1, "must be of type int|resource, %s given", + zend_zval_type_name(z_fd)); + RETURN_THROWS(); + } + } + + ret = fpathconf(fd, name); + + if (ret < 0 && errno != 0) { + POSIX_G(last_error) = errno; + RETURN_FALSE; + } + + RETURN_LONG(ret); +} diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index 94caf3cc261eb..16f19e91490ea 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -429,3 +429,5 @@ function posix_initgroups(string $username, int $group_id): bool {} function posix_sysconf(int $conf_id): int {} function posix_pathconf(string $path, int $name): int|false {} +/** @param resource|int $file_descriptor */ +function posix_fpathconf($file_descriptor, int $name): int|false {} diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index 6bbf4ca25dce9..74bc0021676c8 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 68daa5f0b270b307501a785ca6a197ea161a2ded */ + * Stub hash: b0c74c2ad41d4ae6a624f73109815fc9fe47fd1f */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) @@ -169,6 +169,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_pathconf, 0, 2, MAY_BE_LON ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_fpathconf, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_INFO(0, file_descriptor) + ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) +ZEND_END_ARG_INFO() + ZEND_FUNCTION(posix_kill); ZEND_FUNCTION(posix_getpid); @@ -234,6 +239,7 @@ ZEND_FUNCTION(posix_initgroups); #endif ZEND_FUNCTION(posix_sysconf); ZEND_FUNCTION(posix_pathconf); +ZEND_FUNCTION(posix_fpathconf); static const zend_function_entry ext_functions[] = { @@ -302,6 +308,7 @@ static const zend_function_entry ext_functions[] = { #endif ZEND_FE(posix_sysconf, arginfo_posix_sysconf) ZEND_FE(posix_pathconf, arginfo_posix_pathconf) + ZEND_FE(posix_fpathconf, arginfo_posix_fpathconf) ZEND_FE_END }; diff --git a/ext/posix/tests/posix_fpathconf.phpt b/ext/posix/tests/posix_fpathconf.phpt new file mode 100644 index 0000000000000..a809066e78221 --- /dev/null +++ b/ext/posix/tests/posix_fpathconf.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test posix_fpathconf +--EXTENSIONS-- +posix +--FILE-- +getMessage() . "\n"; +} +$fd = fopen(sys_get_temp_dir(), "r"); +var_dump(posix_fpathconf($fd, POSIX_PC_PATH_MAX)); +fclose($fd); +?> +--EXPECTF-- +bool(false) +bool(true) +posix_fpathconf(): Argument #1 ($file_descriptor) must be of type int|resource, string given +int(%d) From 9198e8894b4eb58d2e9bd428f85f5455167d89b6 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 10 Jan 2023 20:39:19 +0000 Subject: [PATCH 175/895] socket DF flag on UDP socket via IP_MTU_DISCOVER on Linux and IP_DONTFRAGMENT on FreeBSD for path MTU discovery purpose. idea proposal via ml : https://marc.info/?l=php-internals&m=167329288509393&w=2 Close GH-10282 --- NEWS | 1 + UPGRADING | 8 +++ ext/sockets/sockets.stub.php | 56 +++++++++++++++++++ ext/sockets/sockets_arginfo.h | 26 ++++++++- ext/sockets/tests/socket_dontfragment.phpt | 19 +++++++ .../tests/socket_dontfragment_bsd.phpt | 19 +++++++ 6 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 ext/sockets/tests/socket_dontfragment.phpt create mode 100644 ext/sockets/tests/socket_dontfragment_bsd.phpt diff --git a/NEWS b/NEWS index b723a692bdba3..91bb3fb7a13f5 100644 --- a/NEWS +++ b/NEWS @@ -86,6 +86,7 @@ PHP NEWS . Added socket_atmark if send/recv needs using MSG_OOB. (David Carlier) . Added TCP_QUICKACK constant, to give tigher control over ACK delays. (David Carlier) + . Added DONTFRAGMENT support for path MTU discovery purpose. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index a2ce94a74c40d..9fdfdb88f9280 100644 --- a/UPGRADING +++ b/UPGRADING @@ -117,6 +117,14 @@ PHP 8.3 UPGRADE NOTES - Sockets: . SO_ATTACH_REUSEPORT_CBPF (Linux only). . TCP_QUICKACK (Linux only). + . IP_DONTFRAG (FreeBSD only). + . IP_MTU_DISCOVER (Linux only). + . IP_PMTUDISC_DO (Linux only). + . IP_PMTUDISC_DONT (Linux only). + . IP_PMTUDISC_WANT (Linux only). + . IP_PMTUDISC_PROBE (Linux only). + . IP_PMTUDISC_INTERFACE (Linux only). + . IP_PMTUDISC_OMIT (Linux only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 90c084b9a64fc..3fc77cb9992f0 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -1706,6 +1706,62 @@ */ const TCP_QUICKACK = UNKNOWN; #endif +#if defined(IP_DONTFRAG) +/** + * @var int + * @cvalue IP_DONTFRAG + */ +const IP_DONTFRAG = UNKNOWN; +#endif +#if defined(IP_MTU_DISCOVER) +/** + * @var int + * @cvalue IP_MTU_DISCOVER + */ +const IP_MTU_DISCOVER = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_DO) +/** + * @var int + * @cvalue IP_PMTUDISC_DO + */ +const IP_PMTUDISC_DO = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_DONT) +/** + * @var int + * @cvalue IP_PMTUDISC_DONT + */ +const IP_PMTUDISC_DONT = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_WANT) +/** + * @var int + * @cvalue IP_PMTUDISC_WANT + */ +const IP_PMTUDISC_WANT = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_PROBE) +/** + * @var int + * @cvalue IP_PMTUDISC_PROBE + */ +const IP_PMTUDISC_PROBE = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_INTERFACE) +/** + * @var int + * @cvalue IP_PMTUDISC_INTERFACE + */ +const IP_PMTUDISC_INTERFACE = UNKNOWN; +#endif +#if defined(IP_PMTUDISC_OMIT) +/** + * @var int + * @cvalue IP_PMTUDISC_OMIT + */ +const IP_PMTUDISC_OMIT = UNKNOWN; +#endif /** * @strict-properties diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index bd97d5fd6c3fe..040b2bdc2f389 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: abec5e538a69c27451c0cac0a19a92fc6df667eb */ + * Stub hash: add91c303eddf7518566bc7e6c1698d7198c0d4c */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -991,6 +991,30 @@ static void register_sockets_symbols(int module_number) #if defined(TCP_QUICKACK) REGISTER_LONG_CONSTANT("TCP_QUICKACK", TCP_QUICKACK, CONST_PERSISTENT); #endif +#if defined(IP_DONTFRAG) + REGISTER_LONG_CONSTANT("IP_DONTFRAG", IP_DONTFRAG, CONST_PERSISTENT); +#endif +#if defined(IP_MTU_DISCOVER) + REGISTER_LONG_CONSTANT("IP_MTU_DISCOVER", IP_MTU_DISCOVER, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_DO) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_DO", IP_PMTUDISC_DO, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_DONT) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_DONT", IP_PMTUDISC_DONT, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_WANT) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_WANT", IP_PMTUDISC_WANT, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_PROBE) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_PROBE", IP_PMTUDISC_PROBE, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_INTERFACE) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_INTERFACE", IP_PMTUDISC_INTERFACE, CONST_PERSISTENT); +#endif +#if defined(IP_PMTUDISC_OMIT) + REGISTER_LONG_CONSTANT("IP_PMTUDISC_OMIT", IP_PMTUDISC_OMIT, CONST_PERSISTENT); +#endif } static zend_class_entry *register_class_Socket(void) diff --git a/ext/sockets/tests/socket_dontfragment.phpt b/ext/sockets/tests/socket_dontfragment.phpt new file mode 100644 index 0000000000000..c4c62976bcade --- /dev/null +++ b/ext/sockets/tests/socket_dontfragment.phpt @@ -0,0 +1,19 @@ +--TEST-- +IP_MTU_DISCOVER test +--EXTENSIONS-- +sockets +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) diff --git a/ext/sockets/tests/socket_dontfragment_bsd.phpt b/ext/sockets/tests/socket_dontfragment_bsd.phpt new file mode 100644 index 0000000000000..b9c927cb87846 --- /dev/null +++ b/ext/sockets/tests/socket_dontfragment_bsd.phpt @@ -0,0 +1,19 @@ +--TEST-- +IP_DONTFRAG test +--EXTENSIONS-- +sockets +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) From fd7214436ab3e77fb9e509019974cd19d685b5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 12 Jan 2023 23:30:36 +0100 Subject: [PATCH 176/895] Fix comment for php_safe_bcmp (#10306) * main: Fix comment for php_safe_bcmp * main: Include note about php_safe_bcmp being security sensitive This is taken from the implementation of `hash_equals()`. --- main/safe_bcmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/safe_bcmp.c b/main/safe_bcmp.c index 27a1756d79b46..3e806de4ab6e3 100644 --- a/main/safe_bcmp.c +++ b/main/safe_bcmp.c @@ -19,7 +19,7 @@ #include /* - * Returns 0 if both inputs match, 1 if they don't. + * Returns 0 if both inputs match, non-zero if they don't. * Returns -1 early if inputs do not have the same lengths. * */ @@ -34,6 +34,7 @@ PHPAPI int php_safe_bcmp(const zend_string *a, const zend_string *b) return -1; } + /* This is security sensitive code. Do not optimize this for speed. */ while (i < ZSTR_LEN(a)) { r |= ua[i] ^ ub[i]; ++i; From 061fcdb0a5649572b90cdad1be4d457dd3faa301 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 13 Jan 2023 00:02:35 +0100 Subject: [PATCH 177/895] ext/opcache: use C11 atomics for "restart_in" (#10276) Cheaper than fcntl(F_SETLK). The same is done already on Windows, so if that works, why not use it everywhere? (Of course, only if the compiler supports this C11 feature.) As a bonus, the code in this commit also works on C++ via C++11 std::atomic, just in case somebody adds some C++ code to the opcache extension one day. --- ext/opcache/ZendAccelerator.c | 26 +++++++++++++++----------- ext/opcache/ZendAccelerator.h | 16 +++++++++++++++- ext/opcache/config.m4 | 2 ++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 709a647a31c78..48a07760d981d 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -135,7 +135,11 @@ static void preload_shutdown(void); static void preload_activate(void); static void preload_restart(void); -#ifdef ZEND_WIN32 +#ifdef HAVE_STDATOMIC_H +# define INCREMENT(v) (++ZCSG(v)) +# define DECREMENT(v) (--ZCSG(v)) +# define LOCKVAL(v) atomic_load(&ZCSG(v)) +#elif defined(ZEND_WIN32) # define INCREMENT(v) InterlockedIncrement64(&ZCSG(v)) # define DECREMENT(v) InterlockedDecrement64(&ZCSG(v)) # define LOCKVAL(v) (ZCSG(v)) @@ -273,7 +277,7 @@ static ZEND_INI_MH(accel_include_path_on_modify) static inline void accel_restart_enter(void) { -#ifdef ZEND_WIN32 +#ifdef INCREMENT INCREMENT(restart_in); #else struct flock restart_in_progress; @@ -292,7 +296,7 @@ static inline void accel_restart_enter(void) static inline void accel_restart_leave(void) { -#ifdef ZEND_WIN32 +#ifdef DECREMENT ZCSG(restart_in_progress) = false; DECREMENT(restart_in); #else @@ -313,7 +317,9 @@ static inline void accel_restart_leave(void) static inline int accel_restart_is_active(void) { if (ZCSG(restart_in_progress)) { -#ifndef ZEND_WIN32 +#ifdef LOCKVAL + return LOCKVAL(restart_in) != 0; +#else struct flock restart_check; restart_check.l_type = F_WRLCK; @@ -331,8 +337,6 @@ static inline int accel_restart_is_active(void) } else { return 1; } -#else - return LOCKVAL(restart_in) != 0; #endif } return 0; @@ -341,7 +345,7 @@ static inline int accel_restart_is_active(void) /* Creates a read lock for SHM access */ static inline zend_result accel_activate_add(void) { -#ifdef ZEND_WIN32 +#ifdef INCREMENT SHM_UNPROTECT(); INCREMENT(mem_usage); SHM_PROTECT(); @@ -364,7 +368,7 @@ static inline zend_result accel_activate_add(void) /* Releases a lock for SHM access */ static inline void accel_deactivate_sub(void) { -#ifdef ZEND_WIN32 +#ifdef DECREMENT if (ZCG(counted)) { SHM_UNPROTECT(); DECREMENT(mem_usage); @@ -387,7 +391,7 @@ static inline void accel_deactivate_sub(void) static inline void accel_unlock_all(void) { -#ifdef ZEND_WIN32 +#ifdef DECREMENT accel_deactivate_sub(); #else struct flock mem_usage_unlock_all; @@ -828,7 +832,7 @@ static void accel_use_shm_interned_strings(void) HANDLE_UNBLOCK_INTERRUPTIONS(); } -#ifndef ZEND_WIN32 +#ifndef LOCKVAL static inline void kill_all_lockers(struct flock *mem_usage_check) { int tries; @@ -895,7 +899,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check) static inline int accel_is_inactive(void) { -#ifdef ZEND_WIN32 +#ifdef LOCKVAL if (LOCKVAL(mem_usage) == 0) { return SUCCESS; } diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index bc92854c35576..6ecc2c2bc9df1 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -55,6 +55,14 @@ #include "zend_accelerator_hash.h" #include "zend_accelerator_debug.h" +#ifdef HAVE_STDATOMIC_H +# ifdef __cplusplus +# include +# else +# include +# endif +#endif // HAVE_STDATOMIC_H + #ifndef PHPAPI # ifdef ZEND_WIN32 # define PHPAPI __declspec(dllimport) @@ -261,7 +269,13 @@ typedef struct _zend_accel_shared_globals { bool restart_pending; zend_accel_restart_reason restart_reason; bool cache_status_before_restart; -#ifdef ZEND_WIN32 +#ifdef HAVE_STDATOMIC_H +# ifdef __cplusplus + std::atomic_llong mem_usage, restart_in; +# else + atomic_llong mem_usage, restart_in; +# endif +#elif defined(ZEND_WIN32) LONGLONG mem_usage; LONGLONG restart_in; #endif diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 2a83fa2455974..c9fa6a7e57e4f 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -23,6 +23,8 @@ if test "$PHP_OPCACHE" != "no"; then dnl Always build as shared extension ext_shared=yes + AC_CHECK_HEADERS([stdatomic.h]) + if test "$PHP_HUGE_CODE_PAGES" = "yes"; then AC_DEFINE(HAVE_HUGE_CODE_PAGES, 1, [Define to enable copying PHP CODE pages into HUGE PAGES (experimental)]) fi From 120aafcc42c0d24f17b61dec98efb91bba86483b Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 13 Jan 2023 10:31:01 +0000 Subject: [PATCH 178/895] Fix bug #67244: Wrong owner:group for listening unix socket Update FPM www.conf to reflect the actual logic --- NEWS | 2 ++ sapi/fpm/www.conf.in | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 9bcd519364550..4145102b3388e 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ PHP NEWS - FPM: . Fixed bug GH-9981 (FPM does not reset fastcgi.error_header). (Jakub Zelenka) + . Fixed bug #67244 (Wrong owner:group for listening unix socket). + (Jakub Zelenka) - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). diff --git a/sapi/fpm/www.conf.in b/sapi/fpm/www.conf.in index d13b60067fb38..64da6bce1f0e9 100644 --- a/sapi/fpm/www.conf.in +++ b/sapi/fpm/www.conf.in @@ -17,9 +17,14 @@ ; Default Value: none ;prefix = /path/to/pools/$pool -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. +; Unix user/group of the child processes. This can be used only if the master +; process running user is root. It is set after the child process is created. +; The user and group can be specified either by their name or by their numeric +; IDs. +; Note: If the user is root, the executable needs to be started with + --allow-to-run-as-root option to work. +; Default Values: The user is set to master process running user by default. +; If the group is not set, the user's group is used. user = @php_fpm_user@ group = @php_fpm_group@ @@ -43,11 +48,12 @@ listen = 127.0.0.1:9000 ; permissions must be set in order to allow connections from a web server. Many ; BSD-derived systems allow connections regardless of permissions. The owner ; and group can be specified either by name or by their numeric IDs. -; Default Values: user and group are set as the running user -; mode is set to 0660 +; Default Values: Owner is set to the master process running user. If the group +; is not set, the owner's group is used. Mode is set to 0660. ;listen.owner = @php_fpm_user@ ;listen.group = @php_fpm_group@ ;listen.mode = 0660 + ; When POSIX Access Control Lists are supported you can set them using ; these options, value is a comma separated list of user/group names. ; When set, listen.owner and listen.group are ignored From 4fb149390ac54abd3717bb783b1738ec31d0fbee Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 13 Jan 2023 12:04:28 +0100 Subject: [PATCH 179/895] GC fiber unfinished executions (#9810) --- Zend/tests/fibers/gh9735-001.phpt | 37 ++++++++++++++++++ Zend/tests/fibers/gh9735-002.phpt | 41 +++++++++++++++++++ Zend/tests/fibers/gh9735-003.phpt | 40 +++++++++++++++++++ Zend/tests/fibers/gh9735-004.phpt | 40 +++++++++++++++++++ Zend/tests/fibers/gh9735-005.phpt | 44 +++++++++++++++++++++ Zend/tests/fibers/gh9735-006.phpt | 47 ++++++++++++++++++++++ Zend/tests/fibers/gh9735-007.phpt | 47 ++++++++++++++++++++++ Zend/tests/fibers/gh9735-008.phpt | 42 ++++++++++++++++++++ Zend/tests/fibers/gh9735-009.phpt | 42 ++++++++++++++++++++ Zend/zend_execute.c | 65 +++++++++++++++++++++++++++++++ Zend/zend_execute.h | 1 + Zend/zend_fibers.c | 25 +++++++++++- Zend/zend_generators.c | 53 +++---------------------- 13 files changed, 475 insertions(+), 49 deletions(-) create mode 100644 Zend/tests/fibers/gh9735-001.phpt create mode 100644 Zend/tests/fibers/gh9735-002.phpt create mode 100644 Zend/tests/fibers/gh9735-003.phpt create mode 100644 Zend/tests/fibers/gh9735-004.phpt create mode 100644 Zend/tests/fibers/gh9735-005.phpt create mode 100644 Zend/tests/fibers/gh9735-006.phpt create mode 100644 Zend/tests/fibers/gh9735-007.phpt create mode 100644 Zend/tests/fibers/gh9735-008.phpt create mode 100644 Zend/tests/fibers/gh9735-009.phpt diff --git a/Zend/tests/fibers/gh9735-001.phpt b/Zend/tests/fibers/gh9735-001.phpt new file mode 100644 index 0000000000000..327e74323924a --- /dev/null +++ b/Zend/tests/fibers/gh9735-001.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug GH-9735 001 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECT-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-002.phpt b/Zend/tests/fibers/gh9735-002.phpt new file mode 100644 index 0000000000000..9a56c65f0abd9 --- /dev/null +++ b/Zend/tests/fibers/gh9735-002.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug GH-9735 002 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECT-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-003.phpt b/Zend/tests/fibers/gh9735-003.phpt new file mode 100644 index 0000000000000..03ea973b61dd4 --- /dev/null +++ b/Zend/tests/fibers/gh9735-003.phpt @@ -0,0 +1,40 @@ +--TEST-- +Bug GH-9735 003 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECT-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-004.phpt b/Zend/tests/fibers/gh9735-004.phpt new file mode 100644 index 0000000000000..cfcf381d83d08 --- /dev/null +++ b/Zend/tests/fibers/gh9735-004.phpt @@ -0,0 +1,40 @@ +--TEST-- +Bug GH-9735 004 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECT-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-005.phpt b/Zend/tests/fibers/gh9735-005.phpt new file mode 100644 index 0000000000000..c18a42fc37082 --- /dev/null +++ b/Zend/tests/fibers/gh9735-005.phpt @@ -0,0 +1,44 @@ +--TEST-- +Bug GH-9735 005 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECTF-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-006.phpt b/Zend/tests/fibers/gh9735-006.phpt new file mode 100644 index 0000000000000..59bb79d2404bc --- /dev/null +++ b/Zend/tests/fibers/gh9735-006.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug GH-9735 006 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECTF-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-007.phpt b/Zend/tests/fibers/gh9735-007.phpt new file mode 100644 index 0000000000000..dbb6a33821119 --- /dev/null +++ b/Zend/tests/fibers/gh9735-007.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug GH-9735 007 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECTF-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-008.phpt b/Zend/tests/fibers/gh9735-008.phpt new file mode 100644 index 0000000000000..ec6f29fb79de4 --- /dev/null +++ b/Zend/tests/fibers/gh9735-008.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug GH-9735 008 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECTF-- +1 +2 +C::__destruct +3 diff --git a/Zend/tests/fibers/gh9735-009.phpt b/Zend/tests/fibers/gh9735-009.phpt new file mode 100644 index 0000000000000..c471499443bd4 --- /dev/null +++ b/Zend/tests/fibers/gh9735-009.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug GH-9735 009 (Fiber stack variables do not participate in cycle collector) +--FILE-- +start(); +gc_collect_cycles(); + +print "2\n"; + +$fiber = null; +gc_collect_cycles(); + +print "3\n"; + +?> +--EXPECTF-- +1 +2 +C::__destruct +3 diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 40b89e062e758..fc555bfce1184 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4450,6 +4450,71 @@ ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, cleanup_live_vars(execute_data, op_num, catch_op_num); } +ZEND_API HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer) +{ + if (!EX(func) || !ZEND_USER_CODE(EX(func)->common.type)) { + return NULL; + } + + zend_op_array *op_array = &EX(func)->op_array; + + if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) { + uint32_t i, num_cvs = EX(func)->op_array.last_var; + for (i = 0; i < num_cvs; i++) { + zend_get_gc_buffer_add_zval(gc_buffer, EX_VAR_NUM(i)); + } + } + + if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) { + zval *zv = EX_VAR_NUM(op_array->last_var + op_array->T); + zval *end = zv + (EX_NUM_ARGS() - op_array->num_args); + while (zv != end) { + zend_get_gc_buffer_add_zval(gc_buffer, zv++); + } + } + + if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) { + zend_get_gc_buffer_add_obj(gc_buffer, Z_OBJ(execute_data->This)); + } + if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) { + zend_get_gc_buffer_add_obj(gc_buffer, ZEND_CLOSURE_OBJECT(EX(func))); + } + if (EX_CALL_INFO() & ZEND_CALL_HAS_EXTRA_NAMED_PARAMS) { + zval extra_named_params; + ZVAL_ARR(&extra_named_params, EX(extra_named_params)); + zend_get_gc_buffer_add_zval(gc_buffer, &extra_named_params); + } + + if (call) { + /* -1 required because we want the last run opcode, not the next to-be-run one. */ + uint32_t op_num = execute_data->opline - op_array->opcodes - 1; + zend_unfinished_calls_gc(execute_data, call, op_num, gc_buffer); + } + + if (execute_data->opline != op_array->opcodes) { + uint32_t i, op_num = execute_data->opline - op_array->opcodes - 1; + for (i = 0; i < op_array->last_live_range; i++) { + const zend_live_range *range = &op_array->live_range[i]; + if (range->start > op_num) { + break; + } else if (op_num < range->end) { + uint32_t kind = range->var & ZEND_LIVE_MASK; + uint32_t var_num = range->var & ~ZEND_LIVE_MASK; + zval *var = EX_VAR(var_num); + if (kind == ZEND_LIVE_TMPVAR || kind == ZEND_LIVE_LOOP) { + zend_get_gc_buffer_add_zval(gc_buffer, var); + } + } + } + } + + if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) { + return execute_data->symbol_table; + } else { + return NULL; + } +} + #if ZEND_VM_SPEC static void zend_swap_operands(zend_op *op) /* {{{ */ { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index f09a8fe769417..3e61967cb2bea 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -378,6 +378,7 @@ ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table); ZEND_API void ZEND_FASTCALL zend_free_compiled_variables(zend_execute_data *execute_data); ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_execute_data *call, uint32_t op_num, zend_get_gc_buffer *buf); ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num); +ZEND_API HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer); zval * ZEND_FASTCALL zend_handle_named_arg( zend_execute_data **call_ptr, zend_string *arg_name, diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 543da605bda44..432be61e652b9 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -24,6 +24,8 @@ #include "zend_exceptions.h" #include "zend_builtin_functions.h" #include "zend_observer.h" +#include "zend_compile.h" +#include "zend_closures.h" #include "zend_fibers.h" #include "zend_fibers_arginfo.h" @@ -641,9 +643,30 @@ static HashTable *zend_fiber_object_gc(zend_object *object, zval **table, int *n zend_get_gc_buffer_add_zval(buf, &fiber->fci.function_name); zend_get_gc_buffer_add_zval(buf, &fiber->result); + if (fiber->context.status != ZEND_FIBER_STATUS_SUSPENDED) { + zend_get_gc_buffer_use(buf, table, num); + return NULL; + } + + HashTable *lastSymTable = NULL; + zend_execute_data *ex = fiber->execute_data; + for (; ex; ex = ex->prev_execute_data) { + HashTable *symTable = zend_unfinished_execution_gc(ex, ex->call, buf); + if (symTable) { + if (lastSymTable) { + zval *val; + ZEND_HASH_FOREACH_VAL(lastSymTable, val) { + ZEND_ASSERT(Z_TYPE_P(val) == IS_INDIRECT); + zend_get_gc_buffer_add_zval(buf, Z_INDIRECT_P(val)); + } ZEND_HASH_FOREACH_END(); + } + lastSymTable = symTable; + } + } + zend_get_gc_buffer_use(buf, table, num); - return NULL; + return lastSymTable; } ZEND_METHOD(Fiber, __construct) diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 71bf2f092debd..d5253e46eddf2 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -332,7 +332,7 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * { zend_generator *generator = (zend_generator*)object; zend_execute_data *execute_data = generator->execute_data; - zend_op_array *op_array; + zend_execute_data *call = NULL; if (!execute_data) { /* If the generator has been closed, it can only hold on to three values: The value, key @@ -352,7 +352,6 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * return NULL; } - op_array = &EX(func)->op_array; zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); zend_get_gc_buffer_add_zval(gc_buffer, &generator->value); @@ -360,59 +359,17 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * zend_get_gc_buffer_add_zval(gc_buffer, &generator->retval); zend_get_gc_buffer_add_zval(gc_buffer, &generator->values); - if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) { - uint32_t i, num_cvs = EX(func)->op_array.last_var; - for (i = 0; i < num_cvs; i++) { - zend_get_gc_buffer_add_zval(gc_buffer, EX_VAR_NUM(i)); - } - } - - if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) { - zval *zv = EX_VAR_NUM(op_array->last_var + op_array->T); - zval *end = zv + (EX_NUM_ARGS() - op_array->num_args); - while (zv != end) { - zend_get_gc_buffer_add_zval(gc_buffer, zv++); - } + if (UNEXPECTED(generator->frozen_call_stack)) { + /* The frozen stack is linked in reverse order */ + call = zend_generator_revert_call_stack(generator->frozen_call_stack); } - if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) { - zend_get_gc_buffer_add_obj(gc_buffer, Z_OBJ(execute_data->This)); - } - if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) { - zend_get_gc_buffer_add_obj(gc_buffer, ZEND_CLOSURE_OBJECT(EX(func))); - } - if (EX_CALL_INFO() & ZEND_CALL_HAS_EXTRA_NAMED_PARAMS) { - zval extra_named_params; - ZVAL_ARR(&extra_named_params, EX(extra_named_params)); - zend_get_gc_buffer_add_zval(gc_buffer, &extra_named_params); - } + zend_unfinished_execution_gc(execute_data, call, gc_buffer); if (UNEXPECTED(generator->frozen_call_stack)) { - /* The frozen stack is linked in reverse order */ - zend_execute_data *call = zend_generator_revert_call_stack(generator->frozen_call_stack); - /* -1 required because we want the last run opcode, not the next to-be-run one. */ - uint32_t op_num = execute_data->opline - op_array->opcodes - 1; - zend_unfinished_calls_gc(execute_data, call, op_num, gc_buffer); zend_generator_revert_call_stack(call); } - if (execute_data->opline != op_array->opcodes) { - uint32_t i, op_num = execute_data->opline - op_array->opcodes - 1; - for (i = 0; i < op_array->last_live_range; i++) { - const zend_live_range *range = &op_array->live_range[i]; - if (range->start > op_num) { - break; - } else if (op_num < range->end) { - uint32_t kind = range->var & ZEND_LIVE_MASK; - uint32_t var_num = range->var & ~ZEND_LIVE_MASK; - zval *var = EX_VAR(var_num); - if (kind == ZEND_LIVE_TMPVAR || kind == ZEND_LIVE_LOOP) { - zend_get_gc_buffer_add_zval(gc_buffer, var); - } - } - } - } - if (generator->node.parent) { zend_get_gc_buffer_add_obj(gc_buffer, &generator->node.parent->std); } From 0f7625c47c18bbb3c44ab30d7c5505fc53d8c62f Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 13 Jan 2023 12:05:51 +0100 Subject: [PATCH 180/895] Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242) zend_hash allocates a hash table twice as big as nTableSize (HT_HASH_SIZE(HT_SIZE_TO_MASK(nTableSize)) == nTableSize*2), so HT_MAX_SIZE must be half the max table size or less. Fixes GH-10240 --- Zend/zend_hash.c | 10 ++++++++++ Zend/zend_types.h | 13 ++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index cf0f9e5b332c4..a13bb196924e6 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -166,6 +166,8 @@ static zend_always_inline void zend_hash_real_init_mixed_ex(HashTable *ht) void *data; uint32_t nSize = ht->nTableSize; + ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); + if (UNEXPECTED(GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)) { data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), 1); } else if (EXPECTED(nSize == HT_MIN_SIZE)) { @@ -341,6 +343,8 @@ ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash(HashTable *ht) Bucket *old_buckets = ht->arData; uint32_t nSize = ht->nTableSize; + ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); + HT_ASSERT_RC1(ht); HT_FLAGS(ht) &= ~HASH_FLAG_PACKED; new_data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); @@ -369,7 +373,11 @@ ZEND_API void ZEND_FASTCALL zend_hash_to_packed(HashTable *ht) ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, bool packed) { HT_ASSERT_RC1(ht); + if (nSize == 0) return; + + ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); + if (UNEXPECTED(HT_FLAGS(ht) & HASH_FLAG_UNINITIALIZED)) { if (nSize > ht->nTableSize) { ht->nTableSize = zend_hash_check_size(nSize); @@ -1207,6 +1215,8 @@ static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht) uint32_t nSize = ht->nTableSize + ht->nTableSize; Bucket *old_buckets = ht->arData; + ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); + ht->nTableSize = nSize; new_data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); ht->nTableMask = HT_SIZE_TO_MASK(ht->nTableSize); diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 3d42d481a6530..5bc47dd31934e 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -400,8 +400,15 @@ struct _zend_array { #define HT_MIN_MASK ((uint32_t) -2) #define HT_MIN_SIZE 8 +/* HT_MAX_SIZE is chosen to satisfy the following constraints: + * - HT_SIZE_TO_MASK(HT_MAX_SIZE) != 0 + * - HT_SIZE_EX(HT_MAX_SIZE, HT_SIZE_TO_MASK(HT_MAX_SIZE)) does not overflow or + * wrapparound, and is <= the addressable space size + * - HT_MAX_SIZE must be a power of two: + * (nTableSize Date: Fri, 13 Jan 2023 12:29:51 +0100 Subject: [PATCH 181/895] [ci skip] NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index edb0ca3d11f78..bb9d4ec331b7a 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug GH-10200 (zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed). (nielsdos) . Fix GH-10251 (Assertion `(flag & (1<<3)) == 0' failed). (nielsdos) + . Fix GH-10240 (Assertion failure when adding more than 2**30 elements to an + unpacked array). (Arnaud) + . Fix GH-9735 (Fiber stack variables do not participate in cycle collector). + (Arnaud) - FPM: . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) From 7473b86f1067c07817dbf497989a167e1109c91b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 13 Jan 2023 12:51:15 +0100 Subject: [PATCH 182/895] build/php.m4: remove test for integer types (#10304) These are mandatory in C99, so it's a pointless waste of time to check for them. (Actually, the fixed-size integer types are not mandatory, but if they are really not available on some theoretical system, PHP's fallbacks won't work either, so nothing is gained from this check.) --- UPGRADING.INTERNALS | 4 ++++ Zend/zend_strtod_int.h | 16 ---------------- build/php.m4 | 8 -------- ext/date/lib/timelib.h | 16 ---------------- ext/mysqlnd/config-win.h | 26 -------------------------- 5 files changed, 4 insertions(+), 66 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 770300a350c0e..4a2c44e6aa037 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -26,6 +26,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES break the build of third-party extensions which relied on this implementation detail. Those extensions may need to add the missing #include lines. +* Since version 8, PHP requires a C99 compiler. Configure-time checks + for C99 features have been removed and therefore macro definitions + from php_config.h have disappeared. Do not use those feature + macros. ======================== 2. Build system changes diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h index e1cf562d64af6..f528b4753eabb 100644 --- a/Zend/zend_strtod_int.h +++ b/Zend/zend_strtod_int.h @@ -44,22 +44,6 @@ #include -#ifndef HAVE_INT32_T -# if SIZEOF_INT == 4 -typedef int int32_t; -# elif SIZEOF_LONG == 4 -typedef long int int32_t; -# endif -#endif - -#ifndef HAVE_UINT32_T -# if SIZEOF_INT == 4 -typedef unsigned int uint32_t; -# elif SIZEOF_LONG == 4 -typedef unsigned long int uint32_t; -# endif -#endif - #ifdef USE_LOCALE #undef USE_LOCALE #endif diff --git a/build/php.m4 b/build/php.m4 index 34652da7d8d29..698a9195e5760 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2443,14 +2443,6 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [ AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([size_t]) AC_CHECK_SIZEOF([off_t]) - AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t], [], [ - AC_MSG_ERROR([One of the intN_t or uintN_t types is not available]) - ], [ -#include -#if HAVE_SYS_TYPES_H -# include -#endif - ]) ]) dnl diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index c9e8c6d82980e..128a0c3c82841 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -39,22 +39,6 @@ #include #include -# ifndef HAVE_INT32_T -# if SIZEOF_INT == 4 -typedef int int32_t; -# elif SIZEOF_LONG == 4 -typedef long int int32_t; -# endif -# endif - -# ifndef HAVE_UINT32_T -# if SIZEOF_INT == 4 -typedef unsigned int uint32_t; -# elif SIZEOF_LONG == 4 -typedef unsigned long int uint32_t; -# endif -# endif - #ifdef _WIN32 # if _MSC_VER >= 1600 # include diff --git a/ext/mysqlnd/config-win.h b/ext/mysqlnd/config-win.h index 69801bf60e415..73a732fa76617 100644 --- a/ext/mysqlnd/config-win.h +++ b/ext/mysqlnd/config-win.h @@ -15,32 +15,6 @@ This file is public domain and comes with NO WARRANTY of any kind */ #include -#ifndef HAVE_INT8_T -#define HAVE_INT8_T -#endif -#ifndef HAVE_UINT8_T -#define HAVE_UINT8_T -#endif -#ifndef HAVE_INT16_T -#define HAVE_INT16_T -#endif -#ifndef HAVE_UINT16_T -#define HAVE_UINT16_T -#endif -#ifndef HAVE_INT32_T -#define HAVE_INT32_T -#endif -#ifndef HAVE_UINT32_T -#define HAVE_UINT32_T -#endif -#ifndef HAVE_INT64_T -#define HAVE_INT64_T -#endif -#ifndef HAVE_UINT64_T -#define HAVE_UINT64_T -#endif - - #ifndef _WIN64 #ifndef _WIN32 #define _WIN32 /* Compatible with old source */ From 2b1907786c22f959aca0fb371654df500c339f48 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 13 Jan 2023 17:42:43 +0100 Subject: [PATCH 183/895] zend_hash_check_size: allow nSize <= HT_MAX_SIZE (#10244) This is consistent with other uses of HT_MAX_SIZE --- Zend/zend_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index a3b93f2145aa0..db1c0a6b49d58 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -119,7 +119,7 @@ static zend_always_inline uint32_t zend_hash_check_size(uint32_t nSize) /* size should be between HT_MIN_SIZE and HT_MAX_SIZE */ if (nSize <= HT_MIN_SIZE) { return HT_MIN_SIZE; - } else if (UNEXPECTED(nSize >= HT_MAX_SIZE)) { + } else if (UNEXPECTED(nSize > HT_MAX_SIZE)) { zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%u * %zu + %zu)", nSize, sizeof(Bucket), sizeof(Bucket)); } From 8c0698f66bbaa87de56e38ace03466c9e0c2f2bd Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 13 Jan 2023 17:43:17 +0100 Subject: [PATCH 184/895] Fix run-tests.php hanging when a worker process dies without notice (#9931) run-tests.php with `-jN` can hang if a parallel worker dies without notice. This can happen due to fatal errors in the worker, or if the worker is killed. - run-tests.php (main process) \_ run-tests.php (worker #0) // main process hangs if this one crashes \_ test-001.php (test-001.phpt) --- run-tests.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-tests.php b/run-tests.php index 16241c08cc6cc..edfab1f57adcd 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1583,6 +1583,10 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested): v kill_children($workerProcs); error("Could not find worker stdout in array of worker stdouts, THIS SHOULD NOT HAPPEN."); } + if (feof($workerSock)) { + kill_children($workerProcs); + error("Worker $i died unexpectedly"); + } while (false !== ($rawMessage = fgets($workerSock))) { // work around fgets truncating things if (($rawMessageBuffers[$i] ?? '') !== '') { From 690db97c6de7bd999c037086c9daac356a1a5614 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 14 Jan 2023 07:26:05 +0000 Subject: [PATCH 185/895] intl extension couple of micro optimisations for error edge cases. (#10044) making c++ compile time few enums ranges. --- ext/intl/breakiterator/breakiterator_methods.cpp | 4 ++-- ext/intl/calendar/calendar_class.cpp | 2 +- ext/intl/calendar/calendar_methods.cpp | 10 +++++----- ext/intl/calendar/gregoriancalendar_methods.cpp | 4 ++-- ext/intl/dateformat/dateformat_attrcpp.cpp | 8 ++++---- ext/intl/dateformat/dateformat_format_object.cpp | 2 +- ext/intl/intl_convertcpp.cpp | 4 ++-- ext/intl/msgformat/msgformat_helpers.cpp | 16 ++++++++-------- ext/intl/timezone/timezone_class.cpp | 4 ++-- ext/intl/timezone/timezone_methods.cpp | 10 +++++----- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index 224b6587fdff4..596438bef8533 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -201,7 +201,7 @@ static void _breakiter_int32_ret_int32( BREAKITER_METHOD_FETCH_OBJECT; - if (arg < INT32_MIN || arg > INT32_MAX) { + if (UNEXPECTED(arg < INT32_MIN || arg > INT32_MAX)) { zend_argument_value_error(1, "must be between %d and %d", INT32_MIN, INT32_MAX); RETURN_THROWS(); } @@ -292,7 +292,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, isBoundary) RETURN_THROWS(); } - if (offset < INT32_MIN || offset > INT32_MAX) { + if (UNEXPECTED(offset < INT32_MIN || offset > INT32_MAX)) { zend_argument_value_error(1, "must be between %d and %d", INT32_MIN, INT32_MAX); RETURN_THROWS(); } diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp index 8a2c7904a2d26..556b5df208fd4 100644 --- a/ext/intl/calendar/calendar_class.cpp +++ b/ext/intl/calendar/calendar_class.cpp @@ -94,7 +94,7 @@ static zend_object *Calendar_clone_obj(zend_object *object) Calendar *newCalendar; newCalendar = co_orig->ucal->clone(); - if (!newCalendar) { + if (UNEXPECTED(!newCalendar)) { zend_string *err_msg; intl_errors_set_code(CALENDAR_ERROR_P(co_orig), U_MEMORY_ALLOCATION_ERROR); diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index 52d1b2cb3037d..19b12e6e22616 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -50,7 +50,7 @@ using icu::Locale; } #define ZEND_VALUE_ERROR_OUT_OF_BOUND_VALUE(argument, zpp_arg_position) \ - if (argument < INT32_MIN || argument > INT32_MAX) { \ + if (UNEXPECTED(argument < INT32_MIN || argument > INT32_MAX)) { \ zend_argument_value_error(getThis() ? ((zpp_arg_position)-1) : zpp_arg_position, \ "must be between %d and %d", INT32_MIN, INT32_MAX); \ RETURN_THROWS(); \ @@ -96,7 +96,7 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance) Calendar *cal = Calendar::createInstance(timeZone, Locale::createFromName(locale_str), status); - if (cal == NULL) { + if (UNEXPECTED(cal == NULL)) { delete timeZone; intl_error_set(NULL, status, "Error creating ICU Calendar object", 0); RETURN_NULL(); @@ -637,7 +637,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time_zone) CALENDAR_METHOD_FETCH_OBJECT; TimeZone *tz = co->ucal->getTimeZone().clone(); - if (tz == NULL) { + if (UNEXPECTED(tz == NULL)) { intl_errors_set(CALENDAR_ERROR_P(co), U_MEMORY_ALLOCATION_ERROR, "intlcal_get_time_zone: could not clone TimeZone", 0); RETURN_FALSE; @@ -1000,7 +1000,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) cal = Calendar::createInstance(timeZone, Locale::createFromName(locale_str), status); - if (cal == NULL) { + if (UNEXPECTED(cal == NULL)) { delete timeZone; intl_error_set(NULL, status, "intlcal_from_date_time: " "error creating ICU Calendar object", 0); @@ -1045,7 +1045,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time) INTL_METHOD_CHECK_STATUS(co, "Call to ICU method has failed"); - if (date > (double)U_INT64_MAX || date < (double)U_INT64_MIN) { + if (UNEXPECTED(date > (double)U_INT64_MAX || date < (double)U_INT64_MIN)) { intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR, "intlcal_to_date_time: The calendar date is out of the " "range for a 64-bit integer", 0); diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 757b280cd972a..014abef3f0c55 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -135,7 +135,7 @@ static void _php_intlgregcal_constructor_body( } else { // From date/time (3, 5 or 6 arguments) for (int i = 0; i < variant; i++) { - if (largs[i] < INT32_MIN || largs[i] > INT32_MAX) { + if (UNEXPECTED(largs[i] < INT32_MIN || largs[i] > INT32_MAX)) { zend_argument_value_error(getThis() ? (i-1) : i, "must be between %d and %d", INT32_MIN, INT32_MAX); RETURN_THROWS(); @@ -251,7 +251,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_is_leap_year) RETURN_THROWS(); } - if (year < INT32_MIN || year > INT32_MAX) { + if (UNEXPECTED(year < INT32_MIN || year > INT32_MAX)) { zend_argument_value_error(getThis() ? 1 : 2, "must be between %d and %d", INT32_MIN, INT32_MAX); RETURN_THROWS(); } diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp index da74b211635cb..a9b9a3d8f5079 100644 --- a/ext/intl/dateformat/dateformat_attrcpp.cpp +++ b/ext/intl/dateformat/dateformat_attrcpp.cpp @@ -69,7 +69,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone) const TimeZone& tz = fetch_datefmt(dfo)->getTimeZone(); TimeZone *tz_clone = tz.clone(); - if (tz_clone == NULL) { + if (UNEXPECTED(tz_clone == NULL)) { intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR, "datefmt_get_timezone: Out of memory when cloning time zone", 0); @@ -142,7 +142,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object) } Calendar *cal_clone = cal->clone(); - if (cal_clone == NULL) { + if (UNEXPECTED(cal_clone == NULL)) { intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR, "datefmt_get_calendar_object: Out of memory when cloning " "calendar", 0); @@ -193,7 +193,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar) if (cal_owned) { /* a non IntlCalendar was specified, we want to keep the timezone */ TimeZone *old_timezone = fetch_datefmt(dfo)->getTimeZone().clone(); - if (old_timezone == NULL) { + if (UNEXPECTED(old_timezone == NULL)) { intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR, "datefmt_set_calendar: Out of memory when cloning calendar", 0); @@ -203,7 +203,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar) cal->adoptTimeZone(old_timezone); } else { cal = cal->clone(); - if (cal == NULL) { + if (UNEXPECTED(cal == NULL)) { intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR, "datefmt_set_calendar: Out of memory when cloning calendar", 0); diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp index 9e4697902e62a..27d39866bc2e0 100644 --- a/ext/intl/dateformat/dateformat_format_object.cpp +++ b/ext/intl/dateformat/dateformat_format_object.cpp @@ -37,7 +37,7 @@ using icu::GregorianCalendar; using icu::StringPiece; using icu::SimpleDateFormat; -static const DateFormat::EStyle valid_styles[] = { +static constexpr DateFormat::EStyle valid_styles[] = { DateFormat::kNone, DateFormat::kFull, DateFormat::kLong, diff --git a/ext/intl/intl_convertcpp.cpp b/ext/intl/intl_convertcpp.cpp index 8ea0a0f36d1e4..43d0d2cdd385e 100644 --- a/ext/intl/intl_convertcpp.cpp +++ b/ext/intl/intl_convertcpp.cpp @@ -23,7 +23,7 @@ extern "C" { /* {{{ intl_stringFromChar */ int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status) { - if(str_len > INT32_MAX) { + if(UNEXPECTED(str_len > INT32_MAX)) { *status = U_BUFFER_OVERFLOW_ERROR; ret.setToBogus(); return FAILURE; @@ -56,7 +56,7 @@ zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status) { zend_string *u8res; - if (from.isBogus()) { + if (UNEXPECTED(from.isBogus())) { return NULL; } diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index 430d5a741115f..fbd85b857f3bc 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -328,7 +328,7 @@ static void umsg_set_timezone(MessageFormatter_object *mfo, formats = mf->getFormats(count); - if (formats == NULL) { + if (UNEXPECTED(formats == NULL)) { intl_errors_set(&err, U_MEMORY_ALLOCATION_ERROR, "Out of memory retrieving subformats", 0); } @@ -403,7 +403,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, /* Process key and retrieve type */ if (str_index == NULL) { /* includes case where index < 0 because it's exposed as unsigned */ - if (num_index > (zend_ulong)INT32_MAX) { + if (UNEXPECTED(num_index > (zend_ulong)INT32_MAX)) { intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR, "Found negative or too large array key", 0); continue; @@ -477,8 +477,8 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, int32_t tInt32 = 0; if (Z_TYPE_P(elem) == IS_DOUBLE) { - if (Z_DVAL_P(elem) > (double)INT32_MAX || - Z_DVAL_P(elem) < (double)INT32_MIN) { + if (UNEXPECTED(Z_DVAL_P(elem) > (double)INT32_MAX || + Z_DVAL_P(elem) < (double)INT32_MIN)) { intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR, "Found PHP float with absolute value too large for " "32 bit integer argument", 0); @@ -486,8 +486,8 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, tInt32 = (int32_t)Z_DVAL_P(elem); } } else if (Z_TYPE_P(elem) == IS_LONG) { - if (Z_LVAL_P(elem) > INT32_MAX || - Z_LVAL_P(elem) < INT32_MIN) { + if (UNEXPECTED(Z_LVAL_P(elem) > INT32_MAX || + Z_LVAL_P(elem) < INT32_MIN)) { intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR, "Found PHP integer with absolute value too large " "for 32 bit integer argument", 0); @@ -505,8 +505,8 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, int64_t tInt64 = 0; if (Z_TYPE_P(elem) == IS_DOUBLE) { - if (Z_DVAL_P(elem) > (double)U_INT64_MAX || - Z_DVAL_P(elem) < (double)U_INT64_MIN) { + if (UNEXPECTED(Z_DVAL_P(elem) > (double)U_INT64_MAX || + Z_DVAL_P(elem) < (double)U_INT64_MIN)) { intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR, "Found PHP float with absolute value too large for " "64 bit integer argument", 0); diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index df1da4c021daa..8afc7e2bc4a3a 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -157,7 +157,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, return NULL; } timeZone = to->utimezone->clone(); - if (timeZone == NULL) { + if (UNEXPECTED(timeZone == NULL)) { spprintf(&message, 0, "%s: could not clone TimeZone", func); if (message) { intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1); @@ -193,7 +193,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, return NULL; } timeZone = TimeZone::createTimeZone(id); - if (timeZone == NULL) { + if (UNEXPECTED(timeZone == NULL)) { spprintf(&message, 0, "%s: Could not create time zone", func); if (message) { intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1); diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index ef73b9416e9b8..cae64026fa5db 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -148,8 +148,8 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration) se = TimeZone::createEnumeration(); } else if (Z_TYPE_P(arg) == IS_LONG) { int_offset: - if (Z_LVAL_P(arg) < (zend_long)INT32_MIN || - Z_LVAL_P(arg) > (zend_long)INT32_MAX) { + if (UNEXPECTED(Z_LVAL_P(arg) < (zend_long)INT32_MIN || + Z_LVAL_P(arg) > (zend_long)INT32_MAX)) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_create_enumeration: value is out of range", 0); RETURN_FALSE; @@ -241,7 +241,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) } if (!arg3isnull) { - if (offset_arg < (zend_long)INT32_MIN || offset_arg > (zend_long)INT32_MAX) { + if (UNEXPECTED(offset_arg < (zend_long)INT32_MIN || offset_arg > (zend_long)INT32_MAX)) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intltz_create_time_zone_id_enumeration: offset out of bounds", 0); RETURN_FALSE; @@ -350,7 +350,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id) RETURN_THROWS(); } - if (index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX) { + if (UNEXPECTED(index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX)) { RETURN_FALSE; } @@ -475,7 +475,7 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules) RETURN_BOOL(to->utimezone->hasSameRules(*other_to->utimezone)); } -static const TimeZone::EDisplayType display_types[] = { +static constexpr TimeZone::EDisplayType display_types[] = { TimeZone::SHORT, TimeZone::LONG, TimeZone::SHORT_GENERIC, TimeZone::LONG_GENERIC, TimeZone::SHORT_GMT, TimeZone::LONG_GMT, From 6ab503814db2848189bcd2e4ad8deef38b6168e3 Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:15:56 +0100 Subject: [PATCH 186/895] Make array_pad's $length warning less confusing (#10149) Remove array_pad's arbitrary length restriction The error message was wrong; it *is* possible to use a larger length. Furthermore, there is an arbitrary restriction on the new array's length. Fix both by checking the length against HT_MAX_SIZE. --- ext/standard/array.c | 9 +++++---- ext/standard/tests/array/array_pad.phpt | 7 ------- .../array/array_pad_too_large_padding.phpt | 20 +++++++++++++++++++ 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 ext/standard/tests/array/array_pad_too_large_padding.phpt diff --git a/ext/standard/array.c b/ext/standard/array.c index 96a32da8e0552..c8afc08cffa62 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4344,13 +4344,14 @@ PHP_FUNCTION(array_pad) Z_PARAM_ZVAL(pad_value) ZEND_PARSE_PARAMETERS_END(); + if (pad_size < Z_L(-HT_MAX_SIZE) || pad_size > Z_L(HT_MAX_SIZE)) { + zend_argument_value_error(2, "must not exceed the maximum allowed array size"); + RETURN_THROWS(); + } + /* Do some initial calculations */ input_size = zend_hash_num_elements(Z_ARRVAL_P(input)); pad_size_abs = ZEND_ABS(pad_size); - if (pad_size_abs < 0 || pad_size_abs - input_size > Z_L(1048576)) { - zend_argument_value_error(2, "must be less than or equal to 1048576"); - RETURN_THROWS(); - } if (input_size >= pad_size_abs) { /* Copy the original array */ diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt index 5abcbac87ef7d..67cb423497ffb 100644 --- a/ext/standard/tests/array/array_pad.phpt +++ b/ext/standard/tests/array/array_pad.phpt @@ -13,12 +13,6 @@ var_dump(array_pad(array("", -1, 2.0), 2, array())); var_dump(array_pad(array("", -1, 2.0), -3, array())); var_dump(array_pad(array("", -1, 2.0), -4, array())); -try { - var_dump(array_pad(array("", -1, 2.0), 2000000, 0)); -} catch (\ValueError $e) { - echo $e->getMessage() . "\n"; -} - ?> --EXPECT-- array(1) { @@ -84,4 +78,3 @@ array(4) { [3]=> float(2) } -array_pad(): Argument #2 ($length) must be less than or equal to 1048576 diff --git a/ext/standard/tests/array/array_pad_too_large_padding.phpt b/ext/standard/tests/array/array_pad_too_large_padding.phpt new file mode 100644 index 0000000000000..3a45e834f9a01 --- /dev/null +++ b/ext/standard/tests/array/array_pad_too_large_padding.phpt @@ -0,0 +1,20 @@ +--TEST-- +array_pad() with too large padding should fail +--FILE-- +getMessage() . "\n"; + } +} + +test(PHP_INT_MIN); +test(PHP_INT_MAX); + +?> +--EXPECT-- +array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size +array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size From 2a5c03cd722832bb323e248a9e226286b33b1184 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 14 Jan 2023 12:19:35 +0100 Subject: [PATCH 187/895] [ci skip] NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 91bb3fb7a13f5..7b4bdcab346c7 100644 --- a/NEWS +++ b/NEWS @@ -90,6 +90,7 @@ PHP NEWS - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) + . Make array_pad's $length warning less confusing. (nielsdos) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. From a493da7b9d4e9f7d0b38d118aebcede094096b83 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 14 Jan 2023 13:43:26 +0100 Subject: [PATCH 188/895] Fix typo in HAVE_ macro (#10310) --- Zend/zend_call_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_call_stack.h b/Zend/zend_call_stack.h index d73c333eeeae2..c71395bd6d42c 100644 --- a/Zend/zend_call_stack.h +++ b/Zend/zend_call_stack.h @@ -40,7 +40,7 @@ ZEND_API bool zend_call_stack_get(zend_call_stack *stack); static zend_always_inline void *zend_call_stack_position(void) { #ifdef ZEND_WIN32 return _AddressOfReturnAddress(); -#elif HAVE_BUILTIN_FRAME_ADDRESS +#elif PHP_HAVE_BUILTIN_FRAME_ADDRESS return __builtin_frame_address(0); #else void *a; From 7d98e3e40c12dacd882835bce76e4f235ef4bba7 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sat, 14 Jan 2023 15:13:43 +0000 Subject: [PATCH 189/895] Fix missing comment in FPM www.conf.in --- sapi/fpm/www.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/fpm/www.conf.in b/sapi/fpm/www.conf.in index 64da6bce1f0e9..4b8eb7caa3a37 100644 --- a/sapi/fpm/www.conf.in +++ b/sapi/fpm/www.conf.in @@ -22,7 +22,7 @@ ; The user and group can be specified either by their name or by their numeric ; IDs. ; Note: If the user is root, the executable needs to be started with - --allow-to-run-as-root option to work. +; --allow-to-run-as-root option to work. ; Default Values: The user is set to master process running user by default. ; If the group is not set, the user's group is used. user = @php_fpm_user@ From e951202a697b23c26867c92e34eb4c25d9346a44 Mon Sep 17 00:00:00 2001 From: Niels <7771979+nielsdos@users.noreply.github.com> Date: Sun, 15 Jan 2023 00:32:51 +0100 Subject: [PATCH 190/895] Remove useless check, search_str is always true here (#10322) --- ext/standard/string.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 4f48753762efc..8696ad8e6386d 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4141,9 +4141,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, bool case_sensi /* Make sure we're dealing with strings and do the replacement. */ if (search_str && replace_ht) { - zend_argument_type_error(2, "must be of type %s when argument #1 ($search) is %s", - search_str ? "string" : "array", search_str ? "a string" : "an array" - ); + zend_argument_type_error(2, "must be of type string when argument #1 ($search) is a string"); RETURN_THROWS(); } From a60c6ee0ac6e055cc37c5192d6bb18c180613c23 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 15 Jan 2023 15:51:31 +0100 Subject: [PATCH 191/895] Mark constant static arrays in function bodies actually as const (#10325) --- Zend/zend_strtod.c | 2 +- ext/hash/hash_snefru.c | 2 +- ext/iconv/iconv.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 3e7f90378ef5e..8a59196285080 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -959,7 +959,7 @@ pow5mult { Bigint *b1, *p5, *p51; int i; - static int p05[3] = { 5, 25, 125 }; + static const int p05[3] = { 5, 25, 125 }; if ((i = k & 3)) b = multadd(b, p05[i-1], 0); diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c index ee024652314b8..c1dbc3ae57a6c 100644 --- a/ext/hash/hash_snefru.c +++ b/ext/hash/hash_snefru.c @@ -39,7 +39,7 @@ void ph(uint32_t h[16]) static inline void Snefru(uint32_t input[16]) { - static int shifts[4] = {16, 8, 16, 24}; + static const int shifts[4] = {16, 8, 16, 24}; int b, index, rshift, lshift; const uint32_t *t0,*t1; uint32_t SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15; diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index c0286de7bb1ec..e61c448c305f8 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -906,7 +906,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn char *out_p; size_t out_left; zend_string *encoded = NULL; - static int qp_table[256] = { + static const int qp_table[256] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x00 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 */ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x20 */ From 4069a5c43f419d76e1254c8e49b4cad9968a408f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 12 Jan 2023 19:49:38 +0100 Subject: [PATCH 192/895] Zend/zend_execute: always include zend_globals.h Commit ecc880f491d was incomplete; EG() is used in inline functions outside of ZEND_DEBUG. --- Zend/zend_execute.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 40dc4b87f9b58..e232b31c99de4 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -22,15 +22,12 @@ #define ZEND_EXECUTE_H #include "zend_compile.h" // for zend_op_array +#include "zend_globals.h" // for struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() #include "zend_list.h" // for zend_rsrc_list_get_rsrc_type() #include "zend_portability.h" // for BEGIN_EXTERN_C #include "zend_types.h" // for zend_execute_data -#if ZEND_DEBUG -#include "zend_globals.h" // for struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() -#endif - BEGIN_EXTERN_C() struct _zend_fcall_info; ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data); From d44e9680f080b4918cfed268b96f90ea35975617 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 12 Jan 2023 17:03:36 +0100 Subject: [PATCH 193/895] ext/opcache/ZendAccelerator.h: add missing include for "INIT_FUNC_ARGS" --- ext/opcache/ZendAccelerator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 6ecc2c2bc9df1..5cda73bb1d6f1 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -50,6 +50,7 @@ #include "zend_extensions.h" #include "zend_compile.h" +#include "zend_modules.h" // for INIT_FUNC_ARGS #include "Optimizer/zend_optimizer.h" #include "zend_accelerator_hash.h" From 4c31b7888a561e920fd3889ba8d99368f3c2d9e6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:34:59 +0100 Subject: [PATCH 194/895] Zend/zend_globals_macros: add missing include for BEGIN_EXTERN_C --- Zend/zend_globals_macros.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h index 59b3daca53fd4..60e8def86d5a7 100644 --- a/Zend/zend_globals_macros.h +++ b/Zend/zend_globals_macros.h @@ -20,6 +20,8 @@ #ifndef ZEND_GLOBALS_MACROS_H #define ZEND_GLOBALS_MACROS_H +#include "zend_portability.h" // for BEGIN_EXTERN_C + typedef struct _zend_compiler_globals zend_compiler_globals; typedef struct _zend_executor_globals zend_executor_globals; typedef struct _zend_php_scanner_globals zend_php_scanner_globals; From 184b4a12d3215d105720d005b31e365249e2eb21 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:34:59 +0100 Subject: [PATCH 195/895] main/php.h: add missing includes --- main/php.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/php.h b/main/php.h index b7101ed22f0a6..cb1ab5ea7c8e1 100644 --- a/main/php.h +++ b/main/php.h @@ -29,6 +29,8 @@ #include "php_version.h" #include "zend.h" +#include "zend_arena.h" +#include "zend_objects.h" #include "zend_sort.h" #include "php_compat.h" From 6b55bf228cb2da8705737d414f394950a92d8aae Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 21:12:08 +0100 Subject: [PATCH 196/895] Zend/zend_language_scanner: include cleanup --- Zend/zend_language_scanner.h | 8 ++++++++ Zend/zend_language_scanner.l | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index ca32329a557f2..c93b0fea56edb 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -20,6 +20,14 @@ #ifndef ZEND_SCANNER_H #define ZEND_SCANNER_H +#include "zend_globals.h" // for zend_php_scanner_event +#include "zend_multibyte.h" // for zend_encoding_filter +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_ptr_stack.h" +#include "zend_stack.h" + +typedef struct _zend_file_handle zend_file_handle; + typedef struct _zend_lex_state { unsigned int yy_leng; unsigned char *yy_start; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index c73a50948d6bc..c1ba518ddfba7 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -27,6 +27,7 @@ # define YYDEBUG(s, c) #endif +#include "zend_language_scanner.h" #include "zend_language_scanner_defs.h" #include @@ -35,9 +36,9 @@ # include #endif #include "zend_alloc.h" +#include "zend_arena.h" #include #include "zend_compile.h" -#include "zend_language_scanner.h" #include "zend_highlight.h" #include "zend_constants.h" #include "zend_variables.h" From 5190e5c260ee05e3f3c3d1168263a1a6637441d0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:24:12 +0100 Subject: [PATCH 197/895] Zend/zend_ast: include cleanup --- Zend/zend_ast.c | 10 +++++----- Zend/zend_ast.h | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 70646856d3a11..0581714ab1ed2 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -18,13 +18,13 @@ */ #include "zend_ast.h" -#include "zend_API.h" -#include "zend_operators.h" -#include "zend_language_parser.h" -#include "zend_smart_str.h" -#include "zend_exceptions.h" +#include "zend_API.h" // for array_set_zval_key +#include "zend_arena.h" #include "zend_constants.h" #include "zend_enum.h" +#include "zend_language_parser.h" // for T_* +#include "zend_smart_str.h" +#include "zend_exceptions.h" // for zend_throw_error ZEND_API zend_ast_process_t zend_ast_process = NULL; diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index b5df2a55a2098..7fc6bef28963d 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -21,7 +21,9 @@ #ifndef ZEND_AST_H #define ZEND_AST_H -#include "zend.h" +#include "zend_types.h" // for zval + +#include #ifndef ZEND_AST_SPEC # define ZEND_AST_SPEC 1 From 05c7653bba7571852f5ce6fc0d220a1a829bc4c0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:20:23 +0100 Subject: [PATCH 198/895] Zend/zend_call_stack: include cleanup --- Zend/zend_call_stack.c | 6 +++--- Zend/zend_call_stack.h | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c index dadaa60dcb208..738dfbec51727 100644 --- a/Zend/zend_call_stack.c +++ b/Zend/zend_call_stack.c @@ -18,11 +18,11 @@ /* Inspired from Chromium's stack_util.cc */ -#include "zend.h" -#include "zend_globals.h" -#include "zend_portability.h" #include "zend_call_stack.h" +#include "zend_globals.h" + #include + #ifdef ZEND_WIN32 # include # include diff --git a/Zend/zend_call_stack.h b/Zend/zend_call_stack.h index c71395bd6d42c..96c0220525bb0 100644 --- a/Zend/zend_call_stack.h +++ b/Zend/zend_call_stack.h @@ -19,12 +19,14 @@ #ifndef ZEND_CALL_STACK_H #define ZEND_CALL_STACK_H -#include "zend.h" -#include "zend_portability.h" +#include "zend_portability.h" // for zend_always_inline + #ifdef __APPLE__ # include #endif +#include + #ifdef ZEND_CHECK_STACK_LIMIT typedef struct _zend_call_stack { From 29b2dc89645e741f91cc920964432dccd2aaef14 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:24:56 +0100 Subject: [PATCH 199/895] Zend/zend_iterators: include cleanup --- Zend/zend_iterators.c | 6 ++++-- Zend/zend_iterators.h | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index f67033b11161c..fd5a0895b2a05 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -17,8 +17,10 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_API.h" +#include "zend_iterators.h" +#include "zend_objects.h" +#include "zend_object_handlers.h" +#include "zend_API.h" // for INIT_CLASS_ENTRY static zend_class_entry zend_iterator_class_entry; diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h index 5e7451f7eacc7..98337961948f9 100644 --- a/Zend/zend_iterators.h +++ b/Zend/zend_iterators.h @@ -17,6 +17,11 @@ +----------------------------------------------------------------------+ */ +#ifndef ZEND_ITERATORS_H +#define ZEND_ITERATORS_H + +#include "zend_types.h" // for zval + /* These iterators were designed to operate within the foreach() * structures provided by the engine, but could be extended for use * with other iterative engine opcodes. @@ -89,3 +94,5 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter); ZEND_API void zend_register_iterator_wrapper(void); END_EXTERN_C() + +#endif /* ZEND_ITERATORS_H */ From 72dd94e1c6d29203b8f6473317f626e6d6d6fbdc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 09:21:39 +0100 Subject: [PATCH 200/895] Zend/zend_compile: include cleanup --- Zend/zend_compile.c | 28 ++++++++++++++-------------- Zend/zend_compile.h | 10 ++++------ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4cb9b9c85305b..166d94dc0dd6c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -18,23 +18,23 @@ +----------------------------------------------------------------------+ */ -#include -#include "zend.h" -#include "zend_attributes.h" #include "zend_compile.h" +#include "zend_API.h" // for zend_get_object_type() +#include "zend_arena.h" +#include "zend_attributes.h" #include "zend_constants.h" -#include "zend_llist.h" -#include "zend_API.h" -#include "zend_exceptions.h" -#include "zend_interfaces.h" -#include "zend_virtual_cwd.h" -#include "zend_multibyte.h" -#include "zend_language_scanner.h" -#include "zend_inheritance.h" -#include "zend_vm.h" #include "zend_enum.h" -#include "zend_observer.h" -#include "zend_call_stack.h" +#include "zend_exceptions.h" // for zend_throw_exception_ex() +#include "zend_globals.h" // struct _zend_compiler_globals +#include "zend_globals_macros.h" // for CG() +#include "zend_inheritance.h" // for zend_do_link_class() +#include "zend_language_parser.h" +#include "zend_language_scanner.h" +#include "zend_list.h" // for zend_init_rsrc_list() +#include "zend_observer.h" // for zend_observer_function_declared_notify() +#include "zend_type_info.h" // for MAY_BE_* +#include "zend_virtual_cwd.h" // for IS_SLASH_P, DEFAULT_SLASH +#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER() #define SET_NODE(target, src) do { \ target ## _type = (src)->op_type; \ diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index fa9e582869fbd..6f7a7d42101cd 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -20,12 +20,12 @@ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H -#include "zend.h" +#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS #include "zend_ast.h" +#include "zend_portability.h" //for ZEND_FASTCALL +#include "zend_types.h" // for zend_uchar -#include - -#include "zend_llist.h" +#include #define SET_UNUSED(op) do { \ op ## _type = IS_UNUSED; \ @@ -758,8 +758,6 @@ struct _zend_execute_data { #define ZEND_EXTRA_VALUE 1 -#include "zend_globals.h" - typedef enum _zend_compile_position { ZEND_COMPILE_POSITION_AT_SHEBANG = 0, ZEND_COMPILE_POSITION_AT_OPEN_TAG, From a93f264526e1cdade71d887800c1c448c411bfdc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:35:48 +0100 Subject: [PATCH 201/895] Zend/zend_weakrefs: include cleanup --- Zend/zend_weakrefs.c | 6 +++--- Zend/zend_weakrefs.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index db95b13a7254a..19cbe6fa37ef6 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -14,11 +14,11 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_interfaces.h" -#include "zend_objects_API.h" #include "zend_weakrefs.h" +#include "zend_API.h" // for ZEND_BEGIN_ARG_INFO_EX +#include "zend_objects.h" // for zend_object_std_init() #include "zend_weakrefs_arginfo.h" +#include "zend_interfaces.h" // for zend_create_internal_iterator_zval() typedef struct _zend_weakref { zend_object *referent; diff --git a/Zend/zend_weakrefs.h b/Zend/zend_weakrefs.h index 506e2e9d40c5c..6e3f108646c3a 100644 --- a/Zend/zend_weakrefs.h +++ b/Zend/zend_weakrefs.h @@ -17,7 +17,8 @@ #ifndef ZEND_WEAKREFS_H #define ZEND_WEAKREFS_H -#include "zend_alloc.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for zval BEGIN_EXTERN_C() From 0961715cdafb5d39124667ff94f3b56453ce71f1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:27:41 +0100 Subject: [PATCH 202/895] Zend/zend_enum: include cleanup --- Zend/zend_enum.c | 10 +++++----- Zend/zend_enum.h | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index 3e455b702cbf2..11c62d83e1a73 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -16,13 +16,13 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_API.h" -#include "zend_compile.h" +#include "zend_enum.h" +#include "zend_arena.h" // ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2 +#include "zend_API.h" // for INIT_CLASS_ENTRY_EX() #include "zend_enum_arginfo.h" #include "zend_interfaces.h" -#include "zend_enum.h" -#include "zend_extensions.h" +#include "zend_extensions.h" // for zend_internal_run_time_cache_reserved_size() +#include "zend_objects.h" // for zend_objects_new() #include "zend_observer.h" #define ZEND_ENUM_DISALLOW_MAGIC_METHOD(propertyName, methodName) \ diff --git a/Zend/zend_enum.h b/Zend/zend_enum.h index dbb230c4175c3..895100f09229f 100644 --- a/Zend/zend_enum.h +++ b/Zend/zend_enum.h @@ -19,8 +19,11 @@ #ifndef ZEND_ENUM_H #define ZEND_ENUM_H -#include "zend.h" -#include "zend_types.h" +#include "zend_compile.h" // for OBJ_PROP_NUM +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_function_entry zend_function_entry; BEGIN_EXTERN_C() From fc1f528e5e3ee45ab17ae8dcfad6a6422ff2002d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:22:28 +0100 Subject: [PATCH 203/895] Zend/zend_interfaces: include cleanup --- Zend/zend_interfaces.c | 4 +++- Zend/zend_interfaces.h | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index d05310b737b01..52cc476578bd8 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -16,11 +16,13 @@ +----------------------------------------------------------------------+ */ +#include "zend_interfaces.h" #include "zend.h" #include "zend_API.h" -#include "zend_interfaces.h" +#include "zend_arena.h" #include "zend_exceptions.h" #include "zend_interfaces_arginfo.h" +#include "zend_objects.h" // for zend_object_std_init() ZEND_API zend_class_entry *zend_ce_traversable; ZEND_API zend_class_entry *zend_ce_aggregate; diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index 883e482f510c4..e8291213d7fbd 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -19,8 +19,12 @@ #ifndef ZEND_INTERFACES_H #define ZEND_INTERFACES_H -#include "zend.h" -#include "zend_API.h" +#include "zend_iterators.h" // for zend_object_iterator +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_serialize_data zend_serialize_data; +typedef struct _zend_unserialize_data zend_unserialize_data; BEGIN_EXTERN_C() From 921274d2b8966641a00c0a767ae40ba7187bdffc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:42:10 +0100 Subject: [PATCH 204/895] Zend/zend_observer: include cleanup --- Zend/zend_observer.c | 6 +++--- Zend/zend_observer.h | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Zend/zend_observer.c b/Zend/zend_observer.c index 79929bfdd80e5..7ff183f0efacf 100644 --- a/Zend/zend_observer.c +++ b/Zend/zend_observer.c @@ -18,10 +18,10 @@ */ #include "zend_observer.h" - -#include "zend_extensions.h" +#include "zend_fibers.h" +#include "zend_extensions.h" // for zend_get_op_array_extension_handles() #include "zend_llist.h" -#include "zend_vm.h" +#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER() #define ZEND_OBSERVER_DATA(function) \ ZEND_OP_ARRAY_EXTENSION((&(function)->common), zend_observer_fcall_op_array_extension) diff --git a/Zend/zend_observer.h b/Zend/zend_observer.h index fc4d9a62c8905..8c5b20b3495d5 100644 --- a/Zend/zend_observer.h +++ b/Zend/zend_observer.h @@ -20,9 +20,15 @@ #ifndef ZEND_OBSERVER_H #define ZEND_OBSERVER_H -#include "zend.h" -#include "zend_compile.h" -#include "zend_fibers.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_execute_data zend_execute_data; +typedef struct _zend_fiber_context zend_fiber_context; +typedef union _zend_function zend_function; +typedef struct _zend_op_array zend_op_array; +typedef struct _zend_string zend_string; +typedef struct _zval_struct zval; BEGIN_EXTERN_C() From 7e87551c3775d26e20b06a4032a00053db6452cc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:48:55 +0100 Subject: [PATCH 205/895] Zend/zend_llist: include cleanup --- Zend/zend_llist.c | 2 +- Zend/zend_llist.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 8c42b2494ea08..cdc018ae62789 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -17,8 +17,8 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" #include "zend_llist.h" +#include "zend_alloc.h" //for pemalloc() #include "zend_sort.h" ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent) diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h index cce5ad5ce95a7..e68be3cb20115 100644 --- a/Zend/zend_llist.h +++ b/Zend/zend_llist.h @@ -20,6 +20,8 @@ #ifndef ZEND_LLIST_H #define ZEND_LLIST_H +#include "zend_portability.h" // for BEGIN_EXTERN_C + typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; From e883ba93c40827fafd7868517eb48e04569f76ab Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:54:16 +0100 Subject: [PATCH 206/895] Zend/zend_gc: include cleanup --- Zend/zend_gc.c | 11 ++++++++--- Zend/zend_gc.h | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 66324672b1e9c..ccd75a0706b3b 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -66,9 +66,14 @@ * * @see http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf */ -#include "zend.h" -#include "zend_API.h" -#include "zend_fibers.h" + +#include "zend_gc.h" +#include "zend_alloc.h" // for ZEND_MM_OVERHEAD +#include "zend_fibers.h" // for zend_fiber_switch_block() +#include "zend_globals.h" // for struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() +#include "zend_objects.h" // for zend_objects_destroy_object() +#include "zend.h" // for zend_error() #ifndef GC_BENCH # define GC_BENCH 0 diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index 0589e193f4a16..0ee7e38460e7c 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -20,6 +20,9 @@ #ifndef ZEND_GC_H #define ZEND_GC_H +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_types.h" // for GC_TYPE_INFO() + BEGIN_EXTERN_C() typedef struct _zend_gc_status { From f15747c26be4a2330dc0cf3ea442f53f30f84cac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Jan 2023 20:50:15 +0100 Subject: [PATCH 207/895] Zend/zend_objects: include cleanup --- Zend/zend_objects.c | 15 ++++++++------- Zend/zend_objects.h | 5 ++++- Zend/zend_objects_API.c | 3 ++- Zend/zend_objects_API.h | 8 ++++++-- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index df76fa0bb8dc3..f82f577df5124 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -18,13 +18,14 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_globals.h" -#include "zend_variables.h" -#include "zend_API.h" -#include "zend_interfaces.h" -#include "zend_exceptions.h" -#include "zend_weakrefs.h" +#include "zend_objects.h" +#include "zend_objects_API.h" +#include "zend_exceptions.h" // for zend_rethrow_exception() +#include "zend_execute.h" // for ZEND_REF_HAS_TYPE_SOURCES +#include "zend_types.h" // for GC_SET_REFCOUNT() +#include "zend_weakrefs.h" // for zend_weakrefs_notify() +#include "zend.h" // for struct _zend_class_entry +#include "zend_API.h" // for zend_call_known_instance_method_with_0_params() static zend_always_inline void _zend_object_std_init(zend_object *object, zend_class_entry *ce) { diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index 91d388154dd13..c998e9c60a297 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -20,7 +20,10 @@ #ifndef ZEND_OBJECTS_H #define ZEND_OBJECTS_H -#include "zend.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_object zend_object; BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce); diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 80f5b747db710..140219c077790 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -18,11 +18,12 @@ +----------------------------------------------------------------------+ */ +#include "zend_objects_API.h" +#include "zend_objects.h" // for zend_objects_destroy_object() #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" #include "zend_API.h" -#include "zend_objects_API.h" #include "zend_fibers.h" ZEND_API void ZEND_FASTCALL zend_objects_store_init(zend_objects_store *objects, uint32_t init_size) diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index 7a9a3a00082c0..c643a250ce758 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -20,8 +20,12 @@ #ifndef ZEND_OBJECTS_API_H #define ZEND_OBJECTS_API_H -#include "zend.h" -#include "zend_compile.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_gc.h" // for GC_MAY_LEAK +#include "zend_compile.h" // for ZEND_ACC_USE_GUARDS +#include "zend.h" // for _zend_class_entry + +typedef struct _zend_object zend_object; #define OBJ_BUCKET_INVALID (1<<0) From 9b9ea0d7c696f2990a159b2a2dafbc04547dc10f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 09:01:24 +0100 Subject: [PATCH 208/895] Zend/zend_list: include cleanup --- Zend/zend_list.c | 8 +++++--- Zend/zend_list.h | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 51ef3e1d92eb3..6b2742c6808d5 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -19,10 +19,12 @@ /* resource lists */ -#include "zend.h" #include "zend_list.h" -#include "zend_API.h" -#include "zend_globals.h" +#include "zend_execute.h" // for get_active_class_name() +#include "zend_globals.h" // for struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() +#include "zend_hash.h" +#include "zend_types.h" // for zval ZEND_API int le_index_ptr; diff --git a/Zend/zend_list.h b/Zend/zend_list.h index 680915121e2a6..643abe65023c3 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -20,8 +20,12 @@ #ifndef ZEND_LIST_H #define ZEND_LIST_H -#include "zend_hash.h" -#include "zend_globals.h" +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_array HashTable; +typedef struct _zend_resource zend_resource; +typedef struct _zend_string zend_string; +typedef struct _zval_struct zval; BEGIN_EXTERN_C() From ef7fbfd71025f034b0bfcb413efd181ce798fc1b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 10:33:43 +0100 Subject: [PATCH 209/895] Zend/zend_API: include cleanup --- Zend/zend_API.c | 8 +++----- Zend/zend_API.h | 12 ++++++------ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c06d6119b7aff..6c42d274c0db6 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -19,15 +19,13 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_execute.h" #include "zend_API.h" -#include "zend_modules.h" +#include "zend_arena.h" +#include "zend_objects.h" // for zend_objects_new() #include "zend_extensions.h" #include "zend_constants.h" -#include "zend_interfaces.h" +#include "zend_interfaces.h" // for zend_ce_stringable #include "zend_exceptions.h" -#include "zend_closures.h" #include "zend_inheritance.h" #include "zend_ini.h" #include "zend_enum.h" diff --git a/Zend/zend_API.h b/Zend/zend_API.h index cbc455eaab0b5..44ea4eaf8783d 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -22,13 +22,13 @@ #ifndef ZEND_API_H #define ZEND_API_H -#include "zend_modules.h" -#include "zend_list.h" -#include "zend_operators.h" -#include "zend_variables.h" -#include "zend_execute.h" -#include "zend_type_info.h" +#include "zend_compile.h" // for zif_handler +#include "zend_execute.h" // for get_active_function_or_method_name() +#include "zend_globals.h" // for struct _zend_compiler_globals used by ZEND_MAP_PTR_GET_IMM() +#include "zend_globals_macros.h" // for CG() used by ZEND_MAP_PTR_GET_IMM() +#include "zend_portability.h" // for BEGIN_EXTERN_C +typedef struct _zend_module_entry zend_module_entry; BEGIN_EXTERN_C() From 45384c6e201eda9963e2fcc18946a9446230a2d6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 10:30:57 +0100 Subject: [PATCH 210/895] Zend/zend_inheritance: include cleanup --- Zend/zend_inheritance.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b45c16ef91525..29141125a59a7 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -18,6 +18,7 @@ */ #include "zend.h" +#include "zend_arena.h" #include "zend_API.h" #include "zend_compile.h" #include "zend_execute.h" From 68ada76f9a659745f572539b72afa06fa75a866f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Jan 2023 10:09:39 +0100 Subject: [PATCH 211/895] Zend/zend_closures: include cleanup --- Zend/zend_closures.c | 11 ++++------- Zend/zend_closures.h | 9 +++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 4c326a6c79b12..03601ce3fc781 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -18,14 +18,11 @@ +----------------------------------------------------------------------+ */ -#include "zend.h" -#include "zend_API.h" #include "zend_closures.h" -#include "zend_exceptions.h" -#include "zend_interfaces.h" -#include "zend_objects.h" -#include "zend_objects_API.h" -#include "zend_globals.h" +#include "zend_API.h" //for ZEND_METHOD() +#include "zend_arena.h" +#include "zend_compile.h" // for union _zend_function +#include "zend_objects.h" // for zend_object_std_init() #include "zend_closures_arginfo.h" typedef struct _zend_closure { diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h index 2d093fa616800..40cb0a36ca3f6 100644 --- a/Zend/zend_closures.h +++ b/Zend/zend_closures.h @@ -20,6 +20,15 @@ #ifndef ZEND_CLOSURES_H #define ZEND_CLOSURES_H +#include "zend_portability.h" // for BEGIN_EXTERN_C + +typedef struct _zend_class_entry zend_class_entry; +typedef struct _zend_execute_data zend_execute_data; +typedef union _zend_function zend_function; +typedef struct _zend_object zend_object; +typedef struct _zend_string zend_string; +typedef struct _zval_struct zval; + BEGIN_EXTERN_C() /* This macro depends on zend_closure structure layout */ From 4bbbe6d6525165f6fd74b7ae59fdf5ec08278816 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 14 Jan 2023 21:01:22 +0100 Subject: [PATCH 212/895] Fix substr_replace with slots in repl_ht being UNDEF The check that was supposed to check whether the array slot was UNDEF was wrong and never triggered. This resulted in a replacement with the empty string or the wrong string instead of the correct one. The correct check pattern can be observed higher up in the function's code. Closes GH-10323 Signed-off-by: George Peter Banyard --- NEWS | 1 + ext/standard/string.c | 2 +- .../strings/substr_replace_array_unset.phpt | 27 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/strings/substr_replace_array_unset.phpt diff --git a/NEWS b/NEWS index 4145102b3388e..9b57198a8db4f 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,7 @@ PHP NEWS - Standard: . Fix GH-10187 (Segfault in stripslashes() with arm64). (nielsdos) + . Fix substr_replace with slots in repl_ht being UNDEF. (nielsdos) - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) diff --git a/ext/standard/string.c b/ext/standard/string.c index e171448f243e1..643094263bfcb 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2472,7 +2472,7 @@ PHP_FUNCTION(substr_replace) if (repl_ht) { while (repl_idx < repl_ht->nNumUsed) { tmp_repl = &repl_ht->arData[repl_idx].val; - if (repl_ht != IS_UNDEF) { + if (Z_TYPE_P(tmp_repl) != IS_UNDEF) { break; } repl_idx++; diff --git a/ext/standard/tests/strings/substr_replace_array_unset.phpt b/ext/standard/tests/strings/substr_replace_array_unset.phpt new file mode 100644 index 0000000000000..ff253d3984476 --- /dev/null +++ b/ext/standard/tests/strings/substr_replace_array_unset.phpt @@ -0,0 +1,27 @@ +--TEST-- +substr_replace() function - array with unset +--FILE-- + 'bar', 'baz']; +unset($replacement[42]); +$newarr = substr_replace(['1 string', '2 string'], $replacement, 0); +print_r($newarr); + +?> +--EXPECT-- +Array +( + [0] => A + [1] => B +) +Array +( + [0] => foo + [1] => baz +) From 11a1feb0d767ecd3946fcf361185fe04c1b7a135 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 14 Jan 2023 23:38:38 +0100 Subject: [PATCH 213/895] Fix missing check for xmlTextWriterEndElement xmlTextWriterEndElement returns -1 if the call fails. There was already a check for retval, but the return value wasn't assigned to retval. The other caller of xmlTextWriterEndElement is in xmlwriter_write_element_ns, which does the check correctly. Closes GH-10324 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/xmlwriter/php_xmlwriter.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9b57198a8db4f..88c58842899b3 100644 --- a/NEWS +++ b/NEWS @@ -53,6 +53,9 @@ PHP NEWS - TSRM: . Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre) +- XMLWriter + . Fix missing check for xmlTextWriterEndElement (nielsdos) + 05 Jan 2023, PHP 8.1.14 - Core: diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index e9a3dff2781f5..24ce414034af5 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -449,7 +449,7 @@ PHP_FUNCTION(xmlwriter_write_element) if (retval == -1) { RETURN_FALSE; } - xmlTextWriterEndElement(ptr); + retval = xmlTextWriterEndElement(ptr); if (retval == -1) { RETURN_FALSE; } From 347b7c3628e0d2be87a05d8760124c9c71f29d51 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 15 Jan 2023 15:05:36 +0100 Subject: [PATCH 214/895] Fix wrong flags check for compression method in phar_object.c I found this issue using static analysis tools, it reported that the condition was always false. We can see that flags is assigned in the switch statement above, but a mistake was made in the comparison. Closes GH-10328 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/phar/phar_object.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 88c58842899b3..5c5cd7e73a1dc 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,9 @@ PHP NEWS . Fix zend_jit_find_trace() crashes. (Max Kellermann) . Added missing lock for EXIT_INVALIDATE in zend_jit_trace_exit. (Max Kellermann) +- Phar: + . Fix wrong flags check for compression method in phar_object.c (nielsdos) + - PHPDBG: . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) . Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 448d03b7cc75e..e32b530b82297 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -3312,7 +3312,7 @@ PHP_METHOD(Phar, compressFiles) } if (!pharobj_cancompress(&phar_obj->archive->manifest)) { - if (flags == PHAR_FILE_COMPRESSED_GZ) { + if (flags == PHAR_ENT_COMPRESSED_GZ) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot compress all files as Gzip, some are compressed as bzip2 and cannot be decompressed"); } else { From c177ea91d42472b27bd7b2b083e30c250d85dc0c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 5 Jan 2023 13:34:04 +0000 Subject: [PATCH 215/895] Move http_build_query() tests to the HTTP test folder --- .../tests/{strings => http/http_build_query}/bug26817.phpt | 0 .../tests/{strings => http/http_build_query}/bug26819.phpt | 0 .../tests/{strings => http/http_build_query}/bug77608.phpt | 0 .../{strings => http/http_build_query}/http_build_query.phpt | 0 .../http_build_query}/http_build_query_variation1.phpt | 0 .../http_build_query}/http_build_query_variation2.phpt | 0 .../http_build_query}/http_build_query_variation3.phpt | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename ext/standard/tests/{strings => http/http_build_query}/bug26817.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/bug26819.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/bug77608.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/http_build_query.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/http_build_query_variation1.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/http_build_query_variation2.phpt (100%) rename ext/standard/tests/{strings => http/http_build_query}/http_build_query_variation3.phpt (100%) diff --git a/ext/standard/tests/strings/bug26817.phpt b/ext/standard/tests/http/http_build_query/bug26817.phpt similarity index 100% rename from ext/standard/tests/strings/bug26817.phpt rename to ext/standard/tests/http/http_build_query/bug26817.phpt diff --git a/ext/standard/tests/strings/bug26819.phpt b/ext/standard/tests/http/http_build_query/bug26819.phpt similarity index 100% rename from ext/standard/tests/strings/bug26819.phpt rename to ext/standard/tests/http/http_build_query/bug26819.phpt diff --git a/ext/standard/tests/strings/bug77608.phpt b/ext/standard/tests/http/http_build_query/bug77608.phpt similarity index 100% rename from ext/standard/tests/strings/bug77608.phpt rename to ext/standard/tests/http/http_build_query/bug77608.phpt diff --git a/ext/standard/tests/strings/http_build_query.phpt b/ext/standard/tests/http/http_build_query/http_build_query.phpt similarity index 100% rename from ext/standard/tests/strings/http_build_query.phpt rename to ext/standard/tests/http/http_build_query/http_build_query.phpt diff --git a/ext/standard/tests/strings/http_build_query_variation1.phpt b/ext/standard/tests/http/http_build_query/http_build_query_variation1.phpt similarity index 100% rename from ext/standard/tests/strings/http_build_query_variation1.phpt rename to ext/standard/tests/http/http_build_query/http_build_query_variation1.phpt diff --git a/ext/standard/tests/strings/http_build_query_variation2.phpt b/ext/standard/tests/http/http_build_query/http_build_query_variation2.phpt similarity index 100% rename from ext/standard/tests/strings/http_build_query_variation2.phpt rename to ext/standard/tests/http/http_build_query/http_build_query_variation2.phpt diff --git a/ext/standard/tests/strings/http_build_query_variation3.phpt b/ext/standard/tests/http/http_build_query/http_build_query_variation3.phpt similarity index 100% rename from ext/standard/tests/strings/http_build_query_variation3.phpt rename to ext/standard/tests/http/http_build_query/http_build_query_variation3.phpt From ec7c7a7550bb94d47a9afc14895d2463dec6c243 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 5 Jan 2023 14:09:25 +0000 Subject: [PATCH 216/895] Add more tests for http_build_query() Some with unusual types like resource and null A lot more tests for objects --- .../http_build_query_object_basic.phpt | 17 ++++++++++++++ .../http_build_query_object_empty.phpt | 11 ++++++++++ ...tp_build_query_object_just_stringable.phpt | 22 +++++++++++++++++++ ...build_query_object_key_val_stringable.phpt | 20 +++++++++++++++++ .../http_build_query_object_nested.phpt | 20 +++++++++++++++++ .../http_build_query_object_recursif.phpt | 17 ++++++++++++++ .../http_build_query_with_null.phpt | 8 +++++++ .../http_build_query_with_references.phpt | 11 ++++++++++ .../http_build_query_with_resource.phpt | 8 +++++++ 9 files changed, 134 insertions(+) create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_basic.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_empty.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_just_stringable.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_key_val_stringable.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_nested.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_object_recursif.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_with_null.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_with_references.phpt create mode 100644 ext/standard/tests/http/http_build_query/http_build_query_with_resource.phpt diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_basic.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_basic.phpt new file mode 100644 index 0000000000000..91bb8fc622957 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_basic.phpt @@ -0,0 +1,17 @@ +--TEST-- +http_build_query() function with object +--FILE-- + +--EXPECT-- +string(12) "public=input" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_empty.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_empty.phpt new file mode 100644 index 0000000000000..7aca03df4a66a --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_empty.phpt @@ -0,0 +1,11 @@ +--TEST-- +http_build_query() function with empty object +--FILE-- + +--EXPECT-- +string(0) "" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_just_stringable.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_just_stringable.phpt new file mode 100644 index 0000000000000..4c65547b81c8b --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_just_stringable.phpt @@ -0,0 +1,22 @@ +--TEST-- +http_build_query() function with object that is just stringable (GH-10229) +--FILE-- + +--EXPECT-- +string(7) "0=hello" +string(0) "" +string(14) "prefix_0=hello" +string(0) "" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_key_val_stringable.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_key_val_stringable.phpt new file mode 100644 index 0000000000000..2a738df362ae3 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_key_val_stringable.phpt @@ -0,0 +1,20 @@ +--TEST-- +http_build_query() function with recursif object +--FILE-- + +--EXPECT-- +string(12) "public=input" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_nested.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_nested.phpt new file mode 100644 index 0000000000000..125327f0af002 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_nested.phpt @@ -0,0 +1,20 @@ +--TEST-- +http_build_query() function with nested object +--FILE-- +public = $nested; + +// Percent encoded "public[public]=input" +var_dump(http_build_query($o)); +?> +--EXPECT-- +string(24) "public%5Bpublic%5D=input" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_object_recursif.phpt b/ext/standard/tests/http/http_build_query/http_build_query_object_recursif.phpt new file mode 100644 index 0000000000000..ec415fc115b42 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_object_recursif.phpt @@ -0,0 +1,17 @@ +--TEST-- +http_build_query() function with recursif object +--FILE-- +public = $o; + +var_dump(http_build_query($o)); +?> +--EXPECT-- +string(0) "" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_with_null.phpt b/ext/standard/tests/http/http_build_query/http_build_query_with_null.phpt new file mode 100644 index 0000000000000..3bcd1d0a35658 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_with_null.phpt @@ -0,0 +1,8 @@ +--TEST-- +http_build_query() function with null in array +--FILE-- + +--EXPECT-- +string(0) "" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_with_references.phpt b/ext/standard/tests/http/http_build_query/http_build_query_with_references.phpt new file mode 100644 index 0000000000000..4638ae4547c63 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_with_references.phpt @@ -0,0 +1,11 @@ +--TEST-- +http_build_query() function with reference in array +--FILE-- + +--EXPECT-- +string(7) "0=value" diff --git a/ext/standard/tests/http/http_build_query/http_build_query_with_resource.phpt b/ext/standard/tests/http/http_build_query/http_build_query_with_resource.phpt new file mode 100644 index 0000000000000..c8b31064cd247 --- /dev/null +++ b/ext/standard/tests/http/http_build_query/http_build_query_with_resource.phpt @@ -0,0 +1,8 @@ +--TEST-- +http_build_query() function with resource in array +--FILE-- + +--EXPECT-- +string(0) "" From 7d33a30b4072155f2e63c0604682f3732a64f92f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 5 Jan 2023 14:28:06 +0000 Subject: [PATCH 217/895] Handle floats directly in http_build_query() --- ext/standard/http.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/ext/standard/http.c b/ext/standard/http.c index 95e583343aa1a..14543e5f31038 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -193,26 +193,27 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, case IS_LONG: smart_str_append_long(formstr, Z_LVAL_P(zdata)); break; + case IS_DOUBLE: { + zend_string *ekey; + zend_string *tmp = zend_double_to_str(Z_DVAL_P(zdata)); + if (enc_type == PHP_QUERY_RFC3986) { + ekey = php_raw_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); + } else { + ekey = php_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); + } + smart_str_append(formstr, ekey); + zend_string_free(tmp); + zend_string_free(ekey); + break; + } case IS_FALSE: smart_str_appendl(formstr, "0", sizeof("0")-1); break; case IS_TRUE: smart_str_appendl(formstr, "1", sizeof("1")-1); break; - default: - { - zend_string *ekey; - zend_string *tmp; - zend_string *str= zval_get_tmp_string(zdata, &tmp); - if (enc_type == PHP_QUERY_RFC3986) { - ekey = php_raw_url_encode(ZSTR_VAL(str), ZSTR_LEN(str)); - } else { - ekey = php_url_encode(ZSTR_VAL(str), ZSTR_LEN(str)); - } - smart_str_append(formstr, ekey); - zend_tmp_string_release(tmp); - zend_string_free(ekey); - } + /* All possible types are either handled here or previously */ + EMPTY_SWITCH_DEFAULT_CASE(); } } } ZEND_HASH_FOREACH_END(); From 20a6638e22cc86fd0145a214796413924bb30340 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 5 Jan 2023 14:49:37 +0000 Subject: [PATCH 218/895] Extract scalar url encoding into its own function --- ext/standard/http.c | 146 +++++++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 64 deletions(-) diff --git a/ext/standard/http.c b/ext/standard/http.c index 14543e5f31038..1335d88912397 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -20,6 +20,81 @@ #define URL_DEFAULT_ARG_SEP "&" +static void php_url_encode_scalar(zval *scalar, smart_str *form_str, + int encoding_type, zend_ulong index_int, + const char *index_string, size_t index_string_len, + const char *num_prefix, size_t num_prefix_len, + const char *key_prefix, size_t key_prefix_len, + const char *key_suffix, size_t key_suffix_len, + const char *arg_sep, size_t arg_sep_len) +{ + if (form_str->s) { + smart_str_appendl(form_str, arg_sep, arg_sep_len); + } + /* Simple key=value */ + if (key_prefix) { + smart_str_appendl(form_str, key_prefix, key_prefix_len); + } + if (index_string) { + zend_string *encoded_key; + if (encoding_type == PHP_QUERY_RFC3986) { + encoded_key = php_raw_url_encode(index_string, index_string_len); + } else { + encoded_key = php_url_encode(index_string, index_string_len); + } + smart_str_append(form_str, encoded_key); + zend_string_free(encoded_key); + } else { + /* Numeric key */ + if (num_prefix) { + smart_str_appendl(form_str, num_prefix, num_prefix_len); + } + smart_str_append_long(form_str, index_int); + } + if (key_suffix) { + smart_str_appendl(form_str, key_suffix, key_suffix_len); + } + smart_str_appendc(form_str, '='); + + switch (Z_TYPE_P(scalar)) { + case IS_STRING: { + zend_string *encoded_data; + if (encoding_type == PHP_QUERY_RFC3986) { + encoded_data = php_raw_url_encode(Z_STRVAL_P(scalar), Z_STRLEN_P(scalar)); + } else { + encoded_data = php_url_encode(Z_STRVAL_P(scalar), Z_STRLEN_P(scalar)); + } + smart_str_append(form_str, encoded_data); + zend_string_free(encoded_data); + break; + } + case IS_LONG: + smart_str_append_long(form_str, Z_LVAL_P(scalar)); + break; + case IS_DOUBLE: { + zend_string *encoded_data; + zend_string *tmp = zend_double_to_str(Z_DVAL_P(scalar)); + if (encoding_type == PHP_QUERY_RFC3986) { + encoded_data = php_raw_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); + } else { + encoded_data = php_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); + } + smart_str_append(form_str, encoded_data); + zend_string_free(tmp); + zend_string_free(encoded_data); + break; + } + case IS_FALSE: + smart_str_appendc(form_str, '0'); + break; + case IS_TRUE: + smart_str_appendc(form_str, '1'); + break; + /* All possible types are either handled here or previously */ + EMPTY_SWITCH_DEFAULT_CASE(); + } +} + /* {{{ php_url_encode_hash */ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, @@ -151,70 +226,13 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, /* Skip these types */ continue; } else { - if (formstr->s) { - smart_str_appendl(formstr, arg_sep, arg_sep_len); - } - /* Simple key=value */ - if (key_prefix) { - smart_str_appendl(formstr, key_prefix, key_prefix_len); - } - if (key) { - zend_string *ekey; - if (enc_type == PHP_QUERY_RFC3986) { - ekey = php_raw_url_encode(prop_name, prop_len); - } else { - ekey = php_url_encode(prop_name, prop_len); - } - smart_str_append(formstr, ekey); - zend_string_free(ekey); - } else { - /* Numeric key */ - if (num_prefix) { - smart_str_appendl(formstr, num_prefix, num_prefix_len); - } - smart_str_append_long(formstr, idx); - } - if (key_suffix) { - smart_str_appendl(formstr, key_suffix, key_suffix_len); - } - smart_str_appendl(formstr, "=", 1); - switch (Z_TYPE_P(zdata)) { - case IS_STRING: { - zend_string *ekey; - if (enc_type == PHP_QUERY_RFC3986) { - ekey = php_raw_url_encode(Z_STRVAL_P(zdata), Z_STRLEN_P(zdata)); - } else { - ekey = php_url_encode(Z_STRVAL_P(zdata), Z_STRLEN_P(zdata)); - } - smart_str_append(formstr, ekey); - zend_string_free(ekey); - } - break; - case IS_LONG: - smart_str_append_long(formstr, Z_LVAL_P(zdata)); - break; - case IS_DOUBLE: { - zend_string *ekey; - zend_string *tmp = zend_double_to_str(Z_DVAL_P(zdata)); - if (enc_type == PHP_QUERY_RFC3986) { - ekey = php_raw_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); - } else { - ekey = php_url_encode(ZSTR_VAL(tmp), ZSTR_LEN(tmp)); - } - smart_str_append(formstr, ekey); - zend_string_free(tmp); - zend_string_free(ekey); - break; - } - case IS_FALSE: - smart_str_appendl(formstr, "0", sizeof("0")-1); - break; - case IS_TRUE: - smart_str_appendl(formstr, "1", sizeof("1")-1); - break; - /* All possible types are either handled here or previously */ - EMPTY_SWITCH_DEFAULT_CASE(); - } + php_url_encode_scalar(zdata, formstr, + enc_type, idx, + prop_name, prop_len, + num_prefix, num_prefix_len, + key_prefix, key_prefix_len, + key_suffix, key_suffix_len, + arg_sep, arg_sep_len); } } ZEND_HASH_FOREACH_END(); } From 098a43dbd07a48aa48b8ced771cd59b1279f7481 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 8 Jan 2023 17:03:06 +0000 Subject: [PATCH 219/895] Introduce new INI API to get zend_string* value for an INI setting --- Zend/zend_ini.c | 40 ++++++++++++++++++++++++++++++++++++++++ Zend/zend_ini.h | 2 ++ 2 files changed, 42 insertions(+) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index e2979e76444cd..1847a1e7ea09b 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -519,6 +519,46 @@ ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig) / } /* }}} */ + +ZEND_API zend_string *zend_ini_str_ex(const char *name, size_t name_length, bool orig, bool *exists) /* {{{ */ +{ + zend_ini_entry *ini_entry; + + ini_entry = zend_hash_str_find_ptr(EG(ini_directives), name, name_length); + if (ini_entry) { + if (exists) { + *exists = 1; + } + + if (orig && ini_entry->modified) { + return ini_entry->orig_value ? ini_entry->orig_value : NULL; + } else { + return ini_entry->value ? ini_entry->value : NULL; + } + } else { + if (exists) { + *exists = 0; + } + return NULL; + } +} +/* }}} */ + +ZEND_API zend_string *zend_ini_str(const char *name, size_t name_length, bool orig) /* {{{ */ +{ + bool exists = 1; + zend_string *return_value; + + return_value = zend_ini_str_ex(name, name_length, orig, &exists); + if (!exists) { + return NULL; + } else if (!return_value) { + return_value = ZSTR_EMPTY_ALLOC(); + } + return return_value; +} +/* }}} */ + ZEND_API zend_string *zend_ini_get_value(zend_string *name) /* {{{ */ { zend_ini_entry *ini_entry; diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index ce5af258d8706..ebc28de2cad96 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -99,6 +99,8 @@ ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig) ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig); ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig); ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists); +ZEND_API zend_string *zend_ini_str(const char *name, size_t name_length, bool orig); +ZEND_API zend_string *zend_ini_str_ex(const char *name, size_t name_length, bool orig, bool *exists); ZEND_API zend_string *zend_ini_get_value(zend_string *name); ZEND_API bool zend_ini_parse_bool(zend_string *str); From 76eaff080a863a041dab74693aa8fa14f514024d Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 8 Jan 2023 17:11:52 +0000 Subject: [PATCH 220/895] Use a zend_string* for arg_sep in php_url_encode_hash_ex() This prevent a repeated strlen() call for known information --- ext/standard/http.c | 27 +++++++++++++-------------- ext/standard/php_http.h | 3 ++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ext/standard/http.c b/ext/standard/http.c index 1335d88912397..f59add4781adb 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -18,18 +18,16 @@ #include "php_ini.h" #include "url.h" -#define URL_DEFAULT_ARG_SEP "&" - static void php_url_encode_scalar(zval *scalar, smart_str *form_str, int encoding_type, zend_ulong index_int, const char *index_string, size_t index_string_len, const char *num_prefix, size_t num_prefix_len, const char *key_prefix, size_t key_prefix_len, const char *key_suffix, size_t key_suffix_len, - const char *arg_sep, size_t arg_sep_len) + const zend_string *arg_sep) { if (form_str->s) { - smart_str_appendl(form_str, arg_sep, arg_sep_len); + smart_str_append(form_str, arg_sep); } /* Simple key=value */ if (key_prefix) { @@ -100,12 +98,12 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const char *key_prefix, size_t key_prefix_len, const char *key_suffix, size_t key_suffix_len, - zval *type, const char *arg_sep, int enc_type) + zval *type, const zend_string *arg_sep, int enc_type) { zend_string *key = NULL; char *newprefix, *p; const char *prop_name; - size_t arg_sep_len, newprefix_len, prop_len; + size_t newprefix_len, prop_len; zend_ulong idx; zval *zdata = NULL; ZEND_ASSERT(ht); @@ -116,12 +114,11 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, } if (!arg_sep) { - arg_sep = INI_STR("arg_separator.output"); - if (!arg_sep || !strlen(arg_sep)) { - arg_sep = URL_DEFAULT_ARG_SEP; + arg_sep = zend_ini_str("arg_separator.output", strlen("arg_separator.output"), false); + if (ZSTR_LEN(arg_sep) == 0) { + arg_sep = ZSTR_CHAR('&'); } } - arg_sep_len = strlen(arg_sep); ZEND_HASH_FOREACH_KEY_VAL(ht, idx, key, zdata) { bool is_dynamic = 1; @@ -232,18 +229,20 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, num_prefix, num_prefix_len, key_prefix, key_prefix_len, key_suffix, key_suffix_len, - arg_sep, arg_sep_len); + arg_sep); } } ZEND_HASH_FOREACH_END(); } /* }}} */ + /* If there is a prefix we need to close the key with an encoded ] ("%5D") */ /* {{{ Generates a form-encoded query string from an associative array or object. */ PHP_FUNCTION(http_build_query) { zval *formdata; - char *prefix = NULL, *arg_sep=NULL; - size_t arg_sep_len = 0, prefix_len = 0; + char *prefix = NULL; + size_t prefix_len = 0; + zend_string *arg_sep = NULL; smart_str formstr = {0}; zend_long enc_type = PHP_QUERY_RFC1738; @@ -251,7 +250,7 @@ PHP_FUNCTION(http_build_query) Z_PARAM_ARRAY_OR_OBJECT(formdata) Z_PARAM_OPTIONAL Z_PARAM_STRING(prefix, prefix_len) - Z_PARAM_STRING_OR_NULL(arg_sep, arg_sep_len) + Z_PARAM_STR(arg_sep) Z_PARAM_LONG(enc_type) ZEND_PARSE_PARAMETERS_END(); diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 1f98d8aa28437..419a69cf2188a 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -18,12 +18,13 @@ #define PHP_HTTP_H #include "php.h" +#include "zend_types.h" /* for zend_string */ #include "zend_smart_str.h" PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const char *key_prefix, size_t key_prefix_len, const char *key_suffix, size_t key_suffix_len, - zval *type, const char *arg_sep, int enc_type); + zval *type, const zend_string *arg_sep, int enc_type); #endif From c9b8d1bfaa73f40fa3ae8fbc2a0e04adcb326980 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 8 Jan 2023 17:34:32 +0000 Subject: [PATCH 221/895] Use zend_string* instead of char* and size_t pair for key_prefix --- ext/standard/http.c | 106 +++++++++++++++++++--------------------- ext/standard/php_http.h | 2 +- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/ext/standard/http.c b/ext/standard/http.c index f59add4781adb..277bb3fad3fde 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -22,7 +22,7 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, int encoding_type, zend_ulong index_int, const char *index_string, size_t index_string_len, const char *num_prefix, size_t num_prefix_len, - const char *key_prefix, size_t key_prefix_len, + const zend_string *key_prefix, const char *key_suffix, size_t key_suffix_len, const zend_string *arg_sep) { @@ -31,7 +31,7 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, } /* Simple key=value */ if (key_prefix) { - smart_str_appendl(form_str, key_prefix, key_prefix_len); + smart_str_append(form_str, key_prefix); } if (index_string) { zend_string *encoded_key; @@ -96,14 +96,13 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, /* {{{ php_url_encode_hash */ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, - const char *key_prefix, size_t key_prefix_len, + const zend_string *key_prefix, const char *key_suffix, size_t key_suffix_len, zval *type, const zend_string *arg_sep, int enc_type) { zend_string *key = NULL; - char *newprefix, *p; const char *prop_name; - size_t newprefix_len, prop_len; + size_t prop_len; zend_ulong idx; zval *zdata = NULL; ZEND_ASSERT(ht); @@ -155,70 +154,67 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, ZVAL_DEREF(zdata); if (Z_TYPE_P(zdata) == IS_ARRAY || Z_TYPE_P(zdata) == IS_OBJECT) { + zend_string *new_prefix; if (key) { - zend_string *ekey; + zend_string *encoded_key; if (enc_type == PHP_QUERY_RFC3986) { - ekey = php_raw_url_encode(prop_name, prop_len); + encoded_key = php_raw_url_encode(prop_name, prop_len); } else { - ekey = php_url_encode(prop_name, prop_len); + encoded_key = php_url_encode(prop_name, prop_len); } - newprefix_len = key_suffix_len + ZSTR_LEN(ekey) + key_prefix_len + 3 /* %5B */; - newprefix = emalloc(newprefix_len + 1); - p = newprefix; if (key_prefix) { - memcpy(p, key_prefix, key_prefix_len); - p += key_prefix_len; - } - - memcpy(p, ZSTR_VAL(ekey), ZSTR_LEN(ekey)); - p += ZSTR_LEN(ekey); - zend_string_free(ekey); + /* zend_string_concat4() */ + size_t len = ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key) + key_suffix_len + strlen("%5B"); + new_prefix = zend_string_alloc(len, 0); - if (key_suffix) { - memcpy(p, key_suffix, key_suffix_len); - p += key_suffix_len; + memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), ZSTR_VAL(encoded_key), ZSTR_LEN(encoded_key)); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key), key_suffix, key_suffix_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key) + key_suffix_len, "%5B", strlen("%5B")); + ZSTR_VAL(new_prefix)[len] = '\0'; + } else { + new_prefix = zend_string_concat2(ZSTR_VAL(encoded_key), ZSTR_LEN(encoded_key), "%5B", strlen("%5B")); } - *(p++) = '%'; - *(p++) = '5'; - *(p++) = 'B'; - *p = '\0'; - } else { - char *ekey; - size_t ekey_len; - /* Is an integer key */ - ekey_len = spprintf(&ekey, 0, ZEND_LONG_FMT, idx); - newprefix_len = key_prefix_len + num_prefix_len + ekey_len + key_suffix_len + 3 /* %5B */; - newprefix = emalloc(newprefix_len + 1); - p = newprefix; + zend_string_release_ex(encoded_key, false); + } else { /* is integer index */ + char *index_int_as_str; + size_t index_int_as_str_len; - if (key_prefix) { - memcpy(p, key_prefix, key_prefix_len); - p += key_prefix_len; - } + index_int_as_str_len = spprintf(&index_int_as_str, 0, ZEND_LONG_FMT, idx); - if (num_prefix) { - memcpy(p, num_prefix, num_prefix_len); - p += num_prefix_len; - } + if (key_prefix && num_prefix) { + /* zend_string_concat5() */ + size_t len = ZSTR_LEN(key_prefix) + num_prefix_len + index_int_as_str_len + key_suffix_len + strlen("%5B"); + new_prefix = zend_string_alloc(len, 0); - memcpy(p, ekey, ekey_len); - p += ekey_len; - efree(ekey); + memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), num_prefix, num_prefix_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len, index_int_as_str, index_int_as_str_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len +index_int_as_str_len, key_suffix, key_suffix_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len +index_int_as_str_len + key_suffix_len, "%5B", strlen("%5B")); + ZSTR_VAL(new_prefix)[len] = '\0'; + } else if (key_prefix) { + /* zend_string_concat4() */ + size_t len = ZSTR_LEN(key_prefix) + index_int_as_str_len + key_suffix_len + strlen("%5B"); + new_prefix = zend_string_alloc(len, 0); - if (key_suffix) { - memcpy(p, key_suffix, key_suffix_len); - p += key_suffix_len; + memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), index_int_as_str, index_int_as_str_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + index_int_as_str_len, key_suffix, key_suffix_len); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + index_int_as_str_len + key_suffix_len, "%5B", strlen("%5B")); + ZSTR_VAL(new_prefix)[len] = '\0'; + } else if (num_prefix) { + new_prefix = zend_string_concat3(num_prefix, num_prefix_len, index_int_as_str, index_int_as_str_len, "%5B", strlen("%5B")); + } else { + new_prefix = zend_string_concat2(index_int_as_str, index_int_as_str_len, "%5B", strlen("%5B")); } - *(p++) = '%'; - *(p++) = '5'; - *(p++) = 'B'; - *p = '\0'; + efree(index_int_as_str); } GC_TRY_PROTECT_RECURSION(ht); - php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, newprefix, newprefix_len, "%5D", 3, (Z_TYPE_P(zdata) == IS_OBJECT ? zdata : NULL), arg_sep, enc_type); + php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, new_prefix, "%5D", 3, (Z_TYPE_P(zdata) == IS_OBJECT ? zdata : NULL), arg_sep, enc_type); GC_TRY_UNPROTECT_RECURSION(ht); - efree(newprefix); + zend_string_release_ex(new_prefix, false); } else if (Z_TYPE_P(zdata) == IS_NULL || Z_TYPE_P(zdata) == IS_RESOURCE) { /* Skip these types */ continue; @@ -227,7 +223,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, enc_type, idx, prop_name, prop_len, num_prefix, num_prefix_len, - key_prefix, key_prefix_len, + key_prefix, key_suffix, key_suffix_len, arg_sep); } @@ -254,7 +250,7 @@ PHP_FUNCTION(http_build_query) Z_PARAM_LONG(enc_type) ZEND_PARSE_PARAMETERS_END(); - php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type); + php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, /* key_prefix */ NULL, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type); RETURN_STR(smart_str_extract(&formstr)); } diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 419a69cf2188a..0c99bfcb461c1 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -23,7 +23,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, - const char *key_prefix, size_t key_prefix_len, + const zend_string *key_prefix, const char *key_suffix, size_t key_suffix_len, zval *type, const zend_string *arg_sep, int enc_type); From 540e5104dfa1687d59686fea40b63dfaa2153c94 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 8 Jan 2023 17:41:01 +0000 Subject: [PATCH 222/895] Drop key_suffix parameter in php_url_encode_hash_ex() The suffix was always constant and the same value between calls and depends on a prefix being needed --- ext/standard/http.c | 38 +++++++++----------------------------- ext/standard/php_http.h | 1 - 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/ext/standard/http.c b/ext/standard/http.c index 277bb3fad3fde..92d0af5cd9b6e 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -23,7 +23,6 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, const char *index_string, size_t index_string_len, const char *num_prefix, size_t num_prefix_len, const zend_string *key_prefix, - const char *key_suffix, size_t key_suffix_len, const zend_string *arg_sep) { if (form_str->s) { @@ -49,8 +48,8 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, } smart_str_append_long(form_str, index_int); } - if (key_suffix) { - smart_str_appendl(form_str, key_suffix, key_suffix_len); + if (key_prefix) { + smart_str_appendl(form_str, "%5D", strlen("%5D")); } smart_str_appendc(form_str, '='); @@ -97,7 +96,6 @@ static void php_url_encode_scalar(zval *scalar, smart_str *form_str, PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const zend_string *key_prefix, - const char *key_suffix, size_t key_suffix_len, zval *type, const zend_string *arg_sep, int enc_type) { zend_string *key = NULL; @@ -164,15 +162,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, } if (key_prefix) { - /* zend_string_concat4() */ - size_t len = ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key) + key_suffix_len + strlen("%5B"); - new_prefix = zend_string_alloc(len, 0); - - memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), ZSTR_VAL(encoded_key), ZSTR_LEN(encoded_key)); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key), key_suffix, key_suffix_len); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + ZSTR_LEN(encoded_key) + key_suffix_len, "%5B", strlen("%5B")); - ZSTR_VAL(new_prefix)[len] = '\0'; + new_prefix = zend_string_concat3(ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix), ZSTR_VAL(encoded_key), ZSTR_LEN(encoded_key), "%5D%5B", strlen("%5D%5B")); } else { new_prefix = zend_string_concat2(ZSTR_VAL(encoded_key), ZSTR_LEN(encoded_key), "%5B", strlen("%5B")); } @@ -184,26 +174,17 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, index_int_as_str_len = spprintf(&index_int_as_str, 0, ZEND_LONG_FMT, idx); if (key_prefix && num_prefix) { - /* zend_string_concat5() */ - size_t len = ZSTR_LEN(key_prefix) + num_prefix_len + index_int_as_str_len + key_suffix_len + strlen("%5B"); + /* zend_string_concat4() */ + size_t len = ZSTR_LEN(key_prefix) + num_prefix_len + index_int_as_str_len + strlen("%5D%5B"); new_prefix = zend_string_alloc(len, 0); memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), num_prefix, num_prefix_len); memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len, index_int_as_str, index_int_as_str_len); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len +index_int_as_str_len, key_suffix, key_suffix_len); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len +index_int_as_str_len + key_suffix_len, "%5B", strlen("%5B")); + memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + num_prefix_len +index_int_as_str_len, "%5D%5B", strlen("%5D%5B")); ZSTR_VAL(new_prefix)[len] = '\0'; } else if (key_prefix) { - /* zend_string_concat4() */ - size_t len = ZSTR_LEN(key_prefix) + index_int_as_str_len + key_suffix_len + strlen("%5B"); - new_prefix = zend_string_alloc(len, 0); - - memcpy(ZSTR_VAL(new_prefix), ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix)); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix), index_int_as_str, index_int_as_str_len); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + index_int_as_str_len, key_suffix, key_suffix_len); - memcpy(ZSTR_VAL(new_prefix) + ZSTR_LEN(key_prefix) + index_int_as_str_len + key_suffix_len, "%5B", strlen("%5B")); - ZSTR_VAL(new_prefix)[len] = '\0'; + new_prefix = zend_string_concat3(ZSTR_VAL(key_prefix), ZSTR_LEN(key_prefix), index_int_as_str, index_int_as_str_len, "%5D%5B", strlen("%5D%5B")); } else if (num_prefix) { new_prefix = zend_string_concat3(num_prefix, num_prefix_len, index_int_as_str, index_int_as_str_len, "%5B", strlen("%5B")); } else { @@ -212,7 +193,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, efree(index_int_as_str); } GC_TRY_PROTECT_RECURSION(ht); - php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, new_prefix, "%5D", 3, (Z_TYPE_P(zdata) == IS_OBJECT ? zdata : NULL), arg_sep, enc_type); + php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, new_prefix, (Z_TYPE_P(zdata) == IS_OBJECT ? zdata : NULL), arg_sep, enc_type); GC_TRY_UNPROTECT_RECURSION(ht); zend_string_release_ex(new_prefix, false); } else if (Z_TYPE_P(zdata) == IS_NULL || Z_TYPE_P(zdata) == IS_RESOURCE) { @@ -224,7 +205,6 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, prop_name, prop_len, num_prefix, num_prefix_len, key_prefix, - key_suffix, key_suffix_len, arg_sep); } } ZEND_HASH_FOREACH_END(); @@ -250,7 +230,7 @@ PHP_FUNCTION(http_build_query) Z_PARAM_LONG(enc_type) ZEND_PARSE_PARAMETERS_END(); - php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, /* key_prefix */ NULL, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type); + php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, /* key_prefix */ NULL, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type); RETURN_STR(smart_str_extract(&formstr)); } diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 0c99bfcb461c1..9350be597ea1c 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -24,7 +24,6 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const zend_string *key_prefix, - const char *key_suffix, size_t key_suffix_len, zval *type, const zend_string *arg_sep, int enc_type); #endif From 334ecbed5e25d4bd955d7a3a5cb6d7b339efe948 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 15 Jan 2023 16:10:14 +0000 Subject: [PATCH 223/895] Update UPGRADING.INTERNALS with the changes made to php_url_encode_hash_ex() --- UPGRADING.INTERNALS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 4a2c44e6aa037..47826be910c5b 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -43,6 +43,23 @@ PHP 8.3 INTERNALS UPGRADE NOTES - A new function php_json_validate_ex has been added to check if the provided C string is valid for the given depth and options. + b. ext/standard + - The PHPAPI php_url_encode_hash_ex() function has had its signature change + from: + PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, + const char *num_prefix, size_t num_prefix_len, + const char *key_prefix, size_t key_prefix_len, + const char *key_suffix, size_t key_suffix_len, + zval *type, const char *arg_sep, int enc_type); + to: + PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, + const char *num_prefix, size_t num_prefix_len, + const zend_string *key_prefix, + zval *type, const zend_string *arg_sep, int enc_type); + The change to use zend_string prevent the computation of the arg_sep + length at each call. The key_suffix parameter was dropped as it was a + constant value and depended on the key_prefix parameter to not be NULL. + ======================== 4. OpCode changes ======================== From 0d011e4626249e4d2aa252eeedf524e18c7c50c6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 16 Jan 2023 11:15:30 +0300 Subject: [PATCH 224/895] Revert "Merge branch 'PHP-8.0' into PHP-8.1" This reverts commit 0116864cd312f9756f38a0ee0f83bb302a7e367b, reversing changes made to 1f715f5658f5909a9346f56812fa605744d23880. --- ext/openssl/openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 0f2a0838d3f08..7bfa4be58763a 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1320,7 +1320,9 @@ PHP_MINIT_FUNCTION(openssl) REGISTER_LONG_CONSTANT("OPENSSL_CMS_NOSIGS", CMS_NOSIGS, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); +#ifdef RSA_SSLV23_PADDING REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); From bf1cfc0753b09ba6c091626525aeaa596da1f5b6 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 16 Jan 2023 12:22:54 +0100 Subject: [PATCH 225/895] Revert GH-10300 Cf. . This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f. his reverts commit 45384c6e201eda9963e2fcc18946a9446230a2d6. This reverts commit ef7fbfd71025f034b0bfcb413efd181ce798fc1b. This reverts commit 9b9ea0d7c696f2990a159b2a2dafbc04547dc10f. This reverts commit f15747c26be4a2330dc0cf3ea442f53f30f84cac. This reverts commit e883ba93c40827fafd7868517eb48e04569f76ab. This reverts commit 7e87551c3775d26e20b06a4032a00053db6452cc. This reverts commit 921274d2b8966641a00c0a767ae40ba7187bdffc. This reverts commit fc1f528e5e3ee45ab17ae8dcfad6a6422ff2002d. This reverts commit 0961715cdafb5d39124667ff94f3b56453ce71f1. This reverts commit a93f264526e1cdade71d887800c1c448c411bfdc. This reverts commit 72dd94e1c6d29203b8f6473317f626e6d6d6fbdc. This reverts commit 29b2dc89645e741f91cc920964432dccd2aaef14. This reverts commit 05c7653bba7571852f5ce6fc0d220a1a829bc4c0. This reverts commit 5190e5c260ee05e3f3c3d1168263a1a6637441d0. This reverts commit 6b55bf228cb2da8705737d414f394950a92d8aae. This reverts commit 184b4a12d3215d105720d005b31e365249e2eb21. This reverts commit 4c31b7888a561e920fd3889ba8d99368f3c2d9e6. This reverts commit d44e9680f080b4918cfed268b96f90ea35975617. This reverts commit 4069a5c43f419d76e1254c8e49b4cad9968a408f. --- Zend/zend_API.c | 8 +++++--- Zend/zend_API.h | 12 ++++++------ Zend/zend_ast.c | 10 +++++----- Zend/zend_ast.h | 4 +--- Zend/zend_call_stack.c | 6 +++--- Zend/zend_call_stack.h | 6 ++---- Zend/zend_closures.c | 11 +++++++---- Zend/zend_closures.h | 9 --------- Zend/zend_compile.c | 28 ++++++++++++++-------------- Zend/zend_compile.h | 10 ++++++---- Zend/zend_enum.c | 10 +++++----- Zend/zend_enum.h | 7 ++----- Zend/zend_execute.h | 7 +++++-- Zend/zend_gc.c | 11 +++-------- Zend/zend_gc.h | 3 --- Zend/zend_globals_macros.h | 2 -- Zend/zend_inheritance.c | 1 - Zend/zend_interfaces.c | 4 +--- Zend/zend_interfaces.h | 8 ++------ Zend/zend_iterators.c | 6 ++---- Zend/zend_iterators.h | 7 ------- Zend/zend_language_scanner.h | 8 -------- Zend/zend_language_scanner.l | 3 +-- Zend/zend_list.c | 8 +++----- Zend/zend_list.h | 8 ++------ Zend/zend_llist.c | 2 +- Zend/zend_llist.h | 2 -- Zend/zend_objects.c | 15 +++++++-------- Zend/zend_objects.h | 5 +---- Zend/zend_objects_API.c | 3 +-- Zend/zend_objects_API.h | 8 ++------ Zend/zend_observer.c | 6 +++--- Zend/zend_observer.h | 12 +++--------- Zend/zend_weakrefs.c | 6 +++--- Zend/zend_weakrefs.h | 3 +-- ext/opcache/ZendAccelerator.h | 1 - main/php.h | 2 -- 37 files changed, 97 insertions(+), 165 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 6c42d274c0db6..c06d6119b7aff 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -19,13 +19,15 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_execute.h" #include "zend_API.h" -#include "zend_arena.h" -#include "zend_objects.h" // for zend_objects_new() +#include "zend_modules.h" #include "zend_extensions.h" #include "zend_constants.h" -#include "zend_interfaces.h" // for zend_ce_stringable +#include "zend_interfaces.h" #include "zend_exceptions.h" +#include "zend_closures.h" #include "zend_inheritance.h" #include "zend_ini.h" #include "zend_enum.h" diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 44ea4eaf8783d..cbc455eaab0b5 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -22,13 +22,13 @@ #ifndef ZEND_API_H #define ZEND_API_H -#include "zend_compile.h" // for zif_handler -#include "zend_execute.h" // for get_active_function_or_method_name() -#include "zend_globals.h" // for struct _zend_compiler_globals used by ZEND_MAP_PTR_GET_IMM() -#include "zend_globals_macros.h" // for CG() used by ZEND_MAP_PTR_GET_IMM() -#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_modules.h" +#include "zend_list.h" +#include "zend_operators.h" +#include "zend_variables.h" +#include "zend_execute.h" +#include "zend_type_info.h" -typedef struct _zend_module_entry zend_module_entry; BEGIN_EXTERN_C() diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 0581714ab1ed2..70646856d3a11 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -18,13 +18,13 @@ */ #include "zend_ast.h" -#include "zend_API.h" // for array_set_zval_key -#include "zend_arena.h" +#include "zend_API.h" +#include "zend_operators.h" +#include "zend_language_parser.h" +#include "zend_smart_str.h" +#include "zend_exceptions.h" #include "zend_constants.h" #include "zend_enum.h" -#include "zend_language_parser.h" // for T_* -#include "zend_smart_str.h" -#include "zend_exceptions.h" // for zend_throw_error ZEND_API zend_ast_process_t zend_ast_process = NULL; diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index 7fc6bef28963d..b5df2a55a2098 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -21,9 +21,7 @@ #ifndef ZEND_AST_H #define ZEND_AST_H -#include "zend_types.h" // for zval - -#include +#include "zend.h" #ifndef ZEND_AST_SPEC # define ZEND_AST_SPEC 1 diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c index 738dfbec51727..dadaa60dcb208 100644 --- a/Zend/zend_call_stack.c +++ b/Zend/zend_call_stack.c @@ -18,11 +18,11 @@ /* Inspired from Chromium's stack_util.cc */ -#include "zend_call_stack.h" +#include "zend.h" #include "zend_globals.h" - +#include "zend_portability.h" +#include "zend_call_stack.h" #include - #ifdef ZEND_WIN32 # include # include diff --git a/Zend/zend_call_stack.h b/Zend/zend_call_stack.h index 96c0220525bb0..c71395bd6d42c 100644 --- a/Zend/zend_call_stack.h +++ b/Zend/zend_call_stack.h @@ -19,14 +19,12 @@ #ifndef ZEND_CALL_STACK_H #define ZEND_CALL_STACK_H -#include "zend_portability.h" // for zend_always_inline - +#include "zend.h" +#include "zend_portability.h" #ifdef __APPLE__ # include #endif -#include - #ifdef ZEND_CHECK_STACK_LIMIT typedef struct _zend_call_stack { diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 03601ce3fc781..4c326a6c79b12 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -18,11 +18,14 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_API.h" #include "zend_closures.h" -#include "zend_API.h" //for ZEND_METHOD() -#include "zend_arena.h" -#include "zend_compile.h" // for union _zend_function -#include "zend_objects.h" // for zend_object_std_init() +#include "zend_exceptions.h" +#include "zend_interfaces.h" +#include "zend_objects.h" +#include "zend_objects_API.h" +#include "zend_globals.h" #include "zend_closures_arginfo.h" typedef struct _zend_closure { diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h index 40cb0a36ca3f6..2d093fa616800 100644 --- a/Zend/zend_closures.h +++ b/Zend/zend_closures.h @@ -20,15 +20,6 @@ #ifndef ZEND_CLOSURES_H #define ZEND_CLOSURES_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_execute_data zend_execute_data; -typedef union _zend_function zend_function; -typedef struct _zend_object zend_object; -typedef struct _zend_string zend_string; -typedef struct _zval_struct zval; - BEGIN_EXTERN_C() /* This macro depends on zend_closure structure layout */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 166d94dc0dd6c..4cb9b9c85305b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -18,23 +18,23 @@ +----------------------------------------------------------------------+ */ -#include "zend_compile.h" -#include "zend_API.h" // for zend_get_object_type() -#include "zend_arena.h" +#include +#include "zend.h" #include "zend_attributes.h" +#include "zend_compile.h" #include "zend_constants.h" -#include "zend_enum.h" -#include "zend_exceptions.h" // for zend_throw_exception_ex() -#include "zend_globals.h" // struct _zend_compiler_globals -#include "zend_globals_macros.h" // for CG() -#include "zend_inheritance.h" // for zend_do_link_class() -#include "zend_language_parser.h" +#include "zend_llist.h" +#include "zend_API.h" +#include "zend_exceptions.h" +#include "zend_interfaces.h" +#include "zend_virtual_cwd.h" +#include "zend_multibyte.h" #include "zend_language_scanner.h" -#include "zend_list.h" // for zend_init_rsrc_list() -#include "zend_observer.h" // for zend_observer_function_declared_notify() -#include "zend_type_info.h" // for MAY_BE_* -#include "zend_virtual_cwd.h" // for IS_SLASH_P, DEFAULT_SLASH -#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER() +#include "zend_inheritance.h" +#include "zend_vm.h" +#include "zend_enum.h" +#include "zend_observer.h" +#include "zend_call_stack.h" #define SET_NODE(target, src) do { \ target ## _type = (src)->op_type; \ diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 6f7a7d42101cd..fa9e582869fbd 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -20,12 +20,12 @@ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H -#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS +#include "zend.h" #include "zend_ast.h" -#include "zend_portability.h" //for ZEND_FASTCALL -#include "zend_types.h" // for zend_uchar -#include +#include + +#include "zend_llist.h" #define SET_UNUSED(op) do { \ op ## _type = IS_UNUSED; \ @@ -758,6 +758,8 @@ struct _zend_execute_data { #define ZEND_EXTRA_VALUE 1 +#include "zend_globals.h" + typedef enum _zend_compile_position { ZEND_COMPILE_POSITION_AT_SHEBANG = 0, ZEND_COMPILE_POSITION_AT_OPEN_TAG, diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index 11c62d83e1a73..3e455b702cbf2 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -16,13 +16,13 @@ +----------------------------------------------------------------------+ */ -#include "zend_enum.h" -#include "zend_arena.h" // ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2 -#include "zend_API.h" // for INIT_CLASS_ENTRY_EX() +#include "zend.h" +#include "zend_API.h" +#include "zend_compile.h" #include "zend_enum_arginfo.h" #include "zend_interfaces.h" -#include "zend_extensions.h" // for zend_internal_run_time_cache_reserved_size() -#include "zend_objects.h" // for zend_objects_new() +#include "zend_enum.h" +#include "zend_extensions.h" #include "zend_observer.h" #define ZEND_ENUM_DISALLOW_MAGIC_METHOD(propertyName, methodName) \ diff --git a/Zend/zend_enum.h b/Zend/zend_enum.h index 895100f09229f..dbb230c4175c3 100644 --- a/Zend/zend_enum.h +++ b/Zend/zend_enum.h @@ -19,11 +19,8 @@ #ifndef ZEND_ENUM_H #define ZEND_ENUM_H -#include "zend_compile.h" // for OBJ_PROP_NUM -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_function_entry zend_function_entry; +#include "zend.h" +#include "zend_types.h" BEGIN_EXTERN_C() diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index e232b31c99de4..40dc4b87f9b58 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -22,12 +22,15 @@ #define ZEND_EXECUTE_H #include "zend_compile.h" // for zend_op_array -#include "zend_globals.h" // for struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() #include "zend_list.h" // for zend_rsrc_list_get_rsrc_type() #include "zend_portability.h" // for BEGIN_EXTERN_C #include "zend_types.h" // for zend_execute_data +#if ZEND_DEBUG +#include "zend_globals.h" // for struct _zend_executor_globals +#include "zend_globals_macros.h" // for EG() +#endif + BEGIN_EXTERN_C() struct _zend_fcall_info; ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data); diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index ccd75a0706b3b..66324672b1e9c 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -66,14 +66,9 @@ * * @see http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf */ - -#include "zend_gc.h" -#include "zend_alloc.h" // for ZEND_MM_OVERHEAD -#include "zend_fibers.h" // for zend_fiber_switch_block() -#include "zend_globals.h" // for struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() -#include "zend_objects.h" // for zend_objects_destroy_object() -#include "zend.h" // for zend_error() +#include "zend.h" +#include "zend_API.h" +#include "zend_fibers.h" #ifndef GC_BENCH # define GC_BENCH 0 diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index 0ee7e38460e7c..0589e193f4a16 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -20,9 +20,6 @@ #ifndef ZEND_GC_H #define ZEND_GC_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for GC_TYPE_INFO() - BEGIN_EXTERN_C() typedef struct _zend_gc_status { diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h index 60e8def86d5a7..59b3daca53fd4 100644 --- a/Zend/zend_globals_macros.h +++ b/Zend/zend_globals_macros.h @@ -20,8 +20,6 @@ #ifndef ZEND_GLOBALS_MACROS_H #define ZEND_GLOBALS_MACROS_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - typedef struct _zend_compiler_globals zend_compiler_globals; typedef struct _zend_executor_globals zend_executor_globals; typedef struct _zend_php_scanner_globals zend_php_scanner_globals; diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 29141125a59a7..b45c16ef91525 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -18,7 +18,6 @@ */ #include "zend.h" -#include "zend_arena.h" #include "zend_API.h" #include "zend_compile.h" #include "zend_execute.h" diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 52cc476578bd8..d05310b737b01 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -16,13 +16,11 @@ +----------------------------------------------------------------------+ */ -#include "zend_interfaces.h" #include "zend.h" #include "zend_API.h" -#include "zend_arena.h" +#include "zend_interfaces.h" #include "zend_exceptions.h" #include "zend_interfaces_arginfo.h" -#include "zend_objects.h" // for zend_object_std_init() ZEND_API zend_class_entry *zend_ce_traversable; ZEND_API zend_class_entry *zend_ce_aggregate; diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index e8291213d7fbd..883e482f510c4 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -19,12 +19,8 @@ #ifndef ZEND_INTERFACES_H #define ZEND_INTERFACES_H -#include "zend_iterators.h" // for zend_object_iterator -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_serialize_data zend_serialize_data; -typedef struct _zend_unserialize_data zend_unserialize_data; +#include "zend.h" +#include "zend_API.h" BEGIN_EXTERN_C() diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index fd5a0895b2a05..f67033b11161c 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -17,10 +17,8 @@ +----------------------------------------------------------------------+ */ -#include "zend_iterators.h" -#include "zend_objects.h" -#include "zend_object_handlers.h" -#include "zend_API.h" // for INIT_CLASS_ENTRY +#include "zend.h" +#include "zend_API.h" static zend_class_entry zend_iterator_class_entry; diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h index 98337961948f9..5e7451f7eacc7 100644 --- a/Zend/zend_iterators.h +++ b/Zend/zend_iterators.h @@ -17,11 +17,6 @@ +----------------------------------------------------------------------+ */ -#ifndef ZEND_ITERATORS_H -#define ZEND_ITERATORS_H - -#include "zend_types.h" // for zval - /* These iterators were designed to operate within the foreach() * structures provided by the engine, but could be extended for use * with other iterative engine opcodes. @@ -94,5 +89,3 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter); ZEND_API void zend_register_iterator_wrapper(void); END_EXTERN_C() - -#endif /* ZEND_ITERATORS_H */ diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index c93b0fea56edb..ca32329a557f2 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -20,14 +20,6 @@ #ifndef ZEND_SCANNER_H #define ZEND_SCANNER_H -#include "zend_globals.h" // for zend_php_scanner_event -#include "zend_multibyte.h" // for zend_encoding_filter -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_ptr_stack.h" -#include "zend_stack.h" - -typedef struct _zend_file_handle zend_file_handle; - typedef struct _zend_lex_state { unsigned int yy_leng; unsigned char *yy_start; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index c1ba518ddfba7..c73a50948d6bc 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -27,7 +27,6 @@ # define YYDEBUG(s, c) #endif -#include "zend_language_scanner.h" #include "zend_language_scanner_defs.h" #include @@ -36,9 +35,9 @@ # include #endif #include "zend_alloc.h" -#include "zend_arena.h" #include #include "zend_compile.h" +#include "zend_language_scanner.h" #include "zend_highlight.h" #include "zend_constants.h" #include "zend_variables.h" diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 6b2742c6808d5..51ef3e1d92eb3 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -19,12 +19,10 @@ /* resource lists */ +#include "zend.h" #include "zend_list.h" -#include "zend_execute.h" // for get_active_class_name() -#include "zend_globals.h" // for struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() -#include "zend_hash.h" -#include "zend_types.h" // for zval +#include "zend_API.h" +#include "zend_globals.h" ZEND_API int le_index_ptr; diff --git a/Zend/zend_list.h b/Zend/zend_list.h index 643abe65023c3..680915121e2a6 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -20,12 +20,8 @@ #ifndef ZEND_LIST_H #define ZEND_LIST_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_array HashTable; -typedef struct _zend_resource zend_resource; -typedef struct _zend_string zend_string; -typedef struct _zval_struct zval; +#include "zend_hash.h" +#include "zend_globals.h" BEGIN_EXTERN_C() diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index cdc018ae62789..8c42b2494ea08 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -17,8 +17,8 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" #include "zend_llist.h" -#include "zend_alloc.h" //for pemalloc() #include "zend_sort.h" ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent) diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h index e68be3cb20115..cce5ad5ce95a7 100644 --- a/Zend/zend_llist.h +++ b/Zend/zend_llist.h @@ -20,8 +20,6 @@ #ifndef ZEND_LLIST_H #define ZEND_LLIST_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index f82f577df5124..df76fa0bb8dc3 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -18,14 +18,13 @@ +----------------------------------------------------------------------+ */ -#include "zend_objects.h" -#include "zend_objects_API.h" -#include "zend_exceptions.h" // for zend_rethrow_exception() -#include "zend_execute.h" // for ZEND_REF_HAS_TYPE_SOURCES -#include "zend_types.h" // for GC_SET_REFCOUNT() -#include "zend_weakrefs.h" // for zend_weakrefs_notify() -#include "zend.h" // for struct _zend_class_entry -#include "zend_API.h" // for zend_call_known_instance_method_with_0_params() +#include "zend.h" +#include "zend_globals.h" +#include "zend_variables.h" +#include "zend_API.h" +#include "zend_interfaces.h" +#include "zend_exceptions.h" +#include "zend_weakrefs.h" static zend_always_inline void _zend_object_std_init(zend_object *object, zend_class_entry *ce) { diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index c998e9c60a297..91d388154dd13 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -20,10 +20,7 @@ #ifndef ZEND_OBJECTS_H #define ZEND_OBJECTS_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_object zend_object; +#include "zend.h" BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce); diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 140219c077790..80f5b747db710 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -18,12 +18,11 @@ +----------------------------------------------------------------------+ */ -#include "zend_objects_API.h" -#include "zend_objects.h" // for zend_objects_destroy_object() #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" #include "zend_API.h" +#include "zend_objects_API.h" #include "zend_fibers.h" ZEND_API void ZEND_FASTCALL zend_objects_store_init(zend_objects_store *objects, uint32_t init_size) diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index c643a250ce758..7a9a3a00082c0 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -20,12 +20,8 @@ #ifndef ZEND_OBJECTS_API_H #define ZEND_OBJECTS_API_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_gc.h" // for GC_MAY_LEAK -#include "zend_compile.h" // for ZEND_ACC_USE_GUARDS -#include "zend.h" // for _zend_class_entry - -typedef struct _zend_object zend_object; +#include "zend.h" +#include "zend_compile.h" #define OBJ_BUCKET_INVALID (1<<0) diff --git a/Zend/zend_observer.c b/Zend/zend_observer.c index 7ff183f0efacf..79929bfdd80e5 100644 --- a/Zend/zend_observer.c +++ b/Zend/zend_observer.c @@ -18,10 +18,10 @@ */ #include "zend_observer.h" -#include "zend_fibers.h" -#include "zend_extensions.h" // for zend_get_op_array_extension_handles() + +#include "zend_extensions.h" #include "zend_llist.h" -#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER() +#include "zend_vm.h" #define ZEND_OBSERVER_DATA(function) \ ZEND_OP_ARRAY_EXTENSION((&(function)->common), zend_observer_fcall_op_array_extension) diff --git a/Zend/zend_observer.h b/Zend/zend_observer.h index 8c5b20b3495d5..fc4d9a62c8905 100644 --- a/Zend/zend_observer.h +++ b/Zend/zend_observer.h @@ -20,15 +20,9 @@ #ifndef ZEND_OBSERVER_H #define ZEND_OBSERVER_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_execute_data zend_execute_data; -typedef struct _zend_fiber_context zend_fiber_context; -typedef union _zend_function zend_function; -typedef struct _zend_op_array zend_op_array; -typedef struct _zend_string zend_string; -typedef struct _zval_struct zval; +#include "zend.h" +#include "zend_compile.h" +#include "zend_fibers.h" BEGIN_EXTERN_C() diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index 19cbe6fa37ef6..db95b13a7254a 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -14,11 +14,11 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_interfaces.h" +#include "zend_objects_API.h" #include "zend_weakrefs.h" -#include "zend_API.h" // for ZEND_BEGIN_ARG_INFO_EX -#include "zend_objects.h" // for zend_object_std_init() #include "zend_weakrefs_arginfo.h" -#include "zend_interfaces.h" // for zend_create_internal_iterator_zval() typedef struct _zend_weakref { zend_object *referent; diff --git a/Zend/zend_weakrefs.h b/Zend/zend_weakrefs.h index 6e3f108646c3a..506e2e9d40c5c 100644 --- a/Zend/zend_weakrefs.h +++ b/Zend/zend_weakrefs.h @@ -17,8 +17,7 @@ #ifndef ZEND_WEAKREFS_H #define ZEND_WEAKREFS_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zval +#include "zend_alloc.h" BEGIN_EXTERN_C() diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 5cda73bb1d6f1..6ecc2c2bc9df1 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -50,7 +50,6 @@ #include "zend_extensions.h" #include "zend_compile.h" -#include "zend_modules.h" // for INIT_FUNC_ARGS #include "Optimizer/zend_optimizer.h" #include "zend_accelerator_hash.h" diff --git a/main/php.h b/main/php.h index cb1ab5ea7c8e1..b7101ed22f0a6 100644 --- a/main/php.h +++ b/main/php.h @@ -29,8 +29,6 @@ #include "php_version.h" #include "zend.h" -#include "zend_arena.h" -#include "zend_objects.h" #include "zend_sort.h" #include "php_compat.h" From 2f4973fd88fcde9a56e4abfdcc7af13c4fb007ff Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 16 Jan 2023 12:25:59 +0100 Subject: [PATCH 226/895] Revert GH-10279 Cf. . This reverts commit 45a128c9de93bf60956102d85d15f1fe8913bb70. This reverts commit 1eb71c3f155a42ad6867cd5e2f6d921a99506a37. This reverts commit 492523a779dced91eb09215183287e0856b693bf. This reverts commit c7a4633891392d16d40b08135598807b3f0443b0. This reverts commit 308adb915c1b659ab377f752fb27b408a455d7ed. This reverts commit cd27d5e07f01172ac8a701996d260a731489d856. This reverts commit c5933409b47bea760977cf9c9ea04cbb63aaafe5. This reverts commit 46371f4eb339f7e7615a8732d61f2369f8d9129e. This reverts commit 623e2e9fc6a23b8eb7f22010eaf99bf6f638917d. This reverts commit e7434c124772c05fe836832e02196d50bec10c23. This reverts commit d28d323ca20976ed776171330b90588cc3857dd6. This reverts commit 1a067b84ee423a6fb06a5debd92b4cafefeac4e4. This reverts commit a55c0c5fc3f624a685f42281df26cf87f445be43. This reverts commit b5aeb3a4d40dbf38da65975d12b9d2c593b83bdd. This reverts commit f061a035e44d3f6bbc71774f2101525d74fbf16f. This reverts commit b088575119b3244a4d08f6a300251111a221c66b. This reverts commit b1d48774a79592e7fb1ba85d3a2bd6717f25acec. This reverts commit 94f9a20ce6451b54e8346cc474de6b4f9b8897a4. This reverts commit 4831e48708e19346ace0fa5f3f085ee8afd43267. This reverts commit cd985de190534c8e3567a4c5547eb98c45337fa0. This reverts commit 9521d21681b22a471f21b3c56e32b883acac3301. This reverts commit d6136151e9f7fc40e753ac0ebe1790e0d0371b6b. --- Zend/Optimizer/dce.c | 1 - Zend/Optimizer/sccp.c | 3 --- Zend/Optimizer/scdf.c | 3 +-- Zend/Optimizer/scdf.h | 5 ----- Zend/Optimizer/zend_call_graph.c | 10 +++++++--- Zend/Optimizer/zend_call_graph.h | 5 ++--- Zend/Optimizer/zend_cfg.c | 9 +++++---- Zend/Optimizer/zend_cfg.h | 7 ------- Zend/Optimizer/zend_inference.c | 8 +++----- Zend/Optimizer/zend_inference.h | 9 +++++---- Zend/Optimizer/zend_optimizer.c | 19 ++++++++++--------- Zend/Optimizer/zend_optimizer.h | 7 ++----- Zend/Optimizer/zend_ssa.c | 9 ++++----- Zend/Optimizer/zend_ssa.h | 8 +------- Zend/zend_arena.h | 5 +---- Zend/zend_bitset.h | 7 ------- Zend/zend_build.h | 6 ------ Zend/zend_extensions.c | 5 +---- Zend/zend_extensions.h | 11 ++--------- Zend/zend_float.c | 4 ++-- Zend/zend_float.h | 2 -- Zend/zend_long.h | 6 ------ Zend/zend_map_ptr.h | 4 +--- Zend/zend_multiply.h | 5 ++--- Zend/zend_stream.c | 6 ++---- Zend/zend_stream.h | 9 +-------- Zend/zend_system_id.c | 5 +++-- Zend/zend_system_id.h | 3 --- Zend/zend_types.h | 2 -- ext/opcache/zend_accelerator_hash.c | 2 ++ ext/opcache/zend_accelerator_hash.h | 7 +------ ext/standard/md5.c | 1 + ext/standard/md5.h | 4 ---- main/php_globals.h | 1 - 34 files changed, 59 insertions(+), 139 deletions(-) diff --git a/Zend/Optimizer/dce.c b/Zend/Optimizer/dce.c index 7bb5020c5a58e..4aca34c943ca7 100644 --- a/Zend/Optimizer/dce.c +++ b/Zend/Optimizer/dce.c @@ -22,7 +22,6 @@ #include "Optimizer/zend_ssa.h" #include "Optimizer/zend_func_info.h" #include "Optimizer/zend_call_graph.h" -#include "zend_arena.h" #include "zend_bitset.h" /* This pass implements a form of dead code elimination (DCE). The algorithm optimistically assumes diff --git a/Zend/Optimizer/sccp.c b/Zend/Optimizer/sccp.c index 45ae762737624..9373ad2adc63d 100644 --- a/Zend/Optimizer/sccp.c +++ b/Zend/Optimizer/sccp.c @@ -18,11 +18,8 @@ */ #include "zend_API.h" -#include "zend_arena.h" -#include "zend_multiply.h" // for zend_safe_address_guarded() #include "zend_exceptions.h" #include "zend_ini.h" -#include "zend_optimizer.h" #include "zend_type_info.h" #include "Optimizer/zend_optimizer_internal.h" #include "Optimizer/zend_call_graph.h" diff --git a/Zend/Optimizer/scdf.c b/Zend/Optimizer/scdf.c index fb7337a100998..54925e8287b62 100644 --- a/Zend/Optimizer/scdf.c +++ b/Zend/Optimizer/scdf.c @@ -16,9 +16,8 @@ +----------------------------------------------------------------------+ */ -#include "Optimizer/scdf.h" #include "Optimizer/zend_optimizer_internal.h" -#include "zend_arena.h" +#include "Optimizer/scdf.h" /* This defines a generic framework for sparse conditional dataflow propagation. The algorithm is * based on "Sparse conditional constant propagation" by Wegman and Zadeck. We're using a diff --git a/Zend/Optimizer/scdf.h b/Zend/Optimizer/scdf.h index f72b2ca151ff8..840a99065bcb0 100644 --- a/Zend/Optimizer/scdf.h +++ b/Zend/Optimizer/scdf.h @@ -20,11 +20,6 @@ #define _SCDF_H #include "zend_bitset.h" -#include "zend_long.h" -#include "zend_ssa.h" - -typedef struct _zend_op_array zend_op_array; -typedef struct _zend_optimizer_ctx zend_optimizer_ctx; typedef struct _scdf_ctx { zend_op_array *op_array; diff --git a/Zend/Optimizer/zend_call_graph.c b/Zend/Optimizer/zend_call_graph.c index 70342c0654742..c2b7b00cbee13 100644 --- a/Zend/Optimizer/zend_call_graph.c +++ b/Zend/Optimizer/zend_call_graph.c @@ -16,11 +16,15 @@ +----------------------------------------------------------------------+ */ +#include "zend_compile.h" +#include "zend_extensions.h" +#include "Optimizer/zend_optimizer.h" +#include "zend_optimizer_internal.h" +#include "zend_inference.h" #include "zend_call_graph.h" -#include "zend_arena.h" -#include "zend_bitset.h" #include "zend_func_info.h" -#include "zend_optimizer_internal.h" +#include "zend_inference.h" +#include "zend_call_graph.h" static void zend_op_array_calc(zend_op_array *op_array, void *context) { diff --git a/Zend/Optimizer/zend_call_graph.h b/Zend/Optimizer/zend_call_graph.h index 7dd6430dd4e88..5b1634d561dc3 100644 --- a/Zend/Optimizer/zend_call_graph.h +++ b/Zend/Optimizer/zend_call_graph.h @@ -20,9 +20,8 @@ #define ZEND_CALL_GRAPH_H #include "zend_ssa.h" - -typedef struct _zend_func_info zend_func_info; -typedef struct _zend_call_info zend_call_info; +#include "zend_func_info.h" +#include "zend_optimizer.h" typedef struct _zend_send_arg_info { zend_op *opline; diff --git a/Zend/Optimizer/zend_cfg.c b/Zend/Optimizer/zend_cfg.c index e99051542c465..6d538f71316cc 100644 --- a/Zend/Optimizer/zend_cfg.c +++ b/Zend/Optimizer/zend_cfg.c @@ -16,12 +16,13 @@ +----------------------------------------------------------------------+ */ +#include "zend_compile.h" #include "zend_cfg.h" -#include "zend_func_info.h" // for ZEND_FUNC_FREE_LOOP_VAR -#include "zend_globals.h" // struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() -#include "zend_optimizer_internal.h" +#include "zend_func_info.h" #include "zend_worklist.h" +#include "zend_optimizer.h" +#include "zend_optimizer_internal.h" +#include "zend_sort.h" static void zend_mark_reachable(zend_op *opcodes, zend_cfg *cfg, zend_basic_block *b) /* {{{ */ { diff --git a/Zend/Optimizer/zend_cfg.h b/Zend/Optimizer/zend_cfg.h index cf0a591b36307..93d455060686e 100644 --- a/Zend/Optimizer/zend_cfg.h +++ b/Zend/Optimizer/zend_cfg.h @@ -19,13 +19,6 @@ #ifndef ZEND_CFG_H #define ZEND_CFG_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - -#include - -typedef struct _zend_arena zend_arena; -typedef struct _zend_op_array zend_op_array; - /* zend_basic_block.flags */ #define ZEND_BB_START (1<<0) /* first block */ #define ZEND_BB_FOLLOW (1<<1) /* follows the next block */ diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 532e8985688d0..1aeaa02f7b3d8 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -16,15 +16,13 @@ +----------------------------------------------------------------------+ */ +#include "zend_compile.h" +#include "zend_generators.h" #include "zend_inference.h" -#include "zend_closures.h" // for zend_ce_closure -#include "zend_generators.h" // for zend_ce_generator #include "zend_func_info.h" -#include "zend_globals.h" // struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() #include "zend_call_graph.h" +#include "zend_closures.h" #include "zend_worklist.h" -#include "zend_optimizer.h" #include "zend_optimizer_internal.h" /* The used range inference algorithm is described in: diff --git a/Zend/Optimizer/zend_inference.h b/Zend/Optimizer/zend_inference.h index 65b48ee6a8697..f27c5ecdc485b 100644 --- a/Zend/Optimizer/zend_inference.h +++ b/Zend/Optimizer/zend_inference.h @@ -19,11 +19,12 @@ #ifndef ZEND_INFERENCE_H #define ZEND_INFERENCE_H -#include "zend_cfg.h" // for CRT_CONSTANT() -#include "zend_compile.h" // for struct _zend_op -#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_optimizer.h" #include "zend_ssa.h" -#include "zend_type_info.h" // for MAY_BE_* +#include "zend_bitset.h" + +/* Bitmask for type inference (zend_ssa_var_info.type) */ +#include "zend_type_info.h" #define MAY_BE_PACKED_GUARD (1<<27) /* needs packed array guard */ #define MAY_BE_CLASS_GUARD (1<<27) /* needs class guard */ diff --git a/Zend/Optimizer/zend_optimizer.c b/Zend/Optimizer/zend_optimizer.c index dcbb355ff99e2..b5841159bf12c 100644 --- a/Zend/Optimizer/zend_optimizer.c +++ b/Zend/Optimizer/zend_optimizer.c @@ -21,16 +21,17 @@ #include "Optimizer/zend_optimizer.h" #include "Optimizer/zend_optimizer_internal.h" -#include "php_globals.h" // for PG() -#include "zend_API.h" // for ZVAL_EMPTY_STRING() -#include "zend_arena.h" -#include "zend_call_graph.h" // for struct _zend_func_info -#include "zend_dump.h" // for zend_dump_op_array() -#include "zend_inference.h" // for OP1_INFO(), ... -#include "zend_ini.h" -#include "zend_observer.h" -#include "zend_virtual_cwd.h" //for IS_ABSOLUTE_PATH() +#include "zend_API.h" +#include "zend_constants.h" +#include "zend_execute.h" #include "zend_vm.h" +#include "zend_cfg.h" +#include "zend_func_info.h" +#include "zend_call_graph.h" +#include "zend_inference.h" +#include "zend_dump.h" +#include "php.h" +#include "zend_observer.h" #ifndef ZEND_OPTIMIZER_MAX_REGISTERED_PASSES # define ZEND_OPTIMIZER_MAX_REGISTERED_PASSES 32 diff --git a/Zend/Optimizer/zend_optimizer.h b/Zend/Optimizer/zend_optimizer.h index ae794b1ae6659..16bfd75520d89 100644 --- a/Zend/Optimizer/zend_optimizer.h +++ b/Zend/Optimizer/zend_optimizer.h @@ -22,11 +22,8 @@ #ifndef ZEND_OPTIMIZER_H #define ZEND_OPTIMIZER_H -#include "zend_compile.h" // for zend_op_array -#include "zend_hash.h" -#include "zend_portability.h" // for BEGIN_EXTERN_C - -typedef struct _zend_string zend_string; +#include "zend.h" +#include "zend_compile.h" #define ZEND_OPTIMIZER_PASS_1 (1<<0) /* Simple local optimizations */ #define ZEND_OPTIMIZER_PASS_2 (1<<1) /* */ diff --git a/Zend/Optimizer/zend_ssa.c b/Zend/Optimizer/zend_ssa.c index 84f0d4d260fe9..67165a9b26d7a 100644 --- a/Zend/Optimizer/zend_ssa.c +++ b/Zend/Optimizer/zend_ssa.c @@ -17,13 +17,12 @@ +----------------------------------------------------------------------+ */ -#include "zend_ssa.h" -#include "zend_arena.h" -#include "zend_optimizer_internal.h" +#include "zend_compile.h" #include "zend_dfg.h" +#include "zend_ssa.h" #include "zend_dump.h" -#include "zend_inference.h" // for zend_sub_will_overflow() -#include "zend_type_info.h" // for MAY_BE_REF +#include "zend_inference.h" +#include "Optimizer/zend_optimizer_internal.h" static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { diff --git a/Zend/Optimizer/zend_ssa.h b/Zend/Optimizer/zend_ssa.h index 035cce5cae2eb..9fde352c79cc1 100644 --- a/Zend/Optimizer/zend_ssa.h +++ b/Zend/Optimizer/zend_ssa.h @@ -19,14 +19,8 @@ #ifndef ZEND_SSA_H #define ZEND_SSA_H +#include "zend_optimizer.h" #include "zend_cfg.h" -#include "zend_compile.h" // for struct _zend_op -#include "zend_long.h" -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result - -typedef struct _zend_class_entry zend_class_entry; -typedef struct _zend_script zend_script; typedef struct _zend_ssa_range { zend_long min; diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h index 45ef617cf190a..a44082e52fb9c 100644 --- a/Zend/zend_arena.h +++ b/Zend/zend_arena.h @@ -19,10 +19,7 @@ #ifndef _ZEND_ARENA_H_ #define _ZEND_ARENA_H_ -#include "zend_multiply.h" // for zend_safe_address() -#include "zend.h" // for zend_error() - -#include // for size_t +#include "zend.h" #ifndef ZEND_TRACK_ARENA_ALLOC diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index 0a573852a49ad..fdb6ab79a1e86 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -19,13 +19,6 @@ #ifndef _ZEND_BITSET_H_ #define _ZEND_BITSET_H_ -#include "zend_portability.h" // for zend_always_inline - -#include "zend_long.h" - -#include -#include - typedef zend_ulong *zend_bitset; #define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong) diff --git a/Zend/zend_build.h b/Zend/zend_build.h index 795f2fa9fd531..c604fb311a74e 100644 --- a/Zend/zend_build.h +++ b/Zend/zend_build.h @@ -19,12 +19,6 @@ #ifndef ZEND_BUILD_H #define ZEND_BUILD_H -#ifdef PHP_WIN32 -#include "config.w32.h" -#else -#include "php_config.h" -#endif - #define ZEND_TOSTR_(x) #x #define ZEND_TOSTR(x) ZEND_TOSTR_(x) diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 4e6fe95917d95..1f3687642ab67 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -18,10 +18,7 @@ */ #include "zend_extensions.h" -#include "zend_arena.h" -#include "zend_globals.h" // for struct _zend_compiler_globals -#include "zend_globals_macros.h" // for CG() -#include "zend_system_id.h" // for zend_add_system_entropy() +#include "zend_system_id.h" ZEND_API zend_llist zend_extensions; ZEND_API uint32_t zend_extension_flags = 0; diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index ff28a14509ace..14ba9054d9b6a 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -20,15 +20,8 @@ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H -#include "zend_build.h" // for ZEND_TOSTR() -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result - -#include // for size_t - -typedef struct _zend_execute_data zend_execute_data; -typedef struct _zend_op_array zend_op_array; -typedef struct _zend_llist zend_llist; +#include "zend_compile.h" +#include "zend_build.h" /* The constants below are derived from ext/opcache/ZendAccelerator.h diff --git a/Zend/zend_float.c b/Zend/zend_float.c index ca2ed83282de8..90af0c4a5f900 100644 --- a/Zend/zend_float.c +++ b/Zend/zend_float.c @@ -16,9 +16,9 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_compile.h" #include "zend_float.h" -#include "zend_globals.h" // struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() ZEND_API void zend_init_fpu(void) /* {{{ */ { diff --git a/Zend/zend_float.h b/Zend/zend_float.h index d4d67592a5f16..c8e91122a3590 100644 --- a/Zend/zend_float.h +++ b/Zend/zend_float.h @@ -19,8 +19,6 @@ #ifndef ZEND_FLOAT_H #define ZEND_FLOAT_H -#include "zend_portability.h" // for BEGIN_EXTERN_C - BEGIN_EXTERN_C() /* diff --git a/Zend/zend_long.h b/Zend/zend_long.h index f2d3ee81bd699..3796f1c5ababb 100644 --- a/Zend/zend_long.h +++ b/Zend/zend_long.h @@ -19,12 +19,6 @@ #ifndef ZEND_LONG_H #define ZEND_LONG_H -#ifdef PHP_WIN32 -#include "config.w32.h" -#else -#include "php_config.h" // for SIZEOF_SIZE_T -#endif - #include #include diff --git a/Zend/zend_map_ptr.h b/Zend/zend_map_ptr.h index 0ab1a357eecfb..aa726e0cdd32d 100644 --- a/Zend/zend_map_ptr.h +++ b/Zend/zend_map_ptr.h @@ -19,7 +19,7 @@ #ifndef ZEND_MAP_PTR_H #define ZEND_MAP_PTR_H -#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_portability.h" #define ZEND_MAP_PTR_KIND_PTR 0 #define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET 1 @@ -69,8 +69,6 @@ # error "Unknown ZEND_MAP_PTR_KIND" #endif -typedef struct _zend_string zend_string; - BEGIN_EXTERN_C() ZEND_API void zend_map_ptr_reset(void); diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h index 417ee9990a800..a99e858bd7798 100644 --- a/Zend/zend_multiply.h +++ b/Zend/zend_multiply.h @@ -17,12 +17,11 @@ +----------------------------------------------------------------------+ */ +#include "zend_portability.h" + #ifndef ZEND_MULTIPLY_H #define ZEND_MULTIPLY_H -#include "zend_portability.h" -#include "zend.h" // for zend_error_noreturn() - #if PHP_HAVE_BUILTIN_SMULL_OVERFLOW && SIZEOF_LONG == SIZEOF_ZEND_LONG #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 41b89d1d86b5f..8e11841ad2658 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -19,11 +19,9 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_compile.h" #include "zend_stream.h" -#include "zend_globals.h" // struct _zend_compiler_globals -#include "zend_globals_macros.h" // for CG() -#include "zend_string.h" -#include "zend.h" // for zend_stream_open_function ZEND_DLIMPORT int isatty(int fd); diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 22541bf8d929e..047719e175a04 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -22,16 +22,9 @@ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_uchar - -#include -#include // for FILE -#include // for ssize_t +#include #include -typedef struct _zend_string zend_string; - /* Lightweight stream implementation for the ZE scanners. * These functions are private to the engine. * */ diff --git a/Zend/zend_system_id.c b/Zend/zend_system_id.c index deb3e27823e23..8390bba8b0f25 100644 --- a/Zend/zend_system_id.c +++ b/Zend/zend_system_id.c @@ -15,10 +15,11 @@ +----------------------------------------------------------------------+ */ +#include "php.h" #include "zend_system_id.h" -#include "zend_extensions.h" // for ZEND_EXTENSION_BUILD_ID +#include "zend_extensions.h" #include "ext/standard/md5.h" -#include "ext/hash/php_hash.h" // for php_hash_bin2hex() +#include "ext/hash/php_hash.h" ZEND_API char zend_system_id[32]; diff --git a/Zend/zend_system_id.h b/Zend/zend_system_id.h index 3c008637694ed..60514e15a0976 100644 --- a/Zend/zend_system_id.h +++ b/Zend/zend_system_id.h @@ -17,9 +17,6 @@ #ifndef ZEND_SYSTEM_ID_H #define ZEND_SYSTEM_ID_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for ZEND_RESULT_CODE - BEGIN_EXTERN_C() /* True global; Write-only during MINIT/startup */ extern ZEND_API char zend_system_id[32]; diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 888c35482a46f..e6505d8b62ad1 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -24,8 +24,6 @@ #include "zend_portability.h" #include "zend_long.h" -#include "zend_type_info.h" // for MAY_BE_* - #include #ifdef __SSE2__ diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 2354409fd51e5..676ed32ce8ff3 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -19,7 +19,9 @@ +----------------------------------------------------------------------+ */ +#include "ZendAccelerator.h" #include "zend_accelerator_hash.h" +#include "zend_hash.h" #include "zend_shared_alloc.h" /* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */ diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h index c868427491ef4..755d3f13ec516 100644 --- a/ext/opcache/zend_accelerator_hash.h +++ b/ext/opcache/zend_accelerator_hash.h @@ -22,12 +22,7 @@ #ifndef ZEND_ACCELERATOR_HASH_H #define ZEND_ACCELERATOR_HASH_H -#include "zend_long.h" -#include "zend_portability.h" // for BEGIN_EXTERN_C - -#include - -typedef struct _zend_string zend_string; +#include "zend.h" /* zend_accel_hash - is a hash table allocated in shared memory and diff --git a/ext/standard/md5.c b/ext/standard/md5.c index b7cff21d02419..899ff6aaeecb0 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -16,6 +16,7 @@ +----------------------------------------------------------------------+ */ +#include "php.h" #include "md5.h" PHPAPI void make_digest(char *md5str, const unsigned char *digest) /* {{{ */ diff --git a/ext/standard/md5.h b/ext/standard/md5.h index 5814142f1968c..0003a934be62d 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -18,10 +18,6 @@ #ifndef MD5_H #define MD5_H -#include "php.h" // for PHPAPI - -#include - PHPAPI void make_digest(char *md5str, const unsigned char *digest); PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len); diff --git a/main/php_globals.h b/main/php_globals.h index 9a9653f4c1e08..cbf0271c7b763 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -17,7 +17,6 @@ #ifndef PHP_GLOBALS_H #define PHP_GLOBALS_H -#include "php.h" // for PHPAPI #include "zend_globals.h" typedef struct _php_core_globals php_core_globals; From c8955c078a3c58e364f7d94854c75a4f84c3897c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 16 Jan 2023 12:27:33 +0100 Subject: [PATCH 227/895] Revert GH-10220 Cf. . This reverts commit ecc880f491d66081298a16634629f149459706a9. This reverts commit 588a07f7371ee2b5fac17de147926780e427fae6. This reverts commit f377e15751d3aa48b69cd9bcc366ede7803d511f. This reverts commit b4ba16fe189b109144aff669e11d81365160104b. This reverts commit 694ec1deea36e366b28b6349a52be49824e1a1a8. This reverts commit 6b34de8eba9f66882ae16e6073af28783670ac53. This reverts commit aa1cd02a4367834026ea2205ea13a2f904455aa1. This reverts commit 308fd311ea6fcf3094b448df7f2b264f08e4fe4f. This reverts commit 16203b53e1822a37b6ba6f2ab198bb435d05fdad. This reverts commit 738fb5ca5412f5e833a7fab82b11519e635a3357. This reverts commit 9fdbefacd3c382d731aa175b7bdc002ec9cb2b30. This reverts commit cd4a7c1d90562ebb5f89caf94d00d579631b9fbe. This reverts commit 928685eba2b2f0ded90e7f78fd806ea164002f6e. This reverts commit 01e5ffc85cd4357fd7b5b7ceefa29f2d10ca26b7. --- Zend/zend.c | 1 - Zend/zend_execute.c | 26 ++++++++++++------- Zend/zend_execute.h | 14 +++------- Zend/zend_execute_API.c | 16 +++++++++--- Zend/zend_fibers.c | 5 ---- Zend/zend_fibers.h | 8 ++---- Zend/zend_ini.c | 4 +-- Zend/zend_ini.h | 12 --------- Zend/zend_multibyte.c | 6 ++--- Zend/zend_multibyte.h | 6 ----- Zend/zend_object_handlers.c | 2 +- Zend/zend_object_handlers.h | 2 -- Zend/zend_operators.c | 8 +++--- Zend/zend_operators.h | 13 +++++----- Zend/zend_ptr_stack.c | 2 +- Zend/zend_ptr_stack.h | 3 --- Zend/zend_signal.c | 9 +++---- Zend/zend_signal.h | 9 ------- Zend/zend_smart_str.c | 4 +-- Zend/zend_smart_str.h | 9 ++----- Zend/zend_smart_str_public.h | 5 ---- Zend/zend_smart_string.h | 5 ++-- Zend/zend_smart_string_public.h | 2 +- Zend/zend_variables.c | 2 +- Zend/zend_variables.h | 1 - ext/intl/collator/collator_is_numeric.c | 3 --- ext/json/json_encoder.c | 1 - ext/json/json_scanner.re | 1 - .../libmbfl/filters/mbfilter_base64.c | 1 - ext/mysqlnd/mysql_float_to_double.h | 1 - ext/mysqlnd/mysqlnd_connection.c | 2 -- ext/mysqlnd/mysqlnd_wireprotocol.c | 1 - ext/oci8/oci8_collection.c | 1 - ext/opcache/jit/zend_jit.c | 4 --- ext/opcache/zend_file_cache.c | 1 - ext/openssl/xp_ssl.c | 2 -- ext/pcre/php_pcre.c | 1 - ext/pdo_pgsql/pgsql_driver.c | 2 -- ext/pgsql/pgsql.c | 1 - ext/phar/phar_object.c | 2 -- ext/random/gammasection.c | 2 -- ext/random/random.c | 1 - ext/random/randomizer.c | 2 -- ext/shmop/shmop.c | 4 +-- ext/soap/php_encoding.c | 2 -- ext/sockets/conversions.c | 1 - ext/sockets/multicast.c | 1 - ext/sockets/sendrecvmsg.c | 2 -- ext/sockets/sockaddr_conv.c | 1 - ext/spl/spl_directory.c | 3 --- ext/standard/array.c | 1 - ext/standard/basic_functions.c | 4 --- ext/standard/dns.c | 3 --- ext/standard/exec.c | 4 --- ext/standard/formatted_print.c | 1 - ext/standard/ftok.c | 4 --- ext/standard/hrtime.c | 1 - ext/standard/mail.c | 2 -- ext/standard/math.c | 1 - ext/standard/net.c | 3 --- ext/standard/php_fopen_wrapper.c | 3 --- ext/standard/proc_open.c | 3 --- ext/standard/streamsfuncs.c | 3 --- ext/standard/var.c | 1 - ext/standard/var_unserializer.re | 1 - ext/sysvmsg/sysvmsg.c | 5 +--- main/main.c | 2 -- main/snprintf.c | 2 +- main/snprintf.h | 3 --- main/spprintf.c | 3 +-- main/spprintf.h | 2 -- main/streams/plain_wrapper.c | 3 --- main/streams/streams.c | 3 --- main/streams/xp_socket.c | 3 --- sapi/cgi/cgi_main.c | 2 -- sapi/cli/php_cli.c | 2 -- sapi/cli/php_cli_server.c | 3 --- sapi/fpm/fpm/fpm_main.c | 3 --- sapi/phpdbg/phpdbg_io.c | 2 -- 79 files changed, 64 insertions(+), 226 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 99d3cc0270902..0eec5f89019d9 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -36,7 +36,6 @@ #include "zend_observer.h" #include "zend_fibers.h" #include "zend_call_stack.h" -#include "zend_strtod.h" #include "Optimizer/zend_optimizer.h" static size_t global_map_ptr_last = 0; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index d1ca0ee62ae3c..e6fc2a191c0d4 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -20,25 +20,34 @@ #define ZEND_INTENSIVE_DEBUGGING 0 +#include +#include + +#include "zend.h" +#include "zend_compile.h" #include "zend_execute.h" -#include "zend_API.h" // for ZEND_FUNCTION() -#include "zend_arena.h" +#include "zend_API.h" +#include "zend_ptr_stack.h" #include "zend_constants.h" #include "zend_extensions.h" #include "zend_ini.h" #include "zend_exceptions.h" +#include "zend_interfaces.h" #include "zend_closures.h" -#include "zend_generators.h" // for zend_ce_generator -#include "zend_inheritance.h" // for zend_do_link_class() +#include "zend_generators.h" +#include "zend_vm.h" +#include "zend_dtrace.h" +#include "zend_inheritance.h" +#include "zend_type_info.h" #include "zend_smart_str.h" #include "zend_observer.h" +#include "zend_system_id.h" +#include "zend_call_stack.h" +#include "Optimizer/zend_func_info.h" /* Virtual current working directory support */ #include "zend_virtual_cwd.h" -#include -#include - #ifdef HAVE_GCC_GLOBAL_REGS # if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386) # define ZEND_VM_FP_GLOBAL_REG "%esi" @@ -5339,9 +5348,6 @@ static zend_always_inline zend_execute_data *_zend_vm_stack_push_call_frame(uint /* This callback disables optimization of "vm_stack_data" variable in VM */ ZEND_API void (ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data) = NULL; -#include "zend_fibers.h" // needed by zend_vm_execute.h -#include "zend_interfaces.h" // needed by zend_vm_execute.h -#include "zend_objects.h" // needed by zend_vm_execute.h #include "zend_vm_execute.h" ZEND_API zend_result zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 40dc4b87f9b58..a1e29f5cd0a0b 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -21,15 +21,10 @@ #ifndef ZEND_EXECUTE_H #define ZEND_EXECUTE_H -#include "zend_compile.h" // for zend_op_array -#include "zend_list.h" // for zend_rsrc_list_get_rsrc_type() -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_execute_data - -#if ZEND_DEBUG -#include "zend_globals.h" // for struct _zend_executor_globals -#include "zend_globals_macros.h" // for EG() -#endif +#include "zend_compile.h" +#include "zend_hash.h" +#include "zend_operators.h" +#include "zend_variables.h" BEGIN_EXTERN_C() struct _zend_fcall_info; @@ -187,7 +182,6 @@ ZEND_API zend_result ZEND_FASTCALL zval_update_constant_ex(zval *pp, zend_class_ ZEND_API zend_result ZEND_FASTCALL zval_update_constant_with_ctx(zval *pp, zend_class_entry *scope, zend_ast_evaluate_ctx *ctx); /* dedicated Zend executor functions - do not use! */ -typedef struct _zend_vm_stack *zend_vm_stack; struct _zend_vm_stack { zval *top; zval *end; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 066c45d1eb40f..17c3caae21432 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -18,18 +18,26 @@ +----------------------------------------------------------------------+ */ +#include +#include + +#include "zend.h" +#include "zend_compile.h" +#include "zend_execute.h" #include "zend_API.h" +#include "zend_stack.h" #include "zend_constants.h" #include "zend_extensions.h" #include "zend_exceptions.h" #include "zend_closures.h" +#include "zend_generators.h" +#include "zend_vm.h" +#include "zend_float.h" #include "zend_fibers.h" #include "zend_weakrefs.h" +#include "zend_inheritance.h" #include "zend_observer.h" - -#include -#include - +#include "zend_call_stack.h" #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 8638c0f1065d4..a6168f17fd6e8 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -17,8 +17,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_fibers.h" -#include "zend_objects.h" // for zend_object_std_init() #include "zend.h" #include "zend_API.h" #include "zend_ini.h" @@ -46,9 +44,6 @@ # include # include -# include -# include // for strerror() - # if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # endif diff --git a/Zend/zend_fibers.h b/Zend/zend_fibers.h index 15f7d43979d9a..5faa788f4ef68 100644 --- a/Zend/zend_fibers.h +++ b/Zend/zend_fibers.h @@ -20,18 +20,14 @@ #ifndef ZEND_FIBERS_H #define ZEND_FIBERS_H -#include "zend_API.h" // for struct zend_fcall_info -#include "zend_portability.h" // for BEGIN_EXTERN_C - -#include +#include "zend_API.h" +#include "zend_types.h" #define ZEND_FIBER_GUARD_PAGES 1 #define ZEND_FIBER_DEFAULT_C_STACK_SIZE (4096 * (((sizeof(void *)) < 8) ? 256 : 512)) #define ZEND_FIBER_VM_STACK_SIZE (1024 * sizeof(zval)) -typedef struct _zend_fiber_context zend_fiber_context; - BEGIN_EXTERN_C() typedef enum { diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 1847a1e7ea09b..396d98525c9b2 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -16,18 +16,16 @@ +----------------------------------------------------------------------+ */ -#include "zend_ini.h" #include "zend.h" #include "zend_sort.h" #include "zend_API.h" +#include "zend_ini.h" #include "zend_alloc.h" #include "zend_operators.h" #include "zend_strtod.h" #include "zend_modules.h" #include "zend_smart_str.h" - #include -#include static HashTable *registered_zend_ini_directives; diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index ebc28de2cad96..1618953835339 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -19,24 +19,12 @@ #ifndef ZEND_INI_H #define ZEND_INI_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result - -#include - #define ZEND_INI_USER (1<<0) #define ZEND_INI_PERDIR (1<<1) #define ZEND_INI_SYSTEM (1<<2) #define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM) -// forward declarations -typedef struct _zend_file_handle zend_file_handle; -typedef struct _zend_ini_entry zend_ini_entry; -typedef struct _zend_module_entry zend_module_entry; -typedef struct _zend_string zend_string; -typedef struct _zend_array HashTable; - #define ZEND_INI_MH(name) int name(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage) #define ZEND_INI_DISP(name) ZEND_COLD void name(zend_ini_entry *ini_entry, int type) diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c index fc07a2be6af5f..f8dab668751a1 100644 --- a/Zend/zend_multibyte.c +++ b/Zend/zend_multibyte.c @@ -17,10 +17,10 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" +#include "zend_compile.h" +#include "zend_operators.h" #include "zend_multibyte.h" -#include "zend_alloc.h" -#include "zend_globals.h" // for struct _zend_compiler_globals -#include "zend_globals_macros.h" // for LANG_SCNG() #include "zend_ini.h" static const zend_encoding *dummy_encoding_fetcher(const char *encoding_name) diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 08ee63089759c..5466840cd900a 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -20,12 +20,6 @@ #ifndef ZEND_MULTIBYTE_H #define ZEND_MULTIBYTE_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result - -#include -#include // for size_t - typedef struct _zend_encoding zend_encoding; typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 923dce5972969..c5af76e97b66a 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -18,13 +18,13 @@ +----------------------------------------------------------------------+ */ -#include "zend_object_handlers.h" #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" #include "zend_API.h" #include "zend_objects.h" #include "zend_objects_API.h" +#include "zend_object_handlers.h" #include "zend_interfaces.h" #include "zend_exceptions.h" #include "zend_closures.h" diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 4d78c70cf20a4..79bace9202846 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -20,8 +20,6 @@ #ifndef ZEND_OBJECT_HANDLERS_H #define ZEND_OBJECT_HANDLERS_H -#include "zend_types.h" - struct _zend_property_info; #define ZEND_WRONG_PROPERTY_INFO \ diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index e3b899c2b5dff..afe068bfeb8d6 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -18,20 +18,18 @@ +----------------------------------------------------------------------+ */ -#include "zend_operators.h" +#include + #include "zend.h" +#include "zend_operators.h" #include "zend_variables.h" -#include "zend_objects.h" // for zend_objects_new() #include "zend_globals.h" -#include "zend_multiply.h" // for ZEND_SIGNED_MULTIPLY_LONG() #include "zend_list.h" #include "zend_API.h" #include "zend_strtod.h" #include "zend_exceptions.h" #include "zend_closures.h" -#include - #include #ifdef HAVE_LANGINFO_H # include diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index f448c7bd56703..506c27fc50eb3 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -21,19 +21,20 @@ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H -#include "zend_hash.h" // for zend_hash_num_elements() -#include "zend_object_handlers.h" // for struct _zend_object_handlers -#include "zend_portability.h" // for BEGIN_EXTERN_ -#include "zend_types.h" // for zend_result -#include "zend_string.h" // for zend_string_copy() - +#include #include +#include #include #ifdef HAVE_IEEEFP_H #include #endif +#include "zend_portability.h" +#include "zend_strtod.h" +#include "zend_multiply.h" +#include "zend_object_handlers.h" + #define LONG_SIGN_MASK ZEND_LONG_MIN BEGIN_EXTERN_C() diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index acecae477e3ad..80c77e11d73e6 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -17,8 +17,8 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" #include "zend_ptr_stack.h" - #include ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, bool persistent) diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index b1dc6c29af3a0..1126da5800d1b 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -20,9 +20,6 @@ #ifndef ZEND_PTR_STACK_H #define ZEND_PTR_STACK_H -#include "zend_alloc.h" // for safe_perealloc() -#include "zend_portability.h" // for BEGIN_EXTERN_C - typedef struct _zend_ptr_stack { int top, max; void **elements; diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index 8fd55942f86f5..aa74bdd147c98 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -28,14 +28,11 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif +#include -#include "zend_signal.h" -#include "zend_alloc.h" -#include "zend.h" // for zend_output_debug_string(), zend_error(), ... - -#include +#include "zend.h" +#include "zend_globals.h" #include -#include #ifdef HAVE_UNISTD_H #include diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h index 53ef58fa53f96..93edc1f0e0213 100644 --- a/Zend/zend_signal.h +++ b/Zend/zend_signal.h @@ -21,18 +21,9 @@ #ifndef ZEND_SIGNAL_H #define ZEND_SIGNAL_H -#ifdef PHP_WIN32 -#include "config.w32.h" -#else -#include "php_config.h" // for ZEND_SIGNALS -#endif - #ifdef ZEND_SIGNALS -#include "zend_portability.h" // for BEGIN_EXTERN_C - #include -#include #ifndef NSIG #define NSIG 65 diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index 689989059c2d3..5132043c60e25 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -14,11 +14,9 @@ +----------------------------------------------------------------------+ */ +#include #include "zend_smart_str.h" #include "zend_smart_string.h" -#include "zend_globals_macros.h" // for EG() -#include "zend_globals.h" // struct _zend_executor_globals -#include "zend_strtod.h" // for zend_gcvt() #define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1) #define SMART_STR_START_SIZE 256 diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index ac5b18db97e2e..e271835e41db9 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -17,15 +17,10 @@ #ifndef ZEND_SMART_STR_H #define ZEND_SMART_STR_H +#include +#include "zend_globals.h" #include "zend_smart_str_public.h" -#include "zend_operators.h" // for zend_print_long_to_buf() -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_string.h" - -// forward declarations -typedef struct _zval_struct zval; - BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len); diff --git a/Zend/zend_smart_str_public.h b/Zend/zend_smart_str_public.h index 84fc3758ae7c4..e81a6839b3bbb 100644 --- a/Zend/zend_smart_str_public.h +++ b/Zend/zend_smart_str_public.h @@ -17,11 +17,6 @@ #ifndef ZEND_SMART_STR_PUBLIC_H #define ZEND_SMART_STR_PUBLIC_H -#include // for size_t - -// forward declarations -typedef struct _zend_string zend_string; - typedef struct { /** See smart_str_extract() */ zend_string *s; diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h index 08eb6a8eced7f..8149b29fb3330 100644 --- a/Zend/zend_smart_string.h +++ b/Zend/zend_smart_string.h @@ -20,9 +20,8 @@ #include "zend_smart_string_public.h" -#include "zend_alloc.h" // for pefree() -#include "zend_operators.h" // for zend_print_long_to_buf() -#include "zend_portability.h" // for ZEND_FASTCALL +#include +#include /* wrapper */ diff --git a/Zend/zend_smart_string_public.h b/Zend/zend_smart_string_public.h index e61bdd2d36f4a..543e1d37a4efe 100644 --- a/Zend/zend_smart_string_public.h +++ b/Zend/zend_smart_string_public.h @@ -18,7 +18,7 @@ #ifndef PHP_SMART_STRING_PUBLIC_H #define PHP_SMART_STRING_PUBLIC_H -#include // for size_t +#include typedef struct { char *c; diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 69cb54dbc7dbd..06483d581df37 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -#include "zend_variables.h" +#include #include "zend.h" #include "zend_API.h" #include "zend_ast.h" diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index c07fdfe7acf0f..ea3fd9c5efcb8 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -21,7 +21,6 @@ #ifndef ZEND_VARIABLES_H #define ZEND_VARIABLES_H -#include "zend_hash.h" // for zend_array_dup() #include "zend_types.h" #include "zend_gc.h" diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index 0f6c216502da5..823fb4088d8fd 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -14,9 +14,6 @@ */ #include "collator_is_numeric.h" -#include "zend_strtod.h" - -#include /* {{{ Taken from PHP6:zend_u_strtod() */ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */ diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index a3e136ec9b5e1..adb53598326bd 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -28,7 +28,6 @@ #include "php_json_encoder.h" #include #include "zend_enum.h" -#include "zend_strtod.h" // for ZEND_DOUBLE_MAX_LENGTH static const char digits[] = "0123456789abcdef"; diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re index 014f29bd56414..1db43dd081a56 100644 --- a/ext/json/json_scanner.re +++ b/ext/json/json_scanner.re @@ -18,7 +18,6 @@ #include "php_json_scanner.h" #include "php_json_scanner_defs.h" #include "php_json_parser.h" -#include "zend_strtod.h" #include "json_parser.tab.h" #define YYCTYPE php_json_ctype diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index bc06c6a1abf12..ede3eef18ce7c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -30,7 +30,6 @@ #include "mbfilter.h" #include "mbfilter_base64.h" -#include "zend_multiply.h" // for zend_safe_address_guarded() static size_t mb_base64_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_base64(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); diff --git a/ext/mysqlnd/mysql_float_to_double.h b/ext/mysqlnd/mysql_float_to_double.h index b868aa67aa4c1..a15458b52de25 100644 --- a/ext/mysqlnd/mysql_float_to_double.h +++ b/ext/mysqlnd/mysql_float_to_double.h @@ -20,7 +20,6 @@ #include "main/php.h" #include #include "main/snprintf.h" -#include "zend_strtod.h" #define MAX_CHAR_BUF_LEN 255 diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 666ab6662158c..ed4d1af277ddc 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -30,8 +30,6 @@ #include "mysqlnd_ext_plugin.h" #include "zend_smart_str.h" -#include -#include // for strerror() extern MYSQLND_CHARSET *mysqlnd_charsets; diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 25f178e0b57d9..fce042ec5be5c 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -23,7 +23,6 @@ #include "mysqlnd_wireprotocol.h" #include "mysqlnd_statistics.h" #include "mysqlnd_debug.h" -#include "zend_strtod.h" #define BAIL_IF_NO_MORE_DATA \ if (UNEXPECTED((size_t)(p - begin) > packet->header.size)) { \ diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index b3529354b8a72..dcad335647518 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -35,7 +35,6 @@ #include "php_oci8.h" #include "php_oci8_int.h" -#include "zend_strtod.h" /* {{{ php_oci_collection_create() Create and return connection handle */ diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index b7af6f83d31a8..429d8dbd49f5a 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -51,10 +51,6 @@ #include #endif -#ifdef HAVE_MPROTECT -#include -#endif - #ifdef ZTS int jit_globals_id; #else diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index f98bd66fa04a0..1cd639403f68b 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -42,7 +42,6 @@ #include #include -#include #include #if HAVE_UNISTD_H diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index d245fab5a78fb..048076808925d 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -36,8 +36,6 @@ #include #include -#include - #ifdef PHP_WIN32 #include "win32/winutil.h" #include "win32/time.h" diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 099e1e5bbbc49..f4fd60e96ebef 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -20,7 +20,6 @@ #include "php_pcre.h" #include "ext/standard/info.h" #include "ext/standard/basic_functions.h" -#include "zend_multiply.h" // for zend_safe_address_guarded() #include "zend_smart_str.h" #include "SAPI.h" diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index cdd9b6ddae321..ec4d5ec65866b 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -34,8 +34,6 @@ #include "zend_exceptions.h" #include "pgsql_driver_arginfo.h" -#include - static bool pgsql_handle_in_transaction(pdo_dbh_t *dbh); static char * _pdo_pgsql_trim_message(const char *message, int persistent) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 0679b2b6c4638..00bdf15286e00 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -39,7 +39,6 @@ #include "php_pgsql.h" #include "php_globals.h" #include "zend_exceptions.h" -#include "zend_strtod.h" #ifdef HAVE_PGSQL diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index b00326182e775..0737c0db9f3ad 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -21,8 +21,6 @@ #include "func_interceptors.h" #include "phar_object_arginfo.h" -#include - static zend_class_entry *phar_ce_archive; static zend_class_entry *phar_ce_data; static zend_class_entry *phar_ce_PharException; diff --git a/ext/random/gammasection.c b/ext/random/gammasection.c index b8d32c3c2fe9c..aa4531fba22f7 100644 --- a/ext/random/gammasection.c +++ b/ext/random/gammasection.c @@ -24,8 +24,6 @@ #include "php_random.h" #include -#include // for DBL_MAX - /* This file implements the γ-section algorithm as published in: * * Drawing Random Floating-Point Numbers from an Interval. Frédéric diff --git a/ext/random/random.c b/ext/random/random.c index cfa32ee0ba14c..cdc98fbf242d7 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -41,7 +41,6 @@ # include #else # include -# include #endif #ifdef __linux__ diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 23860ada8a2a3..75e88c8b01012 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -27,8 +27,6 @@ #include "Zend/zend_enum.h" #include "Zend/zend_exceptions.h" -#include // for DBL_MANT_DIG - static inline void randomizer_common_init(php_random_randomizer *randomizer, zend_object *engine_object) { if (engine_object->ce->type == ZEND_INTERNAL_CLASS) { /* Internal classes always php_random_engine struct */ diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index dfb301788dd09..be4f57ad27162 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -33,13 +33,11 @@ #include "tsrm_win32.h" #endif + #ifdef HAVE_SHMOP #include "ext/standard/info.h" -#include -#include // for strerror() - /* {{{ shmop_module_entry */ zend_module_entry shmop_module_entry = { STANDARD_MODULE_HEADER, diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 6fc81d30686f0..3b7d6c3885dcb 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -25,8 +25,6 @@ #include "zend_strtod.h" #include "zend_interfaces.h" -#include - /* zval type decode */ static zval *to_zval_double(zval* ret, encodeTypePtr type, xmlNodePtr data); static zval *to_zval_long(zval* ret, encodeTypePtr type, xmlNodePtr data); diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index bb314b4bb4dc2..ae90cbe59d2a7 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -24,7 +24,6 @@ # include #endif -#include #include #include #include diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 00e7b8f0488c0..ef32661be09ff 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -39,7 +39,6 @@ #include "sockaddr_conv.h" #include "main/php_network.h" -#include enum source_op { JOIN_SOURCE, diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index eac78bda4137e..5623b556aa000 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -28,8 +28,6 @@ #include #endif -#include - #define MAX_USER_BUFF_SIZE ((size_t)(100*1024*1024)) #define DEFAULT_BUFF_SIZE 8192 #define MAX_ARRAY_KEY_SIZE 128 diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c index 2e8686bf5abab..6ec540931f725 100644 --- a/ext/sockets/sockaddr_conv.c +++ b/ext/sockets/sockaddr_conv.c @@ -5,7 +5,6 @@ #ifdef PHP_WIN32 #include "windows_common.h" #else -#include #include #include #endif diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index fc806b457a195..5c32e2f9ee359 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -36,9 +36,6 @@ #include "spl_directory_arginfo.h" #include "spl_exceptions.h" -#include -#include // for strerror() - #define SPL_HAS_FLAG(flags, test_flag) ((flags & test_flag) ? 1 : 0) /* declare the class handlers */ diff --git a/ext/standard/array.c b/ext/standard/array.c index c8afc08cffa62..b6650284cada3 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -40,7 +40,6 @@ #include "zend_smart_str.h" #include "zend_bitset.h" #include "zend_exceptions.h" -#include "zend_strtod.h" #include "ext/spl/spl_array.h" #include "ext/random/php_random.h" diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 4e10cac38c71b..f65a71a7266dd 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -117,10 +117,6 @@ PHPAPI php_basic_globals basic_globals; #include "streamsfuncs.h" #include "basic_functions_arginfo.h" -#if defined(HAVE_NANOSLEEP) || !defined(PHP_WIN32) -#include -#endif - typedef struct _user_tick_function_entry { zend_fcall_info fci; zend_fcall_info_cache fci_cache; diff --git a/ext/standard/dns.c b/ext/standard/dns.c index a5a5d86483e0b..d229b998a4b6b 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -57,9 +57,6 @@ extern void __res_ndestroy(res_state statp); #endif #endif -#include -#include // for strerror() - #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 255 #endif diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 108c7d282f885..1b1b0ab9e9ce1 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -46,10 +46,6 @@ #include #endif -#ifdef HAVE_NICE -#include -#endif - #include #ifdef PHP_WIN32 diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index a98d410a228f8..b988422df21ca 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -19,7 +19,6 @@ #include "ext/standard/head.h" #include "php_string.h" #include "zend_execute.h" -#include "zend_strtod.h" // for zend_gcvt() #include #include diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index d00dd6d75e5bd..1a046b3de6979 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -27,10 +27,6 @@ #endif #ifdef HAVE_FTOK - -#include -#include // for strerror() - /* {{{ Convert a pathname and a project identifier to a System V IPC key */ PHP_FUNCTION(ftok) { diff --git a/ext/standard/hrtime.c b/ext/standard/hrtime.c index 5fe4f950f31e0..7dca135c920aa 100644 --- a/ext/standard/hrtime.c +++ b/ext/standard/hrtime.c @@ -17,7 +17,6 @@ #include "php.h" #include "hrtime.h" -#include "zend_strtod.h" /* {{{ */ /* This file reuses code parts from the cross-platform timer library diff --git a/ext/standard/mail.c b/ext/standard/mail.c index b5e7efe8e45a3..55790e6100fce 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -44,8 +44,6 @@ #ifdef PHP_WIN32 # include "win32/sendmail.h" -#else -# include #endif #define SKIP_LONG_HEADER_SEP(str, pos) \ diff --git a/ext/standard/math.c b/ext/standard/math.c index 5b2d74a2de9e8..ad2823ea49bf6 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -23,7 +23,6 @@ #include "zend_exceptions.h" #include "zend_portability.h" #include "zend_bitset.h" -#include "zend_strtod.h" #include #include diff --git a/ext/standard/net.c b/ext/standard/net.c index 83d3e21704200..b22f304c8eb33 100644 --- a/ext/standard/net.c +++ b/ext/standard/net.c @@ -47,9 +47,6 @@ # include #endif -#include -#include // for strerror() - PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) { socklen_t addrlen = sizeof(struct sockaddr_in); diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 8f70ba2094cc0..8926485025a3b 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -29,9 +29,6 @@ #include "php_fopen_wrappers.h" #include "SAPI.h" -#include -#include // for strerror() - static ssize_t php_stream_output_write(php_stream *stream, const char *buf, size_t count) /* {{{ */ { PHPWRITE(buf, count); diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 4281be769da24..53ec6faa1019e 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -36,9 +36,6 @@ #include #endif -#include -#include // for strerror() - /* This symbol is defined in ext/standard/config.m4. * Essentially, it is set if you HAVE_FORK || PHP_WIN32 * Other platforms may modify that configure check and add suitable #ifdefs diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 5af3ec3d638d5..ac2c777eea52b 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -40,9 +40,6 @@ typedef unsigned long long php_timeout_ull; typedef unsigned __int64 php_timeout_ull; #endif -#include -#include // for strerror() - #define GET_CTX_OPT(stream, wrapper, name, val) (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), wrapper, name))) static php_stream_context *decode_context_param(zval *contextresource); diff --git a/ext/standard/var.c b/ext/standard/var.c index 7074745099813..7c6f79aba75ff 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -28,7 +28,6 @@ #include "php_incomplete_class.h" #include "zend_enum.h" #include "zend_exceptions.h" -#include "zend_strtod.h" // for zend_gcvt() /* }}} */ struct php_serialize_data { diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 1fe37e11ebd45..62f9aa4363972 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -19,7 +19,6 @@ #include "php_incomplete_class.h" #include "zend_portability.h" #include "zend_exceptions.h" -#include "zend_strtod.h" /* {{{ reference-handling for unserializer: var_* */ #define VAR_ENTRIES_MAX 1018 /* 1024 - offsetof(php_unserialize_data, entries) / sizeof(void*) */ diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index caaa5eccef35b..debb8b675b0c2 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -22,13 +22,10 @@ #include "php_globals.h" #include "ext/standard/info.h" #include "php_sysvmsg.h" +#include "sysvmsg_arginfo.h" #include "ext/standard/php_var.h" #include "zend_smart_str.h" -#include -#include "sysvmsg_arginfo.h" - -#include // for strerror() #include #include #include diff --git a/main/main.c b/main/main.c index 17da657d17721..2605e554c7ce6 100644 --- a/main/main.c +++ b/main/main.c @@ -82,8 +82,6 @@ #include "rfc1867.h" #include "ext/standard/html_tables.h" - -#include // for DBL_*, used by main_arginfo.h #include "main_arginfo.h" /* }}} */ diff --git a/main/snprintf.c b/main/snprintf.c index d00fb83286e26..3c379c5c2ce18 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -17,7 +17,7 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif -#include "snprintf.h" +#include "php.h" #include diff --git a/main/snprintf.h b/main/snprintf.h index 99c746d994acd..2ff7116c3fbb4 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -66,9 +66,6 @@ spprintf is the dynamical version of snprintf. It allocates the buffer in size #ifndef SNPRINTF_H #define SNPRINTF_H -#include "php.h" // for PHPAPI -#include "zend_portability.h" // for BEGIN_EXTERN_C - #include BEGIN_EXTERN_C() diff --git a/main/spprintf.c b/main/spprintf.c index f4faf0d894c5e..37b81dc6d530b 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -75,8 +75,7 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif -#include "spprintf.h" -#include "zend_strtod.h" +#include "php.h" #include #include diff --git a/main/spprintf.h b/main/spprintf.h index 73d9286d47433..4da224845b3b9 100644 --- a/main/spprintf.h +++ b/main/spprintf.h @@ -18,8 +18,6 @@ #define SPPRINTF_H #include "snprintf.h" -#include "php.h" // for PHPAPI -#include "zend_portability.h" // for BEGIN_EXTERN_C #include "zend_smart_str_public.h" #include "zend_smart_string_public.h" diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index a7013a6f8fb1b..e9a30f3334016 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -42,9 +42,6 @@ # include "win32/readdir.h" #endif -#include -#include // for strerror() - #define php_stream_fopen_from_fd_int(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC) #define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC) #define php_stream_fopen_from_file_int(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_CC) diff --git a/main/streams/streams.c b/main/streams/streams.c index fc167a28728b9..1231dbebd63ae 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -32,9 +32,6 @@ #include #include "php_streams_int.h" -#include -#include // for strerror() - /* {{{ resource and registration code */ /* Global wrapper hash, copied to FG(stream_wrappers) on registration of volatile wrapper */ static HashTable url_stream_wrappers_hash; diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index aa10f598d6282..3a4beca9f077b 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -25,11 +25,8 @@ #ifdef AF_UNIX #include -#include // for strerror() #endif -#include - #ifndef MSG_DONTWAIT # define MSG_DONTWAIT 0 #endif diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index f4f37537e722a..b45468031fcd0 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -95,8 +95,6 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; # include "valgrind/callgrind.h" #endif -#include - #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index c2c91574d5789..cc9a26c41389d 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -92,8 +92,6 @@ # include "openssl/applink.c" #endif -#include - PHPAPI extern char *php_ini_opened_path; PHPAPI extern char *php_ini_scanned_path; PHPAPI extern char *php_ini_scanned_files; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 5bc1cd4683ffb..901281ddfdfca 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -106,9 +106,6 @@ #include "php_cli_process_title.h" #include "php_cli_process_title_arginfo.h" -#include -#include // for strerror() - #define OUTPUT_NOT_CHECKED -1 #define OUTPUT_IS_TTY 1 #define OUTPUT_NOT_TTY 0 diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 0e9399863149c..0a61abacd70df 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -93,9 +93,6 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; #include "fpm_log.h" #include "zlog.h" -#include -#include // for strerror() - /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index 6cf827c1be010..14ae71a0ebd1b 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -20,8 +20,6 @@ #include "phpdbg_io.h" -#include - ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* is easy to generalize ... but not needed for now */ From 2d3427c5079d102f49bba79bd62a05c0ea8c873a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 16 Jan 2023 12:29:41 +0100 Subject: [PATCH 228/895] Revert "#include cleanup (#10216)" Cf. . This reverts commit e628c66f9d4173e585081ddef358505433f9a288. --- Zend/zend_alloc.c | 2 +- Zend/zend_alloc.h | 6 ++++-- Zend/zend_hash.c | 1 - Zend/zend_hash.h | 7 ++----- Zend/zend_portability.h | 6 ------ Zend/zend_sort.c | 2 ++ Zend/zend_sort.h | 3 --- Zend/zend_string.c | 1 - Zend/zend_string.h | 4 +--- 9 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 5f2f25c0c48fb..5f11f49b07157 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -51,8 +51,8 @@ * with more specialized routines when the requested size is known. */ -#include "zend_alloc.h" #include "zend.h" +#include "zend_alloc.h" #include "zend_globals.h" #include "zend_operators.h" #include "zend_multiply.h" diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 0fe1ff98c6f7a..578d4c78cc5c5 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,8 +21,10 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result +#include + +#include "../TSRM/TSRM.h" +#include "zend.h" #ifndef ZEND_MM_ALIGNMENT # error "ZEND_MM_ALIGNMENT was not defined during configure" diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index db1c0a6b49d58..93d10119519b0 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -18,7 +18,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_hash.h" #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 09495f5fb2ff1..93b9f0d4530a4 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -21,11 +21,8 @@ #ifndef ZEND_HASH_H #define ZEND_HASH_H -#include "zend_alloc.h" // for pefree() -#include "zend_long.h" -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_sort.h" // for zend_sort() -#include "zend_string.h" // for ZSTR_VAL() +#include "zend.h" +#include "zend_sort.h" #define HASH_KEY_IS_STRING 1 #define HASH_KEY_IS_LONG 2 diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index b11be27b78865..87ab51724bb92 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -21,12 +21,6 @@ #ifndef ZEND_PORTABILITY_H #define ZEND_PORTABILITY_H -#ifdef PHP_WIN32 -#include "config.w32.h" -#else -#include "php_config.h" // for HAVE_* -#endif - #ifdef __cplusplus #define BEGIN_EXTERN_C() extern "C" { #define END_EXTERN_C() } diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c index f43d5cae63f52..355d2d1bad581 100644 --- a/Zend/zend_sort.c +++ b/Zend/zend_sort.c @@ -17,7 +17,9 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" #include "zend_sort.h" +#include static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { if (cmp(a, b) > 0) { diff --git a/Zend/zend_sort.h b/Zend/zend_sort.h index 320b5e56066a1..e606935f79029 100644 --- a/Zend/zend_sort.h +++ b/Zend/zend_sort.h @@ -20,9 +20,6 @@ #ifndef ZEND_SORT_H #define ZEND_SORT_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for compare_func_t, swap_func_t - BEGIN_EXTERN_C() ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); diff --git a/Zend/zend_string.c b/Zend/zend_string.c index eef68c8e8aca2..68e6084fdf60f 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_string.h" #include "zend.h" #include "zend_globals.h" diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 1c658ae2bbd4a..f2fe44d59eb26 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -19,9 +19,7 @@ #ifndef ZEND_STRING_H #define ZEND_STRING_H -#include "zend_alloc.h" // for pemalloc() -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_string +#include "zend.h" BEGIN_EXTERN_C() From 42eed7bb4e63399f2e79ee6735d04a4398b838dc Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 16 Jan 2023 14:51:26 +0300 Subject: [PATCH 229/895] Fix GH-10271: Incorrect arithmetic calculations when using JIT --- ext/opcache/jit/zend_jit_x86.dasc | 6 ++++ ext/opcache/tests/jit/gh10271.phpt | 47 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 ext/opcache/tests/jit/gh10271.phpt diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 6bc7d53a16fe1..57a2cc9b28c96 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -16209,11 +16209,17 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend } } if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_DOUBLE)) { + if (opline->op1_type == IS_CONST) { + ZEND_REGSET_INCL(regset, ZREG_R0); + } if (ssa_op->result_def != current_var) { ZEND_REGSET_INCL(regset, ZREG_XMM0); } } if ((op1_info & MAY_BE_DOUBLE) && (op2_info & MAY_BE_LONG)) { + if (opline->op2_type == IS_CONST) { + ZEND_REGSET_INCL(regset, ZREG_R0); + } if (zend_is_commutative(opline->opcode)) { if (ssa_op->result_def != current_var) { ZEND_REGSET_INCL(regset, ZREG_XMM0); diff --git a/ext/opcache/tests/jit/gh10271.phpt b/ext/opcache/tests/jit/gh10271.phpt new file mode 100644 index 0000000000000..77c43e3d50a0d --- /dev/null +++ b/ext/opcache/tests/jit/gh10271.phpt @@ -0,0 +1,47 @@ +--TEST-- +GH-10271: Incorrect arithmetic calculations when using JIT +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +opcache.jit_hot_loop=1 +--FILE-- +$x,'y'=>$y]; +} +?> +--EXPECT-- +0: In;-0.000516528926;-0.000912408759;968.000000000000;548.000000000000;Out;967.500000000004;547.500000000009 +1: In;-0.000516528926;-0.000912408759;968.000000000000;548.000000000000;Out;967.500000000004;547.500000000009 +2: In;-0.000516528926;-0.000912408759;968.000000000000;548.000000000000;Out;967.500000000004;547.500000000009 From 9006f06a84c2e88383499894c4c7c6ca8048c34e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 16 Jan 2023 13:54:35 +0100 Subject: [PATCH 230/895] Remove dead cleanup code (#10333) This code path was only triggered if inst->cd == NULL. But the freeing only happens if inst->cd != NULL. There is nothing to free here, so remove this code. In fact, let's get rid of the goto too to make the code more clear to read. --- ext/standard/filters.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ext/standard/filters.c b/ext/standard/filters.c index b390ac7b0a212..8cc1166cd9d0f 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -1301,20 +1301,13 @@ static int php_convert_filter_ctor(php_convert_filter *inst, inst->stub_len = 0; if ((inst->cd = php_conv_open(conv_mode, conv_opts, persistent)) == NULL) { - goto out_failure; + if (inst->filtername != NULL) { + pefree(inst->filtername, persistent); + } + return FAILURE; } return SUCCESS; - -out_failure: - if (inst->cd != NULL) { - php_conv_dtor(inst->cd); - pefree(inst->cd, persistent); - } - if (inst->filtername != NULL) { - pefree(inst->filtername, persistent); - } - return FAILURE; } static void php_convert_filter_dtor(php_convert_filter *inst) From 38dfd205269912383fc79fd85356e0837e1d276f Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 16 Jan 2023 13:10:27 +0000 Subject: [PATCH 231/895] Remove main() from mysqli warning (#10321) --- ext/mysqli/mysqli_result_iterator.c | 2 +- ext/mysqli/tests/mysqli_query_iterators.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/mysqli_result_iterator.c b/ext/mysqli/mysqli_result_iterator.c index abd4930f55bd6..dff8d7c003ccf 100644 --- a/ext/mysqli/mysqli_result_iterator.c +++ b/ext/mysqli/mysqli_result_iterator.c @@ -120,7 +120,7 @@ static void php_mysqli_result_iterator_rewind(zend_object_iterator *iter) if (mysqli_result_is_unbuffered(result)) { if (result->unbuf->eof_reached) { - php_error_docref(NULL, E_WARNING, "Data fetched with MYSQLI_USE_RESULT can be iterated only once"); + zend_error(E_WARNING, "Data fetched with MYSQLI_USE_RESULT can be iterated only once"); return; } } else { diff --git a/ext/mysqli/tests/mysqli_query_iterators.phpt b/ext/mysqli/tests/mysqli_query_iterators.phpt index 783a2b05aba80..0aebf7dc49028 100644 --- a/ext/mysqli/tests/mysqli_query_iterators.phpt +++ b/ext/mysqli/tests/mysqli_query_iterators.phpt @@ -151,7 +151,7 @@ array(1) { } ====== -Warning: main(): Data fetched with MYSQLI_USE_RESULT can be iterated only once in %s on line %d +Warning: Data fetched with MYSQLI_USE_RESULT can be iterated only once in %s on line %d --- Testing STORE_RESULT --- array(1) { ["id"]=> From da550e776226d4c565acb5fb5cd102a97316f1ff Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 16 Jan 2023 13:11:38 +0000 Subject: [PATCH 232/895] MYSQL_ATTR_USE_BUFFERED_QUERY is a bool attribute (#10320) --- ext/pdo_mysql/mysql_driver.c | 2 +- ext/pdo_mysql/tests/bug68371.phpt | 4 ++-- ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 6497b6bc81cfa..698b4e2d28cf4 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -526,7 +526,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_ break; case PDO_MYSQL_ATTR_USE_BUFFERED_QUERY: - ZVAL_LONG(return_value, H->buffered); + ZVAL_BOOL(return_value, H->buffered); break; case PDO_ATTR_EMULATE_PREPARES: diff --git a/ext/pdo_mysql/tests/bug68371.phpt b/ext/pdo_mysql/tests/bug68371.phpt index bc96ce8eda8e6..375011af33ea7 100644 --- a/ext/pdo_mysql/tests/bug68371.phpt +++ b/ext/pdo_mysql/tests/bug68371.phpt @@ -17,7 +17,7 @@ $attrs = array( // Extensive test: default value and set+get values PDO::ATTR_EMULATE_PREPARES => array(null, 1, 0), PDO::MYSQL_ATTR_DIRECT_QUERY => array(null, 0, 1), - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => array(null, 0, 1), + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => array(null, false, true), // Just test the default PDO::ATTR_AUTOCOMMIT => array(null), @@ -73,7 +73,7 @@ OK int(0) OK OK -int(1) +bool(true) OK OK int(1) diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index 695dd69b999f0..23bde8ba268cd 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -61,7 +61,7 @@ MySQLPDOTest::skip(); /* TODO - why is this a valid option if getAttribute() does not support it?! */ PDO::ATTR_TIMEOUT => false, PDO::ATTR_EMULATE_PREPARES => 1, - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => 1, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, /* TODO getAttribute() does not handle it */ PDO::MYSQL_ATTR_LOCAL_INFILE => false, /* TODO getAttribute() does not handle it */ @@ -144,8 +144,8 @@ MySQLPDOTest::skip(); if ($db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY)) printf("[018] PDO::MYSQL_ATTR_DIRECT_QUERY should be off\n"); - set_option_and_check(19, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1, 'PDO::MYSQL_ATTR_USE_BUFFERED_QUERY'); - set_option_and_check(20, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0, 'PDO::MYSQL_ATTR_USE_BUFFERED_QUERY'); + set_option_and_check(19, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true, 'PDO::MYSQL_ATTR_USE_BUFFERED_QUERY'); + set_option_and_check(20, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false, 'PDO::MYSQL_ATTR_USE_BUFFERED_QUERY'); set_option_and_check(21, PDO::MYSQL_ATTR_LOCAL_INFILE, true, 'PDO::MYSQL_ATTR_LOCAL_INFILE'); set_option_and_check(22, PDO::MYSQL_ATTR_LOCAL_INFILE, false, 'PDO::MYSQL_ATTR_LOCAL_INFILE'); From 6556601b45cfb4fd406df6a0906430eed6d9bfdd Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 16 Jan 2023 13:55:12 +0000 Subject: [PATCH 233/895] Add some const qualifiers and better return types to zend_object_handlers.h (#10330) I initially wanted to add them to the zend_strings but because they are used in zend_hash_find() which might modify the hash field. --- Zend/zend_object_handlers.c | 8 ++++---- Zend/zend_object_handlers.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index c5af76e97b66a..c6bb6efffb269 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -488,7 +488,7 @@ ZEND_API zend_property_info *zend_get_property_info(const zend_class_entry *ce, } /* }}} */ -ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, bool is_dynamic) /* {{{ */ +ZEND_API zend_result zend_check_property_access(const zend_object *zobj, zend_string *prop_info_name, bool is_dynamic) /* {{{ */ { zend_property_info *property_info; const char *class_name = NULL; @@ -1228,9 +1228,9 @@ static zend_never_inline zend_function *zend_get_parent_private_method(zend_clas /* Ensures that we're allowed to call a protected method. */ -ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ +ZEND_API bool zend_check_protected(const zend_class_entry *ce, const zend_class_entry *scope) /* {{{ */ { - zend_class_entry *fbc_scope = ce; + const zend_class_entry *fbc_scope = ce; /* Is the context that's calling the function, the same as one of * the function's parents? @@ -1255,7 +1255,7 @@ ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) } /* }}} */ -ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_name, int is_static) /* {{{ */ +ZEND_API zend_function *zend_get_call_trampoline_func(const zend_class_entry *ce, zend_string *method_name, bool is_static) /* {{{ */ { size_t mname_len; zend_op_array *func; diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 79bace9202846..8cea9c59e96d4 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -231,11 +231,11 @@ ZEND_API HashTable *zend_std_build_object_properties_array(zend_object *zobj); * Only objects with the same identity will be considered equal. */ ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2); -ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope); +ZEND_API bool zend_check_protected(const zend_class_entry *ce, const zend_class_entry *scope); -ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, bool is_dynamic); +ZEND_API zend_result zend_check_property_access(const zend_object *zobj, zend_string *prop_info_name, bool is_dynamic); -ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_name, int is_static); +ZEND_API zend_function *zend_get_call_trampoline_func(const zend_class_entry *ce, zend_string *method_name, bool is_static); ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *member); From e560592a61c01b8a5df5256ac18361803fae252e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Obradovi=C4=87?= Date: Wed, 21 Dec 2022 12:23:58 +0100 Subject: [PATCH 234/895] Fix GH-9675: Re-adjust run_time_cache init for internal enum methods Closes GH-10143. --- NEWS | 2 ++ Zend/zend_API.c | 2 +- Zend/zend_enum.c | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 827d2e211374c..2f0783bade4b7 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS unpacked array). (Arnaud) . Fix GH-9735 (Fiber stack variables do not participate in cycle collector). (Arnaud) + . Fix GH-9675 (Broken run_time_cache init for internal enum methods). + (Petar Obradović, Bob) - FPM: . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f613121ee4ad0..5ba91249bd8e2 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2714,7 +2714,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend internal_function->prototype = NULL; internal_function->attributes = NULL; if (EG(active)) { // at run-time: this ought to only happen if registered with dl() or somehow temporarily at runtime - ZEND_MAP_PTR_INIT(internal_function->run_time_cache, zend_arena_alloc(&CG(arena), zend_internal_run_time_cache_reserved_size())); + ZEND_MAP_PTR_INIT(internal_function->run_time_cache, zend_arena_calloc(&CG(arena), 1, zend_internal_run_time_cache_reserved_size())); } else { ZEND_MAP_PTR_NEW(internal_function->run_time_cache); } diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index 59befde732194..25261cf53f880 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -409,8 +409,11 @@ static void zend_enum_register_func(zend_class_entry *ce, zend_known_string_id n zif->module = EG(current_module); zif->scope = ce; zif->T = ZEND_OBSERVER_ENABLED; - ZEND_MAP_PTR_NEW(zif->run_time_cache); - ZEND_MAP_PTR_SET(zif->run_time_cache, zend_arena_alloc(&CG(arena), zend_internal_run_time_cache_reserved_size())); + if (EG(active)) { // at run-time + ZEND_MAP_PTR_INIT(zif->run_time_cache, zend_arena_calloc(&CG(arena), 1, zend_internal_run_time_cache_reserved_size())); + } else { + ZEND_MAP_PTR_NEW(zif->run_time_cache); + } if (!zend_hash_add_ptr(&ce->function_table, name, zif)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(name)); From dfe9c2af19a0e7621dacbd44c83ea0b94af8b113 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 15 Jan 2023 15:29:03 +0100 Subject: [PATCH 235/895] Fix incorrect comparison in block optimization pass We're in the case of ZEND_JMPZ_EX or ZEND_JMPNZ_EX. The opcode gets overwritten and only after the overwriting gets checked if we're in a JMPZ or JMPNZ case. This results in a wrong optimization. Close GH-10329 --- NEWS | 1 + Zend/Optimizer/block_pass.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5c5cd7e73a1dc..a8a72492a968a 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP NEWS . Fixed bug GH-10072 (PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code). (Derick) . Fix GH-10251 (Assertion `(flag & (1<<3)) == 0' failed). (nielsdos) + . Fix wrong comparison in block optimisation pass after opcode update. (nieldsdos) - Date: . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like diff --git a/Zend/Optimizer/block_pass.c b/Zend/Optimizer/block_pass.c index 79207edb3d8b9..72ae012066094 100644 --- a/Zend/Optimizer/block_pass.c +++ b/Zend/Optimizer/block_pass.c @@ -671,13 +671,13 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array case ZEND_JMPNZ_EX: while (1) { if (opline->op1_type == IS_CONST) { - if (zend_is_true(&ZEND_OP1_LITERAL(opline)) == - (opline->opcode == ZEND_JMPZ_EX)) { + bool is_jmpz_ex = opline->opcode == ZEND_JMPZ_EX; + if (zend_is_true(&ZEND_OP1_LITERAL(opline)) == is_jmpz_ex) { ++(*opt_count); opline->opcode = ZEND_QM_ASSIGN; zval_ptr_dtor_nogc(&ZEND_OP1_LITERAL(opline)); - ZVAL_BOOL(&ZEND_OP1_LITERAL(opline), opline->opcode == ZEND_JMPZ_EX); + ZVAL_BOOL(&ZEND_OP1_LITERAL(opline), is_jmpz_ex); opline->op2.num = 0; block->successors_count = 1; block->successors[0] = block->successors[1]; From 3ae47793053f062f8d74c34258d8d98102df9f50 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Jan 2023 21:22:24 +0200 Subject: [PATCH 236/895] Add accelerated (SIMD-based) implementation of mb_check_encoding for UTF-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new SSE2-based implementation of mb_check_encoding for UTF-8 is about 10% faster for 0-5 byte strings, more than 3 times faster for ~100-byte strings, and just under 4 times faster for ~10,000-byte strings. I believe it may be possible to make this function much faster again. Some possible directions for further performance optimization include: • If other ISA extensions like AVX or AVX-512 are available, use a similar algorithm, but process text in blocks of 32 or 64 bytes (instead of 16 bytes). • If other SIMD ISA extensions are available, use the greater variety of available instructions to make some of the checks tighter. • Even if only SSE/SSE2 are available, find clever ways to squeeze instructions out of the hot path. This would probably require a lot of perusing instruction mauals and thinking hard about which SIMD instructions could be used to perform the same checks with fewer instructions. • Find a better algorithm, possibly one where more checks could be combined (just as the current algorithm combines the checks for certain overlong code units and reserved codepoints). --- ext/mbstring/mbstring.c | 204 +++++++++++++++++++++++++- ext/mbstring/tests/utf_encodings.phpt | 14 ++ 2 files changed, 217 insertions(+), 1 deletion(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index d2ff3079f0d73..d6a77681c3868 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4587,13 +4587,215 @@ MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const return true; } +static bool mb_fast_check_utf8(zend_string *str) +{ +#ifdef __SSE2__ + unsigned char *p = (unsigned char*)ZSTR_VAL(str); + /* `e` points 1 byte past the last full 16-byte block of string content + * Note that we include the terminating null byte which is included in each zend_string + * as part of the content to check; this ensures that multi-byte characters which are + * truncated abruptly at the end of the string will be detected as invalid */ + unsigned char *e = p + ((ZSTR_LEN(str) + 1) & ~(sizeof(__m128i) - 1)); + + /* For checking for illegal bytes 0xF5-FF */ + const __m128i over_f5 = _mm_set1_epi8(-117); + /* For checking for overlong 3-byte code units and reserved codepoints U+D800-DFFF */ + const __m128i over_9f = _mm_set1_epi8(-97); + /* For checking for overlong 4-byte code units and invalid codepoints > U+10FFFF */ + const __m128i over_8f = _mm_set1_epi8(-113); + /* For checking for illegal bytes 0xC0-C1 */ + const __m128i find_c0 = _mm_set1_epi8(-64); + const __m128i c0_to_c1 = _mm_set1_epi8(-126); + /* For checking structure of continuation bytes */ + const __m128i find_e0 = _mm_set1_epi8(-32); + const __m128i find_f0 = _mm_set1_epi8(-16); + + __m128i last_block = _mm_setzero_si128(); + __m128i operand; + + while (p < e) { + operand = _mm_loadu_si128((__m128i*)p); /* Load 16 bytes */ + +check_operand: + /* If all 16 bytes are single-byte characters, then a number of checks can be skipped */ + if (!_mm_movemask_epi8(_mm_cmplt_epi8(operand, _mm_setzero_si128()))) { + /* Even if this block only contains single-byte characters, there may have been a + * multi-byte character at the end of the previous block, which was supposed to + * have continuation bytes in this block + * This bitmask will pick out a 2/3/4-byte character starting from the last byte of + * the previous block, a 3/4-byte starting from the 2nd last, or a 4-byte starting + * from the 3rd last */ + __m128i bad_mask = _mm_set_epi8(-64, -32, -16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); + __m128i bad = _mm_cmpeq_epi8(_mm_and_si128(last_block, bad_mask), bad_mask); + if (_mm_movemask_epi8(bad)) { + return false; + } + + /* Consume as many full blocks of single-byte characters as we can */ + while (true) { + p += sizeof(__m128i); + if (p >= e) { + goto finish_up_remaining_bytes; + } + operand = _mm_loadu_si128((__m128i*)p); + if (_mm_movemask_epi8(_mm_cmplt_epi8(operand, _mm_setzero_si128()))) { + break; + } + } + } + + /* Check for >= 0xF5, which are illegal byte values in UTF-8 + * AVX512 has instructions for vectorized unsigned compare, but SSE2 only has signed compare + * So we add an offset to shift 0xF5-FF to the far low end of the signed byte range + * Then a single signed compare will pick out any bad bytes + * `bad` is a vector of 16 good/bad values, where 0x00 means good and 0xFF means bad */ + __m128i bad = _mm_cmplt_epi8(_mm_add_epi8(operand, over_f5), over_f5); + + /* Check for overlong 3-byte code units AND reserved codepoints U+D800-DFFF + * 0xE0 followed by a byte < 0xA0 indicates an overlong 3-byte code unit, and + * 0xED followed by a byte >= 0xA0 indicates a reserved codepoint + * We can check for both problems at once by generating a vector where each byte < 0xA0 + * is mapped to 0xE0, and each byte >= 0xA0 is mapped to 0xED + * Shift the original block right by one byte, and XOR the shifted block with the bitmask + * Any matches will give a 0x00 byte; do a compare with a zero vector to pick out the + * bad positions, and OR them into `bad` */ + __m128i operand2 = _mm_or_si128(_mm_slli_si128(operand, 1), _mm_srli_si128(last_block, 15)); + __m128i mask1 = _mm_or_si128(find_e0, _mm_and_si128(_mm_set1_epi8(0xD), _mm_cmpgt_epi8(operand, over_9f))); + bad = _mm_or_si128(bad, _mm_cmpeq_epi8(_mm_setzero_si128(), _mm_xor_si128(operand2, mask1))); + + /* Check for overlong 4-byte code units AND invalid codepoints > U+10FFFF + * Similar to the previous check; 0xF0 followed by < 0x90 indicates an overlong 4-byte + * code unit, and 0xF4 followed by >= 0x90 indicates a codepoint over U+10FFFF + * Build the bitmask, XOR it with the shifted block, check for 0x00 bytes in the result */ + __m128i mask2 = _mm_or_si128(find_f0, _mm_and_si128(_mm_set1_epi8(0x4), _mm_cmpgt_epi8(operand, over_8f))); + bad = _mm_or_si128(bad, _mm_cmpeq_epi8(_mm_setzero_si128(), _mm_xor_si128(operand2, mask2))); + + /* Check for overlong 2-byte code units + * Any 0xC0 or 0xC1 byte can only be the first byte of an overlong 2-byte code unit + * Same deal as before; add an offset to shift 0xC0-C1 to the far low end of the signed + * byte range, do a signed compare to pick out any bad bytes */ + bad = _mm_or_si128(bad, _mm_cmplt_epi8(_mm_add_epi8(operand, find_c0), c0_to_c1)); + + /* Check structure of continuation bytes + * A UTF-8 byte should be a continuation byte if, and only if, it is: + * 1) 1 byte after the start of a 2-byte, 3-byte, or 4-byte character + * 2) 2 bytes after the start of a 3-byte or 4-byte character + * 3) 3 bytes after the start of a 4-byte character + * We build 3 bitmasks with 0xFF in each such position, and OR them together to + * get a single bitmask with 0xFF in each position where a continuation byte should be */ + __m128i cont_mask = _mm_cmpeq_epi8(_mm_and_si128(operand2, find_c0), find_c0); + __m128i operand3 = _mm_or_si128(_mm_slli_si128(operand, 2), _mm_srli_si128(last_block, 14)); + cont_mask = _mm_or_si128(cont_mask, _mm_cmpeq_epi8(_mm_and_si128(operand3, find_e0), find_e0)); + __m128i operand4 = _mm_or_si128(_mm_slli_si128(operand, 3), _mm_srli_si128(last_block, 13)); + cont_mask = _mm_or_si128(cont_mask, _mm_cmpeq_epi8(_mm_and_si128(operand4, find_f0), find_f0)); + + /* Now, use a signed comparison to get another bitmask with 0xFF in each position where + * a continuation byte actually is + * XOR those two bitmasks together; if everything is good, the result should be zero + * However, if a byte which should have been a continuation wasn't, or if a byte which + * shouldn't have been a continuation was, we will get 0xFF in that position */ + __m128i continuation = _mm_cmplt_epi8(operand, find_c0); + bad = _mm_or_si128(bad, _mm_xor_si128(continuation, cont_mask)); + + /* Pick out the high bit of each byte in `bad` as a 16-bit value (into a scalar register) + * If that value is non-zero, then we found a bad byte somewhere! */ + if (_mm_movemask_epi8(bad)) { + return false; + } + + last_block = operand; + p += sizeof(__m128i); + } + +finish_up_remaining_bytes: ; + /* Finish up 1-15 remaining bytes */ + if (p == e) { + uint8_t remaining_bytes = ZSTR_LEN(str) & (sizeof(__m128i) - 1); /* Not including terminating null */ + + /* Crazy hack here... we want to use the above vectorized code to check a block of less than 16 + * bytes, but there is no good way to read a variable number of bytes into an XMM register + * However, we know that these bytes are part of a zend_string, and a zend_string has some + * 'header' fields which occupy the memory just before its content + * And, those header fields occupy more than 16 bytes... + * So if we go back 16 bytes from the end of the zend_string content, and load 16 bytes from there, + * we may pick up some 'junk' bytes from the zend_string header fields, but we will get the 1-15 + * bytes we wanted in the tail end of our XMM register, and this will never cause a segfault. + * Then, we do a left shift to get rid of the unwanted bytes + * Conveniently, the same left shift also zero-fills the tail end of the XMM register + * + * The following `switch` looks useless, but it's not + * The PSRLDQ instruction used for the 128-bit left shift requires an immediate (literal) + * shift distance, so the compiler will choke on _mm_srli_si128(operand, shift_dist) + */ + switch (remaining_bytes) { + case 0: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 15)), 15); + goto check_operand; + case 1: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 14)), 14); + goto check_operand; + case 2: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 13)), 13); + goto check_operand; + case 3: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 12)), 12); + goto check_operand; + case 4: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 11)), 11); + goto check_operand; + case 5: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10); + goto check_operand; + case 6: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 9)), 9); + goto check_operand; + case 7: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 8)), 8); + goto check_operand; + case 8: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 7)), 7); + goto check_operand; + case 9: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 6)), 6); + goto check_operand; + case 10: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 5)), 5); + goto check_operand; + case 11: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 4)), 4); + goto check_operand; + case 12: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 3)), 3); + goto check_operand; + case 13: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 2)), 2); + goto check_operand; + case 14: + operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 1)), 1); + goto check_operand; + case 15: + /* No trailing bytes are left which need to be checked + * We get 15 because we did not include the terminating null when + * calculating `remaining_bytes`, so the value wraps around */ + return true; + } + + ZEND_UNREACHABLE(); + } + + return true; +#else + return php_mb_check_encoding(ZSTR_VAL(str), ZSTR_LEN(str), &mbfl_encoding_utf8); +#endif +} + static bool mb_check_str_encoding(zend_string *str, const mbfl_encoding *encoding) { if (encoding == &mbfl_encoding_utf8) { if (GC_FLAGS(str) & IS_STR_VALID_UTF8) { return true; } - bool result = php_mb_check_encoding(ZSTR_VAL(str), ZSTR_LEN(str), encoding); + bool result = mb_fast_check_utf8(str); if (result && !ZSTR_IS_INTERNED(str)) { GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); } diff --git a/ext/mbstring/tests/utf_encodings.phpt b/ext/mbstring/tests/utf_encodings.phpt index 2f050c657c2f3..55a79274e3fe2 100644 --- a/ext/mbstring/tests/utf_encodings.phpt +++ b/ext/mbstring/tests/utf_encodings.phpt @@ -813,6 +813,20 @@ $invalid = array( testInvalidCodepoints($invalid, 'UTF-8'); +// Regression test for bug in SSE2-based accelerated UTF-8 validation function +$truncated16byte = [ + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6", + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xef", + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xef\xbf", + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0", + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xbf", + "k\x08`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xbf\xbf" +]; +foreach ($truncated16byte as $trunc) { + if (mb_check_encoding($trunc, 'UTF-8')) + die("UTF-8 validation was incorrect on 16-byte string with truncated multi-byte char at end"); +} + echo "== UTF-16 ==\n"; testValidCodepoints("UTF-16"); From b189aaacc21605c6ce0fe318174b63954674e797 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Jan 2023 21:22:39 +0200 Subject: [PATCH 237/895] Tweaks for accelerated implementation of mb_strlen for UTF-8 On longer strings, this gives a small speed boost of 10% or less. --- ext/mbstring/mbstring.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index d6a77681c3868..c70f8d6818d64 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1748,9 +1748,11 @@ static size_t mb_fast_strlen_utf8(unsigned char *p, size_t len) #ifdef __SSE2__ if (len >= sizeof(__m128i)) { + e -= sizeof(__m128i); + const __m128i threshold = _mm_set1_epi8(-64); const __m128i delta = _mm_set1_epi8(1); - __m128i counter = _mm_set1_epi8(0); /* Vector of 16 continuation-byte counters */ + __m128i counter = _mm_setzero_si128(); /* Vector of 16 continuation-byte counters */ int reset_counter = 255; do { @@ -1762,13 +1764,14 @@ static size_t mb_fast_strlen_utf8(unsigned char *p, size_t len) * and reset them to zero */ if (--reset_counter == 0) { len -= _mm_sum_epu8(counter); - counter = _mm_set1_epi8(0); + counter = _mm_setzero_si128(); reset_counter = 255; } p += sizeof(__m128i); - } while (p + sizeof(__m128i) <= e); + } while (p <= e); + e += sizeof(__m128i); len -= _mm_sum_epu8(counter); /* Fold in any remaining non-zero values in the 16 counters */ } #endif From a6a20c9e1770457790cabde0d88bca742b593c1b Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Tue, 17 Jan 2023 11:14:00 +0100 Subject: [PATCH 238/895] Add regression test for e560592a61c01b8a5df5256ac18361803fae252e Reproduces only under ASAN. Signed-off-by: Bob Weinand --- Zend/tests/gh10346.phpt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Zend/tests/gh10346.phpt diff --git a/Zend/tests/gh10346.phpt b/Zend/tests/gh10346.phpt new file mode 100644 index 0000000000000..74fce28e2307c --- /dev/null +++ b/Zend/tests/gh10346.phpt @@ -0,0 +1,29 @@ +--TEST-- +GH-10346 (Observer: enum tryFrom() run_time_cache properly assigned) +--CREDITS-- +Florian Sowade +--EXTENSIONS-- +zend_test +--INI-- +zend_test.observer.enabled=1 +zend_test.observer.observe_all=1 +--FILE-- + +--EXPECTF-- + + + + + + + +enum(Card::HEART) + + From 0e5128c256120f3b5e67b3655f2d99f425116fe5 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 17 Jan 2023 11:46:34 +0000 Subject: [PATCH 239/895] Remove mysqlnd_shutdown() (#10355) --- UPGRADING.INTERNALS | 5 +++++ ext/mysqlnd/mysqlnd.h | 1 - ext/mysqlnd/mysqlnd_commands.c | 30 ------------------------------ ext/mysqlnd/mysqlnd_connection.c | 14 +------------- ext/mysqlnd/mysqlnd_structs.h | 3 --- 5 files changed, 6 insertions(+), 47 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 47826be910c5b..48a6cf07695d9 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -60,6 +60,11 @@ PHP 8.3 INTERNALS UPGRADE NOTES length at each call. The key_suffix parameter was dropped as it was a constant value and depended on the key_prefix parameter to not be NULL. + c. ext/mysqlnd + - The function mysqlnd_shutdown and its corresponding internal methods + mysqlnd_command::shutdown & mysqlnd_conn_data::shutdown have been removed. + These functions are deprecated by MySQL in favour of SHUTDOWN SQL statement. + ======================== 4. OpCode changes ======================== diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 840d219248ae3..9afc2afeade9a 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -194,7 +194,6 @@ PHPAPI void mysqlnd_local_infile_default(MYSQLND_CONN_DATA * conn); #define mysqlnd_ping(conn) ((conn)->data)->m->ping((conn)->data) #define mysqlnd_kill(conn, pid) ((conn)->data)->m->kill_connection((conn)->data, (pid)) #define mysqlnd_refresh(conn, options) ((conn)->data)->m->refresh_server((conn)->data, (options)) -#define mysqlnd_shutdown(conn, level) ((conn)->data)->m->shutdown_server((conn)->data, (level)) #define mysqlnd_set_character_set(conn, cs) ((conn)->data)->m->set_charset((conn)->data, (cs)) #define mysqlnd_stat(conn, msg) ((conn)->data)->m->get_server_statistics(((conn)->data), (msg)) #define mysqlnd_options(conn, opt, value) ((conn)->data)->m->set_client_option((conn)->data, (opt), (value)) diff --git a/ext/mysqlnd/mysqlnd_commands.c b/ext/mysqlnd/mysqlnd_commands.c index 40821bb1efedd..eba60c2cb8e08 100644 --- a/ext/mysqlnd/mysqlnd_commands.c +++ b/ext/mysqlnd/mysqlnd_commands.c @@ -250,35 +250,6 @@ MYSQLND_METHOD(mysqlnd_command, refresh)(MYSQLND_CONN_DATA * const conn, const u /* }}} */ -/* {{{ mysqlnd_command::shutdown */ -static enum_func_status -MYSQLND_METHOD(mysqlnd_command, shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level) -{ - const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command; - const func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response; - zend_uchar bits[1]; - enum_func_status ret = FAIL; - - DBG_ENTER("mysqlnd_command::shutdown"); - int1store(bits, level); - - ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE, - &conn->state, - conn->error_info, - conn->upsert_status, - conn->stats, - conn->m->send_close, - conn); - if (PASS == ret) { - ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTDOWN, TRUE, - conn->error_info, conn->upsert_status, &conn->last_message); - } - - DBG_RETURN(ret); -} -/* }}} */ - - /* {{{ mysqlnd_command::quit */ static enum_func_status MYSQLND_METHOD(mysqlnd_command, quit)(MYSQLND_CONN_DATA * const conn) @@ -680,7 +651,6 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_command) MYSQLND_METHOD(mysqlnd_command, statistics), MYSQLND_METHOD(mysqlnd_command, process_kill), MYSQLND_METHOD(mysqlnd_command, refresh), - MYSQLND_METHOD(mysqlnd_command, shutdown), MYSQLND_METHOD(mysqlnd_command, quit), MYSQLND_METHOD(mysqlnd_command, query), MYSQLND_METHOD(mysqlnd_command, change_user), diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index ed4d1af277ddc..05b0dab63b007 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -289,7 +289,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn) mysqlnd_set_persistent_string(&conn->unix_socket, NULL, 0, pers); DBG_INF_FMT("scheme=%s", conn->scheme.s); mysqlnd_set_persistent_string(&conn->scheme, NULL, 0, pers); - + if (conn->server_version) { mnd_pefree(conn->server_version, pers); conn->server_version = NULL; @@ -1045,17 +1045,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, refresh)(MYSQLND_CONN_DATA * const conn, uint8 /* }}} */ -/* {{{ mysqlnd_conn_data::shutdown */ -static enum_func_status -MYSQLND_METHOD(mysqlnd_conn_data, shutdown)(MYSQLND_CONN_DATA * const conn, uint8_t level) -{ - DBG_ENTER("mysqlnd_conn_data::shutdown"); - DBG_INF_FMT("conn=%" PRIu64 " level=%u", conn->thread_id, level); - DBG_RETURN(conn->command->shutdown(conn, level)); -} -/* }}} */ - - /* {{{ mysqlnd_send_close */ static enum_func_status MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn) @@ -1954,7 +1943,6 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data) MYSQLND_METHOD(mysqlnd_conn_data, stmt_init), - MYSQLND_METHOD(mysqlnd_conn_data, shutdown), MYSQLND_METHOD(mysqlnd_conn_data, refresh), MYSQLND_METHOD(mysqlnd_conn_data, ping), diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index 57ab51b8c3b58..8e1425a5c6bf1 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -311,7 +311,6 @@ typedef enum_func_status (*func_mysqlnd_execute_com_ping)(MYSQLND_CONN_DATA * co typedef enum_func_status (*func_mysqlnd_execute_com_statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message); typedef enum_func_status (*func_mysqlnd_execute_com_process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const bool read_response); typedef enum_func_status (*func_mysqlnd_execute_com_refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options); -typedef enum_func_status (*func_mysqlnd_execute_com_shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level); typedef enum_func_status (*func_mysqlnd_execute_com_quit)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query); typedef enum_func_status (*func_mysqlnd_execute_com_change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const bool silent); @@ -335,7 +334,6 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) func_mysqlnd_execute_com_statistics statistics; func_mysqlnd_execute_com_process_kill process_kill; func_mysqlnd_execute_com_refresh refresh; - func_mysqlnd_execute_com_shutdown shutdown; func_mysqlnd_execute_com_quit quit; func_mysqlnd_execute_com_query query; func_mysqlnd_execute_com_change_user change_user; @@ -533,7 +531,6 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) func_mysqlnd_conn_data__stmt_init stmt_init; - func_mysqlnd_conn_data__shutdown_server shutdown_server; func_mysqlnd_conn_data__refresh_server refresh_server; func_mysqlnd_conn_data__ping ping; From 398a10a58a764a18723bea394afdeac92f881e10 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 16 Jan 2023 23:09:58 +0100 Subject: [PATCH 240/895] Fix phpdbg segmentation fault in case of malformed input If you were to enter "w $>" the function would crash with a segmentation fault because last_index is still NULL at that point. Fix it by checking for NULL and erroring out if it is. Closes GH-10353 Signed-off-by: George Peter Banyard --- NEWS | 1 + sapi/phpdbg/phpdbg_utils.c | 3 +++ sapi/phpdbg/tests/watch_007.phpt | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 sapi/phpdbg/tests/watch_007.phpt diff --git a/NEWS b/NEWS index a8a72492a968a..069ae40f597f9 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,7 @@ PHP NEWS . Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos) . Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos) . Fix GH-9710: phpdbg memory leaks by option "-h" (nielsdos) + . Fix phpdbg segmentation fault in case of malformed input (nielsdos) - Posix: . Fix memory leak in posix_ttyname() (girgias) diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 344b9c73e476d..f638d608905ba 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -466,6 +466,9 @@ PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable case ']': break; case '>': + if (!last_index) { + goto error; + } if (last_index[index_len - 1] == '-') { new_index = 1; index_len--; diff --git a/sapi/phpdbg/tests/watch_007.phpt b/sapi/phpdbg/tests/watch_007.phpt new file mode 100644 index 0000000000000..f1980d60dd9de --- /dev/null +++ b/sapi/phpdbg/tests/watch_007.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test malformed watchpoint name +--INI-- +opcache.optimization_level=0 +--PHPDBG-- +b test +r +w $> +q +--EXPECTF-- +[Successful compilation of %s] +prompt> [Breakpoint #0 added at test] +prompt> [Breakpoint #0 in test() at %s:%d, hits: 1] +>00004: } + 00005: test(); + 00006: $a = 2; +prompt> [Malformed input] +prompt> +--FILE-- + Date: Mon, 16 Jan 2023 22:33:06 +0100 Subject: [PATCH 241/895] Handle exceptions from __toString in XXH3's initialization The initialization routine for XXH3 was not prepared for exceptions from seed. Fix this by using try_convert_to_string. For discussion, please see: GH-10305 Closes GH-10352 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/hash/hash_xxhash.c | 4 +++- ext/hash/tests/xxhash_secret.phpt | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 069ae40f597f9..6d206f825234f 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,9 @@ PHP NEWS . Fixed bug #67244 (Wrong owner:group for listening unix socket). (Jakub Zelenka) +- Hash: + . Handle exceptions from __toString in XXH3's initialization (nielsdos) + - LDAP: . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). (cmb) diff --git a/ext/hash/hash_xxhash.c b/ext/hash/hash_xxhash.c index 7ecedd81287ce..8a155c9862271 100644 --- a/ext/hash/hash_xxhash.c +++ b/ext/hash/hash_xxhash.c @@ -174,7 +174,9 @@ zend_always_inline static void _PHP_XXH3_Init(PHP_XXH3_64_CTX *ctx, HashTable *a func_init_seed(&ctx->s, (XXH64_hash_t)Z_LVAL_P(_seed)); return; } else if (_secret) { - convert_to_string(_secret); + if (!try_convert_to_string(_secret)) { + return; + } size_t len = Z_STRLEN_P(_secret); if (len < PHP_XXH3_SECRET_SIZE_MIN) { zend_throw_error(NULL, "%s: Secret length must be >= %u bytes, %zu bytes passed", algo_name, XXH3_SECRET_SIZE_MIN, len); diff --git a/ext/hash/tests/xxhash_secret.phpt b/ext/hash/tests/xxhash_secret.phpt index 91e7d929d323d..6f1efbe6c90a6 100644 --- a/ext/hash/tests/xxhash_secret.phpt +++ b/ext/hash/tests/xxhash_secret.phpt @@ -3,6 +3,13 @@ Hash: xxHash secret --FILE-- getMessage()); } + try { + $ctx = hash_init($a, options: ["secret" => new StringableThrowingClass()]); + } catch (Throwable $e) { + var_dump($e->getMessage()); + } + try { $ctx = hash_init($a, options: ["secret" => str_repeat('a', 17)]); } catch (Throwable $e) { @@ -35,8 +48,10 @@ foreach (["xxh3", "xxh128"] as $a) { ?> --EXPECT-- string(67) "xxh3: Only one of seed or secret is to be passed for initialization" +string(23) "exception in __toString" string(57) "xxh3: Secret length must be >= 136 bytes, 17 bytes passed" 8028aa834c03557a == 8028aa834c03557a == true string(69) "xxh128: Only one of seed or secret is to be passed for initialization" +string(23) "exception in __toString" string(59) "xxh128: Secret length must be >= 136 bytes, 17 bytes passed" 54279097795e7218093a05d4d781cbb9 == 54279097795e7218093a05d4d781cbb9 == true From c47a1a260d67d1991081a6050a4460feaa73dcad Mon Sep 17 00:00:00 2001 From: Patrick Allaert Date: Tue, 17 Jan 2023 17:24:25 +0100 Subject: [PATCH 242/895] PHP-8.1 is now for PHP 8.1.16-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 6d206f825234f..3911a49570222 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.1.15 +?? ??? ????, PHP 8.1.16 + + +02 Feb 2023, PHP 8.1.15 - Apache: . Fixed bug GH-9949 (Partial content on incomplete POST request). (cmb) diff --git a/Zend/zend.h b/Zend/zend.h index ac3a826a4813b..16b0ce6a1bd82 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.1.15-dev" +#define ZEND_VERSION "4.1.16-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index f7e15261412b1..6bf3274d2705b 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.15-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.16-dev],[https://bugs.php.net],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 165364047e310..4231920700d72 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 15 +#define PHP_RELEASE_VERSION 16 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.15-dev" -#define PHP_VERSION_ID 80115 +#define PHP_VERSION "8.1.16-dev" +#define PHP_VERSION_ID 80116 From eee988e86d94ee0d783b9fbab1de52697284ce9b Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 17 Jan 2023 20:55:22 +0300 Subject: [PATCH 243/895] PHP-8.2 is now for PHP 8.2.3-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index ca7dd848fce7a..7eeffc988c87e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.2.2 +?? ??? ????, PHP 8.2.3 + + +02 Feb 2023, PHP 8.2.2 - Core: . Fixed bug GH-10200 (zif_get_object_vars: diff --git a/Zend/zend.h b/Zend/zend.h index 5e613207ae142..9665526aa96bd 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.2.2-dev" +#define ZEND_VERSION "4.2.3-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index efc2c2d6899a7..9b2b3d3cb7be9 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.2.2-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.2.3-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 42c94eeece9bb..1cb5aaaa2c5b6 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 2 +#define PHP_RELEASE_VERSION 3 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.2.2-dev" -#define PHP_VERSION_ID 80202 +#define PHP_VERSION "8.2.3-dev" +#define PHP_VERSION_ID 80203 From f25444620dabf1827ebe8e3fb11c8c82fc2caf4d Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 17 Jan 2023 23:42:01 +0300 Subject: [PATCH 244/895] [ci skip] PHP 7.4 EOL (#10362) --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa12fe0366aee..5423b320e0b8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -334,8 +334,8 @@ Currently we have the following branches in use: | master | Active development branch for PHP 8.3, which is open for backwards incompatible changes and major internal API changes. | | PHP-8.2 | Is used to release the PHP 8.2.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.1 | Is used to release the PHP 8.1.x series. This is a current stable version and is open for bugfixes only. | -| PHP-8.0 | Is used to release the PHP 8.0.x series. This is a current stable version and is open for bugfixes only. | -| PHP-7.4 | Is used to release the PHP 7.4.x series. This is an old stable version and is open for security fixes only. | +| PHP-8.0 | Is used to release the PHP 8.0.x series. This is an old stable version and is open for security fixes only. | +| PHP-7.4 | This branch is closed. | | PHP-7.3 | This branch is closed. | | PHP-7.2 | This branch is closed. | | PHP-7.1 | This branch is closed. | From fd6c2353ee25b9645916ad367f89287cecf9c0da Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:47:38 +0100 Subject: [PATCH 245/895] Remove useless php_stream_tell() call Closes GH-10365. --- ext/phar/zip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/phar/zip.c b/ext/phar/zip.c index bfa23e9768b32..6d5008b01e6d6 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -428,7 +428,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia PHAR_ZIP_FAIL("signatures larger than 64 KiB are not supported"); } - php_stream_tell(fp); sigfile = php_stream_fopen_tmpfile(); if (!sigfile) { PHAR_ZIP_FAIL("couldn't open temporary file"); From 8d21a6b2abf6df4b93f8520860e2e05edc6c3f0f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:26:34 +0100 Subject: [PATCH 246/895] Fix UNEXPECTED() paren mistakes. This corrects the paren placement to the intended one. As these functions use zend_result, the success value is zero. Therefore this has no functional change. The only difference is that this now hints the compiler optimizer correctly. Closes GH-10364. --- Zend/zend_API.c | 2 +- Zend/zend_object_handlers.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 622cc6803c3c9..e1e113d0ef39c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4723,7 +4723,7 @@ ZEND_API zend_result zend_update_static_property_ex(zend_class_entry *scope, zen zend_class_entry *old_scope = EG(fake_scope); if (UNEXPECTED(!(scope->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { - if (UNEXPECTED(zend_update_class_constants(scope)) != SUCCESS) { + if (UNEXPECTED(zend_update_class_constants(scope) != SUCCESS)) { return FAILURE; } } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index c6bb6efffb269..ab550497d5c3d 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1541,7 +1541,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend } if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { - if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) { + if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { return NULL; } } From fa1e3f97980aad1b9ac576f7b1751a8faa5c1188 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 18 Jan 2023 14:28:19 +0000 Subject: [PATCH 247/895] Remove pcre_get_compiled_regex_ex() (#10354) --- UPGRADING.INTERNALS | 4 ++++ ext/pcre/php_pcre.c | 19 ------------------- ext/pcre/php_pcre.h | 1 - 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 48a6cf07695d9..e530d472aaf9f 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -65,6 +65,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES mysqlnd_command::shutdown & mysqlnd_conn_data::shutdown have been removed. These functions are deprecated by MySQL in favour of SHUTDOWN SQL statement. + d. ext/pcre + - The function pcre_get_compiled_regex_ex has been removed. + Use pcre_get_compiled_regex instead. + ======================== 4. OpCode changes ======================== diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index f4fd60e96ebef..db5c3d9158055 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -910,25 +910,6 @@ PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture } /* }}} */ -/* {{{ pcre_get_compiled_regex_ex */ -PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options, uint32_t *compile_options) -{ - pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex); - - if (preg_options) { - *preg_options = pce ? pce->preg_options : 0; - } - if (compile_options) { - *compile_options = pce ? pce->compile_options : 0; - } - if (capture_count) { - *capture_count = pce ? pce->capture_count : 0; - } - - return pce ? pce->re : NULL; -} -/* }}} */ - /* XXX For the cases where it's only about match yes/no and no capture required, perhaps just a minimum sized data would suffice. */ PHPAPI pcre2_match_data *php_pcre_create_match_data(uint32_t capture_count, pcre2_code *re) diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 267ad91179d07..a7c4b9cb1c359 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -27,7 +27,6 @@ PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, const char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count); PHPAPI pcre2_code* pcre_get_compiled_regex(zend_string *regex, uint32_t *capture_count); -PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options, uint32_t *coptions); extern zend_module_entry pcre_module_entry; #define pcre_module_ptr &pcre_module_entry From d58f70455b6e97c66a82366c2c5937b144d3bbb0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Jan 2023 11:09:59 +0200 Subject: [PATCH 248/895] Simplify check (in mb_fast_check_utf8) for seeing if 16 bytes are all ASCII characters --- ext/mbstring/mbstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index c70f8d6818d64..8e0eba41cf9d0 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4621,7 +4621,7 @@ static bool mb_fast_check_utf8(zend_string *str) check_operand: /* If all 16 bytes are single-byte characters, then a number of checks can be skipped */ - if (!_mm_movemask_epi8(_mm_cmplt_epi8(operand, _mm_setzero_si128()))) { + if (!_mm_movemask_epi8(operand)) { /* Even if this block only contains single-byte characters, there may have been a * multi-byte character at the end of the previous block, which was supposed to * have continuation bytes in this block @@ -4641,7 +4641,7 @@ static bool mb_fast_check_utf8(zend_string *str) goto finish_up_remaining_bytes; } operand = _mm_loadu_si128((__m128i*)p); - if (_mm_movemask_epi8(_mm_cmplt_epi8(operand, _mm_setzero_si128()))) { + if (_mm_movemask_epi8(operand)) { break; } } From 8902e47f3d274207781d0f828e7fdbb8dd8d52f5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Jan 2023 19:43:49 +0200 Subject: [PATCH 249/895] Simplify checks (in mb_fast_check_utf8) for overlong code units and invalid codepoint values --- ext/mbstring/mbstring.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 8e0eba41cf9d0..17ee81eb46b79 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4659,19 +4659,17 @@ static bool mb_fast_check_utf8(zend_string *str) * 0xED followed by a byte >= 0xA0 indicates a reserved codepoint * We can check for both problems at once by generating a vector where each byte < 0xA0 * is mapped to 0xE0, and each byte >= 0xA0 is mapped to 0xED - * Shift the original block right by one byte, and XOR the shifted block with the bitmask - * Any matches will give a 0x00 byte; do a compare with a zero vector to pick out the - * bad positions, and OR them into `bad` */ + * Shift the original block right by one byte, and compare the shifted block with the bitmask */ __m128i operand2 = _mm_or_si128(_mm_slli_si128(operand, 1), _mm_srli_si128(last_block, 15)); __m128i mask1 = _mm_or_si128(find_e0, _mm_and_si128(_mm_set1_epi8(0xD), _mm_cmpgt_epi8(operand, over_9f))); - bad = _mm_or_si128(bad, _mm_cmpeq_epi8(_mm_setzero_si128(), _mm_xor_si128(operand2, mask1))); + bad = _mm_or_si128(bad, _mm_cmpeq_epi8(operand2, mask1)); /* Check for overlong 4-byte code units AND invalid codepoints > U+10FFFF * Similar to the previous check; 0xF0 followed by < 0x90 indicates an overlong 4-byte * code unit, and 0xF4 followed by >= 0x90 indicates a codepoint over U+10FFFF - * Build the bitmask, XOR it with the shifted block, check for 0x00 bytes in the result */ + * Build the bitmask and compare it with the shifted block */ __m128i mask2 = _mm_or_si128(find_f0, _mm_and_si128(_mm_set1_epi8(0x4), _mm_cmpgt_epi8(operand, over_8f))); - bad = _mm_or_si128(bad, _mm_cmpeq_epi8(_mm_setzero_si128(), _mm_xor_si128(operand2, mask2))); + bad = _mm_or_si128(bad, _mm_cmpeq_epi8(operand2, mask2)); /* Check for overlong 2-byte code units * Any 0xC0 or 0xC1 byte can only be the first byte of an overlong 2-byte code unit From b5e9bf777518e0b21d00dc69340e98db8581d659 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 15 Jan 2023 23:15:40 +0100 Subject: [PATCH 250/895] Fix incorrect check condition in ZEND_YIELD The condition `UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE` always returned false, because `UNEXPECTED(expression)` always returns 0 or 1. Move the parens so the comparison is executed properly. Closes GH-10332. --- NEWS | 2 ++ Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 40 ++++++++++++++++++++-------------------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 3911a49570222..f43d3bf531b7a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.16 +- Core: + . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) 02 Feb 2023, PHP 8.1.15 diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index d869116c33e33..4845a92b95a7e 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8119,7 +8119,7 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMPVAR|CV|UNUSED /* Set the new yielded key */ if (OP2_TYPE != IS_UNUSED) { zval *key = GET_OP2_ZVAL_PTR(BP_VAR_R); - if ((OP2_TYPE & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((OP2_TYPE & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index c22a1a104e93c..a5a5eabf2b037 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7526,7 +7526,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER /* Set the new yielded key */ if (IS_CONST != IS_UNUSED) { zval *key = RT_CONSTANT(opline, opline->op2); - if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -9665,7 +9665,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMPVAR_HANDLE /* Set the new yielded key */ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) { zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); - if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -10508,7 +10508,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE /* Set the new yielded key */ if (IS_UNUSED != IS_UNUSED) { zval *key = NULL; - if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -12020,7 +12020,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE /* Set the new yielded key */ if (IS_CV != IS_UNUSED) { zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); - if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -19834,7 +19834,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z /* Set the new yielded key */ if (IS_CONST != IS_UNUSED) { zval *key = RT_CONSTANT(opline, opline->op2); - if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -20273,7 +20273,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMPVAR_HANDLER( /* Set the new yielded key */ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) { zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); - if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -20733,7 +20733,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER( /* Set the new yielded key */ if (IS_UNUSED != IS_UNUSED) { zval *key = NULL; - if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -21132,7 +21132,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND /* Set the new yielded key */ if (IS_CV != IS_UNUSED) { zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); - if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -24957,7 +24957,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z /* Set the new yielded key */ if (IS_CONST != IS_UNUSED) { zval *key = RT_CONSTANT(opline, opline->op2); - if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -27255,7 +27255,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMPVAR_HANDLER( /* Set the new yielded key */ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) { zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); - if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -29154,7 +29154,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER( /* Set the new yielded key */ if (IS_UNUSED != IS_UNUSED) { zval *key = NULL; - if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -31533,7 +31533,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND /* Set the new yielded key */ if (IS_CV != IS_UNUSED) { zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); - if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -33604,7 +33604,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE /* Set the new yielded key */ if (IS_CONST != IS_UNUSED) { zval *key = RT_CONSTANT(opline, opline->op2); - if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -35341,7 +35341,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMPVAR_HANDL /* Set the new yielded key */ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) { zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); - if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -35883,7 +35883,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDL /* Set the new yielded key */ if (IS_UNUSED != IS_UNUSED) { zval *key = NULL; - if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -37809,7 +37809,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(Z /* Set the new yielded key */ if (IS_CV != IS_UNUSED) { zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); - if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -43038,7 +43038,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE /* Set the new yielded key */ if (IS_CONST != IS_UNUSED) { zval *key = RT_CONSTANT(opline, opline->op2); - if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -46593,7 +46593,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMPVAR_HANDLER(Z /* Set the new yielded key */ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) { zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); - if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if (((IS_TMP_VAR|IS_VAR) & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -48392,7 +48392,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(Z /* Set the new yielded key */ if (IS_UNUSED != IS_UNUSED) { zval *key = NULL; - if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); @@ -51978,7 +51978,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_ /* Set the new yielded key */ if (IS_CV != IS_UNUSED) { zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); - if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) { + if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key) == IS_REFERENCE)) { key = Z_REFVAL_P(key); } ZVAL_COPY(&generator->key, key); From cfa23114d31cb32ae3bea3bfd01eef4c3266a71a Mon Sep 17 00:00:00 2001 From: Marcos Marcolin Date: Tue, 18 Jan 2022 17:41:13 +0100 Subject: [PATCH 251/895] Remove php_pdo_mysql_sqlstate.h This file is unused (at least as of PHP 8.0.0); we also remove the script that could generate it, and the respective info from CONTRIBUTING.md. Closes GH-10363. --- CONTRIBUTING.md | 3 - ext/pdo_mysql/get_error_codes.php | 28 -- ext/pdo_mysql/php_pdo_mysql_sqlstate.h | 646 ------------------------- 3 files changed, 677 deletions(-) delete mode 100755 ext/pdo_mysql/get_error_codes.php delete mode 100644 ext/pdo_mysql/php_pdo_mysql_sqlstate.h diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5423b320e0b8f..14ce3c53dd9fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -185,9 +185,6 @@ locations. └─ pcre/ ├─ pcre2lib/ # https://www.pcre.org/ └─ ... - └─ pdo_mysql/ - ├─ php_pdo_mysql_sqlstate.h # Generated by `ext/pdo_mysql/get_error_codes.php` - └─ ... └─ skeleton/ # Skeleton for developing new extensions with `ext/ext_skel.php` └─ ... └─ standard/ diff --git a/ext/pdo_mysql/get_error_codes.php b/ext/pdo_mysql/get_error_codes.php deleted file mode 100755 index 27910f8dadd10..0000000000000 --- a/ext/pdo_mysql/get_error_codes.php +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env php - $state) { - echo "#ifdef $code\n"; - printf(" case %-{$maxlen}s: return \"%s\";\n", $code, $state); - echo "#endif\n"; - } - - -?> diff --git a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h b/ext/pdo_mysql/php_pdo_mysql_sqlstate.h deleted file mode 100644 index 8f8ccc0116526..0000000000000 --- a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h +++ /dev/null @@ -1,646 +0,0 @@ -/* DO NOT EDIT THIS FILE!!! It is auto generated by get_error_codes.php */ -#ifdef ER_DUP_KEY - case ER_DUP_KEY : return "23000"; -#endif -#ifdef ER_OUTOFMEMORY - case ER_OUTOFMEMORY : return "HY001"; -#endif -#ifdef ER_OUT_OF_SORTMEMORY - case ER_OUT_OF_SORTMEMORY : return "HY001"; -#endif -#ifdef ER_CON_COUNT_ERROR - case ER_CON_COUNT_ERROR : return "08004"; -#endif -#ifdef ER_BAD_HOST_ERROR - case ER_BAD_HOST_ERROR : return "08S01"; -#endif -#ifdef ER_HANDSHAKE_ERROR - case ER_HANDSHAKE_ERROR : return "08S01"; -#endif -#ifdef ER_DBACCESS_DENIED_ERROR - case ER_DBACCESS_DENIED_ERROR : return "42000"; -#endif -#ifdef ER_ACCESS_DENIED_ERROR - case ER_ACCESS_DENIED_ERROR : return "28000"; -#endif -#ifdef ER_NO_DB_ERROR - case ER_NO_DB_ERROR : return "3D000"; -#endif -#ifdef ER_UNKNOWN_COM_ERROR - case ER_UNKNOWN_COM_ERROR : return "08S01"; -#endif -#ifdef ER_BAD_NULL_ERROR - case ER_BAD_NULL_ERROR : return "23000"; -#endif -#ifdef ER_BAD_DB_ERROR - case ER_BAD_DB_ERROR : return "42000"; -#endif -#ifdef ER_TABLE_EXISTS_ERROR - case ER_TABLE_EXISTS_ERROR : return "42S01"; -#endif -#ifdef ER_BAD_TABLE_ERROR - case ER_BAD_TABLE_ERROR : return "42S02"; -#endif -#ifdef ER_NON_UNIQ_ERROR - case ER_NON_UNIQ_ERROR : return "23000"; -#endif -#ifdef ER_SERVER_SHUTDOWN - case ER_SERVER_SHUTDOWN : return "08S01"; -#endif -#ifdef ER_BAD_FIELD_ERROR - case ER_BAD_FIELD_ERROR : return "42S22"; -#endif -#ifdef ER_WRONG_FIELD_WITH_GROUP - case ER_WRONG_FIELD_WITH_GROUP : return "42000"; -#endif -#ifdef ER_WRONG_GROUP_FIELD - case ER_WRONG_GROUP_FIELD : return "42000"; -#endif -#ifdef ER_WRONG_SUM_SELECT - case ER_WRONG_SUM_SELECT : return "42000"; -#endif -#ifdef ER_WRONG_VALUE_COUNT - case ER_WRONG_VALUE_COUNT : return "21S01"; -#endif -#ifdef ER_TOO_LONG_IDENT - case ER_TOO_LONG_IDENT : return "42000"; -#endif -#ifdef ER_DUP_FIELDNAME - case ER_DUP_FIELDNAME : return "42S21"; -#endif -#ifdef ER_DUP_KEYNAME - case ER_DUP_KEYNAME : return "42000"; -#endif -#ifdef ER_DUP_ENTRY - case ER_DUP_ENTRY : return "23000"; -#endif -#ifdef ER_WRONG_FIELD_SPEC - case ER_WRONG_FIELD_SPEC : return "42000"; -#endif -#ifdef ER_PARSE_ERROR - case ER_PARSE_ERROR : return "42000"; -#endif -#ifdef ER_EMPTY_QUERY - case ER_EMPTY_QUERY : return "42000"; -#endif -#ifdef ER_NONUNIQ_TABLE - case ER_NONUNIQ_TABLE : return "42000"; -#endif -#ifdef ER_INVALID_DEFAULT - case ER_INVALID_DEFAULT : return "42000"; -#endif -#ifdef ER_MULTIPLE_PRI_KEY - case ER_MULTIPLE_PRI_KEY : return "42000"; -#endif -#ifdef ER_TOO_MANY_KEYS - case ER_TOO_MANY_KEYS : return "42000"; -#endif -#ifdef ER_TOO_MANY_KEY_PARTS - case ER_TOO_MANY_KEY_PARTS : return "42000"; -#endif -#ifdef ER_TOO_LONG_KEY - case ER_TOO_LONG_KEY : return "42000"; -#endif -#ifdef ER_KEY_COLUMN_DOES_NOT_EXITS - case ER_KEY_COLUMN_DOES_NOT_EXITS : return "42000"; -#endif -#ifdef ER_BLOB_USED_AS_KEY - case ER_BLOB_USED_AS_KEY : return "42000"; -#endif -#ifdef ER_TOO_BIG_FIELDLENGTH - case ER_TOO_BIG_FIELDLENGTH : return "42000"; -#endif -#ifdef ER_WRONG_AUTO_KEY - case ER_WRONG_AUTO_KEY : return "42000"; -#endif -#ifdef ER_FORCING_CLOSE - case ER_FORCING_CLOSE : return "08S01"; -#endif -#ifdef ER_IPSOCK_ERROR - case ER_IPSOCK_ERROR : return "08S01"; -#endif -#ifdef ER_NO_SUCH_INDEX - case ER_NO_SUCH_INDEX : return "42S12"; -#endif -#ifdef ER_WRONG_FIELD_TERMINATORS - case ER_WRONG_FIELD_TERMINATORS : return "42000"; -#endif -#ifdef ER_BLOBS_AND_NO_TERMINATED - case ER_BLOBS_AND_NO_TERMINATED : return "42000"; -#endif -#ifdef ER_CANT_REMOVE_ALL_FIELDS - case ER_CANT_REMOVE_ALL_FIELDS : return "42000"; -#endif -#ifdef ER_CANT_DROP_FIELD_OR_KEY - case ER_CANT_DROP_FIELD_OR_KEY : return "42000"; -#endif -#ifdef ER_BLOB_CANT_HAVE_DEFAULT - case ER_BLOB_CANT_HAVE_DEFAULT : return "42000"; -#endif -#ifdef ER_WRONG_DB_NAME - case ER_WRONG_DB_NAME : return "42000"; -#endif -#ifdef ER_WRONG_TABLE_NAME - case ER_WRONG_TABLE_NAME : return "42000"; -#endif -#ifdef ER_TOO_BIG_SELECT - case ER_TOO_BIG_SELECT : return "42000"; -#endif -#ifdef ER_UNKNOWN_PROCEDURE - case ER_UNKNOWN_PROCEDURE : return "42000"; -#endif -#ifdef ER_WRONG_PARAMCOUNT_TO_PROCEDURE - case ER_WRONG_PARAMCOUNT_TO_PROCEDURE : return "42000"; -#endif -#ifdef ER_UNKNOWN_TABLE - case ER_UNKNOWN_TABLE : return "42S02"; -#endif -#ifdef ER_FIELD_SPECIFIED_TWICE - case ER_FIELD_SPECIFIED_TWICE : return "42000"; -#endif -#ifdef ER_UNSUPPORTED_EXTENSION - case ER_UNSUPPORTED_EXTENSION : return "42000"; -#endif -#ifdef ER_TABLE_MUST_HAVE_COLUMNS - case ER_TABLE_MUST_HAVE_COLUMNS : return "42000"; -#endif -#ifdef ER_UNKNOWN_CHARACTER_SET - case ER_UNKNOWN_CHARACTER_SET : return "42000"; -#endif -#ifdef ER_TOO_BIG_ROWSIZE - case ER_TOO_BIG_ROWSIZE : return "42000"; -#endif -#ifdef ER_WRONG_OUTER_JOIN - case ER_WRONG_OUTER_JOIN : return "42000"; -#endif -#ifdef ER_NULL_COLUMN_IN_INDEX - case ER_NULL_COLUMN_IN_INDEX : return "42000"; -#endif -#ifdef ER_PASSWORD_ANONYMOUS_USER - case ER_PASSWORD_ANONYMOUS_USER : return "42000"; -#endif -#ifdef ER_PASSWORD_NOT_ALLOWED - case ER_PASSWORD_NOT_ALLOWED : return "42000"; -#endif -#ifdef ER_PASSWORD_NO_MATCH - case ER_PASSWORD_NO_MATCH : return "42000"; -#endif -#ifdef ER_WRONG_VALUE_COUNT_ON_ROW - case ER_WRONG_VALUE_COUNT_ON_ROW : return "21S01"; -#endif -#ifdef ER_INVALID_USE_OF_NULL - case ER_INVALID_USE_OF_NULL : return "22004"; -#endif -#ifdef ER_REGEXP_ERROR - case ER_REGEXP_ERROR : return "42000"; -#endif -#ifdef ER_MIX_OF_GROUP_FUNC_AND_FIELDS - case ER_MIX_OF_GROUP_FUNC_AND_FIELDS : return "42000"; -#endif -#ifdef ER_NONEXISTING_GRANT - case ER_NONEXISTING_GRANT : return "42000"; -#endif -#ifdef ER_TABLEACCESS_DENIED_ERROR - case ER_TABLEACCESS_DENIED_ERROR : return "42000"; -#endif -#ifdef ER_COLUMNACCESS_DENIED_ERROR - case ER_COLUMNACCESS_DENIED_ERROR : return "42000"; -#endif -#ifdef ER_ILLEGAL_GRANT_FOR_TABLE - case ER_ILLEGAL_GRANT_FOR_TABLE : return "42000"; -#endif -#ifdef ER_GRANT_WRONG_HOST_OR_USER - case ER_GRANT_WRONG_HOST_OR_USER : return "42000"; -#endif -#ifdef ER_NO_SUCH_TABLE - case ER_NO_SUCH_TABLE : return "42S02"; -#endif -#ifdef ER_NONEXISTING_TABLE_GRANT - case ER_NONEXISTING_TABLE_GRANT : return "42000"; -#endif -#ifdef ER_NOT_ALLOWED_COMMAND - case ER_NOT_ALLOWED_COMMAND : return "42000"; -#endif -#ifdef ER_SYNTAX_ERROR - case ER_SYNTAX_ERROR : return "42000"; -#endif -#ifdef ER_ABORTING_CONNECTION - case ER_ABORTING_CONNECTION : return "08S01"; -#endif -#ifdef ER_NET_PACKET_TOO_LARGE - case ER_NET_PACKET_TOO_LARGE : return "08S01"; -#endif -#ifdef ER_NET_READ_ERROR_FROM_PIPE - case ER_NET_READ_ERROR_FROM_PIPE : return "08S01"; -#endif -#ifdef ER_NET_FCNTL_ERROR - case ER_NET_FCNTL_ERROR : return "08S01"; -#endif -#ifdef ER_NET_PACKETS_OUT_OF_ORDER - case ER_NET_PACKETS_OUT_OF_ORDER : return "08S01"; -#endif -#ifdef ER_NET_UNCOMPRESS_ERROR - case ER_NET_UNCOMPRESS_ERROR : return "08S01"; -#endif -#ifdef ER_NET_READ_ERROR - case ER_NET_READ_ERROR : return "08S01"; -#endif -#ifdef ER_NET_READ_INTERRUPTED - case ER_NET_READ_INTERRUPTED : return "08S01"; -#endif -#ifdef ER_NET_ERROR_ON_WRITE - case ER_NET_ERROR_ON_WRITE : return "08S01"; -#endif -#ifdef ER_NET_WRITE_INTERRUPTED - case ER_NET_WRITE_INTERRUPTED : return "08S01"; -#endif -#ifdef ER_TOO_LONG_STRING - case ER_TOO_LONG_STRING : return "42000"; -#endif -#ifdef ER_TABLE_CANT_HANDLE_BLOB - case ER_TABLE_CANT_HANDLE_BLOB : return "42000"; -#endif -#ifdef ER_TABLE_CANT_HANDLE_AUTO_INCREMENT - case ER_TABLE_CANT_HANDLE_AUTO_INCREMENT : return "42000"; -#endif -#ifdef ER_WRONG_COLUMN_NAME - case ER_WRONG_COLUMN_NAME : return "42000"; -#endif -#ifdef ER_WRONG_KEY_COLUMN - case ER_WRONG_KEY_COLUMN : return "42000"; -#endif -#ifdef ER_DUP_UNIQUE - case ER_DUP_UNIQUE : return "23000"; -#endif -#ifdef ER_BLOB_KEY_WITHOUT_LENGTH - case ER_BLOB_KEY_WITHOUT_LENGTH : return "42000"; -#endif -#ifdef ER_PRIMARY_CANT_HAVE_NULL - case ER_PRIMARY_CANT_HAVE_NULL : return "42000"; -#endif -#ifdef ER_TOO_MANY_ROWS - case ER_TOO_MANY_ROWS : return "42000"; -#endif -#ifdef ER_REQUIRES_PRIMARY_KEY - case ER_REQUIRES_PRIMARY_KEY : return "42000"; -#endif -#ifdef ER_KEY_DOES_NOT_EXITS - case ER_KEY_DOES_NOT_EXITS : return "42000"; -#endif -#ifdef ER_CHECK_NO_SUCH_TABLE - case ER_CHECK_NO_SUCH_TABLE : return "42000"; -#endif -#ifdef ER_CHECK_NOT_IMPLEMENTED - case ER_CHECK_NOT_IMPLEMENTED : return "42000"; -#endif -#ifdef ER_CANT_DO_THIS_DURING_AN_TRANSACTION - case ER_CANT_DO_THIS_DURING_AN_TRANSACTION : return "25000"; -#endif -#ifdef ER_NEW_ABORTING_CONNECTION - case ER_NEW_ABORTING_CONNECTION : return "08S01"; -#endif -#ifdef ER_MASTER_NET_READ - case ER_MASTER_NET_READ : return "08S01"; -#endif -#ifdef ER_MASTER_NET_WRITE - case ER_MASTER_NET_WRITE : return "08S01"; -#endif -#ifdef ER_TOO_MANY_USER_CONNECTIONS - case ER_TOO_MANY_USER_CONNECTIONS : return "42000"; -#endif -#ifdef ER_READ_ONLY_TRANSACTION - case ER_READ_ONLY_TRANSACTION : return "25000"; -#endif -#ifdef ER_NO_PERMISSION_TO_CREATE_USER - case ER_NO_PERMISSION_TO_CREATE_USER : return "42000"; -#endif -#ifdef ER_LOCK_DEADLOCK - case ER_LOCK_DEADLOCK : return "40001"; -#endif -#ifdef ER_NO_REFERENCED_ROW - case ER_NO_REFERENCED_ROW : return "23000"; -#endif -#ifdef ER_ROW_IS_REFERENCED - case ER_ROW_IS_REFERENCED : return "23000"; -#endif -#ifdef ER_CONNECT_TO_MASTER - case ER_CONNECT_TO_MASTER : return "08S01"; -#endif -#ifdef ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT - case ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT : return "21000"; -#endif -#ifdef ER_USER_LIMIT_REACHED - case ER_USER_LIMIT_REACHED : return "42000"; -#endif -#ifdef ER_SPECIFIC_ACCESS_DENIED_ERROR - case ER_SPECIFIC_ACCESS_DENIED_ERROR : return "42000"; -#endif -#ifdef ER_NO_DEFAULT - case ER_NO_DEFAULT : return "42000"; -#endif -#ifdef ER_WRONG_VALUE_FOR_VAR - case ER_WRONG_VALUE_FOR_VAR : return "42000"; -#endif -#ifdef ER_WRONG_TYPE_FOR_VAR - case ER_WRONG_TYPE_FOR_VAR : return "42000"; -#endif -#ifdef ER_CANT_USE_OPTION_HERE - case ER_CANT_USE_OPTION_HERE : return "42000"; -#endif -#ifdef ER_NOT_SUPPORTED_YET - case ER_NOT_SUPPORTED_YET : return "42000"; -#endif -#ifdef ER_WRONG_FK_DEF - case ER_WRONG_FK_DEF : return "42000"; -#endif -#ifdef ER_OPERAND_COLUMNS - case ER_OPERAND_COLUMNS : return "21000"; -#endif -#ifdef ER_SUBQUERY_NO_1_ROW - case ER_SUBQUERY_NO_1_ROW : return "21000"; -#endif -#ifdef ER_ILLEGAL_REFERENCE - case ER_ILLEGAL_REFERENCE : return "42S22"; -#endif -#ifdef ER_DERIVED_MUST_HAVE_ALIAS - case ER_DERIVED_MUST_HAVE_ALIAS : return "42000"; -#endif -#ifdef ER_SELECT_REDUCED - case ER_SELECT_REDUCED : return "01000"; -#endif -#ifdef ER_TABLENAME_NOT_ALLOWED_HERE - case ER_TABLENAME_NOT_ALLOWED_HERE : return "42000"; -#endif -#ifdef ER_NOT_SUPPORTED_AUTH_MODE - case ER_NOT_SUPPORTED_AUTH_MODE : return "08004"; -#endif -#ifdef ER_SPATIAL_CANT_HAVE_NULL - case ER_SPATIAL_CANT_HAVE_NULL : return "42000"; -#endif -#ifdef ER_COLLATION_CHARSET_MISMATCH - case ER_COLLATION_CHARSET_MISMATCH : return "42000"; -#endif -#ifdef ER_WARN_TOO_FEW_RECORDS - case ER_WARN_TOO_FEW_RECORDS : return "01000"; -#endif -#ifdef ER_WARN_TOO_MANY_RECORDS - case ER_WARN_TOO_MANY_RECORDS : return "01000"; -#endif -#ifdef ER_WARN_NULL_TO_NOTNULL - case ER_WARN_NULL_TO_NOTNULL : return "22004"; -#endif -#ifdef ER_WARN_DATA_OUT_OF_RANGE - case ER_WARN_DATA_OUT_OF_RANGE : return "22003"; -#endif -#ifdef ER_WRONG_NAME_FOR_INDEX - case ER_WRONG_NAME_FOR_INDEX : return "42000"; -#endif -#ifdef ER_WRONG_NAME_FOR_CATALOG - case ER_WRONG_NAME_FOR_CATALOG : return "42000"; -#endif -#ifdef ER_UNKNOWN_STORAGE_ENGINE - case ER_UNKNOWN_STORAGE_ENGINE : return "42000"; -#endif -#ifdef ER_TRUNCATED_WRONG_VALUE - case ER_TRUNCATED_WRONG_VALUE : return "22007"; -#endif -#ifdef ER_SP_NO_RECURSIVE_CREATE - case ER_SP_NO_RECURSIVE_CREATE : return "2F003"; -#endif -#ifdef ER_SP_ALREADY_EXISTS - case ER_SP_ALREADY_EXISTS : return "42000"; -#endif -#ifdef ER_SP_DOES_NOT_EXIST - case ER_SP_DOES_NOT_EXIST : return "42000"; -#endif -#ifdef ER_SP_LILABEL_MISMATCH - case ER_SP_LILABEL_MISMATCH : return "42000"; -#endif -#ifdef ER_SP_LABEL_REDEFINE - case ER_SP_LABEL_REDEFINE : return "42000"; -#endif -#ifdef ER_SP_LABEL_MISMATCH - case ER_SP_LABEL_MISMATCH : return "42000"; -#endif -#ifdef ER_SP_UNINIT_VAR - case ER_SP_UNINIT_VAR : return "01000"; -#endif -#ifdef ER_SP_BADSELECT - case ER_SP_BADSELECT : return "0A000"; -#endif -#ifdef ER_SP_BADRETURN - case ER_SP_BADRETURN : return "42000"; -#endif -#ifdef ER_SP_BADSTATEMENT - case ER_SP_BADSTATEMENT : return "0A000"; -#endif -#ifdef ER_UPDATE_LOG_DEPRECATED_IGNORED - case ER_UPDATE_LOG_DEPRECATED_IGNORED : return "42000"; -#endif -#ifdef ER_UPDATE_LOG_DEPRECATED_TRANSLATED - case ER_UPDATE_LOG_DEPRECATED_TRANSLATED : return "42000"; -#endif -#ifdef ER_QUERY_INTERRUPTED - case ER_QUERY_INTERRUPTED : return "70100"; -#endif -#ifdef ER_SP_WRONG_NO_OF_ARGS - case ER_SP_WRONG_NO_OF_ARGS : return "42000"; -#endif -#ifdef ER_SP_COND_MISMATCH - case ER_SP_COND_MISMATCH : return "42000"; -#endif -#ifdef ER_SP_NORETURN - case ER_SP_NORETURN : return "42000"; -#endif -#ifdef ER_SP_NORETURNEND - case ER_SP_NORETURNEND : return "2F005"; -#endif -#ifdef ER_SP_BAD_CURSOR_QUERY - case ER_SP_BAD_CURSOR_QUERY : return "42000"; -#endif -#ifdef ER_SP_BAD_CURSOR_SELECT - case ER_SP_BAD_CURSOR_SELECT : return "42000"; -#endif -#ifdef ER_SP_CURSOR_MISMATCH - case ER_SP_CURSOR_MISMATCH : return "42000"; -#endif -#ifdef ER_SP_CURSOR_ALREADY_OPEN - case ER_SP_CURSOR_ALREADY_OPEN : return "24000"; -#endif -#ifdef ER_SP_CURSOR_NOT_OPEN - case ER_SP_CURSOR_NOT_OPEN : return "24000"; -#endif -#ifdef ER_SP_UNDECLARED_VAR - case ER_SP_UNDECLARED_VAR : return "42000"; -#endif -#ifdef ER_SP_FETCH_NO_DATA - case ER_SP_FETCH_NO_DATA : return "02000"; -#endif -#ifdef ER_SP_DUP_PARAM - case ER_SP_DUP_PARAM : return "42000"; -#endif -#ifdef ER_SP_DUP_VAR - case ER_SP_DUP_VAR : return "42000"; -#endif -#ifdef ER_SP_DUP_COND - case ER_SP_DUP_COND : return "42000"; -#endif -#ifdef ER_SP_DUP_CURS - case ER_SP_DUP_CURS : return "42000"; -#endif -#ifdef ER_SP_SUBSELECT_NYI - case ER_SP_SUBSELECT_NYI : return "0A000"; -#endif -#ifdef ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG - case ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG : return "0A000"; -#endif -#ifdef ER_SP_VARCOND_AFTER_CURSHNDLR - case ER_SP_VARCOND_AFTER_CURSHNDLR : return "42000"; -#endif -#ifdef ER_SP_CURSOR_AFTER_HANDLER - case ER_SP_CURSOR_AFTER_HANDLER : return "42000"; -#endif -#ifdef ER_SP_CASE_NOT_FOUND - case ER_SP_CASE_NOT_FOUND : return "20000"; -#endif -#ifdef ER_DIVISION_BY_ZERO - case ER_DIVISION_BY_ZERO : return "22012"; -#endif -#ifdef ER_ILLEGAL_VALUE_FOR_TYPE - case ER_ILLEGAL_VALUE_FOR_TYPE : return "22007"; -#endif -#ifdef ER_PROCACCESS_DENIED_ERROR - case ER_PROCACCESS_DENIED_ERROR : return "42000"; -#endif -#ifdef ER_XAER_NOTA - case ER_XAER_NOTA : return "XAE04"; -#endif -#ifdef ER_XAER_INVAL - case ER_XAER_INVAL : return "XAE05"; -#endif -#ifdef ER_XAER_RMFAIL - case ER_XAER_RMFAIL : return "XAE07"; -#endif -#ifdef ER_XAER_OUTSIDE - case ER_XAER_OUTSIDE : return "XAE09"; -#endif -#ifdef ER_XAER_RMERR - case ER_XAER_RMERR : return "XAE03"; -#endif -#ifdef ER_XA_RBROLLBACK - case ER_XA_RBROLLBACK : return "XA100"; -#endif -#ifdef ER_NONEXISTING_PROC_GRANT - case ER_NONEXISTING_PROC_GRANT : return "42000"; -#endif -#ifdef ER_DATA_TOO_LONG - case ER_DATA_TOO_LONG : return "22001"; -#endif -#ifdef ER_SP_BAD_SQLSTATE - case ER_SP_BAD_SQLSTATE : return "42000"; -#endif -#ifdef ER_CANT_CREATE_USER_WITH_GRANT - case ER_CANT_CREATE_USER_WITH_GRANT : return "42000"; -#endif -#ifdef ER_SP_DUP_HANDLER - case ER_SP_DUP_HANDLER : return "42000"; -#endif -#ifdef ER_SP_NOT_VAR_ARG - case ER_SP_NOT_VAR_ARG : return "42000"; -#endif -#ifdef ER_SP_NO_RETSET - case ER_SP_NO_RETSET : return "0A000"; -#endif -#ifdef ER_CANT_CREATE_GEOMETRY_OBJECT - case ER_CANT_CREATE_GEOMETRY_OBJECT : return "22003"; -#endif -#ifdef ER_TOO_BIG_SCALE - case ER_TOO_BIG_SCALE : return "42000"; -#endif -#ifdef ER_TOO_BIG_PRECISION - case ER_TOO_BIG_PRECISION : return "42000"; -#endif -#ifdef ER_M_BIGGER_THAN_D - case ER_M_BIGGER_THAN_D : return "42000"; -#endif -#ifdef ER_TOO_LONG_BODY - case ER_TOO_LONG_BODY : return "42000"; -#endif -#ifdef ER_TOO_BIG_DISPLAYWIDTH - case ER_TOO_BIG_DISPLAYWIDTH : return "42000"; -#endif -#ifdef ER_XAER_DUPID - case ER_XAER_DUPID : return "XAE08"; -#endif -#ifdef ER_DATETIME_FUNCTION_OVERFLOW - case ER_DATETIME_FUNCTION_OVERFLOW : return "22008"; -#endif -#ifdef ER_ROW_IS_REFERENCED_2 - case ER_ROW_IS_REFERENCED_2 : return "23000"; -#endif -#ifdef ER_NO_REFERENCED_ROW_2 - case ER_NO_REFERENCED_ROW_2 : return "23000"; -#endif -#ifdef ER_SP_BAD_VAR_SHADOW - case ER_SP_BAD_VAR_SHADOW : return "42000"; -#endif -#ifdef ER_SP_WRONG_NAME - case ER_SP_WRONG_NAME : return "42000"; -#endif -#ifdef ER_SP_NO_AGGREGATE - case ER_SP_NO_AGGREGATE : return "42000"; -#endif -#ifdef ER_MAX_PREPARED_STMT_COUNT_REACHED - case ER_MAX_PREPARED_STMT_COUNT_REACHED : return "42000"; -#endif -#ifdef ER_NON_GROUPING_FIELD_USED - case ER_NON_GROUPING_FIELD_USED : return "42000"; -#endif -#ifdef ER_FOREIGN_DUPLICATE_KEY - case ER_FOREIGN_DUPLICATE_KEY : return "23000"; -#endif -#ifdef ER_CANT_CHANGE_TX_ISOLATION - case ER_CANT_CHANGE_TX_ISOLATION : return "25001"; -#endif -#ifdef ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT - case ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT : return "42000"; -#endif -#ifdef ER_WRONG_PARAMETERS_TO_NATIVE_FCT - case ER_WRONG_PARAMETERS_TO_NATIVE_FCT : return "42000"; -#endif -#ifdef ER_WRONG_PARAMETERS_TO_STORED_FCT - case ER_WRONG_PARAMETERS_TO_STORED_FCT : return "42000"; -#endif -#ifdef ER_DUP_ENTRY_WITH_KEY_NAME - case ER_DUP_ENTRY_WITH_KEY_NAME : return "23000"; -#endif -#ifdef ER_XA_RBTIMEOUT - case ER_XA_RBTIMEOUT : return "XA106"; -#endif -#ifdef ER_XA_RBDEADLOCK - case ER_XA_RBDEADLOCK : return "XA102"; -#endif -#ifdef ER_FUNC_INEXISTENT_NAME_COLLISION - case ER_FUNC_INEXISTENT_NAME_COLLISION : return "42000"; -#endif -#ifdef ER_DUP_SIGNAL_SET - case ER_DUP_SIGNAL_SET : return "42000"; -#endif -#ifdef ER_SIGNAL_WARN - case ER_SIGNAL_WARN : return "01000"; -#endif -#ifdef ER_SIGNAL_NOT_FOUND - case ER_SIGNAL_NOT_FOUND : return "02000"; -#endif -#ifdef ER_SIGNAL_EXCEPTION - case ER_SIGNAL_EXCEPTION : return "HY000"; -#endif -#ifdef ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER - case ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER : return "0K000"; -#endif -#ifdef ER_SPATIAL_MUST_HAVE_GEOM_COL - case ER_SPATIAL_MUST_HAVE_GEOM_COL : return "42000"; -#endif -#ifdef ER_DATA_OUT_OF_RANGE - case ER_DATA_OUT_OF_RANGE : return "22003"; -#endif From 9f02a11846fb3bebf4e82b4b36cf0b5b92bfe6c8 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:27:48 +0100 Subject: [PATCH 252/895] Fix incorrect UNEXPECTED paren placement in zend_gc.c Closes GH-10371. --- Zend/zend_gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 66324672b1e9c..2ed34b3e48128 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -591,7 +591,7 @@ static zend_never_inline void ZEND_FASTCALL gc_possible_root_when_full(zend_refc if (GC_G(gc_enabled) && !GC_G(gc_active)) { GC_ADDREF(ref); gc_adjust_threshold(gc_collect_cycles()); - if (UNEXPECTED(GC_DELREF(ref)) == 0) { + if (UNEXPECTED(GC_DELREF(ref) == 0)) { rc_dtor_func(ref); return; } else if (UNEXPECTED(GC_INFO(ref))) { From 7d68f9128eb58f1b6f31e4a38134b58dae846ed8 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 19 Jan 2023 07:40:24 +0300 Subject: [PATCH 253/895] Fix incorrect compilation of FE_FETCH with predicted empty array Fixes ext/opcache/tests/sccp_loop_var_free.phpt with opcache.jit=1205 and opcache.optimization_level=0 --- ext/opcache/jit/zend_jit_arm64.dasc | 14 ++++++++++++++ ext/opcache/jit/zend_jit_x86.dasc | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index 5c201252d7d3a..7bca5be068b18 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -14536,6 +14536,20 @@ static int zend_jit_fe_fetch(dasm_State **Dst, const zend_op *opline, uint32_t o { zend_jit_addr op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var); + if (!MAY_BE_HASH(op1_info) && !MAY_BE_PACKED(op1_info)) { + /* empty array */ + if (exit_addr) { + if (exit_opcode == ZEND_JMP) { + | b &exit_addr + } else { + | b >3 + } + } else { + | b =>target_label + } + return 1; + } + | // array = EX_VAR(opline->op1.var); | // fe_ht = Z_ARRVAL_P(array); | GET_ZVAL_PTR FCARG1x, op1_addr, TMP1 diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 57a2cc9b28c96..af4500d9835a1 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -15438,6 +15438,20 @@ static int zend_jit_fe_fetch(dasm_State **Dst, const zend_op *opline, uint32_t o { zend_jit_addr op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var); + if (!MAY_BE_HASH(op1_info) && !MAY_BE_PACKED(op1_info)) { + /* empty array */ + if (exit_addr) { + if (exit_opcode == ZEND_JMP) { + | jmp &exit_addr + } else { + | jmp >3 + } + } else { + | jmp =>target_label + } + return 1; + } + | // array = EX_VAR(opline->op1.var); | // fe_ht = Z_ARRVAL_P(array); | GET_ZVAL_PTR FCARG1a, op1_addr From cb840799b487133ac3f6f8d5812245572868d13b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Jan 2023 18:10:04 +0200 Subject: [PATCH 254/895] mb_detect_encoding is more accurate on strings with UTF-8/16 BOM Thanks to the GitHub user 'titanz35' for pointing out that the new implementation of mb_detect_encoding had poor detection accuracy on UTF-8 and UTF-16 strings with a byte-order mark. --- NEWS | 2 ++ ext/mbstring/mbstring.c | 19 +++++++++++++++++++ ext/mbstring/tests/mb_detect_encoding.phpt | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/NEWS b/NEWS index 7b4bdcab346c7..76dd04a4ac913 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,8 @@ PHP NEWS casing rules for the Greek letter sigma. For mb_convert_case, conditional casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. (Alex Dowad) + . mb_detect_encoding is better able to identify UTF-8 and UTF-16 strings + with a byte-order mark. (Alex Dowad) - Opcache: . Added start, restart and force restart time to opcache's diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 17ee81eb46b79..feeff57112091 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -43,6 +43,7 @@ #include "libmbfl/filters/mbfilter_uuencode.h" #include "libmbfl/filters/mbfilter_ucs4.h" #include "libmbfl/filters/mbfilter_utf8.h" +#include "libmbfl/filters/mbfilter_utf16.h" #include "libmbfl/filters/mbfilter_singlebyte.h" #include "libmbfl/filters/translit_kana_jisx0201_jisx0208.h" @@ -2994,6 +2995,24 @@ static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, data[i].in_len = in_len; data[i].state = 0; data[i].demerits = 0; + + /* Skip byte order mark for UTF-8, UTF-16BE, or UTF-16LE */ + if (elist[i] == &mbfl_encoding_utf8) { + if (in_len >= 3 && in[0] == 0xEF && in[1] == 0xBB && in[2] == 0xBF) { + data[i].in_len -= 3; + data[i].in += 3; + } + } else if (elist[i] == &mbfl_encoding_utf16be) { + if (in_len >= 2 && in[0] == 0xFE && in[1] == 0xFF) { + data[i].in_len -= 2; + data[i].in += 2; + } + } else if (elist[i] == &mbfl_encoding_utf16le) { + if (in_len >= 2 && in[0] == 0xFF && in[1] == 0xFE) { + data[i].in_len -= 2; + data[i].in += 2; + } + } } unsigned int finished = 0; /* For how many candidate encodings have we processed all the input? */ diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index 7bcf8016f0049..f5a4c4833d7a7 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -100,6 +100,19 @@ try { echo $e->getMessage() . \PHP_EOL; } +echo "== BOM TEST ==\n"; + +$str = chr(239).chr(187).chr(191).chr(195).chr(180); // UTF-8 BOM followed by ô +var_dump(mb_detect_encoding($str, ['UTF-8', 'ISO-8859-1'], true)); +// U+4E4E is the Chinese character 乎; normally it would be impossible to distinguish UTF-16LE from UTF-16BE +// But the BOM can tell us which one it is +var_dump(mb_detect_encoding("\xFE\xFF\x4E\x4E", ['UTF-8', 'ISO-8859-1', 'UTF-16LE', 'UTF-16BE'], true)); +var_dump(mb_detect_encoding("\xFF\xFE\x4E\x4E", ['UTF-8', 'ISO-8859-1', 'UTF-16LE', 'UTF-16BE'], true)); +// However, a BOM should only appear at the beginning of the string +$detected = mb_detect_encoding("\x4E\x4E\xFE\xFF\x4E\x4E", ['UTF-8', 'ISO-8859-1', 'UTF-16LE', 'UTF-16BE'], true); +if ($detected === 'UTF-16BE' || $detected === 'UTF-16LE') + die("Don't accept a BOM in the middle of a string"); + echo "== TORTURE TEST ==\n"; function test($strings, $encodings) { @@ -373,5 +386,9 @@ SJIS: SJIS INT: EUC-JP EUC-JP: EUC-JP mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "BAD" +== BOM TEST == +string(5) "UTF-8" +string(8) "UTF-16BE" +string(8) "UTF-16LE" == TORTURE TEST == Done! From 148ac364e998061774d440932ca4b8feff1c7612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 17 Jan 2023 19:03:20 +0100 Subject: [PATCH 255/895] Customize the link of some constants in the manual These changes are necessary because the links which are generated by default are already taken. --- ext/ffi/ffi.stub.php | 1 + ext/ffi/ffi_arginfo.h | 2 +- ext/snmp/snmp.stub.php | 12 ++++++++++++ ext/snmp/snmp_arginfo.h | 2 +- ext/sqlite3/sqlite3.stub.php | 37 +++++++++++++++++++++++++++++++++++ ext/sqlite3/sqlite3_arginfo.h | 2 +- ext/zip/php_zip.stub.php | 21 ++++++++++++++++++++ ext/zip/php_zip_arginfo.h | 2 +- 8 files changed, 75 insertions(+), 4 deletions(-) diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index e492963616fb4..f05e938aff91d 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -10,6 +10,7 @@ final class FFI /** * @var int * @cvalue __BIGGEST_ALIGNMENT__ + * @link ffi-ffi.constants.biggest-alignment */ public const __BIGGEST_ALIGNMENT__ = UNKNOWN; diff --git a/ext/ffi/ffi_arginfo.h b/ext/ffi/ffi_arginfo.h index 23f678c47a47d..48437128ac32f 100644 --- a/ext/ffi/ffi_arginfo.h +++ b/ext/ffi/ffi_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 63f0ea1625eca4bb8309387d1b5626c10f2d101b */ + * Stub hash: dd91ae1826acbc9b89cd74477edf8784216f1a63 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"") diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index 175c3cdc6461e..84fc738354aeb 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -186,62 +186,74 @@ class SNMP /** * @var int * @cvalue SNMP_VERSION_1 + * @link snmp.class.constants.version-1 */ public const VERSION_1 = UNKNOWN; /** * @var int * @cvalue SNMP_VERSION_2c + * @link snmp.class.constants.version-2c */ public const VERSION_2c = UNKNOWN; /** * @var int * @cvalue SNMP_VERSION_2c + * @link snmp.class.constants.version-2c */ public const VERSION_2C = UNKNOWN; /** * @var int * @cvalue SNMP_VERSION_3 + * @link snmp.class.constants.version-3 */ public const VERSION_3 = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_NOERROR + * @link snmp.class.constants.errno-noerror */ public const ERRNO_NOERROR = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_ANY + * @link snmp.class.constants.errno-any */ public const ERRNO_ANY = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_GENERIC + * @link snmp.class.constants.errno-generic */ public const ERRNO_GENERIC = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_TIMEOUT + * @link snmp.class.constants.errno-timeout */ public const ERRNO_TIMEOUT = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_ERROR_IN_REPLY + * @link snmp.class.constants.errno-error-in-reply */ public const ERRNO_ERROR_IN_REPLY = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_OID_NOT_INCREASING + * @link snmp.class.constants.errno-oid-not-increasing */ public const ERRNO_OID_NOT_INCREASING = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_OID_PARSING_ERROR + * @link snmp.class.constants.errno-oid-parsing-error */ public const ERRNO_OID_PARSING_ERROR = UNKNOWN; /** * @var int * @cvalue PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES + * @link snmp.class.constants.errno-multiple-set-queries */ public const ERRNO_MULTIPLE_SET_QUERIES = UNKNOWN; diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h index 19974c85753e3..bbe95f1dd2cfb 100644 --- a/ext/snmp/snmp_arginfo.h +++ b/ext/snmp/snmp_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: feff81a6d260b4c1c1d3f3acd11c564a5800e1c5 */ + * Stub hash: a79a697fa8c1ab2513bde03e0c2367d0caaec7d8 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmpget, 0, 3, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) diff --git a/ext/sqlite3/sqlite3.stub.php b/ext/sqlite3/sqlite3.stub.php index 8c8bf7edce5df..639a5fb782fc7 100644 --- a/ext/sqlite3/sqlite3.stub.php +++ b/ext/sqlite3/sqlite3.stub.php @@ -74,6 +74,7 @@ class SQLite3 /** * @var int * @cvalue SQLITE_OK + * @link sqlite3.class.constants.ok */ public const OK = UNKNOWN; @@ -82,11 +83,13 @@ class SQLite3 /** * @var int * @cvalue SQLITE_DENY + * @link sqlite3.class.constants.deny */ public const DENY = UNKNOWN; /** * @var int * @cvalue SQLITE_IGNORE + * @link sqlite3.class.constants.ignore */ public const IGNORE = UNKNOWN; @@ -95,172 +98,206 @@ class SQLite3 /** * @var int * @cvalue SQLITE_CREATE_INDEX + * @link sqlite3.class.constants.create-index */ public const CREATE_INDEX = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TABLE + * @link sqlite3.class.constants.create-table */ public const CREATE_TABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TEMP_INDEX + * @link sqlite3.class.constants.create-temp-index */ public const CREATE_TEMP_INDEX = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TEMP_TABLE + * @link sqlite3.class.constants.create-temp-table */ public const CREATE_TEMP_TABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TEMP_TRIGGER + * @link sqlite3.class.constants.create-temp-trigger */ public const CREATE_TEMP_TRIGGER = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TEMP_VIEW + * @link sqlite3.class.constants.create-temp-view */ public const CREATE_TEMP_VIEW = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_TRIGGER + * @link sqlite3.class.constants.create-trigger */ public const CREATE_TRIGGER = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_VIEW + * @link sqlite3.class.constants.create-view */ public const CREATE_VIEW = UNKNOWN; /** * @var int * @cvalue SQLITE_DELETE + * @link sqlite3.class.constants.delete */ public const DELETE = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_INDEX + * @link sqlite3.class.constants.drop-index */ public const DROP_INDEX = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TABLE + * @link sqlite3.class.constants.drop-table */ public const DROP_TABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TEMP_INDEX + * @link sqlite3.class.constants.drop-temp-index */ public const DROP_TEMP_INDEX = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TEMP_TABLE + * @link sqlite3.class.constants.drop-temp-table */ public const DROP_TEMP_TABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TEMP_TRIGGER + * @link sqlite3.class.constants.drop-temp-trigger */ public const DROP_TEMP_TRIGGER = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TEMP_VIEW + * @link sqlite3.class.constants.drop-temp-view */ public const DROP_TEMP_VIEW = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_TRIGGER + * @link sqlite3.class.constants.drop-trigger */ public const DROP_TRIGGER = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_VIEW + * @link sqlite3.class.constants.drop-view */ public const DROP_VIEW = UNKNOWN; /** * @var int * @cvalue SQLITE_INSERT + * @link sqlite3.class.constants.insert */ public const INSERT = UNKNOWN; /** * @var int * @cvalue SQLITE_PRAGMA + * @link sqlite3.class.constants.pragma */ public const PRAGMA = UNKNOWN; /** * @var int * @cvalue SQLITE_READ + * @link sqlite3.class.constants.read */ public const READ = UNKNOWN; /** * @var int * @cvalue SQLITE_SELECT + * @link sqlite3.class.constants.select */ public const SELECT = UNKNOWN; /** * @var int * @cvalue SQLITE_TRANSACTION + * @link sqlite3.class.constants.transaction */ public const TRANSACTION = UNKNOWN; /** * @var int * @cvalue SQLITE_UPDATE + * @link sqlite3.class.constants.update */ public const UPDATE = UNKNOWN; /** * @var int * @cvalue SQLITE_ATTACH + * @link sqlite3.class.constants.attach */ public const ATTACH = UNKNOWN; /** * @var int * @cvalue SQLITE_DETACH + * @link sqlite3.class.constants.detach */ public const DETACH = UNKNOWN; /** * @var int * @cvalue SQLITE_ALTER_TABLE + * @link sqlite3.class.constants.alter-table */ public const ALTER_TABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_REINDEX + * @link sqlite3.class.constants.reindex */ public const REINDEX = UNKNOWN; /** * @var int * @cvalue SQLITE_ANALYZE + * @link sqlite3.class.constants.analyze */ public const ANALYZE = UNKNOWN; /** * @var int * @cvalue SQLITE_CREATE_VTABLE + * @link sqlite3.class.constants.create-vtable */ public const CREATE_VTABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_DROP_VTABLE + * @link sqlite3.class.constants.drop-vtable */ public const DROP_VTABLE = UNKNOWN; /** * @var int * @cvalue SQLITE_FUNCTION + * @link sqlite3.class.constants.function */ public const FUNCTION = UNKNOWN; /** * @var int * @cvalue SQLITE_SAVEPOINT + * @link sqlite3.class.constants.savepoint */ public const SAVEPOINT = UNKNOWN; /** * @var int * @cvalue SQLITE_COPY + * @link sqlite3.class.constants.copy */ public const COPY = UNKNOWN; #ifdef SQLITE_RECURSIVE /** * @var int * @cvalue SQLITE_RECURSIVE + * @link sqlite3.class.constants.recursive */ public const RECURSIVE = UNKNOWN; #endif diff --git a/ext/sqlite3/sqlite3_arginfo.h b/ext/sqlite3/sqlite3_arginfo.h index 4091374dee78c..b99134ed1f24b 100644 --- a/ext/sqlite3/sqlite3_arginfo.h +++ b/ext/sqlite3/sqlite3_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bdee592c8babbc221080c6ea2d73f94b2b79274a */ + * Stub hash: 61f4a2611ed8cef37003610991e357b0f227bec9 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index c225d493cb3d4..51309cc066a1b 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -496,106 +496,127 @@ class ZipArchive implements Countable /** * @var int * @cvalue ZIP_OPSYS_DOS + * @link ziparchive.constants.opsys */ public const OPSYS_DOS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_AMIGA + * @link ziparchive.constants.opsys */ public const OPSYS_AMIGA = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_OPENVMS + * @link ziparchive.constants.opsys */ public const OPSYS_OPENVMS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_UNIX + * @link ziparchive.constants.opsys */ public const OPSYS_UNIX = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_VM_CMS + * @link ziparchive.constants.opsys */ public const OPSYS_VM_CMS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_ATARI_ST + * @link ziparchive.constants.opsys */ public const OPSYS_ATARI_ST = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_OS_2 + * @link ziparchive.constants.opsys */ public const OPSYS_OS_2 = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_MACINTOSH + * @link ziparchive.constants.opsys */ public const OPSYS_MACINTOSH = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_Z_SYSTEM + * @link ziparchive.constants.opsys */ public const OPSYS_Z_SYSTEM = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_CPM + * @link ziparchive.constants.opsys */ public const OPSYS_CPM = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_WINDOWS_NTFS + * @link ziparchive.constants.opsys */ public const OPSYS_WINDOWS_NTFS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_MVS + * @link ziparchive.constants.opsys */ public const OPSYS_MVS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_VSE + * @link ziparchive.constants.opsys */ public const OPSYS_VSE = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_ACORN_RISC + * @link ziparchive.constants.opsys */ public const OPSYS_ACORN_RISC = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_VFAT + * @link ziparchive.constants.opsys */ public const OPSYS_VFAT = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_ALTERNATE_MVS + * @link ziparchive.constants.opsys */ public const OPSYS_ALTERNATE_MVS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_BEOS + * @link ziparchive.constants.opsys */ public const OPSYS_BEOS = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_TANDEM + * @link ziparchive.constants.opsys */ public const OPSYS_TANDEM = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_OS_400 + * @link ziparchive.constants.opsys */ public const OPSYS_OS_400 = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_OS_X + * @link ziparchive.constants.opsys */ public const OPSYS_OS_X = UNKNOWN; /** * @var int * @cvalue ZIP_OPSYS_DEFAULT + * @link ziparchive.constants.opsys */ public const OPSYS_DEFAULT = UNKNOWN; #endif diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index 287fe25322032..41acc83b034d7 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d8c14dfe45c7eff2c18fd3c562488a827f658e12 */ + * Stub hash: 69d4e8a343f237a7192728c805fb3a98bb04ca38 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) From 3030d956d99da873af3d47cd134e4ed3bb067682 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 19 Jan 2023 12:01:29 +0100 Subject: [PATCH 256/895] [skip ci] Update year to 2023 (#10374) --- LICENSE | 2 +- ext/oci8/LICENSE | 2 +- ext/phar/phar.1.in | 2 +- sapi/cli/php.1.in | 2 +- sapi/fpm/php-fpm.8.in | 2 +- sapi/phpdbg/phpdbg.1.in | 2 +- scripts/man1/php-config.1.in | 2 +- scripts/man1/phpize.1.in | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index dffd7eab225d7..47a594e38a4d2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -------------------------------------------------------------------- The PHP License, version 3.01 -Copyright (c) 1999 - 2022 The PHP Group. All rights reserved. +Copyright (c) 1999 - 2023 The PHP Group. All rights reserved. -------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without diff --git a/ext/oci8/LICENSE b/ext/oci8/LICENSE index dffd7eab225d7..47a594e38a4d2 100644 --- a/ext/oci8/LICENSE +++ b/ext/oci8/LICENSE @@ -1,6 +1,6 @@ -------------------------------------------------------------------- The PHP License, version 3.01 -Copyright (c) 1999 - 2022 The PHP Group. All rights reserved. +Copyright (c) 1999 - 2023 The PHP Group. All rights reserved. -------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without diff --git a/ext/phar/phar.1.in b/ext/phar/phar.1.in index ac314fe9d5807..bf4fd964d6386 100644 --- a/ext/phar/phar.1.in +++ b/ext/phar/phar.1.in @@ -1,4 +1,4 @@ -.TH PHAR 1 "2022" "The PHP Group" "User Commands" +.TH PHAR 1 "2023" "The PHP Group" "User Commands" .SH NAME phar, phar.phar \- PHAR (PHP archive) command line tool .SH SYNOPSIS diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in index abf053769a815..8c41ea8656d95 100644 --- a/sapi/cli/php.1.in +++ b/sapi/cli/php.1.in @@ -1,4 +1,4 @@ -.TH @program_prefix@php 1 "2022" "The PHP Group" "Scripting Language" +.TH @program_prefix@php 1 "2023" "The PHP Group" "Scripting Language" .SH NAME @program_prefix@php \- PHP Command Line Interface 'CLI' .P diff --git a/sapi/fpm/php-fpm.8.in b/sapi/fpm/php-fpm.8.in index b972a2bdd031e..e8bbfa7aafba2 100644 --- a/sapi/fpm/php-fpm.8.in +++ b/sapi/fpm/php-fpm.8.in @@ -1,4 +1,4 @@ -.TH PHP-FPM 8 "2022" "The PHP Group" "Scripting Language" +.TH PHP-FPM 8 "2023" "The PHP Group" "Scripting Language" .SH NAME .TP 15 php-fpm \- PHP FastCGI Process Manager 'PHP-FPM' diff --git a/sapi/phpdbg/phpdbg.1.in b/sapi/phpdbg/phpdbg.1.in index cf43a57be67c3..3ab0ff472f9b5 100644 --- a/sapi/phpdbg/phpdbg.1.in +++ b/sapi/phpdbg/phpdbg.1.in @@ -1,4 +1,4 @@ -.TH @program_prefix@phpdbg 1 "2022" "The PHP Group" "Scripting Language" +.TH @program_prefix@phpdbg 1 "2023" "The PHP Group" "Scripting Language" .SH NAME @program_prefix@phpdbg \- The interactive PHP debugger .SH SYNOPSIS diff --git a/scripts/man1/php-config.1.in b/scripts/man1/php-config.1.in index 5ed77c574cb42..77d3b2d005f6e 100644 --- a/scripts/man1/php-config.1.in +++ b/scripts/man1/php-config.1.in @@ -1,4 +1,4 @@ -.TH @program_prefix@php\-config 1 "2022" "The PHP Group" "Scripting Language" +.TH @program_prefix@php\-config 1 "2023" "The PHP Group" "Scripting Language" .SH NAME @program_prefix@php\-config \- get information about PHP configuration and compile options .SH SYNOPSIS diff --git a/scripts/man1/phpize.1.in b/scripts/man1/phpize.1.in index bf50aa0c1df37..e14aa7cc6a0a9 100644 --- a/scripts/man1/phpize.1.in +++ b/scripts/man1/phpize.1.in @@ -1,4 +1,4 @@ -.TH @program_prefix@phpize 1 "2022" "The PHP Group" "Scripting Language" +.TH @program_prefix@phpize 1 "2023" "The PHP Group" "Scripting Language" .SH NAME @program_prefix@phpize \- prepare a PHP extension for compiling .SH SYNOPSIS From 1925855c0fd14e245fe185d1cfb44bf3c29b4e14 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 14 Jan 2023 16:21:35 +0100 Subject: [PATCH 257/895] Fix bug 69168: DomNode::getNodePath() returns invalid path Upon freeing libxslt's context, every document which is not the *main* document will be freed by libxslt. If a node of a document which is not the main document gets returned to userland, we'd free the node twice: - first by the cleanup of the xslt context - and then by our own refcounting mechanism. This was reported in bug 49634, and was fixed by always copying the node (and later re-fixed in bug 70078). The original fix is not entirely correct unfortunately because of the following two main reasons: - modifications to the node will only modify the copy, and not the original - accesses to the parent, path, ... will not work This patch fixes it properly by only copying the node if it origins from a document other than the main document. Co-authored-by: juha.ikavalko@agentit.fi Closes GH-10318. --- NEWS | 3 +++ ext/xsl/tests/bug69168.phpt | 43 +++++++++++++++++++++++++++++++++++++ ext/xsl/xsltprocessor.c | 14 +++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 ext/xsl/tests/bug69168.phpt diff --git a/NEWS b/NEWS index 76dd04a4ac913..ee4dcfc207df6 100644 --- a/NEWS +++ b/NEWS @@ -98,4 +98,7 @@ PHP NEWS . Fixed bug #51056: blocking fread() will block even if data is available. (Jakub Zelenka) +- XSLTProcessor: + . Fixed bug #69168 (DomNode::getNodePath() returns invalid path). (nielsdos) + <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/ext/xsl/tests/bug69168.phpt b/ext/xsl/tests/bug69168.phpt new file mode 100644 index 0000000000000..41fc3aafd8209 --- /dev/null +++ b/ext/xsl/tests/bug69168.phpt @@ -0,0 +1,43 @@ +--TEST-- +bug #69168 (DomNode::getNodePath() returns invalid path) +--EXTENSIONS-- +xsl +--FILE-- +bobjoe +EOB; +$xsl = << + + + +
+
+
+
+EOB; + +function getPath($input){ + $input[0]->nodeValue .= 'a'; + return $input[0]->getNodePath() . ' = ' . $input[0]->nodeValue; +} + +$proc = new XSLTProcessor(); +$proc->registerPHPFunctions(); +$xslDoc = new DOMDocument(); +$xslDoc->loadXML($xsl); +@$proc->importStyleSheet($xslDoc); +$xmlDoc = new DOMDocument(); +$xmlDoc->loadXML($xml); +echo @$proc->transformToXML($xmlDoc); + +// Tests modification of the nodes +var_dump($xmlDoc->firstChild->firstChild->firstChild->getNodePath()); +var_dump($xmlDoc->firstChild->firstChild->firstChild->nodeValue); +?> +--EXPECT-- + +/allusers/user[1]/uid = boba
/allusers/user[2]/uid = joea
+string(21) "/allusers/user[1]/uid" +string(4) "boba" diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index c62c0a13ceaec..8dbe6b27a113b 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -194,7 +194,19 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t node->parent = nsparent; node->ns = curns; } else { - node = xmlDocCopyNode(node, domintern->document->ptr, 1); + /** + * Upon freeing libxslt's context, every document which is not the *main* document will be freed by libxslt. + * If a node of a document which is *not the main* document gets returned to userland, we'd free the node twice: + * first by the cleanup of the xslt context, and then by our own refcounting mechanism. + * To prevent this, we'll take a copy if the node is not from the main document. + * It is important that we do not copy the node unconditionally, because that means that: + * - modifications to the node will only modify the copy, and not the original + * - accesses to the parent, path, ... will not work + */ + xsltTransformContextPtr transform_ctxt = (xsltTransformContextPtr) ctxt->context->extra; + if (node->doc != transform_ctxt->document->doc) { + node = xmlDocCopyNode(node, domintern->document->ptr, 1); + } } php_dom_create_object(node, &child, domintern); From 4ea85d4044ae23dd91f0c5f6ede83a7da693d7a6 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 5 Jan 2023 00:28:36 +0100 Subject: [PATCH 258/895] Implement GMP::__construct() Implements a proper constructor for GMP as discussed in both GH-10158 and https://externals.io/message/119216. Fixes GH-10155 Closes GH-10225 Signed-off-by: George Peter Banyard --- NEWS | 3 ++ UPGRADING | 4 +++ ext/gmp/gmp.c | 56 ++++++++++++++++++++++++++++++------ ext/gmp/gmp.stub.php | 2 ++ ext/gmp/gmp_arginfo.h | 9 +++++- ext/gmp/tests/construct.phpt | 51 ++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 ext/gmp/tests/construct.phpt diff --git a/NEWS b/NEWS index c8f31522843f9..1046769880eb9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) +- GMP: + . Properly implement GMP::__construct(). (nielsdos) + 02 Feb 2023, PHP 8.2.2 - Core: diff --git a/UPGRADING b/UPGRADING index bc92affa46e80..e67d692d8cce7 100644 --- a/UPGRADING +++ b/UPGRADING @@ -104,6 +104,10 @@ PHP 8.2 UPGRADE NOTES flags to determine if it should create a sub directory or not when creating a database file. +- GMP: + . GMP::__construct() can now be used instead of gmp_init() to initialize an object (Only as of PHP 8.2.3) + + - OCI8: . Added an oci8.prefetch_lob_size directive and oci_set_prefetch_lob() function to tune LOB query performance by reducing the number of diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 29974c63862f3..02eb30bacb730 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -862,6 +862,26 @@ static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t } /* }}} */ +static bool gmp_verify_base(zend_long base, uint32_t arg_num) +{ + if (base && (base < 2 || base > GMP_MAX_BASE)) { + zend_argument_value_error(arg_num, "must be between 2 and %d", GMP_MAX_BASE); + return false; + } + + return true; +} + +static zend_result gmp_initialize_number(mpz_ptr gmp_number, const zend_string *arg_str, zend_long arg_l, zend_long base) +{ + if (arg_str) { + return convert_zstr_to_gmp(gmp_number, arg_str, base, 1); + } + + mpz_set_si(gmp_number, arg_l); + return SUCCESS; +} + /* {{{ Initializes GMP number */ ZEND_FUNCTION(gmp_init) { @@ -876,18 +896,14 @@ ZEND_FUNCTION(gmp_init) Z_PARAM_LONG(base) ZEND_PARSE_PARAMETERS_END(); - if (base && (base < 2 || base > GMP_MAX_BASE)) { - zend_argument_value_error(2, "must be between 2 and %d", GMP_MAX_BASE); + if (!gmp_verify_base(base, 2)) { RETURN_THROWS(); } INIT_GMP_RETVAL(gmp_number); - if (arg_str) { - if (convert_zstr_to_gmp(gmp_number, arg_str, base, 1) == FAILURE) { - RETURN_THROWS(); - } - } else { - mpz_set_si(gmp_number, arg_l); + + if (gmp_initialize_number(gmp_number, arg_str, arg_l, base) == FAILURE) { + RETURN_THROWS(); } } /* }}} */ @@ -2021,6 +2037,30 @@ ZEND_FUNCTION(gmp_scan1) } /* }}} */ +ZEND_METHOD(GMP, __construct) +{ + zend_string *arg_str = NULL; + zend_long arg_l = 0; + zend_long base = 0; + + ZEND_PARSE_PARAMETERS_START(0, 2) + Z_PARAM_OPTIONAL + Z_PARAM_STR_OR_LONG(arg_str, arg_l) + Z_PARAM_LONG(base) + ZEND_PARSE_PARAMETERS_END(); + + if (!gmp_verify_base(base, 2)) { + RETURN_THROWS(); + } + + return_value = ZEND_THIS; + mpz_ptr gmp_number = GET_GMP_FROM_ZVAL(ZEND_THIS); + + if (gmp_initialize_number(gmp_number, arg_str, arg_l, base) == FAILURE) { + RETURN_THROWS(); + } +} + ZEND_METHOD(GMP, __serialize) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php index 664fc6ded264c..ff5b5afb4055b 100644 --- a/ext/gmp/gmp.stub.php +++ b/ext/gmp/gmp.stub.php @@ -59,6 +59,8 @@ class GMP { + public function __construct(int|string $num = 0, int $base = 0) {} + public function __serialize(): array {} public function __unserialize(array $data): void {} diff --git a/ext/gmp/gmp_arginfo.h b/ext/gmp/gmp_arginfo.h index c0e029f6fc396..e9a339f02a333 100644 --- a/ext/gmp/gmp_arginfo.h +++ b/ext/gmp/gmp_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 64a40a366b87a96a291de6a474e60c8d98d15da1 */ + * Stub hash: d52f82c7084a8122fe07c91eb6d4ab6030daa27d */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0) ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL) @@ -184,6 +184,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_binomial, 0, 2, GMP, 0) ZEND_ARG_TYPE_INFO(0, k, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_GMP___construct, 0, 0, 0) + ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "0") +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_GMP___serialize, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -242,6 +247,7 @@ ZEND_FUNCTION(gmp_popcount); ZEND_FUNCTION(gmp_hamdist); ZEND_FUNCTION(gmp_nextprime); ZEND_FUNCTION(gmp_binomial); +ZEND_METHOD(GMP, __construct); ZEND_METHOD(GMP, __serialize); ZEND_METHOD(GMP, __unserialize); @@ -303,6 +309,7 @@ static const zend_function_entry ext_functions[] = { static const zend_function_entry class_GMP_methods[] = { + ZEND_ME(GMP, __construct, arginfo_class_GMP___construct, ZEND_ACC_PUBLIC) ZEND_ME(GMP, __serialize, arginfo_class_GMP___serialize, ZEND_ACC_PUBLIC) ZEND_ME(GMP, __unserialize, arginfo_class_GMP___unserialize, ZEND_ACC_PUBLIC) ZEND_FE_END diff --git a/ext/gmp/tests/construct.phpt b/ext/gmp/tests/construct.phpt new file mode 100644 index 0000000000000..11c80b3d9ed82 --- /dev/null +++ b/ext/gmp/tests/construct.phpt @@ -0,0 +1,51 @@ +--TEST-- +Constructor for GMP +--EXTENSIONS-- +gmp +--FILE-- +getMessage() . "\n"; +} +try { + var_dump(new GMP("", 10)); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} +try { + var_dump(new GMP("hello")); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +object(GMP)#1 (1) { + ["num"]=> + string(1) "0" +} +object(GMP)#1 (1) { + ["num"]=> + string(1) "0" +} +object(GMP)#1 (1) { + ["num"]=> + string(3) "123" +} +object(GMP)#1 (1) { + ["num"]=> + string(3) "170" +} +object(GMP)#1 (1) { + ["num"]=> + string(1) "6" +} +GMP::__construct(): Argument #2 ($base) must be between 2 and 62 +GMP::__construct(): Argument #1 ($num) is not an integer string +GMP::__construct(): Argument #1 ($num) is not an integer string From 298aa74b16958c1c64fb8eafbf66f5d6c7d215e5 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 19 Jan 2023 17:42:40 +0300 Subject: [PATCH 259/895] Fix incorrect trace type inference when function SSA is not available. Type of argument CV with type hint is checked only via execution of the corresponding RECV or RECV_INIT instruction. --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 70dec072b8d58..6ac93fe95bbf5 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1535,7 +1535,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } else { ssa_vars[i].alias = zend_jit_var_may_alias(op_array, ssa, i); } - if (op_array->arg_info) { + if (op_array->arg_info && i < trace_buffer[1].opline - op_array->opcodes) { zend_arg_info *arg_info = &op_array->arg_info[i]; zend_class_entry *ce; uint32_t tmp = zend_fetch_arg_info_type(script, arg_info, &ce); From bff7a56d0008c0915977048d675860a4ad04e85c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Jan 2023 16:55:48 +0100 Subject: [PATCH 260/895] Revert "ext/opcache: use C11 atomics for "restart_in" (#10276)" (#10339) * Revert "ext/opcache: use C11 atomics for "restart_in" (#10276)" This reverts commit 061fcdb0a5649572b90cdad1be4d457dd3faa301. While the commit does indeed improve performance, @dstogov complained that it disables the code path calling kill_all_lockers(), and thus hanging workers are never killed and restarted. https://github.com/php/php-src/pull/10276#issuecomment-1383593046 The fact that this feature was not implemented in the existing atomic code path (i.e. Windows) did not mean that the feature was considered not strictly necessary, but that the Windows implementation just did not need the feature because SAPIs that work on Windows do not manage child processes https://github.com/php/php-src/pull/10276#issuecomment-1383868696 https://github.com/php/php-src/pull/10276#issuecomment-1384235011 * ext/opcache: document lack of kill_all_lockers() on Windows kill_all_lockers() is not implemented on Windows, and does not need to be. --- ext/opcache/ZendAccelerator.c | 33 ++++++++++++++++++--------------- ext/opcache/ZendAccelerator.h | 16 +--------------- ext/opcache/config.m4 | 2 -- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 48a07760d981d..ec33c69eb2f09 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -135,11 +135,7 @@ static void preload_shutdown(void); static void preload_activate(void); static void preload_restart(void); -#ifdef HAVE_STDATOMIC_H -# define INCREMENT(v) (++ZCSG(v)) -# define DECREMENT(v) (--ZCSG(v)) -# define LOCKVAL(v) atomic_load(&ZCSG(v)) -#elif defined(ZEND_WIN32) +#ifdef ZEND_WIN32 # define INCREMENT(v) InterlockedIncrement64(&ZCSG(v)) # define DECREMENT(v) InterlockedDecrement64(&ZCSG(v)) # define LOCKVAL(v) (ZCSG(v)) @@ -277,7 +273,7 @@ static ZEND_INI_MH(accel_include_path_on_modify) static inline void accel_restart_enter(void) { -#ifdef INCREMENT +#ifdef ZEND_WIN32 INCREMENT(restart_in); #else struct flock restart_in_progress; @@ -296,7 +292,7 @@ static inline void accel_restart_enter(void) static inline void accel_restart_leave(void) { -#ifdef DECREMENT +#ifdef ZEND_WIN32 ZCSG(restart_in_progress) = false; DECREMENT(restart_in); #else @@ -317,9 +313,7 @@ static inline void accel_restart_leave(void) static inline int accel_restart_is_active(void) { if (ZCSG(restart_in_progress)) { -#ifdef LOCKVAL - return LOCKVAL(restart_in) != 0; -#else +#ifndef ZEND_WIN32 struct flock restart_check; restart_check.l_type = F_WRLCK; @@ -337,6 +331,8 @@ static inline int accel_restart_is_active(void) } else { return 1; } +#else + return LOCKVAL(restart_in) != 0; #endif } return 0; @@ -345,7 +341,7 @@ static inline int accel_restart_is_active(void) /* Creates a read lock for SHM access */ static inline zend_result accel_activate_add(void) { -#ifdef INCREMENT +#ifdef ZEND_WIN32 SHM_UNPROTECT(); INCREMENT(mem_usage); SHM_PROTECT(); @@ -368,7 +364,7 @@ static inline zend_result accel_activate_add(void) /* Releases a lock for SHM access */ static inline void accel_deactivate_sub(void) { -#ifdef DECREMENT +#ifdef ZEND_WIN32 if (ZCG(counted)) { SHM_UNPROTECT(); DECREMENT(mem_usage); @@ -391,7 +387,7 @@ static inline void accel_deactivate_sub(void) static inline void accel_unlock_all(void) { -#ifdef DECREMENT +#ifdef ZEND_WIN32 accel_deactivate_sub(); #else struct flock mem_usage_unlock_all; @@ -832,7 +828,7 @@ static void accel_use_shm_interned_strings(void) HANDLE_UNBLOCK_INTERRUPTIONS(); } -#ifndef LOCKVAL +#ifndef ZEND_WIN32 static inline void kill_all_lockers(struct flock *mem_usage_check) { int tries; @@ -899,7 +895,14 @@ static inline void kill_all_lockers(struct flock *mem_usage_check) static inline int accel_is_inactive(void) { -#ifdef LOCKVAL +#ifdef ZEND_WIN32 + /* on Windows, we don't need kill_all_lockers() because SAPIs + that work on Windows don't manage child processes (and we + can't do anything about hanging threads anyway); therefore + on Windows, we can simply manage this counter with atomics + instead of flocks (atomics are much faster but they don't + provide us with the PID of locker processes) */ + if (LOCKVAL(mem_usage) == 0) { return SUCCESS; } diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 6ecc2c2bc9df1..bc92854c35576 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -55,14 +55,6 @@ #include "zend_accelerator_hash.h" #include "zend_accelerator_debug.h" -#ifdef HAVE_STDATOMIC_H -# ifdef __cplusplus -# include -# else -# include -# endif -#endif // HAVE_STDATOMIC_H - #ifndef PHPAPI # ifdef ZEND_WIN32 # define PHPAPI __declspec(dllimport) @@ -269,13 +261,7 @@ typedef struct _zend_accel_shared_globals { bool restart_pending; zend_accel_restart_reason restart_reason; bool cache_status_before_restart; -#ifdef HAVE_STDATOMIC_H -# ifdef __cplusplus - std::atomic_llong mem_usage, restart_in; -# else - atomic_llong mem_usage, restart_in; -# endif -#elif defined(ZEND_WIN32) +#ifdef ZEND_WIN32 LONGLONG mem_usage; LONGLONG restart_in; #endif diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index c9fa6a7e57e4f..2a83fa2455974 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -23,8 +23,6 @@ if test "$PHP_OPCACHE" != "no"; then dnl Always build as shared extension ext_shared=yes - AC_CHECK_HEADERS([stdatomic.h]) - if test "$PHP_HUGE_CODE_PAGES" = "yes"; then AC_DEFINE(HAVE_HUGE_CODE_PAGES, 1, [Define to enable copying PHP CODE pages into HUGE PAGES (experimental)]) fi From ce877da23bd48f90c189d89147a5cbb26a525274 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 19 Jan 2023 18:48:03 +0000 Subject: [PATCH 261/895] Sync with timelib 2021.19 --- ext/date/lib/timelib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 8c88b26cad44e..03a83a4d290e2 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -30,9 +30,9 @@ # include "timelib_config.h" #endif -#define TIMELIB_VERSION 202118 -#define TIMELIB_EXTENDED_VERSION 20211801 -#define TIMELIB_ASCII_VERSION "2021.18" +#define TIMELIB_VERSION 202119 +#define TIMELIB_EXTENDED_VERSION 20211901 +#define TIMELIB_ASCII_VERSION "2021.19" #include #include From 0df92d218e88a0070fcebd5391e7ba8fa0f4c4a5 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 19 Jan 2023 18:49:54 +0000 Subject: [PATCH 262/895] Sync with timelib 2022.04 properly --- ext/date/lib/timelib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 2848c11b91f39..550015158c7d6 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -39,6 +39,22 @@ #include #include +# ifndef HAVE_INT32_T +# if SIZEOF_INT == 4 +typedef int int32_t; +# elif SIZEOF_LONG == 4 +typedef long int int32_t; +# endif +# endif + +# ifndef HAVE_UINT32_T +# if SIZEOF_INT == 4 +typedef unsigned int uint32_t; +# elif SIZEOF_LONG == 4 +typedef unsigned long int uint32_t; +# endif +# endif + #ifdef _WIN32 # if _MSC_VER >= 1600 # include From cc931af35ddc0a07c0a669eb4da9dc66e1f73af4 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 30 Dec 2022 15:09:48 +0000 Subject: [PATCH 263/895] Fix GH-8086: Introduce mail.mixed_lf_and_crlf INI When this INI option is enabled, it reverts the line separator for headers and message to LF which was a non conformant behavior in PHP 7. It is done because some non conformant MTAs fail to parse CRLF line separator for headers and body. This is used for mail and mb_send_mail functions. --- NEWS | 3 +++ UPGRADING | 2 ++ ext/mbstring/mbstring.c | 16 ++++++++------ ext/mbstring/tests/gh8086.phpt | 33 +++++++++++++++++++++++++++++ ext/standard/mail.c | 12 ++++++----- ext/standard/tests/mail/gh8086.phpt | 18 ++++++++++++++++ main/main.c | 1 + main/php_globals.h | 1 + php.ini-development | 4 ++++ php.ini-production | 4 ++++ 10 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 ext/mbstring/tests/gh8086.phpt create mode 100644 ext/standard/tests/mail/gh8086.phpt diff --git a/NEWS b/NEWS index 1046769880eb9..8c56c818dea96 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS - GMP: . Properly implement GMP::__construct(). (nielsdos) +- Standard: + - Fixed bug GH-8086 (Introduce mail.mixed_lf_and_crlf INI). (Jakub Zelenka) + 02 Feb 2023, PHP 8.2.2 - Core: diff --git a/UPGRADING b/UPGRADING index e67d692d8cce7..744fa57c1c8dc 100644 --- a/UPGRADING +++ b/UPGRADING @@ -230,6 +230,8 @@ PHP 8.2 UPGRADE NOTES - Standard . unserialize() now performs a stricter validation of the structure of serialized objects. + . mail() function reverts back to the mixed LF and CRLF new lines (behavior + before PHP 8.0) if mail.mixed_lf_and_crlf INI is on. - XML . xml_parser_set_option() now actually returns false when attempting to set a diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 34678ea3d0f7f..7bcb771dae84b 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4128,7 +4128,9 @@ PHP_FUNCTION(mb_send_mail) || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { orig_str.encoding = mbfl_identify_encoding(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } - pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, CRLF, sizeof("Subject: [PHP-jp nnnnnnnn]" CRLF) - 1); + const char *line_sep = PG(mail_mixed_lf_and_crlf) ? "\n" : CRLF; + size_t line_sep_len = strlen(line_sep); + pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, line_sep, strlen("Subject: [PHP-jp nnnnnnnn]") + line_sep_len); if (pstr != NULL) { subject_buf = subject = (char *)pstr->val; } @@ -4167,14 +4169,14 @@ PHP_FUNCTION(mb_send_mail) n = ZSTR_LEN(str_headers); mbfl_memory_device_strncat(&device, p, n); if (n > 0 && p[n - 1] != '\n') { - mbfl_memory_device_strncat(&device, CRLF, sizeof(CRLF)-1); + mbfl_memory_device_strncat(&device, line_sep, line_sep_len); } zend_string_release_ex(str_headers, 0); } if (!zend_hash_str_exists(&ht_headers, "mime-version", sizeof("mime-version") - 1)) { mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER1, sizeof(PHP_MBSTR_MAIL_MIME_HEADER1) - 1); - mbfl_memory_device_strncat(&device, CRLF, sizeof(CRLF)-1); + mbfl_memory_device_strncat(&device, line_sep, line_sep_len); } if (!suppressed_hdrs.cnt_type) { @@ -4185,7 +4187,7 @@ PHP_FUNCTION(mb_send_mail) mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER3, sizeof(PHP_MBSTR_MAIL_MIME_HEADER3) - 1); mbfl_memory_device_strcat(&device, p); } - mbfl_memory_device_strncat(&device, CRLF, sizeof(CRLF)-1); + mbfl_memory_device_strncat(&device, line_sep, line_sep_len); } if (!suppressed_hdrs.cnt_trans_enc) { mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER4, sizeof(PHP_MBSTR_MAIL_MIME_HEADER4) - 1); @@ -4194,10 +4196,12 @@ PHP_FUNCTION(mb_send_mail) p = "7bit"; } mbfl_memory_device_strcat(&device, p); - mbfl_memory_device_strncat(&device, CRLF, sizeof(CRLF)-1); + mbfl_memory_device_strncat(&device, line_sep, line_sep_len); } - mbfl_memory_device_unput(&device); + if (!PG(mail_mixed_lf_and_crlf)) { + mbfl_memory_device_unput(&device); + } mbfl_memory_device_unput(&device); mbfl_memory_device_output('\0', &device); str_headers = zend_string_init((char *)device.buffer, strlen((char *)device.buffer), 0); diff --git a/ext/mbstring/tests/gh8086.phpt b/ext/mbstring/tests/gh8086.phpt new file mode 100644 index 0000000000000..2eeed67e5b483 --- /dev/null +++ b/ext/mbstring/tests/gh8086.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-8086 (mb_send_mail() function not working correctly in PHP 8.x) +--SKIPIF-- + +--INI-- +sendmail_path={MAIL:{PWD}/gh8086.eml} +mail.mixed_lf_and_crlf=on +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(6) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 55790e6100fce..ef4c8c60a874e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -429,6 +429,8 @@ PHPAPI int php_mail(const char *to, const char *subject, const char *message, co MAIL_RET(0); } + char *line_sep = PG(mail_mixed_lf_and_crlf) ? "\n" : "\r\n"; + if (PG(mail_x_header)) { const char *tmp = zend_get_executed_filename(); zend_string *f; @@ -436,7 +438,7 @@ PHPAPI int php_mail(const char *to, const char *subject, const char *message, co f = php_basename(tmp, strlen(tmp), NULL, 0); if (headers != NULL && *headers) { - spprintf(&ahdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s\r\n%s", php_getuid(), ZSTR_VAL(f), headers); + spprintf(&ahdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s%s%s", php_getuid(), ZSTR_VAL(f), line_sep, headers); } else { spprintf(&ahdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s", php_getuid(), ZSTR_VAL(f)); } @@ -510,12 +512,12 @@ PHPAPI int php_mail(const char *to, const char *subject, const char *message, co MAIL_RET(0); } #endif - fprintf(sendmail, "To: %s\r\n", to); - fprintf(sendmail, "Subject: %s\r\n", subject); + fprintf(sendmail, "To: %s%s", to, line_sep); + fprintf(sendmail, "Subject: %s%s", subject, line_sep); if (hdr != NULL) { - fprintf(sendmail, "%s\r\n", hdr); + fprintf(sendmail, "%s%s", hdr, line_sep); } - fprintf(sendmail, "\r\n%s\r\n", message); + fprintf(sendmail, "%s%s%s", line_sep, message, line_sep); ret = pclose(sendmail); #if PHP_SIGCHILD diff --git a/ext/standard/tests/mail/gh8086.phpt b/ext/standard/tests/mail/gh8086.phpt new file mode 100644 index 0000000000000..fba5cc56bb450 --- /dev/null +++ b/ext/standard/tests/mail/gh8086.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-8086 (Mail() function not working correctly in PHP 8.x) +--INI-- +sendmail_path={MAIL:gh8086.out} +mail.mixed_lf_and_crlf=on +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +int(5) diff --git a/main/main.c b/main/main.c index 8be52d316a159..6b8a9e6bd1990 100644 --- a/main/main.c +++ b/main/main.c @@ -737,6 +737,7 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) PHP_INI_ENTRY("smtp_port", "25", PHP_INI_ALL, NULL) STD_PHP_INI_BOOLEAN("mail.add_x_header", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, mail_x_header, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("mail.mixed_lf_and_crlf", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, mail_mixed_lf_and_crlf, php_core_globals, core_globals) STD_PHP_INI_ENTRY("mail.log", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMailLog, mail_log, php_core_globals, core_globals) PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, OnChangeBrowscap) PHP_INI_ENTRY("memory_limit", "128M", PHP_INI_ALL, OnChangeMemoryLimit) diff --git a/main/php_globals.h b/main/php_globals.h index cbf0271c7b763..0e004bd011181 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -153,6 +153,7 @@ struct _php_core_globals { char *request_order; bool mail_x_header; + bool mail_mixed_lf_and_crlf; char *mail_log; bool in_error_log; diff --git a/php.ini-development b/php.ini-development index 70c6b00555844..ba75e4933ba7c 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1095,6 +1095,10 @@ smtp_port = 25 ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = Off +; Use mixed LF and CRLF line separators to keep compatibility with some +; RFC 2822 non conformant MTA. +mail.mixed_lf_and_crlf = Off + ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = diff --git a/php.ini-production b/php.ini-production index 21627c9142487..9f9ff22586d6d 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1097,6 +1097,10 @@ smtp_port = 25 ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = Off +; Use mixed LF and CRLF line separators to keep compatibility with some +; RFC 2822 non conformant MTA. +mail.mixed_lf_and_crlf = Off + ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = From 6676f5d3cb9f6de85c2211f9df2d6aa052fe371e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 20 Jan 2023 09:04:47 +0300 Subject: [PATCH 264/895] Delay debug JIT op_array dump until actual JIT-ing Previously function JIT for the whole script (opcache.jit=1205) dumped all op_arrays before JIT-ing the first functon. This complicated debugging of particular JIT-ed function and leaded to usage of opcache.jit=1204. Now both options should produce similar op_array/disasm interlived output. --- ext/opcache/jit/zend_jit.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 429d8dbd49f5a..b5efb8a2f7a09 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4561,18 +4561,12 @@ ZEND_EXT_API int zend_jit_script(zend_script *script) } } - if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) { - for (i = 0; i < call_graph.op_arrays_count; i++) { - info = ZEND_FUNC_INFO(call_graph.op_arrays[i]); - if (info) { - zend_dump_op_array(call_graph.op_arrays[i], ZEND_DUMP_HIDE_UNREACHABLE|ZEND_DUMP_RC_INFERENCE|ZEND_DUMP_SSA, "JIT", &info->ssa); - } - } - } - for (i = 0; i < call_graph.op_arrays_count; i++) { info = ZEND_FUNC_INFO(call_graph.op_arrays[i]); if (info) { + if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) { + zend_dump_op_array(call_graph.op_arrays[i], ZEND_DUMP_HIDE_UNREACHABLE|ZEND_DUMP_RC_INFERENCE|ZEND_DUMP_SSA, "JIT", &info->ssa); + } if (zend_jit(call_graph.op_arrays[i], &info->ssa, NULL) != SUCCESS) { goto jit_failure; } From 0b7986f976dbd737a2feac1f7fd4b5d0d457228c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 18 Jan 2023 22:23:07 +0200 Subject: [PATCH 265/895] Tweak SSE2-accelerated strtoupper() and strtolower() for speed I learned this trick for doing a faster bounds check with both upper and lower bounds by reading a disassembler listing of optimized code produced by GCC; instead of doing 2 compares to check the upper and the lower bound, add an immediate value to shift the range you are testing for to the far low or high end of the range of possible values for the type in question, and then a single compare will do. Intstead of compare + compare + AND, you just do ADD + compare. From microbenchmarking on my development PC, this makes strtoupper() about 10% faster on long strings (~10,000 bytes). --- Zend/zend_operators.c | 12 +++++------- ext/standard/tests/strings/strtolower.phpt | 4 ++++ ext/standard/tests/strings/strtoupper1.phpt | 4 ++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index afe068bfeb8d6..cc529444b33cc 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -60,8 +60,8 @@ static _locale_t current_locale = NULL; /* Common code for SSE2 accelerated character case conversion */ #define BLOCKCONV_INIT_RANGE(start, end) \ - const __m128i blconv_start_minus_1 = _mm_set1_epi8((start) - 1); \ - const __m128i blconv_end_plus_1 = _mm_set1_epi8((end) + 1); + const __m128i blconv_offset = _mm_set1_epi8((signed char)(SCHAR_MIN - start)); \ + const __m128i blconv_threshold = _mm_set1_epi8(SCHAR_MIN + (end - start) + 1); #define BLOCKCONV_STRIDE sizeof(__m128i) @@ -70,14 +70,12 @@ static _locale_t current_locale = NULL; #define BLOCKCONV_LOAD(input) \ __m128i blconv_operand = _mm_loadu_si128((__m128i*)(input)); \ - __m128i blconv_gt = _mm_cmpgt_epi8(blconv_operand, blconv_start_minus_1); \ - __m128i blconv_lt = _mm_cmplt_epi8(blconv_operand, blconv_end_plus_1); \ - __m128i blconv_mingle = _mm_and_si128(blconv_gt, blconv_lt); + __m128i blconv_mask = _mm_cmplt_epi8(_mm_add_epi8(blconv_operand, blconv_offset), blconv_threshold); -#define BLOCKCONV_FOUND() _mm_movemask_epi8(blconv_mingle) +#define BLOCKCONV_FOUND() _mm_movemask_epi8(blconv_mask) #define BLOCKCONV_STORE(dest) \ - __m128i blconv_add = _mm_and_si128(blconv_mingle, blconv_delta); \ + __m128i blconv_add = _mm_and_si128(blconv_mask, blconv_delta); \ __m128i blconv_result = _mm_add_epi8(blconv_operand, blconv_add); \ _mm_storeu_si128((__m128i *)(dest), blconv_result); diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index 6052ccd840d50..1abe45a8a0524 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt @@ -30,6 +30,7 @@ $strings = array ( "ZZZZZZZZZZZZZZZZZZZZ", "@@@@@@@@@@@@@@@@@@@@", "[[[[[[[[[[[[[[[[[[[[", + "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ); $count = 0; @@ -347,6 +348,9 @@ string(20) "@@@@@@@@@@@@@@@@@@@@" -- Iteration 11 -- string(20) "[[[[[[[[[[[[[[[[[[[[" +-- Iteration 12 -- +string(62) "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz" + *** Testing strtolower() with two different case strings *** strings are same, with Case Insensitive *** Done *** diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index abda0b9d38b28..df4026eb76e9a 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -28,6 +28,7 @@ $strings = array ( "zzzzzzzzzzzzzzzzzzzz", "````````````````````", "{{{{{{{{{{{{{{{{{{{{", + "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ); $count = 0; @@ -346,6 +347,9 @@ string(20) "````````````````````" -- Iteration 11 -- string(20) "{{{{{{{{{{{{{{{{{{{{" +-- Iteration 12 -- +string(62) "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + *** Testing strtoupper() with two different case strings *** strings are same, with Case Insensitive *** Done *** From 0801c567dc09787eba797d23f48f56b962b4282b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 12 Jan 2023 23:52:48 +0100 Subject: [PATCH 266/895] Fix GH-10248: Assertion `!(zval_get_type(&(*(property))) == 10)' failed. The assertion failure was triggered in a debug code-path that validates property types for internal classes. zend_verify_internal_read_property_type was called with retval being a reference, which is not allowed because that function eventually calls to i_zend_check_property_type, which does not expect a reference. The non-debug code-path already takes into account that retval can be a reference, as it optionally dereferences retval. Add a dereference in zend_verify_internal_read_property_type just before the call to zend_verify_property_type, which is how other callers often behave as well. --- Zend/zend_execute.c | 1 + ext/spl/tests/gh10248.phpt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ext/spl/tests/gh10248.phpt diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index fc555bfce1184..922b45c42baf4 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1207,6 +1207,7 @@ static void zend_verify_internal_read_property_type(zend_object *obj, zend_strin zend_property_info *prop_info = zend_get_property_info(obj->ce, name, /* silent */ true); if (prop_info && prop_info != ZEND_WRONG_PROPERTY_INFO && ZEND_TYPE_IS_SET(prop_info->type)) { + ZVAL_OPT_DEREF(val); zend_verify_property_type(prop_info, val, /* strict */ true); } } diff --git a/ext/spl/tests/gh10248.phpt b/ext/spl/tests/gh10248.phpt new file mode 100644 index 0000000000000..d4af9e98d0f69 --- /dev/null +++ b/ext/spl/tests/gh10248.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-10248 (Assertion `!(zval_get_type(&(*(property))) == 10)' failed.) +--FILE-- +property = &$b; +$a->property; + +echo "Done\n"; + +?> +--EXPECT-- +Done From f6734495f7581b821a8c098badcf4e5d0e8125e4 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 20 Jan 2023 16:47:36 +0100 Subject: [PATCH 267/895] [ci skip] NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index f43d3bf531b7a..436d8faf46dce 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ PHP NEWS trampoline is used from internal code). (Derick) . Fix GH-10251 (Assertion `(flag & (1<<3)) == 0' failed). (nielsdos) . Fix wrong comparison in block optimisation pass after opcode update. (nieldsdos) + . Fix GH-10248 (Assertion `!(zval_get_type(&(*(property))) == 10)' failed). + (nielsdos) - Date: . Fixed bug GH-9891 (DateTime modify with unixtimestamp (@) must work like From a0969fc7ed5c30bbff7868da330f3227141b5722 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 20 Jan 2023 16:54:49 +0100 Subject: [PATCH 268/895] [ci skip] NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 8c56c818dea96..953d0842db96f 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ PHP NEWS (Arnaud) . Fix GH-9675 (Broken run_time_cache init for internal enum methods). (Petar Obradović, Bob) + . Fix GH-10248 (Assertion `!(zval_get_type(&(*(property))) == 10)' failed). + (nielsdos) - FPM: . Fixed bug #77106 (Missing separator in FPM FastCGI errors). (Jakub Zelenka) From db6840bda42d0fa6e98515eb6f555b0df1e707ee Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 20 Jan 2023 17:06:00 +0100 Subject: [PATCH 269/895] [ci skip] UPGRADING GH-10149 --- UPGRADING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPGRADING b/UPGRADING index 9fdfdb88f9280..5d4a0023c29f4 100644 --- a/UPGRADING +++ b/UPGRADING @@ -65,6 +65,9 @@ PHP 8.3 UPGRADE NOTES - Standard: . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling + . array_pad() is now only limited by the maximum number of elements an array + can have. Before, it was only possible to add at most 1048576 elements at a + time. ======================================== 6. New Functions From 1f05d6ef8050803dd9ba4ae640697fff534e93a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 20 Jan 2023 23:35:08 +0100 Subject: [PATCH 270/895] Fix GH-10292 make the default value of the first parame of srand() and mt_srand() nullable (#10380) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- NEWS | 2 ++ UPGRADING | 4 ++++ ext/random/random.c | 5 +++-- ext/random/random.stub.php | 4 ++-- ext/random/random_arginfo.h | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index ee4dcfc207df6..203ba7f3b108a 100644 --- a/NEWS +++ b/NEWS @@ -76,6 +76,8 @@ PHP NEWS - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. (timwolla) + . Fix GH-10292 (Made the default value of the first param of srand() and + mt_srand() nullable). (kocsismate) - Reflection: . Fix GH-9470 (ReflectionMethod constructor should not find private parent diff --git a/UPGRADING b/UPGRADING index 5d4a0023c29f4..ead75f216c023 100644 --- a/UPGRADING +++ b/UPGRADING @@ -88,6 +88,10 @@ PHP 8.3 UPGRADE NOTES RFC: https://wiki.php.net/rfc/randomizer_additions . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. RFC: https://wiki.php.net/rfc/randomizer_additions + . Changed mt_srand() and srand() to not check the number of arguments to + determine whether a random seed should be used. Passing null will generate + a random seed, 0 will use zero as the seed. The functions are now consistent + with Mt19937::__construct(). - Sockets: . Added socket_atmark to checks if the socket is OOB marked. diff --git a/ext/random/random.c b/ext/random/random.c index cdc98fbf242d7..30ae6c3baa7bc 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -675,19 +675,20 @@ PHP_FUNCTION(lcg_value) PHP_FUNCTION(mt_srand) { zend_long seed = 0; + bool seed_is_null = true; zend_long mode = MT_RAND_MT19937; php_random_status *status = RANDOM_G(mt19937); php_random_status_state_mt19937 *state = status->state; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL - Z_PARAM_LONG(seed) + Z_PARAM_LONG_OR_NULL(seed, seed_is_null) Z_PARAM_LONG(mode) ZEND_PARSE_PARAMETERS_END(); state->mode = mode; - if (ZEND_NUM_ARGS() == 0) { + if (seed_is_null) { php_random_mt19937_seed_default(status->state); } else { php_random_algo_mt19937.seed(status, (uint64_t) seed); diff --git a/ext/random/random.stub.php b/ext/random/random.stub.php index e87aec3a27ced..d03057d7a6a6e 100644 --- a/ext/random/random.stub.php +++ b/ext/random/random.stub.php @@ -16,10 +16,10 @@ function lcg_value(): float {} - function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} + function mt_srand(?int $seed = null, int $mode = MT_RAND_MT19937): void {} /** @alias mt_srand */ - function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} + function srand(?int $seed = null, int $mode = MT_RAND_MT19937): void {} function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} diff --git a/ext/random/random_arginfo.h b/ext/random/random_arginfo.h index 5fc34c95aee63..967dd2d2eb290 100644 --- a/ext/random/random_arginfo.h +++ b/ext/random/random_arginfo.h @@ -1,11 +1,11 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7b9594d2eadb778ecec34114b67f2d0ae8bbb58a */ + * Stub hash: 533dc78162cc1e510f7c87971a6350acd43de1ab */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_lcg_value, 0, 0, IS_DOUBLE, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_srand, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MT_RAND_MT19937") ZEND_END_ARG_INFO() From 3ed526441400060aa4e618b91b3352371fcd02a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 21 Jan 2023 00:09:45 +0100 Subject: [PATCH 271/895] [ci skip] random: Fix whitespace errors in randomizer.c --- ext/random/randomizer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 75e88c8b01012..9457a27b63fcc 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -161,7 +161,7 @@ PHP_METHOD(Random_Randomizer, getFloat) bounds_type = ZSTR_VAL(bounds_name)[0] + ZSTR_LEN(bounds_name); } - + switch (bounds_type) { case 'C' + sizeof("ClosedOpen") - 1: if (UNEXPECTED(max <= min)) { @@ -424,7 +424,7 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) mask = 0x7; } else if (source_length <= 0x10) { mask = 0xF; - } else if (source_length <= 0x20) { + } else if (source_length <= 0x20) { mask = 0x1F; } else if (source_length <= 0x40) { mask = 0x3F; From 8a73a68190b593588b1b6143a1e53d5da4a5f8b1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Jan 2023 02:21:49 +0200 Subject: [PATCH 272/895] Use fast encoding conversion filters in mb_send_mail --- ext/mbstring/libmbfl/mbfl/mbfilter.c | 60 ---------------------------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 8 ---- ext/mbstring/mbstring.c | 38 +++++------------- 3 files changed, 11 insertions(+), 95 deletions(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 63e0f8c321e3f..3c1d9071d3a98 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -230,66 +230,6 @@ const mbfl_encoding *mbfl_encoding_detector_judge(mbfl_encoding_detector *identd return enc; } -/* - * encoding converter - */ -mbfl_string * -mbfl_convert_encoding( - mbfl_string *string, - mbfl_string *result, - const mbfl_encoding *toenc) -{ - size_t n; - unsigned char *p; - mbfl_memory_device device; - mbfl_convert_filter *filter1 = NULL; - mbfl_convert_filter *filter2 = NULL; - - /* initialize */ - if (mbfl_convert_filter_get_vtbl(string->encoding, toenc) != NULL) { - filter1 = mbfl_convert_filter_new(string->encoding, toenc, mbfl_memory_device_output, 0, &device); - } else { - filter2 = mbfl_convert_filter_new(&mbfl_encoding_wchar, toenc, mbfl_memory_device_output, 0, &device); - if (filter2 != NULL) { - filter1 = mbfl_convert_filter_new(string->encoding, &mbfl_encoding_wchar, (int (*)(int, void*))filter2->filter_function, NULL, filter2); - if (filter1 == NULL) { - mbfl_convert_filter_delete(filter2); - } - } - } - if (filter1 == NULL) { - return NULL; - } - - if (filter2 != NULL) { - filter2->illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; - filter2->illegal_substchar = '?'; - } - - mbfl_memory_device_init(&device, string->len, (string->len >> 2) + 8); - - /* feed data */ - n = string->len; - p = string->val; - if (p != NULL) { - while (n > 0) { - if ((*filter1->filter_function)(*p++, filter1) < 0) { - break; - } - n--; - } - } - - mbfl_convert_filter_flush(filter1); - mbfl_convert_filter_delete(filter1); - if (filter2 != NULL) { - mbfl_convert_filter_flush(filter2); - mbfl_convert_filter_delete(filter2); - } - - return mbfl_memory_device_result(&device, result); -} - /* * strcut */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 7913743587acf..86720330018f3 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -147,14 +147,6 @@ MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); MBFLAPI extern const mbfl_encoding *mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); - -/* - * encoding converter - */ -MBFLAPI extern mbfl_string * -mbfl_convert_encoding(mbfl_string *string, mbfl_string *result, const mbfl_encoding *toenc); - - /* Lengths -1 through -16 are reserved for error return values */ static inline int mbfl_is_error(size_t len) { return len >= (size_t) -16; diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index dee7127ad7cbd..ab2a384a05682 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4168,7 +4168,7 @@ PHP_FUNCTION(mb_send_mail) int cnt_trans_enc:1; } suppressed_hdrs = { 0, 0 }; - char *message_buf = NULL, *subject_buf = NULL, *p; + char *subject_buf = NULL, *p; mbfl_string orig_str, conv_str; mbfl_string *pstr; /* pointer to mbfl string for return value */ enum mbfl_no_encoding; @@ -4326,27 +4326,17 @@ PHP_FUNCTION(mb_send_mail) } /* message body */ - orig_str.val = (unsigned char *)message; - orig_str.len = message_len; - orig_str.encoding = MBSTRG(current_internal_encoding); + const mbfl_encoding *msg_enc = MBSTRG(current_internal_encoding); - if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { - orig_str.encoding = mb_guess_encoding((unsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + if (msg_enc == &mbfl_encoding_pass) { + msg_enc = mb_guess_encoding((unsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } - pstr = NULL; - { - mbfl_string tmpstr; - - if (mbfl_convert_encoding(&orig_str, &tmpstr, tran_cs) != NULL) { - tmpstr.encoding = &mbfl_encoding_8bit; - pstr = mbfl_convert_encoding(&tmpstr, &conv_str, body_enc); - efree(tmpstr.val); - } - } - if (pstr != NULL) { - message_buf = message = (char *)pstr->val; - } + unsigned int num_errors = 0; + zend_string *tmpstr = mb_fast_convert((unsigned char*)message, message_len, msg_enc, tran_cs, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR, &num_errors); + zend_string *conv = mb_fast_convert((unsigned char*)ZSTR_VAL(tmpstr), ZSTR_LEN(tmpstr), &mbfl_encoding_8bit, body_enc, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR, &num_errors); + zend_string_free(tmpstr); + message = ZSTR_VAL(conv); /* other headers */ #define PHP_MBSTR_MAIL_MIME_HEADER1 "MIME-Version: 1.0" @@ -4401,11 +4391,7 @@ PHP_FUNCTION(mb_send_mail) extra_cmd = php_escape_shell_cmd(ZSTR_VAL(extra_cmd)); } - if (!err && php_mail(to_r, subject, message, ZSTR_VAL(str_headers), extra_cmd ? ZSTR_VAL(extra_cmd) : NULL)) { - RETVAL_TRUE; - } else { - RETVAL_FALSE; - } + RETVAL_BOOL(!err && php_mail(to_r, subject, message, ZSTR_VAL(str_headers), extra_cmd ? ZSTR_VAL(extra_cmd) : NULL)); if (extra_cmd) { zend_string_release_ex(extra_cmd, 0); @@ -4417,9 +4403,7 @@ PHP_FUNCTION(mb_send_mail) if (subject_buf) { efree((void *)subject_buf); } - if (message_buf) { - efree((void *)message_buf); - } + zend_string_free(conv); mbfl_memory_device_clear(&device); zend_hash_destroy(&ht_headers); if (str_headers) { From 23dab38fe90d949a4ac11e444030b4e28eb45ea9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Jan 2023 07:51:54 +0200 Subject: [PATCH 273/895] Use smart_str as dynamic buffer for extra headers in mb_send_mail --- ext/mbstring/mbstring.c | 58 +++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ab2a384a05682..630b926af4684 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4160,7 +4160,7 @@ PHP_FUNCTION(mb_send_mail) zend_string *extra_cmd = NULL; HashTable *headers_ht = NULL; zend_string *str_headers = NULL; - size_t n, i; + size_t i; char *to_r = NULL; char *force_extra_parameters = INI_STR("mail.force_extra_parameters"); struct { @@ -4175,15 +4175,12 @@ PHP_FUNCTION(mb_send_mail) const mbfl_encoding *tran_cs, /* transfer text charset */ *head_enc, /* header transfer encoding */ *body_enc; /* body transfer encoding */ - mbfl_memory_device device; /* automatic allocateable buffer for additional header */ const mbfl_language *lang; int err = 0; HashTable ht_headers; zval *s; - extern void mbfl_memory_device_unput(mbfl_memory_device *device); /* initialize */ - mbfl_memory_device_init(&device, 0, 0); mbfl_string_init(&orig_str); mbfl_string_init(&conv_str); @@ -4343,47 +4340,59 @@ PHP_FUNCTION(mb_send_mail) #define PHP_MBSTR_MAIL_MIME_HEADER2 "Content-Type: text/plain" #define PHP_MBSTR_MAIL_MIME_HEADER3 "; charset=" #define PHP_MBSTR_MAIL_MIME_HEADER4 "Content-Transfer-Encoding: " + + smart_str str = {0}; + bool empty = true; + if (str_headers != NULL) { - p = ZSTR_VAL(str_headers); - n = ZSTR_LEN(str_headers); - mbfl_memory_device_strncat(&device, p, n); - if (n > 0 && p[n - 1] != '\n') { - mbfl_memory_device_strncat(&device, line_sep, line_sep_len); + /* Strip trailing CRLF from `str_headers`; we will add CRLF back if necessary */ + size_t len = ZSTR_LEN(str_headers); + if (ZSTR_VAL(str_headers)[len-1] == '\n') { + len--; + } + if (ZSTR_VAL(str_headers)[len-1] == '\r') { + len--; } + smart_str_appendl(&str, ZSTR_VAL(str_headers), len); + empty = false; zend_string_release_ex(str_headers, 0); } if (!zend_hash_str_exists(&ht_headers, "mime-version", sizeof("mime-version") - 1)) { - mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER1, sizeof(PHP_MBSTR_MAIL_MIME_HEADER1) - 1); - mbfl_memory_device_strncat(&device, line_sep, line_sep_len); + if (!empty) { + smart_str_appendl(&str, line_sep, line_sep_len); + } + smart_str_appendl(&str, PHP_MBSTR_MAIL_MIME_HEADER1, sizeof(PHP_MBSTR_MAIL_MIME_HEADER1) - 1); + empty = false; } if (!suppressed_hdrs.cnt_type) { - mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER2, sizeof(PHP_MBSTR_MAIL_MIME_HEADER2) - 1); + if (!empty) { + smart_str_appendl(&str, line_sep, line_sep_len); + } + smart_str_appendl(&str, PHP_MBSTR_MAIL_MIME_HEADER2, sizeof(PHP_MBSTR_MAIL_MIME_HEADER2) - 1); p = (char *)mbfl_encoding_preferred_mime_name(tran_cs); if (p != NULL) { - mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER3, sizeof(PHP_MBSTR_MAIL_MIME_HEADER3) - 1); - mbfl_memory_device_strcat(&device, p); + smart_str_appendl(&str, PHP_MBSTR_MAIL_MIME_HEADER3, sizeof(PHP_MBSTR_MAIL_MIME_HEADER3) - 1); + smart_str_appends(&str, p); } - mbfl_memory_device_strncat(&device, line_sep, line_sep_len); + empty = false; } + if (!suppressed_hdrs.cnt_trans_enc) { - mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER4, sizeof(PHP_MBSTR_MAIL_MIME_HEADER4) - 1); + if (!empty) { + smart_str_appendl(&str, line_sep, line_sep_len); + } + smart_str_appendl(&str, PHP_MBSTR_MAIL_MIME_HEADER4, sizeof(PHP_MBSTR_MAIL_MIME_HEADER4) - 1); p = (char *)mbfl_encoding_preferred_mime_name(body_enc); if (p == NULL) { p = "7bit"; } - mbfl_memory_device_strcat(&device, p); - mbfl_memory_device_strncat(&device, line_sep, line_sep_len); + smart_str_appends(&str, p); } - if (!PG(mail_mixed_lf_and_crlf)) { - mbfl_memory_device_unput(&device); - } - mbfl_memory_device_unput(&device); - mbfl_memory_device_output('\0', &device); - str_headers = zend_string_init((char *)device.buffer, strlen((char *)device.buffer), 0); + str_headers = smart_str_extract(&str); if (force_extra_parameters) { extra_cmd = php_escape_shell_cmd(force_extra_parameters); @@ -4404,7 +4413,6 @@ PHP_FUNCTION(mb_send_mail) efree((void *)subject_buf); } zend_string_free(conv); - mbfl_memory_device_clear(&device); zend_hash_destroy(&ht_headers); if (str_headers) { zend_string_release_ex(str_headers, 0); From f4dd35ea530142298f780ec14fb54997b4aa8a9a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 21 Jan 2023 15:35:15 +0100 Subject: [PATCH 274/895] Remove duplicated length check in exif and remove always false condition from exif The latter condition will never trigger because otherwise the do-while loop wouldn't have exited. Close GH-10402 --- NEWS | 3 +++ ext/exif/exif.c | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 203ba7f3b108a..b784bdc1b5b2e 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Implement GH-10217 (Use strlen() for determining the class_name length). (Dennis Buteyn) +- Exif: + . Removed unneeded codepaths in exif_process_TIFF_in_JPEG(). (nielsdos) + - Fileinfo: . Upgrade bundled libmagic to 5.43. (Anatol) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index a6db8745b3a42..5d77d950a914d 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -3679,11 +3679,6 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, return; } - if (length < 2) { - exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker"); - return; - } - /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { ImageInfo->motorola_intel = 0; @@ -3810,12 +3805,6 @@ static bool exif_scan_JPEG_header(image_info_type *ImageInfo) fpos = php_stream_tell(ImageInfo->infile); - if (marker == 0xff) { - /* 0xff is legal padding, but if we get that many, something's wrong. */ - exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "To many padding bytes"); - return false; - } - /* Read the length of the section. */ if ((lh = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) { EXIF_ERRLOG_CORRUPT(ImageInfo) From 6f53dbb83ee2439aa77fd0889f707015f50e4ead Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Jan 2023 10:28:26 +0200 Subject: [PATCH 275/895] mb_scrub does not attempt to scrub known-valid UTF-8 strings --- ext/mbstring/mbstring.c | 13 ++++++++----- ext/mbstring/tests/mb_scrub.phpt | 8 ++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 630b926af4684..1ef21530b047e 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -5066,12 +5066,10 @@ PHP_FUNCTION(mb_chr) /* {{{ */ PHP_FUNCTION(mb_scrub) { - char* str; - size_t str_len; - zend_string *enc_name = NULL; + zend_string *str, *enc_name = NULL; ZEND_PARSE_PARAMETERS_START(1, 2) - Z_PARAM_STRING(str, str_len) + Z_PARAM_STR(str) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(enc_name) ZEND_PARSE_PARAMETERS_END(); @@ -5081,7 +5079,12 @@ PHP_FUNCTION(mb_scrub) RETURN_THROWS(); } - RETURN_STR(php_mb_convert_encoding_ex(str, str_len, enc, enc)); + if (enc == &mbfl_encoding_utf8 && (GC_FLAGS(str) & IS_STR_VALID_UTF8)) { + /* A valid UTF-8 string will not be changed by mb_scrub; so just increment the refcount and return it */ + RETURN_STR_COPY(str); + } + + RETURN_STR(php_mb_convert_encoding_ex(ZSTR_VAL(str), ZSTR_LEN(str), enc, enc)); } /* }}} */ diff --git a/ext/mbstring/tests/mb_scrub.phpt b/ext/mbstring/tests/mb_scrub.phpt index 1b2d8ab4e34e2..6eb580bf31cc9 100644 --- a/ext/mbstring/tests/mb_scrub.phpt +++ b/ext/mbstring/tests/mb_scrub.phpt @@ -8,7 +8,15 @@ var_dump( "?" === mb_scrub("\x80"), "?" === mb_scrub("\x80", 'UTF-8') ); + +$utf8str = "abc 日本語 Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞"; +// Check $utf8str so it is marked as 'valid UTF-8' +// This will enable optimized implementation of mb_scrub +if (!mb_check_encoding($utf8str, 'UTF-8')) + die("Test string should be valid UTF-8"); +var_dump(mb_scrub($utf8str)); ?> --EXPECT-- bool(true) bool(true) +string(122) "abc 日本語 Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞" From 4f36623c1e71e5bc6d506e21e36c52bc8c21ea06 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 22 Jan 2023 07:39:50 +0200 Subject: [PATCH 276/895] Use RETURN_STR_COPY in mb_output_handler This means the same thing and makes the code read a tiny bit better. Thanks to Nikita Popov for the tip. --- ext/mbstring/mbstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 1ef21530b047e..964d459543efd 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1534,7 +1534,7 @@ PHP_FUNCTION(mb_output_handler) const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding); if (encoding == &mbfl_encoding_pass) { - RETURN_STR(zend_string_copy(str)); + RETURN_STR_COPY(str); } if (arg_status & PHP_OUTPUT_HANDLER_START) { @@ -1574,7 +1574,7 @@ PHP_FUNCTION(mb_output_handler) } if (!MBSTRG(outconv_enabled)) { - RETURN_STR(zend_string_copy(str)); + RETURN_STR_COPY(str); } mb_convert_buf buf; From 1fbe855971d6822921b82ae1ca312b33a1eba7c1 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Thu, 19 Jan 2023 14:52:50 +0100 Subject: [PATCH 277/895] Honor constant expressions instead of just taking the last constant encountered in stubs As an example: should be translated to: ZVAL_LONG(&attribute_Attribute_class_test_arg0, ZEND_ATTRIBUTE_TARGET_FUNCTION | ZEND_ATTRIBUTE_TARGET_METHOD); --- build/gen_stub.php | 217 +++++++++++++++++++++-------------- ext/gd/gd_arginfo.h | 14 +-- ext/zend_test/test_arginfo.h | 12 -- 3 files changed, 137 insertions(+), 106 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 8669a0253b6b6..1dca448a1b462 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1566,22 +1566,34 @@ class EvaluatedValue /** @var mixed */ public $value; public SimpleType $type; - public ?string $cConstValue; + public Expr $expr; public bool $isUnknownConstValue; - public ?ConstInfo $originatingConst; + /** @var ConstInfo[] */ + public array $originatingConsts; /** * @param iterable $allConstInfos */ public static function createFromExpression(Expr $expr, ?SimpleType $constType, ?string $cConstName, iterable $allConstInfos): EvaluatedValue { - $originatingConst = null; - $isUnknownConstValue = null; + $visitor = new class($allConstInfos) extends PhpParser\NodeVisitorAbstract + { + public array $visitedConstants = []; + /** @var iterable */ + public iterable $allConstInfos; + + /** + * @param iterable $allConstInfos + */ + public function __construct(iterable $allConstInfos) + { + $this->allConstInfos = $allConstInfos; + } - $evaluator = new ConstExprEvaluator( - function (Expr $expr) use ($allConstInfos, &$constType, &$originatingConst, &$isUnknownConstValue) { + public function enterNode(Node $expr) + { if (!$expr instanceof Expr\ConstFetch && !$expr instanceof Expr\ClassConstFetch) { - throw new Exception($this->getVariableTypeName() . " " . $this->getVariableLikeName() . " has an unsupported value"); + return; } if ($expr instanceof Expr\ClassConstFetch) { @@ -1591,24 +1603,56 @@ function (Expr $expr) use ($allConstInfos, &$constType, &$originatingConst, &$is } if ($originatingConstName->isUnknown()) { - $originatingConst = null; - $isUnknownConstValue = true; + return; + } + + foreach ($this->allConstInfos as $const) { + if ($originatingConstName->equals($const->name)) { + $this->visitedConstants[] = $const; + return $const->getValue($this->allConstInfos)->expr; + } + } + } + }; + + $nodeTraverser = new PhpParser\NodeTraverser; + $nodeTraverser->addVisitor($visitor); + $expr = $nodeTraverser->traverse([$expr])[0]; + + $isUnknownConstValue = false; + $evaluator = new ConstExprEvaluator( + function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) { + if (!$expr instanceof Expr\ConstFetch) { + throw new Exception($this->getVariableTypeName() . " " . $this->getVariableLikeName() . " has an unsupported value"); + } + + $constName = $expr->name->__toString(); + if (strtolower($constName) === "unknown") { + $isUnknownConstValue = true; return null; } foreach ($allConstInfos as $const) { - if (!$originatingConstName->equals($const->name)) { + if ($constName != $const->cValue) { continue; } - if ($constType === null && $const->phpDocType) { + if ($const->phpDocType) { $constType = $const->phpDocType->tryToSimpleType(); + if ($constType->isBool()) { + return true; + } elseif ($constType->isInt()) { + return 1; + } elseif ($constType->isFloat()) { + return M_PI; + } elseif ($constType->isString()) { + return $const->name; + } elseif ($constType->isArray()) { + return []; + } } - $originatingConst = $const; - $isUnknownConstValue = false; - return null; } @@ -1620,82 +1664,76 @@ function (Expr $expr) use ($allConstInfos, &$constType, &$originatingConst, &$is return new EvaluatedValue( $result, - $constType ?: SimpleType::fromValue($result), - $cConstName, - $originatingConst, - (bool) $isUnknownConstValue + $constType ?? SimpleType::fromValue($result), + $cConstName === null ? $expr : new Expr\ConstFetch(new Node\Name($cConstName)), + $visitor->visitedConstants, + $isUnknownConstValue ); } public static function null(): EvaluatedValue { - return new self(null, SimpleType::null(), null, null, false); + return new self(null, SimpleType::null(), new Expr\ConstFetch(new Node\Name('null')), [], false); } /** * @param mixed $value + * @param ConstInfo[] $originatingConsts */ - private function __construct($value, SimpleType $type, ?string $cConstName, ?ConstInfo $originatingConst, bool $isUnknownConstValue) + private function __construct($value, SimpleType $type, Expr $expr, array $originatingConsts, bool $isUnknownConstValue) { $this->value = $value; $this->type = $type; - $this->cConstValue = $cConstName; - $this->originatingConst = $originatingConst; + $this->expr = $expr; + $this->originatingConsts = $originatingConsts; $this->isUnknownConstValue = $isUnknownConstValue; } - /** - * @param iterable $allConstInfos - */ - public function initializeZval(string $zvalName, iterable $allConstInfos): string + public function initializeZval(string $zvalName): string { - $cConstValue = $this->getCConstValue($allConstInfos); + $cExpr = $this->getCExpr(); $code = "\tzval $zvalName;\n"; if ($this->type->isNull()) { $code .= "\tZVAL_NULL(&$zvalName);\n"; } elseif ($this->type->isBool()) { - $code .= "\t" . ($this->value ? 'ZVAL_TRUE' : 'ZVAL_FALSE') . "(&$zvalName);\n"; + if ($cExpr == 'true') { + $code .= "\tZVAL_TRUE(&$zvalName);\n"; + } elseif ($cExpr == 'false') { + $code .= "\tZVAL_FALSE(&$zvalName);\n"; + } else { + $code .= "\tZVAL_BOOL(&$zvalName, $cExpr);\n"; + } } elseif ($this->type->isInt()) { - $code .= "\tZVAL_LONG(&$zvalName, " . ($cConstValue ?: $this->value) . ");\n"; + $code .= "\tZVAL_LONG(&$zvalName, $cExpr);\n"; } elseif ($this->type->isFloat()) { - $code .= "\tZVAL_DOUBLE(&$zvalName, " . ($cConstValue ?: $this->value) . ");\n"; + $code .= "\tZVAL_DOUBLE(&$zvalName, $cExpr);\n"; } elseif ($this->type->isString()) { - if (!$cConstValue && $this->value === "") { + if ($cExpr === '""') { $code .= "\tZVAL_EMPTY_STRING(&$zvalName);\n"; } else { - $constValue = $cConstValue ?: '"' . addslashes($this->value) . '"'; - $code .= "\tzend_string *{$zvalName}_str = zend_string_init($constValue, strlen($constValue), 1);\n"; + $code .= "\tzend_string *{$zvalName}_str = zend_string_init($cExpr, strlen($cExpr), 1);\n"; $code .= "\tZVAL_STR(&$zvalName, {$zvalName}_str);\n"; } } elseif ($this->type->isArray()) { - if (!$cConstValue && empty($this->value)) { + if ($cExpr == '[]' && empty($this->value)) { $code .= "\tZVAL_EMPTY_ARRAY(&$zvalName);\n"; } else { throw new Exception("Unimplemented default value"); } } else { - throw new Exception("Invalid default value"); + throw new Exception("Invalid default value: " . print_r($this->type, true)); } return $code; } - /** - * @param iterable $allConstInfos - */ - public function getCConstValue(iterable $allConstInfos): ?string + public function getCExpr(): ?string { - if ($this->cConstValue) { - return $this->cConstValue; - } - - if ($this->originatingConst) { - return $this->originatingConst->getValue($allConstInfos)->getCConstValue($allConstInfos); - } - - return null; + $prettyPrinter = new Standard; + $expr = $prettyPrinter->prettyPrintExpr($this->expr); + return $expr[0] == '"' ? $expr : preg_replace('(\bnull\b)', 'NULL', str_replace('\\', '', $expr)); } } @@ -1911,8 +1949,10 @@ protected function getFieldSynopsisValueString(iterable $allConstInfos): ?string return null; } - if ($value->originatingConst) { - return $value->originatingConst->getFieldSynopsisValueString($allConstInfos); + if ($value->originatingConsts) { + return implode("\n", array_map(function (ConstInfo $const) use ($allConstInfos) { + return $const->getFieldSynopsisValueString($allConstInfos); + }, $value->originatingConsts)); } return $this->valueString; @@ -1934,7 +1974,7 @@ public function getDeclaration(iterable $allConstInfos): string } $value = EvaluatedValue::createFromExpression($this->value, $type, $this->cValue, $allConstInfos); - if ($value->isUnknownConstValue && !$value->cConstValue) { + if ($value->isUnknownConstValue && $this->cValue === null && $value->expr instanceof Expr\ConstFetch && $value->expr->name->__toString() == $this->name->__toString()) { throw new Exception("Constant " . $this->name->__toString() . " must have a @cvalue annotation"); } @@ -1965,7 +2005,7 @@ private function getGlobalConstDeclaration(EvaluatedValue $value, iterable $allC { $constName = str_replace('\\', '\\\\', $this->name->__toString()); $constValue = $value->value; - $cConstValue = $value->getCConstValue($allConstInfos); + $cExpr = $value->getCExpr(); $flags = "CONST_PERSISTENT"; if ($this->phpVersionIdMinimumCompatibility !== null && $this->phpVersionIdMinimumCompatibility < 80000) { @@ -1980,19 +2020,19 @@ private function getGlobalConstDeclaration(EvaluatedValue $value, iterable $allC } if ($value->type->isBool()) { - return "\tREGISTER_BOOL_CONSTANT(\"$constName\", " . ($cConstValue ?: ($constValue ? "true" : "false")) . ", $flags);\n"; + return "\tREGISTER_BOOL_CONSTANT(\"$constName\", " . ($cExpr ?: ($constValue ? "true" : "false")) . ", $flags);\n"; } if ($value->type->isInt()) { - return "\tREGISTER_LONG_CONSTANT(\"$constName\", " . ($cConstValue ?: (int) $constValue) . ", $flags);\n"; + return "\tREGISTER_LONG_CONSTANT(\"$constName\", " . ($cExpr ?: (int) $constValue) . ", $flags);\n"; } if ($value->type->isFloat()) { - return "\tREGISTER_DOUBLE_CONSTANT(\"$constName\", " . ($cConstValue ?: (float) $constValue) . ", $flags);\n"; + return "\tREGISTER_DOUBLE_CONSTANT(\"$constName\", " . ($cExpr ?: (float) $constValue) . ", $flags);\n"; } if ($value->type->isString()) { - return "\tREGISTER_STRING_CONSTANT(\"$constName\", " . ($cConstValue ?: '"' . addslashes($constValue) . '"') . ", $flags);\n"; + return "\tREGISTER_STRING_CONSTANT(\"$constName\", " . ($cExpr ?: '"' . addslashes($constValue) . '"') . ", $flags);\n"; } throw new Exception("Unimplemented constant type");} @@ -2025,35 +2065,35 @@ private function getClassConstDeclaration(EvaluatedValue $value, iterable $allCo private function getValueAssertion(EvaluatedValue $value): string { - if ($value->isUnknownConstValue || $value->originatingConst || $value->cConstValue === null) { + if ($value->isUnknownConstValue || $value->originatingConsts || $this->cValue === null) { return ""; } - $cConstValue = $value->cConstValue; + $cExpr = $value->getCExpr(); $constValue = $value->value; if ($value->type->isNull()) { - return "\tZEND_ASSERT($cConstValue == NULL);\n"; + return "\tZEND_ASSERT($cExpr == NULL);\n"; } if ($value->type->isBool()) { $cValue = $constValue ? "true" : "false"; - return "\tZEND_ASSERT($cConstValue == $cValue);\n"; + return "\tZEND_ASSERT($cExpr == $cValue);\n"; } if ($value->type->isInt()) { $cValue = (int) $constValue; - return "\tZEND_ASSERT($cConstValue == $cValue);\n"; + return "\tZEND_ASSERT($cExpr == $cValue);\n"; } if ($value->type->isFloat()) { $cValue = (float) $constValue; - return "\tZEND_ASSERT($cConstValue == $cValue);\n"; + return "\tZEND_ASSERT($cExpr == $cValue);\n"; } if ($value->type->isString()) { $cValue = '"' . addslashes($constValue) . '"'; - return "\tZEND_ASSERT(strcmp($cConstValue, $cValue) == 0);\n"; + return "\tZEND_ASSERT(strcmp($cExpr, $cValue) == 0);\n"; } throw new Exception("Unimplemented constant type"); @@ -2170,7 +2210,7 @@ public function getDeclaration(iterable $allConstInfos): string { $defaultValue = EvaluatedValue::null(); } else { $defaultValue = EvaluatedValue::createFromExpression($this->defaultValue, null, null, $allConstInfos); - if ($defaultValue->isUnknownConstValue || ($defaultValue->originatingConst && $defaultValue->getCConstValue($allConstInfos) === null)) { + if ($defaultValue->isUnknownConstValue || ($defaultValue->originatingConsts && $defaultValue->getCExpr() === null)) { echo "Skipping code generation for property $this->name, because it has an unknown constant default value\n"; return ""; } @@ -2220,7 +2260,7 @@ public function getDeclaration(iterable $allConstInfos): string { if ($this->defaultValue === null && $this->type !== null) { $code .= "\tzval $zvalName;\n\tZVAL_UNDEF(&$zvalName);\n"; } else { - $code .= $defaultValue->initializeZval($zvalName, $allConstInfos); + $code .= $defaultValue->initializeZval($zvalName); } $code .= "\tzend_string *property_{$propertyName}_name = zend_string_init(\"$propertyName\", sizeof(\"$propertyName\") - 1, 1);\n"; @@ -2314,7 +2354,7 @@ public function getDeclaration(iterable $allConstInfos): string { $value = EvaluatedValue::createFromExpression($this->value, null, null, $allConstInfos); $zvalName = "enum_case_{$escapedName}_value"; - $code = "\n" . $value->initializeZval($zvalName, $allConstInfos); + $code = "\n" . $value->initializeZval($zvalName); $code .= "\tzend_enum_add_case_cstr(class_entry, \"$escapedName\", &$zvalName);\n"; } @@ -2334,11 +2374,14 @@ public function __construct(string $class, array $args) { } /** @param iterable $allConstInfos */ - public function generateCode(string $invocation, string $nameSuffix, iterable $allConstInfos): string { + public function generateCode(string $invocation, string $nameSuffix, iterable $allConstInfos, ?int $phpVersionIdMinimumCompatibility): string { + $php82MinimumCompatibility = $phpVersionIdMinimumCompatibility === null || $phpVersionIdMinimumCompatibility >= PHP_82_VERSION_ID; /* see ZEND_KNOWN_STRINGS in Zend/strings.h */ - static $knowns = [ - "SensitiveParameter" => "ZEND_STR_SENSITIVEPARAMETER", - ]; + $knowns = []; + if ($php82MinimumCompatibility) { + $knowns["SensitiveParameter"] = "ZEND_STR_SENSITIVEPARAMETER"; + } + $code = "\n"; $escapedAttributeName = strtr($this->class, '\\', '_'); if (isset($knowns[$escapedAttributeName])) { @@ -2351,7 +2394,7 @@ public function generateCode(string $invocation, string $nameSuffix, iterable $a foreach ($this->args as $i => $arg) { $value = EvaluatedValue::createFromExpression($arg->value, null, null, $allConstInfos); $zvalName = "attribute_{$escapedAttributeName}_{$nameSuffix}_arg$i"; - $code .= $value->initializeZval($zvalName, $allConstInfos); + $code .= $value->initializeZval($zvalName); $code .= "\tZVAL_COPY_VALUE(&attribute_{$escapedAttributeName}_{$nameSuffix}->args[$i].value, &$zvalName);\n"; if ($arg->name) { $code .= "\tattribute_{$escapedAttributeName}_{$nameSuffix}->args[$i].name = zend_string_init(\"{$arg->name->name}\", sizeof(\"{$arg->name->name}\") - 1, 1);\n"; @@ -2454,8 +2497,8 @@ public function getRegistration(iterable $allConstInfos): string $code = ''; + $php80MinimumCompatibility = $this->phpVersionIdMinimumCompatibility === null || $this->phpVersionIdMinimumCompatibility >= PHP_80_VERSION_ID; $php81MinimumCompatibility = $this->phpVersionIdMinimumCompatibility === null || $this->phpVersionIdMinimumCompatibility >= PHP_81_VERSION_ID; - $php82MinimumCompatibility = $this->phpVersionIdMinimumCompatibility === null || $this->phpVersionIdMinimumCompatibility >= PHP_82_VERSION_ID; if ($this->type === "enum" && !$php81MinimumCompatibility) { $code .= "#if (PHP_VERSION_ID >= " . PHP_81_VERSION_ID . ")\n"; @@ -2522,27 +2565,27 @@ function (Name $item) { } if (!empty($this->attributes)) { - if (!$php82MinimumCompatibility) { - $code .= "\n#if (PHP_VERSION_ID >= " . PHP_82_VERSION_ID . ")"; + if (!$php80MinimumCompatibility) { + $code .= "\n#if (PHP_VERSION_ID >= " . PHP_80_VERSION_ID . ")"; } foreach ($this->attributes as $attribute) { - $code .= $attribute->generateCode("zend_add_class_attribute(class_entry", "class_$escapedName", $allConstInfos); + $code .= $attribute->generateCode("zend_add_class_attribute(class_entry", "class_$escapedName", $allConstInfos, $this->phpVersionIdMinimumCompatibility); } - if (!$php82MinimumCompatibility) { + if (!$php80MinimumCompatibility) { $code .= "#endif\n"; } } - if ($attributeInitializationCode = generateAttributeInitialization($this->funcInfos, $allConstInfos, $this->cond)) { - if (!$php82MinimumCompatibility) { - $code .= "#if (PHP_VERSION_ID >= " . PHP_82_VERSION_ID . ")\n"; + if ($attributeInitializationCode = generateAttributeInitialization($this->funcInfos, $allConstInfos, $this->phpVersionIdMinimumCompatibility, $this->cond)) { + if (!$php80MinimumCompatibility) { + $code .= "#if (PHP_VERSION_ID >= " . PHP_80_VERSION_ID . ")\n"; } $code .= "\n" . $attributeInitializationCode; - if (!$php82MinimumCompatibility) { + if (!$php80MinimumCompatibility) { $code .= "#endif\n"; } } @@ -3995,12 +4038,12 @@ static function (FuncInfo $funcInfo) use ($fileInfo, &$generatedFunctionDeclarat } } - $php82MinimumCompatibility = $fileInfo->generateLegacyArginfoForPhpVersionId === null || $fileInfo->generateLegacyArginfoForPhpVersionId >= PHP_82_VERSION_ID; + $php80MinimumCompatibility = $fileInfo->generateLegacyArginfoForPhpVersionId === null || $fileInfo->generateLegacyArginfoForPhpVersionId >= PHP_80_VERSION_ID; if ($fileInfo->generateClassEntries) { - if ($attributeInitializationCode = generateAttributeInitialization($fileInfo->funcInfos, $allConstInfos, null)) { - if (!$php82MinimumCompatibility) { - $attributeInitializationCode = "\n#if (PHP_VERSION_ID >= " . PHP_82_VERSION_ID . ")" . $attributeInitializationCode . "#endif\n"; + if ($attributeInitializationCode = generateAttributeInitialization($fileInfo->funcInfos, $allConstInfos, $fileInfo->generateLegacyArginfoForPhpVersionId, null)) { + if (!$php80MinimumCompatibility) { + $attributeInitializationCode = "\n#if (PHP_VERSION_ID >= " . PHP_80_VERSION_ID . ")" . $attributeInitializationCode . "#endif\n"; } } @@ -4069,11 +4112,11 @@ function generateFunctionEntries(?Name $className, array $funcInfos, ?string $co /** * @param iterable $funcInfos */ -function generateAttributeInitialization(iterable $funcInfos, iterable $allConstInfos, ?string $parentCond = null): string { +function generateAttributeInitialization(iterable $funcInfos, iterable $allConstInfos, ?int $phpVersionIdMinimumCompatibility, ?string $parentCond = null): string { return generateCodeWithConditions( $funcInfos, "", - static function (FuncInfo $funcInfo) use ($allConstInfos) { + static function (FuncInfo $funcInfo) use ($allConstInfos, $phpVersionIdMinimumCompatibility) { $code = null; foreach ($funcInfo->args as $index => $arg) { @@ -4084,7 +4127,7 @@ static function (FuncInfo $funcInfo) use ($allConstInfos) { } foreach ($arg->attributes as $attribute) { - $code .= $attribute->generateCode("zend_add_parameter_attribute(zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1), $index", "{$funcInfo->name->getMethodSynopsisFilename()}_arg{$index}", $allConstInfos); + $code .= $attribute->generateCode("zend_add_parameter_attribute(zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1), $index", "{$funcInfo->name->getMethodSynopsisFilename()}_arg{$index}", $allConstInfos, $phpVersionIdMinimumCompatibility); } } diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index 9e4ac86455928..8ef90f0fd4bf2 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -974,25 +974,25 @@ static void register_gd_symbols(int module_number) REGISTER_STRING_CONSTANT("GD_EXTRA_VERSION", GD_EXTRA_VERSION, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_NO_FILTER", 0, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_NO_FILTER", 0x0, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_FILTER_NONE", 8, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_NONE", 0x8, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_FILTER_SUB", 16, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_SUB", 0x10, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_FILTER_UP", 32, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_UP", 0x20, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_FILTER_AVG", 64, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_AVG", 0x40, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_FILTER_PAETH", 128, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_PAETH", 0x80, CONST_PERSISTENT); #endif #if defined(HAVE_GD_PNG) - REGISTER_LONG_CONSTANT("PNG_ALL_FILTERS", 248, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_ALL_FILTERS", 0x8 | 0x10 | 0x20 | 0x40 | 0x80, CONST_PERSISTENT); #endif } diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 025bd791b190e..3c6e83e8010e5 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -375,7 +375,6 @@ static void register_test_symbols(int module_number) REGISTER_LONG_CONSTANT("ZEND_TEST_DEPRECATED", 42, CONST_PERSISTENT | CONST_DEPRECATED); -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); zend_attribute *attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), 0, attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0, 1); zend_string_release(attribute_name_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0); @@ -383,7 +382,6 @@ static void register_test_symbols(int module_number) zend_string *attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0_str = zend_string_init("value1", strlen("value1"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0, attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0_str); ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0->args[0].value, &attribute_ZendTestParameterAttribute_zend_test_parameter_with_attribute_arg0_arg0); -#endif } static zend_class_entry *register_class__ZendTestInterface(void) @@ -510,14 +508,12 @@ static zend_class_entry *register_class_ZendTestAttribute(void) class_entry = zend_register_internal_class_ex(&ce, NULL); class_entry->ce_flags |= ZEND_ACC_FINAL; -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_Attribute_class_ZendTestAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1); zend_attribute *attribute_Attribute_class_ZendTestAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestAttribute, 1); zend_string_release(attribute_name_Attribute_class_ZendTestAttribute); zval attribute_Attribute_class_ZendTestAttribute_arg0; ZVAL_LONG(&attribute_Attribute_class_ZendTestAttribute_arg0, ZEND_ATTRIBUTE_TARGET_ALL); ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestAttribute->args[0].value, &attribute_Attribute_class_ZendTestAttribute_arg0); -#endif return class_entry; } @@ -536,14 +532,12 @@ static zend_class_entry *register_class_ZendTestParameterAttribute(void) zend_declare_typed_property(class_entry, property_parameter_name, &property_parameter_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); zend_string_release(property_parameter_name); -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_Attribute_class_ZendTestParameterAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1); zend_attribute *attribute_Attribute_class_ZendTestParameterAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestParameterAttribute, 1); zend_string_release(attribute_name_Attribute_class_ZendTestParameterAttribute); zval attribute_Attribute_class_ZendTestParameterAttribute_arg0; ZVAL_LONG(&attribute_Attribute_class_ZendTestParameterAttribute_arg0, ZEND_ATTRIBUTE_TARGET_PARAMETER); ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestParameterAttribute->args[0].value, &attribute_Attribute_class_ZendTestParameterAttribute_arg0); -#endif return class_entry; } @@ -562,14 +556,12 @@ static zend_class_entry *register_class_ZendTestPropertyAttribute(void) zend_declare_typed_property(class_entry, property_parameter_name, &property_parameter_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); zend_string_release(property_parameter_name); -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_Attribute_class_ZendTestPropertyAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1); zend_attribute *attribute_Attribute_class_ZendTestPropertyAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestPropertyAttribute, 1); zend_string_release(attribute_name_Attribute_class_ZendTestPropertyAttribute); zval attribute_Attribute_class_ZendTestPropertyAttribute_arg0; ZVAL_LONG(&attribute_Attribute_class_ZendTestPropertyAttribute_arg0, ZEND_ATTRIBUTE_TARGET_PROPERTY); ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestPropertyAttribute->args[0].value, &attribute_Attribute_class_ZendTestPropertyAttribute_arg0); -#endif return class_entry; } @@ -580,7 +572,6 @@ static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttr INIT_CLASS_ENTRY(ce, "ZendTestClassWithMethodWithParameterAttribute", class_ZendTestClassWithMethodWithParameterAttribute_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_no_override_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); @@ -598,7 +589,6 @@ static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttr zend_string *attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0_str = zend_string_init("value3", strlen("value3"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0, attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0_str); ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0->args[0].value, &attribute_ZendTestParameterAttribute_ZendTestClassWithMethodWithParameterAttribute_override_arg0_arg0); -#endif return class_entry; } @@ -609,7 +599,6 @@ static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParamete INIT_CLASS_ENTRY(ce, "ZendTestChildClassWithMethodWithParameterAttribute", class_ZendTestChildClassWithMethodWithParameterAttribute_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute); -#if (PHP_VERSION_ID >= 80200) zend_string *attribute_name_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1); @@ -619,7 +608,6 @@ static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParamete zend_string *attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0_str = zend_string_init("value4", strlen("value4"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0, attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0_str); ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0->args[0].value, &attribute_ZendTestParameterAttribute_ZendTestChildClassWithMethodWithParameterAttribute_override_arg0_arg0); -#endif return class_entry; } From cf1d21edbd0949f1a4c65deca9a758ab396180a3 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 20 Jan 2023 23:19:06 +0100 Subject: [PATCH 278/895] Add a couple clarifying comments --- build/gen_stub.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 1dca448a1b462..79d5189b26238 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1576,6 +1576,7 @@ class EvaluatedValue */ public static function createFromExpression(Expr $expr, ?SimpleType $constType, ?string $cConstName, iterable $allConstInfos): EvaluatedValue { + // This visitor replaces the PHP constants by C constants. It allows direct expansion of the compiled constants, e.g. later in the pretty printer. $visitor = new class($allConstInfos) extends PhpParser\NodeVisitorAbstract { public array $visitedConstants = []; @@ -1623,6 +1624,7 @@ public function enterNode(Node $expr) $evaluator = new ConstExprEvaluator( function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) { + // $expr is a ConstFetch with a name of a C macro here if (!$expr instanceof Expr\ConstFetch) { throw new Exception($this->getVariableTypeName() . " " . $this->getVariableLikeName() . " has an unsupported value"); } @@ -1663,7 +1665,7 @@ function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) { $result = $evaluator->evaluateDirectly($expr); return new EvaluatedValue( - $result, + $result, // note: we are generally not interested in the actual value of $result, unless it's a bare value, without constants $constType ?? SimpleType::fromValue($result), $cConstName === null ? $expr : new Expr\ConstFetch(new Node\Name($cConstName)), $visitor->visitedConstants, @@ -1717,7 +1719,7 @@ public function initializeZval(string $zvalName): string $code .= "\tZVAL_STR(&$zvalName, {$zvalName}_str);\n"; } } elseif ($this->type->isArray()) { - if ($cExpr == '[]' && empty($this->value)) { + if ($cExpr == '[]') { $code .= "\tZVAL_EMPTY_ARRAY(&$zvalName);\n"; } else { throw new Exception("Unimplemented default value"); @@ -1731,6 +1733,7 @@ public function initializeZval(string $zvalName): string public function getCExpr(): ?string { + // $this->expr has all its PHP constants replaced by C constants $prettyPrinter = new Standard; $expr = $prettyPrinter->prettyPrintExpr($this->expr); return $expr[0] == '"' ? $expr : preg_replace('(\bnull\b)', 'NULL', str_replace('\\', '', $expr)); @@ -1974,6 +1977,7 @@ public function getDeclaration(iterable $allConstInfos): string } $value = EvaluatedValue::createFromExpression($this->value, $type, $this->cValue, $allConstInfos); + // i.e. const NAME = UNKNOWN;, without the annotation if ($value->isUnknownConstValue && $this->cValue === null && $value->expr instanceof Expr\ConstFetch && $value->expr->name->__toString() == $this->name->__toString()) { throw new Exception("Constant " . $this->name->__toString() . " must have a @cvalue annotation"); } From f8f7fd2db1eb1704695c68934faff383dc6f862c Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 22 Jan 2023 17:08:28 +0000 Subject: [PATCH 279/895] sockets add AF_DIVERT constant. Allow to bind a socket to a divert port without being concerned by its address. for ipfw filter purpose (SO_USER_COOKIE constant). FreeBSD only. Close GH-10415. --- NEWS | 1 + UPGRADING | 1 + ext/sockets/sockets.stub.php | 7 +++++++ ext/sockets/sockets_arginfo.h | 5 ++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b784bdc1b5b2e..eb6c171a6768d 100644 --- a/NEWS +++ b/NEWS @@ -94,6 +94,7 @@ PHP NEWS . Added TCP_QUICKACK constant, to give tigher control over ACK delays. (David Carlier) . Added DONTFRAGMENT support for path MTU discovery purpose. (David Carlier) + . Added AF_DIVERT for raw socket for divert ports. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index ead75f216c023..fbcca037489dd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -132,6 +132,7 @@ PHP 8.3 UPGRADE NOTES . IP_PMTUDISC_PROBE (Linux only). . IP_PMTUDISC_INTERFACE (Linux only). . IP_PMTUDISC_OMIT (Linux only). + . AF_DIVERT (FreeBSD only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 3fc77cb9992f0..2db842810a611 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -19,6 +19,13 @@ */ const AF_INET6 = UNKNOWN; #endif +#ifdef AF_DIVERT +/** + * @var int + * @cvalue AF_DIVERT + */ +const AF_DIVERT = UNKNOWN; +#endif /** * @var int * @cvalue SOCK_STREAM diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 040b2bdc2f389..eca944ba52136 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: add91c303eddf7518566bc7e6c1698d7198c0d4c */ + * Stub hash: bf1d22072bd147128a33d82f8b3fc441cf95156a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -340,6 +340,9 @@ static void register_sockets_symbols(int module_number) REGISTER_LONG_CONSTANT("AF_INET", AF_INET, CONST_PERSISTENT); #if HAVE_IPV6 REGISTER_LONG_CONSTANT("AF_INET6", AF_INET6, CONST_PERSISTENT); +#endif +#if defined(AF_DIVERT) + REGISTER_LONG_CONSTANT("AF_DIVERT", AF_DIVERT, CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("SOCK_STREAM", SOCK_STREAM, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SOCK_DGRAM", SOCK_DGRAM, CONST_PERSISTENT); From 7936c8085e7521252214cad295775794dc7be25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 23 Jan 2023 10:52:14 +0100 Subject: [PATCH 280/895] Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) --- Zend/tests/011.phpt | 2 +- Zend/tests/024.phpt | 6 +-- Zend/tests/033.phpt | 30 ++++++------ Zend/tests/assign_dim_obj_null_return.phpt | 4 +- Zend/tests/assign_to_var_003.phpt | 2 +- Zend/tests/bug44660.phpt | 12 ++--- Zend/tests/bug81631.phpt | 2 +- Zend/tests/call_user_func_007.phpt | 2 +- ...lass_on_constant_evaluated_expression.phpt | 2 +- Zend/tests/class_on_object.phpt | 2 +- .../tests/const_expr_dim_on_null_warning.phpt | 2 +- Zend/tests/dereference_002.phpt | 2 +- Zend/tests/dereference_010.phpt | 4 +- Zend/tests/dereference_014.phpt | 4 +- Zend/tests/isset_003.phpt | 2 +- Zend/tests/nullsafe_operator/002.phpt | 2 +- Zend/tests/offset_bool.phpt | 18 +++---- Zend/tests/offset_long.phpt | 18 +++---- Zend/tests/offset_null.phpt | 18 +++---- .../tests/prop_const_expr/basic_nullsafe.phpt | 2 +- .../type_declarations/scalar_strict.phpt | 12 ++--- .../scalar_strict_64bit.phpt | 12 ++--- .../scalar_strict_basic.phpt | 12 ++--- .../typed_properties_111.phpt | 2 +- .../typed_properties_112.phpt | 2 +- .../union_types/type_checking_strict.phpt | 18 +++---- Zend/zend_API.c | 42 +++++++++++----- Zend/zend_API.h | 1 + Zend/zend_attributes.c | 2 +- Zend/zend_builtin_functions.c | 4 +- Zend/zend_compile.c | 6 +-- Zend/zend_execute.c | 24 +++++----- Zend/zend_operators.c | 6 +-- Zend/zend_vm_def.h | 18 +++---- Zend/zend_vm_execute.h | 48 +++++++++---------- ext/bz2/bz2.c | 2 +- ext/bz2/tests/002.phpt | 4 +- ext/dom/node.c | 2 +- ext/dom/parentnode.c | 4 +- ext/ffi/ffi.c | 4 +- ext/fileinfo/fileinfo.c | 2 +- ext/ftp/php_ftp.c | 6 +-- ext/gd/gd.c | 2 +- ext/gmp/gmp.c | 4 +- ext/gmp/tests/gmp_strict_types.phpt | 4 +- ext/hash/hash.c | 4 +- ext/imap/php_imap.c | 2 +- ext/ldap/ldap.c | 10 ++-- ...tute_character_variation_strict_types.phpt | 8 ++-- ext/mysqli/mysqli_nonapi.c | 2 +- ext/mysqli/tests/bug33491.phpt | 2 +- ext/opcache/jit/zend_jit_helpers.c | 14 +++--- ext/opcache/tests/jit/bw_not_002.phpt | 2 +- .../tests/jit/fetch_dim_func_arg_002.phpt | 2 +- ext/opcache/tests/jit/fetch_dim_r_008.phpt | 2 +- ext/opcache/tests/opt/assign_op_001.phpt | 2 +- ext/openssl/tests/openssl_pkey_new_error.phpt | 6 +-- ext/pcntl/pcntl.c | 2 +- ext/pdo/pdo_dbh.c | 12 ++--- ext/pdo/pdo_stmt.c | 12 ++--- ext/pdo_mysql/tests/bug44327.phpt | 2 +- .../pdo_mysql_prepare_native_clear_error.phpt | 2 +- .../pdo_mysql_prepare_native_mixed_style.phpt | 2 +- .../tests/pdo_mysql_stmt_errorcode.phpt | 2 +- .../tests/pdo_mysql_stmt_multiquery.phpt | 2 +- ext/pgsql/pgsql.c | 10 ++-- .../tests/28large_object_import_oid.phpt | 2 +- ext/posix/posix.c | 6 +-- ext/pspell/tests/003.phpt | 2 +- ext/reflection/php_reflection.c | 2 +- .../ReflectionMethod_invokeArgs_error2.phpt | 2 +- .../tests/ReflectionMethod_invoke_basic.phpt | 2 +- .../tests/ReflectionMethod_invoke_error1.phpt | 2 +- ext/session/mod_user.c | 6 +-- ext/session/session.c | 2 +- ext/simplexml/simplexml.c | 4 +- ext/soap/soap.c | 8 ++-- ext/sockets/sockets.c | 2 +- ext/spl/php_spl.c | 6 +-- ext/spl/spl_directory.c | 2 +- ext/spl/tests/array_026.phpt | 2 +- ext/spl/tests/bug62978.phpt | 2 +- ext/spl/tests/bug73029.phpt | 2 +- .../tests/class_implements_variation1.phpt | 8 ++-- ext/spl/tests/class_uses_variation1.phpt | 8 ++-- ext/standard/array.c | 34 ++++++------- ext/standard/mail.c | 4 +- ext/standard/php_mail.h | 4 +- ext/standard/proc_open.c | 2 +- ...rray_column_scalar_index_strict_types.phpt | 8 ++-- .../array/array_diff_assoc_variation1.phpt | 8 ++-- .../array/array_diff_assoc_variation2.phpt | 8 ++-- .../array/array_diff_key_variation1.phpt | 16 +++---- .../array/array_diff_key_variation2.phpt | 16 +++---- .../array/array_diff_uassoc_variation1.phpt | 8 ++-- .../array/array_diff_uassoc_variation2.phpt | 8 ++-- .../array/array_diff_ukey_variation1.phpt | 16 +++---- .../array/array_diff_ukey_variation2.phpt | 16 +++---- .../tests/array/array_diff_variation1.phpt | 8 ++-- .../tests/array/array_diff_variation2.phpt | 8 ++-- .../array_intersect_assoc_variation1.phpt | 16 +++---- .../array_intersect_assoc_variation2.phpt | 16 +++---- .../array/array_intersect_key_variation1.phpt | 16 +++---- .../array/array_intersect_key_variation2.phpt | 16 +++---- .../array_intersect_uassoc_variation1.phpt | 16 +++---- .../array_intersect_uassoc_variation2.phpt | 16 +++---- .../array_intersect_ukey_variation1.phpt | 16 +++---- .../array_intersect_ukey_variation2.phpt | 16 +++---- .../array/array_intersect_variation1.phpt | 16 +++---- .../array/array_intersect_variation2.phpt | 16 +++---- .../array_merge_recursive_variation1.phpt | 16 +++---- .../array_merge_recursive_variation2.phpt | 8 ++-- .../tests/array/array_merge_variation2.phpt | 8 ++-- .../array/array_udiff_assoc_variation1.phpt | 8 ++-- .../array/array_udiff_assoc_variation2.phpt | 8 ++-- .../array/array_udiff_uassoc_variation1.phpt | 8 ++-- .../array/array_udiff_uassoc_variation2.phpt | 8 ++-- .../tests/array/array_udiff_variation1.phpt | 8 ++-- .../tests/array/array_udiff_variation2.phpt | 8 ++-- .../array_uintersect_assoc_variation1.phpt | 8 ++-- .../array_uintersect_assoc_variation2.phpt | 8 ++-- .../array_uintersect_uassoc_variation1.phpt | 8 ++-- .../array_uintersect_uassoc_variation2.phpt | 8 ++-- .../array/array_uintersect_variation1.phpt | 8 ++-- .../array/array_uintersect_variation2.phpt | 8 ++-- ext/standard/tests/array/bug77931.phpt | 2 +- ext/standard/tests/array/compact.phpt | 4 +- ext/standard/tests/array/count_invalid.phpt | 4 +- .../get_class_methods_variation_001.phpt | 8 ++-- .../class_object/get_class_variation_001.phpt | 8 ++-- .../get_parent_class_variation_002.phpt | 8 ++-- .../method_exists_variation_001.phpt | 8 ++-- .../general_functions/array_is_list.phpt | 6 +-- ext/standard/tests/mail/mail_basic7.phpt | 4 +- .../tests/strings/join_variation2.phpt | 8 ++-- .../tests/strings/vprintf_variation2.phpt | 8 ++-- ext/standard/var.c | 4 +- ext/sysvmsg/sysvmsg.c | 2 +- ext/tokenizer/tokenizer.c | 4 +- ext/zend_test/test.c | 2 +- ext/zip/php_zip.c | 16 +++---- ext/zlib/zlib.c | 2 +- tests/lang/bug25922.phpt | 2 +- tests/lang/foreachLoop.003.phpt | 2 +- tests/lang/passByReference_003.phpt | 2 +- 145 files changed, 563 insertions(+), 544 deletions(-) diff --git a/Zend/tests/011.phpt b/Zend/tests/011.phpt index 0a7e3fd90a11e..8412699e026bf 100644 --- a/Zend/tests/011.phpt +++ b/Zend/tests/011.phpt @@ -89,7 +89,7 @@ bool(false) property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given property_exists(): Argument #1 ($object_or_class) must be of type object|string, int given property_exists(): Argument #1 ($object_or_class) must be of type object|string, float given -property_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +property_exists(): Argument #1 ($object_or_class) must be of type object|string, true given property_exists(): Argument #1 ($object_or_class) must be of type object|string, null given bool(true) bool(true) diff --git a/Zend/tests/024.phpt b/Zend/tests/024.phpt index 22d93483fed87..0077113ad1400 100644 --- a/Zend/tests/024.phpt +++ b/Zend/tests/024.phpt @@ -17,14 +17,14 @@ var_dump($a->$b->{$c[1]}); --EXPECTF-- Warning: Undefined variable $a in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined variable $a in %s on line %d Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined variable $a in %s on line %d @@ -49,7 +49,7 @@ NULL Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "1" on int in %s on line %d diff --git a/Zend/tests/033.phpt b/Zend/tests/033.phpt index 22e4b6a12097f..6593d6ba4ad44 100644 --- a/Zend/tests/033.phpt +++ b/Zend/tests/033.phpt @@ -27,39 +27,39 @@ try { --EXPECTF-- Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "foo" on null in %s on line %d Attempt to assign property "foo" on null diff --git a/Zend/tests/assign_dim_obj_null_return.phpt b/Zend/tests/assign_dim_obj_null_return.phpt index b046a865137aa..0a2ea94c552d5 100644 --- a/Zend/tests/assign_dim_obj_null_return.phpt +++ b/Zend/tests/assign_dim_obj_null_return.phpt @@ -79,5 +79,5 @@ Cannot add element to the array as the next element is already occupied Illegal offset type Illegal offset type Cannot use a scalar value as an array -Attempt to assign property "foo" on bool -Attempt to assign property "foo" on bool +Attempt to assign property "foo" on true +Attempt to assign property "foo" on true diff --git a/Zend/tests/assign_to_var_003.phpt b/Zend/tests/assign_to_var_003.phpt index 3ecf89e172561..9cbcc66776ab1 100644 --- a/Zend/tests/assign_to_var_003.phpt +++ b/Zend/tests/assign_to_var_003.phpt @@ -13,7 +13,7 @@ var_dump($var1); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type float in %s on line %d +Warning: Trying to access array offset on float in %s on line %d NULL NULL Done diff --git a/Zend/tests/bug44660.phpt b/Zend/tests/bug44660.phpt index 1d81677f127e9..02588c44b9d11 100644 --- a/Zend/tests/bug44660.phpt +++ b/Zend/tests/bug44660.phpt @@ -48,22 +48,22 @@ var_dump($a); ?> --EXPECTF-- --> read access: -Warning: Attempt to read property "p" on bool in %s on line %d +Warning: Attempt to read property "p" on true in %s on line %d --> direct assignment: -Attempt to assign property "p" on bool +Attempt to assign property "p" on true --> increment: -Attempt to increment/decrement property "p" on bool +Attempt to increment/decrement property "p" on true --> reference assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> reference assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> indexed assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> Confirm assignments have had no impact: bool(true) diff --git a/Zend/tests/bug81631.phpt b/Zend/tests/bug81631.phpt index 191ea951274d2..4542f1fba13f7 100644 --- a/Zend/tests/bug81631.phpt +++ b/Zend/tests/bug81631.phpt @@ -8,7 +8,7 @@ var_dump($b::class); --EXPECTF-- Warning: Undefined variable $b in %s on line 3 -Fatal error: Uncaught TypeError: Cannot use "::class" on value of type null in %s:3 +Fatal error: Uncaught TypeError: Cannot use "::class" on null in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt index 08083e71a9461..1a36f2f19fbb9 100644 --- a/Zend/tests/call_user_func_007.phpt +++ b/Zend/tests/call_user_func_007.phpt @@ -13,7 +13,7 @@ var_dump($a); --EXPECTF-- Warning: Undefined array key 0 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d array(0) { diff --git a/Zend/tests/class_on_constant_evaluated_expression.phpt b/Zend/tests/class_on_constant_evaluated_expression.phpt index c70262c20d7bb..9129d739c4198 100644 --- a/Zend/tests/class_on_constant_evaluated_expression.phpt +++ b/Zend/tests/class_on_constant_evaluated_expression.phpt @@ -7,4 +7,4 @@ An error should be generated when using ::class on a constant evaluated expressi ?> --EXPECTF-- -Fatal error: Cannot use "::class" on value of type int in %s on line %d +Fatal error: Cannot use "::class" on int in %s on line %d diff --git a/Zend/tests/class_on_object.phpt b/Zend/tests/class_on_object.phpt index c316eff3e467d..dab09872901ba 100644 --- a/Zend/tests/class_on_object.phpt +++ b/Zend/tests/class_on_object.phpt @@ -25,4 +25,4 @@ try { string(8) "stdClass" string(8) "stdClass" string(8) "stdClass" -Cannot use "::class" on value of type null +Cannot use "::class" on null diff --git a/Zend/tests/const_expr_dim_on_null_warning.phpt b/Zend/tests/const_expr_dim_on_null_warning.phpt index 9bea754446ffb..3efa4b9c5243d 100644 --- a/Zend/tests/const_expr_dim_on_null_warning.phpt +++ b/Zend/tests/const_expr_dim_on_null_warning.phpt @@ -6,5 +6,5 @@ const C = (null)['foo']; var_dump(C); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index 6c8339bb1321a..135b7432f12f1 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -70,7 +70,7 @@ array(2) { } int(1) -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Warning: Undefined array key 4 in %s on line %d diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt index 191da8f3488f3..53f27322a2e45 100644 --- a/Zend/tests/dereference_010.phpt +++ b/Zend/tests/dereference_010.phpt @@ -21,10 +21,10 @@ var_dump(b()[1]); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d diff --git a/Zend/tests/dereference_014.phpt b/Zend/tests/dereference_014.phpt index 35affdf3caeed..82b9d91f3d46c 100644 --- a/Zend/tests/dereference_014.phpt +++ b/Zend/tests/dereference_014.phpt @@ -27,12 +27,12 @@ var_dump($h); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "a" on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "b" on null in %s on line %d NULL diff --git a/Zend/tests/isset_003.phpt b/Zend/tests/isset_003.phpt index 6979a847af74d..9a0d201fa5341 100644 --- a/Zend/tests/isset_003.phpt +++ b/Zend/tests/isset_003.phpt @@ -33,7 +33,7 @@ Warning: Undefined variable $c in %s on line %d Warning: Undefined variable $d in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "" on string in %s on line %d bool(false) diff --git a/Zend/tests/nullsafe_operator/002.phpt b/Zend/tests/nullsafe_operator/002.phpt index 46c1bb623f6e5..87642bdcb5f08 100644 --- a/Zend/tests/nullsafe_operator/002.phpt +++ b/Zend/tests/nullsafe_operator/002.phpt @@ -35,7 +35,7 @@ try { ?> --EXPECT-- -string(39) "Call to a member function bar() on bool" +string(40) "Call to a member function bar() on false" string(40) "Call to a member function bar() on array" string(38) "Call to a member function bar() on int" string(40) "Call to a member function bar() on float" diff --git a/Zend/tests/offset_bool.phpt b/Zend/tests/offset_bool.phpt index ae8df6d2b5b40..2cb2ccf47b6eb 100644 --- a/Zend/tests/offset_bool.phpt +++ b/Zend/tests/offset_bool.phpt @@ -25,30 +25,30 @@ var_dump($bool[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL Done diff --git a/Zend/tests/offset_long.phpt b/Zend/tests/offset_long.phpt index 17dfe0d29bf74..1d217c32b95f4 100644 --- a/Zend/tests/offset_long.phpt +++ b/Zend/tests/offset_long.phpt @@ -25,30 +25,30 @@ var_dump($long[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Done diff --git a/Zend/tests/offset_null.phpt b/Zend/tests/offset_null.phpt index ae02eece77ca3..bde9407539729 100644 --- a/Zend/tests/offset_null.phpt +++ b/Zend/tests/offset_null.phpt @@ -25,30 +25,30 @@ var_dump($null[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Done diff --git a/Zend/tests/prop_const_expr/basic_nullsafe.phpt b/Zend/tests/prop_const_expr/basic_nullsafe.phpt index da870c0328b0a..6601f362c826b 100644 --- a/Zend/tests/prop_const_expr/basic_nullsafe.phpt +++ b/Zend/tests/prop_const_expr/basic_nullsafe.phpt @@ -39,7 +39,7 @@ Warning: Attempt to read property "test" on null in %s on line %d NULL NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL NULL Printer diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 6d838848e902a..51bb8fac1678f 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -84,10 +84,10 @@ int(2147483647) *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -137,10 +137,10 @@ float(2147483647) float(NAN) *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -190,10 +190,10 @@ string(0) "" *** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index 4705fa81dbd70..5d4dd0edeb682 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -84,10 +84,10 @@ int(9223372036854775807) *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -137,10 +137,10 @@ float(9.223372036854776E+18) float(NAN) *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -190,10 +190,10 @@ string(0) "" *** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt index f02649b8b55fc..296e8f7ad63a8 100644 --- a/Zend/tests/type_declarations/scalar_strict_basic.phpt +++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt @@ -63,10 +63,10 @@ int(1) *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying true value -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -92,10 +92,10 @@ float(1) *** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying true value -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -121,10 +121,10 @@ Testing 'string' type: string(1) "1" *** Trying true value -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/typed_properties_111.phpt b/Zend/tests/type_declarations/typed_properties_111.phpt index c23fb72e5d657..20236e8a19bb3 100644 --- a/Zend/tests/type_declarations/typed_properties_111.phpt +++ b/Zend/tests/type_declarations/typed_properties_111.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECT-- -Cannot assign bool to property Foo::$value of type false +Cannot assign true to property Foo::$value of type false diff --git a/Zend/tests/type_declarations/typed_properties_112.phpt b/Zend/tests/type_declarations/typed_properties_112.phpt index 5d54aa3234fe6..8b1157759fec3 100644 --- a/Zend/tests/type_declarations/typed_properties_112.phpt +++ b/Zend/tests/type_declarations/typed_properties_112.phpt @@ -16,4 +16,4 @@ try { ?> --EXPECT-- -Cannot assign bool to property Foo::$value of type true +Cannot assign false to property Foo::$value of type true diff --git a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt index 7054a7cc19127..31460f5d5719c 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt @@ -71,8 +71,8 @@ INF => INF "42x" => Argument ... must be of type int|float, string given "x" => Argument ... must be of type int|float, string given "" => Argument ... must be of type int|float, string given -true => Argument ... must be of type int|float, bool given -false => Argument ... must be of type int|float, bool given +true => Argument ... must be of type int|float, true given +false => Argument ... must be of type int|float, false given null => Argument ... must be of type int|float, null given [] => Argument ... must be of type int|float, array given new stdClass => Argument ... must be of type int|float, stdClass given @@ -87,7 +87,7 @@ INF => INF "42x" => Argument ... must be of type int|float|false, string given "x" => Argument ... must be of type int|float|false, string given "" => Argument ... must be of type int|float|false, string given -true => Argument ... must be of type int|float|false, bool given +true => Argument ... must be of type int|float|false, true given false => false null => Argument ... must be of type int|float|false, null given [] => Argument ... must be of type int|float|false, array given @@ -135,8 +135,8 @@ INF => Argument ... must be of type string|int|null, float given "42x" => "42x" "x" => "x" "" => "" -true => Argument ... must be of type string|int|null, bool given -false => Argument ... must be of type string|int|null, bool given +true => Argument ... must be of type string|int|null, true given +false => Argument ... must be of type string|int|null, false given null => null [] => Argument ... must be of type string|int|null, array given new stdClass => Argument ... must be of type string|int|null, stdClass given @@ -167,8 +167,8 @@ INF => INF "42x" => Argument ... must be of type array|float, string given "x" => Argument ... must be of type array|float, string given "" => Argument ... must be of type array|float, string given -true => Argument ... must be of type array|float, bool given -false => Argument ... must be of type array|float, bool given +true => Argument ... must be of type array|float, true given +false => Argument ... must be of type array|float, false given null => Argument ... must be of type array|float, null given [] => [] new stdClass => Argument ... must be of type array|float, stdClass given @@ -183,8 +183,8 @@ INF => Argument ... must be of type array|string, float given "42x" => "42x" "x" => "x" "" => "" -true => Argument ... must be of type array|string, bool given -false => Argument ... must be of type array|string, bool given +true => Argument ... must be of type array|string, true given +false => Argument ... must be of type array|string, false given null => Argument ... must be of type array|string, null given [] => [] new stdClass => Argument ... must be of type array|string, stdClass given diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e1e113d0ef39c..21e768f0947c3 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -101,7 +101,7 @@ ZEND_API ZEND_COLD void zend_wrong_property_read(zval *object, zval *property) { zend_string *tmp_property_name; zend_string *property_name = zval_get_tmp_string(property, &tmp_property_name); - zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_type_name(object)); + zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_value_name(object)); zend_tmp_string_release(tmp_property_name); } @@ -142,7 +142,26 @@ ZEND_API const char *zend_get_type_by_const(int type) /* {{{ */ } /* }}} */ -ZEND_API const char *zend_zval_type_name(const zval *arg) /* {{{ */ +ZEND_API const char *zend_zval_value_name(const zval *arg) +{ + ZVAL_DEREF(arg); + + if (Z_ISUNDEF_P(arg)) { + return "null"; + } + + if (Z_TYPE_P(arg) == IS_OBJECT) { + return ZSTR_VAL(Z_OBJCE_P(arg)->name); + } else if (Z_TYPE_P(arg) == IS_FALSE) { + return "false"; + } else if (Z_TYPE_P(arg) == IS_TRUE) { + return "true"; + } + + return zend_get_type_by_const(Z_TYPE_P(arg)); +} + +ZEND_API const char *zend_zval_type_name(const zval *arg) { ZVAL_DEREF(arg); @@ -156,7 +175,6 @@ ZEND_API const char *zend_zval_type_name(const zval *arg) /* {{{ */ return zend_get_type_by_const(Z_TYPE_P(arg)); } -/* }}} */ /* This API exists *only* for use in gettype(). * For anything else, you likely want zend_zval_type_name(). */ @@ -277,7 +295,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(uint32_t n return; } - zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_value_name(arg)); } /* }}} */ @@ -287,7 +305,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t return; } - zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -297,7 +315,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(u return; } - zend_argument_type_error(num, "must be of type ?%s, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type ?%s, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -307,7 +325,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_error(u return; } - zend_argument_type_error(num, "must be of type %s|int, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|int, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -317,7 +335,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_or_null return; } - zend_argument_type_error(num, "must be of type %s|int|null, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|int|null, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -327,7 +345,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_error return; } - zend_argument_type_error(num, "must be of type %s|string, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|string, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -337,7 +355,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_or_nu return; } - zend_argument_type_error(num, "must be of type %s|string|null, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|string|null, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -884,7 +902,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec if (!zend_parse_arg_object(arg, p, ce, check_null)) { if (ce) { if (check_null) { - zend_spprintf(error, 0, "must be of type ?%s, %s given", ZSTR_VAL(ce->name), zend_zval_type_name(arg)); + zend_spprintf(error, 0, "must be of type ?%s, %s given", ZSTR_VAL(ce->name), zend_zval_value_name(arg)); return ""; } else { return ZSTR_VAL(ce->name); @@ -1004,7 +1022,7 @@ static zend_result zend_parse_arg(uint32_t arg_num, zval *arg, va_list *va, cons } efree(error); } else { - zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_type_name(arg)); + zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_value_name(arg)); } } else if (error) { efree(error); diff --git a/Zend/zend_API.h b/Zend/zend_API.h index cbc455eaab0b5..f8197060acf76 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -355,6 +355,7 @@ ZEND_API zend_result zend_parse_parameters_ex(int flags, uint32_t num_args, cons #define zend_parse_parameters_throw(num_args, ...) \ zend_parse_parameters(num_args, __VA_ARGS__) ZEND_API const char *zend_zval_type_name(const zval *arg); +ZEND_API const char *zend_zval_value_name(const zval *arg); ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg); ZEND_API zend_result zend_parse_method_parameters(uint32_t num_args, zval *this_ptr, const char *type_spec, ...); diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index b34092be038a2..2dbcb47392e9a 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -50,7 +50,7 @@ void validate_attribute(zend_attribute *attr, uint32_t target, zend_class_entry if (Z_TYPE(flags) != IS_LONG) { zend_error_noreturn(E_ERROR, "Attribute::__construct(): Argument #1 ($flags) must be of type int, %s given", - zend_zval_type_name(&flags) + zend_zval_value_name(&flags) ); } diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 14ee4512d369e..66f196e5c82b9 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -880,7 +880,7 @@ ZEND_FUNCTION(method_exists) RETURN_FALSE; } } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(klass)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(klass)); RETURN_THROWS(); } @@ -942,7 +942,7 @@ ZEND_FUNCTION(property_exists) } else if (Z_TYPE_P(object) == IS_OBJECT) { ce = Z_OBJCE_P(object); } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(object)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(object)); RETURN_THROWS(); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4cb9b9c85305b..d0a09db6978e6 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7614,7 +7614,7 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f } else { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use %s as default value for property %s::$%s of type %s", - zend_zval_type_name(&value_zv), + zend_zval_value_name(&value_zv), ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(str)); } } @@ -9711,8 +9711,8 @@ static void zend_compile_class_name(znode *result, zend_ast *ast) /* {{{ */ if (expr_node.op_type == IS_CONST) { /* Unlikely case that happen if class_ast is constant folded. * Handle it here, to avoid needing a CONST specialization in the VM. */ - zend_error_noreturn(E_COMPILE_ERROR, "Cannot use \"::class\" on value of type %s", - zend_zval_type_name(&expr_node.u.constant)); + zend_error_noreturn(E_COMPILE_ERROR, "Cannot use \"::class\" on %s", + zend_zval_value_name(&expr_node.u.constant)); } zend_emit_op_tmp(result, ZEND_FETCH_CLASS_NAME, &expr_node, NULL); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e6fc2a191c0d4..7940ad25aa96f 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -635,7 +635,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_POST_DEC_OBJ) { zend_throw_error(NULL, "Attempt to increment/decrement property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } else if (opline->opcode == ZEND_FETCH_OBJ_W || opline->opcode == ZEND_FETCH_OBJ_RW @@ -643,12 +643,12 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_ASSIGN_OBJ_REF) { zend_throw_error(NULL, "Attempt to modify property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } else { zend_throw_error(NULL, "Attempt to assign property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } zend_tmp_string_release(tmp_property_name); @@ -675,7 +675,7 @@ static ZEND_COLD void zend_verify_type_error_common( *need_msg = zend_type_to_string_resolved(arg_info->type, zf->common.scope); if (value) { - *given_kind = zend_zval_type_name(value); + *given_kind = zend_zval_value_name(value); } else { *given_kind = "none"; } @@ -824,7 +824,7 @@ ZEND_COLD zend_never_inline void zend_verify_property_type_error(const zend_prop type_str = zend_type_to_string(info->type); zend_type_error("Cannot assign %s to property %s::$%s of type %s", - zend_zval_type_name(property), + zend_zval_value_name(property), ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name), ZSTR_VAL(type_str)); @@ -1414,7 +1414,7 @@ ZEND_API bool zend_verify_internal_return_type(zend_function *zf, zval *ret) if (ZEND_TYPE_FULL_MASK(ret_info->type) & MAY_BE_VOID) { if (UNEXPECTED(Z_TYPE_P(ret) != IS_NULL)) { - zend_verify_void_return_error(zf, zend_zval_type_name(ret), ""); + zend_verify_void_return_error(zf, zend_zval_value_name(ret), ""); return 0; } return 1; @@ -2181,7 +2181,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_method(cons static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_invalid_method_call(zval *object, zval *function_name) { zend_throw_error(NULL, "Call to a member function %s() on %s", - Z_STRVAL_P(function_name), zend_zval_type_name(object)); + Z_STRVAL_P(function_name), zend_zval_value_name(object)); } static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_non_static_method_call(const zend_function *fbc) @@ -2786,8 +2786,8 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z ZVAL_UNDEFINED_OP2(); } if (!is_list && type != BP_VAR_IS) { - zend_error(E_WARNING, "Trying to access array offset on value of type %s", - zend_zval_type_name(container)); + zend_error(E_WARNING, "Trying to access array offset on %s", + zend_zval_value_name(container)); } ZVAL_NULL(result); } @@ -2986,7 +2986,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error( } if (!EG(exception)) { zend_type_error("array_key_exists(): Argument #2 ($array) must be of type array, %s given", - zend_zval_type_name(subject)); + zend_zval_value_name(subject)); } } @@ -3406,7 +3406,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv) { zend_string *type_str = zend_type_to_string(prop->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s", - zend_zval_type_name(zv), + zend_zval_value_name(zv), ZSTR_VAL(prop->ce->name), zend_get_unmangled_property_name(prop->name), ZSTR_VAL(type_str) @@ -3418,7 +3418,7 @@ ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_propert zend_string *type1_str = zend_type_to_string(prop1->type); zend_string *type2_str = zend_type_to_string(prop2->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s and property %s::$%s of type %s, as this would result in an inconsistent type conversion", - zend_zval_type_name(zv), + zend_zval_value_name(zv), ZSTR_VAL(prop1->ce->name), zend_get_unmangled_property_name(prop1->name), ZSTR_VAL(type1_str), diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index cc529444b33cc..9f6ae2073f7a8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1560,7 +1560,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) if (result != op1) { ZVAL_UNDEF(result); } - zend_type_error("Cannot perform bitwise not on %s", zend_zval_type_name(op1)); + zend_type_error("Cannot perform bitwise not on %s", zend_zval_value_name(op1)); return FAILURE; } } @@ -2541,7 +2541,7 @@ ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ ZEND_FALLTHROUGH; case IS_RESOURCE: case IS_ARRAY: - zend_type_error("Cannot increment %s", zend_zval_type_name(op1)); + zend_type_error("Cannot increment %s", zend_zval_value_name(op1)); return FAILURE; EMPTY_SWITCH_DEFAULT_CASE() } @@ -2603,7 +2603,7 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ ZEND_FALLTHROUGH; case IS_RESOURCE: case IS_ARRAY: - zend_type_error("Cannot decrement %s", zend_zval_type_name(op1)); + zend_type_error("Cannot decrement %s", zend_zval_value_name(op1)); return FAILURE; EMPTY_SWITCH_DEFAULT_CASE() } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 003fc95bf7736..a94f8cc762a80 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5264,7 +5264,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM) ZEND_VM_C_GOTO(send_array); } } - zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_value_name(args)); FREE_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -5290,7 +5290,7 @@ ZEND_VM_C_LABEL(send_array): || !zend_parse_arg_long_weak(op2, &len, /* arg_num */ 3)) { zend_type_error( "array_slice(): Argument #3 ($length) must be of type ?int, %s given", - zend_zval_type_name(op2)); + zend_zval_value_name(op2)); FREE_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -6679,7 +6679,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; FREE_OP1(); @@ -6769,7 +6769,7 @@ ZEND_VM_COLD_CONST_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; FREE_OP1(); @@ -7143,7 +7143,7 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY, JMP_ADDR) value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array)); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); @@ -8534,7 +8534,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY) zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -8629,7 +8629,7 @@ ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, CV|TMPVAR|UNUSED|CLASS_FETCH, ANY) if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP1(); HANDLE_EXCEPTION(); @@ -9212,7 +9212,7 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED) ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -9250,7 +9250,7 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index b0f7d2f66bdef..9813c62fdaa52 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2421,7 +2421,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O goto send_array; } } - zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_value_name(args)); FREE_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -2447,7 +2447,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O || !zend_parse_arg_long_weak(op2, &len, /* arg_num */ 3)) { zend_type_error( "array_slice(): Argument #3 ($length) must be of type ?int, %s given", - zend_zval_type_name(op2)); + zend_zval_value_name(op2)); FREE_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -5162,7 +5162,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER( } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -5251,7 +5251,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_ } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -5620,7 +5620,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -10728,7 +10728,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_ ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -10766,7 +10766,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -14793,7 +14793,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -14850,7 +14850,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_TMPVAR_H if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); HANDLE_EXCEPTION(); @@ -17968,7 +17968,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -18006,7 +18006,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -19276,7 +19276,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -19365,7 +19365,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -21932,7 +21932,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -22022,7 +22022,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -22278,7 +22278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array)); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); @@ -31954,7 +31954,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_UNUSED_H if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -36225,7 +36225,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -39078,7 +39078,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -39167,7 +39167,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -39501,7 +39501,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -39558,7 +39558,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_CV_HANDL if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -48791,7 +48791,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -48829,7 +48829,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 8e55bf92bed76..7f546f95cd0eb 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -404,7 +404,7 @@ PHP_FUNCTION(bzopen) stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); } else { - zend_argument_type_error(1, "must be of type string or file-resource, %s given", zend_zval_type_name(file)); + zend_argument_type_error(1, "must be of type string or file-resource, %s given", zend_zval_value_name(file)); RETURN_THROWS(); } diff --git a/ext/bz2/tests/002.phpt b/ext/bz2/tests/002.phpt index 00254776f7951..f87048f92314e 100644 --- a/ext/bz2/tests/002.phpt +++ b/ext/bz2/tests/002.phpt @@ -91,10 +91,10 @@ resource(%d) of type (stream) resource(%d) of type (stream) Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d -bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given +bzopen(): Argument #1 ($file) must be of type string or file-resource, false given Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d -bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given +bzopen(): Argument #1 ($file) must be of type string or file-resource, false given Warning: bzopen(): cannot write to a stream opened in read only mode in %s on line %d bool(false) diff --git a/ext/dom/node.c b/ext/dom/node.c index d55ac99efeff2..bc7108e087e75 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1591,7 +1591,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ } if (Z_TYPE_P(tmp) != IS_STRING) { /* if mode == 0 then $xpath arg is 3, if mode == 1 then $xpath is 4 */ - zend_argument_type_error(3 + mode, "\"query\" option must be a string, %s given", zend_zval_type_name(tmp)); + zend_argument_type_error(3 + mode, "\"query\" option must be a string, %s given", zend_zval_value_name(tmp)); RETURN_THROWS(); } xquery = Z_STRVAL_P(tmp); diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 3d7e5e44a4b2c..86c930af0e2a5 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -192,7 +192,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod } else { xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_value_name(&nodes[i])); return NULL; } } else if (Z_TYPE(nodes[i]) == IS_STRING) { @@ -208,7 +208,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod } else { xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_value_name(&nodes[i])); return NULL; } diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 749c64dc9c692..81fc5692e4e84 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -1687,7 +1687,7 @@ static ZEND_COLD void zend_ffi_pass_incompatible(zval *arg, zend_ffi_type *type, zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, buf2.start); } } else { - zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found PHP '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, zend_zval_type_name(arg)); + zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found PHP '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, zend_zval_value_name(arg)); } } } @@ -1714,7 +1714,7 @@ static ZEND_COLD void zend_ffi_assign_incompatible(zval *arg, zend_ffi_type *typ zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from type '%s'", buf1.start, buf2.start); } } else { - zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from PHP '%s'", buf1.start, zend_zval_type_name(arg)); + zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from PHP '%s'", buf1.start, zend_zval_value_name(arg)); } } } diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index f0be4c934b16b..a6f3e64db6b45 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -314,7 +314,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime break; default: - zend_argument_type_error(1, "must be of type resource|string, %s given", zend_zval_type_name(what)); + zend_argument_type_error(1, "must be of type resource|string, %s given", zend_zval_value_name(what)); RETURN_THROWS(); } diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 75d106bc48a69..fdd0f063f8ce7 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1247,7 +1247,7 @@ PHP_FUNCTION(ftp_set_option) switch (option) { case PHP_FTP_OPT_TIMEOUT_SEC: if (Z_TYPE_P(z_value) != IS_LONG) { - zend_argument_type_error(3, "must be of type int for the FTP_TIMEOUT_SEC option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type int for the FTP_TIMEOUT_SEC option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } if (Z_LVAL_P(z_value) <= 0) { @@ -1259,7 +1259,7 @@ PHP_FUNCTION(ftp_set_option) break; case PHP_FTP_OPT_AUTOSEEK: if (Z_TYPE_P(z_value) != IS_TRUE && Z_TYPE_P(z_value) != IS_FALSE) { - zend_argument_type_error(3, "must be of type bool for the FTP_AUTOSEEK option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type bool for the FTP_AUTOSEEK option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } ftp->autoseek = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; @@ -1267,7 +1267,7 @@ PHP_FUNCTION(ftp_set_option) break; case PHP_FTP_OPT_USEPASVADDRESS: if (Z_TYPE_P(z_value) != IS_TRUE && Z_TYPE_P(z_value) != IS_FALSE) { - zend_argument_type_error(3, "must be of type bool for the FTP_USEPASVADDRESS option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type bool for the FTP_USEPASVADDRESS option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } ftp->usepasvaddress = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 47090c04c34af..ceb17d1597a29 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4040,7 +4040,7 @@ static gdIOCtx *create_stream_context_from_zval(zval *to_zval) { return NULL; } } else { - zend_argument_type_error(2, "must be a file name or a stream resource, %s given", zend_zval_type_name(to_zval)); + zend_argument_type_error(2, "must be a file name or a stream resource, %s given", zend_zval_value_name(to_zval)); return NULL; } diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 910fca52dff97..442269f6d8a35 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -624,10 +624,10 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui if (!zend_parse_arg_long_slow(val, &lval, arg_pos)) { if (arg_pos == 0) { zend_type_error( - "Number must be of type GMP|string|int, %s given", zend_zval_type_name(val)); + "Number must be of type GMP|string|int, %s given", zend_zval_value_name(val)); } else { zend_argument_type_error(arg_pos, - "must be of type GMP|string|int, %s given", zend_zval_type_name(val)); + "must be of type GMP|string|int, %s given", zend_zval_value_name(val)); } return FAILURE; } diff --git a/ext/gmp/tests/gmp_strict_types.phpt b/ext/gmp/tests/gmp_strict_types.phpt index a63f2ef5059db..006f06465c536 100644 --- a/ext/gmp/tests/gmp_strict_types.phpt +++ b/ext/gmp/tests/gmp_strict_types.phpt @@ -51,7 +51,7 @@ object(GMP)#2 (1) { string(1) "1" } gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, float given -gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given -gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, false given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, true given gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, null given gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, array given diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 27578d27c6965..2db70351461b4 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -1119,12 +1119,12 @@ PHP_FUNCTION(hash_equals) /* We only allow comparing string to prevent unexpected results. */ if (Z_TYPE_P(known_zval) != IS_STRING) { - zend_argument_type_error(1, "must be of type string, %s given", zend_zval_type_name(known_zval)); + zend_argument_type_error(1, "must be of type string, %s given", zend_zval_value_name(known_zval)); RETURN_THROWS(); } if (Z_TYPE_P(user_zval) != IS_STRING) { - zend_argument_type_error(2, "must be of type string, %s given", zend_zval_type_name(user_zval)); + zend_argument_type_error(2, "must be of type string, %s given", zend_zval_value_name(user_zval)); RETURN_THROWS(); } diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 38ebd7b61d93d..bdb535fd9369a 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3007,7 +3007,7 @@ PHP_FUNCTION(imap_mail_compose) if (Z_TYPE_P(data) != IS_ARRAY) { zend_argument_type_error(2, "individual body must be of type array, %s given", - zend_zval_type_name(data)); + zend_zval_value_name(data)); goto done; } if (zend_hash_num_elements(Z_ARRVAL_P(data)) == 0) { diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c5b0a9b9c4b9b..715bde8bd13e3 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1602,7 +1602,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) result->result = ldap_res; } } else { - zend_argument_type_error(1, "must be of type LDAP|array, %s given", zend_zval_type_name(link)); + zend_argument_type_error(1, "must be of type LDAP|array, %s given", zend_zval_value_name(link)); } cleanup: @@ -2568,7 +2568,7 @@ PHP_FUNCTION(ldap_modify_batch) /* does the value type match the key? */ if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_ATTRIB)) { if (Z_TYPE_P(modinfo) != IS_STRING) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_ATTRIB "\" must be of type string, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_ATTRIB "\" must be of type string, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -2579,7 +2579,7 @@ PHP_FUNCTION(ldap_modify_batch) } else if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_MODTYPE)) { if (Z_TYPE_P(modinfo) != IS_LONG) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be of type int, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be of type int, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -2611,7 +2611,7 @@ PHP_FUNCTION(ldap_modify_batch) } else if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_VALUES)) { if (Z_TYPE_P(modinfo) != IS_ARRAY) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_VALUES "\" must be of type array, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_VALUES "\" must be of type array, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -3200,7 +3200,7 @@ PHP_FUNCTION(ldap_set_option) int rc; if (Z_TYPE_P(newval) != IS_ARRAY) { - zend_argument_type_error(3, "must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, %s given", zend_zval_type_name(newval)); + zend_argument_type_error(3, "must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, %s given", zend_zval_value_name(newval)); RETURN_THROWS(); } diff --git a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt index 2025941e0e77b..9526528a1851a 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt @@ -139,13 +139,13 @@ int(12345) --lowercase null-- int(12345) --lowercase true-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, true given --lowercase false-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, false given --uppercase TRUE-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, true given --uppercase FALSE-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, false given --empty string DQ-- ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index bb8a130c41f65..9cb982357c31f 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -650,7 +650,7 @@ static int mysqlnd_zval_array_to_mysqlnd_array(zval *in_array, MYSQLND ***out_ar i++; if (Z_TYPE_P(elem) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(elem), mysqli_link_class_entry)) { - zend_argument_type_error(i, "must be an instance of mysqli, %s given", zend_zval_type_name(elem)); + zend_argument_type_error(i, "must be an instance of mysqli, %s given", zend_zval_value_name(elem)); return FAILURE; } else { MY_MYSQL *mysql; diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index 89d6e67a21e19..0200222449e85 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -27,7 +27,7 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to a member function fetch_row() on bool in %sbug33491.php:%d +Fatal error: Uncaught Error: Call to a member function fetch_row() on false in %sbug33491.php:%d Stack trace: #0 %s(%d): DB->query_single('SELECT DATE()') #1 {main} diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index b2539f5c3f429..c594ade575bed 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -34,7 +34,7 @@ static ZEND_COLD void zend_jit_illegal_offset(void) static ZEND_COLD void zend_jit_illegal_string_offset(zval *offset) { - zend_type_error("Cannot access offset of type %s on string", zend_zval_type_name(offset)); + zend_type_error("Cannot access offset of type %s on string", zend_zval_value_name(offset)); } static zend_never_inline zend_function* ZEND_FASTCALL _zend_jit_init_func_run_time_cache(zend_op_array *op_array) /* {{{ */ @@ -112,7 +112,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_jit_invalid_method_call(zval *object) object = &EG(uninitialized_zval); } zend_throw_error(NULL, "Call to a member function %s() on %s", - Z_STRVAL_P(function_name), zend_zval_type_name(object)); + Z_STRVAL_P(function_name), zend_zval_value_name(object)); } static ZEND_COLD void ZEND_FASTCALL zend_jit_invalid_method_call_tmp(zval *object) @@ -2343,19 +2343,19 @@ static void ZEND_FASTCALL zend_jit_only_vars_by_reference(zval *arg) static void ZEND_FASTCALL zend_jit_invalid_array_access(zval *container) { - zend_error(E_WARNING, "Trying to access array offset on value of type %s", zend_zval_type_name(container)); + zend_error(E_WARNING, "Trying to access array offset on %s", zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_read(zval *container, const char *property_name) { - zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", property_name, zend_zval_type_name(container)); + zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_write(zval *container, const char *property_name) { zend_throw_error(NULL, "Attempt to modify property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_incdec(zval *container, const char *property_name) @@ -2373,7 +2373,7 @@ static void ZEND_FASTCALL zend_jit_invalid_property_incdec(zval *container, cons } zend_throw_error(NULL, "Attempt to increment/decrement property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); if (opline->op1_type == IS_VAR) { zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); } @@ -2383,7 +2383,7 @@ static void ZEND_FASTCALL zend_jit_invalid_property_assign(zval *container, cons { zend_throw_error(NULL, "Attempt to assign property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_assign_op(zval *container, const char *property_name) diff --git a/ext/opcache/tests/jit/bw_not_002.phpt b/ext/opcache/tests/jit/bw_not_002.phpt index 034c6bc90cbdf..e58b06b69f947 100644 --- a/ext/opcache/tests/jit/bw_not_002.phpt +++ b/ext/opcache/tests/jit/bw_not_002.phpt @@ -17,7 +17,7 @@ function test() { test(); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Cannot perform bitwise not on bool in %sbw_not_002.php:5 +Fatal error: Uncaught TypeError: Cannot perform bitwise not on true in %sbw_not_002.php:5 Stack trace: #0 %sbw_not_002.php(8): test() #1 {main} diff --git a/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt b/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt index 3699eba2045f0..b0b2ee2a1ab99 100644 --- a/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt +++ b/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt @@ -14,5 +14,5 @@ new class(true[""]) { ?> DONE --EXPECTF-- -Warning: Trying to access array offset on value of type bool in %sfetch_dim_func_arg_002.php on line 2 +Warning: Trying to access array offset on true in %sfetch_dim_func_arg_002.php on line 2 DONE diff --git a/ext/opcache/tests/jit/fetch_dim_r_008.phpt b/ext/opcache/tests/jit/fetch_dim_r_008.phpt index c40d54eefb5f8..42731025fd98e 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_008.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_008.phpt @@ -12,5 +12,5 @@ test()[1]; ?> DONE --EXPECTF-- -Warning: Trying to access array offset on value of type null in %sfetch_dim_r_008.php on line 3 +Warning: Trying to access array offset on null in %sfetch_dim_r_008.php on line 3 DONE diff --git a/ext/opcache/tests/opt/assign_op_001.phpt b/ext/opcache/tests/opt/assign_op_001.phpt index 7ac23d71c0d17..943787b0ad095 100644 --- a/ext/opcache/tests/opt/assign_op_001.phpt +++ b/ext/opcache/tests/opt/assign_op_001.phpt @@ -27,4 +27,4 @@ Fatal error: Uncaught TypeError: Unsupported operand types: array + bool in %sas Stack trace: #0 %sassign_op_001.php(10): test() #1 {main} - thrown in %sassign_op_001.php on line 4 \ No newline at end of file + thrown in %sassign_op_001.php on line 4 diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt index 3db214aa4fbd4..f32292677bac5 100644 --- a/ext/openssl/tests/openssl_pkey_new_error.phpt +++ b/ext/openssl/tests/openssl_pkey_new_error.phpt @@ -28,6 +28,6 @@ try { } ?> --EXPECT-- -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 9e2ac8e0e6994..69a6e7ba99ab8 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -654,7 +654,7 @@ PHP_FUNCTION(pcntl_signal) zend_string *func_name = zend_get_callable_name(handle); PCNTL_G(last_error) = EINVAL; - zend_argument_type_error(2, "must be of type callable|int, %s given", zend_zval_type_name(handle)); + zend_argument_type_error(2, "must be of type callable|int, %s given", zend_zval_value_name(handle)); zend_string_release_ex(func_name, 0); efree(error); RETURN_THROWS(); diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 6a8bea5068b32..290587b5db100 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -521,7 +521,7 @@ PHP_METHOD(PDO, prepare) if (options && (value = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_STATEMENT_CLASS)) != NULL) { if (Z_TYPE_P(value) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); RETURN_THROWS(); } if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { @@ -545,7 +545,7 @@ PHP_METHOD(PDO, prepare) if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS constructor_args must be of type ?array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); RETURN_THROWS(); } ZVAL_COPY_VALUE(&ctor_args, item); @@ -698,7 +698,7 @@ PDO_API bool pdo_get_long_param(zend_long *lval, zval *value) } ZEND_FALLTHROUGH; default: - zend_type_error("Attribute value must be of type int for selected attribute, %s given", zend_zval_type_name(value)); + zend_type_error("Attribute value must be of type int for selected attribute, %s given", zend_zval_value_name(value)); return false; } } @@ -716,7 +716,7 @@ PDO_API bool pdo_get_bool_param(bool *bval, zval *value) return true; case IS_STRING: /* TODO Should string be allowed? */ default: - zend_type_error("Attribute value must be of type bool for selected attribute, %s given", zend_zval_type_name(value)); + zend_type_error("Attribute value must be of type bool for selected attribute, %s given", zend_zval_value_name(value)); return false; } } @@ -812,7 +812,7 @@ static bool pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) / } if (Z_TYPE_P(value) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); return false; } if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { @@ -840,7 +840,7 @@ static bool pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) / if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS constructor_args must be of type ?array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); return false; } ZVAL_COPY(&dbh->def_stmt_ctor_args, item); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 65f0900075af0..2d0010eb747a8 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1280,7 +1280,7 @@ PHP_METHOD(PDOStatement, fetchAll) /* Figure out correct class */ if (arg2) { if (Z_TYPE_P(arg2) != IS_STRING) { - zend_argument_type_error(2, "must be of type string, %s given", zend_zval_type_name(arg2)); + zend_argument_type_error(2, "must be of type string, %s given", zend_zval_value_name(arg2)); RETURN_THROWS(); } stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); @@ -1333,7 +1333,7 @@ PHP_METHOD(PDOStatement, fetchAll) if (arg2) { // Reuse convert_to_long(arg2); ? if (Z_TYPE_P(arg2) != IS_LONG) { - zend_argument_type_error(2, "must be of type int, %s given", zend_zval_type_name(arg2)); + zend_argument_type_error(2, "must be of type int, %s given", zend_zval_value_name(arg2)); RETURN_THROWS(); } if (Z_LVAL_P(arg2) < 0) { @@ -1752,7 +1752,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_LONG) { - zend_argument_type_error(arg1_arg_num, "must be of type int, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type int, %s given", zend_zval_value_name(&args[0])); return false; } if (Z_LVAL(args[0]) < 0) { @@ -1794,7 +1794,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_STRING) { - zend_argument_type_error(arg1_arg_num, "must be of type string, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type string, %s given", zend_zval_value_name(&args[0])); return false; } cep = zend_lookup_class(Z_STR(args[0])); @@ -1807,7 +1807,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a if (variadic_num_args == 2) { if (Z_TYPE(args[1]) != IS_NULL && Z_TYPE(args[1]) != IS_ARRAY) { zend_argument_type_error(constructor_arg_num, "must be of type ?array, %s given", - zend_zval_type_name(&args[1])); + zend_zval_value_name(&args[1])); return false; } if (Z_TYPE(args[1]) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL(args[1]))) { @@ -1834,7 +1834,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_OBJECT) { - zend_argument_type_error(arg1_arg_num, "must be of type object, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type object, %s given", zend_zval_value_name(&args[0])); return false; } diff --git a/ext/pdo_mysql/tests/bug44327.phpt b/ext/pdo_mysql/tests/bug44327.phpt index 1b99d47937949..40be22e592ffa 100644 --- a/ext/pdo_mysql/tests/bug44327.phpt +++ b/ext/pdo_mysql/tests/bug44327.phpt @@ -62,5 +62,5 @@ object(PDORow)#5 (2) { string(19) "SELECT id FROM test" ---------------------------------- -Warning: Attempt to read property "queryString" on bool in %s on line %d +Warning: Attempt to read property "queryString" on false in %s on line %d NULL diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 7318caa185893..8dfafbb37f977 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -95,7 +95,7 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index f5ec8a9307d35..d1e4cc8d30134 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -37,7 +37,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 6d00353a7d8b6..c3c4c68a70dd7 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -57,7 +57,7 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 010ef31f463b4..b2cbe43561b04 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -100,7 +100,7 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Uncaught Error: Call to a member function errorInfo() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function errorInfo() on false in %s:%d Stack trace: #0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO)) #1 {main} diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 00bdf15286e00..1aebb3d4884f1 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2228,7 +2228,7 @@ PHP_FUNCTION(pg_lo_create) wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); RETURN_THROWS(); } if ((pgsql_oid = lo_create(pgsql, wanted_oid)) == InvalidOid) { @@ -2599,7 +2599,7 @@ PHP_FUNCTION(pg_lo_import) wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); RETURN_THROWS(); } @@ -4489,7 +4489,7 @@ PHP_PGSQL_API zend_result php_pgsql_convert(PGconn *pg_link, const zend_string * err = 1; } if (!err && (Z_TYPE_P(val) == IS_ARRAY || Z_TYPE_P(val) == IS_OBJECT || Z_TYPE_P(val) == IS_RESOURCE)) { - zend_type_error("Values must be of type string|int|float|bool|null, %s given", zend_zval_type_name(val)); + zend_type_error("Values must be of type string|int|float|bool|null, %s given", zend_zval_value_name(val)); err = 1; } if (err) { @@ -5253,7 +5253,7 @@ PHP_PGSQL_API zend_result php_pgsql_insert(PGconn *pg_link, const zend_string *t smart_str_appendl(&querystr, "NULL", sizeof("NULL")-1); break; default: - zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_value_name(val)); goto cleanup; } smart_str_appendc(&querystr, ','); @@ -5427,7 +5427,7 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, smart_str_appendl(querystr, "NULL", sizeof("NULL")-1); break; default: - zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_value_name(val)); return -1; } smart_str_appendl(querystr, pad, pad_len); diff --git a/ext/pgsql/tests/28large_object_import_oid.phpt b/ext/pgsql/tests/28large_object_import_oid.phpt index 3af7529333989..13a0918d84879 100644 --- a/ext/pgsql/tests/28large_object_import_oid.phpt +++ b/ext/pgsql/tests/28large_object_import_oid.phpt @@ -104,7 +104,7 @@ Invalid OID value passed Invalid OID value passed Deprecated: pg_lo_import(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d -OID value must be of type string|int, bool given +OID value must be of type string|int, true given OID value must be of type string|int, array given OID value must be of type string|int, stdClass given OID value must be of type string|int, PgSql\Connection given diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 295a60a32cd12..9eaef153b0885 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -460,7 +460,7 @@ PHP_FUNCTION(posix_ttyname) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); } /* fd must fit in an int and be positive */ @@ -510,7 +510,7 @@ PHP_FUNCTION(posix_isatty) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); } } @@ -1243,7 +1243,7 @@ PHP_FUNCTION(posix_fpathconf) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { zend_argument_type_error(1, "must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); RETURN_THROWS(); } } diff --git a/ext/pspell/tests/003.phpt b/ext/pspell/tests/003.phpt index 02d66f6309f16..2629a64ea056c 100644 --- a/ext/pspell/tests/003.phpt +++ b/ext/pspell/tests/003.phpt @@ -35,7 +35,7 @@ var_dump(pspell_config_ignore($cfg, PHP_INT_MAX)); bool(false) Warning: pspell_new_config(): PSPELL couldn't open the dictionary. reason: The encoding "b0rked" is not known. This could also mean that the file "%sb0rked.%s" could not be opened for reading or does not exist. in %s003.php on line 9 -pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, bool given +pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, false given --- bool(true) bool(true) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 186a240b4a01e..85c2aa7e07cad 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2493,7 +2493,7 @@ ZEND_METHOD(ReflectionParameter, __construct) break; default: - zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_type_name(reference)); + zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_value_name(reference)); RETURN_THROWS(); } diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 869682ccdd451..791bfe3f43587 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- -string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, bool given" +string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, true given" diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt index 92bd0543388b0..67b37411b4216 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt @@ -103,7 +103,7 @@ NULL Static method: ReflectionMethod::invoke() expects at least 1 argument, 0 given -ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, bool given +ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, true given Called staticMethod() Exception: Using $this when not in object context NULL diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt index 620f993325e06..e9575c4d0cdc3 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt @@ -55,7 +55,7 @@ try { ?> --EXPECT-- invoke() on a non-object: -string(85) "ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, bool given" +string(85) "ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, true given" invoke() on a non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index fe50f2a8e8f70..168c5c7f1d44a 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -62,19 +62,19 @@ static zend_result verify_bool_return_type_userland_calls(const zval* value) if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == -1)) { /* TODO Why are exception cheked? */ if (!EG(exception)) { - php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); + php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); } return FAILURE; } if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == 0)) { /* TODO Why are exception cheked? */ if (!EG(exception)) { - php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); + php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); } return SUCCESS; } if (!EG(exception)) { - zend_type_error("Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); \ + zend_type_error("Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); \ } return FAILURE; } diff --git a/ext/session/session.c b/ext/session/session.c index 4bfc973ed537b..facd67379fed7 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2553,7 +2553,7 @@ PHP_FUNCTION(session_start) break; default: zend_type_error("%s(): Option \"%s\" must be of type string|int|bool, %s given", - get_active_function_name(), ZSTR_VAL(str_idx), zend_zval_type_name(value) + get_active_function_name(), ZSTR_VAL(str_idx), zend_zval_value_name(value) ); RETURN_THROWS(); } diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 20537989d0711..d3f2865e12036 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -496,7 +496,7 @@ static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, if (member == &tmp_zv) { zval_ptr_dtor_str(&tmp_zv); } - zend_type_error("It's not possible to assign a complex type to %s, %s given", attribs ? "attributes" : "properties", zend_zval_type_name(value)); + zend_type_error("It's not possible to assign a complex type to %s, %s given", attribs ? "attributes" : "properties", zend_zval_value_name(value)); return &EG(error_zval); } } @@ -2605,7 +2605,7 @@ PHP_FUNCTION(simplexml_import_dom) nodep = php_libxml_import_node(node); if (!nodep) { - zend_argument_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_type_name(node)); + zend_argument_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_value_name(node)); RETURN_THROWS(); } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index e2e69f64ca620..44a3a3519f430 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -667,7 +667,7 @@ static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht) /* {{{ */ zend_string *name; if (Z_TYPE_P(tmp) != IS_ARRAY) { - zend_type_error("SoapHeader::__construct(): \"typemap\" option must be of type array, %s given", zend_zval_type_name(tmp)); + zend_type_error("SoapHeader::__construct(): \"typemap\" option must be of type array, %s given", zend_zval_value_name(tmp)); return NULL; } ht2 = Z_ARRVAL_P(tmp); @@ -1089,7 +1089,7 @@ PHP_METHOD(SoapServer, addFunction) RETURN_THROWS(); } } else { - zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_type_name(function_name)); + zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_value_name(function_name)); RETURN_THROWS(); } @@ -2414,7 +2414,7 @@ void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, bool is_soap_call) Z_ADDREF_P(headers); free_soap_headers = 1; } else { - zend_argument_type_error(4, "must be of type SoapHeader|array|null, %s given", zend_zval_type_name(headers)); + zend_argument_type_error(4, "must be of type SoapHeader|array|null, %s given", zend_zval_value_name(headers)); RETURN_THROWS(); } @@ -2678,7 +2678,7 @@ PHP_METHOD(SoapClient, __setSoapHeaders) zval_ptr_dtor(Z_CLIENT_DEFAULT_HEADERS_P(this_ptr)); ZVAL_COPY_VALUE(Z_CLIENT_DEFAULT_HEADERS_P(this_ptr), &default_headers); } else { - zend_argument_type_error(1, "must be of type SoapHeader|array|null, %s given", zend_zval_type_name(headers)); + zend_argument_type_error(1, "must be of type SoapHeader|array|null, %s given", zend_zval_value_name(headers)); RETURN_THROWS(); } RETURN_TRUE; diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index ed6f729dcc909..573b3976701f6 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -505,7 +505,7 @@ static int php_sock_array_to_fd_set(uint32_t arg_num, zval *sock_array, fd_set * ZVAL_DEREF(element); if (Z_TYPE_P(element) != IS_OBJECT || Z_OBJCE_P(element) != socket_ce) { - zend_argument_type_error(arg_num, "must only have elements of type Socket, %s given", zend_zval_type_name(element)); + zend_argument_type_error(arg_num, "must only have elements of type Socket, %s given", zend_zval_value_name(element)); return -1; } diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 4357c9d16b52f..e25b9315c7c7f 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -79,7 +79,7 @@ PHP_FUNCTION(class_parents) } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } @@ -111,7 +111,7 @@ PHP_FUNCTION(class_implements) RETURN_THROWS(); } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } @@ -139,7 +139,7 @@ PHP_FUNCTION(class_uses) RETURN_THROWS(); } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 5c32e2f9ee359..d1dc2e2027495 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1964,7 +1964,7 @@ static zend_result spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesys if (Z_TYPE(retval) != IS_STRING) { zend_type_error("%s::getCurrentLine(): Return value must be of type string, %s returned", - ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), zend_zval_type_name(&retval)); + ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), zend_zval_value_name(&retval)); zval_ptr_dtor(&retval); return FAILURE; } diff --git a/ext/spl/tests/array_026.phpt b/ext/spl/tests/array_026.phpt index 268b39d5e8edd..4ebd0ed925740 100644 --- a/ext/spl/tests/array_026.phpt +++ b/ext/spl/tests/array_026.phpt @@ -10,7 +10,7 @@ var_dump($test, $test3['mmmmm']); --EXPECTF-- Warning: Undefined variable $test3 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(1) { diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt index 073530926a6f1..758649e231692 100644 --- a/ext/spl/tests/bug62978.phpt +++ b/ext/spl/tests/bug62978.phpt @@ -34,7 +34,7 @@ NULL Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined array key "epic_magic" in %s on line %d diff --git a/ext/spl/tests/bug73029.phpt b/ext/spl/tests/bug73029.phpt index 61a3f36b6d841..771e81d5c4d45 100644 --- a/ext/spl/tests/bug73029.phpt +++ b/ext/spl/tests/bug73029.phpt @@ -23,5 +23,5 @@ Error at offset 10 of 19 bytes Warning: unserialize(): Error at offset 22 of 43 bytes in %s on line %d -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on false in %s on line %d DONE diff --git a/ext/spl/tests/class_implements_variation1.phpt b/ext/spl/tests/class_implements_variation1.phpt index 2843745171bbf..1f7892f128340 100644 --- a/ext/spl/tests/class_implements_variation1.phpt +++ b/ext/spl/tests/class_implements_variation1.phpt @@ -158,16 +158,16 @@ class_implements(): Argument #1 ($object_or_class) must be of type object|string class_implements(): Argument #1 ($object_or_class) must be of type object|string, null given --lowercase true-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, true given --lowercase false-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, false given --uppercase TRUE-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, true given --uppercase FALSE-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, false given --empty string DQ-- Error: 2 - class_implements(): Class does not exist and could not be loaded, %s(%d) diff --git a/ext/spl/tests/class_uses_variation1.phpt b/ext/spl/tests/class_uses_variation1.phpt index da26b2630185a..016a9cc0d2f41 100644 --- a/ext/spl/tests/class_uses_variation1.phpt +++ b/ext/spl/tests/class_uses_variation1.phpt @@ -158,16 +158,16 @@ class_uses(): Argument #1 ($object_or_class) must be of type object|string, null class_uses(): Argument #1 ($object_or_class) must be of type object|string, null given --lowercase true-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, true given --lowercase false-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, false given --uppercase TRUE-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, true given --uppercase FALSE-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, false given --empty string DQ-- Error: 2 - class_uses(): Class does not exist and could not be loaded, %s(%d) diff --git a/ext/standard/array.c b/ext/standard/array.c index b6650284cada3..8c144c388bf37 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -670,7 +670,7 @@ PHP_FUNCTION(count) } ZEND_FALLTHROUGH; default: - zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_type_name(array)); + zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_value_name(array)); RETURN_THROWS(); } } @@ -1176,7 +1176,7 @@ PHP_FUNCTION(min) /* mixed min ( array $values ) */ if (argc == 1) { if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } else { zval *result = zend_hash_minmax(Z_ARRVAL(args[0]), php_data_compare, 0); @@ -1222,7 +1222,7 @@ PHP_FUNCTION(max) /* mixed max ( array $values ) */ if (argc == 1) { if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } else { zval *result = zend_hash_minmax(Z_ARRVAL(args[0]), php_data_compare, 1); @@ -2495,7 +2495,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu Z_UNPROTECT_RECURSION_P(entry); } } else { - php_error_docref(NULL, E_WARNING, "Argument #%d must be string or array of strings, %s given", pos, zend_zval_type_name(entry)); + php_error_docref(NULL, E_WARNING, "Argument #%d must be string or array of strings, %s given", pos, zend_zval_value_name(entry)); return; } } @@ -3829,7 +3829,7 @@ static zend_always_inline void php_array_replace_wrapper(INTERNAL_FUNCTION_PARAM zval *arg = args + i; if (Z_TYPE_P(arg) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(arg)); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(arg)); RETURN_THROWS(); } } @@ -3873,7 +3873,7 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET zval *arg = args + i; if (Z_TYPE_P(arg) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(arg)); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(arg)); RETURN_THROWS(); } count += zend_hash_num_elements(Z_ARRVAL_P(arg)); @@ -4672,7 +4672,7 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa for (i = 0; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -4820,7 +4820,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int for (i = 0; i < arr_argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); arr_argc = i; /* only free up to i - 1 */ goto out; } @@ -5057,7 +5057,7 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty for (i = 0; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5205,7 +5205,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_ for (i = 0; i < arr_argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); arr_argc = i; /* only free up to i - 1 */ goto out; } @@ -5387,7 +5387,7 @@ PHP_FUNCTION(array_diff) ZEND_PARSE_PARAMETERS_END(); if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } @@ -5395,7 +5395,7 @@ PHP_FUNCTION(array_diff) if (num == 0) { for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5412,7 +5412,7 @@ PHP_FUNCTION(array_diff) if (!value) { for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5423,7 +5423,7 @@ PHP_FUNCTION(array_diff) for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } if (!found) { @@ -5453,7 +5453,7 @@ PHP_FUNCTION(array_diff) num = 0; for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } num += zend_hash_num_elements(Z_ARRVAL(args[i])); @@ -6135,7 +6135,7 @@ PHP_FUNCTION(array_map) int ret; if (Z_TYPE(arrays[0]) != IS_ARRAY) { - zend_argument_type_error(2, "must be of type array, %s given", zend_zval_type_name(&arrays[0])); + zend_argument_type_error(2, "must be of type array, %s given", zend_zval_value_name(&arrays[0])); RETURN_THROWS(); } maxlen = zend_hash_num_elements(Z_ARRVAL(arrays[0])); @@ -6172,7 +6172,7 @@ PHP_FUNCTION(array_map) for (i = 0; i < n_arrays; i++) { if (Z_TYPE(arrays[i]) != IS_ARRAY) { - zend_argument_type_error(i + 2, "must be of type array, %s given", zend_zval_type_name(&arrays[i])); + zend_argument_type_error(i + 2, "must be of type array, %s given", zend_zval_value_name(&arrays[i])); efree(array_pos); RETURN_THROWS(); } diff --git a/ext/standard/mail.c b/ext/standard/mail.c index ef4c8c60a874e..9b3b3ed75f3cf 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -121,7 +121,7 @@ static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *va php_mail_build_headers_elems(s, key, val); break; default: - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); } } @@ -137,7 +137,7 @@ static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *v break; } if (Z_TYPE_P(tmp_val) != IS_STRING) { - zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), zend_zval_type_name(tmp_val)); + zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), zend_zval_value_name(tmp_val)); break; } php_mail_build_headers_elem(s, key, tmp_val); diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h index 4e2f57749dd90..9536d1f62616d 100644 --- a/ext/standard/php_mail.h +++ b/ext/standard/php_mail.h @@ -33,7 +33,7 @@ do { \ } \ php_mail_build_headers_elems(&s, key, val); \ } else { \ - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \ + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); \ } \ } while(0) @@ -45,7 +45,7 @@ do { \ } else if (Z_TYPE_P(val) == IS_ARRAY) { \ php_mail_build_headers_elems(&s, key, val); \ } else { \ - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \ + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); \ } \ } while(0) diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 53ec6faa1019e..dfffed6cfbe36 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -900,7 +900,7 @@ static zend_result set_proc_descriptor_from_array(zval *descitem, descriptorspec goto finish; } if (Z_TYPE_P(ztarget) != IS_LONG) { - zend_value_error("Redirection target must be of type int, %s given", zend_zval_type_name(ztarget)); + zend_value_error("Redirection target must be of type int, %s given", zend_zval_value_name(ztarget)); goto finish; } diff --git a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt b/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt index ca5ff20197c67..322cd1f0ab0bf 100644 --- a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt +++ b/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt @@ -47,15 +47,15 @@ try { DONE --EXPECT-- -- Testing array_column() column key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #2 ($column_key) must be of type string|int|null, bool given -array_column(): Argument #2 ($column_key) must be of type string|int|null, bool given +array_column(): Argument #2 ($column_key) must be of type string|int|null, false given +array_column(): Argument #2 ($column_key) must be of type string|int|null, true given -- Testing array_column() column key parameter should be a string or integer (testing array) -- array_column(): Argument #2 ($column_key) must be of type string|int|null, array given -- Testing array_column() index key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #3 ($index_key) must be of type string|int|null, bool given -array_column(): Argument #3 ($index_key) must be of type string|int|null, bool given +array_column(): Argument #3 ($index_key) must be of type string|int|null, false given +array_column(): Argument #3 ($index_key) must be of type string|int|null, true given -- Testing array_column() index key parameter should be a string or integer (testing array) -- array_column(): Argument #3 ($index_key) must be of type string|int|null, array given diff --git a/ext/standard/tests/array/array_diff_assoc_variation1.phpt b/ext/standard/tests/array/array_diff_assoc_variation1.phpt index 0909348620f5b..b16baa300f575 100644 --- a/ext/standard/tests/array/array_diff_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_diff_assoc_variation1.phpt @@ -133,16 +133,16 @@ array_diff_assoc(): Argument #1 ($array) must be of type array, null given array_diff_assoc(): Argument #1 ($array) must be of type array, null given -- Iteration 12 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, true given -- Iteration 13 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 14 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, true given -- Iteration 15 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 16 -- array_diff_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_assoc_variation2.phpt b/ext/standard/tests/array/array_diff_assoc_variation2.phpt index 76967f2ce77be..a0b1bac329d9a 100644 --- a/ext/standard/tests/array/array_diff_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_diff_assoc_variation2.phpt @@ -133,16 +133,16 @@ array_diff_assoc(): Argument #2 must be of type array, null given array_diff_assoc(): Argument #2 must be of type array, null given -- Iteration 12 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, true given -- Iteration 13 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, false given -- Iteration 14 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, true given -- Iteration 15 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, false given -- Iteration 16 -- array_diff_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_key_variation1.phpt b/ext/standard/tests/array/array_diff_key_variation1.phpt index 525df63819b33..7b422153a0a0f 100644 --- a/ext/standard/tests/array/array_diff_key_variation1.phpt +++ b/ext/standard/tests/array/array_diff_key_variation1.phpt @@ -147,20 +147,20 @@ array_diff_key(): Argument #1 ($array) must be of type array, null given array_diff_key(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, true given +array_diff_key(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, false given +array_diff_key(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, true given +array_diff_key(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, false given +array_diff_key(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_key(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_key_variation2.phpt b/ext/standard/tests/array/array_diff_key_variation2.phpt index a6e7201cb7a49..b7093606c60ae 100644 --- a/ext/standard/tests/array/array_diff_key_variation2.phpt +++ b/ext/standard/tests/array/array_diff_key_variation2.phpt @@ -148,20 +148,20 @@ array_diff_key(): Argument #2 must be of type array, null given array_diff_key(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, true given +array_diff_key(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, false given +array_diff_key(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, true given +array_diff_key(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, false given +array_diff_key(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_key(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt index 7c02e5d142759..49d6903a90eab 100644 --- a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt @@ -143,16 +143,16 @@ array_diff_uassoc(): Argument #1 ($array) must be of type array, null given array_diff_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt index 36fd109bb6c8b..7466da23d4260 100644 --- a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt @@ -143,16 +143,16 @@ array_diff_uassoc(): Argument #2 must be of type array, null given array_diff_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_ukey_variation1.phpt b/ext/standard/tests/array/array_diff_ukey_variation1.phpt index 9e15307f23331..125406497eda8 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation1.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation1.phpt @@ -155,20 +155,20 @@ array_diff_ukey(): Argument #1 ($array) must be of type array, null given array_diff_ukey(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_ukey(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_ukey_variation2.phpt b/ext/standard/tests/array/array_diff_ukey_variation2.phpt index dd79e53b5e220..cf71a26d22be1 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation2.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation2.phpt @@ -159,20 +159,20 @@ array_diff_ukey(): Argument #2 must be of type array, null given array_diff_ukey(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, true given +array_diff_ukey(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, false given +array_diff_ukey(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, true given +array_diff_ukey(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, false given +array_diff_ukey(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_ukey(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_variation1.phpt b/ext/standard/tests/array/array_diff_variation1.phpt index 075cf66f7bd41..1031b6f947e0c 100644 --- a/ext/standard/tests/array/array_diff_variation1.phpt +++ b/ext/standard/tests/array/array_diff_variation1.phpt @@ -122,13 +122,13 @@ echo "Done"; -- Iteration 11 --array_diff(): Argument #1 ($array) must be of type array, null given --- Iteration 12 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 12 --array_diff(): Argument #1 ($array) must be of type array, true given --- Iteration 13 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 13 --array_diff(): Argument #1 ($array) must be of type array, false given --- Iteration 14 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 14 --array_diff(): Argument #1 ($array) must be of type array, true given --- Iteration 15 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 15 --array_diff(): Argument #1 ($array) must be of type array, false given -- Iteration 16 --array_diff(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_variation2.phpt b/ext/standard/tests/array/array_diff_variation2.phpt index 68e933e29924b..2b03f22513695 100644 --- a/ext/standard/tests/array/array_diff_variation2.phpt +++ b/ext/standard/tests/array/array_diff_variation2.phpt @@ -121,13 +121,13 @@ echo "Done"; -- Iteration 11 --array_diff(): Argument #2 must be of type array, null given --- Iteration 12 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_diff(): Argument #2 must be of type array, true given --- Iteration 13 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_diff(): Argument #2 must be of type array, false given --- Iteration 14 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_diff(): Argument #2 must be of type array, true given --- Iteration 15 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_diff(): Argument #2 must be of type array, false given -- Iteration 16 --array_diff(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt index 72d862958b5cb..9c9cef73dd1fb 100644 --- a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt @@ -146,17 +146,17 @@ array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -- Iteration 11 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given array_intersect_assoc(): Argument #1 ($array) must be of type array, null given --- Iteration 12 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 12 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given +array_intersect_assoc(): Argument #1 ($array) must be of type array, true given --- Iteration 13 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 13 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given +array_intersect_assoc(): Argument #1 ($array) must be of type array, false given --- Iteration 14 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 14 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given +array_intersect_assoc(): Argument #1 ($array) must be of type array, true given --- Iteration 15 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 15 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given +array_intersect_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 16 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given array_intersect_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt index 78ed38f153b46..31b54469863af 100644 --- a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt @@ -147,17 +147,17 @@ array_intersect_assoc(): Argument #2 must be of type array, null given -- Iteration 11 --array_intersect_assoc(): Argument #2 must be of type array, null given array_intersect_assoc(): Argument #2 must be of type array, null given --- Iteration 12 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_intersect_assoc(): Argument #2 must be of type array, true given +array_intersect_assoc(): Argument #2 must be of type array, true given --- Iteration 13 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_intersect_assoc(): Argument #2 must be of type array, false given +array_intersect_assoc(): Argument #2 must be of type array, false given --- Iteration 14 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_intersect_assoc(): Argument #2 must be of type array, true given +array_intersect_assoc(): Argument #2 must be of type array, true given --- Iteration 15 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_intersect_assoc(): Argument #2 must be of type array, false given +array_intersect_assoc(): Argument #2 must be of type array, false given -- Iteration 16 --array_intersect_assoc(): Argument #2 must be of type array, string given array_intersect_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_key_variation1.phpt b/ext/standard/tests/array/array_intersect_key_variation1.phpt index 9256234597d00..ae11e0a2ec931 100644 --- a/ext/standard/tests/array/array_intersect_key_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_key_variation1.phpt @@ -151,20 +151,20 @@ array_intersect_key(): Argument #1 ($array) must be of type array, null given array_intersect_key(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, true given +array_intersect_key(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, false given +array_intersect_key(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, true given +array_intersect_key(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, false given +array_intersect_key(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_key(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_key_variation2.phpt b/ext/standard/tests/array/array_intersect_key_variation2.phpt index 70401e8469269..d2a8672e284c1 100644 --- a/ext/standard/tests/array/array_intersect_key_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_key_variation2.phpt @@ -152,20 +152,20 @@ array_intersect_key(): Argument #2 must be of type array, null given array_intersect_key(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, true given +array_intersect_key(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, false given +array_intersect_key(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, true given +array_intersect_key(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, false given +array_intersect_key(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_key(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt index 268d169c886e3..ea6ce6a1a5a16 100644 --- a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt @@ -159,20 +159,20 @@ array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt index 9377a09518d2f..03a7dc8d07e5c 100644 --- a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt @@ -159,20 +159,20 @@ array_intersect_uassoc(): Argument #2 must be of type array, null given array_intersect_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, true given +array_intersect_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, false given +array_intersect_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, true given +array_intersect_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, false given +array_intersect_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt index 993994fc0792a..8195d45c294ea 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt @@ -157,20 +157,20 @@ array_intersect_ukey(): Argument #1 ($array) must be of type array, null given array_intersect_ukey(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_ukey(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt index bdc0686774cdd..d32c0632ca5e5 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt @@ -157,20 +157,20 @@ array_intersect_ukey(): Argument #2 must be of type array, null given array_intersect_ukey(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, true given +array_intersect_ukey(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, false given +array_intersect_ukey(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, true given +array_intersect_ukey(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, false given +array_intersect_ukey(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_ukey(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_variation1.phpt b/ext/standard/tests/array/array_intersect_variation1.phpt index 81b77bd4aa308..733250b69f70b 100644 --- a/ext/standard/tests/array/array_intersect_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_variation1.phpt @@ -146,17 +146,17 @@ array_intersect(): Argument #1 ($array) must be of type array, null given -- Iterator 11 --array_intersect(): Argument #1 ($array) must be of type array, null given array_intersect(): Argument #1 ($array) must be of type array, null given --- Iterator 12 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 12 --array_intersect(): Argument #1 ($array) must be of type array, true given +array_intersect(): Argument #1 ($array) must be of type array, true given --- Iterator 13 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 13 --array_intersect(): Argument #1 ($array) must be of type array, false given +array_intersect(): Argument #1 ($array) must be of type array, false given --- Iterator 14 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 14 --array_intersect(): Argument #1 ($array) must be of type array, true given +array_intersect(): Argument #1 ($array) must be of type array, true given --- Iterator 15 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 15 --array_intersect(): Argument #1 ($array) must be of type array, false given +array_intersect(): Argument #1 ($array) must be of type array, false given -- Iterator 16 --array_intersect(): Argument #1 ($array) must be of type array, string given array_intersect(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_variation2.phpt b/ext/standard/tests/array/array_intersect_variation2.phpt index d98e1162960ee..b09683446b87a 100644 --- a/ext/standard/tests/array/array_intersect_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_variation2.phpt @@ -147,17 +147,17 @@ array_intersect(): Argument #2 must be of type array, null given -- Iterator 11 --array_intersect(): Argument #2 must be of type array, null given array_intersect(): Argument #2 must be of type array, null given --- Iterator 12 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 12 --array_intersect(): Argument #2 must be of type array, true given +array_intersect(): Argument #2 must be of type array, true given --- Iterator 13 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 13 --array_intersect(): Argument #2 must be of type array, false given +array_intersect(): Argument #2 must be of type array, false given --- Iterator 14 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 14 --array_intersect(): Argument #2 must be of type array, true given +array_intersect(): Argument #2 must be of type array, true given --- Iterator 15 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 15 --array_intersect(): Argument #2 must be of type array, false given +array_intersect(): Argument #2 must be of type array, false given -- Iterator 16 --array_intersect(): Argument #2 must be of type array, string given array_intersect(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_recursive_variation1.phpt b/ext/standard/tests/array/array_merge_recursive_variation1.phpt index 0a72aeeccd17e..121f7969d43c4 100644 --- a/ext/standard/tests/array/array_merge_recursive_variation1.phpt +++ b/ext/standard/tests/array/array_merge_recursive_variation1.phpt @@ -157,20 +157,20 @@ echo "Done"; -- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given -- Iteration 12 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given -- Iteration 13 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given -- Iteration 14 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given -- Iteration 15 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given -- Iteration 16 -- -- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_recursive_variation2.phpt b/ext/standard/tests/array/array_merge_recursive_variation2.phpt index 981e7426c1d53..4588d8d160aaa 100644 --- a/ext/standard/tests/array/array_merge_recursive_variation2.phpt +++ b/ext/standard/tests/array/array_merge_recursive_variation2.phpt @@ -122,13 +122,13 @@ echo "Done"; -- Iteration 11 --array_merge_recursive(): Argument #2 must be of type array, null given --- Iteration 12 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_merge_recursive(): Argument #2 must be of type array, true given --- Iteration 13 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_merge_recursive(): Argument #2 must be of type array, false given --- Iteration 14 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_merge_recursive(): Argument #2 must be of type array, true given --- Iteration 15 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_merge_recursive(): Argument #2 must be of type array, false given -- Iteration 16 --array_merge_recursive(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_variation2.phpt b/ext/standard/tests/array/array_merge_variation2.phpt index 9e7a8cab17895..2ef55565742fc 100644 --- a/ext/standard/tests/array/array_merge_variation2.phpt +++ b/ext/standard/tests/array/array_merge_variation2.phpt @@ -133,16 +133,16 @@ array_merge(): Argument #2 must be of type array, null given array_merge(): Argument #2 must be of type array, null given -- Iteration 12 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, true given -- Iteration 13 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, false given -- Iteration 14 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, true given -- Iteration 15 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, false given -- Iteration 16 -- array_merge(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt index 21239f3ee0476..3cc54bdc4e787 100644 --- a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt @@ -131,16 +131,16 @@ array_udiff_assoc(): Argument #1 ($array) must be of type array, null given array_udiff_assoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt index 02bf34f0ecd4a..9e5c796484ae9 100644 --- a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt @@ -131,16 +131,16 @@ array_udiff_assoc(): Argument #2 must be of type array, null given array_udiff_assoc(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt index 6ededf9b10cee..4bf85a3c20983 100644 --- a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt @@ -132,16 +132,16 @@ array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt index bc6068b5b0f1c..765e159bab543 100644 --- a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt @@ -132,16 +132,16 @@ array_udiff_uassoc(): Argument #2 must be of type array, null given array_udiff_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_variation1.phpt b/ext/standard/tests/array/array_udiff_variation1.phpt index c2cb3074b495c..59cfca5968644 100644 --- a/ext/standard/tests/array/array_udiff_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_variation1.phpt @@ -131,16 +131,16 @@ array_udiff(): Argument #1 ($array) must be of type array, null given array_udiff(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_variation2.phpt b/ext/standard/tests/array/array_udiff_variation2.phpt index 72e814f75b000..6637692e0b25c 100644 --- a/ext/standard/tests/array/array_udiff_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_variation2.phpt @@ -131,16 +131,16 @@ array_udiff(): Argument #2 must be of type array, null given array_udiff(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt index abfa224b20ea4..64e21a30d1ae9 100644 --- a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt @@ -131,16 +131,16 @@ array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt index 080d81ceee41b..4078bec27dcc0 100644 --- a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt @@ -131,16 +131,16 @@ array_uintersect_assoc(): Argument #2 must be of type array, null given array_uintersect_assoc(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt index cc92118bc2a2a..651e78e62855e 100644 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt @@ -132,16 +132,16 @@ array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null give array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt index cfa7300b27414..e01d3b4e95720 100644 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt @@ -132,16 +132,16 @@ array_uintersect_uassoc(): Argument #2 must be of type array, null given array_uintersect_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_variation1.phpt b/ext/standard/tests/array/array_uintersect_variation1.phpt index b5442ed392419..390fc6137401b 100644 --- a/ext/standard/tests/array/array_uintersect_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_variation1.phpt @@ -131,16 +131,16 @@ array_uintersect(): Argument #1 ($array) must be of type array, null given array_uintersect(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_variation2.phpt b/ext/standard/tests/array/array_uintersect_variation2.phpt index 2f6b9d3e99fef..ca3a4bff3a904 100644 --- a/ext/standard/tests/array/array_uintersect_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_variation2.phpt @@ -131,16 +131,16 @@ array_uintersect(): Argument #2 must be of type array, null given array_uintersect(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/bug77931.phpt b/ext/standard/tests/array/bug77931.phpt index 4f73daeb07e82..d876d4b01c6af 100644 --- a/ext/standard/tests/array/bug77931.phpt +++ b/ext/standard/tests/array/bug77931.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- array_map(): Argument #3 must be of type array, int given -array_map(): Argument #4 must be of type array, bool given +array_map(): Argument #4 must be of type array, true given array_map(): Argument #5 must be of type array, null given diff --git a/ext/standard/tests/array/compact.phpt b/ext/standard/tests/array/compact.phpt index d4c6236c03e47..7d139cf2f0365 100644 --- a/ext/standard/tests/array/compact.phpt +++ b/ext/standard/tests/array/compact.phpt @@ -28,10 +28,10 @@ array(2) { string(2) "CA" } -Warning: compact(): Argument #1 must be string or array of strings, bool given in %s on line %d +Warning: compact(): Argument #1 must be string or array of strings, true given in %s on line %d Warning: compact(): Argument #2 must be string or array of strings, int given in %s on line %d array(1) { ["bar"]=> string(3) "baz" -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/count_invalid.phpt b/ext/standard/tests/array/count_invalid.phpt index fd7e3356eaefa..d05c6a1961eeb 100644 --- a/ext/standard/tests/array/count_invalid.phpt +++ b/ext/standard/tests/array/count_invalid.phpt @@ -50,6 +50,6 @@ try { count(): Argument #1 ($value) must be of type Countable|array, null given count(): Argument #1 ($value) must be of type Countable|array, string given count(): Argument #1 ($value) must be of type Countable|array, int given -count(): Argument #1 ($value) must be of type Countable|array, bool given -count(): Argument #1 ($value) must be of type Countable|array, bool given +count(): Argument #1 ($value) must be of type Countable|array, true given +count(): Argument #1 ($value) must be of type Countable|array, false given count(): Argument #1 ($value) must be of type Countable|array, stdClass given diff --git a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt index 3fc707c15ec38..f7b86a2977acf 100644 --- a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt @@ -137,16 +137,16 @@ Arg value get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, null given Arg value 1 -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value 1 -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt index 67c468cace7c4..09f995c21fb6d 100644 --- a/ext/standard/tests/class_object/get_class_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_variation_001.phpt @@ -127,16 +127,16 @@ Arg value: (type: NULL) get_class(): Argument #1 ($object) must be of type object, null given Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, true given Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, false given Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, true given Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, false given Arg value: (type: string) get_class(): Argument #1 ($object) must be of type object, string given diff --git a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt index 529f13ce7119c..8faeff9dd8dcf 100644 --- a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt +++ b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt @@ -140,16 +140,16 @@ Arg value get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, null given Arg value 1 -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value 1 -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, string given diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt index 5e6d34f550eea..d45d2652d11c9 100644 --- a/ext/standard/tests/class_object/method_exists_variation_001.phpt +++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt @@ -140,16 +140,16 @@ Arg value method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Arg value 1 -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, true given Arg value -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, false given Arg value 1 -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, true given Arg value -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, false given Arg value bool(false) diff --git a/ext/standard/tests/general_functions/array_is_list.phpt b/ext/standard/tests/general_functions/array_is_list.phpt index 1cc2886f96ab0..43510097c6f1b 100644 --- a/ext/standard/tests/general_functions/array_is_list.phpt +++ b/ext/standard/tests/general_functions/array_is_list.phpt @@ -80,8 +80,8 @@ int: threw array_is_list(): Argument #1 ($array) must be of type array, int give float: threw array_is_list(): Argument #1 ($array) must be of type array, float given string: threw array_is_list(): Argument #1 ($array) must be of type array, string given object: threw array_is_list(): Argument #1 ($array) must be of type array, stdClass given -true: threw array_is_list(): Argument #1 ($array) must be of type array, bool given -false: threw array_is_list(): Argument #1 ($array) must be of type array, bool given +true: threw array_is_list(): Argument #1 ($array) must be of type array, true given +false: threw array_is_list(): Argument #1 ($array) must be of type array, false given string key: false mixed keys: false ordered keys: true @@ -95,4 +95,4 @@ unset into order: true unset to empty: true append implicit: true append explicit: true -append with gap: false \ No newline at end of file +append with gap: false diff --git a/ext/standard/tests/mail/mail_basic7.phpt b/ext/standard/tests/mail/mail_basic7.phpt index 47614c011eb76..a43617befc981 100644 --- a/ext/standard/tests/mail/mail_basic7.phpt +++ b/ext/standard/tests/mail/mail_basic7.phpt @@ -207,7 +207,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing mail() : basic functionality *** @@ -242,7 +242,7 @@ TypeError: Header "foo1" must only contain numeric keys, "foo2" found TypeError: Header "foo2" must only contain values of type string, array found TypeError: Header "foo3" must only contain values of type string, int found TypeError: Header "foo4" must only contain values of type string, float found -TypeError: Header "foo5" must only contain values of type string, bool found +TypeError: Header "foo5" must only contain values of type string, false found TypeError: Header "foo6" must only contain values of type string, null found TypeError: Header "foo7" must only contain values of type string, stdClass found diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt index 57f570b258703..d3e9807b76055 100644 --- a/ext/standard/tests/strings/join_variation2.phpt +++ b/ext/standard/tests/strings/join_variation2.phpt @@ -120,13 +120,13 @@ join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 9 -- join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 10 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, true given -- Iteration 11 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, false given -- Iteration 12 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, true given -- Iteration 13 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, false given -- Iteration 14 -- join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 15 -- diff --git a/ext/standard/tests/strings/vprintf_variation2.phpt b/ext/standard/tests/strings/vprintf_variation2.phpt index 22f2f152d85a2..f6d92e577402c 100644 --- a/ext/standard/tests/strings/vprintf_variation2.phpt +++ b/ext/standard/tests/strings/vprintf_variation2.phpt @@ -132,16 +132,16 @@ vprintf(): Argument #2 ($values) must be of type array, null given vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 12 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, true given -- Iteration 13 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, false given -- Iteration 14 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, true given -- Iteration 15 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, false given -- Iteration 16 -- vprintf(): Argument #2 ($values) must be of type array, string given diff --git a/ext/standard/var.c b/ext/standard/var.c index 7c6f79aba75ff..e98cb99cf5827 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1348,7 +1348,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co classes = zend_hash_str_find_deref(options, "allowed_classes", sizeof("allowed_classes")-1); if (classes && Z_TYPE_P(classes) != IS_ARRAY && Z_TYPE_P(classes) != IS_TRUE && Z_TYPE_P(classes) != IS_FALSE) { - zend_type_error("%s(): Option \"allowed_classes\" must be of type array|bool, %s given", function_name, zend_zval_type_name(classes)); + zend_type_error("%s(): Option \"allowed_classes\" must be of type array|bool, %s given", function_name, zend_zval_value_name(classes)); goto cleanup; } @@ -1377,7 +1377,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co max_depth = zend_hash_str_find_deref(options, "max_depth", sizeof("max_depth") - 1); if (max_depth) { if (Z_TYPE_P(max_depth) != IS_LONG) { - zend_type_error("%s(): Option \"max_depth\" must be of type int, %s given", function_name, zend_zval_type_name(max_depth)); + zend_type_error("%s(): Option \"max_depth\" must be of type int, %s given", function_name, zend_zval_value_name(max_depth)); goto cleanup; } if (Z_LVAL_P(max_depth) < 0) { diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index debb8b675b0c2..20bdecedb50c3 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -398,7 +398,7 @@ PHP_FUNCTION(msg_send) break; default: - zend_argument_type_error(3, "must be of type string|int|float|bool, %s given", zend_zval_type_name(message)); + zend_argument_type_error(3, "must be of type string|int|float|bool, %s given", zend_zval_value_name(message)); RETURN_THROWS(); } diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 20124dbf9110b..75cc99d7b84c6 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -187,13 +187,13 @@ PHP_METHOD(PhpToken, is) RETURN_TRUE; } } else { - zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_type_name(entry)); + zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_value_name(entry)); RETURN_THROWS(); } } ZEND_HASH_FOREACH_END(); RETURN_FALSE; } else { - zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_type_name(kind)); + zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_value_name(kind)); RETURN_THROWS(); } } diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index d82bcfa54c66b..46727bb59ff29 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -368,7 +368,7 @@ static ZEND_FUNCTION(zend_call_method) return; } } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(class_or_object)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(class_or_object)); return; } diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 10abf4447b083..14523a595af6e 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -354,7 +354,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_FALSE && Z_TYPE_P(option) != IS_TRUE) { php_error_docref(NULL, E_WARNING, "Option \"remove_all_path\" must be of type bool, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->remove_all_path = zval_get_long(option); } @@ -362,14 +362,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "comp_method", sizeof("comp_method") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"comp_method\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->comp_method = zval_get_long(option); if ((option = zend_hash_str_find(options, "comp_flags", sizeof("comp_flags") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"comp_flags\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->comp_flags = zval_get_long(option); } @@ -379,14 +379,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "enc_method", sizeof("enc_method") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"enc_method\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->enc_method = zval_get_long(option); if ((option = zend_hash_str_find(options, "enc_password", sizeof("enc_password") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"enc_password\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } opts->enc_password = Z_STRVAL_P(option); @@ -397,7 +397,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "remove_path", sizeof("remove_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"remove_path\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } @@ -417,7 +417,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "add_path", sizeof("add_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"add_path\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } @@ -437,7 +437,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "flags", sizeof("flags") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { zend_type_error("Option \"flags\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } opts->flags = Z_LVAL_P(option); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 0cc566b544d00..8b57a59ee39f7 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -853,7 +853,7 @@ static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_ } break; default: - zend_argument_type_error(2, "must be of type zero-terminated string or array, %s given", zend_zval_type_name(option_buffer)); + zend_argument_type_error(2, "must be of type zero-terminated string or array, %s given", zend_zval_value_name(option_buffer)); return 0; } } diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt index a6b526ab780fa..4927bfea776ce 100644 --- a/tests/lang/bug25922.phpt +++ b/tests/lang/bug25922.phpt @@ -20,5 +20,5 @@ test(); ?> --EXPECT-- Undefined variable $data -Trying to access array offset on value of type null +Trying to access array offset on null Undefined index here: '' diff --git a/tests/lang/foreachLoop.003.phpt b/tests/lang/foreachLoop.003.phpt index c4ca3019f31f0..071e3bf422c34 100644 --- a/tests/lang/foreachLoop.003.phpt +++ b/tests/lang/foreachLoop.003.phpt @@ -33,7 +33,7 @@ echo "done.\n"; --EXPECTF-- Not an array. -Warning: foreach() argument must be of type array|object, bool given in %s on line 4 +Warning: foreach() argument must be of type array|object, true given in %s on line %d Warning: foreach() argument must be of type array|object, null given in %s on line 9 diff --git a/tests/lang/passByReference_003.phpt b/tests/lang/passByReference_003.phpt index 11c3e32c50bed..4d073822f48ce 100644 --- a/tests/lang/passByReference_003.phpt +++ b/tests/lang/passByReference_003.phpt @@ -27,7 +27,7 @@ Passing undefined by value Warning: Undefined variable $undef1 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Inside passbyVal call: NULL From 256a34ed1598698a2a971cf72968ce3349523f5d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 28 Nov 2022 20:40:32 +0000 Subject: [PATCH 281/895] strtok warns in case the string to split was not set. Close GH-10016. --- NEWS | 2 ++ UPGRADING | 1 + ext/standard/string.c | 2 +- .../tests/strings/strtok_variation3.phpt | 32 ++++++++++++++++++- .../tests/strings/strtok_variation4.phpt | 20 +++++++++++- .../tests/strings/strtok_variation5.phpt | 32 ++++++++++++++++++- .../tests/strings/strtok_variation6.phpt | 10 +++++- 7 files changed, 94 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index eb6c171a6768d..4a2204c53cb88 100644 --- a/NEWS +++ b/NEWS @@ -99,6 +99,8 @@ PHP NEWS - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) . Make array_pad's $length warning less confusing. (nielsdos) + . E_WARNING emitted by strtok in the caase both arguments are not provided when + starting tokenisation. (David Carlier) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. diff --git a/UPGRADING b/UPGRADING index fbcca037489dd..c27fa861581f4 100644 --- a/UPGRADING +++ b/UPGRADING @@ -68,6 +68,7 @@ PHP 8.3 UPGRADE NOTES . array_pad() is now only limited by the maximum number of elements an array can have. Before, it was only possible to add at most 1048576 elements at a time. + . strtok() raises a warninin the case token is not provided when starting tokenization. ======================================== 6. New Functions diff --git a/ext/standard/string.c b/ext/standard/string.c index feaf568745ab4..bd8ea063d9a57 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1080,7 +1080,7 @@ PHP_FUNCTION(strtok) if (!BG(strtok_string)) { /* String to tokenize not set. */ - // TODO: Should this warn? + php_error_docref(NULL, E_WARNING, "Both arguments must be provided when starting tokenization"); RETURN_FALSE; } diff --git a/ext/standard/tests/strings/strtok_variation3.phpt b/ext/standard/tests/strings/strtok_variation3.phpt index 8ae1e03e7dba8..d5cf1ad91dba4 100644 --- a/ext/standard/tests/strings/strtok_variation3.phpt +++ b/ext/standard/tests/strings/strtok_variation3.phpt @@ -62,7 +62,7 @@ foreach($heredoc_strings as $string) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtok() : with heredoc strings *** --- Iteration 1 --- @@ -80,15 +80,35 @@ bool(false) --- Iteration 2 --- bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 3 --- @@ -137,9 +157,19 @@ string(3) "rld" string(4) "hell" string(4) "hell" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) Done diff --git a/ext/standard/tests/strings/strtok_variation4.phpt b/ext/standard/tests/strings/strtok_variation4.phpt index 63090497097f9..671cf74b03138 100644 --- a/ext/standard/tests/strings/strtok_variation4.phpt +++ b/ext/standard/tests/strings/strtok_variation4.phpt @@ -36,15 +36,25 @@ foreach( $strings_with_nulls as $string ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtok() : with embedded nulls in the strings *** --- Iteration 1 --- bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 2 --- @@ -82,9 +92,17 @@ bool(false) --- Iteration 6 --- string(11) "hello world" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 7 --- diff --git a/ext/standard/tests/strings/strtok_variation5.phpt b/ext/standard/tests/strings/strtok_variation5.phpt index 006cf7a9f9607..bc33315b960f1 100644 --- a/ext/standard/tests/strings/strtok_variation5.phpt +++ b/ext/standard/tests/strings/strtok_variation5.phpt @@ -52,7 +52,7 @@ foreach( $string_array as $string ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtok() : with miscellaneous inputs *** --- Iteration 1 --- @@ -65,10 +65,20 @@ bool(false) --- Iteration 2 --- bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 3 --- @@ -113,18 +123,38 @@ bool(false) --- Iteration 8 --- bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 9 --- bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) --- Iteration 10 --- diff --git a/ext/standard/tests/strings/strtok_variation6.phpt b/ext/standard/tests/strings/strtok_variation6.phpt index 9b3f1d244d81f..255c100a0b194 100644 --- a/ext/standard/tests/strings/strtok_variation6.phpt +++ b/ext/standard/tests/strings/strtok_variation6.phpt @@ -42,7 +42,7 @@ foreach( $string_array as $string ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtok() : with invalid escape sequences in token *** --- Iteration 1 --- @@ -69,6 +69,8 @@ bool(false) string(1) " " string(1) "r" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) @@ -91,11 +93,15 @@ bool(false) string(5) "hello" string(6) " world" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) string(1) " " string(1) "r" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) @@ -113,6 +119,8 @@ bool(false) string(6) "hello\" string(6) " world" bool(false) + +Warning: strtok(): Both arguments must be provided when starting tokenization in %s on line %d bool(false) string(1) "/" From 1ab5d35bde56554d8cd05bc378f326a1d801e511 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 22 Jan 2023 19:03:36 +0000 Subject: [PATCH 282/895] exif add simple assert into jpeg header parsing as safety net more in a context of a possible text change. follow-up on GH-10402. Close GH-10416. --- ext/exif/exif.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 5d77d950a914d..5ac4a199d074d 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -3805,6 +3805,9 @@ static bool exif_scan_JPEG_header(image_info_type *ImageInfo) fpos = php_stream_tell(ImageInfo->infile); + /* safety net in case the above algorithm change dramatically, should not trigger */ + ZEND_ASSERT(marker != 0xff); + /* Read the length of the section. */ if ((lh = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) { EXIF_ERRLOG_CORRUPT(ImageInfo) From b60761ab97c67562d7b30667f4931c36dd82bf05 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 23 Jan 2023 12:16:25 +0000 Subject: [PATCH 283/895] [ci skip] UPGRADING --- UPGRADING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index c27fa861581f4..8e1a506abde49 100644 --- a/UPGRADING +++ b/UPGRADING @@ -68,7 +68,7 @@ PHP 8.3 UPGRADE NOTES . array_pad() is now only limited by the maximum number of elements an array can have. Before, it was only possible to add at most 1048576 elements at a time. - . strtok() raises a warninin the case token is not provided when starting tokenization. + . strtok() raises a warning in the case token is not provided when starting tokenization. ======================================== 6. New Functions From 670f1aa47731d7f1a114ce98ca3ac9966093f0f2 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 23 Jan 2023 12:28:21 +0000 Subject: [PATCH 284/895] Remove unbalanced parentheses in an error message (#10420) --- ext/standard/link.c | 2 +- ext/standard/tests/file/readlink_realpath_error-win32.phpt | 2 +- .../tests/file/readlink_realpath_variation2-win32.phpt | 4 ++-- ext/standard/tests/file/rename_variation7-win32.phpt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/standard/link.c b/ext/standard/link.c index c63f7ff268343..58098d14e8799 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -75,7 +75,7 @@ PHP_FUNCTION(readlink) if (ret == -1) { #ifdef PHP_WIN32 - php_error_docref(NULL, E_WARNING, "readlink failed to read the symbolic link (%s), error %d)", link, GetLastError()); + php_error_docref(NULL, E_WARNING, "readlink failed to read the symbolic link (%s), error %d", link, GetLastError()); #else php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); #endif diff --git a/ext/standard/tests/file/readlink_realpath_error-win32.phpt b/ext/standard/tests/file/readlink_realpath_error-win32.phpt index c49beb2edae0b..afb5e987d7fe7 100644 --- a/ext/standard/tests/file/readlink_realpath_error-win32.phpt +++ b/ext/standard/tests/file/readlink_realpath_error-win32.phpt @@ -25,7 +25,7 @@ echo "Done\n"; --EXPECTF-- *** Testing readlink() on a non-existent link *** -Warning: readlink(): readlink failed to read the symbolic link (%s, error %d) in %s on line %d +Warning: readlink(): readlink failed to read the symbolic link (%s), error %d in %s on line %d bool(false) *** Testing readlink() on existing file *** diff --git a/ext/standard/tests/file/readlink_realpath_variation2-win32.phpt b/ext/standard/tests/file/readlink_realpath_variation2-win32.phpt index aea1fd0cc0871..f1f561538179e 100644 --- a/ext/standard/tests/file/readlink_realpath_variation2-win32.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation2-win32.phpt @@ -76,7 +76,7 @@ string(%d) "%s%ereadlink_realpath_variation2%ehome%etests%elink%ereadlink_realpa Warning: symlink(): No such file or directory in %s on line %d bool(false) -Warning: readlink(): readlink failed to read the symbolic link (%s) in %s on line %d +Warning: readlink(): readlink failed to read the symbolic link (%s), error %d in %s on line %d bool(false) bool(false) @@ -90,7 +90,7 @@ string(%d) "%s%ereadlink_realpath_variation2%ehome%etests%elink%ereadlink_realpa Warning: link(): No such file or directory in %s on line %d bool(false) -Warning: readlink(): readlink failed to read the symbolic link (%s) in %s on line %d +Warning: readlink(): readlink failed to read the symbolic link (%s), error %d in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/rename_variation7-win32.phpt b/ext/standard/tests/file/rename_variation7-win32.phpt index bf879ce7d92d1..9e94c43cc5c03 100644 --- a/ext/standard/tests/file/rename_variation7-win32.phpt +++ b/ext/standard/tests/file/rename_variation7-win32.phpt @@ -28,9 +28,9 @@ echo "Done\n"; --EXPECTF-- Warning: symlink(): No such file or directory in %srename_variation7-win32.php on line %d -Warning: readlink(): readlink failed to read the symbolic link (%srename_variation7-win32.php.tmp.link), error 2) in %srename_variation7-win32.php on line %d +Warning: readlink(): readlink failed to read the symbolic link (%srename_variation7-win32.php.tmp.link), error 2 in %srename_variation7-win32.php on line %d bool(false) -Warning: readlink(): readlink failed to read the symbolic link (%srename_variation7-win32.php.tmp.link2), error 2) in %srename_variation7-win32.php on line %d +Warning: readlink(): readlink failed to read the symbolic link (%srename_variation7-win32.php.tmp.link2), error 2 in %srename_variation7-win32.php on line %d bool(false) Done From 2b55dee4dccb695b7ae13be08efab6b147c698d3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:25:00 +0100 Subject: [PATCH 285/895] Make stripslashes() only dependent on SSE2 configuration. (#10408) Alex Dowad noticed[1] that the SIMD stripslashes implementation actually only depended on SSE2, and not on SSE4.2 instructions. Remove the checking for SSE4.2 and only check for SSE2. This also greatly simplifies the supporting code. [1] https://github.com/php/php-src/pull/10313#issuecomment-1382825073 --- ext/standard/string.c | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index bd8ea063d9a57..622ed3a9d4369 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -48,6 +48,7 @@ #ifdef __SSE2__ #include +#include "Zend/zend_bitset.h" #endif /* this is read-only, so it's ok */ @@ -3472,15 +3473,10 @@ PHPAPI zend_string *php_addcslashes(zend_string *str, const char *what, size_t w ZEND_INTRIN_SSE4_2_FUNC_DECL(zend_string *php_addslashes_sse42(zend_string *str)); zend_string *php_addslashes_default(zend_string *str); -ZEND_INTRIN_SSE4_2_FUNC_DECL(void php_stripslashes_sse42(zend_string *str)); -void php_stripslashes_default(zend_string *str); - # ifdef ZEND_INTRIN_SSE4_2_FUNC_PROTO PHPAPI zend_string *php_addslashes(zend_string *str) __attribute__((ifunc("resolve_addslashes"))); -PHPAPI void php_stripslashes(zend_string *str) __attribute__((ifunc("resolve_stripslashes"))); typedef zend_string *(*php_addslashes_func_t)(zend_string *); -typedef void (*php_stripslashes_func_t)(zend_string *); ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ @@ -3490,36 +3486,21 @@ static php_addslashes_func_t resolve_addslashes(void) { } return php_addslashes_default; } - -ZEND_NO_SANITIZE_ADDRESS -ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static php_stripslashes_func_t resolve_stripslashes(void) { - if (zend_cpu_supports_sse42()) { - return php_stripslashes_sse42; - } - return php_stripslashes_default; -} # else /* ZEND_INTRIN_SSE4_2_FUNC_PTR */ static zend_string *(*php_addslashes_ptr)(zend_string *str) = NULL; -static void (*php_stripslashes_ptr)(zend_string *str) = NULL; PHPAPI zend_string *php_addslashes(zend_string *str) { return php_addslashes_ptr(str); } -PHPAPI void php_stripslashes(zend_string *str) { - php_stripslashes_ptr(str); -} /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(string_intrin) { if (zend_cpu_supports_sse42()) { php_addslashes_ptr = php_addslashes_sse42; - php_stripslashes_ptr = php_stripslashes_sse42; } else { php_addslashes_ptr = php_addslashes_default; - php_stripslashes_ptr = php_stripslashes_default; } return SUCCESS; } @@ -3872,12 +3853,8 @@ static zend_always_inline char *php_stripslashes_impl(const char *str, char *out return out; } -#if defined(ZEND_INTRIN_SSE4_2_NATIVE) || defined(ZEND_INTRIN_SSE4_2_RESOLVER) -# ifdef ZEND_INTRIN_SSE4_2_NATIVE +#ifdef __SSE2__ PHPAPI void php_stripslashes(zend_string *str) -# elif defined(ZEND_INTRIN_SSE4_2_RESOLVER) -void php_stripslashes_sse42(zend_string *str) -# endif { const char *s = ZSTR_VAL(str); char *t = ZSTR_VAL(str); @@ -3928,14 +3905,8 @@ void php_stripslashes_sse42(zend_string *str) ZSTR_VAL(str)[ZSTR_LEN(str)] = '\0'; } } -#endif - -#ifndef ZEND_INTRIN_SSE4_2_NATIVE -# ifdef ZEND_INTRIN_SSE4_2_RESOLVER -void php_stripslashes_default(zend_string *str) /* {{{ */ -# else +#else PHPAPI void php_stripslashes(zend_string *str) -# endif { const char *t = php_stripslashes_impl(ZSTR_VAL(str), ZSTR_VAL(str), ZSTR_LEN(str)); if (t != (ZSTR_VAL(str) + ZSTR_LEN(str))) { @@ -3943,7 +3914,6 @@ PHPAPI void php_stripslashes(zend_string *str) ZSTR_VAL(str)[ZSTR_LEN(str)] = '\0'; } } -/* }}} */ #endif /* }}} */ From bf5fdbd3a8bedfbd7216dd5a491bdb57f98a9958 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 23 Jan 2023 14:39:41 +0100 Subject: [PATCH 286/895] AC_PROG_CC_C99 is obsolete with autoconf >= 2.70 (#10383) To make sure that compiler supports C99 before Autoconf 2.69, this was needed. But with Autoconf 2.70 and later the macro is obsolete because the checks are done in AC_PROG_CC and warnings are emitted when building configure script. Fixes part of GH-9483 --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 690b6ad0a26e4..b0697e3208db0 100644 --- a/configure.ac +++ b/configure.ac @@ -128,7 +128,9 @@ PKG_PROG_PKG_CONFIG AC_PROG_CC([cc gcc]) PHP_DETECT_ICC PHP_DETECT_SUNCC -AC_PROG_CC_C99 + +dnl AC_PROG_CC_C99 is obsolete with autoconf >= 2.70 yet necessary for <= 2.69. +m4_version_prereq([2.70],,[AC_PROG_CC_C99]) AC_PROG_CPP AC_USE_SYSTEM_EXTENSIONS AC_PROG_LN_S From d9c2cf7e3d7fb9ae918546976cfd0d433af7febc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 14:42:32 +0100 Subject: [PATCH 287/895] session: Remove PS_EXTRA_RAND_BYTES (#10394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was introduced in 3467526a65bfb15eaf9ec49a0b5673b84e26bca4 and the corresponding RFC gives some reasoning. However the CSPRNG being “not secure enough” is not a thing and reading these extra bytes is just security theater: If the CSPRNG would hypothetically be broken, then PHP’s session IDs are the least of one’s concerns, because we already trust it in `random_bytes()` and might generate long-term secrets using that. --- ext/session/session.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index facd67379fed7..5c80cf3079ea5 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -306,17 +306,14 @@ static void bin_to_readable(unsigned char *in, size_t inlen, char *out, size_t o } /* }}} */ -#define PS_EXTRA_RAND_BYTES 60 - PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ { - unsigned char rbuf[PS_MAX_SID_LENGTH + PS_EXTRA_RAND_BYTES]; + unsigned char rbuf[PS_MAX_SID_LENGTH]; zend_string *outid; /* It would be enough to read ceil(sid_length * sid_bits_per_character / 8) bytes here. * We read sid_length bytes instead for simplicity. */ - /* Read additional PS_EXTRA_RAND_BYTES just in case CSPRNG is not safe enough */ - if (php_random_bytes_throw(rbuf, PS(sid_length) + PS_EXTRA_RAND_BYTES) == FAILURE) { + if (php_random_bytes_throw(rbuf, PS(sid_length)) == FAILURE) { return NULL; } From d3facbe28357a8f19826a38c7726256376f5ba21 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 23 Jan 2023 14:46:58 +0100 Subject: [PATCH 288/895] Mark globals as const (#10303) This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations. * ext/opcache/zend_accelerator_hash: make prime_numbers const * Zend/zend_signal: make zend_sigs const * ext/dba: make dba_handler pointers const * ext/exif: make php_tiff_bytes_per_format and other globals const * ext/intl/grapheme: make grapheme_extract_iters const * ext/mstring: make rare_codepoint_bitvec const * ext/snmp: make objid_mib const * ext/opcache: make all zend_shared_memory_handlers const --- Zend/zend_signal.c | 2 +- ext/dba/dba.c | 16 ++++++++-------- ext/dba/php_dba.h | 6 +++--- ext/exif/exif.c | 10 +++++----- ext/intl/grapheme/grapheme_string.c | 2 +- ext/mbstring/gen_rare_cp_bitvec.php | 2 +- ext/mbstring/rare_cp_bitvec.h | 2 +- ext/opcache/shared_alloc_mmap.c | 2 +- ext/opcache/shared_alloc_posix.c | 2 +- ext/opcache/shared_alloc_shm.c | 2 +- ext/opcache/shared_alloc_win32.c | 2 +- ext/opcache/zend_accelerator_hash.c | 4 ++-- ext/opcache/zend_shared_alloc.h | 10 +++++----- ext/snmp/snmp.c | 4 ++-- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index aa74bdd147c98..e68ddcf029140 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -71,7 +71,7 @@ static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void #define TIMEOUT_SIG SIGPROF #endif -static int zend_sigs[] = { TIMEOUT_SIG, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2 }; +static const int zend_sigs[] = { TIMEOUT_SIG, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2 }; #define SA_FLAGS_MASK ~(SA_NODEFER | SA_RESETHAND) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 7e0f56b443e09..f468016c8ea94 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -55,8 +55,8 @@ PHP_MSHUTDOWN_FUNCTION(dba); PHP_MINFO_FUNCTION(dba); ZEND_BEGIN_MODULE_GLOBALS(dba) - char *default_handler; - dba_handler *default_hptr; + const char *default_handler; + const dba_handler *default_hptr; ZEND_END_MODULE_GLOBALS(dba) ZEND_DECLARE_MODULE_GLOBALS(dba) @@ -159,7 +159,7 @@ static zend_string* php_dba_make_key(HashTable *key) /* {{{ globals */ -static dba_handler handler[] = { +static const dba_handler handler[] = { #ifdef DBA_GDBM DBA_HND(gdbm, DBA_LOCK_EXT) /* Locking done in library if set */ #endif @@ -249,7 +249,7 @@ PHPAPI void dba_fetch_resource(dba_info **pinfo, zval **id) /* {{{ dba_get_handler PHPAPI dba_handler *dba_get_handler(const char* handler_name) { - dba_handler *hptr; + const dba_handler *hptr; for (hptr = handler; hptr->name && strcasecmp(hptr->name, handler_name); hptr++); return hptr; } @@ -320,7 +320,7 @@ static void dba_close_pe_rsrc(zend_resource *rsrc) /* {{{ PHP_INI */ ZEND_INI_MH(OnUpdateDefaultHandler) { - dba_handler *hptr; + const dba_handler *hptr; if (!ZSTR_LEN(new_value)) { DBA_G(default_hptr) = NULL; @@ -377,7 +377,7 @@ PHP_MSHUTDOWN_FUNCTION(dba) /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(dba) { - dba_handler *hptr; + const dba_handler *hptr; smart_str handlers = {0}; for(hptr = handler; hptr->name; hptr++) { @@ -461,7 +461,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) { dba_mode_t modenr; dba_info *info, *other; - dba_handler *hptr; + const dba_handler *hptr; char *error = NULL; int lock_mode, lock_flag = 0; char *file_mode; @@ -1165,7 +1165,7 @@ PHP_FUNCTION(dba_sync) /* {{{ List configured database handlers */ PHP_FUNCTION(dba_handlers) { - dba_handler *hptr; + const dba_handler *hptr; bool full_info = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_info) == FAILURE) { diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index ce59e4851d9f8..edeed50a84499 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -48,7 +48,7 @@ typedef struct dba_info { zend_long driver_flags; /* private */ int flags; /* whether and how dba did locking and other flags*/ - struct dba_handler *hnd; + const struct dba_handler *hnd; dba_lock lock; } dba_info; @@ -85,7 +85,7 @@ typedef struct dba_handler { zend_string* (*nextkey)(dba_info *); zend_result (*optimize)(dba_info *); zend_result (*sync)(dba_info *); - char* (*info)(struct dba_handler *hnd, dba_info *); + char* (*info)(const struct dba_handler *hnd, dba_info *); /* dba_info==NULL: Handler info, dba_info!=NULL: Database info */ } dba_handler; @@ -112,7 +112,7 @@ typedef struct dba_handler { #define DBA_SYNC_FUNC(x) \ zend_result dba_sync_##x(dba_info *info) #define DBA_INFO_FUNC(x) \ - char *dba_info_##x(dba_handler *hnd, dba_info *info) + char *dba_info_##x(const dba_handler *hnd, dba_info *info) #define DBA_FUNCS(x) \ DBA_OPEN_FUNC(x); \ diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 5ac4a199d074d..19f5aafcfe284 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -230,10 +230,10 @@ static size_t php_strnlen(char* str, size_t maxlen) { /* }}} */ /* {{{ error messages */ -static const char * EXIF_ERROR_FILEEOF = "Unexpected end of file reached"; -static const char * EXIF_ERROR_CORRUPT = "File structure corrupted"; -static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached"; -static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section"; +static const char *const EXIF_ERROR_FILEEOF = "Unexpected end of file reached"; +static const char *const EXIF_ERROR_CORRUPT = "File structure corrupted"; +static const char *const EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached"; +static const char *const EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section"; #define EXIF_ERRLOG_FILEEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FILEEOF); #define EXIF_ERRLOG_CORRUPT(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_CORRUPT); @@ -244,7 +244,7 @@ static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined fi /* {{{ format description defines Describes format descriptor */ -static int php_tiff_bytes_per_format[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 1}; +static const int php_tiff_bytes_per_format[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 1}; #define NUM_FORMATS 13 #define TAG_FMT_BYTE 1 diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 29bbdf7ff950c..a9cfd3d2ea6e5 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -679,7 +679,7 @@ grapheme_extract_count_iter(UBreakIterator *bi, int32_t size, unsigned char *pst /* {{{ grapheme extract iter function pointer array */ typedef int32_t (*grapheme_extract_iter)(UBreakIterator * /*bi*/, int32_t /*size*/, unsigned char * /*pstr*/, int32_t /*str_len*/); -static grapheme_extract_iter grapheme_extract_iters[] = { +static const grapheme_extract_iter grapheme_extract_iters[] = { &grapheme_extract_count_iter, &grapheme_extract_bytecount_iter, &grapheme_extract_charcount_iter, diff --git a/ext/mbstring/gen_rare_cp_bitvec.php b/ext/mbstring/gen_rare_cp_bitvec.php index 741c3827de509..ca1e85cb3d89a 100755 --- a/ext/mbstring/gen_rare_cp_bitvec.php +++ b/ext/mbstring/gen_rare_cp_bitvec.php @@ -40,7 +40,7 @@ * as less likely to be the correct one. */ -static uint32_t rare_codepoint_bitvec[] = { +static const uint32_t rare_codepoint_bitvec[] = { HEADER; for ($i = 0; $i < 0xFFFF / 32; $i++) { diff --git a/ext/mbstring/rare_cp_bitvec.h b/ext/mbstring/rare_cp_bitvec.h index 56a40478b5a34..dec97a7d74f50 100644 --- a/ext/mbstring/rare_cp_bitvec.h +++ b/ext/mbstring/rare_cp_bitvec.h @@ -9,7 +9,7 @@ * as less likely to be the correct one. */ -static uint32_t rare_codepoint_bitvec[] = { +static const uint32_t rare_codepoint_bitvec[] = { 0xffffd9ff, 0x00000000, 0x00000000, 0x80000000, 0xffffffff, 0x00002001, 0x00000000, 0x00000000, 0x70ff0f0f, 0xfffcffff, 0x70fcfe61, 0x81fc3fcc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c index e180607efa186..20fbc51442092 100644 --- a/ext/opcache/shared_alloc_mmap.c +++ b/ext/opcache/shared_alloc_mmap.c @@ -276,7 +276,7 @@ static size_t segment_type_size(void) return sizeof(zend_shared_segment); } -zend_shared_memory_handlers zend_alloc_mmap_handlers = { +const zend_shared_memory_handlers zend_alloc_mmap_handlers = { create_segments, detach_segment, segment_type_size diff --git a/ext/opcache/shared_alloc_posix.c b/ext/opcache/shared_alloc_posix.c index bab4c4544ef91..c7489a247016f 100644 --- a/ext/opcache/shared_alloc_posix.c +++ b/ext/opcache/shared_alloc_posix.c @@ -89,7 +89,7 @@ static size_t segment_type_size(void) return sizeof(zend_shared_segment_posix); } -zend_shared_memory_handlers zend_alloc_posix_handlers = { +const zend_shared_memory_handlers zend_alloc_posix_handlers = { (create_segments_t)create_segments, (detach_segment_t)detach_segment, segment_type_size diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c index c55e74e1f7db5..2764dffd5e43e 100644 --- a/ext/opcache/shared_alloc_shm.c +++ b/ext/opcache/shared_alloc_shm.c @@ -135,7 +135,7 @@ static size_t segment_type_size(void) return sizeof(zend_shared_segment_shm); } -zend_shared_memory_handlers zend_alloc_shm_handlers = { +const zend_shared_memory_handlers zend_alloc_shm_handlers = { (create_segments_t)create_segments, (detach_segment_t)detach_segment, segment_type_size diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index c64816c053def..97cae92ee2dba 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -352,7 +352,7 @@ static size_t segment_type_size(void) return sizeof(zend_shared_segment); } -zend_shared_memory_handlers zend_alloc_win32_handlers = { +const zend_shared_memory_handlers zend_alloc_win32_handlers = { create_segments, detach_segment, segment_type_size diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 676ed32ce8ff3..2fd3dfb5ed56e 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -25,9 +25,9 @@ #include "zend_shared_alloc.h" /* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */ -static uint32_t prime_numbers[] = +static const uint32_t prime_numbers[] = {5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }; -static uint32_t num_prime_numbers = sizeof(prime_numbers) / sizeof(uint32_t); +static const uint32_t num_prime_numbers = sizeof(prime_numbers) / sizeof(uint32_t); void zend_accel_hash_clean(zend_accel_hash *accel_hash) { diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index c56bd2bc8f4b2..7c52997f18a79 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -91,7 +91,7 @@ typedef struct { typedef struct _handler_entry { const char *name; - zend_shared_memory_handlers *handler; + const zend_shared_memory_handlers *handler; } zend_shared_memory_handler_entry; typedef struct _zend_shared_memory_state { @@ -197,19 +197,19 @@ const char *zend_accel_get_shared_model(void); void zend_accel_shared_protect(int mode); #ifdef USE_MMAP -extern zend_shared_memory_handlers zend_alloc_mmap_handlers; +extern const zend_shared_memory_handlers zend_alloc_mmap_handlers; #endif #ifdef USE_SHM -extern zend_shared_memory_handlers zend_alloc_shm_handlers; +extern const zend_shared_memory_handlers zend_alloc_shm_handlers; #endif #ifdef USE_SHM_OPEN -extern zend_shared_memory_handlers zend_alloc_posix_handlers; +extern const zend_shared_memory_handlers zend_alloc_posix_handlers; #endif #ifdef ZEND_WIN32 -extern zend_shared_memory_handlers zend_alloc_win32_handlers; +extern const zend_shared_memory_handlers zend_alloc_win32_handlers; void zend_shared_alloc_create_lock(void); void zend_shared_alloc_lock_win32(void); void zend_shared_alloc_unlock_win32(void); diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 6c7a6f42e968c..a1cdcc7096752 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -91,7 +91,7 @@ ZEND_DECLARE_MODULE_GLOBALS(snmp) static PHP_GINIT_FUNCTION(snmp); /* constant - can be shared among threads */ -static oid objid_mib[] = {1, 3, 6, 1, 2, 1}; +static const oid objid_mib[] = {1, 3, 6, 1, 2, 1}; /* Handlers */ static zend_object_handlers php_snmp_object_handlers; @@ -765,7 +765,7 @@ static bool php_snmp_parse_oid( return false; } } else { - memmove((char *)objid_query->vars[0].name, (char *)objid_mib, sizeof(objid_mib)); + memmove((char *)objid_query->vars[0].name, (const char *)objid_mib, sizeof(objid_mib)); objid_query->vars[0].name_length = sizeof(objid_mib) / sizeof(oid); } } else { From 974dba3b80e46b12af956a12b64bb0ab99513673 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 21 Jan 2023 14:05:59 +0100 Subject: [PATCH 289/895] Fix duplicated FILE section in test bug80747.phpt Signed-off-by: George Peter Banyard --- ext/openssl/tests/bug80747.phpt | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/openssl/tests/bug80747.phpt b/ext/openssl/tests/bug80747.phpt index cc7770ea68e5b..b21fc4d9dcda3 100644 --- a/ext/openssl/tests/bug80747.phpt +++ b/ext/openssl/tests/bug80747.phpt @@ -1,6 +1,5 @@ --TEST-- Bug #80747: Providing RSA key size < 512 generates key that crash PHP ---FILE-- --EXTENSIONS-- openssl --SKIPIF-- From 2b395f7b6ef632b6e58b7cdfa33a293125e3d9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 21 Jan 2023 00:35:55 +0100 Subject: [PATCH 290/895] random: Remove check for HAVE_DEV_URANDOM It cannot be decided whether the device is available at build time, PHP might run in a container or chroot that does not expose the device. Simply attempt to open it, if it does not exist it will fail. This improves readability of php_random_bytes() by removing one layer of preprocessor conditions. --- ext/random/random.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/random/random.c b/ext/random/random.c index 30ae6c3baa7bc..ebeed4c777bb7 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -557,9 +557,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) if (fd < 0) { errno = 0; -# if HAVE_DEV_URANDOM fd = open("/dev/urandom", O_RDONLY); -# endif if (fd < 0) { if (should_throw) { if (errno != 0) { From a408781ab4921d798a8093be726be2bb12be7b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 21 Jan 2023 00:39:57 +0100 Subject: [PATCH 291/895] Remove now-unused check for /dev/urandom from Zend/Zend.m4 --- UPGRADING.INTERNALS | 6 ++++++ Zend/Zend.m4 | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index e530d472aaf9f..d55c3cfe05816 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -35,6 +35,12 @@ PHP 8.3 INTERNALS UPGRADE NOTES 2. Build system changes ======================== +* Removed the HAVE_DEV_URANDOM compile time check. HAVE_DEV_URANDOM will + now never be defined. Any checks relying on HAVE_DEV_URANDOM should be + removed. Even with HAVE_DEV_URANDOM it was not guaranteed that + /dev/urandom is actually available at run time and thus a runtime + check needs to happen in all cases. + ======================== 3. Module changes ======================== diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 3bd30bf78e984..f651ee57d7487 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -304,14 +304,6 @@ AC_MSG_RESULT($ZEND_SIGNALS) ]) -AC_MSG_CHECKING(whether /dev/urandom exists) -if test -r "/dev/urandom" && test -c "/dev/urandom"; then - AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define if the target system has /dev/urandom device]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - AC_ARG_ENABLE([gcc-global-regs], [AS_HELP_STRING([--disable-gcc-global-regs], [whether to enable GCC global register variables])], From 57b362b7a98346bb9366de41f50ffe6e01e9f18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 18:21:42 +0100 Subject: [PATCH 292/895] random: Do not trust arc4random_buf() on glibc (#10390) This effectively reverts #8984. As discussed in #10327 which will enable the use of the getrandom(2) syscall on NetBSD instead of relying on the userland arc4random_buf(), the CSPRNG should prioritize security over speed [1] and history has shown that userland implementations unavoidably fall short on the security side. In fact the glibc implementation is a thin wrapper around the syscall due to security concerns and thus does not provide any benefit over just calling getrandom(2) ourselves. Even without any performance optimizations the CSPRNG should be plenty fast for the vast majority of applications, because they often only need a few bytes of randomness to generate a session ID. If speed is desired, the OO API offers faster, but non-cryptographically secure engines. --- NEWS | 3 +++ ext/random/random.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 953d0842db96f..278d157f39789 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS - GMP: . Properly implement GMP::__construct(). (nielsdos) +- Random: + . Fix GH-10390 (Do not trust arc4random_buf() on glibc). (timwolla) + - Standard: - Fixed bug GH-8086 (Introduce mail.mixed_lf_and_crlf INI). (Jakub Zelenka) diff --git a/ext/random/random.c b/ext/random/random.c index 64e30e5087186..dda57f0fe7d35 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -505,7 +505,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) } return FAILURE; } -#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__) || defined(__GLIBC__)) +#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__)) arc4random_buf(bytes, size); #else size_t read_bytes = 0; From a7998fda8d7db8bb9407d937a35caad944671d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 18:28:34 +0100 Subject: [PATCH 293/895] random: Simplify control flow for handling /dev/urandom errors (#10392) The only way the previous `if (read_bytes < size)` branch could be taken is when the loop was exited by the `break;` statement. We can just merge this into the loop to make the code more obvious. --- ext/random/random.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ext/random/random.c b/ext/random/random.c index 6657ee3ead6f8..cf69be9c16bb1 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -594,20 +594,17 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) for (read_bytes = 0; read_bytes < size; read_bytes += (size_t) n) { errno = 0; n = read(fd, bytes + read_bytes, size - read_bytes); - if (n <= 0) { - break; - } - } - if (read_bytes < size) { - if (should_throw) { - if (errno != 0) { - zend_throw_exception_ex(random_ce_Random_RandomException, 0, "Could not gather sufficient random data: %s", strerror(errno)); - } else { - zend_throw_exception_ex(random_ce_Random_RandomException, 0, "Could not gather sufficient random data"); + if (n <= 0) { + if (should_throw) { + if (errno != 0) { + zend_throw_exception_ex(random_ce_Random_RandomException, 0, "Could not gather sufficient random data: %s", strerror(errno)); + } else { + zend_throw_exception_ex(random_ce_Random_RandomException, 0, "Could not gather sufficient random data"); + } } + return FAILURE; } - return FAILURE; } } #endif From c59e0750af9c4718dbc28e19932cf6366f9100f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 18:35:16 +0100 Subject: [PATCH 294/895] password: Use `php_random_bytes_throw` in `php_password_make_salt` (#10393) The CSPRNG failing should be rare nowadays, but it *might* happen and without this patch it's hard for the user to find out why the salt generation failed: The error message is not actionable. This patch will automatically set the CSPRNG exception to the `$previous` exception of the ValueError that is thrown, allowing the developer to determine the cause of the salt generation failure. Before: Fatal error: Uncaught ValueError: Unable to generate salt in php-src/test3.php:3 Stack trace: #0 php-src/test3.php(3): password_hash(Object(SensitiveParameterValue), '2y') #1 {main} thrown in php-src/test3.php on line 3 After: Fatal error: Uncaught Random\RandomException: Cannot open /dev/urandom: No such file or directory in php-src/test3.php:3 Stack trace: #0 php-src/test3.php(3): password_hash(Object(SensitiveParameterValue), '2y') #1 {main} Next ValueError: Unable to generate salt in php-src/test3.php:3 Stack trace: #0 php-src/test3.php(3): password_hash(Object(SensitiveParameterValue), '2y') #1 {main} thrown in php-src/test3.php on line 3 --- NEWS | 2 ++ UPGRADING | 2 ++ ext/standard/password.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4a2204c53cb88..4fe29c374300a 100644 --- a/NEWS +++ b/NEWS @@ -101,6 +101,8 @@ PHP NEWS . Make array_pad's $length warning less confusing. (nielsdos) . E_WARNING emitted by strtok in the caase both arguments are not provided when starting tokenisation. (David Carlier) + . password_hash() will now chain the original RandomException to the ValueError + on salt generation failure. (timwolla) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. diff --git a/UPGRADING b/UPGRADING index 8e1a506abde49..9c397944a6dfd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -69,6 +69,8 @@ PHP 8.3 UPGRADE NOTES can have. Before, it was only possible to add at most 1048576 elements at a time. . strtok() raises a warning in the case token is not provided when starting tokenization. + . password_hash() will now chain the underlying Random\RandomException + as the ValueError’s $previous Exception when salt generation fails. ======================================== 6. New Functions diff --git a/ext/standard/password.c b/ext/standard/password.c index 503e72fbbf366..30e524dafbb18 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -83,7 +83,7 @@ static zend_string* php_password_make_salt(size_t length) /* {{{ */ } buffer = zend_string_alloc(length * 3 / 4 + 1, 0); - if (FAILURE == php_random_bytes_silent(ZSTR_VAL(buffer), ZSTR_LEN(buffer))) { + if (FAILURE == php_random_bytes_throw(ZSTR_VAL(buffer), ZSTR_LEN(buffer))) { zend_value_error("Unable to generate salt"); zend_string_release_ex(buffer, 0); return NULL; From 948cb4702c84aec4a35997ea6c6727c620cd1b4e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 15 Jan 2023 12:48:39 +0000 Subject: [PATCH 295/895] random netbsd 10 update finally supporting getrandom syscall properly. Close GH-10327. --- NEWS | 1 + ext/random/random.c | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 4fe29c374300a..b003b2d1f83b8 100644 --- a/NEWS +++ b/NEWS @@ -81,6 +81,7 @@ PHP NEWS . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. (timwolla) . Fix GH-10292 (Made the default value of the first param of srand() and mt_srand() nullable). (kocsismate) + . Enable getrandom() for NetBSD (from 10.x). (David Carlier) - Reflection: . Fix GH-9470 (ReflectionMethod constructor should not find private parent diff --git a/ext/random/random.c b/ext/random/random.c index cf69be9c16bb1..9166c62bb1693 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -49,7 +49,8 @@ #if HAVE_SYS_PARAM_H # include -# if (__FreeBSD__ && __FreeBSD_version > 1200000) || (__DragonFly__ && __DragonFly_version >= 500700) || defined(__sun) +# if (__FreeBSD__ && __FreeBSD_version > 1200000) || (__DragonFly__ && __DragonFly_version >= 500700) || \ + defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) # include # endif #endif @@ -502,14 +503,27 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) } return FAILURE; } -#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__)) +#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 && __NetBSD_Version__ < 1000000000) || \ + defined(__APPLE__) || defined(__GLIBC__)) + /* + * OpenBSD until there is a valid equivalent + * or NetBSD before the 10.x release + * falls back to arc4random_buf + * giving a decent output, the main benefit + * is being (relatively) failsafe. + * Older macOs releases fall also into this + * category for reasons explained above. + */ arc4random_buf(bytes, size); #else size_t read_bytes = 0; ssize_t n; -# if (defined(__linux__) && defined(SYS_getrandom)) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || defined(__sun) - /* Linux getrandom(2) syscall or FreeBSD/DragonFlyBSD getrandom(2) function*/ - /* Keep reading until we get enough entropy */ +# if (defined(__linux__) && defined(SYS_getrandom)) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || \ + defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) + /* Linux getrandom(2) syscall or FreeBSD/DragonFlyBSD/NetBSD getrandom(2) function + * Being a syscall, implemented in the kernel, getrandom offers higher quality output + * compared to the arc4random api albeit a fallback to /dev/urandom is considered. + */ while (read_bytes < size) { errno = 0; From dee39518a0e5ab62ee2695cff104f89ad940ca4d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 16 Jan 2023 19:39:22 +0000 Subject: [PATCH 296/895] posix detects posix_pathconf api. alpine linux throws undefined reference at build time, thus not assuming it s necessarily available. Closes GH-10350. --- ext/posix/config.m4 | 2 +- ext/posix/posix.c | 2 ++ ext/posix/posix.stub.php | 2 ++ ext/posix/posix_arginfo.h | 14 +++++++++++++- ext/posix/tests/posix_fpathconf.phpt | 4 ++++ ext/posix/tests/posix_pathconf.phpt | 4 ++++ 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index e91041188ae73..f4335e50a9564 100644 --- a/ext/posix/config.m4 +++ b/ext/posix/config.m4 @@ -10,7 +10,7 @@ if test "$PHP_POSIX" = "yes"; then AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h]) - AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r) + AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r posix_pathconf) AC_MSG_CHECKING([for working ttyname_r() implementation]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 9eaef153b0885..505493ec2f68f 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1197,6 +1197,7 @@ PHP_FUNCTION(posix_sysconf) RETURN_LONG(sysconf(conf_id)); } +#ifdef HAVE_POSIX_PATHCONF PHP_FUNCTION(posix_pathconf) { zend_long name, ret; @@ -1257,3 +1258,4 @@ PHP_FUNCTION(posix_fpathconf) RETURN_LONG(ret); } +#endif diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index 16f19e91490ea..fffce3085f6da 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -428,6 +428,8 @@ function posix_initgroups(string $username, int $group_id): bool {} function posix_sysconf(int $conf_id): int {} +#ifdef HAVE_POSIX_PATHCONF function posix_pathconf(string $path, int $name): int|false {} /** @param resource|int $file_descriptor */ function posix_fpathconf($file_descriptor, int $name): int|false {} +#endif diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index 74bc0021676c8..8320c64951e8a 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b0c74c2ad41d4ae6a624f73109815fc9fe47fd1f */ + * Stub hash: 5359511a464e0d35c7d5c4ea3320c70210b2b9a7 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) @@ -164,15 +164,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_sysconf, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, conf_id, IS_LONG, 0) ZEND_END_ARG_INFO() +#if defined(HAVE_POSIX_PATHCONF) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_pathconf, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) ZEND_END_ARG_INFO() +#endif +#if defined(HAVE_POSIX_PATHCONF) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_fpathconf, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, file_descriptor) ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) ZEND_END_ARG_INFO() +#endif ZEND_FUNCTION(posix_kill); @@ -238,8 +242,12 @@ ZEND_FUNCTION(posix_strerror); ZEND_FUNCTION(posix_initgroups); #endif ZEND_FUNCTION(posix_sysconf); +#if defined(HAVE_POSIX_PATHCONF) ZEND_FUNCTION(posix_pathconf); +#endif +#if defined(HAVE_POSIX_PATHCONF) ZEND_FUNCTION(posix_fpathconf); +#endif static const zend_function_entry ext_functions[] = { @@ -307,8 +315,12 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(posix_initgroups, arginfo_posix_initgroups) #endif ZEND_FE(posix_sysconf, arginfo_posix_sysconf) +#if defined(HAVE_POSIX_PATHCONF) ZEND_FE(posix_pathconf, arginfo_posix_pathconf) +#endif +#if defined(HAVE_POSIX_PATHCONF) ZEND_FE(posix_fpathconf, arginfo_posix_fpathconf) +#endif ZEND_FE_END }; diff --git a/ext/posix/tests/posix_fpathconf.phpt b/ext/posix/tests/posix_fpathconf.phpt index a809066e78221..cc388d5c0971f 100644 --- a/ext/posix/tests/posix_fpathconf.phpt +++ b/ext/posix/tests/posix_fpathconf.phpt @@ -2,6 +2,10 @@ Test posix_fpathconf --EXTENSIONS-- posix +--SKIPIF-- + --FILE-- --FILE-- Date: Mon, 23 Jan 2023 17:57:37 +0000 Subject: [PATCH 297/895] random disable arc4random_buf for glibc, merge mistake --- ext/random/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/random/random.c b/ext/random/random.c index 9166c62bb1693..cf2bf81e566fc 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -504,7 +504,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) return FAILURE; } #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 && __NetBSD_Version__ < 1000000000) || \ - defined(__APPLE__) || defined(__GLIBC__)) + defined(__APPLE__)) /* * OpenBSD until there is a valid equivalent * or NetBSD before the 10.x release From 560ca9c7ae24467eeabd01e42f498682b70763f4 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 24 Jan 2023 07:15:03 +0100 Subject: [PATCH 298/895] Fix incorrect bitshifting and masking in ffi bitfield (#10403) When a uint8_t is bitshifted to the left, it is actually promoted to an int. For the current code this has the effect of a wrong sign-extension, and the result will also wrongly become zero when insert_pos >= 32. Fix this by adding an explicit cast. Furthermore, the partial prefix byte mask was computed incorrectly: the byte is already shifted so the mask should not account for the shift. --- ext/ffi/ffi.c | 6 +++--- ext/ffi/tests/gh10403.phpt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 ext/ffi/tests/gh10403.phpt diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 686db459eff5b..107d2862c1256 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -592,14 +592,14 @@ static uint64_t zend_ffi_bit_field_read(void *ptr, zend_ffi_field *field) /* {{{ /* Read partial prefix byte */ if (pos != 0) { size_t num_bits = 8 - pos; - mask = ((1U << num_bits) - 1U) << pos; + mask = (1U << num_bits) - 1U; val = (*p++ >> pos) & mask; insert_pos += num_bits; } /* Read full bytes */ while (p < last_p) { - val |= *p++ << insert_pos; + val |= (uint64_t) *p++ << insert_pos; insert_pos += 8; } @@ -607,7 +607,7 @@ static uint64_t zend_ffi_bit_field_read(void *ptr, zend_ffi_field *field) /* {{{ if (p == last_p) { size_t num_bits = last_bit % 8 + 1; mask = (1U << num_bits) - 1U; - val |= (*p & mask) << insert_pos; + val |= (uint64_t) (*p & mask) << insert_pos; } return val; diff --git a/ext/ffi/tests/gh10403.phpt b/ext/ffi/tests/gh10403.phpt new file mode 100644 index 0000000000000..6e422c438fdf6 --- /dev/null +++ b/ext/ffi/tests/gh10403.phpt @@ -0,0 +1,30 @@ +--TEST-- +GH-10403: Fix incorrect bitshifting and masking in ffi bitfield +--EXTENSIONS-- +ffi +--SKIPIF-- + +--FILE-- +new('struct MyStruct'); +$test_struct->x = 1023; +$test_values = [0x3fafbfcfdfefff, 0x01020304050607, 0, 0x3fffffffffffff, 0x2ffffffffffff5]; +foreach ($test_values as $test_value) { + $test_struct->y = $test_value; + var_dump($test_struct->y === $test_value); +} +var_dump($test_struct->x); +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +int(1023) From 2787e3cd6548079b1bd8546ce5938dd10004b40c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 24 Jan 2023 07:32:07 +0100 Subject: [PATCH 299/895] Fix incorrect check condition in type inference (#10425) The "nothing to do" case would never be hit because the switch block would execute if the opcode is ZEND_ASSIGN_STATIC_PROP_OP, not ZEND_ASSIGN_STATIC_PROP. This meant that we were falling through to the else block. Fix this by correcting the check condition. --- Zend/Optimizer/zend_inference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 0654464f108dc..dfb70a3dcabf0 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -2505,7 +2505,7 @@ static zend_always_inline int _zend_update_type_info( UPDATE_SSA_TYPE(orig, ssa_op->op1_def); COPY_SSA_OBJ_TYPE(ssa_op->op1_use, ssa_op->op1_def); } - } else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP) { + } else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) { /* Nothing to do */ } else { if (opline->opcode == ZEND_ASSIGN_OP && ssa_op->result_def >= 0 && (tmp & MAY_BE_RC1)) { From 68381457cc5370935bc7c69eeeac772be255174e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 24 Jan 2023 09:55:47 +0300 Subject: [PATCH 300/895] Fix test failures when PHP is compiled without ZEND_CHECK_STACK_LIMIT (e.g. 32-bit CLANG build with address sanitizer) --- Zend/tests/stack_limit/stack_limit_001.phpt | 1 + Zend/tests/stack_limit/stack_limit_002.phpt | 1 + Zend/tests/stack_limit/stack_limit_003.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_004.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_005.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_006.phpt | 1 + Zend/tests/stack_limit/stack_limit_007.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_008.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_009.phpt | 1 + Zend/tests/stack_limit/stack_limit_010.phpt | 1 + Zend/tests/stack_limit/stack_limit_011.phpt | 4 ++++ Zend/tests/stack_limit/stack_limit_012.phpt | 4 ++++ 12 files changed, 33 insertions(+) diff --git a/Zend/tests/stack_limit/stack_limit_001.phpt b/Zend/tests/stack_limit/stack_limit_001.phpt index 534c3cf6574b9..ca185635c39c8 100644 --- a/Zend/tests/stack_limit/stack_limit_001.phpt +++ b/Zend/tests/stack_limit/stack_limit_001.phpt @@ -2,6 +2,7 @@ Stack limit 001 - Stack limit checks with max_allowed_stack_size detection --SKIPIF-- --EXTENSIONS-- diff --git a/Zend/tests/stack_limit/stack_limit_002.phpt b/Zend/tests/stack_limit/stack_limit_002.phpt index 337900ae84669..309de9bf6a2a3 100644 --- a/Zend/tests/stack_limit/stack_limit_002.phpt +++ b/Zend/tests/stack_limit/stack_limit_002.phpt @@ -2,6 +2,7 @@ Stack limit 002 - Stack limit checks with max_allowed_stack_size detection (fibers) --SKIPIF-- --EXTENSIONS-- diff --git a/Zend/tests/stack_limit/stack_limit_003.phpt b/Zend/tests/stack_limit/stack_limit_003.phpt index 51bf51f2ab26b..9eb94a971636f 100644 --- a/Zend/tests/stack_limit/stack_limit_003.phpt +++ b/Zend/tests/stack_limit/stack_limit_003.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 003 - Stack limit checks with fixed max_allowed_stack_size +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_004.phpt b/Zend/tests/stack_limit/stack_limit_004.phpt index a3da4664edb03..141a24babb961 100644 --- a/Zend/tests/stack_limit/stack_limit_004.phpt +++ b/Zend/tests/stack_limit/stack_limit_004.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 004 - Stack limit checks with fixed max_allowed_stack_size (fibers) +--SKIPIF-- + --EXTENSIONS-- zend_test --FILE-- diff --git a/Zend/tests/stack_limit/stack_limit_005.phpt b/Zend/tests/stack_limit/stack_limit_005.phpt index 6e50bd34e7e8e..3fcd5d5728276 100644 --- a/Zend/tests/stack_limit/stack_limit_005.phpt +++ b/Zend/tests/stack_limit/stack_limit_005.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 005 - Internal stack limit check in zend_compile_expr() +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_006.phpt b/Zend/tests/stack_limit/stack_limit_006.phpt index 3f03807783d69..0b51fabb4babd 100644 --- a/Zend/tests/stack_limit/stack_limit_006.phpt +++ b/Zend/tests/stack_limit/stack_limit_006.phpt @@ -2,6 +2,7 @@ Stack limit 006 - env size affects __libc_stack_end --SKIPIF-- --EXTENSIONS-- diff --git a/Zend/tests/stack_limit/stack_limit_007.phpt b/Zend/tests/stack_limit/stack_limit_007.phpt index 7994bb66f1e3b..411af1d2c6894 100644 --- a/Zend/tests/stack_limit/stack_limit_007.phpt +++ b/Zend/tests/stack_limit/stack_limit_007.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 007 - Exception handling +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_008.phpt b/Zend/tests/stack_limit/stack_limit_008.phpt index 9609667bf3be7..56ff6f18bdce6 100644 --- a/Zend/tests/stack_limit/stack_limit_008.phpt +++ b/Zend/tests/stack_limit/stack_limit_008.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 008 - Exception handling +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_009.phpt b/Zend/tests/stack_limit/stack_limit_009.phpt index b0567336b55c3..f17ecb5ede2e8 100644 --- a/Zend/tests/stack_limit/stack_limit_009.phpt +++ b/Zend/tests/stack_limit/stack_limit_009.phpt @@ -2,6 +2,7 @@ Stack limit 009 - Check that we can actually use all the stack --SKIPIF-- --EXTENSIONS-- diff --git a/Zend/tests/stack_limit/stack_limit_010.phpt b/Zend/tests/stack_limit/stack_limit_010.phpt index c9ca8c7d7f743..312c2cf551696 100644 --- a/Zend/tests/stack_limit/stack_limit_010.phpt +++ b/Zend/tests/stack_limit/stack_limit_010.phpt @@ -4,6 +4,7 @@ Stack limit 010 - Check stack size detection against known defaults zend_test --SKIPIF-- --FILE-- diff --git a/Zend/tests/stack_limit/stack_limit_011.phpt b/Zend/tests/stack_limit/stack_limit_011.phpt index 3c5daf59f6b66..6155525675c32 100644 --- a/Zend/tests/stack_limit/stack_limit_011.phpt +++ b/Zend/tests/stack_limit/stack_limit_011.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 011 - Stack limit exhaustion during unwinding +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- diff --git a/Zend/tests/stack_limit/stack_limit_012.phpt b/Zend/tests/stack_limit/stack_limit_012.phpt index c4920a928d62b..ed5189f37cad3 100644 --- a/Zend/tests/stack_limit/stack_limit_012.phpt +++ b/Zend/tests/stack_limit/stack_limit_012.phpt @@ -1,5 +1,9 @@ --TEST-- Stack limit 012 - Stack limit exhaustion during unwinding +--SKIPIF-- + --EXTENSIONS-- zend_test --INI-- From 3197104e85957b8debb8d49a7e224618055da4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 24 Jan 2023 19:00:41 +0100 Subject: [PATCH 301/895] Fix GH-10292 1st param of mt_srand() has UNKNOWN default on PHP <8.3 Closes GH-10429 --- NEWS | 4 ++++ ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 4 ++-- ext/standard/tests/general_functions/rand.phpt | 13 +++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 436d8faf46dce..d1836167d7f17 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ PHP NEWS - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) +- Standard: + . Fixed bug GH-10292 (Made the default value of the first param of srand() and + mt_srand() unknown). (kocsismate) + 02 Feb 2023, PHP 8.1.15 - Apache: diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 3a5f482456666..5c46718652ee3 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1548,10 +1548,10 @@ function quoted_printable_encode(string $string): string {} /* mt_rand.c */ -function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} +function mt_srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937): void {} /** @alias mt_srand */ -function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} +function srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937): void {} function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 693b2644cbf5b..2f93d91d4960e 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 87ed2b04b9b46ce3df78d6f9d6d62bd6b2ae8fe5 */ + * Stub hash: eb6a3a2e3cf8f62e768d5d4968606438819e6cf0 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1813,7 +1813,7 @@ ZEND_END_ARG_INFO() #define arginfo_quoted_printable_encode arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_srand, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, seed, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MT_RAND_MT19937") ZEND_END_ARG_INFO() diff --git a/ext/standard/tests/general_functions/rand.phpt b/ext/standard/tests/general_functions/rand.phpt index 73dec4eb75ff1..409108914fb86 100644 --- a/ext/standard/tests/general_functions/rand.phpt +++ b/ext/standard/tests/general_functions/rand.phpt @@ -13,10 +13,21 @@ var_dump(rand(0,3)); var_dump(srand()); var_dump(srand(-1)); +try { + srand(mode: MT_RAND_MT19937); +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} var_dump(mt_srand()); var_dump(mt_srand(-1)); +try { + mt_srand(mode: MT_RAND_MT19937); +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} + var_dump(getrandmax()); var_dump(mt_getrandmax()); @@ -32,8 +43,10 @@ int(%i) int(%d) NULL NULL +srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known NULL NULL +mt_srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known int(%d) int(%d) Done From 016160800cadce926392ab6900c859fd20dbc74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 24 Jan 2023 22:26:52 +0100 Subject: [PATCH 302/895] Fix GH-10259 ReflectionClass::getStaticProperties doesn't need null return type (#10418) --- NEWS | 2 ++ UPGRADING | 3 +++ ext/reflection/php_reflection.stub.php | 2 +- ext/reflection/php_reflection_arginfo.h | 5 ++--- ext/reflection/tests/ReflectionClass_toString_001.phpt | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index b003b2d1f83b8..d5e883d9d7745 100644 --- a/NEWS +++ b/NEWS @@ -86,6 +86,8 @@ PHP NEWS - Reflection: . Fix GH-9470 (ReflectionMethod constructor should not find private parent method). (ilutov) + . Fix GH-10259 (ReflectionClass::getStaticProperties doesn't need null return + type). (kocsismate) - Sockets: . Added SO_ATTACH_REUSEPORT_CBPF socket option, to give tighter control diff --git a/UPGRADING b/UPGRADING index 9c397944a6dfd..93cbbde3eb43b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -96,6 +96,9 @@ PHP 8.3 UPGRADE NOTES a random seed, 0 will use zero as the seed. The functions are now consistent with Mt19937::__construct(). +- Reflection: + . Return type of ReflectionClass::getStaticProperties() is no longer nullable. + - Sockets: . Added socket_atmark to checks if the socket is OOB marked. diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 22223bb0a1c3f..25eeb73af8822 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -404,7 +404,7 @@ public function getParentClass(): ReflectionClass|false {} public function isSubclassOf(ReflectionClass|string $class): bool {} /** @tentative-return-type */ - public function getStaticProperties(): ?array {} + public function getStaticProperties(): array {} /** @tentative-return-type */ public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN): mixed {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 92f37a67510ef..78f64f20a2098 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a531c9132b4ac3d3196570ae6dda52b8f6a4f488 */ + * Stub hash: 0b548ff454b1a3deb531092355c456f5dd62d97c */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -288,8 +288,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionClass_ ZEND_ARG_OBJ_TYPE_MASK(0, class, ReflectionClass, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionClass_getStaticProperties, 0, 0, IS_ARRAY, 1) -ZEND_END_ARG_INFO() +#define arginfo_class_ReflectionClass_getStaticProperties arginfo_class_ReflectionFunctionAbstract_getParameters ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionClass_getStaticPropertyValue, 0, 1, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 3b2c276ebc071..15059211ef01d 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -349,7 +349,7 @@ Class [ class ReflectionClass implements Stringable, Refle - Parameters [0] { } - - Tentative return [ ?array ] + - Tentative return [ array ] } Method [ public method getStaticPropertyValue ] { From 40da9961f20fafc9ac5322c7700f451fe3568891 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 24 Jan 2023 23:19:21 +0100 Subject: [PATCH 303/895] [ci skip] NEWS (#10442) --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index d1836167d7f17..ebd284b87f2f6 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,10 @@ PHP NEWS - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) + . Fixed incorrect check condition in type inference. (nielsdos) + +- FFI: + . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) - Standard: . Fixed bug GH-10292 (Made the default value of the first param of srand() and From b7a158a19bc7939d6c73f6c95d2e44ac964ba52d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 23 Jan 2023 22:11:08 +0100 Subject: [PATCH 304/895] Fix incorrect page_size check The current check always evaluated to false because if `!page_size` is true, then `page_size & (page_size - 1)` equals `0 & (0 - 1)` which is always 0. The if condition is meant to check if page_size is zero or not a power of two, thus we must change the AND to an OR to fix this issue. Closes GH-10427 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/opcache/ZendAccelerator.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ebd284b87f2f6..f7eaef0535599 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) +- Opcache: + . Fix incorrect page_size check. (nielsdos) + - Standard: . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 99bb33573f3b2..1ffd6cb3e5d46 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3197,7 +3197,7 @@ static zend_result accel_post_startup(void) size_t page_size; page_size = zend_get_page_size(); - if (!page_size && (page_size & (page_size - 1))) { + if (!page_size || (page_size & (page_size - 1))) { zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - can't get page size."); abort(); } From a8c8fb2564f46be7832f994717b0b4653bdf744a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 21 Jan 2023 13:50:36 +0100 Subject: [PATCH 305/895] Fix incorrect check in cs_8559_5 in map_from_unicode() The condition `code == 0x0450 || code == 0x045D` is always false because of an incorrect range check on code. According to the BMP coverage in the encoding spec for ISO-8859-5 (https://encoding.spec.whatwg.org/iso-8859-5-bmp.html) the range of valid characters is 0x0401 - 0x045F (except for 0x040D, 0x0450, 0x045D). The current check has an upper bound of 0x044F instead of 0x045F. Fix this by changing the upper bound. Closes GH-10399 Signed-off-by: George Peter Banyard --- NEWS | 1 + ext/standard/html.c | 2 +- .../strings/html_entity_decode_iso8859-5.phpt | 28 +++++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index f7eaef0535599..d8028bf92a63c 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS - Standard: . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) + . Fix incorrect check in cs_8559_5 in map_from_unicode(). (nielsdos) 02 Feb 2023, PHP 8.1.15 diff --git a/ext/standard/html.c b/ext/standard/html.c index b93ce95df1900..14ccd71a2368c 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -477,7 +477,7 @@ static inline int map_from_unicode(unsigned code, enum entity_charset charset, u *res = 0xF0; /* numero sign */ } else if (code == 0xA7) { *res = 0xFD; /* section sign */ - } else if (code >= 0x0401 && code <= 0x044F) { + } else if (code >= 0x0401 && code <= 0x045F) { if (code == 0x040D || code == 0x0450 || code == 0x045D) return FAILURE; *res = code - 0x360; diff --git a/ext/standard/tests/strings/html_entity_decode_iso8859-5.phpt b/ext/standard/tests/strings/html_entity_decode_iso8859-5.phpt index 46e6dc4dfe3c8..0616827c54853 100644 --- a/ext/standard/tests/strings/html_entity_decode_iso8859-5.phpt +++ b/ext/standard/tests/strings/html_entity_decode_iso8859-5.phpt @@ -358,47 +358,47 @@ CYRILLIC SMALL LETTER YA: я => ef NUMERO SIGN: № => f0 ð => ð -CYRILLIC SMALL LETTER IO: ё => 2623783435313b +CYRILLIC SMALL LETTER IO: ё => f1 ñ => ñ -CYRILLIC SMALL LETTER DJE: ђ => 2623783435323b +CYRILLIC SMALL LETTER DJE: ђ => f2 ò => ò -CYRILLIC SMALL LETTER GJE: ѓ => 2623783435333b +CYRILLIC SMALL LETTER GJE: ѓ => f3 ó => ó -CYRILLIC SMALL LETTER UKRAINIAN IE: є => 2623783435343b +CYRILLIC SMALL LETTER UKRAINIAN IE: є => f4 ô => ô -CYRILLIC SMALL LETTER DZE: ѕ => 2623783435353b +CYRILLIC SMALL LETTER DZE: ѕ => f5 õ => õ -CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I: і => 2623783435363b +CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I: і => f6 ö => ö -CYRILLIC SMALL LETTER YI: ї => 2623783435373b +CYRILLIC SMALL LETTER YI: ї => f7 ÷ => ÷ -CYRILLIC SMALL LETTER JE: ј => 2623783435383b +CYRILLIC SMALL LETTER JE: ј => f8 ø => ø -CYRILLIC SMALL LETTER LJE: љ => 2623783435393b +CYRILLIC SMALL LETTER LJE: љ => f9 ù => ù -CYRILLIC SMALL LETTER NJE: њ => 2623783435413b +CYRILLIC SMALL LETTER NJE: њ => fa ú => ú -CYRILLIC SMALL LETTER TSHE: ћ => 2623783435423b +CYRILLIC SMALL LETTER TSHE: ћ => fb û => û -CYRILLIC SMALL LETTER KJE: ќ => 2623783435433b +CYRILLIC SMALL LETTER KJE: ќ => fc ü => ü SECTION SIGN: § => fd ý => ý -CYRILLIC SMALL LETTER SHORT U: ў => 2623783435453b +CYRILLIC SMALL LETTER SHORT U: ў => fe þ => þ -CYRILLIC SMALL LETTER DZHE: џ => 2623783435463b +CYRILLIC SMALL LETTER DZHE: џ => ff ÿ => ÿ From 972c74c300368caa614a78dbeb1d272760354538 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 22 Jan 2023 21:51:52 +0100 Subject: [PATCH 306/895] Fix incorrect check in zend_internal_call_should_throw() This debug code is part of arginfo validation. This validation will never trigger properly because the OR operation makes the first if always true. Fix it by changing to an AND. Closes GH-10417 Signed-off-by: George Peter Banyard --- NEWS | 1 + Zend/zend_execute.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b2abc9d506dda..b1abfcaf440f0 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) . Fixed incorrect check condition in type inference. (nielsdos) + . Fix incorrect check in zend_internal_call_should_throw(). (nielsdos) - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index de32aab8af94b..14d52e70be8e5 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1210,7 +1210,7 @@ static zend_never_inline ZEND_ATTRIBUTE_UNUSED bool zend_verify_internal_arg_typ * trust that arginfo matches what is enforced by zend_parse_parameters. */ ZEND_API bool zend_internal_call_should_throw(zend_function *fbc, zend_execute_data *call) { - if (fbc->internal_function.handler == ZEND_FN(pass) || (fbc->internal_function.fn_flags | ZEND_ACC_FAKE_CLOSURE)) { + if (fbc->internal_function.handler == ZEND_FN(pass) || (fbc->internal_function.fn_flags & ZEND_ACC_FAKE_CLOSURE)) { /* Be lenient about the special pass function and about fake closures. */ return 0; } From 6c8ef1d99797a820f279c67a0ec583aa1e6b6a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 25 Jan 2023 09:15:48 +0100 Subject: [PATCH 307/895] random: Reduce variable scopes in CSPRNG (#10426) * random: Convert the urandom loop into a while() loop This allows us to more easily reduce the scope of `n` in a future commit and now matches the getrandom(2) loop. * random: Move the errno reset immediately above the getrandom(2) call * random: Reduce the scope of `n` in the CSPRNG * random: Declare `n` outside of preprocessor branch --- ext/random/random.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ext/random/random.c b/ext/random/random.c index cf2bf81e566fc..83b9f2b698a6c 100644 --- a/ext/random/random.c +++ b/ext/random/random.c @@ -517,7 +517,6 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) arc4random_buf(bytes, size); #else size_t read_bytes = 0; - ssize_t n; # if (defined(__linux__) && defined(SYS_getrandom)) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || \ defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) /* Linux getrandom(2) syscall or FreeBSD/DragonFlyBSD/NetBSD getrandom(2) function @@ -525,8 +524,6 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) * compared to the arc4random api albeit a fallback to /dev/urandom is considered. */ while (read_bytes < size) { - errno = 0; - /* Below, (bytes + read_bytes) is pointer arithmetic. bytes read_bytes size @@ -536,6 +533,9 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) amount_to_read */ size_t amount_to_read = size - read_bytes; + ssize_t n; + + errno = 0; # if defined(__linux__) n = syscall(SYS_getrandom, bytes + read_bytes, amount_to_read, 0); # else @@ -605,9 +605,10 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) RANDOM_G(random_fd) = fd; } - for (read_bytes = 0; read_bytes < size; read_bytes += (size_t) n) { + read_bytes = 0; + while (read_bytes < size) { errno = 0; - n = read(fd, bytes + read_bytes, size - read_bytes); + ssize_t n = read(fd, bytes + read_bytes, size - read_bytes); if (n <= 0) { if (should_throw) { @@ -619,6 +620,8 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) } return FAILURE; } + + read_bytes += (size_t) n; } } #endif From f6fc0fd97b9dc0138f28df6d4dbf361f8efafb07 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 25 Jan 2023 12:10:19 +0300 Subject: [PATCH 308/895] Add missing type guard --- ext/opcache/jit/zend_jit_trace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 6ac93fe95bbf5..2fc623a6c9a18 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -6557,6 +6557,16 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par for (i = 0; i < op_array->last_var; i++,j++) { if (ra[j] && (ra[j]->flags & ZREG_LOAD) != 0) { + if ((ssa->var_info[j].type & MAY_BE_GUARD) != 0) { + uint8_t op_type; + + ssa->var_info[j].type &= ~MAY_BE_GUARD; + op_type = concrete_type(ssa->var_info[j].type); + if (!zend_jit_type_guard(&dasm_state, opline, EX_NUM_TO_VAR(i), op_type)) { + goto jit_failure; + } + SET_STACK_TYPE(stack, i, op_type, 1); + } SET_STACK_REG_EX(stack, i, ra[j]->reg, ZREG_LOAD); if (!zend_jit_load_var(&dasm_state, ssa->var_info[j].type, i, ra[j]->reg)) { goto jit_failure; From 639bfbc21766e622eae6228a33b26cc2926e18e9 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 25 Jan 2023 10:48:36 +0000 Subject: [PATCH 309/895] Sync timelib to 2022.05 to address OSS Fuzzer issues --- ext/date/lib/parse_date.c | 213 +++++++++++++++++++------------------ ext/date/lib/parse_date.re | 9 +- ext/date/lib/timelib.h | 9 +- 3 files changed, 123 insertions(+), 108 deletions(-) diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 63411f5123ae0..5a44e1c4497dc 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,9 +1,9 @@ -/* Generated by re2c 0.15.3 on Tue Jan 10 15:16:26 2023 */ +/* Generated by re2c 0.15.3 on Wed Jan 25 10:49:23 2023 */ #line 1 "ext/date/lib/parse_date.re" /* * The MIT License (MIT) * - * Copyright (c) 2015-2019 Derick Rethans + * Copyright (c) 2015-2023 Derick Rethans * Copyright (c) 2018 MongoDB, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -29,6 +29,7 @@ #include "timelib_private.h" #include +#include #include #include #include @@ -582,7 +583,13 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l ++len; } + errno = 0; tmp_nr = strtoll(str, NULL, 10); + if (errno == ERANGE) { + timelib_free(str); + add_error(s, TIMELIB_ERR_NUMBER_OUT_OF_RANGE, "Number out of range"); + return 0; + } timelib_free(str); @@ -984,11 +991,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) std: s->tok = cursor; s->len = 0; -#line 1115 "ext/date/lib/parse_date.re" +#line 1122 "ext/date/lib/parse_date.re" -#line 992 "" +#line 999 "" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1126,7 +1133,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy3: YYDEBUG(3, *YYCURSOR); -#line 1849 "ext/date/lib/parse_date.re" +#line 1856 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -1139,7 +1146,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 1143 "" +#line 1150 "" yy4: YYDEBUG(4, *YYCURSOR); yych = *++YYCURSOR; @@ -1446,12 +1453,12 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy1483; yy12: YYDEBUG(12, *YYCURSOR); -#line 1944 "ext/date/lib/parse_date.re" +#line 1951 "ext/date/lib/parse_date.re" { add_error(s, TIMELIB_ERR_UNEXPECTED_CHARACTER, "Unexpected character"); goto std; } -#line 1455 "" +#line 1462 "" yy13: YYDEBUG(13, *YYCURSOR); yych = *++YYCURSOR; @@ -2695,11 +2702,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy54; yy49: YYDEBUG(49, *YYCURSOR); -#line 1933 "ext/date/lib/parse_date.re" +#line 1940 "ext/date/lib/parse_date.re" { goto std; } -#line 2703 "" +#line 2710 "" yy50: YYDEBUG(50, *YYCURSOR); yych = *++YYCURSOR; @@ -2708,12 +2715,12 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(51, *YYCURSOR); ++YYCURSOR; YYDEBUG(52, *YYCURSOR); -#line 1938 "ext/date/lib/parse_date.re" +#line 1945 "ext/date/lib/parse_date.re" { s->pos = cursor; s->line++; goto std; } -#line 2717 "" +#line 2724 "" yy53: YYDEBUG(53, *YYCURSOR); yych = *++YYCURSOR; @@ -3135,7 +3142,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych == 's') goto yy85; yy84: YYDEBUG(84, *YYCURSOR); -#line 1917 "ext/date/lib/parse_date.re" +#line 1924 "ext/date/lib/parse_date.re" { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -3150,7 +3157,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 3154 "" +#line 3161 "" yy85: YYDEBUG(85, *YYCURSOR); yych = *++YYCURSOR; @@ -4159,7 +4166,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy219: YYDEBUG(219, *YYCURSOR); -#line 1780 "ext/date/lib/parse_date.re" +#line 1787 "ext/date/lib/parse_date.re" { const timelib_relunit* relunit; DEBUG_OUTPUT("daytext"); @@ -4176,7 +4183,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_WEEKDAY; } -#line 4180 "" +#line 4187 "" yy220: YYDEBUG(220, *YYCURSOR); yych = *++YYCURSOR; @@ -4722,7 +4729,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy248: YYDEBUG(248, *YYCURSOR); -#line 1839 "ext/date/lib/parse_date.re" +#line 1846 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("monthtext"); TIMELIB_INIT; @@ -4731,7 +4738,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4735 "" +#line 4742 "" yy249: YYDEBUG(249, *YYCURSOR); ++YYCURSOR; @@ -4980,7 +4987,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) goto yy267; yy262: YYDEBUG(262, *YYCURSOR); -#line 1585 "ext/date/lib/parse_date.re" +#line 1592 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); @@ -4993,7 +5000,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4997 "" +#line 5004 "" yy263: YYDEBUG(263, *YYCURSOR); yyaccept = 6; @@ -5120,7 +5127,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy276: YYDEBUG(276, *YYCURSOR); -#line 1887 "ext/date/lib/parse_date.re" +#line 1894 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); @@ -5149,7 +5156,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 5153 "" +#line 5160 "" yy277: YYDEBUG(277, *YYCURSOR); yyaccept = 7; @@ -5447,7 +5454,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(300, *YYCURSOR); ++YYCURSOR; YYDEBUG(301, *YYCURSOR); -#line 1863 "ext/date/lib/parse_date.re" +#line 1870 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -5470,7 +5477,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 5474 "" +#line 5481 "" yy302: YYDEBUG(302, *YYCURSOR); yych = *++YYCURSOR; @@ -6148,7 +6155,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(362, *YYCURSOR); ++YYCURSOR; YYDEBUG(363, *YYCURSOR); -#line 1557 "ext/date/lib/parse_date.re" +#line 1564 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenoday"); @@ -6161,7 +6168,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 6165 "" +#line 6172 "" yy364: YYDEBUG(364, *YYCURSOR); yych = *++YYCURSOR; @@ -6392,7 +6399,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy372; yy371: YYDEBUG(371, *YYCURSOR); -#line 1701 "ext/date/lib/parse_date.re" +#line 1708 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextshort"); @@ -6405,7 +6412,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 6409 "" +#line 6416 "" yy372: YYDEBUG(372, *YYCURSOR); yych = *++YYCURSOR; @@ -6987,7 +6994,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy398: YYDEBUG(398, *YYCURSOR); -#line 1759 "ext/date/lib/parse_date.re" +#line 1766 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7007,7 +7014,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 7011 "" +#line 7018 "" yy399: YYDEBUG(399, *YYCURSOR); yyaccept = 5; @@ -8796,7 +8803,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy461: YYDEBUG(461, *YYCURSOR); -#line 1450 "ext/date/lib/parse_date.re" +#line 1457 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -8807,7 +8814,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 8811 "" +#line 8818 "" yy462: YYDEBUG(462, *YYCURSOR); yych = *++YYCURSOR; @@ -8929,7 +8936,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(484, *YYCURSOR); ++YYCURSOR; YYDEBUG(485, *YYCURSOR); -#line 1476 "ext/date/lib/parse_date.re" +#line 1483 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601datex"); TIMELIB_INIT; @@ -8940,7 +8947,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 8944 "" +#line 8951 "" yy486: YYDEBUG(486, *YYCURSOR); yyaccept = 1; @@ -9694,7 +9701,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy509: YYDEBUG(509, *YYCURSOR); -#line 1599 "ext/date/lib/parse_date.re" +#line 1606 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -9705,7 +9712,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 9709 "" +#line 9716 "" yy510: YYDEBUG(510, *YYCURSOR); yyaccept = 9; @@ -9846,7 +9853,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(521, *YYCURSOR); ++YYCURSOR; YYDEBUG(522, *YYCURSOR); -#line 1303 "ext/date/lib/parse_date.re" +#line 1310 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -9862,7 +9869,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 9866 "" +#line 9873 "" yy523: YYDEBUG(523, *YYCURSOR); yyaccept = 10; @@ -9875,7 +9882,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy524: YYDEBUG(524, *YYCURSOR); -#line 1340 "ext/date/lib/parse_date.re" +#line 1347 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("timetiny24 | timeshort24 | timelong24 | iso8601long"); @@ -9902,7 +9909,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 9906 "" +#line 9913 "" yy525: YYDEBUG(525, *YYCURSOR); yyaccept = 10; @@ -10215,7 +10222,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(556, *YYCURSOR); ++YYCURSOR; YYDEBUG(557, *YYCURSOR); -#line 1320 "ext/date/lib/parse_date.re" +#line 1327 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -10234,7 +10241,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 10238 "" +#line 10245 "" yy558: YYDEBUG(558, *YYCURSOR); yyaccept = 10; @@ -10340,7 +10347,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy574; yy568: YYDEBUG(568, *YYCURSOR); -#line 1516 "ext/date/lib/parse_date.re" +#line 1523 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datefull"); @@ -10354,7 +10361,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 10358 "" +#line 10365 "" yy569: YYDEBUG(569, *YYCURSOR); yych = *++YYCURSOR; @@ -11090,7 +11097,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(639, *YYCURSOR); ++YYCURSOR; YYDEBUG(640, *YYCURSOR); -#line 1531 "ext/date/lib/parse_date.re" +#line 1538 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -11101,7 +11108,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 11105 "" +#line 11112 "" yy641: YYDEBUG(641, *YYCURSOR); yyaccept = 10; @@ -11137,7 +11144,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy638; yy645: YYDEBUG(645, *YYCURSOR); -#line 1543 "ext/date/lib/parse_date.re" +#line 1550 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pointed date YY"); @@ -11150,7 +11157,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 11154 "" +#line 11161 "" yy646: YYDEBUG(646, *YYCURSOR); yyaccept = 10; @@ -11791,7 +11798,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy690: YYDEBUG(690, *YYCURSOR); -#line 1502 "ext/date/lib/parse_date.re" +#line 1509 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshort"); @@ -11804,7 +11811,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 11808 "" +#line 11815 "" yy691: YYDEBUG(691, *YYCURSOR); yyaccept = 12; @@ -11910,7 +11917,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy700: YYDEBUG(700, *YYCURSOR); -#line 1434 "ext/date/lib/parse_date.re" +#line 1441 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("americanshort | american"); @@ -11925,7 +11932,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 11929 "" +#line 11936 "" yy701: YYDEBUG(701, *YYCURSOR); yyaccept = 13; @@ -12159,7 +12166,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= ':') goto yy737; yy734: YYDEBUG(734, *YYCURSOR); -#line 1729 "ext/date/lib/parse_date.re" +#line 1736 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -12179,7 +12186,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 12183 "" +#line 12190 "" yy735: YYDEBUG(735, *YYCURSOR); yyaccept = 14; @@ -12799,7 +12806,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy808: YYDEBUG(808, *YYCURSOR); -#line 1462 "ext/date/lib/parse_date.re" +#line 1469 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("iso8601date2"); @@ -12812,7 +12819,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 12816 "" +#line 12823 "" yy809: YYDEBUG(809, *YYCURSOR); yych = *++YYCURSOR; @@ -12851,7 +12858,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(815, *YYCURSOR); ++YYCURSOR; YYDEBUG(816, *YYCURSOR); -#line 1715 "ext/date/lib/parse_date.re" +#line 1722 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextreverse"); @@ -12864,7 +12871,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 12868 "" +#line 12875 "" yy817: YYDEBUG(817, *YYCURSOR); yych = *++YYCURSOR; @@ -13029,7 +13036,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy828: YYDEBUG(828, *YYCURSOR); -#line 1750 "ext/date/lib/parse_date.re" +#line 1757 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -13037,7 +13044,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 13041 "" +#line 13048 "" yy829: YYDEBUG(829, *YYCURSOR); yych = *++YYCURSOR; @@ -13242,7 +13249,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy838: YYDEBUG(838, *YYCURSOR); -#line 1571 "ext/date/lib/parse_date.re" +#line 1578 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenodayrev"); @@ -13255,7 +13262,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 13259 "" +#line 13266 "" yy839: YYDEBUG(839, *YYCURSOR); yych = *++YYCURSOR; @@ -13476,7 +13483,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '7') goto yy861; yy859: YYDEBUG(859, *YYCURSOR); -#line 1682 "ext/date/lib/parse_date.re" +#line 1689 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -13494,7 +13501,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13498 "" +#line 13505 "" yy860: YYDEBUG(860, *YYCURSOR); yych = *++YYCURSOR; @@ -13504,7 +13511,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(861, *YYCURSOR); ++YYCURSOR; YYDEBUG(862, *YYCURSOR); -#line 1663 "ext/date/lib/parse_date.re" +#line 1670 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -13522,7 +13529,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13526 "" +#line 13533 "" yy863: YYDEBUG(863, *YYCURSOR); yych = *++YYCURSOR; @@ -13594,7 +13601,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy866: YYDEBUG(866, *YYCURSOR); -#line 1649 "ext/date/lib/parse_date.re" +#line 1656 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgydotd"); @@ -13607,7 +13614,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 13611 "" +#line 13618 "" yy867: YYDEBUG(867, *YYCURSOR); yych = *++YYCURSOR; @@ -13710,7 +13717,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy887: YYDEBUG(887, *YYCURSOR); -#line 1623 "ext/date/lib/parse_date.re" +#line 1630 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -13735,7 +13742,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 13739 "" +#line 13746 "" yy888: YYDEBUG(888, *YYCURSOR); yych = *++YYCURSOR; @@ -14031,7 +14038,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy893: YYDEBUG(893, *YYCURSOR); -#line 1611 "ext/date/lib/parse_date.re" +#line 1618 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -14042,7 +14049,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 14046 "" +#line 14053 "" yy894: YYDEBUG(894, *YYCURSOR); yych = *++YYCURSOR; @@ -14964,7 +14971,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1018: YYDEBUG(1018, *YYCURSOR); -#line 1488 "ext/date/lib/parse_date.re" +#line 1495 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshorter"); @@ -14977,7 +14984,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 14981 "" +#line 14988 "" yy1019: YYDEBUG(1019, *YYCURSOR); yyaccept = 22; @@ -16185,7 +16192,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1127: YYDEBUG(1127, *YYCURSOR); -#line 1368 "ext/date/lib/parse_date.re" +#line 1375 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -16207,7 +16214,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 16211 "" +#line 16218 "" yy1128: YYDEBUG(1128, *YYCURSOR); yych = *++YYCURSOR; @@ -16307,7 +16314,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1135: YYDEBUG(1135, *YYCURSOR); -#line 1414 "ext/date/lib/parse_date.re" +#line 1421 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -16326,7 +16333,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 16330 "" +#line 16337 "" yy1136: YYDEBUG(1136, *YYCURSOR); yyaccept = 25; @@ -17302,7 +17309,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1179: YYDEBUG(1179, *YYCURSOR); -#line 1822 "ext/date/lib/parse_date.re" +#line 1829 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -17318,7 +17325,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 17322 "" +#line 17329 "" yy1180: YYDEBUG(1180, *YYCURSOR); ++YYCURSOR; @@ -17384,7 +17391,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1188, *YYCURSOR); ++YYCURSOR; YYDEBUG(1189, *YYCURSOR); -#line 1281 "ext/date/lib/parse_date.re" +#line 1288 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -17405,7 +17412,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -#line 17409 "" +#line 17416 "" yy1190: YYDEBUG(1190, *YYCURSOR); yyaccept = 26; @@ -17545,7 +17552,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1206: YYDEBUG(1206, *YYCURSOR); -#line 1798 "ext/date/lib/parse_date.re" +#line 1805 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -17568,7 +17575,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 17572 "" +#line 17579 "" yy1207: YYDEBUG(1207, *YYCURSOR); yych = *++YYCURSOR; @@ -20517,7 +20524,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1388: YYDEBUG(1388, *YYCURSOR); -#line 1258 "ext/date/lib/parse_date.re" +#line 1265 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -20539,7 +20546,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 20543 "" +#line 20550 "" yy1389: YYDEBUG(1389, *YYCURSOR); yyaccept = 28; @@ -20838,7 +20845,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1410, *YYCURSOR); ++YYCURSOR; YYDEBUG(1411, *YYCURSOR); -#line 1241 "ext/date/lib/parse_date.re" +#line 1248 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("firstdayof | lastdayof"); TIMELIB_INIT; @@ -20854,7 +20861,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 20858 "" +#line 20865 "" yy1412: YYDEBUG(1412, *YYCURSOR); yyaccept = 1; @@ -22376,7 +22383,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy1483; yy1485: YYDEBUG(1485, *YYCURSOR); -#line 1175 "ext/date/lib/parse_date.re" +#line 1182 "ext/date/lib/parse_date.re" { timelib_ull i; @@ -22401,7 +22408,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22405 "" +#line 22412 "" yy1486: YYDEBUG(1486, *YYCURSOR); ++YYCURSOR; @@ -22409,7 +22416,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy1488; yy1487: YYDEBUG(1487, *YYCURSOR); -#line 1201 "ext/date/lib/parse_date.re" +#line 1208 "ext/date/lib/parse_date.re" { timelib_sll i; timelib_ull us; @@ -22448,7 +22455,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22452 "" +#line 22459 "" yy1488: YYDEBUG(1488, *YYCURSOR); yych = *++YYCURSOR; @@ -22917,7 +22924,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy1524: YYDEBUG(1524, *YYCURSOR); -#line 1163 "ext/date/lib/parse_date.re" +#line 1170 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -22928,7 +22935,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22932 "" +#line 22939 "" yy1525: YYDEBUG(1525, *YYCURSOR); yych = *++YYCURSOR; @@ -22963,7 +22970,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1527: YYDEBUG(1527, *YYCURSOR); -#line 1153 "ext/date/lib/parse_date.re" +#line 1160 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -22972,7 +22979,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22976 "" +#line 22983 "" yy1528: YYDEBUG(1528, *YYCURSOR); yych = *++YYCURSOR; @@ -25067,7 +25074,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1612: YYDEBUG(1612, *YYCURSOR); -#line 1132 "ext/date/lib/parse_date.re" +#line 1139 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -25075,7 +25082,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 25079 "" +#line 25086 "" yy1613: YYDEBUG(1613, *YYCURSOR); yych = *++YYCURSOR; @@ -25214,7 +25221,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1620: YYDEBUG(1620, *YYCURSOR); -#line 1141 "ext/date/lib/parse_date.re" +#line 1148 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -25225,7 +25232,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 25229 "" +#line 25236 "" yy1621: YYDEBUG(1621, *YYCURSOR); yyaccept = 1; @@ -25758,7 +25765,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy1643: YYDEBUG(1643, *YYCURSOR); -#line 1120 "ext/date/lib/parse_date.re" +#line 1127 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -25769,7 +25776,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 25773 "" +#line 25780 "" yy1644: YYDEBUG(1644, *YYCURSOR); yyaccept = 1; @@ -25942,7 +25949,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) goto yy1643; } } -#line 1948 "ext/date/lib/parse_date.re" +#line 1955 "ext/date/lib/parse_date.re" } diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 81dfcec8511af..1dcfdd8c91f05 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2015-2019 Derick Rethans + * Copyright (c) 2015-2023 Derick Rethans * Copyright (c) 2018 MongoDB, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -27,6 +27,7 @@ #include "timelib_private.h" #include +#include #include #include #include @@ -580,7 +581,13 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l ++len; } + errno = 0; tmp_nr = strtoll(str, NULL, 10); + if (errno == ERANGE) { + timelib_free(str); + add_error(s, TIMELIB_ERR_NUMBER_OUT_OF_RANGE, "Number out of range"); + return 0; + } timelib_free(str); diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 550015158c7d6..41321ee39824b 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2015-2022 Derick Rethans + * Copyright (c) 2015-2023 Derick Rethans * Copyright (c) 2018,2021 MongoDB, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -30,9 +30,9 @@ # include "timelib_config.h" #endif -#define TIMELIB_VERSION 202204 -#define TIMELIB_EXTENDED_VERSION 20220401 -#define TIMELIB_ASCII_VERSION "2022.04" +#define TIMELIB_VERSION 202205 +#define TIMELIB_EXTENDED_VERSION 20220501 +#define TIMELIB_ASCII_VERSION "2022.05" #include #include @@ -321,6 +321,7 @@ typedef struct _timelib_abbr_info { #define TIMELIB_ERR_INVALID_TZ_OFFSET 0x223 #define TIMELIB_ERR_FORMAT_LITERAL_MISMATCH 0x224 #define TIMELIB_ERR_MIX_ISO_WITH_NATURAL 0x225 +#define TIMELIB_ERR_NUMBER_OUT_OF_RANGE 0x226 #define TIMELIB_ZONETYPE_NONE 0 #define TIMELIB_ZONETYPE_OFFSET 1 From 90b0e779213de6aa6a500030f6da93d8d91cffbf Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 25 Jan 2023 19:51:22 +0000 Subject: [PATCH 310/895] GNU compilers remove hot attribute proposal. (#8922) While the cold attribute has its place, the hot one however does one have real justification for use, even more so with modern toolchains. --- Zend/zend_portability.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 87ab51724bb92..83b4079cb8309 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -265,7 +265,6 @@ char *alloca(); #if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003 # define ZEND_COLD __attribute__((cold)) -# define ZEND_HOT __attribute__((hot)) # ifdef __OPTIMIZE__ # define ZEND_OPT_SIZE __attribute__((optimize("Os"))) # define ZEND_OPT_SPEED __attribute__((optimize("Ofast"))) @@ -275,7 +274,6 @@ char *alloca(); # endif #else # define ZEND_COLD -# define ZEND_HOT # define ZEND_OPT_SIZE # define ZEND_OPT_SPEED #endif @@ -283,11 +281,9 @@ char *alloca(); #if defined(__GNUC__) && ZEND_GCC_VERSION >= 5000 # define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((unused)); # define ZEND_ATTRIBUTE_COLD_LABEL __attribute__((cold)); -# define ZEND_ATTRIBUTE_HOT_LABEL __attribute__((hot)); #else # define ZEND_ATTRIBUTE_UNUSED_LABEL # define ZEND_ATTRIBUTE_COLD_LABEL -# define ZEND_ATTRIBUTE_HOT_LABEL #endif #if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 && defined(__i386__) From fe9b622e7ad4e7d4c3321621cda1743f6b179332 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 25 Jan 2023 18:24:04 +0000 Subject: [PATCH 311/895] zend extension build warning fix. clang is more picky in this case but at least it makes it more consistent overall. --- Zend/zend_extensions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 1f3687642ab67..9dc0d2c616652 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -280,11 +280,11 @@ ZEND_API int zend_get_op_array_extension_handles(const char *module_name, int ha return handle; } -ZEND_API size_t zend_internal_run_time_cache_reserved_size() { +ZEND_API size_t zend_internal_run_time_cache_reserved_size(void) { return zend_op_array_extension_handles * sizeof(void *); } -ZEND_API void zend_init_internal_run_time_cache() { +ZEND_API void zend_init_internal_run_time_cache(void) { size_t rt_size = zend_internal_run_time_cache_reserved_size(); if (rt_size) { size_t functions = zend_hash_num_elements(CG(function_table)); From d14ed12783527c822d0ae1fbe31b90f6157fecfa Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Jan 2023 08:39:46 +0200 Subject: [PATCH 312/895] Adjust code to finish validating remaining 0-8 bytes at end of UTF-8 string This code is a few percent faster for short UTF-8 strings. For long (~10,000 byte) strings, it is also consistently faster on my local microbenchmarks, but by less than 1%. --- ext/mbstring/mbstring.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 964d459543efd..69100532e0b0c 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4728,8 +4728,9 @@ finish_up_remaining_bytes: ; if (p == e) { uint8_t remaining_bytes = ZSTR_LEN(str) & (sizeof(__m128i) - 1); /* Not including terminating null */ - /* Crazy hack here... we want to use the above vectorized code to check a block of less than 16 - * bytes, but there is no good way to read a variable number of bytes into an XMM register + /* Crazy hack here for cases where 9 or more bytes are remaining... + * We want to use the above vectorized code to check a block of less than 16 bytes, + * but there is no good way to read a variable number of bytes into an XMM register * However, we know that these bytes are part of a zend_string, and a zend_string has some * 'header' fields which occupy the memory just before its content * And, those header fields occupy more than 16 bytes... @@ -4744,20 +4745,17 @@ finish_up_remaining_bytes: ; * shift distance, so the compiler will choke on _mm_srli_si128(operand, shift_dist) */ switch (remaining_bytes) { - case 0: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 15)), 15); - goto check_operand; + case 0: ; + __m128i bad_mask = _mm_set_epi8(-64, -32, -16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); + __m128i bad = _mm_cmpeq_epi8(_mm_and_si128(last_block, bad_mask), bad_mask); + return _mm_movemask_epi8(bad) == 0; case 1: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 14)), 14); - goto check_operand; case 2: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 13)), 13); + operand = _mm_set_epi16(0, 0, 0, 0, 0, 0, 0, *((uint16_t*)p)); goto check_operand; case 3: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 12)), 12); - goto check_operand; case 4: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 11)), 11); + operand = _mm_set_epi32(0, 0, 0, *((uint32_t*)p)); goto check_operand; case 5: operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10); @@ -4766,10 +4764,8 @@ finish_up_remaining_bytes: ; operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 9)), 9); goto check_operand; case 7: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 8)), 8); - goto check_operand; case 8: - operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 7)), 7); + operand = _mm_set_epi64x(0, *((uint64_t*)p)); goto check_operand; case 9: operand = _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 6)), 6); From 63c50cc87e4eb4a22de054f836934e8a005739f8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Jan 2023 08:49:46 +0200 Subject: [PATCH 313/895] Add AVX2-accelerated version of mb_check_encoding for UTF-8 only From some local benchmarks which I ran, the AVX2-based version is about 2.8x faster than the SSE2-based version on long (~10,000 byte) strings, 1.6x faster on medium (~100 byte) strings, and just about the same on very short strings. I followed the example of the code in the 'standard' module, using preprocessor directives so that the code can be compiled in any of 4 ways: 1) With no AVX2 support at all (for example, when PHP is compiled for CPU architectures other than AMD64) 2) For CPUs with AVX2 only (for example, when PHP is built with CCFLAGS='-march=native' on a host which implements AVX2) 3) With runtime detection of AVX2 performed by the dynamic linker; this requires a dynamic linker which supports the STT_GNU_IFUNC symbol type extension to the ELF binary standard. This is true of glibc's dynamic linker, as of late 2009. 4) With runtime detection of AVX2 performed by the module init function. The detection is done by checking the output of CPUID and then a function pointer is set accordingly. In this case, all calls to the UTF-8 validation routine are indirect calls through that function pointer. --- ext/mbstring/mbstring.c | 376 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 372 insertions(+), 4 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 69100532e0b0c..ed5c3721eb748 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1034,6 +1034,10 @@ static PHP_GSHUTDOWN_FUNCTION(mbstring) } /* }}} */ +#ifdef ZEND_INTRIN_AVX2_FUNC_PTR +static void init_check_utf8(void); +#endif + /* {{{ PHP_MINIT_FUNCTION(mbstring) */ PHP_MINIT_FUNCTION(mbstring) { @@ -1074,6 +1078,10 @@ ZEND_TSRMLS_CACHE_UPDATE(); php_mb_rfc1867_getword_conf, php_mb_rfc1867_basename); +#ifdef ZEND_INTRIN_AVX2_FUNC_PTR + init_check_utf8(); +#endif + return SUCCESS; } /* }}} */ @@ -4605,9 +4613,14 @@ MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const return true; } -static bool mb_fast_check_utf8(zend_string *str) +/* If we are building an AVX2-only binary, don't compile the next function */ +#ifndef ZEND_INTRIN_AVX2_NATIVE + +/* SSE2-based function for validating UTF-8 strings + * A faster implementation which uses AVX2 instructions follows */ +static bool mb_fast_check_utf8_default(zend_string *str) { -#ifdef __SSE2__ +# ifdef __SSE2__ unsigned char *p = (unsigned char*)ZSTR_VAL(str); /* `e` points 1 byte past the last full 16-byte block of string content * Note that we include the terminating null byte which is included in each zend_string @@ -4723,7 +4736,7 @@ static bool mb_fast_check_utf8(zend_string *str) p += sizeof(__m128i); } -finish_up_remaining_bytes: ; +finish_up_remaining_bytes: /* Finish up 1-15 remaining bytes */ if (p == e) { uint8_t remaining_bytes = ZSTR_LEN(str) & (sizeof(__m128i) - 1); /* Not including terminating null */ @@ -4796,11 +4809,366 @@ finish_up_remaining_bytes: ; } return true; -#else +# else + /* No SSE2 support; we might add generic UTF-8 specific validation code here later */ return php_mb_check_encoding(ZSTR_VAL(str), ZSTR_LEN(str), &mbfl_encoding_utf8); +# endif +} + +#endif /* #ifndef ZEND_INTRIN_AVX2_NATIVE */ + +#ifdef ZEND_INTRIN_AVX2_NATIVE + +/* We are building AVX2-only binary */ +# include +# define mb_fast_check_utf8 mb_fast_check_utf8_avx2 + +#elif defined(ZEND_INTRIN_AVX2_RESOLVER) + +/* We are building binary which works with or without AVX2; whether or not to use + * AVX2-accelerated functions will be determined at runtime */ +# include +# include "Zend/zend_cpuinfo.h" + +# ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +/* Dynamic linker will decide whether or not to use AVX2-based functions and + * resolve symbols accordingly */ + +ZEND_INTRIN_AVX2_FUNC_DECL(bool mb_fast_check_utf8_avx2(zend_string *str)); + +bool mb_fast_check_utf8(zend_string *str) __attribute__((ifunc("resolve_check_utf8"))); + +typedef bool (*check_utf8_func_t)(zend_string*); + +ZEND_NO_SANITIZE_ADDRESS +ZEND_ATTRIBUTE_UNUSED +static check_utf8_func_t resolve_check_utf8(void) +{ + if (zend_cpu_supports_avx2()) { + return mb_fast_check_utf8_avx2; + } + return mb_fast_check_utf8_default; +} + +# else /* ZEND_INTRIN_AVX2_FUNC_PTR */ +/* We are compiling for a target where the dynamic linker will not be able to + * resolve symbols according to whether the host supports AVX2 or not; so instead, + * we can make calls go through a function pointer and set the function pointer + * on module load */ + +#ifdef HAVE_FUNC_ATTRIBUTE_TARGET +static bool mb_fast_check_utf8_avx2(zend_string *str) __attribute__((target("avx2"))); +#else +static bool mb_fast_check_utf8_avx2(zend_string *str); +#endif + +static bool (*check_utf8_ptr)(zend_string *str) = NULL; + +static bool mb_fast_check_utf8(zend_string *str) +{ + return check_utf8_ptr(str); +} + +static void init_check_utf8(void) +{ + if (zend_cpu_supports_avx2()) { + check_utf8_ptr = mb_fast_check_utf8_avx2; + } else { + check_utf8_ptr = mb_fast_check_utf8_default; + } +} +# endif + +#else + +/* No AVX2 support */ +#define mb_fast_check_utf8 mb_fast_check_utf8_default + #endif + +#if defined(ZEND_INTRIN_AVX2_NATIVE) || defined(ZEND_INTRIN_AVX2_RESOLVER) + +/* Take (256-bit) `hi` and `lo` as a 512-bit value, shift down by some + * number of bytes, then take the low 256 bits + * This is used to take some number of trailing bytes from the previous 32-byte + * block followed by some number of leading bytes from the current 32-byte block + * + * _mm256_alignr_epi8 (VPALIGNR) is used to shift out bytes from a 256-bit + * YMM register while shifting in bytes from another YMM register... but + * it works separately on respective 128-bit halves of the YMM registers, + * which is not what we want. + * To make it work as desired, we first do _mm256_permute2x128_si256 + * (VPERM2I128) to combine the low 128 bits from the previous block and + * the high 128 bits of the current block in one YMM register. + * Then VPALIGNR will do what is needed. */ +#define _mm256_shift_epi8(hi, lo, shift) _mm256_alignr_epi8(lo, _mm256_permute2x128_si256(hi, lo, 33), 16 - shift) + +/* AVX2-based UTF-8 validation function; validates text in 32-byte chunks + * + * Some parts of this function are the same as `mb_fast_check_utf8`; code comments + * are not repeated, so consult `mb_fast_check_utf8` for information on uncommented + * sections. */ +#ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +ZEND_API bool mb_fast_check_utf8_avx2(zend_string *str) +#else +static bool mb_fast_check_utf8_avx2(zend_string *str) +#endif +{ + unsigned char *p = (unsigned char*)ZSTR_VAL(str); + unsigned char *e = p + ((ZSTR_LEN(str) + 1) & ~(sizeof(__m256i) - 1)); + + /* The algorithm used here for UTF-8 validation is partially adapted from the + * paper "Validating UTF-8 In Less Than One Instruction Per Byte", by John Keiser + * and Daniel Lemire. + * Ref: https://arxiv.org/pdf/2010.03090.pdf + * + * Most types of invalid UTF-8 text can be detected by examining pairs of + * successive bytes. Specifically: + * + * • Overlong 2-byte code units start with 0xC0 or 0xC1. + * No valid UTF-8 string ever uses these byte values. + * • Overlong 3-byte code units start with 0xE0, followed by a byte < 0xA0. + * • Overlong 4-byte code units start with 0xF0, followed by a byte < 0x90. + * • 5-byte or 6-byte code units, which should never be used, start with + * 0xF8-FE. + * • A codepoint value higher than U+10FFFF, which is the highest value for + * any Unicode codepoint, would either start with 0xF4, followed by a + * byte >= 0x90, or else would start with 0xF5-F7, followed by any value. + * • A codepoint value from U+D800-DFFF, which are reserved and should never + * be used, would start with 0xED, followed by a byte >= 0xA0. + * • The byte value 0xFF is also illegal and is never used in valid UTF-8. + * + * To detect all these problems, for each pair of successive bytes, we do + * table lookups using the high nibble of the first byte, the low nibble of + * the first byte, and the high nibble of the second byte. Each table lookup + * retrieves a bitmask, in which each 1 bit indicates a possible invalid + * combination; AND those three bitmasks together, and any 1 bit in the result + * will indicate an actual invalid byte combination was found. + */ + +#define BAD_BYTE 0x1 +#define OVERLONG_2BYTE 0x2 +#define _1BYTE (BAD_BYTE | OVERLONG_2BYTE) +#define OVERLONG_3BYTE 0x4 +#define SURROGATE 0x8 +#define OVERLONG_4BYTE 0x10 +#define INVALID_CP 0x20 + + /* Each of these are 16-entry tables, repeated twice; this is required by the + * VPSHUFB instruction which we use to perform 32 table lookups in parallel + * The first entry is for 0xF, the second is for 0xE, and so on down to 0x0 + * + * So, for example, notice that the 4th entry in the 1st table is OVERLONG_2BYTE; + * that means that high nibble 0xC is consistent with the byte pair being part of + * an overlong 2-byte code unit */ + const __m256i bad_hi_nibble2 = _mm256_set_epi8( + BAD_BYTE | OVERLONG_4BYTE | INVALID_CP, OVERLONG_3BYTE | SURROGATE, 0, OVERLONG_2BYTE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + BAD_BYTE | OVERLONG_4BYTE | INVALID_CP, OVERLONG_3BYTE | SURROGATE, 0, OVERLONG_2BYTE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0); + const __m256i bad_lo_nibble2 = _mm256_set_epi8( + BAD_BYTE, BAD_BYTE, BAD_BYTE | SURROGATE, BAD_BYTE, + BAD_BYTE, BAD_BYTE, BAD_BYTE, BAD_BYTE, + BAD_BYTE, BAD_BYTE, BAD_BYTE, INVALID_CP, + 0, 0, OVERLONG_2BYTE, OVERLONG_2BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + BAD_BYTE, BAD_BYTE, BAD_BYTE | SURROGATE, BAD_BYTE, + BAD_BYTE, BAD_BYTE, BAD_BYTE, BAD_BYTE, + BAD_BYTE, BAD_BYTE, BAD_BYTE, INVALID_CP, + 0, 0, OVERLONG_2BYTE, OVERLONG_2BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE); + const __m256i bad_hi_nibble = _mm256_set_epi8( + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | OVERLONG_3BYTE | INVALID_CP, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | SURROGATE | INVALID_CP, _1BYTE | SURROGATE | INVALID_CP, + _1BYTE | OVERLONG_3BYTE | INVALID_CP, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, + _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE, _1BYTE | OVERLONG_3BYTE | OVERLONG_4BYTE); + + const __m256i find_continuation = _mm256_set1_epi8(-64); + const __m256i _b = _mm256_set1_epi8(0xB); + const __m256i _d = _mm256_set1_epi8(0xD); + const __m256i _f = _mm256_set1_epi8(0xF); + + __m256i last_hi_nibbles = _mm256_setzero_si256(), last_lo_nibbles = _mm256_setzero_si256(); + __m256i operand; + + while (p < e) { + operand = _mm256_loadu_si256((__m256i*)p); + +check_operand: + if (!_mm256_movemask_epi8(operand)) { + /* Entire 32-byte block is ASCII characters; the only thing we need to validate is that + * the previous block didn't end with an incomplete multi-byte character + * (This will also confirm that the previous block didn't end with a bad byte like 0xFF) */ + __m256i bad_mask = _mm256_set_epi8(0xB, 0xD, 0xE, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127); + __m256i bad = _mm256_cmpgt_epi8(last_hi_nibbles, bad_mask); + if (_mm256_movemask_epi8(bad)) { + return false; + } + + /* Consume as many full blocks of single-byte characters as we can */ + while (true) { + p += sizeof(__m256i); + if (p >= e) { + goto finish_up_remaining_bytes; + } + operand = _mm256_loadu_si256((__m256i*)p); + if (_mm256_movemask_epi8(operand)) { + break; + } + } + } + + __m256i hi_nibbles = _mm256_and_si256(_mm256_srli_epi16(operand, 4), _f); + __m256i lo_nibbles = _mm256_and_si256(operand, _f); + + __m256i lo_nibbles2 = _mm256_shift_epi8(last_lo_nibbles, lo_nibbles, 1); + __m256i hi_nibbles2 = _mm256_shift_epi8(last_hi_nibbles, hi_nibbles, 1); + + /* Do parallel table lookups in all 3 tables */ + __m256i bad = _mm256_cmpgt_epi8( + _mm256_and_si256( + _mm256_and_si256( + _mm256_shuffle_epi8(bad_lo_nibble2, lo_nibbles2), + _mm256_shuffle_epi8(bad_hi_nibble2, hi_nibbles2)), + _mm256_shuffle_epi8(bad_hi_nibble, hi_nibbles)), + _mm256_setzero_si256()); + + __m256i cont_mask = _mm256_cmpgt_epi8(hi_nibbles2, _b); + __m256i hi_nibbles3 = _mm256_shift_epi8(last_hi_nibbles, hi_nibbles, 2); + cont_mask = _mm256_or_si256(cont_mask, _mm256_cmpgt_epi8(hi_nibbles3, _d)); + __m256i hi_nibbles4 = _mm256_shift_epi8(last_hi_nibbles, hi_nibbles, 3); + cont_mask = _mm256_or_si256(cont_mask, _mm256_cmpeq_epi8(hi_nibbles4, _f)); + + __m256i continuation = _mm256_cmpgt_epi8(find_continuation, operand); + bad = _mm256_or_si256(bad, _mm256_xor_si256(continuation, cont_mask)); + + if (_mm256_movemask_epi8(bad)) { + return false; + } + + last_hi_nibbles = hi_nibbles; + last_lo_nibbles = lo_nibbles; + p += sizeof(__m256i); + } + +finish_up_remaining_bytes: + if (p == e) { + uint8_t remaining_bytes = ZSTR_LEN(str) & (sizeof(__m256i) - 1); /* Not including terminating null */ + + switch (remaining_bytes) { + case 0: ; + /* No actual data bytes are remaining */ + __m256i bad_mask = _mm256_set_epi8(0xB, 0xD, 0xE, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127); + __m256i bad = _mm256_cmpgt_epi8(last_hi_nibbles, bad_mask); + return _mm256_movemask_epi8(bad) == 0; + case 1: + case 2: + operand = _mm256_set_epi16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *((int16_t*)p)); + goto check_operand; + case 3: + case 4: + operand = _mm256_set_epi32(0, 0, 0, 0, 0, 0, 0, *((int32_t*)p)); + goto check_operand; + case 5: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10)); + goto check_operand; + case 6: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 9)), 9)); + goto check_operand; + case 7: + case 8: + operand = _mm256_set_epi64x(0, 0, 0, *((int64_t*)p)); + goto check_operand; + case 9: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 6)), 6)); + goto check_operand; + case 10: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 5)), 5)); + goto check_operand; + case 11: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 4)), 4)); + goto check_operand; + case 12: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 3)), 3)); + goto check_operand; + case 13: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 2)), 2)); + goto check_operand; + case 14: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 1)), 1)); + goto check_operand; + case 15: + case 16: + operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 17: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 2)), 14), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 18: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 3)), 13), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 19: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 4)), 12), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 20: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 5)), 11), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 21: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 6)), 10), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 22: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 7)), 9), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 23: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 8)), 8), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 24: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 9)), 7), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 25: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 10)), 6), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 26: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 11)), 5), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 27: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 12)), 4), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 28: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 13)), 3), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 29: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 14)), 2), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 30: + operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 15)), 1), _mm_loadu_si128((__m128i*)p)); + goto check_operand; + case 31: + return true; + } + + ZEND_UNREACHABLE(); + } + + return true; } +#endif /* defined(ZEND_INTRIN_AVX2_NATIVE) || defined(ZEND_INTRIN_AVX2_RESOLVER) */ + static bool mb_check_str_encoding(zend_string *str, const mbfl_encoding *encoding) { if (encoding == &mbfl_encoding_utf8) { From f56dc768907da98bfade4b38ff0200f4673b3111 Mon Sep 17 00:00:00 2001 From: K Date: Tue, 28 Sep 2021 14:43:56 +0200 Subject: [PATCH 314/895] [skip ci] Add explanatory comments to _zend_op structure Closes GH-7522 Signed-off-by: George Peter Banyard --- Zend/zend_compile.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index fa9e582869fbd..97b11cdb3034b 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -140,10 +140,10 @@ struct _zend_op { znode_op result; uint32_t extended_value; uint32_t lineno; - zend_uchar opcode; - zend_uchar op1_type; - zend_uchar op2_type; - zend_uchar result_type; + zend_uchar opcode; /* Opcodes defined in Zend/zend_vm_opcodes.h */ + zend_uchar op1_type; /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */ + zend_uchar op2_type; /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */ + zend_uchar result_type; /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */ }; From 02bd52b5a89567d9493624a1f8cf6b2b7bc2555d Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 20 Oct 2022 22:57:03 +0200 Subject: [PATCH 315/895] Implement dynamic class const fetch https://wiki.php.net/rfc/dynamic_class_constant_fetch Closes GH-9793 --- UPGRADING | 2 + Zend/Optimizer/compact_literals.c | 6 +- Zend/tests/dynamic_class_const_fetch.phpt | 64 + .../dynamic_class_const_fetch_cache_slot.phpt | 61 + .../dynamic_class_const_fetch_const_expr.phpt | 24 + .../dynamic_class_const_fetch_order.phpt | 37 + Zend/zend_compile.c | 22 +- Zend/zend_execute.c | 15 + Zend/zend_language_parser.y | 4 + Zend/zend_vm_def.h | 76 +- Zend/zend_vm_execute.h | 853 +++++++++--- Zend/zend_vm_gen.php | 8 +- Zend/zend_vm_handlers.h | 1147 +++++++++-------- Zend/zend_vm_opcodes.c | 2 +- 14 files changed, 1534 insertions(+), 787 deletions(-) create mode 100644 Zend/tests/dynamic_class_const_fetch.phpt create mode 100644 Zend/tests/dynamic_class_const_fetch_cache_slot.phpt create mode 100644 Zend/tests/dynamic_class_const_fetch_const_expr.phpt create mode 100644 Zend/tests/dynamic_class_const_fetch_order.phpt diff --git a/UPGRADING b/UPGRADING index 93cbbde3eb43b..589692aa1e446 100644 --- a/UPGRADING +++ b/UPGRADING @@ -24,6 +24,8 @@ PHP 8.3 UPGRADE NOTES Error when using more than `zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack (`fiber.stack_size-zend.reserved_stack_size` for fibers). + . Class constants can now be accessed dynamically using the C::{$name} syntax. + RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch ======================================== 2. New Features diff --git a/Zend/Optimizer/compact_literals.c b/Zend/Optimizer/compact_literals.c index 8b571c6d848a2..94402f026c778 100644 --- a/Zend/Optimizer/compact_literals.c +++ b/Zend/Optimizer/compact_literals.c @@ -211,7 +211,9 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx if (opline->op1_type == IS_CONST) { LITERAL_INFO(opline->op1.constant, 2); } - LITERAL_INFO(opline->op2.constant, 1); + if (opline->op2_type == IS_CONST) { + LITERAL_INFO(opline->op2.constant, 1); + } break; case ZEND_ASSIGN_STATIC_PROP: case ZEND_ASSIGN_STATIC_PROP_REF: @@ -668,7 +670,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx } break; case ZEND_FETCH_CLASS_CONSTANT: - if (opline->op1_type == IS_CONST) { + if (opline->op1_type == IS_CONST && opline->op2_type == IS_CONST) { // op1/op2 class_const opline->extended_value = add_static_slot(&hash, op_array, opline->op1.constant, diff --git a/Zend/tests/dynamic_class_const_fetch.phpt b/Zend/tests/dynamic_class_const_fetch.phpt new file mode 100644 index 0000000000000..1924536b964e6 --- /dev/null +++ b/Zend/tests/dynamic_class_const_fetch.phpt @@ -0,0 +1,64 @@ +--TEST-- +Dynamic class constant fetch +--FILE-- +getMessage(), "\n"; + } +} + +$const_names = [ + ['', '"BAR"'], + ['$bar = "BAR";', '$bar'], + ['$ba = "BA"; $r = "R";', '$ba . $r'], + ['', 'strtoupper("bar")'], + ['', '$barr'], + ['$bar = "BAR"; $barRef = &$bar;', '$barRef'], + ['', 'strtolower("CLASS")'], + ['', '42'], + ['$bar = 42;', '$bar'], + ['', '[]'], + ['$bar = [];', '$bar'], +]; + +foreach ($const_names as [$prolog, $const_name]) { + test("$prolog return Foo::{{$const_name}};"); + test("\$foo = 'Foo'; $prolog return \$foo::{{$const_name}};"); +} + +?> +--EXPECTF-- +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" + +Warning: Undefined variable $barr in %s : eval()'d code on line %d +Cannot use value of type null as class constant name + +Warning: Undefined variable $barr in %s : eval()'d code on line %d +Cannot use value of type null as class constant name +string(3) "bar" +string(3) "bar" +string(3) "Foo" +string(3) "Foo" +Cannot use value of type int as class constant name +Cannot use value of type int as class constant name +Cannot use value of type int as class constant name +Cannot use value of type int as class constant name +Cannot use value of type array as class constant name +Cannot use value of type array as class constant name +Cannot use value of type array as class constant name +Cannot use value of type array as class constant name diff --git a/Zend/tests/dynamic_class_const_fetch_cache_slot.phpt b/Zend/tests/dynamic_class_const_fetch_cache_slot.phpt new file mode 100644 index 0000000000000..3ddedfca763a1 --- /dev/null +++ b/Zend/tests/dynamic_class_const_fetch_cache_slot.phpt @@ -0,0 +1,61 @@ +--TEST-- +Dynamic class constant fetch +--FILE-- +bindTo(null, Foo::class)('BAR'); +$c->bindTo(null, Bar::class)('BAZ'); +$c->bindTo(null, Foo::class)('class'); +$c->bindTo(null, Bar::class)('class'); + +?> +--EXPECT-- +bar +bar +baz child +baz child +bar +bar +bar +baz 2 child +baz 2 child +baz 2 +Foo +Foo +FooParent +Bar +Bar +BarParent diff --git a/Zend/tests/dynamic_class_const_fetch_const_expr.phpt b/Zend/tests/dynamic_class_const_fetch_const_expr.phpt new file mode 100644 index 0000000000000..371f31e7f1ced --- /dev/null +++ b/Zend/tests/dynamic_class_const_fetch_const_expr.phpt @@ -0,0 +1,24 @@ +--TEST-- +Dynamic class constant fetch in constant expressions +--FILE-- + +--EXPECT-- +string(3) "bar" +string(3) "bar" +string(3) "bar" diff --git a/Zend/tests/dynamic_class_const_fetch_order.phpt b/Zend/tests/dynamic_class_const_fetch_order.phpt new file mode 100644 index 0000000000000..4003c7db928c7 --- /dev/null +++ b/Zend/tests/dynamic_class_const_fetch_order.phpt @@ -0,0 +1,37 @@ +--TEST-- +Dynamic class constant fetch DIM order +--FILE-- +getMessage(), "\n"; + } +} + +test(fn() => Foo::{foo()}::{bar()}); +test(fn() => Foo::{bar()}::{foo()}); + +?> +--EXPECT-- +foo() +bar() +Undefined constant Foo::BAR +bar() +Undefined constant Foo::BAR diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d0a09db6978e6..c2d53bd943ec7 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -9669,16 +9669,18 @@ static void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */ class_ast = ast->child[0]; const_ast = ast->child[1]; - if (class_ast->kind == ZEND_AST_ZVAL) { - zend_string *resolved_name; - - resolved_name = zend_resolve_class_name_ast(class_ast); - if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved_name, zend_ast_get_str(const_ast))) { - result->op_type = IS_CONST; + if (class_ast->kind == ZEND_AST_ZVAL && const_ast->kind == ZEND_AST_ZVAL) { + zval *const_zv = zend_ast_get_zval(const_ast); + if (Z_TYPE_P(const_zv) == IS_STRING) { + zend_string *const_str = Z_STR_P(const_zv); + zend_string *resolved_name = zend_resolve_class_name_ast(class_ast); + if (zend_try_ct_eval_class_const(&result->u.constant, resolved_name, const_str)) { + result->op_type = IS_CONST; + zend_string_release_ex(resolved_name, 0); + return; + } zend_string_release_ex(resolved_name, 0); - return; } - zend_string_release_ex(resolved_name, 0); } zend_compile_class_ref(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION); @@ -9689,7 +9691,9 @@ static void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */ zend_set_class_name_op1(opline, &class_node); - opline->extended_value = zend_alloc_cache_slots(2); + if (opline->op1_type == IS_CONST || opline->op2_type == IS_CONST) { + opline->extended_value = zend_alloc_cache_slots(2); + } } /* }}} */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 3e1baa304197a..b051937a5bc08 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -387,6 +387,21 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(uint32_t var EXECUTE_D return ret; } +static zend_always_inline zval *_get_zval_ptr_tmpvarcv(int op_type, znode_op node, int type EXECUTE_DATA_DC) +{ + if (op_type & (IS_TMP_VAR|IS_VAR)) { + if (op_type == IS_TMP_VAR) { + return _get_zval_ptr_tmp(node.var EXECUTE_DATA_CC); + } else { + ZEND_ASSERT(op_type == IS_VAR); + return _get_zval_ptr_var_deref(node.var EXECUTE_DATA_CC); + } + } else { + ZEND_ASSERT(op_type == IS_CV); + return _get_zval_ptr_cv_deref(node.var, type EXECUTE_DATA_CC); + } +} + static zend_always_inline zval *_get_zval_ptr(int op_type, znode_op node, int type EXECUTE_DATA_DC OPLINE_DC) { if (op_type & (IS_TMP_VAR|IS_VAR)) { diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index c4b241cf505b8..b62dce7237c71 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -1379,6 +1379,10 @@ class_constant: { $$ = zend_ast_create_class_const_or_name($1, $3); } | variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = zend_ast_create_class_const_or_name($1, $3); } + | class_name T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' + { $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1, $4); } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' + { $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1, $4); } ; optional_expr: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index a94f8cc762a80..fc7cd81323987 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5856,58 +5856,84 @@ ZEND_VM_HOT_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED|CONST_FETCH, CONST, CACHE_SL ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } -ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CONST, CACHE_SLOT) +ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CONST|TMPVARCV, CACHE_SLOT) { zend_class_entry *ce, *scope; zend_class_constant *c; - zval *value, *zv; + zval *value, *zv, *constant_zv; + zend_string *constant_name; USE_OPLINE SAVE_OPLINE(); do { - if (OP1_TYPE == IS_CONST) { + if (OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) { if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { value = CACHED_PTR(opline->extended_value + sizeof(void*)); break; - } else if (EXPECTED(CACHED_PTR(opline->extended_value))) { + } + } + if (OP1_TYPE == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } + CACHE_PTR(opline->extended_value, ce); } - } else { - if (OP1_TYPE == IS_UNUSED) { - ce = zend_fetch_class(NULL, opline->op1.num); - if (UNEXPECTED(ce == NULL)) { - ZVAL_UNDEF(EX_VAR(opline->result.var)); - HANDLE_EXCEPTION(); - } - } else { - ce = Z_CE_P(EX_VAR(opline->op1.var)); - } - if (EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { - value = CACHED_PTR(opline->extended_value + sizeof(void*)); - break; + } else if (OP1_TYPE == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); + HANDLE_EXCEPTION(); } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); } + if (OP1_TYPE != IS_CONST + && OP2_TYPE == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + + constant_zv = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if (OP2_TYPE != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + FREE_OP2(); + ZEND_VM_NEXT_OPCODE(); + } + zv = OP2_TYPE == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); - zv = zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), Z_STR_P(RT_CONSTANT(opline, opline->op2))); if (EXPECTED(zv != NULL)) { c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } if (ce->ce_flags & ZEND_ACC_TRAIT) { - zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } @@ -5916,6 +5942,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } } @@ -5923,20 +5950,25 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO zval_update_constant_ex(value, c->ce); if (UNEXPECTED(EG(exception) != NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } } - CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + if (OP2_TYPE == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } } else { zend_throw_error(NULL, "Undefined constant %s::%s", - ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP2(); HANDLE_EXCEPTION(); } } while (0); ZVAL_COPY_OR_DUP(EX_VAR(opline->result.var), value); + FREE_OP2(); ZEND_VM_NEXT_OPCODE(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 9813c62fdaa52..a1eefaa72e336 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7148,54 +7148,80 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS { zend_class_entry *ce, *scope; zend_class_constant *c; - zval *value, *zv; + zval *value, *zv, *constant_zv; + zend_string *constant_name; USE_OPLINE SAVE_OPLINE(); do { - if (IS_CONST == IS_CONST) { + if (IS_CONST == IS_CONST && IS_CONST == IS_CONST) { if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { value = CACHED_PTR(opline->extended_value + sizeof(void*)); break; - } else if (EXPECTED(CACHED_PTR(opline->extended_value))) { + } + } + if (IS_CONST == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } + CACHE_PTR(opline->extended_value, ce); } - } else { - if (IS_CONST == IS_UNUSED) { - ce = zend_fetch_class(NULL, opline->op1.num); - if (UNEXPECTED(ce == NULL)) { - ZVAL_UNDEF(EX_VAR(opline->result.var)); - HANDLE_EXCEPTION(); - } - } else { - ce = Z_CE_P(EX_VAR(opline->op1.var)); - } - if (EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { - value = CACHED_PTR(opline->extended_value + sizeof(void*)); - break; + } else if (IS_CONST == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_CONST != IS_CONST + && IS_CONST == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + + constant_zv = RT_CONSTANT(opline, opline->op2); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if (IS_CONST != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + + ZEND_VM_NEXT_OPCODE(); + } + zv = IS_CONST == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); - zv = zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), Z_STR_P(RT_CONSTANT(opline, opline->op2))); if (EXPECTED(zv != NULL)) { c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } if (ce->ce_flags & ZEND_ACC_TRAIT) { - zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } @@ -7204,6 +7230,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } @@ -7211,14 +7238,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS zval_update_constant_ex(value, c->ce); if (UNEXPECTED(EG(exception) != NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } - CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + if (IS_CONST == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } } else { zend_throw_error(NULL, "Undefined constant %s::%s", - ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } while (0); @@ -8268,6 +8299,122 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUA ZEND_VM_TAIL_CALL(zend_is_smaller_or_equal_helper_SPEC(op1, op2 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC)); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_class_entry *ce, *scope; + zend_class_constant *c; + zval *value, *zv, *constant_zv; + zend_string *constant_name; + USE_OPLINE + + SAVE_OPLINE(); + + do { + if (IS_CONST == IS_CONST && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + } + if (IS_CONST == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { + ce = CACHED_PTR(opline->extended_value); + } else { + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + CACHE_PTR(opline->extended_value, ce); + } + } else if (IS_CONST == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_CONST != IS_CONST + && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + + constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if ((IS_TMP_VAR|IS_VAR|IS_CV) != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); + } + zv = (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); + + if (EXPECTED(zv != NULL)) { + c = Z_PTR_P(zv); + scope = EX(func)->op_array.scope; + if (!zend_verify_const_access(c, scope)) { + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + if (ce->ce_flags & ZEND_ACC_TRAIT) { + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + value = &c->value; + // Enums require loading of all class constants to build the backed enum table + if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { + if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if (Z_TYPE_P(value) == IS_CONSTANT_AST) { + zval_update_constant_ex(value, c->ce); + if (UNEXPECTED(EG(exception) != NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if ((IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } + } else { + zend_throw_error(NULL, "Undefined constant %s::%s", + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } while (0); + + ZVAL_COPY_OR_DUP(EX_VAR(opline->result.var), value); + + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); +} + static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -24719,54 +24866,80 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ { zend_class_entry *ce, *scope; zend_class_constant *c; - zval *value, *zv; + zval *value, *zv, *constant_zv; + zend_string *constant_name; USE_OPLINE SAVE_OPLINE(); do { - if (IS_VAR == IS_CONST) { + if (IS_VAR == IS_CONST && IS_CONST == IS_CONST) { if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { value = CACHED_PTR(opline->extended_value + sizeof(void*)); break; - } else if (EXPECTED(CACHED_PTR(opline->extended_value))) { + } + } + if (IS_VAR == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } + CACHE_PTR(opline->extended_value, ce); } - } else { - if (IS_VAR == IS_UNUSED) { - ce = zend_fetch_class(NULL, opline->op1.num); - if (UNEXPECTED(ce == NULL)) { - ZVAL_UNDEF(EX_VAR(opline->result.var)); - HANDLE_EXCEPTION(); - } - } else { - ce = Z_CE_P(EX_VAR(opline->op1.var)); - } - if (EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { - value = CACHED_PTR(opline->extended_value + sizeof(void*)); - break; + } else if (IS_VAR == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_VAR != IS_CONST + && IS_CONST == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; } - zv = zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), Z_STR_P(RT_CONSTANT(opline, opline->op2))); + constant_zv = RT_CONSTANT(opline, opline->op2); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if (IS_CONST != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + + ZEND_VM_NEXT_OPCODE(); + } + zv = IS_CONST == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); + if (EXPECTED(zv != NULL)) { c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } if (ce->ce_flags & ZEND_ACC_TRAIT) { - zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } @@ -24775,6 +24948,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } @@ -24782,14 +24956,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ zval_update_constant_ex(value, c->ce); if (UNEXPECTED(EG(exception) != NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } - CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + if (IS_CONST == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } } else { zend_throw_error(NULL, "Undefined constant %s::%s", - ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } while (0); @@ -25247,6 +25425,122 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IN_ARRAY_SPEC_VAR_CONST_HANDLE ZEND_VM_SMART_BRANCH(0, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_class_entry *ce, *scope; + zend_class_constant *c; + zval *value, *zv, *constant_zv; + zend_string *constant_name; + USE_OPLINE + + SAVE_OPLINE(); + + do { + if (IS_VAR == IS_CONST && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + } + if (IS_VAR == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { + ce = CACHED_PTR(opline->extended_value); + } else { + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + CACHE_PTR(opline->extended_value, ce); + } + } else if (IS_VAR == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_VAR != IS_CONST + && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + + constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if ((IS_TMP_VAR|IS_VAR|IS_CV) != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); + } + zv = (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); + + if (EXPECTED(zv != NULL)) { + c = Z_PTR_P(zv); + scope = EX(func)->op_array.scope; + if (!zend_verify_const_access(c, scope)) { + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + if (ce->ce_flags & ZEND_ACC_TRAIT) { + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + value = &c->value; + // Enums require loading of all class constants to build the backed enum table + if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { + if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if (Z_TYPE_P(value) == IS_CONSTANT_AST) { + zval_update_constant_ex(value, c->ce); + if (UNEXPECTED(EG(exception) != NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if ((IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } + } else { + zend_throw_error(NULL, "Undefined constant %s::%s", + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } while (0); + + ZVAL_COPY_OR_DUP(EX_VAR(opline->result.var), value); + + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_OP_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -33560,54 +33854,80 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS { zend_class_entry *ce, *scope; zend_class_constant *c; - zval *value, *zv; + zval *value, *zv, *constant_zv; + zend_string *constant_name; USE_OPLINE SAVE_OPLINE(); do { - if (IS_UNUSED == IS_CONST) { + if (IS_UNUSED == IS_CONST && IS_CONST == IS_CONST) { if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { value = CACHED_PTR(opline->extended_value + sizeof(void*)); break; - } else if (EXPECTED(CACHED_PTR(opline->extended_value))) { + } + } + if (IS_UNUSED == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } + CACHE_PTR(opline->extended_value, ce); } - } else { - if (IS_UNUSED == IS_UNUSED) { - ce = zend_fetch_class(NULL, opline->op1.num); - if (UNEXPECTED(ce == NULL)) { - ZVAL_UNDEF(EX_VAR(opline->result.var)); - HANDLE_EXCEPTION(); - } - } else { - ce = Z_CE_P(EX_VAR(opline->op1.var)); - } - if (EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { - value = CACHED_PTR(opline->extended_value + sizeof(void*)); - break; + } else if (IS_UNUSED == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_UNUSED != IS_CONST + && IS_CONST == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; } - zv = zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), Z_STR_P(RT_CONSTANT(opline, opline->op2))); + constant_zv = RT_CONSTANT(opline, opline->op2); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if (IS_CONST != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + + ZEND_VM_NEXT_OPCODE(); + } + zv = IS_CONST == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); + if (EXPECTED(zv != NULL)) { c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } if (ce->ce_flags & ZEND_ACC_TRAIT) { - zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } @@ -33616,6 +33936,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } @@ -33623,14 +33944,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS zval_update_constant_ex(value, c->ce); if (UNEXPECTED(EG(exception) != NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } - CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + if (IS_CONST == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } } else { zend_throw_error(NULL, "Undefined constant %s::%s", - ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } } while (0); @@ -33878,6 +34203,122 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE ZEND_VM_RETURN(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_class_entry *ce, *scope; + zend_class_constant *c; + zval *value, *zv, *constant_zv; + zend_string *constant_name; + USE_OPLINE + + SAVE_OPLINE(); + + do { + if (IS_UNUSED == IS_CONST && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value + sizeof(void*)))) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + } + if (IS_UNUSED == IS_CONST) { + if (EXPECTED(CACHED_PTR(opline->extended_value))) { + ce = CACHED_PTR(opline->extended_value); + } else { + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + CACHE_PTR(opline->extended_value, ce); + } + } else if (IS_UNUSED == IS_UNUSED) { + ce = zend_fetch_class(NULL, opline->op1.num); + if (UNEXPECTED(ce == NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } else { + ce = Z_CE_P(EX_VAR(opline->op1.var)); + } + if (IS_UNUSED != IS_CONST + && (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + && EXPECTED(CACHED_PTR(opline->extended_value) == ce)) { + value = CACHED_PTR(opline->extended_value + sizeof(void*)); + break; + } + + constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); + if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + constant_name = Z_STR_P(constant_zv); + /* Magic 'class' for constant OP2 is caught at compile-time */ + if ((IS_TMP_VAR|IS_VAR|IS_CV) != IS_CONST && UNEXPECTED(zend_string_equals_literal_ci(constant_name, "class"))) { + ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name); + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); + } + zv = (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST + ? zend_hash_find_known_hash(CE_CONSTANTS_TABLE(ce), constant_name) + : zend_hash_find(CE_CONSTANTS_TABLE(ce), constant_name); + + if (EXPECTED(zv != NULL)) { + c = Z_PTR_P(zv); + scope = EX(func)->op_array.scope; + if (!zend_verify_const_access(c, scope)) { + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)), ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + if (ce->ce_flags & ZEND_ACC_TRAIT) { + zend_throw_error(NULL, "Cannot access trait constant %s::%s directly", ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + + value = &c->value; + // Enums require loading of all class constants to build the backed enum table + if (ce->ce_flags & ZEND_ACC_ENUM && ce->enum_backing_type != IS_UNDEF && ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { + if (UNEXPECTED(zend_update_class_constants(ce) == FAILURE)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if (Z_TYPE_P(value) == IS_CONSTANT_AST) { + zval_update_constant_ex(value, c->ce); + if (UNEXPECTED(EG(exception) != NULL)) { + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } + if ((IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { + CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); + } + } else { + zend_throw_error(NULL, "Undefined constant %s::%s", + ZSTR_VAL(ce->name), ZSTR_VAL(constant_name)); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + FREE_OP(opline->op2_type, opline->op2.var); + HANDLE_EXCEPTION(); + } + } while (0); + + ZVAL_COPY_OR_DUP(EX_VAR(opline->result.var), value); + + FREE_OP(opline->op2_type, opline->op2.var); + ZEND_VM_NEXT_OPCODE(); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_OP_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -54761,9 +55202,29 @@ ZEND_API void execute_ex(zend_execute_data *ex) (void*)&&ZEND_UNSET_STATIC_PROP_SPEC_LABEL, (void*)&&ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_LABEL, (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_LABEL, (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_BIND_LEXICAL_SPEC_TMP_CV_LABEL, (void*)&&ZEND_BIND_STATIC_SPEC_CV_UNUSED_LABEL, @@ -56733,6 +57194,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVARCV_JMPNZ) ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV): + VM_TRACE(ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV) + ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV): VM_TRACE(ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -58453,6 +58918,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IN_ARRAY_SPEC_VAR_CONST) ZEND_IN_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV): + VM_TRACE(ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV) + ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_ASSIGN_OBJ_OP_SPEC_VAR_TMPVAR): VM_TRACE(ZEND_ASSIGN_OBJ_OP_SPEC_VAR_TMPVAR) ZEND_ASSIGN_OBJ_OP_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -58977,6 +59446,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_YIELD_SPEC_UNUSED_CONST) ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV): + VM_TRACE(ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV) + ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_ASSIGN_OBJ_OP_SPEC_UNUSED_TMPVAR): VM_TRACE(ZEND_ASSIGN_OBJ_OP_SPEC_UNUSED_TMPVAR) ZEND_ASSIGN_OBJ_OP_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -62833,9 +63306,29 @@ void zend_vm_init(void) ZEND_UNSET_STATIC_PROP_SPEC_HANDLER, ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_HANDLER, ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV_HANDLER, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_BIND_LEXICAL_SPEC_TMP_CV_HANDLER, ZEND_BIND_STATIC_SPEC_CV_UNUSED_HANDLER, @@ -63897,7 +64390,7 @@ void zend_vm_init(void) 1255, 1256 | SPEC_RULE_OP1, 1261 | SPEC_RULE_OP1, - 3450, + 3470, 1266 | SPEC_RULE_OP1, 1271 | SPEC_RULE_OP1, 1276 | SPEC_RULE_OP2, @@ -64033,81 +64526,81 @@ void zend_vm_init(void) 2430, 2431, 2432, - 2433 | SPEC_RULE_OP1, - 2438, - 2439, - 2440, - 2441 | SPEC_RULE_OP2, - 2446, - 2447 | SPEC_RULE_OP1, - 2452 | SPEC_RULE_OP1, - 2457 | SPEC_RULE_OP1, - 2462 | SPEC_RULE_OP1, + 2433 | SPEC_RULE_OP1 | SPEC_RULE_OP2, + 2458, + 2459, + 2460, + 2461 | SPEC_RULE_OP2, + 2466, 2467 | SPEC_RULE_OP1, - 2472, - 2473 | SPEC_RULE_OP1, - 2478 | SPEC_RULE_OP1 | SPEC_RULE_OP2, - 2503 | SPEC_RULE_OP1, - 2508 | SPEC_RULE_OP1 | SPEC_RULE_OP2, - 2533 | SPEC_RULE_OP1, - 2538 | SPEC_RULE_OP1, - 2543, - 2544, - 2545, - 2546, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, - 3450, + 2472 | SPEC_RULE_OP1, + 2477 | SPEC_RULE_OP1, + 2482 | SPEC_RULE_OP1, + 2487 | SPEC_RULE_OP1, + 2492, + 2493 | SPEC_RULE_OP1, + 2498 | SPEC_RULE_OP1 | SPEC_RULE_OP2, + 2523 | SPEC_RULE_OP1, + 2528 | SPEC_RULE_OP1 | SPEC_RULE_OP2, + 2553 | SPEC_RULE_OP1, + 2558 | SPEC_RULE_OP1, + 2563, + 2564, + 2565, + 2566, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, + 3470, }; #if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) zend_opcode_handler_funcs = labels; @@ -64280,7 +64773,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2549 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2569 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -64288,7 +64781,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2574 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2594 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -64296,7 +64789,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2599 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2619 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -64307,17 +64800,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2624 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2644 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2649 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2669 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2674 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2694 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_MUL: @@ -64328,17 +64821,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2699 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2719 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2724 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2744 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2749 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2769 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_IDENTICAL: @@ -64349,14 +64842,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2774 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2794 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2849 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2869 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 3074 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 3094 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_IDENTICAL: @@ -64367,14 +64860,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2924 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2944 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2999 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 3019 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 3079 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 3099 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_EQUAL: @@ -64385,12 +64878,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2774 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2794 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2849 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2869 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_EQUAL: @@ -64401,12 +64894,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2924 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2944 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2999 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 3019 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_SMALLER: @@ -64414,12 +64907,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3084 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3104 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3159 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3179 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_IS_SMALLER_OR_EQUAL: @@ -64427,74 +64920,74 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3234 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3254 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3309 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3329 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_QM_ASSIGN: if (op1_info == MAY_BE_LONG) { - spec = 3396 | SPEC_RULE_OP1; + spec = 3416 | SPEC_RULE_OP1; } else if (op1_info == MAY_BE_DOUBLE) { - spec = 3401 | SPEC_RULE_OP1; + spec = 3421 | SPEC_RULE_OP1; } else if ((op->op1_type == IS_CONST) ? !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1)) : (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) { - spec = 3406 | SPEC_RULE_OP1; + spec = 3426 | SPEC_RULE_OP1; } break; case ZEND_PRE_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3384 | SPEC_RULE_RETVAL; + spec = 3404 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3386 | SPEC_RULE_RETVAL; + spec = 3406 | SPEC_RULE_RETVAL; } break; case ZEND_PRE_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3388 | SPEC_RULE_RETVAL; + spec = 3408 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3390 | SPEC_RULE_RETVAL; + spec = 3410 | SPEC_RULE_RETVAL; } break; case ZEND_POST_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3392; + spec = 3412; } else if (op1_info == MAY_BE_LONG) { - spec = 3393; + spec = 3413; } break; case ZEND_POST_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3394; + spec = 3414; } else if (op1_info == MAY_BE_LONG) { - spec = 3395; + spec = 3415; } break; case ZEND_JMP: if (OP_JMP_ADDR(op, op->op1) > op) { - spec = 2548; + spec = 2568; } break; case ZEND_RECV: if (op->op2.num == MAY_BE_ANY) { - spec = 2547; + spec = 2567; } break; case ZEND_SEND_VAL: if (op->op1_type == IS_CONST && op->op2_type == IS_UNUSED && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3446; + spec = 3466; } break; case ZEND_SEND_VAR_EX: if (op->op2_type == IS_UNUSED && op->op2.num <= MAX_ARG_FLAG_NUM && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3441 | SPEC_RULE_OP1; + spec = 3461 | SPEC_RULE_OP1; } break; case ZEND_FE_FETCH_R: if (op->op2_type == IS_CV && (op1_info & (MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) { - spec = 3448 | SPEC_RULE_RETVAL; + spec = 3468 | SPEC_RULE_RETVAL; } break; case ZEND_FETCH_DIM_R: @@ -64502,17 +64995,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3411 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 3431 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_SEND_VAL_EX: if (op->op2_type == IS_UNUSED && op->op2.num <= MAX_ARG_FLAG_NUM && op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3447; + spec = 3467; } break; case ZEND_SEND_VAR: if (op->op2_type == IS_UNUSED && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3436 | SPEC_RULE_OP1; + spec = 3456 | SPEC_RULE_OP1; } break; case ZEND_BW_OR: diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index c8617ae794adf..e94db4f359a05 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -260,7 +260,7 @@ "UNUSED" => "NULL", "CV" => "_get_zval_ptr_cv_deref_\\1(opline->op1.var EXECUTE_DATA_CC)", "TMPVAR" => "???", - "TMPVARCV" => "???", + "TMPVARCV" => "_get_zval_ptr_tmpvarcv(opline->op1_type, opline->op1, \\1 EXECUTE_DATA_CC)", ); $op2_get_zval_ptr_deref = array( @@ -271,7 +271,7 @@ "UNUSED" => "NULL", "CV" => "_get_zval_ptr_cv_deref_\\1(opline->op2.var EXECUTE_DATA_CC)", "TMPVAR" => "???", - "TMPVARCV" => "???", + "TMPVARCV" => "_get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, \\1 EXECUTE_DATA_CC)", ); $op1_get_zval_ptr_undef = array( @@ -436,7 +436,7 @@ "UNUSED" => "", "CV" => "", "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))", - "TMPVARCV" => "???", + "TMPVARCV" => "FREE_OP(opline->op1_type, opline->op1.var)", ); $op2_free_op = array( @@ -447,7 +447,7 @@ "UNUSED" => "", "CV" => "", "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))", - "TMPVARCV" => "???", + "TMPVARCV" => "FREE_OP(opline->op2_type, opline->op2.var)", ); $op1_free_op_if_var = array( diff --git a/Zend/zend_vm_handlers.h b/Zend/zend_vm_handlers.h index d07c63d89f4f7..fae2138ef912e 100644 --- a/Zend/zend_vm_handlers.h +++ b/Zend/zend_vm_handlers.h @@ -1279,572 +1279,581 @@ _(2431, ZEND_UNSET_STATIC_PROP_SPEC) \ _(2432, ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC) \ _(2433, ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST) \ - _(2435, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST) \ - _(2436, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST) \ - _(2438, ZEND_BIND_LEXICAL_SPEC_TMP_CV) \ - _(2439, ZEND_BIND_STATIC_SPEC_CV_UNUSED) \ - _(2440, ZEND_FETCH_THIS_SPEC_UNUSED_UNUSED) \ - _(2441, ZEND_SEND_FUNC_ARG_SPEC_VAR_CONST) \ - _(2444, ZEND_SEND_FUNC_ARG_SPEC_VAR_UNUSED) \ - _(2446, ZEND_ISSET_ISEMPTY_THIS_SPEC_UNUSED_UNUSED) \ - _(2447, ZEND_SWITCH_LONG_SPEC_CONST_CONST) \ - _(2448, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ - _(2449, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ - _(2451, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ - _(2452, ZEND_SWITCH_STRING_SPEC_CONST_CONST) \ - _(2453, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ - _(2454, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ - _(2456, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ - _(2457, ZEND_IN_ARRAY_SPEC_CONST_CONST) \ - _(2458, ZEND_IN_ARRAY_SPEC_TMP_CONST) \ - _(2459, ZEND_IN_ARRAY_SPEC_VAR_CONST) \ - _(2461, ZEND_IN_ARRAY_SPEC_CV_CONST) \ - _(2462, ZEND_COUNT_SPEC_CONST_UNUSED) \ - _(2463, ZEND_COUNT_SPEC_TMPVAR_UNUSED) \ - _(2464, ZEND_COUNT_SPEC_TMPVAR_UNUSED) \ - _(2466, ZEND_COUNT_SPEC_CV_UNUSED) \ - _(2467, ZEND_GET_CLASS_SPEC_CONST_UNUSED) \ - _(2468, ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED) \ - _(2469, ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED) \ - _(2470, ZEND_GET_CLASS_SPEC_UNUSED_UNUSED) \ - _(2471, ZEND_GET_CLASS_SPEC_CV_UNUSED) \ - _(2472, ZEND_GET_CALLED_CLASS_SPEC_UNUSED_UNUSED) \ - _(2473, ZEND_GET_TYPE_SPEC_CONST_UNUSED) \ - _(2474, ZEND_GET_TYPE_SPEC_TMP_UNUSED) \ - _(2475, ZEND_GET_TYPE_SPEC_VAR_UNUSED) \ - _(2477, ZEND_GET_TYPE_SPEC_CV_UNUSED) \ - _(2478, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CONST) \ - _(2479, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_TMPVAR) \ - _(2480, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_TMPVAR) \ - _(2482, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CV) \ - _(2483, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CONST) \ - _(2484, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ - _(2485, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ - _(2487, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CV) \ - _(2488, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CONST) \ - _(2489, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ - _(2490, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ - _(2492, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CV) \ - _(2498, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CONST) \ - _(2499, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ - _(2500, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ - _(2502, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV) \ - _(2503, ZEND_MATCH_SPEC_CONST_CONST) \ - _(2504, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ - _(2505, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ - _(2507, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ - _(2513, ZEND_CASE_STRICT_SPEC_TMP_CONST) \ - _(2514, ZEND_CASE_STRICT_SPEC_TMP_TMP) \ - _(2515, ZEND_CASE_STRICT_SPEC_TMP_VAR) \ - _(2517, ZEND_CASE_STRICT_SPEC_TMP_CV) \ - _(2518, ZEND_CASE_STRICT_SPEC_VAR_CONST) \ - _(2519, ZEND_CASE_STRICT_SPEC_VAR_TMP) \ - _(2520, ZEND_CASE_STRICT_SPEC_VAR_VAR) \ - _(2522, ZEND_CASE_STRICT_SPEC_VAR_CV) \ - _(2533, ZEND_MATCH_ERROR_SPEC_CONST_UNUSED) \ - _(2534, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ - _(2535, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ - _(2537, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ - _(2538, ZEND_JMP_NULL_SPEC_CONST) \ - _(2539, ZEND_JMP_NULL_SPEC_TMP) \ - _(2540, ZEND_JMP_NULL_SPEC_VAR) \ - _(2542, ZEND_JMP_NULL_SPEC_CV) \ - _(2543, ZEND_CHECK_UNDEF_ARGS_SPEC_UNUSED_UNUSED) \ - _(2544, ZEND_FETCH_GLOBALS_SPEC_UNUSED_UNUSED) \ - _(2545, ZEND_VERIFY_NEVER_TYPE_SPEC_UNUSED_UNUSED) \ - _(2546, ZEND_CALLABLE_CONVERT_SPEC_UNUSED_UNUSED) \ - _(2547, ZEND_RECV_NOTYPE_SPEC) \ - _(2548, ZEND_JMP_FORWARD_SPEC) \ - _(2554, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2555, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2556, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2558, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2559, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2560, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2561, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2563, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2569, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2570, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2571, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2573, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2579, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2580, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2581, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2583, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2584, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2585, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2586, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2588, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2594, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2595, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2596, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2598, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2604, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2605, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2606, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2608, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2609, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2610, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2611, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2613, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2619, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2620, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2621, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2623, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2625, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2626, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2628, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2629, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2630, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2631, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2633, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2634, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2635, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2636, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2638, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2644, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2645, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2646, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2648, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2650, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2651, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2653, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2654, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2655, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2656, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2658, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2659, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2660, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2661, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2663, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2669, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2670, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2671, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2673, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2675, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2676, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2678, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2679, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2680, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2681, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2683, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2684, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2685, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2686, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2688, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2694, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2695, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2696, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2698, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2704, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2705, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2706, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2708, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2709, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2710, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2711, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2713, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2719, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2720, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2721, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2723, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2729, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2730, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2731, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2733, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2734, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2735, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2736, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2738, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2744, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2745, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2746, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2748, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2754, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2755, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2756, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2758, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2759, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2760, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2761, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2763, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2769, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2770, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2771, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2773, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2789, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2790, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2791, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2792, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2793, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2794, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2795, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2796, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2797, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2801, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2802, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2803, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2804, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2805, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2806, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2807, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2808, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2809, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2810, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2811, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2812, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2816, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2817, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2818, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2834, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2835, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2836, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2837, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2838, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2839, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2840, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2841, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2842, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2846, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2847, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2848, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2864, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2865, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2866, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2867, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2868, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2869, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2870, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2871, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2872, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2876, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2877, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2878, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2879, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2880, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2881, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2882, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2883, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2884, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2885, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2886, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2887, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2891, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2892, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2893, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2909, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2910, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2911, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2912, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2913, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2914, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2915, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2916, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2917, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2921, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2922, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2923, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2939, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2940, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2941, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2942, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2943, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2944, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2945, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2946, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2947, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2951, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2952, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2953, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2954, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2955, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2956, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2957, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2958, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2959, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2960, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2961, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2962, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2966, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2967, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2968, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2984, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2985, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2986, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2987, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2988, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2989, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2990, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2991, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2992, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2996, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2997, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2998, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3014, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3015, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3016, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3017, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3018, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3019, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3020, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3021, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3022, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3026, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3027, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3028, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3029, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3030, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3031, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3032, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3033, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3034, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3035, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3036, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3037, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3041, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3042, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3043, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3059, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3060, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3061, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3062, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3063, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3064, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3065, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3066, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3067, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3071, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3072, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3073, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3074, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(3078, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(3079, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(3083, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(3087, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3088, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3089, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3090, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3091, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3092, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3096, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3097, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3098, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3099, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3100, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3101, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3102, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3103, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3104, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3105, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3106, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3107, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3111, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3112, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3113, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3114, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3115, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3116, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3117, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3118, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3119, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3120, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3121, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3122, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3126, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3127, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3128, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3144, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3145, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3146, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3147, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3148, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3149, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3150, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3151, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3152, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3156, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3157, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3158, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3162, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3163, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3164, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3165, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3166, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3167, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3171, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3172, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3173, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3174, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3175, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3176, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3177, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3178, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3179, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3180, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3181, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3182, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3186, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3187, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3188, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3189, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3190, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3191, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3192, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3193, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3194, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3195, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3196, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3197, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3201, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3202, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3203, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3219, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3220, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3221, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3222, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3223, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3224, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3225, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3226, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3227, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3231, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3232, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3233, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3237, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3238, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3239, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3240, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3241, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3242, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3246, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3247, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3248, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3249, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3250, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3251, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3252, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3253, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3254, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3255, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3256, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3257, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3261, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3262, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3263, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3264, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3265, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3266, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3267, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3268, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3269, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3270, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3271, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3272, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3276, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3277, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3278, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3294, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3295, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3296, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3297, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3298, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3299, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3300, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3301, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3302, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3306, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3307, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3308, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3312, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3313, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3314, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3315, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3316, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3317, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3321, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3322, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3323, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3324, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3325, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3326, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3327, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3328, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3329, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3330, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3331, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3332, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3336, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3337, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3338, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3339, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3340, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3341, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3342, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3343, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3344, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3345, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3346, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3347, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3351, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3352, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3353, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3369, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3370, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3371, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3372, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3373, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3374, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3375, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3376, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3377, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3381, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3382, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3383, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3384, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3385, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3386, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3387, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ - _(3388, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3389, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3390, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3391, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ - _(3392, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3393, ZEND_POST_INC_LONG_SPEC_CV) \ - _(3394, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3395, ZEND_POST_DEC_LONG_SPEC_CV) \ - _(3396, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ - _(3397, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3398, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3400, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3401, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ - _(3402, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3403, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3405, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3406, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ - _(3407, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3408, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3410, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3412, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3413, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3415, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3416, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ - _(3417, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3418, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3420, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3421, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ - _(3422, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3423, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3425, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3431, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ - _(3432, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3433, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3435, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3438, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ - _(3440, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ - _(3443, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR_UNUSED) \ - _(3445, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_UNUSED) \ - _(3446, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ - _(3447, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ - _(3448, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ - _(3449, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ - _(3449+1, ZEND_NULL) + _(2434, ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV) \ + _(2435, ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV) \ + _(2437, ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_TMPVARCV) \ + _(2443, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST) \ + _(2444, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV) \ + _(2445, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV) \ + _(2447, ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_TMPVARCV) \ + _(2448, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST) \ + _(2449, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV) \ + _(2450, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV) \ + _(2452, ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_TMPVARCV) \ + _(2458, ZEND_BIND_LEXICAL_SPEC_TMP_CV) \ + _(2459, ZEND_BIND_STATIC_SPEC_CV_UNUSED) \ + _(2460, ZEND_FETCH_THIS_SPEC_UNUSED_UNUSED) \ + _(2461, ZEND_SEND_FUNC_ARG_SPEC_VAR_CONST) \ + _(2464, ZEND_SEND_FUNC_ARG_SPEC_VAR_UNUSED) \ + _(2466, ZEND_ISSET_ISEMPTY_THIS_SPEC_UNUSED_UNUSED) \ + _(2467, ZEND_SWITCH_LONG_SPEC_CONST_CONST) \ + _(2468, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ + _(2469, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ + _(2471, ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONST) \ + _(2472, ZEND_SWITCH_STRING_SPEC_CONST_CONST) \ + _(2473, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ + _(2474, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ + _(2476, ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) \ + _(2477, ZEND_IN_ARRAY_SPEC_CONST_CONST) \ + _(2478, ZEND_IN_ARRAY_SPEC_TMP_CONST) \ + _(2479, ZEND_IN_ARRAY_SPEC_VAR_CONST) \ + _(2481, ZEND_IN_ARRAY_SPEC_CV_CONST) \ + _(2482, ZEND_COUNT_SPEC_CONST_UNUSED) \ + _(2483, ZEND_COUNT_SPEC_TMPVAR_UNUSED) \ + _(2484, ZEND_COUNT_SPEC_TMPVAR_UNUSED) \ + _(2486, ZEND_COUNT_SPEC_CV_UNUSED) \ + _(2487, ZEND_GET_CLASS_SPEC_CONST_UNUSED) \ + _(2488, ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED) \ + _(2489, ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED) \ + _(2490, ZEND_GET_CLASS_SPEC_UNUSED_UNUSED) \ + _(2491, ZEND_GET_CLASS_SPEC_CV_UNUSED) \ + _(2492, ZEND_GET_CALLED_CLASS_SPEC_UNUSED_UNUSED) \ + _(2493, ZEND_GET_TYPE_SPEC_CONST_UNUSED) \ + _(2494, ZEND_GET_TYPE_SPEC_TMP_UNUSED) \ + _(2495, ZEND_GET_TYPE_SPEC_VAR_UNUSED) \ + _(2497, ZEND_GET_TYPE_SPEC_CV_UNUSED) \ + _(2498, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CONST) \ + _(2499, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_TMPVAR) \ + _(2500, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_TMPVAR) \ + _(2502, ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CV) \ + _(2503, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CONST) \ + _(2504, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ + _(2505, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ + _(2507, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CV) \ + _(2508, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CONST) \ + _(2509, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ + _(2510, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_TMPVAR) \ + _(2512, ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_CV) \ + _(2518, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CONST) \ + _(2519, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ + _(2520, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ + _(2522, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV) \ + _(2523, ZEND_MATCH_SPEC_CONST_CONST) \ + _(2524, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2525, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2527, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2533, ZEND_CASE_STRICT_SPEC_TMP_CONST) \ + _(2534, ZEND_CASE_STRICT_SPEC_TMP_TMP) \ + _(2535, ZEND_CASE_STRICT_SPEC_TMP_VAR) \ + _(2537, ZEND_CASE_STRICT_SPEC_TMP_CV) \ + _(2538, ZEND_CASE_STRICT_SPEC_VAR_CONST) \ + _(2539, ZEND_CASE_STRICT_SPEC_VAR_TMP) \ + _(2540, ZEND_CASE_STRICT_SPEC_VAR_VAR) \ + _(2542, ZEND_CASE_STRICT_SPEC_VAR_CV) \ + _(2553, ZEND_MATCH_ERROR_SPEC_CONST_UNUSED) \ + _(2554, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2555, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2557, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2558, ZEND_JMP_NULL_SPEC_CONST) \ + _(2559, ZEND_JMP_NULL_SPEC_TMP) \ + _(2560, ZEND_JMP_NULL_SPEC_VAR) \ + _(2562, ZEND_JMP_NULL_SPEC_CV) \ + _(2563, ZEND_CHECK_UNDEF_ARGS_SPEC_UNUSED_UNUSED) \ + _(2564, ZEND_FETCH_GLOBALS_SPEC_UNUSED_UNUSED) \ + _(2565, ZEND_VERIFY_NEVER_TYPE_SPEC_UNUSED_UNUSED) \ + _(2566, ZEND_CALLABLE_CONVERT_SPEC_UNUSED_UNUSED) \ + _(2567, ZEND_RECV_NOTYPE_SPEC) \ + _(2568, ZEND_JMP_FORWARD_SPEC) \ + _(2574, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2575, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2576, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2578, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2579, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2580, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2581, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2583, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2589, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2590, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2591, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2593, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2599, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2600, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2601, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2603, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2604, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2605, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2606, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2608, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2614, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2615, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2616, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2618, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2624, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2625, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2626, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2628, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2629, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2630, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2631, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2633, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2639, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2640, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2641, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2643, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2645, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2646, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2648, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2649, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2650, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2651, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2653, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2654, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2655, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2656, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2658, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2664, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2665, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2666, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2668, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2670, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2671, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2673, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2674, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2675, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2676, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2678, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2679, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2680, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2681, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2683, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2689, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2690, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2691, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2693, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2695, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2696, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2698, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2699, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2700, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2701, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2703, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2704, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2705, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2706, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2708, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2714, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2715, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2716, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2718, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2724, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2725, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2726, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2728, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2729, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2730, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2731, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2733, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2739, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2740, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2741, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2743, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2749, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2750, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2751, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2753, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2754, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2755, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2756, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2758, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2764, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2765, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2766, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2768, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2774, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2775, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2776, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2778, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2779, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2780, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2781, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2783, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2789, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2790, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2791, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2793, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2809, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2810, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2811, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2812, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2813, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2814, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2815, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2816, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2817, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2821, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2822, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2823, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2824, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2825, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2826, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2827, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2828, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2829, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2830, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2831, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2832, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2836, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2837, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2838, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2854, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2855, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2856, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2857, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2858, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2859, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2860, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2861, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2862, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2866, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2867, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2868, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2884, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2885, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2886, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2887, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2888, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2889, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2890, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2891, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2892, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2896, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2897, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2898, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2899, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2900, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2901, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2902, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2903, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2904, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2905, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2906, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2907, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2911, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2912, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2913, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2929, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2930, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2931, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2932, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2933, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2934, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2935, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2936, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2937, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2941, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2942, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2943, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2959, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2960, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2961, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2962, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2963, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2964, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2965, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2966, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2967, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2971, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2972, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2973, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2974, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2975, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2976, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2977, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2978, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2979, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2980, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2981, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2982, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2986, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2987, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2988, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3004, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3005, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3006, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3007, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3008, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3009, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3010, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3011, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3012, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3016, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3017, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3018, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3034, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3035, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3036, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3037, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3038, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3039, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3040, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3041, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3042, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3046, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3047, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3048, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3049, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3050, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3051, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3052, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3053, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3054, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3055, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3056, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3057, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3061, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3062, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3063, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3079, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3080, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3081, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3082, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3083, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3084, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3085, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3086, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3087, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3091, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3092, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3093, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3094, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(3098, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(3099, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(3103, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(3107, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3108, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3109, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3110, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3111, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3112, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3116, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3117, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3118, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3119, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3120, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3121, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3122, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3123, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3124, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3125, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3126, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3127, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3131, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3132, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3133, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3134, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3135, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3136, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3137, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3138, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3139, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3140, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3141, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3142, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3146, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3147, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3148, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3164, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3165, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3166, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3167, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3168, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3169, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3170, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3171, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3172, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3176, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3177, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3178, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3182, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3183, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3184, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3185, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3186, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3187, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3191, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3192, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3193, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3194, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3195, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3196, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3197, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3198, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3199, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3200, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3201, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3202, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3206, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3207, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3208, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3209, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3210, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3211, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3212, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3213, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3214, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3215, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3216, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3217, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3221, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3222, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3223, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3239, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3240, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3241, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3242, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3243, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3244, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3245, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3246, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3247, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3251, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3252, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3253, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3257, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3258, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3259, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3260, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3261, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3262, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3266, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3267, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3268, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3269, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3270, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3271, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3272, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3273, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3274, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3275, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3276, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3277, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3281, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3282, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3283, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3284, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3285, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3286, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3287, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3288, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3289, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3290, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3291, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3292, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3296, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3297, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3298, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3314, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3315, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3316, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3317, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3318, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3319, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3320, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3321, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3322, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3326, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3327, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3328, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3332, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3333, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3334, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3335, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3336, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3337, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3341, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3342, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3343, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3344, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3345, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3346, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3347, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3348, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3349, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3350, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3351, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3352, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3356, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3357, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3358, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3359, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3360, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3361, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3362, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3363, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3364, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3365, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3366, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3367, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3371, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3372, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3373, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3389, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3390, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3391, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3392, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3393, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3394, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3395, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3396, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3397, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3401, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3402, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3403, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3404, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3405, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3406, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3407, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ + _(3408, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3409, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3410, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3411, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ + _(3412, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3413, ZEND_POST_INC_LONG_SPEC_CV) \ + _(3414, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3415, ZEND_POST_DEC_LONG_SPEC_CV) \ + _(3416, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ + _(3417, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3418, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3420, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3421, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ + _(3422, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3423, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3425, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3426, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ + _(3427, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3428, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3430, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3432, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3433, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3435, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3436, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ + _(3437, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3438, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3440, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3441, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ + _(3442, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3443, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3445, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3451, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ + _(3452, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3453, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3455, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3458, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ + _(3460, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ + _(3463, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR_UNUSED) \ + _(3465, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_UNUSED) \ + _(3466, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ + _(3467, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ + _(3468, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ + _(3469, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ + _(3469+1, ZEND_NULL) diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c index c3f5e9d427aa4..8cd152a635ee2 100644 --- a/Zend/zend_vm_opcodes.c +++ b/Zend/zend_vm_opcodes.c @@ -410,7 +410,7 @@ static uint32_t zend_vm_opcodes_flags[203] = { 0x00047000, 0x00040000, 0x00067000, - 0x00040373, + 0x00040b73, 0x00100101, 0x00100101, 0x00000101, From 8f318c383d19e82b2b19fe855b63409524508fcf Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 26 Jan 2023 10:06:17 +0200 Subject: [PATCH 316/895] Add specialized UTF-8 validation function for hosts with no SSE2/AVX2 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a GitHub thread, Michael Voříšek and Kamil Tekiela mentioned that the PCRE2 function `pcre_match` can be used to validate UTF-8, and that historically it was more efficient than mbstring's `mb_check_encoding`. `mb_check_encoding` is now much faster on hosts with SSE2, and much faster again on hosts with AVX2. However, while all x86-64 CPUs support at least SSE2, not all PHP users run their code on x86-64 hardware. For example, some use recent Macs with ARM CPUs. Therefore, borrow PCRE2's UTF-8 validation function as a fallback for hosts with no SSE2/AVX2 support. On long UTF-8 strings, this code is 50% faster than mbstring's existing fallback code. --- ext/mbstring/mbstring.c | 80 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ed5c3721eb748..fa466842936bb 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4620,8 +4620,8 @@ MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const * A faster implementation which uses AVX2 instructions follows */ static bool mb_fast_check_utf8_default(zend_string *str) { -# ifdef __SSE2__ unsigned char *p = (unsigned char*)ZSTR_VAL(str); +# ifdef __SSE2__ /* `e` points 1 byte past the last full 16-byte block of string content * Note that we include the terminating null byte which is included in each zend_string * as part of the content to check; this ensures that multi-byte characters which are @@ -4810,8 +4810,82 @@ static bool mb_fast_check_utf8_default(zend_string *str) return true; # else - /* No SSE2 support; we might add generic UTF-8 specific validation code here later */ - return php_mb_check_encoding(ZSTR_VAL(str), ZSTR_LEN(str), &mbfl_encoding_utf8); + /* This UTF-8 validation function is derived from PCRE2 */ + size_t length = ZSTR_LEN(str); + /* Table of the number of extra bytes, indexed by the first byte masked with + 0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */ + static const uint8_t utf8_table[] = { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3 + }; + + for (; length > 0; p++) { + uint32_t d; + unsigned char c = *p; + length--; + + if (c < 128) { + /* ASCII character */ + continue; + } + + if (c < 0xc0) { + /* Isolated 10xx xxxx byte */ + return false; + } + + if (c >= 0xf5) { + return false; + } + + uint32_t ab = utf8_table[c & 0x3f]; /* Number of additional bytes (1-3) */ + if (length < ab) { + /* Missing bytes */ + return false; + } + length -= ab; + + /* Check top bits in the second byte */ + if (((d = *(++p)) & 0xc0) != 0x80) { + return false; + } + + /* For each length, check that the remaining bytes start with the 0x80 bit + * set and not the 0x40 bit. Then check for an overlong sequence, and for the + * excluded range 0xd800 to 0xdfff. */ + switch (ab) { + case 1: + /* 2-byte character. No further bytes to check for 0x80. Check first byte + * for for xx00 000x (overlong sequence). */ + if ((c & 0x3e) == 0) { + return false; + } + break; + + case 2: + /* 3-byte character. Check third byte for 0x80. Then check first 2 bytes for + * 1110 0000, xx0x xxxx (overlong sequence) or 1110 1101, 1010 xxxx (0xd800-0xdfff) */ + if ((*(++p) & 0xc0) != 0x80 || (c == 0xe0 && (d & 0x20) == 0) || (c == 0xed && d >= 0xa0)) { + return false; + } + break; + + case 3: + /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2 + * bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a + * character greater than 0x0010ffff (f4 8f bf bf) */ + if ((*(++p) & 0xc0) != 0x80 || (*(++p) & 0xc0) != 0x80 || (c == 0xf0 && (d & 0x30) == 0) || (c > 0xf4 || (c == 0xf4 && d > 0x8f))) { + return false; + } + break; + + EMPTY_SWITCH_DEFAULT_CASE(); + } + } + + return true; # endif } From 64d908053407dfccb4575f6715fe2f44bd637da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 26 Jan 2023 23:28:34 +0100 Subject: [PATCH 317/895] random: Fix off-by-one in fast path selection of Randomizer::getBytesFromString() (#10449) With a single byte we can choose offsets between 0x00 and 0xff, thus 0x100 different offsets. We only need to use the slow path for sources of more than 0x100 bytes. The previous version was correct with regard to the output expectations, it was just slower than necessary. Better fix this now while we still can before being bound by our BC guarantees with regard to emitted sequences. This also adds a test to verify the behavior: For powers of two we never reject any values during rejection sampling, we just need to mask off the unneeded bits. Thus we can specifically verify that the number of calls to the engine match the expected amount. We also verify that all the possible values are emitted to make sure the masking does not remove any required bits. For inputs longer than 0x100 bytes we need trust the `range()` implementation to be unbiased, but still verify the number of engine calls and perform a basic output check. --- ext/random/randomizer.c | 2 +- .../methods/getBytesFromString_fast_path.phpt | 112 ++++++++++++++++++ ext/random/tests/engines.inc | 9 ++ 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 9457a27b63fcc..75d3e7fb6ddee 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -401,7 +401,7 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) retval = zend_string_alloc(length, 0); - if (source_length > 0xFF) { + if (source_length > 0x100) { while (total_size < length) { uint64_t offset = randomizer->algo->range(randomizer->status, 0, source_length - 1); diff --git a/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt b/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt new file mode 100644 index 0000000000000..fe8fcbeb3873a --- /dev/null +++ b/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt @@ -0,0 +1,112 @@ +--TEST-- +Random: Randomizer: getBytesFromString(): Fast Path Masking +--FILE-- + chr($byte), + range(0x00, 0xff) +)); + +// Xoshiro256** is the fastest engine available. +$xoshiro = new Xoshiro256StarStar(); + +var_dump(strlen($allBytes)); +echo PHP_EOL; + +// Fast path: Inputs less than or equal to 256. +for ($i = 1; $i <= strlen($allBytes); $i *= 2) { + echo "{$i}:", PHP_EOL; + + $wrapper = new TestWrapperEngine($xoshiro); + $r = new Randomizer($wrapper); + $result = $r->getBytesFromString(substr($allBytes, 0, $i), 20000); + + // Xoshiro256** is a 64 Bit engine and thus generates 8 bytes at once. + // For powers of two we expect no rejections and thus exactly + // 20000/8 = 2500 calls to the engine. + var_dump($wrapper->getCount()); + + $count = []; + for ($j = 0; $j < strlen($result); $j++) { + $b = $result[$j]; + $count[ord($b)] ??= 0; + $count[ord($b)]++; + } + + // We also expect that each possible value appears at least once, if + // not is is very likely that some bits were erroneously masked away. + var_dump(count($count)); + + echo PHP_EOL; +} + +echo "Slow Path:", PHP_EOL; + +$wrapper = new TestWrapperEngine($xoshiro); +$r = new Randomizer($wrapper); +$result = $r->getBytesFromString($allBytes . $allBytes, 20000); + +// In the slow path we expect one call per byte, i.e. 20000 +var_dump($wrapper->getCount()); + +$count = []; +for ($j = 0; $j < strlen($result); $j++) { + $b = $result[$j]; + $count[ord($b)] ??= 0; + $count[ord($b)]++; +} + +// We also expect that each possible value appears at least once, if +// not is is very likely that some bits were erroneously masked away. +var_dump(count($count)); + +?> +--EXPECT-- +int(256) + +1: +int(2500) +int(1) + +2: +int(2500) +int(2) + +4: +int(2500) +int(4) + +8: +int(2500) +int(8) + +16: +int(2500) +int(16) + +32: +int(2500) +int(32) + +64: +int(2500) +int(64) + +128: +int(2500) +int(128) + +256: +int(2500) +int(256) + +Slow Path: +int(20000) +int(256) diff --git a/ext/random/tests/engines.inc b/ext/random/tests/engines.inc index 909f581d775a1..73b070b0c7f57 100644 --- a/ext/random/tests/engines.inc +++ b/ext/random/tests/engines.inc @@ -27,14 +27,23 @@ final class TestShaEngine implements Engine final class TestWrapperEngine implements Engine { + private int $count = 0; + public function __construct(private readonly Engine $engine) { } public function generate(): string { + $this->count++; + return $this->engine->generate(); } + + public function getCount(): int + { + return $this->count; + } } final class TestXoshiro128PlusPlusEngine implements Engine From 9830204213d7bfeaac72c75cb7d508d26409bdff Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 27 Jan 2023 10:52:42 +0100 Subject: [PATCH 318/895] Handle non-INDIRECT symbol table entries in zend_fiber_object_gc() (#10386) Fixes GH-10340 --- Zend/tests/fibers/gh10340-001.phpt | 19 +++++++++++++++ Zend/tests/fibers/gh10340-002.phpt | 19 +++++++++++++++ Zend/tests/fibers/gh10340-003.phpt | 38 ++++++++++++++++++++++++++++++ Zend/zend_fibers.c | 6 +++-- 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/fibers/gh10340-001.phpt create mode 100644 Zend/tests/fibers/gh10340-002.phpt create mode 100644 Zend/tests/fibers/gh10340-003.phpt diff --git a/Zend/tests/fibers/gh10340-001.phpt b/Zend/tests/fibers/gh10340-001.phpt new file mode 100644 index 0000000000000..0c34b4a787bce --- /dev/null +++ b/Zend/tests/fibers/gh10340-001.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug GH-10340 001 (Assertion in zend_fiber_object_gc()) +--FILE-- +start(); +gc_collect_cycles(); +?> +==DONE== +--EXPECTF-- +Warning: Undefined variable $y in %s on line %d +==DONE== diff --git a/Zend/tests/fibers/gh10340-002.phpt b/Zend/tests/fibers/gh10340-002.phpt new file mode 100644 index 0000000000000..6c8f8016cbf12 --- /dev/null +++ b/Zend/tests/fibers/gh10340-002.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug GH-10340 002 (Assertion in zend_fiber_object_gc()) +--FILE-- +start(); +gc_collect_cycles(); +?> +==DONE== +--EXPECT-- +==DONE== diff --git a/Zend/tests/fibers/gh10340-003.phpt b/Zend/tests/fibers/gh10340-003.phpt new file mode 100644 index 0000000000000..6e59223a2a9c9 --- /dev/null +++ b/Zend/tests/fibers/gh10340-003.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug GH-10340 003 (Assertion in zend_fiber_object_gc()) +--FILE-- +start(); + +print "1\n"; + +$fiber = null; +gc_collect_cycles(); + +print "2\n"; +?> +==DONE== +--EXPECT-- +1 +C::__destruct +2 +==DONE== diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 432be61e652b9..caa35c61983be 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -656,8 +656,10 @@ static HashTable *zend_fiber_object_gc(zend_object *object, zval **table, int *n if (lastSymTable) { zval *val; ZEND_HASH_FOREACH_VAL(lastSymTable, val) { - ZEND_ASSERT(Z_TYPE_P(val) == IS_INDIRECT); - zend_get_gc_buffer_add_zval(buf, Z_INDIRECT_P(val)); + if (EXPECTED(Z_TYPE_P(val) == IS_INDIRECT)) { + val = Z_INDIRECT_P(val); + } + zend_get_gc_buffer_add_zval(buf, val); } ZEND_HASH_FOREACH_END(); } lastSymTable = symTable; From 1173c2e64a52dc95dd9bd220393db5efc50ae6db Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 27 Jan 2023 19:32:25 +0100 Subject: [PATCH 319/895] Prevent dtor of generator in suspended fiber (#10462) Generators that suspended a fiber should not be dtor because they will be executed during the fiber dtor. Fiber dtor throws an exception in the fiber's context in order to unwind and execute finally blocks, which will also properly dtor the generator. Fixes GH-9916 --- Zend/tests/gh9916-001.phpt | 27 ++++++++++++++++++ Zend/tests/gh9916-002.phpt | 21 ++++++++++++++ Zend/tests/gh9916-003.phpt | 36 ++++++++++++++++++++++++ Zend/tests/gh9916-004.phpt | 26 +++++++++++++++++ Zend/tests/gh9916-005.phpt | 25 +++++++++++++++++ Zend/tests/gh9916-006.phpt | 37 +++++++++++++++++++++++++ Zend/tests/gh9916-007.phpt | 57 ++++++++++++++++++++++++++++++++++++++ Zend/tests/gh9916-008.phpt | 47 +++++++++++++++++++++++++++++++ Zend/tests/gh9916-009.phpt | 35 +++++++++++++++++++++++ Zend/tests/gh9916-010.phpt | 34 +++++++++++++++++++++++ Zend/tests/gh9916-011.phpt | 41 +++++++++++++++++++++++++++ Zend/zend_generators.c | 12 +++++++- Zend/zend_generators.h | 1 + 13 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/gh9916-001.phpt create mode 100644 Zend/tests/gh9916-002.phpt create mode 100644 Zend/tests/gh9916-003.phpt create mode 100644 Zend/tests/gh9916-004.phpt create mode 100644 Zend/tests/gh9916-005.phpt create mode 100644 Zend/tests/gh9916-006.phpt create mode 100644 Zend/tests/gh9916-007.phpt create mode 100644 Zend/tests/gh9916-008.phpt create mode 100644 Zend/tests/gh9916-009.phpt create mode 100644 Zend/tests/gh9916-010.phpt create mode 100644 Zend/tests/gh9916-011.phpt diff --git a/Zend/tests/gh9916-001.phpt b/Zend/tests/gh9916-001.phpt new file mode 100644 index 0000000000000..3e518807238bc --- /dev/null +++ b/Zend/tests/gh9916-001.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug GH-9916 001 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== +Finally diff --git a/Zend/tests/gh9916-002.phpt b/Zend/tests/gh9916-002.phpt new file mode 100644 index 0000000000000..6f0b81cf3e91a --- /dev/null +++ b/Zend/tests/gh9916-002.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug GH-9916 002 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== diff --git a/Zend/tests/gh9916-003.phpt b/Zend/tests/gh9916-003.phpt new file mode 100644 index 0000000000000..c4bfb815118bc --- /dev/null +++ b/Zend/tests/gh9916-003.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug GH-9916 003 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== +Finally (inner) +Finally diff --git a/Zend/tests/gh9916-004.phpt b/Zend/tests/gh9916-004.phpt new file mode 100644 index 0000000000000..1a51a841e8bb6 --- /dev/null +++ b/Zend/tests/gh9916-004.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug GH-9916 004 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== diff --git a/Zend/tests/gh9916-005.phpt b/Zend/tests/gh9916-005.phpt new file mode 100644 index 0000000000000..f84c756919cd0 --- /dev/null +++ b/Zend/tests/gh9916-005.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug GH-9916 005 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +send($fiber); + $gen->current(); +}); +$fiber->start(); + +$gen = null; +$fiber = null; +gc_collect_cycles(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== diff --git a/Zend/tests/gh9916-006.phpt b/Zend/tests/gh9916-006.phpt new file mode 100644 index 0000000000000..28c57105c7b1f --- /dev/null +++ b/Zend/tests/gh9916-006.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug GH-9916 006 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Fiber return\n"; +}); +$fiber->start(); +$fiber->resume(); +$gen->next(); +$gen->current(); +?> +==DONE== +--EXPECT-- +Before suspend +After suspend +Fiber return +Before exit diff --git a/Zend/tests/gh9916-007.phpt b/Zend/tests/gh9916-007.phpt new file mode 100644 index 0000000000000..e1ec3fb19f32b --- /dev/null +++ b/Zend/tests/gh9916-007.phpt @@ -0,0 +1,57 @@ +--TEST-- +Bug GH-9916 007 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== +Finally (iterator) +Finally diff --git a/Zend/tests/gh9916-008.phpt b/Zend/tests/gh9916-008.phpt new file mode 100644 index 0000000000000..84521d69e2120 --- /dev/null +++ b/Zend/tests/gh9916-008.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug GH-9916 008 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Not executed"; +}); +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before suspend +==DONE== diff --git a/Zend/tests/gh9916-009.phpt b/Zend/tests/gh9916-009.phpt new file mode 100644 index 0000000000000..75643d871dea0 --- /dev/null +++ b/Zend/tests/gh9916-009.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug GH-9916 009 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- + new stdClass]; + print "Not executed\n"; + } +})(); +$fiber = new Fiber(function() use ($gen, &$fiber) { + $gen->current(); + print "Not executed\n"; +}); +$fiber->start(); +?> +==DONE== +--EXPECTF-- +Before suspend +==DONE== +Finally + +Fatal error: Uncaught Error: Cannot use "yield from" in a force-closed generator in %s:%d +Stack trace: +#0 [internal function]: {closure}() +#1 %s(%d): Generator->current() +#2 [internal function]: {closure}() +#3 {main} + thrown in %s on line %d diff --git a/Zend/tests/gh9916-010.phpt b/Zend/tests/gh9916-010.phpt new file mode 100644 index 0000000000000..d3a841d7ceb31 --- /dev/null +++ b/Zend/tests/gh9916-010.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug GH-9916 010 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); + print "Before next\n"; + $gen->next(); + print "Not executed\n"; +}); + +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before current +Before yield +Before yield 2 +Before next +Before suspend +==DONE== diff --git a/Zend/tests/gh9916-011.phpt b/Zend/tests/gh9916-011.phpt new file mode 100644 index 0000000000000..05fa884c29337 --- /dev/null +++ b/Zend/tests/gh9916-011.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug GH-9916 011 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +next(); + } +})(); + +$fiber = new Fiber(function () use ($gen, &$fiber) { + print "Before current\n"; + $gen->current(); + print "Before next\n"; + $gen->next(); + print "Not executed\n"; +}); + +$fiber->start(); +?> +==DONE== +--EXPECT-- +Before current +Before yield +Before yield 2 +Before next +Before suspend +==DONE== diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index d5253e46eddf2..24316dc4e896b 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -223,6 +223,14 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */ uint32_t op_num, try_catch_offset; int i; + /* Generator is running in a suspended fiber. + * Will be dtor during fiber dtor */ + if (generator->flags & ZEND_GENERATOR_IN_FIBER) { + /* Prevent finally blocks from yielding */ + generator->flags |= ZEND_GENERATOR_FORCED_CLOSE; + return; + } + /* leave yield from mode to properly allow finally execution */ if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) { zval_ptr_dtor(&generator->values); @@ -727,7 +735,8 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ } /* Resume execution */ - generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING; + generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING + | (EG(active_fiber) ? ZEND_GENERATOR_IN_FIBER : 0); if (!ZEND_OBSERVER_ENABLED) { zend_execute_ex(generator->execute_data); } else { @@ -778,6 +787,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ goto try_again; } + generator->flags &= ~ZEND_GENERATOR_IN_FIBER; orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT; } /* }}} */ diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h index 17b25a99b87c1..4ccc42b92f668 100644 --- a/Zend/zend_generators.h +++ b/Zend/zend_generators.h @@ -92,6 +92,7 @@ static const zend_uchar ZEND_GENERATOR_CURRENTLY_RUNNING = 0x1; static const zend_uchar ZEND_GENERATOR_FORCED_CLOSE = 0x2; static const zend_uchar ZEND_GENERATOR_AT_FIRST_YIELD = 0x4; static const zend_uchar ZEND_GENERATOR_DO_INIT = 0x8; +static const zend_uchar ZEND_GENERATOR_IN_FIBER = 0x10; void zend_register_generator_ce(void); ZEND_API void zend_generator_close(zend_generator *generator, bool finished_execution); From d7de73b551a2499290c2b8afe1d899d00432b706 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:33:58 +0100 Subject: [PATCH 320/895] Fix overflow check in OnUpdateMemoryConsumption (#10456) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit memsize is a signed long, therefore the check against the (*un*signed long maximum) / 1024² will allow too large values. This check worked correctly in d4b3f89c53f8 where it checked against the maximum signed value, but was broken in 003346c450b5. Fix it by changing ZEND_ULONG_MAX to ZEND_LONG_MAX. --- ext/opcache/zend_accelerator_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index da1696bb92083..2300ee2964bea 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -70,8 +70,8 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption) zend_accel_error(ACCEL_LOG_WARNING, "opcache.memory_consumption is set below the required 8MB.\n"); return FAILURE; } - if (UNEXPECTED(memsize > ZEND_ULONG_MAX / (1024 * 1024))) { - *p = ZEND_ULONG_MAX; + if (UNEXPECTED(memsize > ZEND_LONG_MAX / (1024 * 1024))) { + *p = ZEND_LONG_MAX; } else { *p = memsize * (1024 * 1024); } From a24ac59e553c0df88bb6acd8f53a4ff8fb944139 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 27 Jan 2023 19:36:28 +0100 Subject: [PATCH 321/895] [ci skip] NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index d8028bf92a63c..411201c1acca1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) . Fixed incorrect check condition in type inference. (nielsdos) + . Fixed overflow check in OnUpdateMemoryConsumption. (nielsdos) + . Fixed bug GH-9916 (Entering shutdown sequence with a fiber suspended in a + Generator emits an unavoidable fatal error or crashes). (Arnaud) - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) From cfb6e82cbd1e00d8271c05b9a78ce3fc1acb68f7 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 27 Jan 2023 19:37:27 +0100 Subject: [PATCH 322/895] [ci skip] NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index b1abfcaf440f0..5594fb3855dd9 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ PHP NEWS . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) . Fixed incorrect check condition in type inference. (nielsdos) . Fix incorrect check in zend_internal_call_should_throw(). (nielsdos) + . Fixed overflow check in OnUpdateMemoryConsumption. (nielsdos) + . Fixed bug GH-9916 (Entering shutdown sequence with a fiber suspended in a + Generator emits an unavoidable fatal error or crashes). (Arnaud) - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) From dc6fbec037951cff2532c44005ecd38db55cfad7 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 28 Jan 2023 11:48:46 +0100 Subject: [PATCH 323/895] Fix missing zend_shared_alloc_unlock() (#10405) This code was refactored and the unlock was forgotten. The following assertion is triggered in debug mode: zend_shared_alloc_lock: Assertion `!(accel_globals.locked)' failed. And in release mode this likely deadlocks. Fix this by re-adding the unlock. --- ext/opcache/ZendAccelerator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index a7f9431a06cfd..0d589c7c61d0f 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4788,6 +4788,7 @@ static int accel_finish_startup(void) } if (pid == -1) { /* no subprocess was needed */ + /* The called function unlocks the shared alloc lock */ return accel_finish_startup_preload(false); } else if (pid == 0) { /* subprocess */ int ret = accel_finish_startup_preload(true); @@ -4805,6 +4806,8 @@ static int accel_finish_startup(void) preload_load(); } + zend_shared_alloc_unlock(); + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { return SUCCESS; } else { From 306a72add490a09bdbd0c73682c053be785b3ca7 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 28 Jan 2023 11:49:14 +0100 Subject: [PATCH 324/895] Add test for GH-10405 --- ext/opcache/tests/gh10405.inc | 2 ++ ext/opcache/tests/gh10405.phpt | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ext/opcache/tests/gh10405.inc create mode 100644 ext/opcache/tests/gh10405.phpt diff --git a/ext/opcache/tests/gh10405.inc b/ext/opcache/tests/gh10405.inc new file mode 100644 index 0000000000000..cd6cb00097caa --- /dev/null +++ b/ext/opcache/tests/gh10405.inc @@ -0,0 +1,2 @@ + +--FILE-- + +OK +--EXPECTF-- +bool(false) +included +OK From 284c29328ee2116c3025482188d2bd880a7f3f37 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 28 Jan 2023 10:13:58 -0600 Subject: [PATCH 325/895] Fix GH-10437: Set active fiber to null on bailout (#10443) --- NEWS | 2 ++ Zend/tests/fibers/gh10437.phpt | 18 ++++++++++++++++++ Zend/zend_fibers.c | 1 + 3 files changed, 21 insertions(+) create mode 100644 Zend/tests/fibers/gh10437.phpt diff --git a/NEWS b/NEWS index 411201c1acca1..3583a625cf8cb 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ PHP NEWS . Fixed overflow check in OnUpdateMemoryConsumption. (nielsdos) . Fixed bug GH-9916 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes). (Arnaud) + . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown + function after bailout). (trowski) - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) diff --git a/Zend/tests/fibers/gh10437.phpt b/Zend/tests/fibers/gh10437.phpt new file mode 100644 index 0000000000000..5c793c986ee29 --- /dev/null +++ b/Zend/tests/fibers/gh10437.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout) +--FILE-- +start(); + +?> +--EXPECTF-- +Fatal error: Bailout in fiber in %sgh10437.php on line %d +NULL diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index caa35c61983be..051a9dceaea7a 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -543,6 +543,7 @@ static zend_always_inline zend_fiber_transfer zend_fiber_switch_to( /* Forward bailout into current fiber. */ if (UNEXPECTED(transfer.flags & ZEND_FIBER_TRANSFER_FLAG_BAILOUT)) { + EG(active_fiber) = NULL; zend_bailout(); } From 5e1b9666a9a571077986c9be603858961c55c669 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 28 Jan 2023 10:18:12 -0600 Subject: [PATCH 326/895] [ci skip] NEWS --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5594fb3855dd9..6fbe29aae41ec 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ PHP NEWS . Fixed overflow check in OnUpdateMemoryConsumption. (nielsdos) . Fixed bug GH-9916 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes). (Arnaud) + . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown + function after bailout). (trowski) - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) @@ -554,4 +556,3 @@ PHP NEWS . On Windows, the Zip extension is now built as shared library (DLL) by default. (cmb) . Implement fseek for zip stream when possible with libzip 1.9.1. (Remi) - From ec4939b170caca3602c0e1e739c0ab28aa5d5208 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:07:35 +0100 Subject: [PATCH 327/895] Fix incorrect check in phar tar parsing The entry.flags was used to check whether the entry has the directory flag. The flags however were masked to only contain the permissions. We need to check the mode, before the permission masking, instead of the flags to check whether it is a directory. Closes GH-10464 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/phar/tar.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 3583a625cf8cb..8d7c133fc4a2e 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS - Opcache: . Fix incorrect page_size check. (nielsdos) +- Phar: + . Fix incorrect check in phar tar parsing. (nielsdos) + - Standard: . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) diff --git a/ext/phar/tar.c b/ext/phar/tar.c index e56d3e8e3211c..99b6b9812de18 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -478,14 +478,15 @@ int phar_parse_tarfile(php_stream* fp, char *fname, size_t fname_len, char *alia return FAILURE; } + uint32_t entry_mode = phar_tar_number(hdr->mode, sizeof(hdr->mode)); entry.tar_type = ((old & (hdr->typeflag == '\0')) ? TAR_FILE : hdr->typeflag); entry.offset = entry.offset_abs = pos; /* header_offset unused in tar */ entry.fp_type = PHAR_FP; - entry.flags = phar_tar_number(hdr->mode, sizeof(hdr->mode)) & PHAR_ENT_PERM_MASK; + entry.flags = entry_mode & PHAR_ENT_PERM_MASK; entry.timestamp = phar_tar_number(hdr->mtime, sizeof(hdr->mtime)); entry.is_persistent = myphar->is_persistent; - if (old && entry.tar_type == TAR_FILE && S_ISDIR(entry.flags)) { + if (old && entry.tar_type == TAR_FILE && S_ISDIR(entry_mode)) { entry.tar_type = TAR_DIR; } From 908d954de05e592cb2612bdce6ce8661be9dead1 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 28 Jan 2023 19:44:37 +0000 Subject: [PATCH 328/895] sockets updlite protocol support, with checksum coverage settings. Close GH-10468 --- NEWS | 2 ++ UPGRADING | 3 +++ ext/sockets/sockets.stub.php | 21 +++++++++++++++++++++ ext/sockets/sockets_arginfo.h | 11 ++++++++++- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d5e883d9d7745..ec0475c4779ef 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,8 @@ PHP NEWS ACK delays. (David Carlier) . Added DONTFRAGMENT support for path MTU discovery purpose. (David Carlier) . Added AF_DIVERT for raw socket for divert ports. (David Carlier) + . Added SOL_UPDLITE, UDPLITE_RECV_CSCOV and UDPLITE_SEND_CSCOV for updlite + protocol support. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index 589692aa1e446..9b5febd600377 100644 --- a/UPGRADING +++ b/UPGRADING @@ -141,6 +141,9 @@ PHP 8.3 UPGRADE NOTES . IP_PMTUDISC_INTERFACE (Linux only). . IP_PMTUDISC_OMIT (Linux only). . AF_DIVERT (FreeBSD only). + . SOL_UDPLITE. + . UDPLITE_RECV_CSCOV. + . UDPLITE_SEND_CSCOV. ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 2db842810a611..82969270fb846 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -1525,6 +1525,13 @@ * @cvalue IPPROTO_UDP */ const SOL_UDP = UNKNOWN; +#ifdef IPPROTO_UDPLITE +/** + * @var int + * @cvalue IPPROTO_UDPLITE + */ +const SOL_UDPLITE = UNKNOWN; +#endif #if HAVE_IPV6 /** @@ -1769,6 +1776,20 @@ */ const IP_PMTUDISC_OMIT = UNKNOWN; #endif +#if defined(UDPLITE_SEND_CSCOV) +/** + * @var int + * @cvalue UDPLITE_SEND_CSCOV + */ +const UDPLITE_SEND_CSCOV = UNKNOWN; +#endif +#if defined(UDPLITE_RECV_CSCOV) +/** + * @var int + * @cvalue UDPLITE_RECV_CSCOV + */ +const UDPLITE_RECV_CSCOV = UNKNOWN; +#endif /** * @strict-properties diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index eca944ba52136..f630d829f4cd6 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bf1d22072bd147128a33d82f8b3fc441cf95156a */ + * Stub hash: d02c3c772eab5d9c1310839d2464887993f8e8de */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -915,6 +915,9 @@ static void register_sockets_symbols(int module_number) #endif REGISTER_LONG_CONSTANT("SOL_TCP", IPPROTO_TCP, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SOL_UDP", IPPROTO_UDP, CONST_PERSISTENT); +#if defined(IPPROTO_UDPLITE) + REGISTER_LONG_CONSTANT("SOL_UDPLITE", IPPROTO_UDPLITE, CONST_PERSISTENT); +#endif #if HAVE_IPV6 REGISTER_LONG_CONSTANT("IPV6_UNICAST_HOPS", IPV6_UNICAST_HOPS, CONST_PERSISTENT); #endif @@ -1018,6 +1021,12 @@ static void register_sockets_symbols(int module_number) #if defined(IP_PMTUDISC_OMIT) REGISTER_LONG_CONSTANT("IP_PMTUDISC_OMIT", IP_PMTUDISC_OMIT, CONST_PERSISTENT); #endif +#if defined(UDPLITE_SEND_CSCOV) + REGISTER_LONG_CONSTANT("UDPLITE_SEND_CSCOV", UDPLITE_SEND_CSCOV, CONST_PERSISTENT); +#endif +#if defined(UDPLITE_RECV_CSCOV) + REGISTER_LONG_CONSTANT("UDPLITE_RECV_CSCOV", UDPLITE_RECV_CSCOV, CONST_PERSISTENT); +#endif } static zend_class_entry *register_class_Socket(void) From 81607a62ca85d016699e16344a5cebca9edba46a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 30 Jan 2023 13:15:05 +0300 Subject: [PATCH 329/895] Fix type inference Fixes oss-fuzz #55358 --- Zend/Optimizer/zend_inference.c | 18 ++++++++++++-- ext/opcache/tests/jit/assign_obj_op_003.phpt | 26 ++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 ext/opcache/tests/jit/assign_obj_op_003.phpt diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index dfb70a3dcabf0..33b01dda038f4 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -2537,12 +2537,26 @@ static zend_always_inline int _zend_update_type_info( } else if (opline->opcode == ZEND_ASSIGN_OBJ_OP) { /* The return value must also satisfy the property type */ if (prop_info) { - tmp &= zend_fetch_prop_type(script, prop_info, NULL); + t1 = zend_fetch_prop_type(script, prop_info, NULL); + if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG + && (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) { + /* DOUBLE may be auto-converted to LONG */ + tmp |= MAY_BE_LONG; + tmp &= ~MAY_BE_DOUBLE; + } + tmp &= t1; } } else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) { /* The return value must also satisfy the property type */ if (prop_info) { - tmp &= zend_fetch_prop_type(script, prop_info, NULL); + t1 = zend_fetch_prop_type(script, prop_info, NULL); + if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG + && (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) { + /* DOUBLE may be auto-converted to LONG */ + tmp |= MAY_BE_LONG; + tmp &= ~MAY_BE_DOUBLE; + } + tmp &= t1; } } else { if (tmp & MAY_BE_REF) { diff --git a/ext/opcache/tests/jit/assign_obj_op_003.phpt b/ext/opcache/tests/jit/assign_obj_op_003.phpt new file mode 100644 index 0000000000000..325583e84d912 --- /dev/null +++ b/ext/opcache/tests/jit/assign_obj_op_003.phpt @@ -0,0 +1,26 @@ +--TEST-- +JIT ASSIGN_OBJ_OP: invalid type inference +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- +bar += 1.3; + } catch(y) { + } + } +} +var_dump(new Foo); +?> +--EXPECTF-- +Deprecated: Implicit conversion from float 1.3 to int loses precision in %sassign_obj_op_003.php on line 6 +object(Foo)#1 (1) { + ["bar"]=> + int(1) +} From b9bca2dadb0d8d554615f944c3fbff6e0750d72d Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Mon, 30 Jan 2023 11:59:12 +0100 Subject: [PATCH 330/895] Fix resetting ZEND_GENERATOR_IN_FIBER flag Signed-off-by: Bob Weinand --- Zend/tests/gh9916-012.phpt | 17 +++++++++++++++++ Zend/zend_generators.c | 3 +-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/gh9916-012.phpt diff --git a/Zend/tests/gh9916-012.phpt b/Zend/tests/gh9916-012.phpt new file mode 100644 index 0000000000000..cd31ea1215b64 --- /dev/null +++ b/Zend/tests/gh9916-012.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug GH-9916 012 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) +--FILE-- +current(); +}); +$fiber->start(); + +?> +==DONE== +--EXPECT-- +==DONE== diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 24316dc4e896b..65feafc1b6923 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -747,7 +747,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ zend_observer_fcall_end(generator->execute_data, &generator->value); } } - generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING; + generator->flags &= ~(ZEND_GENERATOR_CURRENTLY_RUNNING | ZEND_GENERATOR_IN_FIBER); generator->frozen_call_stack = NULL; if (EXPECTED(generator->execute_data) && @@ -787,7 +787,6 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ goto try_again; } - generator->flags &= ~ZEND_GENERATOR_IN_FIBER; orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT; } /* }}} */ From 00be6e1aed5e55c04f716a7364ff55e698e154a5 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Mon, 30 Jan 2023 12:32:53 +0100 Subject: [PATCH 331/895] Look at executing generator for fiber destructor behaviour --- Zend/tests/fibers/get-return-after-bailout.phpt | 7 +++++++ Zend/tests/generators/gh9801.phpt | 7 +++++++ Zend/zend_generators.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Zend/tests/fibers/get-return-after-bailout.phpt b/Zend/tests/fibers/get-return-after-bailout.phpt index 0f004070251b5..04bd464cfab0e 100644 --- a/Zend/tests/fibers/get-return-after-bailout.phpt +++ b/Zend/tests/fibers/get-return-after-bailout.phpt @@ -1,5 +1,12 @@ --TEST-- Fiber::getReturn() after bailout +--SKIPIF-- + --FILE-- --FILE-- flags & ZEND_GENERATOR_IN_FIBER) { + if (zend_generator_get_current(generator)->flags & ZEND_GENERATOR_IN_FIBER) { /* Prevent finally blocks from yielding */ generator->flags |= ZEND_GENERATOR_FORCED_CLOSE; return; From 3eb9dd47e04c4fd3eb220f637c556217bdb088df Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 21 Dec 2021 20:01:55 +0000 Subject: [PATCH 332/895] Use bool and zend_result where it makes sense in sockets extension --- ext/sockets/multicast.c | 18 +++++++++--------- ext/sockets/multicast.h | 6 +++--- ext/sockets/php_sockets.h | 2 +- ext/sockets/sockaddr_conv.c | 2 +- ext/sockets/sockets.c | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index ef32661be09ff..82672e68f2bab 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -59,7 +59,7 @@ static const char *_php_source_op_to_string(enum source_op sop); static int _php_source_op_to_ipv4_op(enum source_op sop); #endif -int php_string_to_if_index(const char *val, unsigned *out) +zend_result php_string_to_if_index(const char *val, unsigned *out) { #if HAVE_IF_NAMETOINDEX unsigned int ind; @@ -81,7 +81,7 @@ int php_string_to_if_index(const char *val, unsigned *out) #endif } -static int php_get_if_index_from_zval(zval *val, unsigned *out) +static zend_result php_get_if_index_from_zval(zval *val, unsigned *out) { int ret; @@ -104,7 +104,7 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out) -static int php_get_if_index_from_array(const HashTable *ht, const char *key, +static zend_result php_get_if_index_from_array(const HashTable *ht, const char *key, php_socket *sock, unsigned int *if_index) { zval *val; @@ -117,7 +117,7 @@ static int php_get_if_index_from_array(const HashTable *ht, const char *key, return php_get_if_index_from_zval(val, if_index); } -static int php_get_address_from_array(const HashTable *ht, const char *key, +static zend_result php_get_address_from_array(const HashTable *ht, const char *key, php_socket *sock, php_sockaddr_storage *ss, socklen_t *ss_len) { zval *val; @@ -136,7 +136,7 @@ static int php_get_address_from_array(const HashTable *ht, const char *key, return SUCCESS; } -static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *arg4) +static zend_result php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *arg4) { HashTable *opt_ht; unsigned int if_index; @@ -616,7 +616,7 @@ static int _php_source_op_to_ipv4_op(enum source_op sop) #endif /* HAS_MCAST_EXT */ #ifdef PHP_WIN32 -int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) +zend_result php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) { MIB_IPADDRTABLE *addr_table; ULONG size; @@ -659,7 +659,7 @@ int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_add return FAILURE; } -int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) +zend_result php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) { MIB_IPADDRTABLE *addr_table; ULONG size; @@ -709,7 +709,7 @@ int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *i #else -int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) +zend_result php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) { struct ifreq if_req; @@ -746,7 +746,7 @@ int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_add return SUCCESS; } -int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) +zend_result php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) { struct ifconf if_conf = {0}; char *buf = NULL, diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h index 1e7a0daeb2f20..0362b269728f1 100644 --- a/ext/sockets/multicast.h +++ b/ext/sockets/multicast.h @@ -51,17 +51,17 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, int optname, zval *arg4); -int php_if_index_to_addr4( +zend_result php_if_index_to_addr4( unsigned if_index, php_socket *php_sock, struct in_addr *out_addr); -int php_add4_to_if_index( +zend_result php_add4_to_if_index( struct in_addr *addr, php_socket *php_sock, unsigned *if_index); -int php_string_to_if_index(const char *val, unsigned *out); +zend_result php_string_to_if_index(const char *val, unsigned *out); int php_mcast_join( php_socket *sock, diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index fdbc636538cf7..93eba9da0731a 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -126,7 +126,7 @@ enum sockopt_return { }; PHP_SOCKETS_API char *sockets_strerror(int error); -PHP_SOCKETS_API int socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock); +PHP_SOCKETS_API bool socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock); #else #define phpext_sockets_ptr NULL diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c index 6ec540931f725..e4a7347cafab3 100644 --- a/ext/sockets/sockaddr_conv.c +++ b/ext/sockets/sockaddr_conv.c @@ -9,7 +9,7 @@ #include #endif -extern int php_string_to_if_index(const char *val, unsigned *out); +extern zend_result php_string_to_if_index(const char *val, unsigned *out); #if HAVE_IPV6 /* Sets addr by hostname, or by ip in string form (AF_INET6) */ diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 573b3976701f6..67d4b6630e520 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -223,7 +223,7 @@ ZEND_GET_MODULE(sockets) int inet_ntoa_lock = 0; #endif -static int php_open_listen_sock(php_socket *sock, int port, int backlog) /* {{{ */ +static bool php_open_listen_sock(php_socket *sock, int port, int backlog) /* {{{ */ { struct sockaddr_in la; struct hostent *hp; @@ -266,7 +266,7 @@ static int php_open_listen_sock(php_socket *sock, int port, int backlog) /* {{{ } /* }}} */ -static int php_accept_connect(php_socket *in_sock, php_socket *out_sock, struct sockaddr *la, socklen_t *la_len) /* {{{ */ +static bool php_accept_connect(php_socket *in_sock, php_socket *out_sock, struct sockaddr *la, socklen_t *la_len) /* {{{ */ { out_sock->bsd_socket = accept(in_sock->bsd_socket, la, la_len); @@ -2179,7 +2179,7 @@ PHP_FUNCTION(socket_clear_error) } /* }}} */ -int socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock) +bool socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock) { #ifdef SO_DOMAIN int type; From 735edd1c177e896d5a44144615626cd2b6a62a5b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 21 Dec 2021 20:03:19 +0000 Subject: [PATCH 333/895] Voidify php_sock_array_from_fd_set() as result is never used --- ext/sockets/sockets.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 67d4b6630e520..b73166f75a8c5 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -526,14 +526,13 @@ static int php_sock_array_to_fd_set(uint32_t arg_num, zval *sock_array, fd_set * } /* }}} */ -static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */ +static void php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */ { zval *element; zval *dest_element; php_socket *php_sock; zval new_hash; - int num = 0; - zend_ulong num_key; + zend_ulong num_key; zend_string *key; ZEND_ASSERT(Z_TYPE_P(sock_array) == IS_ARRAY); @@ -557,15 +556,12 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */ Z_ADDREF_P(dest_element); } } - num++; } ZEND_HASH_FOREACH_END(); /* Destroy old array, add new one */ zval_ptr_dtor(sock_array); ZVAL_COPY_VALUE(sock_array, &new_hash); - - return num ? 1 : 0; } /* }}} */ From 93fb2c12b90dc5bec261ae7150ba219d748db1de Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 30 Jan 2023 18:57:12 +0000 Subject: [PATCH 334/895] Bring minimum precision inline with spprintf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The precision "minimum" for spprintf was changed in 3f23e6bca90545a180ac4dbc80712065b1281d74 with the cryptic comment "Enable 0 mode for echo/print". Since then the behaviour of spprintf and snprintf has not been the same. This results in some APIs handling precision differently than others, which then resulted in the following Xdebug issue: https://bugs.xdebug.org/view.php?id=2151 The "manpage" for snprinf says about precision: An optional precision, in the form of a period ('.') followed by an optional decimal digit string. Instead of a decimal digit string one may write "*" or "*m$" (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, re‐ spectively, which must be of type int. If the precision is given as just '.', the precision is taken to be zero. A negative precision is taken as if the precision were omitted. However, the snprintf implementation never supported this "negative precision", which is what PHP's default setting is in PG(precision). However, in 3f23e6bca90545a180ac4dbc80712065b1281d74 spprintf was made to support this. Although this techinically can break BC, there is clearly a bug here, and I could not see any failing tests locally. --- main/snprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/snprintf.c b/main/snprintf.c index 3c379c5c2ce18..9acd4efe6d772 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -580,8 +580,8 @@ static size_t format_converter(buffy * odp, const char *fmt, va_list ap) /* {{{ } else if (*fmt == '*') { precision = va_arg(ap, int); fmt++; - if (precision < 0) - precision = 0; + if (precision < -1) + precision = -1; } else precision = 0; } else From 85fbc6eaa6cd596f67d533091b50b2e2fcf9b601 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 25 Jan 2023 17:40:28 +0000 Subject: [PATCH 335/895] Fix GH-10152: Custom properties of Date's child classes are not serialised --- ext/date/php_date.c | 165 ++++++++++++++++-- ...TimeImmutable_inherited_serialization.phpt | 23 +++ ...t => DateTimeImmutable_serialization.phpt} | 0 ...eTimeInterval_inherited_serialization.phpt | 22 +++ ...ateTimePeriod_inherited_serialization.phpt | 25 +++ .../DateTimeZone_inherited_serialization.phpt | 22 +++ ...n.phpt => DateTimeZone_serialization.phpt} | 0 .../DateTime_inherited_serialization.phpt | 23 +++ ...ation.phpt => DateTime_serialization.phpt} | 0 ext/date/tests/bug53437_var3.phpt | 2 +- ext/date/tests/bug53437_var5.phpt | 2 +- ext/date/tests/bug53437_var6.phpt | 2 +- ext/date/tests/bug79015.phpt | 2 +- ext/date/tests/gh10152.phpt | 23 +++ 14 files changed, 288 insertions(+), 23 deletions(-) create mode 100644 ext/date/tests/DateTimeImmutable_inherited_serialization.phpt rename ext/date/tests/{DateTimeImmutable_serialisation.phpt => DateTimeImmutable_serialization.phpt} (100%) create mode 100644 ext/date/tests/DateTimeInterval_inherited_serialization.phpt create mode 100644 ext/date/tests/DateTimePeriod_inherited_serialization.phpt create mode 100644 ext/date/tests/DateTimeZone_inherited_serialization.phpt rename ext/date/tests/{DateTimeZone_serialisation.phpt => DateTimeZone_serialization.phpt} (100%) create mode 100644 ext/date/tests/DateTime_inherited_serialization.phpt rename ext/date/tests/{DateTime_serialisation.phpt => DateTime_serialization.phpt} (100%) create mode 100644 ext/date/tests/gh10152.phpt diff --git a/ext/date/php_date.c b/ext/date/php_date.c index fd13e98100848..5a29093e1a0d0 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2254,6 +2254,19 @@ static void date_object_free_storage_period(zend_object *object) /* {{{ */ zend_object_std_dtor(&intern->std); } /* }}} */ +static void add_common_properties(HashTable *myht, zend_object *zobj) +{ + HashTable *common; + zend_string *name; + zval *prop; + + common = zend_std_get_properties(zobj); + + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_IND(common, name, prop) { + zend_hash_add(myht, name, prop); + } ZEND_HASH_FOREACH_END(); +} + /* Advanced Interface */ PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object) /* {{{ */ { @@ -2733,6 +2746,8 @@ PHP_METHOD(DateTime, __serialize) array_init(return_value); myht = Z_ARRVAL_P(return_value); date_object_to_hash(dateobj, myht); + + add_common_properties(myht, &dateobj->std); } /* }}} */ @@ -2751,9 +2766,36 @@ PHP_METHOD(DateTimeImmutable, __serialize) array_init(return_value); myht = Z_ARRVAL_P(return_value); date_object_to_hash(dateobj, myht); + + add_common_properties(myht, &dateobj->std); } /* }}} */ +static bool date_time_is_internal_property(zend_string *name) +{ + if ( + zend_string_equals_literal(name, "date") || + zend_string_equals_literal(name, "timezone_type") || + zend_string_equals_literal(name, "timezone") + ) { + return 1; + } + return 0; +} + +static void restore_custom_datetime_properties(zval *object, HashTable *myht) +{ + zend_string *prop_name; + zval *prop_val; + + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { + if (date_time_is_internal_property(prop_name)) { + continue; + } + add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); + } ZEND_HASH_FOREACH_END(); +} + /* {{{ */ PHP_METHOD(DateTime, __unserialize) { @@ -2772,6 +2814,8 @@ PHP_METHOD(DateTime, __unserialize) if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTime object"); } + + restore_custom_datetime_properties(object, myht); } /* }}} */ @@ -2793,6 +2837,8 @@ PHP_METHOD(DateTimeImmutable, __unserialize) if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTimeImmutable object"); } + + restore_custom_datetime_properties(object, myht); } /* }}} */ @@ -3753,9 +3799,35 @@ PHP_METHOD(DateTimeZone, __serialize) array_init(return_value); myht = Z_ARRVAL_P(return_value); date_timezone_object_to_hash(tzobj, myht); + + add_common_properties(myht, &tzobj->std); } /* }}} */ +static bool date_timezone_is_internal_property(zend_string *name) +{ + if ( + zend_string_equals_literal(name, "timezone_type") || + zend_string_equals_literal(name, "timezone") + ) { + return 1; + } + return 0; +} + +static void restore_custom_datetimezone_properties(zval *object, HashTable *myht) +{ + zend_string *prop_name; + zval *prop_val; + + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { + if (date_timezone_is_internal_property(prop_name)) { + continue; + } + add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); + } ZEND_HASH_FOREACH_END(); +} + /* {{{ */ PHP_METHOD(DateTimeZone, __unserialize) { @@ -3774,6 +3846,8 @@ PHP_METHOD(DateTimeZone, __unserialize) if (!php_date_timezone_initialize_from_hash(&object, &tzobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTimeZone object"); } + + restore_custom_datetimezone_properties(object, myht); } /* }}} */ @@ -4344,9 +4418,44 @@ PHP_METHOD(DateInterval, __serialize) array_init(return_value); myht = Z_ARRVAL_P(return_value); date_interval_object_to_hash(intervalobj, myht); + + add_common_properties(myht, &intervalobj->std); } /* }}} */ +static bool date_interval_is_internal_property(zend_string *name) +{ + if ( + zend_string_equals_literal(name, "date_string") || + zend_string_equals_literal(name, "from_string") || + zend_string_equals_literal(name, "y") || + zend_string_equals_literal(name, "m") || + zend_string_equals_literal(name, "d") || + zend_string_equals_literal(name, "h") || + zend_string_equals_literal(name, "i") || + zend_string_equals_literal(name, "s") || + zend_string_equals_literal(name, "f") || + zend_string_equals_literal(name, "invert") || + zend_string_equals_literal(name, "days") + ) { + return 1; + } + return 0; +} + +static void restore_custom_dateinterval_properties(zval *object, HashTable *myht) +{ + zend_string *prop_name; + zval *prop_val; + + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { + if (date_interval_is_internal_property(prop_name)) { + continue; + } + add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); + } ZEND_HASH_FOREACH_END(); +} + /* {{{ */ PHP_METHOD(DateInterval, __unserialize) @@ -4364,6 +4473,7 @@ PHP_METHOD(DateInterval, __unserialize) myht = Z_ARRVAL_P(array); php_date_interval_initialize_from_hash(&object, &intervalobj, myht); + restore_custom_dateinterval_properties(object, myht); } /* }}} */ @@ -5269,9 +5379,44 @@ PHP_METHOD(DatePeriod, __serialize) array_init(return_value); myht = Z_ARRVAL_P(return_value); date_period_object_to_hash(period_obj, myht); + + add_common_properties(myht, &period_obj->std); } /* }}} */ +/* {{{ date_period_is_internal_property + * Common for date_period_read_property(), date_period_write_property(), and + * restore_custom_dateperiod_properties functions + */ +static bool date_period_is_internal_property(zend_string *name) +{ + if ( + zend_string_equals_literal(name, "start") || + zend_string_equals_literal(name, "current") || + zend_string_equals_literal(name, "end") || + zend_string_equals_literal(name, "interval") || + zend_string_equals_literal(name, "recurrences") || + zend_string_equals_literal(name, "include_start_date") || + zend_string_equals_literal(name, "include_end_date") + ) { + return 1; + } + return 0; +} +/* }}} */ + +static void restore_custom_dateperiod_properties(zval *object, HashTable *myht) +{ + zend_string *prop_name; + zval *prop_val; + + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { + if (date_period_is_internal_property(prop_name)) { + continue; + } + add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); + } ZEND_HASH_FOREACH_END(); +} /* {{{ */ PHP_METHOD(DatePeriod, __unserialize) @@ -5291,6 +5436,7 @@ PHP_METHOD(DatePeriod, __unserialize) if (!php_date_period_initialize_from_hash(period_obj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DatePeriod object"); } + restore_custom_dateperiod_properties(object, myht); } /* }}} */ @@ -5313,25 +5459,6 @@ PHP_METHOD(DatePeriod, __wakeup) } /* }}} */ -/* {{{ date_period_is_internal_property - * Common for date_period_read_property() and date_period_write_property() functions - */ -static bool date_period_is_internal_property(zend_string *name) -{ - if (zend_string_equals_literal(name, "recurrences") - || zend_string_equals_literal(name, "include_start_date") - || zend_string_equals_literal(name, "include_end_date") - || zend_string_equals_literal(name, "start") - || zend_string_equals_literal(name, "current") - || zend_string_equals_literal(name, "end") - || zend_string_equals_literal(name, "interval") - ) { - return 1; - } - return 0; -} -/* }}} */ - /* {{{ date_period_read_property */ static zval *date_period_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { diff --git a/ext/date/tests/DateTimeImmutable_inherited_serialization.phpt b/ext/date/tests/DateTimeImmutable_inherited_serialization.phpt new file mode 100644 index 0000000000000..a533b651eed67 --- /dev/null +++ b/ext/date/tests/DateTimeImmutable_inherited_serialization.phpt @@ -0,0 +1,23 @@ +--TEST-- +Inherited DateTimeImmutable serialisation with custom properties +--FILE-- +myProperty); +?> +--EXPECTF-- +bool(true) diff --git a/ext/date/tests/DateTimeImmutable_serialisation.phpt b/ext/date/tests/DateTimeImmutable_serialization.phpt similarity index 100% rename from ext/date/tests/DateTimeImmutable_serialisation.phpt rename to ext/date/tests/DateTimeImmutable_serialization.phpt diff --git a/ext/date/tests/DateTimeInterval_inherited_serialization.phpt b/ext/date/tests/DateTimeInterval_inherited_serialization.phpt new file mode 100644 index 0000000000000..fca8f29b901c9 --- /dev/null +++ b/ext/date/tests/DateTimeInterval_inherited_serialization.phpt @@ -0,0 +1,22 @@ +--TEST-- +Inherited DateTimeInterval serialisation with custom properties +--FILE-- +myProperty); +?> +--EXPECTF-- +bool(true) diff --git a/ext/date/tests/DateTimePeriod_inherited_serialization.phpt b/ext/date/tests/DateTimePeriod_inherited_serialization.phpt new file mode 100644 index 0000000000000..c0d94cf01ef86 --- /dev/null +++ b/ext/date/tests/DateTimePeriod_inherited_serialization.phpt @@ -0,0 +1,25 @@ +--TEST-- +Inherited DateTimePeriod serialisation with custom properties +--FILE-- +myProperty); +?> +--EXPECTF-- +bool(true) diff --git a/ext/date/tests/DateTimeZone_inherited_serialization.phpt b/ext/date/tests/DateTimeZone_inherited_serialization.phpt new file mode 100644 index 0000000000000..d70c983bae7f1 --- /dev/null +++ b/ext/date/tests/DateTimeZone_inherited_serialization.phpt @@ -0,0 +1,22 @@ +--TEST-- +Inherited DateTimeZone serialisation with custom properties +--FILE-- +myProperty); +?> +--EXPECTF-- +bool(true) diff --git a/ext/date/tests/DateTimeZone_serialisation.phpt b/ext/date/tests/DateTimeZone_serialization.phpt similarity index 100% rename from ext/date/tests/DateTimeZone_serialisation.phpt rename to ext/date/tests/DateTimeZone_serialization.phpt diff --git a/ext/date/tests/DateTime_inherited_serialization.phpt b/ext/date/tests/DateTime_inherited_serialization.phpt new file mode 100644 index 0000000000000..5e9101309457b --- /dev/null +++ b/ext/date/tests/DateTime_inherited_serialization.phpt @@ -0,0 +1,23 @@ +--TEST-- +Inherited DateTime serialisation with custom properties +--FILE-- +myProperty); +?> +--EXPECTF-- +bool(true) diff --git a/ext/date/tests/DateTime_serialisation.phpt b/ext/date/tests/DateTime_serialization.phpt similarity index 100% rename from ext/date/tests/DateTime_serialisation.phpt rename to ext/date/tests/DateTime_serialization.phpt diff --git a/ext/date/tests/bug53437_var3.phpt b/ext/date/tests/bug53437_var3.phpt index 6fd5f11f0301b..c87c5c8b9a0cd 100644 --- a/ext/date/tests/bug53437_var3.phpt +++ b/ext/date/tests/bug53437_var3.phpt @@ -4,7 +4,7 @@ Bug #53437 DateInterval unserialize bad data, 32 bit --FILE-- --FILE-- --FILE-- --EXPECTF-- diff --git a/ext/date/tests/gh10152.phpt b/ext/date/tests/gh10152.phpt new file mode 100644 index 0000000000000..7886cf90ef26b --- /dev/null +++ b/ext/date/tests/gh10152.phpt @@ -0,0 +1,23 @@ +--TEST-- +GH-10152: Custom properties of DateTimeImmutable child classes are not serialized +--FILE-- +myProperty); +?> +--EXPECT-- +bool(true) From a42bf93308b159ecda3da01e12b471b13a279d55 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 26 Jan 2023 11:44:07 +0000 Subject: [PATCH 336/895] Fixed GH-10447: 'p' format specifier does not yield 'Z' for 00:00 --- ext/date/php_date.c | 2 +- ext/date/tests/gh10447.phpt | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ext/date/tests/gh10447.phpt diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0305873eea0e6..fec7d5d03cd63 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -716,7 +716,7 @@ static zend_string *date_format(const char *format, size_t format_len, timelib_t /* timezone */ case 'I': length = slprintf(buffer, sizeof(buffer), "%d", localtime ? offset->is_dst : 0); break; case 'p': - if (!localtime || strcmp(offset->abbr, "UTC") == 0 || strcmp(offset->abbr, "Z") == 0) { + if (!localtime || strcmp(offset->abbr, "UTC") == 0 || strcmp(offset->abbr, "Z") == 0 || strcmp(offset->abbr, "GMT+0000") == 0) { length = slprintf(buffer, sizeof(buffer), "%s", "Z"); break; } diff --git a/ext/date/tests/gh10447.phpt b/ext/date/tests/gh10447.phpt new file mode 100644 index 0000000000000..3b7ff54c97fb5 --- /dev/null +++ b/ext/date/tests/gh10447.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug GH-10447 ('p' format specifier does not yield 'Z' for 00:00) +--FILE-- +format('Y-m-d\TH:i:sp'), "\n"; + +$date = new \DateTimeImmutable('2023-01-25T00:00:00-00:00'); +echo $date->format('Y-m-d\TH:i:sp'), "\n"; +?> +--EXPECT-- +2023-01-25T00:00:00Z +2023-01-25T00:00:00Z From 0b9fb636d159f3d15b2d511b4e3f42b7e94135a4 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 27 Jan 2023 16:33:52 +0000 Subject: [PATCH 337/895] Add macro to check zend_string is marked as valid UTF-8 --- Zend/zend_string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_string.h b/Zend/zend_string.h index f2fe44d59eb26..7f38394ecbd40 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -80,6 +80,7 @@ END_EXTERN_C() /*---*/ #define ZSTR_IS_INTERNED(s) (GC_FLAGS(s) & IS_STR_INTERNED) +#define ZSTR_IS_VALID_UTF8(s) (GC_FLAGS(s) & IS_STR_VALID_UTF8) #define ZSTR_EMPTY_ALLOC() zend_empty_string #define ZSTR_CHAR(c) zend_one_char_string[c] From 0c9181b646ecd4be613847f155c6346c3ac19712 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 29 Jan 2023 16:35:37 +0000 Subject: [PATCH 338/895] Add function in zend_test to check UTF8 flag is added Also add test to check what strings are marked as having the flag --- ext/zend_test/test.c | 11 ++ ext/zend_test/test.stub.php | 2 + ext/zend_test/test_arginfo.h | 8 +- .../tests/strings_marked_as_utf8.phpt | 139 ++++++++++++++++++ .../tests/strings_not_marked_as_utf8.phpt | 131 +++++++++++++++++ 5 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 ext/zend_test/tests/strings_marked_as_utf8.phpt create mode 100644 ext/zend_test/tests/strings_not_marked_as_utf8.phpt diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 46727bb59ff29..2ebee7b423aa4 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -424,6 +424,17 @@ static ZEND_FUNCTION(zend_test_zend_ini_str) RETURN_STR(ZT_G(str_test)); } +static ZEND_FUNCTION(zend_test_is_string_marked_as_valid_utf8) +{ + zend_string *str; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_STR(str) + ZEND_PARSE_PARAMETERS_END(); + + RETURN_BOOL(ZSTR_IS_VALID_UTF8(str)); +} + static ZEND_FUNCTION(ZendTestNS2_namespaced_func) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 76f08a2831a51..4f444475f0155 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -178,6 +178,8 @@ function zend_test_zend_ini_str(): string {} function zend_test_zend_call_stack_get(): ?array {} function zend_test_zend_call_stack_use_all(): int {} #endif + + function zend_test_is_string_marked_as_valid_utf8(string $string): bool {} } namespace ZendTestNS { diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 3c6e83e8010e5..da65f05b9aa85 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f19c545e86b40d999d43008882f0c151d26be121 */ + * Stub hash: 80543c60da9d2732e677375e49afc21c91bf594b */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -107,6 +107,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_call_stack_use_al ZEND_END_ARG_INFO() #endif +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_string_marked_as_valid_utf8, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -201,6 +205,7 @@ static ZEND_FUNCTION(zend_test_zend_call_stack_get); #if defined(ZEND_CHECK_STACK_LIMIT) static ZEND_FUNCTION(zend_test_zend_call_stack_use_all); #endif +static ZEND_FUNCTION(zend_test_is_string_marked_as_valid_utf8); static ZEND_FUNCTION(ZendTestNS2_namespaced_func); static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func); static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func); @@ -257,6 +262,7 @@ static const zend_function_entry ext_functions[] = { #if defined(ZEND_CHECK_STACK_LIMIT) ZEND_FE(zend_test_zend_call_stack_use_all, arginfo_zend_test_zend_call_stack_use_all) #endif + ZEND_FE(zend_test_is_string_marked_as_valid_utf8, arginfo_zend_test_is_string_marked_as_valid_utf8) ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func) ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func) ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func) diff --git a/ext/zend_test/tests/strings_marked_as_utf8.phpt b/ext/zend_test/tests/strings_marked_as_utf8.phpt new file mode 100644 index 0000000000000..a4a6da41b7d2a --- /dev/null +++ b/ext/zend_test/tests/strings_marked_as_utf8.phpt @@ -0,0 +1,139 @@ +--TEST-- +Check that strings are marked as valid UTF-8 +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECT-- +Empty strings: +bool(true) +Known strings: +bool(true) +Integer cast to string: +string(4) "2563" +bool(false) +Float cast to string: +string(4) "26.7" +bool(false) +string(8) "2.0E+100" +bool(false) +Concatenation known valid UTF-8 strings in variables: +string(2) "fo" +bool(false) +Multiple concatenation known valid UTF-8 strings in variables: +string(3) "foo" +bool(false) +Concatenation known valid UTF-8 in assignment: +string(2) "fo" +bool(false) +Multiple concatenation known valid UTF-8 in assignment: +string(3) "foo" +bool(false) +Concatenation known valid UTF-8 string with empty string in variables: +bool(true) +bool(true) +Concatenation known valid UTF-8 string with empty string in assignment: +bool(true) +bool(true) +Concatenation in loop: +bool(false) +Concatenation in loop (compound assignment): +bool(false) +Concatenation of objects: +string(2) "zz" +bool(false) diff --git a/ext/zend_test/tests/strings_not_marked_as_utf8.phpt b/ext/zend_test/tests/strings_not_marked_as_utf8.phpt new file mode 100644 index 0000000000000..1a5210d39313f --- /dev/null +++ b/ext/zend_test/tests/strings_not_marked_as_utf8.phpt @@ -0,0 +1,131 @@ +--TEST-- +Check that invalid UTF-8 strings are NOT marked as valid UTF-8 +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECT-- +Integer cast to string concatenated to invalid UTF-8: +bool(false) +Float cast to string concatenated to invalid UTF-8: +bool(false) +bool(false) +Concatenation known valid UTF-8 strings in variables, followed by concatenation of invalid UTF-8: +bool(false) +Multiple concatenation known valid UTF-8 strings in variables, followed by concatenation of invalid UTF-8: +bool(false) +Concatenation known valid UTF-8 with invalid UTF-8 in assignment: +bool(false) +Multiple concatenation known valid UTF-8 and invalid UTF-8 in assignment: +bool(false) +Concatenation known valid UTF-8 string with empty string in variables, followed by concatenation of invalid UTF-8: +bool(false) +bool(false) +Concatenation known valid UTF-8 string with empty string in assignment, followed by concatenation of invalid UTF-8: +bool(false) +bool(false) +Concatenation in loop: +bool(false) +Concatenation in loop (compound assignment): +bool(false) +Concatenation of objects: +bool(false) From 78720e39a6e534fd778b1dcbd81099f326a3397a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 27 Jan 2023 16:30:07 +0000 Subject: [PATCH 339/895] Mark numeric strings as valid UTF-8 --- Zend/zend_operators.c | 20 ++++++++++++++----- .../tests/strings_marked_as_utf8.phpt | 6 +++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 9f6ae2073f7a8..8bfc40c6c5a9f 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -3218,7 +3218,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_long_to_str(zend_long num) /* {{{ */ } else { char buf[MAX_LENGTH_OF_LONG + 1]; char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, num); - return zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + zend_string *str = zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + return str; } } /* }}} */ @@ -3230,7 +3232,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_ulong_to_str(zend_ulong num) } else { char buf[MAX_LENGTH_OF_LONG + 1]; char *res = zend_print_ulong_to_buf(buf + sizeof(buf) - 1, num); - return zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + zend_string *str = zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + return str; } } @@ -3272,7 +3276,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_u64_to_str(uint64_t num) } else { char buf[20 + 1]; char *res = zend_print_u64_to_buf(buf + sizeof(buf) - 1, num); - return zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + zend_string *str = zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + return str; } } @@ -3283,7 +3289,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_i64_to_str(int64_t num) } else { char buf[20 + 1]; char *res = zend_print_i64_to_buf(buf + sizeof(buf) - 1, num); - return zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + zend_string *str = zend_string_init(res, buf + sizeof(buf) - 1 - res, 0); + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + return str; } } @@ -3293,7 +3301,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_double_to_str(double num) /* Model snprintf precision behavior. */ int precision = (int) EG(precision); zend_gcvt(num, precision ? precision : 1, '.', 'E', buf); - return zend_string_init(buf, strlen(buf), 0); + zend_string *str = zend_string_init(buf, strlen(buf), 0); + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + return str; } ZEND_API zend_uchar ZEND_FASTCALL is_numeric_str_function(const zend_string *str, zend_long *lval, double *dval) /* {{{ */ diff --git a/ext/zend_test/tests/strings_marked_as_utf8.phpt b/ext/zend_test/tests/strings_marked_as_utf8.phpt index a4a6da41b7d2a..ff84cad62aa02 100644 --- a/ext/zend_test/tests/strings_marked_as_utf8.phpt +++ b/ext/zend_test/tests/strings_marked_as_utf8.phpt @@ -106,12 +106,12 @@ Known strings: bool(true) Integer cast to string: string(4) "2563" -bool(false) +bool(true) Float cast to string: string(4) "26.7" -bool(false) +bool(true) string(8) "2.0E+100" -bool(false) +bool(true) Concatenation known valid UTF-8 strings in variables: string(2) "fo" bool(false) From 64127b66c64457d6356d06bb517c35f72fa74852 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 29 Jan 2023 16:39:19 +0000 Subject: [PATCH 340/895] Concatenating two valid UTF-8 strings produces a valid UTF-8 string The UTF-8 valid flag needs to be copied upon interning, otherwise strings that are concatenated at compile time lose this information. However, if previously this string was interned without the flag it is not added E.g. in the case the string is an existing class name. Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> --- Zend/zend_operators.c | 8 +- Zend/zend_string.c | 23 ++- Zend/zend_vm_def.h | 18 ++ Zend/zend_vm_execute.h | 155 ++++++++++++++++++ ext/opcache/ZendAccelerator.c | 2 +- ext/opcache/jit/zend_jit_helpers.c | 18 ++ ext/opcache/zend_persist.c | 6 +- .../tests/strings_marked_as_utf8.phpt | 23 ++- 8 files changed, 235 insertions(+), 18 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 8bfc40c6c5a9f..5a4c30168adef 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1887,7 +1887,7 @@ ZEND_API zend_result ZEND_FASTCALL shift_right_function(zval *result, zval *op1, ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ { - zval *orig_op1 = op1; + zval *orig_op1 = op1; zval op1_copy, op2_copy; ZVAL_UNDEF(&op1_copy); @@ -1955,6 +1955,11 @@ ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { + flags = IS_STR_VALID_UTF8; + } if (UNEXPECTED(op1_len > ZSTR_MAX_LEN - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1976,6 +1981,7 @@ ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval i_zval_ptr_dtor(result); } } + GC_ADD_FLAGS(result_str, flags); /* This has to happen first to account for the cases where result == op1 == op2 and * the realloc is done. In this case this line will also update Z_STRVAL_P(op2) to diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 68e6084fdf60f..2d6a30d37cbaa 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -191,6 +191,19 @@ ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_str return zend_interned_string_ht_lookup(str, &interned_strings_permanent); } +static zend_string* ZEND_FASTCALL zend_init_string_for_interning(zend_string *str, bool persistent) { + uint32_t flags = 0; + if (ZSTR_IS_VALID_UTF8(str)) { + flags = IS_STR_VALID_UTF8; + } + zend_ulong h = ZSTR_H(str); + zend_string_delref(str); + str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), persistent); + GC_ADD_FLAGS(str, flags); + ZSTR_H(str) = h; + return str; +} + static zend_string* ZEND_FASTCALL zend_new_interned_string_permanent(zend_string *str) { zend_string *ret; @@ -208,10 +221,7 @@ static zend_string* ZEND_FASTCALL zend_new_interned_string_permanent(zend_string ZEND_ASSERT(GC_FLAGS(str) & GC_PERSISTENT); if (GC_REFCOUNT(str) > 1) { - zend_ulong h = ZSTR_H(str); - zend_string_delref(str); - str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 1); - ZSTR_H(str) = h; + str = zend_init_string_for_interning(str, true); } return zend_add_interned_string(str, &interned_strings_permanent, IS_STR_PERMANENT); @@ -249,10 +259,7 @@ static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string * } #endif if (GC_REFCOUNT(str) > 1) { - zend_ulong h = ZSTR_H(str); - zend_string_delref(str); - str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 0); - ZSTR_H(str) = h; + str = zend_init_string_for_interning(str, false); } ret = zend_add_interned_string(str, &CG(interned_strings), 0); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index fc7cd81323987..efde56931d6a2 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -384,6 +384,11 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (OP1_TYPE != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (OP2_TYPE == IS_CONST || OP2_TYPE == IS_CV) { @@ -412,6 +417,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_ } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -420,6 +426,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -3140,6 +3147,11 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (OP1_TYPE != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (OP2_TYPE == IS_CONST || OP2_TYPE == IS_CV) { @@ -3165,6 +3177,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -3173,6 +3186,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -3233,6 +3247,10 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP1_TYPE != IS_CONST) { zend_string_release_ex(op1_str, 0); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a1eefaa72e336..f4e1b67cbd457 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -6624,6 +6624,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -6649,6 +6654,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -6657,6 +6663,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -6717,6 +6724,10 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -8691,6 +8702,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -8719,6 +8735,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -8727,6 +8744,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -9116,6 +9134,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -9141,6 +9164,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -9149,6 +9173,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -9209,6 +9234,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -11057,6 +11086,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -11085,6 +11119,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -11093,6 +11128,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -11482,6 +11518,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -11507,6 +11548,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -11515,6 +11557,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -11575,6 +11618,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -15088,6 +15135,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -15116,6 +15168,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -15124,6 +15177,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -15827,6 +15881,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -15852,6 +15911,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -15860,6 +15920,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -15920,6 +15981,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -16525,6 +16590,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -16553,6 +16623,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -16561,6 +16632,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -17264,6 +17336,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -17289,6 +17366,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -17297,6 +17375,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -17357,6 +17436,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -18213,6 +18296,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER( zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -18241,6 +18329,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER( } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -18249,6 +18338,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER( str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -18590,6 +18680,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -18615,6 +18710,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -18623,6 +18719,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -18683,6 +18780,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -40255,6 +40356,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -40283,6 +40389,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -40291,6 +40398,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -42751,6 +42859,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -42776,6 +42889,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -42784,6 +42898,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -42844,6 +42959,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -44067,6 +44186,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER( zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -44095,6 +44219,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER( } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -44103,6 +44228,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER( str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -46492,6 +46618,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -46517,6 +46648,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -46525,6 +46657,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -46585,6 +46718,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -49361,6 +49498,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -49389,6 +49531,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND } str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -49397,6 +49540,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -51885,6 +52029,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + flags = IS_STR_VALID_UTF8; + } if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -51910,6 +52059,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op2_str, 0); @@ -51918,6 +52068,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + GC_ADD_FLAGS(str, flags); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV & (IS_TMP_VAR|IS_VAR)) { zend_string_release_ex(op1_str, 0); @@ -51978,6 +52129,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0); memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); + + if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { + GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); + } ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 0d589c7c61d0f..4d68bc3191cb9 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -549,7 +549,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str) STRTAB_COLLISION(s) = *hash_slot; *hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s); GC_SET_REFCOUNT(s, 2); - GC_TYPE_INFO(s) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT); + GC_TYPE_INFO(s) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT)| (ZSTR_IS_VALID_UTF8(str) ? IS_STR_VALID_UTF8 : 0); ZSTR_H(s) = h; ZSTR_LEN(s) = ZSTR_LEN(str); memcpy(ZSTR_VAL(s), ZSTR_VAL(str), ZSTR_LEN(s) + 1); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index c594ade575bed..261b456a4fc31 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1633,6 +1633,11 @@ static void ZEND_FASTCALL zend_jit_fast_assign_concat_helper(zval *op1, zval *op size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { + flags = IS_STR_VALID_UTF8; + } if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1656,6 +1661,7 @@ static void ZEND_FASTCALL zend_jit_fast_assign_concat_helper(zval *op1, zval *op memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len); } while(0); + GC_ADD_FLAGS(result_str, flags); ZVAL_NEW_STR(op1, result_str); memcpy(ZSTR_VAL(result_str) + op1_len, Z_STRVAL_P(op2), op2_len); ZSTR_VAL(result_str)[result_len] = '\0'; @@ -1667,6 +1673,11 @@ static void ZEND_FASTCALL zend_jit_fast_concat_helper(zval *result, zval *op1, z size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { + flags = IS_STR_VALID_UTF8; + } if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1674,6 +1685,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_helper(zval *result, zval *op1, z } result_str = zend_string_alloc(result_len, 0); + GC_ADD_FLAGS(result_str, flags); memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len); ZVAL_NEW_STR(result, result_str); @@ -1689,6 +1701,11 @@ static void ZEND_FASTCALL zend_jit_fast_concat_tmp_helper(zval *result, zval *op size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; + uint32_t flags = 0; + + if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { + flags = IS_STR_VALID_UTF8; + } if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1710,6 +1727,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_tmp_helper(zval *result, zval *op memcpy(ZSTR_VAL(result_str), ZSTR_VAL(op1_str), op1_len); } while (0); + GC_ADD_FLAGS(result_str, flags); ZVAL_NEW_STR(result, result_str); memcpy(ZSTR_VAL(result_str) + op1_len, Z_STRVAL_P(op2), op2_len); diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index dcff7a7883289..7bc95b711102a 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -37,11 +37,13 @@ #define zend_set_str_gc_flags(str) do { \ GC_SET_REFCOUNT(str, 2); \ + uint32_t flags = GC_STRING | (ZSTR_IS_VALID_UTF8(str) ? IS_STR_VALID_UTF8 : 0); \ if (file_cache_only) { \ - GC_TYPE_INFO(str) = GC_STRING | (IS_STR_INTERNED << GC_FLAGS_SHIFT); \ + flags |= (IS_STR_INTERNED << GC_FLAGS_SHIFT); \ } else { \ - GC_TYPE_INFO(str) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT); \ + flags |= ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT); \ } \ + GC_TYPE_INFO(str) = flags; \ } while (0) #define zend_accel_store_string(str) do { \ diff --git a/ext/zend_test/tests/strings_marked_as_utf8.phpt b/ext/zend_test/tests/strings_marked_as_utf8.phpt index ff84cad62aa02..5b6dfb6a0763d 100644 --- a/ext/zend_test/tests/strings_marked_as_utf8.phpt +++ b/ext/zend_test/tests/strings_marked_as_utf8.phpt @@ -47,10 +47,19 @@ $s = "f" . "o"; var_dump($s); var_dump(zend_test_is_string_marked_as_valid_utf8($s)); +// The "foo" string matches with a "Foo" class which is registered by the zend_test extension. +// That class name does not have the "valid UTF-8" flag because class names in general +// don't have to be UTF-8. As the "foo" string here goes through the interning logic, +// the string gets replaced by the "foo" string from the class, which does +// not have the "valid UTF-8" flag. We therefore choose a different test case: "fxo". +// The previous "foo" test case works because it is not interned. echo "Multiple concatenation known valid UTF-8 in assignment:\n"; $s = "f" . "o" . "o"; var_dump($s); var_dump(zend_test_is_string_marked_as_valid_utf8($s)); +$s = "f" . "x" . "o"; +var_dump($s); +var_dump(zend_test_is_string_marked_as_valid_utf8($s)); echo "Concatenation known valid UTF-8 string with empty string in variables:\n"; $s1 = "f"; @@ -114,16 +123,18 @@ string(8) "2.0E+100" bool(true) Concatenation known valid UTF-8 strings in variables: string(2) "fo" -bool(false) +bool(true) Multiple concatenation known valid UTF-8 strings in variables: string(3) "foo" -bool(false) +bool(true) Concatenation known valid UTF-8 in assignment: string(2) "fo" -bool(false) +bool(true) Multiple concatenation known valid UTF-8 in assignment: string(3) "foo" bool(false) +string(3) "fxo" +bool(true) Concatenation known valid UTF-8 string with empty string in variables: bool(true) bool(true) @@ -131,9 +142,9 @@ Concatenation known valid UTF-8 string with empty string in assignment: bool(true) bool(true) Concatenation in loop: -bool(false) +bool(true) Concatenation in loop (compound assignment): -bool(false) +bool(true) Concatenation of objects: string(2) "zz" -bool(false) +bool(true) From 21cab65c0047e97dc5ec0b67b39c9bd92f662481 Mon Sep 17 00:00:00 2001 From: Danack Date: Wed, 1 Feb 2023 15:05:47 +0000 Subject: [PATCH 341/895] Ignore generated file on arm64. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7a4ba0e0222ba..104228fd033d7 100644 --- a/.gitignore +++ b/.gitignore @@ -169,6 +169,7 @@ php # Miscellaneous extensions files /ext/opcache/jit/zend_jit_x86.c +/ext/opcache/jit/zend_jit_arm64.c /ext/opcache/minilua # Generated by `cd ext/name && phpize && ./configure` From f7e678476f4a01034868ecf225b907235b9e9d8e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 21 Jan 2023 09:13:36 +0100 Subject: [PATCH 342/895] .github/workflows/push.yml: enable ccache This reduces the LINUX_X64_RELEASE_ZTS build time from 9-10 minutes to less than 3 minutes. Closes GH-10395 --- .github/workflows/push.yml | 18 ++++++++++++++++++ .gitignore | 1 + 2 files changed, 19 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0e29c87e55034..9fc0d05747c45 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -17,6 +17,9 @@ on: pull_request: branches: - '**' +env: + CC: ccache gcc + CXX: ccache g++ jobs: LINUX_X64: strategy: @@ -38,6 +41,13 @@ jobs: uses: ./.github/actions/setup-oracle - name: apt uses: ./.github/actions/apt-x64 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + # This duplicates the "job.name" expression above because + # GitHub has no way to query the job name (github.job is the + # job id, not the job name) + key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}" - name: ./configure uses: ./.github/actions/configure-x64 with: @@ -83,6 +93,10 @@ jobs: uses: actions/checkout@v3 - name: apt uses: ./.github/actions/apt-x32 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" - name: ./configure uses: ./.github/actions/configure-x32 with: @@ -109,6 +123,10 @@ jobs: uses: actions/checkout@v3 - name: brew uses: ./.github/actions/brew + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" - name: ./configure uses: ./.github/actions/configure-macos with: diff --git a/.gitignore b/.gitignore index 1d55b6d9e20da..d455b3485489b 100644 --- a/.gitignore +++ b/.gitignore @@ -281,6 +281,7 @@ tmp-php.ini # GitHub actions cache # ------------------------------------------------------------------------------ /branch-commit-cache.json +/.ccache/ # ------------------------------------------------------------------------------ # Special cases to invert previous ignore patterns From 9e097822e8ba1086d4c96f0902fb01de6d49ef36 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 4 Aug 2022 14:12:45 +0200 Subject: [PATCH 343/895] Fix lineno for all constant expressions Fixes GH-8821 Closes GH-8855 --- NEWS | 2 ++ Zend/tests/bug41633_2.phpt | 3 +- Zend/tests/bug41633_3.phpt | 3 +- Zend/tests/bug47572.phpt | 3 +- Zend/tests/bug74657.phpt | 3 +- ...nt_expressions_self_referencing_array.phpt | 3 +- Zend/tests/enum/offsetGet-in-const-expr.phpt | 3 +- Zend/tests/gh7771_1.phpt | 3 +- Zend/tests/gh7771_2.phpt | 3 +- Zend/tests/gh8821.phpt | 22 ++++++++++++ .../typed_properties_022.phpt | 3 +- Zend/zend_ast.c | 34 +++++++++++++++++++ Zend/zend_ast.h | 3 ++ Zend/zend_builtin_functions.c | 26 ++++++++++++++ Zend/zend_string.h | 1 + ext/standard/tests/streams/bug77664.phpt | 5 +-- tests/classes/constants_error_004.phpt | 3 +- 17 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 Zend/tests/gh8821.phpt diff --git a/NEWS b/NEWS index ec0475c4779ef..49610e720bf9b 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ PHP NEWS effects). (ilutov) . Implement GH-10217 (Use strlen() for determining the class_name length). (Dennis Buteyn) + . Fix bug GH-8821 (Improve line numbers for errors in constant expressions). + (ilutov) - Exif: . Removed unneeded codepaths in exif_process_TIFF_in_JPEG(). (nielsdos) diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt index bb768c0e11743..998610d291cdf 100644 --- a/Zend/tests/bug41633_2.phpt +++ b/Zend/tests/bug41633_2.phpt @@ -10,5 +10,6 @@ echo Foo::A."\n"; --EXPECTF-- Fatal error: Uncaught Error: Undefined constant self::B in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %sbug41633_2.php on line 3 diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt index 4f78194a7e7a1..84f4c0c146760 100644 --- a/Zend/tests/bug41633_3.phpt +++ b/Zend/tests/bug41633_3.phpt @@ -11,5 +11,6 @@ echo Foo::A; --EXPECTF-- Fatal error: Uncaught Error: Cannot declare self-referencing constant Foo::B in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %sbug41633_3.php on line %d diff --git a/Zend/tests/bug47572.phpt b/Zend/tests/bug47572.phpt index 1e424b350c4e9..4e3a99ccd5cad 100644 --- a/Zend/tests/bug47572.phpt +++ b/Zend/tests/bug47572.phpt @@ -16,5 +16,6 @@ $foo = new Foo(); --EXPECTF-- Fatal error: Uncaught Error: Undefined constant "FOO" in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %s on line %d diff --git a/Zend/tests/bug74657.phpt b/Zend/tests/bug74657.phpt index 055501066b9f2..b024833f28a8b 100644 --- a/Zend/tests/bug74657.phpt +++ b/Zend/tests/bug74657.phpt @@ -21,5 +21,6 @@ var_dump((new C)->options); --EXPECTF-- Fatal error: Uncaught Error: Undefined constant I::FOO in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %sbug74657.php on line %d diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt index 214862071d74a..0c0436a456326 100644 --- a/Zend/tests/constant_expressions_self_referencing_array.phpt +++ b/Zend/tests/constant_expressions_self_referencing_array.phpt @@ -11,5 +11,6 @@ var_dump(A::FOO); --EXPECTF-- Fatal error: Uncaught Error: Cannot declare self-referencing constant self::BAR in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %s on line %d diff --git a/Zend/tests/enum/offsetGet-in-const-expr.phpt b/Zend/tests/enum/offsetGet-in-const-expr.phpt index 0928235ac2e8b..bd74f6b564b21 100644 --- a/Zend/tests/enum/offsetGet-in-const-expr.phpt +++ b/Zend/tests/enum/offsetGet-in-const-expr.phpt @@ -25,5 +25,6 @@ var_dump(X::FOO_BAR); --EXPECTF-- Fatal error: Uncaught Error: Cannot use [] on objects in constant expression in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %s on line %d diff --git a/Zend/tests/gh7771_1.phpt b/Zend/tests/gh7771_1.phpt index dc24b4041c716..eee6379e15f28 100644 --- a/Zend/tests/gh7771_1.phpt +++ b/Zend/tests/gh7771_1.phpt @@ -11,5 +11,6 @@ new Foo(); --EXPECTF-- Fatal error: Uncaught Error: Class "NonExistent" not found in %sgh7771_1_definition.inc:4 Stack trace: -#0 {main} +#0 %sgh7771_1.php(5): [constant expression]() +#1 {main} thrown in %sgh7771_1_definition.inc on line 4 diff --git a/Zend/tests/gh7771_2.phpt b/Zend/tests/gh7771_2.phpt index 780c970407715..c8d865ee106d5 100644 --- a/Zend/tests/gh7771_2.phpt +++ b/Zend/tests/gh7771_2.phpt @@ -11,5 +11,6 @@ new Foo(); --EXPECTF-- Fatal error: Uncaught Error: Class "NonExistent" not found in %sgh7771_2_definition.inc:6 Stack trace: -#0 {main} +#0 %sgh7771_2.php(5): [constant expression]() +#1 {main} thrown in %sgh7771_2_definition.inc on line 6 diff --git a/Zend/tests/gh8821.phpt b/Zend/tests/gh8821.phpt new file mode 100644 index 0000000000000..8f1b3ceff34ab --- /dev/null +++ b/Zend/tests/gh8821.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-8821: Fix reported line number of constant expression +--FILE-- + 3]; +} + +new Bravo(); + +?> +--EXPECTF-- +Fatal error: Uncaught TypeError: Illegal offset type in %sgh8821.php:8 +Stack trace: +#0 %sgh8821.php(11): [constant expression]() +#1 {main} + thrown in %sgh8821.php on line 8 diff --git a/Zend/tests/type_declarations/typed_properties_022.phpt b/Zend/tests/type_declarations/typed_properties_022.phpt index aeed60dcacca9..d6712df55f6cd 100644 --- a/Zend/tests/type_declarations/typed_properties_022.phpt +++ b/Zend/tests/type_declarations/typed_properties_022.phpt @@ -11,5 +11,6 @@ $foo = new Foo(); --EXPECTF-- Fatal error: Uncaught Error: Class "BAR" not found in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %s on line %d diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 70646856d3a11..faa806a600f6b 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -496,12 +496,43 @@ zend_class_entry *zend_ast_fetch_class(zend_ast *ast, zend_class_entry *scope) return zend_fetch_class_with_scope(zend_ast_get_str(ast), (ast->attr >> ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT) | ZEND_FETCH_CLASS_EXCEPTION, scope); } +ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner( + zval *result, + zend_ast *ast, + zend_class_entry *scope, + bool *short_circuited_ptr, + zend_ast_evaluate_ctx *ctx +); + ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_ex( zval *result, zend_ast *ast, zend_class_entry *scope, bool *short_circuited_ptr, zend_ast_evaluate_ctx *ctx +) { + zend_string *previous_filename; + zend_long previous_lineno; + if (scope) { + previous_filename = EG(filename_override); + previous_lineno = EG(lineno_override); + EG(filename_override) = scope->info.user.filename; + EG(lineno_override) = zend_ast_get_lineno(ast); + } + zend_result r = zend_ast_evaluate_inner(result, ast, scope, short_circuited_ptr, ctx); + if (scope) { + EG(filename_override) = previous_filename; + EG(lineno_override) = previous_lineno; + } + return r; +} + +ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner( + zval *result, + zend_ast *ast, + zend_class_entry *scope, + bool *short_circuited_ptr, + zend_ast_evaluate_ctx *ctx ) { zval op1, op2; zend_result ret = SUCCESS; @@ -1023,11 +1054,13 @@ static void* ZEND_FASTCALL zend_ast_tree_copy(zend_ast *ast, void *buf) new->attr = ast->attr; ZVAL_COPY(&new->val, zend_ast_get_zval(ast)); buf = (void*)((char*)buf + sizeof(zend_ast_zval)); + // Lineno gets copied with ZVAL_COPY } else if (ast->kind == ZEND_AST_CONSTANT) { zend_ast_zval *new = (zend_ast_zval*)buf; new->kind = ZEND_AST_CONSTANT; new->attr = ast->attr; ZVAL_STR_COPY(&new->val, zend_ast_get_constant_name(ast)); + Z_LINENO(new->val) = zend_ast_get_lineno(ast); buf = (void*)((char*)buf + sizeof(zend_ast_zval)); } else if (zend_ast_is_list(ast)) { zend_ast_list *list = zend_ast_get_list(ast); @@ -1036,6 +1069,7 @@ static void* ZEND_FASTCALL zend_ast_tree_copy(zend_ast *ast, void *buf) new->kind = list->kind; new->attr = list->attr; new->children = list->children; + new->lineno = list->lineno; buf = (void*)((char*)buf + zend_ast_list_size(list->children)); for (i = 0; i < list->children; i++) { if (list->child[i]) { diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index b5df2a55a2098..ca12afd6b2149 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -352,6 +352,9 @@ static zend_always_inline uint32_t zend_ast_get_lineno(zend_ast *ast) { if (ast->kind == ZEND_AST_ZVAL) { zval *zv = zend_ast_get_zval(ast); return Z_LINENO_P(zv); + } else if (ast->kind == ZEND_AST_CONSTANT) { + zval *zv = &((zend_ast_zval *) ast)->val; + return Z_LINENO_P(zv); } else { return ast->lineno; } diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 66f196e5c82b9..90cfe3ec329ba 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1724,6 +1724,32 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int return; } + if (EG(filename_override)) { + // Add the current execution point to the frame so we don't lose it + zend_string *filename_override = EG(filename_override); + zend_long lineno_override = EG(lineno_override); + EG(filename_override) = NULL; + EG(lineno_override) = -1; + + zend_string *filename = zend_get_executed_filename_ex(); + zend_long lineno = zend_get_executed_lineno(); + if (filename && (!zend_string_equals(filename, filename_override) || lineno != lineno_override)) { + stack_frame = zend_new_array(8); + zend_hash_real_init_mixed(stack_frame); + ZVAL_STR_COPY(&tmp, filename); + _zend_hash_append_ex(stack_frame, ZSTR_KNOWN(ZEND_STR_FILE), &tmp, 1); + ZVAL_LONG(&tmp, lineno); + _zend_hash_append_ex(stack_frame, ZSTR_KNOWN(ZEND_STR_LINE), &tmp, 1); + ZVAL_STR_COPY(&tmp, ZSTR_KNOWN(ZEND_STR_CONST_EXPR_PLACEHOLDER)); + _zend_hash_append_ex(stack_frame, ZSTR_KNOWN(ZEND_STR_FUNCTION), &tmp, 1); + ZVAL_ARR(&tmp, stack_frame); + zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp); + } + + EG(filename_override) = filename_override; + EG(lineno_override) = lineno_override; + } + if (skip_last) { /* skip debug_backtrace() */ call = call->prev_execute_data; diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 7f38394ecbd40..d7bca020c3e19 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -594,6 +594,7 @@ EMPTY_SWITCH_DEFAULT_CASE() _(ZEND_STR_AUTOGLOBAL_REQUEST, "_REQUEST") \ _(ZEND_STR_COUNT, "count") \ _(ZEND_STR_SENSITIVEPARAMETER, "SensitiveParameter") \ + _(ZEND_STR_CONST_EXPR_PLACEHOLDER, "[constant expression]") \ typedef enum _zend_known_string_id { diff --git a/ext/standard/tests/streams/bug77664.phpt b/ext/standard/tests/streams/bug77664.phpt index 4d9a2e0cb22a5..0a22175133335 100644 --- a/ext/standard/tests/streams/bug77664.phpt +++ b/ext/standard/tests/streams/bug77664.phpt @@ -12,6 +12,7 @@ file_get_contents('error://test'); --EXPECTF-- Fatal error: Uncaught Error: Undefined constant self::INVALID in %s:%d Stack trace: -#0 %sbug77664.php(%d): file_get_contents('error://test') -#1 {main} +#0 %s(%d): [constant expression]() +#1 %s(%d): file_get_contents('error://test') +#2 {main} thrown in %sbug77664.php on line %d diff --git a/tests/classes/constants_error_004.phpt b/tests/classes/constants_error_004.phpt index 3d675652ba241..bd7a3fe69381a 100644 --- a/tests/classes/constants_error_004.phpt +++ b/tests/classes/constants_error_004.phpt @@ -12,5 +12,6 @@ Class constant whose initial value references a non-existent class --EXPECTF-- Fatal error: Uncaught Error: Class "D" not found in %s:%d Stack trace: -#0 {main} +#0 %s(%d): [constant expression]() +#1 {main} thrown in %s on line %d From f291d37a1a7d78e841f40a4410359548bc73de1b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 12 Dec 2022 00:23:46 +0100 Subject: [PATCH 344/895] Allow comments between intersection types and by-ref params Fixes GH-10083 Closes GH-10125 --- NEWS | 1 + .../intersection_types/parsing_attribute.phpt | 13 ++++++++++ .../intersection_types/parsing_comment.phpt | 26 +++++++++++++++++++ Zend/zend_language_scanner.l | 14 +++++++--- 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 Zend/tests/type_declarations/intersection_types/parsing_attribute.phpt create mode 100644 Zend/tests/type_declarations/intersection_types/parsing_comment.phpt diff --git a/NEWS b/NEWS index 49610e720bf9b..ad42da6774b2a 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ PHP NEWS (Dennis Buteyn) . Fix bug GH-8821 (Improve line numbers for errors in constant expressions). (ilutov) + . Fix bug GH-10083 (Allow comments between & and parameter). (ilutov) - Exif: . Removed unneeded codepaths in exif_process_TIFF_in_JPEG(). (nielsdos) diff --git a/Zend/tests/type_declarations/intersection_types/parsing_attribute.phpt b/Zend/tests/type_declarations/intersection_types/parsing_attribute.phpt new file mode 100644 index 0000000000000..7396b093fd41b --- /dev/null +++ b/Zend/tests/type_declarations/intersection_types/parsing_attribute.phpt @@ -0,0 +1,13 @@ +--TEST-- +Intersection type parsing and by-ref parsing interaction with attributes +--FILE-- + +--EXPECTF-- +Parse error: syntax error, unexpected token "#[" in %s on line %d diff --git a/Zend/tests/type_declarations/intersection_types/parsing_comment.phpt b/Zend/tests/type_declarations/intersection_types/parsing_comment.phpt new file mode 100644 index 0000000000000..6f8cd74e3bb73 --- /dev/null +++ b/Zend/tests/type_declarations/intersection_types/parsing_comment.phpt @@ -0,0 +1,26 @@ +--TEST-- +Intersection type and by-ref parameter parsing with comments +--FILE-- + +--EXPECT-- diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index c73a50948d6bc..a575b2d5a2cf5 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1368,6 +1368,12 @@ TABS_AND_SPACES [ \t]* TOKENS [;:,.|^&+-/*=%!~$<>?@] ANY_CHAR [^] NEWLINE ("\r"|"\n"|"\r\n") +OPTIONAL_WHITESPACE [ \n\r\t]* +MULTI_LINE_COMMENT "/*"([^*]*"*"+)([^*/][^*]*"*"+)*"/" +SINGLE_LINE_COMMENT "//".*[\n\r] +HASH_COMMENT "#"(([^[].*[\n\r])|[\n\r]) +WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_COMMENT}|{HASH_COMMENT})+ +OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_COMMENT}|{HASH_COMMENT})* /* compute yyleng before each rule */ := yyleng = YYCURSOR - SCNG(yy_text); @@ -1401,7 +1407,7 @@ NEWLINE ("\r"|"\n"|"\r\n") RETURN_TOKEN(T_ATTRIBUTE); } -"yield"{WHITESPACE}"from"[^a-zA-Z0-9_\x80-\xff] { +"yield"{WHITESPACE_OR_COMMENTS}"from"[^a-zA-Z0-9_\x80-\xff] { yyless(yyleng - 1); HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN_WITH_IDENT(T_YIELD_FROM); @@ -1543,11 +1549,11 @@ NEWLINE ("\r"|"\n"|"\r\n") * The enum keyword must be followed by whitespace and another identifier. * This avoids the BC break of using enum in classes, namespaces, functions and constants. */ -"enum"{WHITESPACE}("extends"|"implements") { +"enum"{WHITESPACE_OR_COMMENTS}("extends"|"implements") { yyless(4); RETURN_TOKEN_WITH_STR(T_STRING, 0); } -"enum"{WHITESPACE}[a-zA-Z_\x80-\xff] { +"enum"{WHITESPACE_OR_COMMENTS}[a-zA-Z_\x80-\xff] { yyless(4); RETURN_TOKEN_WITH_IDENT(T_ENUM); } @@ -1869,7 +1875,7 @@ NEWLINE ("\r"|"\n"|"\r\n") RETURN_TOKEN(T_SR); } -"&"[ \t\r\n]*("$"|"...") { +"&"{OPTIONAL_WHITESPACE_OR_COMMENTS}("$"|"...") { yyless(1); RETURN_TOKEN(T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG); } From 35a36b13e539c252d309f1799b5f653cf76921bd Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 2 Feb 2023 15:40:50 +0100 Subject: [PATCH 345/895] Fix comp-time and constant evaluation of dynamic class constant fetch Fixes GH-10486 Fixes oss-fuzz #55436 Fixes oss-fuzz #55472 Closes GH-10487 --- Zend/Optimizer/compact_literals.c | 4 +++- Zend/tests/gh10486.phpt | 11 +++++++++++ Zend/tests/gh10486_2.phpt | 11 +++++++++++ Zend/zend_ast.c | 12 +++++++++++- Zend/zend_compile.c | 5 +++++ Zend/zend_execute.c | 5 +++++ Zend/zend_execute.h | 2 ++ Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 12 ++++++------ 9 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 Zend/tests/gh10486.phpt create mode 100644 Zend/tests/gh10486_2.phpt diff --git a/Zend/Optimizer/compact_literals.c b/Zend/Optimizer/compact_literals.c index 94402f026c778..9248f0b822441 100644 --- a/Zend/Optimizer/compact_literals.c +++ b/Zend/Optimizer/compact_literals.c @@ -670,7 +670,9 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx } break; case ZEND_FETCH_CLASS_CONSTANT: - if (opline->op1_type == IS_CONST && opline->op2_type == IS_CONST) { + if (opline->op1_type == IS_CONST + && opline->op2_type == IS_CONST + && Z_TYPE(op_array->literals[opline->op2.constant]) == IS_STRING) { // op1/op2 class_const opline->extended_value = add_static_slot(&hash, op_array, opline->op1.constant, diff --git a/Zend/tests/gh10486.phpt b/Zend/tests/gh10486.phpt new file mode 100644 index 0000000000000..83dff538926d3 --- /dev/null +++ b/Zend/tests/gh10486.phpt @@ -0,0 +1,11 @@ +--TEST-- +Assertion error when attempting comp-time eval of dynamic class constant fetch +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Class "y" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/gh10486_2.phpt b/Zend/tests/gh10486_2.phpt new file mode 100644 index 0000000000000..d62215a7771a5 --- /dev/null +++ b/Zend/tests/gh10486_2.phpt @@ -0,0 +1,11 @@ +--TEST-- +Assertion error when attempting constant eval of dynamic class constant fetch +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "y" in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index faa806a600f6b..9290ca3805ab6 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -834,7 +834,15 @@ ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner( case ZEND_AST_CLASS_CONST: { zend_string *class_name = zend_ast_get_str(ast->child[0]); - zend_string *const_name = zend_ast_get_str(ast->child[1]); + if (UNEXPECTED(zend_ast_evaluate_ex(&op2, ast->child[1], scope, &short_circuited, ctx) != SUCCESS)) { + return FAILURE; + } + if (UNEXPECTED(Z_TYPE(op2) != IS_STRING)) { + zend_invalid_class_constant_type_error(Z_TYPE(op2)); + zval_ptr_dtor_nogc(&op2); + return FAILURE; + } + zend_string *const_name = Z_STR(op2); zend_string *previous_filename; zend_long previous_lineno; @@ -852,9 +860,11 @@ ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner( if (UNEXPECTED(zv == NULL)) { ZVAL_UNDEF(result); + zval_ptr_dtor_nogc(&op2); return FAILURE; } ZVAL_COPY_OR_DUP(result, zv); + zval_ptr_dtor_nogc(&op2); break; } case ZEND_AST_NEW: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c2d53bd943ec7..dcadf6eef6d08 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -10742,6 +10742,11 @@ static void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ zend_ast *name_ast; zend_string *resolved_name; + if (UNEXPECTED(ast->child[1]->kind != ZEND_AST_ZVAL + || Z_TYPE_P(zend_ast_get_zval(ast->child[1])) != IS_STRING)) { + return; + } + zend_eval_const_expr(&ast->child[0]); zend_eval_const_expr(&ast->child[1]); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b051937a5bc08..3a367bcc09c69 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -894,6 +894,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modificati ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name)); } +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(zend_uchar type) +{ + zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(type)); +} + static const zend_class_entry *resolve_single_class_type(zend_string *name, const zend_class_entry *self_ce) { if (zend_string_equals_literal_ci(name, "self")) { return self_ce; diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index a1e29f5cd0a0b..f02c45f5084ea 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -82,6 +82,8 @@ ZEND_API ZEND_COLD void zend_wrong_string_offset_error(void); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error(const zend_property_info *info); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(const zend_property_info *info); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(zend_uchar type); + ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg); ZEND_API ZEND_COLD void zend_verify_arg_error( const zend_function *zf, const zend_arg_info *arg_info, uint32_t arg_num, zval *value); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index efde56931d6a2..ca062b9512ac8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5922,7 +5922,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO constant_zv = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP2(); HANDLE_EXCEPTION(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index f4e1b67cbd457..d9dd9b5890241 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7203,7 +7203,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS constant_zv = RT_CONSTANT(opline, opline->op2); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -8358,7 +8358,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); @@ -25011,7 +25011,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ constant_zv = RT_CONSTANT(opline, opline->op2); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -25574,7 +25574,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); @@ -33999,7 +33999,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS constant_zv = RT_CONSTANT(opline, opline->op2); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -34352,7 +34352,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS constant_zv = _get_zval_ptr_tmpvarcv(opline->op2_type, opline->op2, BP_VAR_R EXECUTE_DATA_CC); if (UNEXPECTED(Z_TYPE_P(constant_zv) != IS_STRING)) { - zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(Z_TYPE_P(constant_zv))); + zend_invalid_class_constant_type_error(Z_TYPE_P(constant_zv)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); From 848a6e5035a540113722b988e40083e5632bf9b7 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 2 Feb 2023 19:49:40 +0100 Subject: [PATCH 346/895] Fix incorrect line number of constant in constant expression Fixes GH-10356 --- Zend/tests/gh10356.phpt | 20 ++++++++++++++++++++ Zend/zend_compile.c | 1 + 2 files changed, 21 insertions(+) create mode 100644 Zend/tests/gh10356.phpt diff --git a/Zend/tests/gh10356.phpt b/Zend/tests/gh10356.phpt new file mode 100644 index 0000000000000..2a5418bc98e09 --- /dev/null +++ b/Zend/tests/gh10356.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10356: Incorrect line number of constant in constant expression +--FILE-- + DOES_NOT_EXIST, + ]; +} + +new Foo(); + +?> +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "DOES_NOT_EXIST" in %s:5 +Stack trace: +#0 %s(%d): [constant expression]() +#1 {main} + thrown in %s on line 5 diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index dcadf6eef6d08..61e87a52919f6 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -10005,6 +10005,7 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */ return; } + CG(zend_lineno) = zend_ast_get_lineno(ast); zend_ast_destroy(ast); *ast_ptr = zend_ast_create_constant(resolved_name, !is_fully_qualified && FC(current_namespace) ? IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE : 0); From fb670f2b80480cd0dc8a84df99a3f5905994bb3e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 2 Feb 2023 19:55:23 +0100 Subject: [PATCH 347/895] Move setting of CG(zend_lineno) This way it will also work for zend_ast_create_zval --- Zend/zend_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 61e87a52919f6..eb74893886ab4 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -9995,6 +9995,8 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */ zval result; zend_string *resolved_name; + CG(zend_lineno) = zend_ast_get_lineno(ast); + resolved_name = zend_resolve_const_name( orig_name, name_ast->attr, &is_fully_qualified); @@ -10005,7 +10007,6 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */ return; } - CG(zend_lineno) = zend_ast_get_lineno(ast); zend_ast_destroy(ast); *ast_ptr = zend_ast_create_constant(resolved_name, !is_fully_qualified && FC(current_namespace) ? IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE : 0); From 47ed1904ef75a611fc47fbbc3aa681109bf2de53 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 28 Dec 2022 20:30:51 +0100 Subject: [PATCH 348/895] Fix use-after-free in write_property when object is released Fixes GH-10169 Closes GH-10179 --- Zend/tests/gh10169.phpt | 37 +++++++++++++++++++++++++++++++++++++ Zend/zend_execute.c | 6 ++++++ Zend/zend_execute.h | 2 ++ Zend/zend_object_handlers.c | 24 ++++++++++++++++++++++-- 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/gh10169.phpt diff --git a/Zend/tests/gh10169.phpt b/Zend/tests/gh10169.phpt new file mode 100644 index 0000000000000..674122ac59359 --- /dev/null +++ b/Zend/tests/gh10169.phpt @@ -0,0 +1,37 @@ +--TEST-- +GH-10169: Fix use-after-free when releasing object during property assignment +--FILE-- +prop = new B(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +$a = new A(); +$a->prop = ''; +try { + $a->prop = new B(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +Object was released while assigning to property A::$prop +Object was released while assigning to property A::$prop diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 3a367bcc09c69..a28aef62ab3e1 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -899,6 +899,12 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(zen zend_type_error("Cannot use value of type %s as class constant name", zend_get_type_by_const(type)); } +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_object_released_while_assigning_to_property_error(const zend_property_info *info) +{ + zend_throw_error(NULL, "Object was released while assigning to property %s::$%s", + ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name)); +} + static const zend_class_entry *resolve_single_class_type(zend_string *name, const zend_class_entry *self_ce) { if (zend_string_equals_literal_ci(name, "self")) { return self_ce; diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index f02c45f5084ea..73a1be26a424b 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -84,6 +84,8 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modificati ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(zend_uchar type); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_object_released_while_assigning_to_property_error(const zend_property_info *info); + ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg); ZEND_API ZEND_COLD void zend_verify_arg_error( const zend_function *zf, const zend_arg_info *arg_info, uint32_t arg_num, zval *value); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index ab550497d5c3d..37e566b0a74df 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -818,7 +818,17 @@ ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zva } ZVAL_COPY_VALUE(&tmp, value); - if (UNEXPECTED(!zend_verify_property_type(prop_info, &tmp, property_uses_strict_types()))) { + // Increase refcount to prevent object from being released in __toString() + GC_ADDREF(zobj); + bool type_matched = zend_verify_property_type(prop_info, &tmp, property_uses_strict_types()); + if (UNEXPECTED(GC_DELREF(zobj) == 0)) { + zend_object_released_while_assigning_to_property_error(prop_info); + zend_objects_store_del(zobj); + zval_ptr_dtor(&tmp); + variable_ptr = &EG(error_zval); + goto exit; + } + if (UNEXPECTED(!type_matched)) { Z_TRY_DELREF_P(value); variable_ptr = &EG(error_zval); goto exit; @@ -889,7 +899,17 @@ ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zva } ZVAL_COPY_VALUE(&tmp, value); - if (UNEXPECTED(!zend_verify_property_type(prop_info, &tmp, property_uses_strict_types()))) { + // Increase refcount to prevent object from being released in __toString() + GC_ADDREF(zobj); + bool type_matched = zend_verify_property_type(prop_info, &tmp, property_uses_strict_types()); + if (UNEXPECTED(GC_DELREF(zobj) == 0)) { + zend_object_released_while_assigning_to_property_error(prop_info); + zend_objects_store_del(zobj); + zval_ptr_dtor(&tmp); + variable_ptr = &EG(error_zval); + goto exit; + } + if (UNEXPECTED(!type_matched)) { zval_ptr_dtor(value); goto exit; } From fe2dc2b4810167e08de5dae20f8d914f109c7a81 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 3 Feb 2023 09:17:33 -0500 Subject: [PATCH 349/895] Avoid crash for reset/end/next/prev() on ffi classes (#9711) (And any PECLs returning `zend_empty_array` in the handler->get_properties overrides) Closes GH-9697 This is similar to the fix used in d9651a941915eb5fb5ad557090b65256fd8509b6 for array_walk. This should make it safer for php-src (and PECLs, long-term) to return the empty immutable array in `handler->get_properties` to avoid wasting memory. See https://github.com/php/php-src/issues/9697#issuecomment-1273613175 The only possible internal iterator position for the empty array is at the end of the empty array (nInternalPointer=0). The `zend_hash*del*` helpers will always set nInternalPointer to 0 when an array becomes empty, regardless of previous insertions/deletions/updates to the array. --- NEWS | 2 ++ ext/ffi/tests/arrayPointer.phpt | 20 ++++++++++++++++++++ ext/standard/array.c | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 ext/ffi/tests/arrayPointer.phpt diff --git a/NEWS b/NEWS index ca6ee38b7220b..f16e815291a3d 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ PHP NEWS . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) . Fix incorrect check in cs_8559_5 in map_from_unicode(). (nielsdos) + . Fix bug GH-9697 for reset/end/next/prev() attempting to move pointer of + properties table for certain internal classes such as FFI classes 02 Feb 2023, PHP 8.1.15 diff --git a/ext/ffi/tests/arrayPointer.phpt b/ext/ffi/tests/arrayPointer.phpt new file mode 100644 index 0000000000000..3a2b06563ade5 --- /dev/null +++ b/ext/ffi/tests/arrayPointer.phpt @@ -0,0 +1,20 @@ +--TEST-- +FFI: Test deprecated use of array helper functions on FFI classes doesn't crash +--EXTENSIONS-- +ffi +--INI-- +ffi.enable=1 +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/array.c b/ext/standard/array.c index 3b807c739a874..9a814ea07da47 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1073,6 +1073,10 @@ PHP_FUNCTION(end) ZEND_PARSE_PARAMETERS_END(); HashTable *array = get_ht_for_iap(array_zv, /* separate */ true); + if (zend_hash_num_elements(array) == 0) { + /* array->nInternalPointer is already 0 if the array is empty, even after removing elements */ + RETURN_FALSE; + } zend_hash_internal_pointer_end(array); if (USED_RET()) { @@ -1100,6 +1104,10 @@ PHP_FUNCTION(prev) ZEND_PARSE_PARAMETERS_END(); HashTable *array = get_ht_for_iap(array_zv, /* separate */ true); + if (zend_hash_num_elements(array) == 0) { + /* array->nInternalPointer is already 0 if the array is empty, even after removing elements */ + RETURN_FALSE; + } zend_hash_move_backwards(array); if (USED_RET()) { @@ -1127,6 +1135,10 @@ PHP_FUNCTION(next) ZEND_PARSE_PARAMETERS_END(); HashTable *array = get_ht_for_iap(array_zv, /* separate */ true); + if (zend_hash_num_elements(array) == 0) { + /* array->nInternalPointer is already 0 if the array is empty, even after removing elements */ + RETURN_FALSE; + } zend_hash_move_forward(array); if (USED_RET()) { @@ -1154,6 +1166,10 @@ PHP_FUNCTION(reset) ZEND_PARSE_PARAMETERS_END(); HashTable *array = get_ht_for_iap(array_zv, /* separate */ true); + if (zend_hash_num_elements(array) == 0) { + /* array->nInternalPointer is already 0 if the array is empty, even after removing elements */ + RETURN_FALSE; + } zend_hash_internal_pointer_reset(array); if (USED_RET()) { From c02af98ae519976737f4b0f6f2450ec14faa3261 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Feb 2023 08:29:47 +0200 Subject: [PATCH 350/895] Use AVX2 to accelerate strto{upper,lower} (only on 'AVX2-native' builds for now) On short strings, there is no difference in performance. However, for strings around 10,000 bytes long, the AVX2-accelerated function is about 55% faster than the SSE2-accelerated one. --- Zend/zend_operators.c | 28 ++++++++++++++++++++- ext/standard/tests/strings/strtoupper1.phpt | 17 +++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 5a4c30168adef..156c9435501a3 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -35,6 +35,9 @@ # include #endif +#ifdef ZEND_INTRIN_AVX2_NATIVE +#include +#endif #ifdef __SSE2__ #include #endif @@ -54,7 +57,30 @@ static _locale_t current_locale = NULL; #define TYPE_PAIR(t1,t2) (((t1) << 4) | (t2)) -#if __SSE2__ +#ifdef ZEND_INTRIN_AVX2_NATIVE +#define HAVE_BLOCKCONV + +#define BLOCKCONV_INIT_RANGE(start, end) \ + const __m256i blconv_offset = _mm256_set1_epi8((signed char)(SCHAR_MIN - start)); \ + const __m256i blconv_threshold = _mm256_set1_epi8(SCHAR_MIN + (end - start) + 1); + +#define BLOCKCONV_STRIDE sizeof(__m256i) + +#define BLOCKCONV_INIT_DELTA(delta) \ + const __m256i blconv_delta = _mm256_set1_epi8(delta); + +#define BLOCKCONV_LOAD(input) \ + __m256i blconv_operand = _mm256_loadu_si256((__m256i*)(input)); \ + __m256i blconv_mask = _mm256_cmpgt_epi8(blconv_threshold, _mm256_add_epi8(blconv_operand, blconv_offset)); + +#define BLOCKCONV_FOUND() _mm256_movemask_epi8(blconv_mask) + +#define BLOCKCONV_STORE(dest) \ + __m256i blconv_add = _mm256_and_si256(blconv_mask, blconv_delta); \ + __m256i blconv_result = _mm256_add_epi8(blconv_operand, blconv_add); \ + _mm256_storeu_si256((__m256i*)(dest), blconv_result); + +#elif __SSE2__ #define HAVE_BLOCKCONV /* Common code for SSE2 accelerated character case conversion */ diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index df4026eb76e9a..220906a5ba535 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -28,6 +28,11 @@ $strings = array ( "zzzzzzzzzzzzzzzzzzzz", "````````````````````", "{{{{{{{{{{{{{{{{{{{{", + /* And the AVX2 implementation also */ + "{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{", + "abcdefghijklmnopqrstuvwxyz01234", + "abcdefghijklmnopqrstuvwxyz012345", + "abcdefghijklmnopqrstuvwxyz0123456", "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ); @@ -348,6 +353,18 @@ string(20) "````````````````````" string(20) "{{{{{{{{{{{{{{{{{{{{" -- Iteration 12 -- +string(40) "{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{" + +-- Iteration 13 -- +string(31) "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234" + +-- Iteration 14 -- +string(32) "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345" + +-- Iteration 15 -- +string(33) "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" + +-- Iteration 16 -- string(62) "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" *** Testing strtoupper() with two different case strings *** From d2cdfdbe44f3bdded4aed8f84ef9db740c7f8adb Mon Sep 17 00:00:00 2001 From: rj1 Date: Sat, 4 Feb 2023 01:03:10 -0600 Subject: [PATCH 351/895] fixed some misspellings (#10503) --- Zend/Optimizer/zend_inference.c | 2 +- Zend/zend_inheritance.c | 2 +- Zend/zend_object_handlers.c | 2 +- ext/exif/exif.c | 4 ++-- ext/ffi/ffi.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index bc55ceaefc372..af2bea0e11205 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -2264,7 +2264,7 @@ static bool result_may_be_separated(zend_ssa *ssa, zend_ssa_op *ssa_op) && !ssa->vars[tmp_var].phi_use_chain) { zend_ssa_op *use_op = &ssa->ops[ssa->vars[tmp_var].use_chain]; - /* TODO: analize instructions between ssa_op and use_op */ + /* TODO: analyze instructions between ssa_op and use_op */ if (use_op == ssa_op + 1) { if ((use_op->op1_use == tmp_var && use_op->op1_use_chain < 0) || (use_op->op2_use == tmp_var && use_op->op2_use_chain < 0)) { diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b45c16ef91525..0f030d14217bd 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -3005,7 +3005,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string } /* Normally Stringable is added during compilation. However, if it is imported from a trait, - * we need to explicilty add the interface here. */ + * we need to explicitly add the interface here. */ if (ce->__tostring && !(ce->ce_flags & ZEND_ACC_TRAIT) && !zend_class_implements_interface(ce, zend_ce_stringable)) { ZEND_ASSERT(ce->__tostring->common.fn_flags & ZEND_ACC_TRAIT_CLONE); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 37e566b0a74df..6e0373d4f9601 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1193,7 +1193,7 @@ ZEND_API void zend_std_unset_property(zend_object *zobj, zend_string *name, void if (zobj->ce->__unset) { uint32_t *guard = zend_get_property_guard(zobj, name); if (!((*guard) & IN_UNSET)) { - /* have unseter - try with it! */ + /* have unsetter - try with it! */ (*guard) |= IN_UNSET; /* prevent circular unsetting */ zend_std_call_unsetter(zobj, name); (*guard) &= ~IN_UNSET; diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 19f5aafcfe284..83f88ff68d439 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -3298,7 +3298,7 @@ static bool exif_process_IFD_TAG_impl(image_info_type *ImageInfo, char *dir_entr * it is faster to use a static buffer there * BUT it offers also the possibility to have * pointers read without the need to free them - * explicitley before returning. */ + * explicitly before returning. */ memset(&cbuf, 0, sizeof(cbuf)); value_ptr = cbuf; } @@ -3477,7 +3477,7 @@ static bool exif_process_IFD_TAG_impl(image_info_type *ImageInfo, char *dir_entr switch (exif_convert_any_to_int(value_ptr, format, ImageInfo->motorola_intel)) { case 1: ImageInfo->FocalplaneUnits = 25.4; break; /* inch */ case 2: - /* According to the information I was using, 2 measn meters. + /* According to the information I was using, 2 means meters. But looking at the Cannon powershot's files, inches is the only sensible value. */ ImageInfo->FocalplaneUnits = 25.4; diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index c09e65239f50b..1398278662e1b 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -6592,7 +6592,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { dcl->type = type; /* reset "owned" flag */ zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym); } else { - /* useless declarartion */ + /* useless declaration */ zend_ffi_type_dtor(dcl->type); } } From 4199b72c50031cf16df476bf29f87c4c751b4770 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sat, 14 Jan 2023 16:55:16 +0000 Subject: [PATCH 352/895] Fix GH-10315: FPM unknown child alert not valid This changes the log level for an unknown child during wait as this is not unuasual if FPM master has pid 1 and also possible in some cases for higher pid processes. Based on that and the fact that this is not really a problem, there is just a debug level message emitted for pid 1 and for higher pid a warning is emitted. Closes GH-10319 --- NEWS | 3 +++ sapi/fpm/fpm/fpm_children.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f16e815291a3d..f13e1646df3a7 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) +- FPM: + . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) + - Opcache: . Fix incorrect page_size check. (nielsdos) diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index 6a5787c7ec8d4..2f8e3dc4d0acc 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -297,8 +297,10 @@ void fpm_children_bury(void) break; } } + } else if (fpm_globals.parent_pid == 1) { + zlog(ZLOG_DEBUG, "unknown child (%d) exited %s - most likely an orphan process (master process is the init process)", pid, buf); } else { - zlog(ZLOG_ALERT, "oops, unknown child (%d) exited %s. Please open a bug report (https://github.com/php/php-src/issues).", pid, buf); + zlog(ZLOG_WARNING, "unknown child (%d) exited %s - potentially a bug or pre exec child (e.g. s6-notifyoncheck)", pid, buf); } } } From 5b13e830742a17516963b757bf0ebc00db27586b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 20 Jan 2023 22:17:27 +0100 Subject: [PATCH 353/895] Fix GH-10385: FPM successful config test early exit This introduces an enum `fpm_init_return_status` to propagate the status up to fpm_main. This also makes the code clearer by not using magic integer return numbers. Closes GH-10388 --- NEWS | 1 + sapi/fpm/fpm/fpm.c | 10 +++++----- sapi/fpm/fpm/fpm.h | 8 +++++++- sapi/fpm/fpm/fpm_main.c | 12 +++++++----- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index f13e1646df3a7..2626b2d0a0305 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ PHP NEWS - FPM: . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) + . Fixed bug GH-10385 (FPM successful config test early exit). (nielsdos) - Opcache: . Fix incorrect page_size check. (nielsdos) diff --git a/sapi/fpm/fpm/fpm.c b/sapi/fpm/fpm/fpm.c index 30cb9da010bf1..cb86f403b89c9 100644 --- a/sapi/fpm/fpm/fpm.c +++ b/sapi/fpm/fpm/fpm.c @@ -41,7 +41,7 @@ struct fpm_globals_s fpm_globals = { .send_config_pipe = {0, 0}, }; -int fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int test_conf, int run_as_root, int force_daemon, int force_stderr) /* {{{ */ +enum fpm_init_return_status fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int test_conf, int run_as_root, int force_daemon, int force_stderr) /* {{{ */ { fpm_globals.argc = argc; fpm_globals.argv = argv; @@ -67,22 +67,22 @@ int fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int t 0 > fpm_event_init_main()) { if (fpm_globals.test_successful) { - exit(FPM_EXIT_OK); + return FPM_INIT_EXIT_OK; } else { zlog(ZLOG_ERROR, "FPM initialization failed"); - return -1; + return FPM_INIT_ERROR; } } if (0 > fpm_conf_write_pid()) { zlog(ZLOG_ERROR, "FPM initialization failed"); - return -1; + return FPM_INIT_ERROR; } fpm_stdio_init_final(); zlog(ZLOG_NOTICE, "fpm is running, pid %d", (int) fpm_globals.parent_pid); - return 0; + return FPM_INIT_CONTINUE; } /* }}} */ diff --git a/sapi/fpm/fpm/fpm.h b/sapi/fpm/fpm/fpm.h index f0610ca46dc62..ec036a2d68198 100644 --- a/sapi/fpm/fpm/fpm.h +++ b/sapi/fpm/fpm/fpm.h @@ -34,8 +34,14 @@ #endif +enum fpm_init_return_status { + FPM_INIT_ERROR, + FPM_INIT_CONTINUE, + FPM_INIT_EXIT_OK, +}; + int fpm_run(int *max_requests); -int fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int test_conf, int run_as_root, int force_daemon, int force_stderr); +enum fpm_init_return_status fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int test_conf, int run_as_root, int force_daemon, int force_stderr); struct fpm_globals_s { pid_t parent_pid; diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 5d83ee08af2c7..7cb0a0a33b814 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1532,7 +1532,6 @@ int main(int argc, char *argv[]) int force_stderr = 0; int php_information = 0; int php_allow_to_run_as_root = 0; - int ret; #if ZEND_RC_DEBUG bool old_rc_debug; #endif @@ -1800,21 +1799,24 @@ consult the installation file that came with this distribution, or visit \n\ zend_rc_debug = 0; #endif - ret = fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root, force_daemon, force_stderr); + enum fpm_init_return_status ret = fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root, force_daemon, force_stderr); #if ZEND_RC_DEBUG zend_rc_debug = old_rc_debug; #endif - if (ret < 0) { - + if (ret == FPM_INIT_ERROR) { if (fpm_globals.send_config_pipe[1]) { int writeval = 0; zlog(ZLOG_DEBUG, "Sending \"0\" (error) to parent via fd=%d", fpm_globals.send_config_pipe[1]); zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); close(fpm_globals.send_config_pipe[1]); } - return FPM_EXIT_CONFIG; + exit_status = FPM_EXIT_CONFIG; + goto out; + } else if (ret == FPM_INIT_EXIT_OK) { + exit_status = FPM_EXIT_OK; + goto out; } if (fpm_globals.send_config_pipe[1]) { From 99b86141ae36633dce70e202d9fe75c73996097d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 2 Feb 2023 21:30:54 +0100 Subject: [PATCH 354/895] Introduce convenience macros for copying flags that hold when concatenating two strings This abstracts away, and cleans up, the flag handling for properties of strings that hold when concatenating two strings if they both hold that property. (These macros also work with simply copies of strings because a copy of a string can be considered a concatenation with the empty string.) This gets rid of some branches and some repetitive code, and leaves room for adding more flags like these in the future. --- Zend/zend_operators.c | 6 +- Zend/zend_string.c | 8 +- Zend/zend_string.h | 21 +++++ Zend/zend_vm_def.h | 16 +--- Zend/zend_vm_execute.h | 138 ++++++----------------------- ext/opcache/jit/zend_jit_helpers.c | 18 +--- 6 files changed, 57 insertions(+), 150 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 156c9435501a3..f520b833bc333 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1981,11 +1981,7 @@ ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); if (UNEXPECTED(op1_len > ZSTR_MAX_LEN - op2_len)) { zend_throw_error(NULL, "String size overflow"); diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 2d6a30d37cbaa..d65101e778c14 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -191,11 +191,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_str return zend_interned_string_ht_lookup(str, &interned_strings_permanent); } -static zend_string* ZEND_FASTCALL zend_init_string_for_interning(zend_string *str, bool persistent) { - uint32_t flags = 0; - if (ZSTR_IS_VALID_UTF8(str)) { - flags = IS_STR_VALID_UTF8; - } +static zend_string* ZEND_FASTCALL zend_init_string_for_interning(zend_string *str, bool persistent) +{ + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(str); zend_ulong h = ZSTR_H(str); zend_string_delref(str); str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), persistent); diff --git a/Zend/zend_string.h b/Zend/zend_string.h index d7bca020c3e19..3eca7343a008b 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -82,6 +82,27 @@ END_EXTERN_C() #define ZSTR_IS_INTERNED(s) (GC_FLAGS(s) & IS_STR_INTERNED) #define ZSTR_IS_VALID_UTF8(s) (GC_FLAGS(s) & IS_STR_VALID_UTF8) +/* These are properties, encoded as flags, that will hold on the resulting string + * after concatenating two strings that have these property. + * Example: concatenating two UTF-8 strings yields another UTF-8 string. */ +#define ZSTR_COPYABLE_CONCAT_PROPERTIES (IS_STR_VALID_UTF8) + +#define ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(s) (GC_FLAGS(s) & ZSTR_COPYABLE_CONCAT_PROPERTIES) +/* This macro returns the copyable concat properties which hold on both strings. */ +#define ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(s1, s2) (GC_FLAGS(s1) & GC_FLAGS(s2) & ZSTR_COPYABLE_CONCAT_PROPERTIES) + +#define ZSTR_COPY_CONCAT_PROPERTIES(out, in) do { \ + zend_string *_out = (out); \ + uint32_t properties = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES((in)); \ + GC_ADD_FLAGS(_out, properties); \ +} while (0) + +#define ZSTR_COPY_CONCAT_PROPERTIES_BOTH(out, in1, in2) do { \ + zend_string *_out = (out); \ + uint32_t properties = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH((in1), (in2)); \ + GC_ADD_FLAGS(_out, properties); \ +} while (0) + #define ZSTR_EMPTY_ALLOC() zend_empty_string #define ZSTR_CHAR(c) zend_one_char_string[c] #define ZSTR_KNOWN(idx) zend_known_strings[idx] diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index ca062b9512ac8..91864e7a7273b 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -384,11 +384,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (OP1_TYPE != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (OP2_TYPE == IS_CONST || OP2_TYPE == IS_CV) { @@ -3147,11 +3143,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (OP1_TYPE != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (OP2_TYPE == IS_CONST || OP2_TYPE == IS_CV) { @@ -3248,9 +3240,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMP memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (OP1_TYPE != IS_CONST) { zend_string_release_ex(op1_str, 0); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index d9dd9b5890241..ee249b51f308a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -6624,11 +6624,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -6725,9 +6721,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_ memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -8702,11 +8696,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -9134,11 +9124,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -9235,9 +9221,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_ memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -11086,11 +11070,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -11518,11 +11498,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CONST != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -11619,9 +11595,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CONST != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -15135,11 +15109,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -15881,11 +15851,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -15982,9 +15948,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_ memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -16590,11 +16554,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -17336,11 +17296,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -17437,9 +17393,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -18296,11 +18250,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER( zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -18680,11 +18630,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -18781,9 +18727,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -40356,11 +40300,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -42859,11 +42799,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CONST == IS_CONST || IS_CONST == IS_CV) { @@ -42960,9 +42896,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -44186,11 +44120,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER( zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -46618,11 +46548,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if ((IS_TMP_VAR|IS_VAR) == IS_CONST || (IS_TMP_VAR|IS_VAR) == IS_CV) { @@ -46719,9 +46645,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); @@ -49498,11 +49422,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -52029,11 +51949,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER zend_string *op1_str = Z_STR_P(op1); zend_string *op2_str = Z_STR_P(op2); zend_string *str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(op1_str, op2_str); if (IS_CV != IS_CONST && UNEXPECTED(ZSTR_LEN(op1_str) == 0)) { if (IS_CV == IS_CONST || IS_CV == IS_CV) { @@ -52130,9 +52046,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str)); memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1); - if (ZSTR_IS_VALID_UTF8(op1_str) && ZSTR_IS_VALID_UTF8(op2_str)) { - GC_ADD_FLAGS(str, IS_STR_VALID_UTF8); - } + ZSTR_COPY_CONCAT_PROPERTIES_BOTH(str, op1_str, op2_str); ZVAL_NEW_STR(EX_VAR(opline->result.var), str); if (IS_CV != IS_CONST) { zend_string_release_ex(op1_str, 0); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 261b456a4fc31..9c4b80e28513e 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1633,11 +1633,7 @@ static void ZEND_FASTCALL zend_jit_fast_assign_concat_helper(zval *op1, zval *op size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1673,11 +1669,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_helper(zval *result, zval *op1, z size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); @@ -1701,11 +1693,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_tmp_helper(zval *result, zval *op size_t op2_len = Z_STRLEN_P(op2); size_t result_len = op1_len + op2_len; zend_string *result_str; - uint32_t flags = 0; - - if (ZSTR_IS_VALID_UTF8(Z_STR_P(op1)) && ZSTR_IS_VALID_UTF8(Z_STR_P(op2))) { - flags = IS_STR_VALID_UTF8; - } + uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { zend_throw_error(NULL, "String size overflow"); From c2d4bafc4fb9f95cd958fd43ea74cbc7ebc4d276 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 3 Feb 2023 20:48:04 +0100 Subject: [PATCH 355/895] Copy UTF-8 flag for str_repeat --- ext/standard/string.c | 1 + ext/zend_test/tests/strings_marked_as_utf8.phpt | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ext/standard/string.c b/ext/standard/string.c index 622ed3a9d4369..881e172c6c260 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5059,6 +5059,7 @@ PHP_FUNCTION(str_repeat) /* Initialize the result string */ result = zend_string_safe_alloc(ZSTR_LEN(input_str), mult, 0, 0); result_len = ZSTR_LEN(input_str) * mult; + ZSTR_COPY_CONCAT_PROPERTIES(result, input_str); /* Heavy optimization for situations where input string is 1 byte long */ if (ZSTR_LEN(input_str) == 1) { diff --git a/ext/zend_test/tests/strings_marked_as_utf8.phpt b/ext/zend_test/tests/strings_marked_as_utf8.phpt index 5b6dfb6a0763d..1519459f1dad1 100644 --- a/ext/zend_test/tests/strings_marked_as_utf8.phpt +++ b/ext/zend_test/tests/strings_marked_as_utf8.phpt @@ -107,6 +107,14 @@ $s = $o . $o; var_dump($s); var_dump(zend_test_is_string_marked_as_valid_utf8($s)); +echo "str_repeat:\n"; +$string = "a"; +$string_concat = str_repeat($string, 100); +var_dump(zend_test_is_string_marked_as_valid_utf8($string_concat)); +$string = "\xff"; +$string_concat = str_repeat($string, 100); +var_dump(zend_test_is_string_marked_as_valid_utf8($string_concat)); + ?> --EXPECT-- Empty strings: @@ -148,3 +156,6 @@ bool(true) Concatenation of objects: string(2) "zz" bool(true) +str_repeat: +bool(true) +bool(false) From d3abcae4a25dab4c34fd5f0c8d1d620b2e35fca0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 5 Feb 2023 16:10:01 +0100 Subject: [PATCH 356/895] ext/snmp: use memcpy() instead of memmove() (#10498) memcpy() may be faster because it does not have to consider overlapping buffers. --- ext/snmp/snmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index a1cdcc7096752..617d07ab7822a 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -397,7 +397,7 @@ static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS, int st, php_snmp_error(getThis(), PHP_SNMP_ERRNO_NOERROR, ""); if (st & SNMP_CMD_WALK) { /* remember root OID */ - memmove((char *)root, (char *)(objid_query->vars[0].name), (objid_query->vars[0].name_length) * sizeof(oid)); + memcpy((char *)root, (char *)(objid_query->vars[0].name), (objid_query->vars[0].name_length) * sizeof(oid)); rootlen = objid_query->vars[0].name_length; objid_query->offset = objid_query->count; } @@ -551,7 +551,7 @@ static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS, int st, php_snmp_error(getThis(), PHP_SNMP_ERRNO_OID_NOT_INCREASING, "Error: OID not increasing: %s", buf2); keepwalking = false; } else { - memmove((char *)(objid_query->vars[0].name), (char *)vars->name, vars->name_length * sizeof(oid)); + memcpy((char *)(objid_query->vars[0].name), (char *)vars->name, vars->name_length * sizeof(oid)); objid_query->vars[0].name_length = vars->name_length; keepwalking = true; } From 722fbd01a377ac6f42e8ab9c3ce75247cd7855e9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:58:39 +0100 Subject: [PATCH 357/895] Implement an SSE2 accelerated version of zend_adler32 (#10507) When benchmarking the file cache of opcache on index.php from a dummy WordPress install, I noticed that 36.42% of the time was spent in zend_adler32 to verify the checksums of the files. Callgrind reported that 332,731,216 instructions were executed during that run and average time to execute the index file was around 91ms. This patch implements an SSE2 accelerated version of zend_adler32, which reduces the number of instructions executed on that bench to 248,600,983, which is a reduction of ~25%. There is also a decrease in wallclock time measurable: around 10ms. Now only 16.05% of the time is spent computing checksums. The benchmark tests were performed using Callgrind, and time for the wallclock time. These tests were executed multiple times and their results were averaged. The WordPress install only contains two almost-blank posts. --- ext/opcache/zend_accelerator_util_funcs.c | 80 +++++++++++++++++++---- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index c5efdc3f33abf..b99a50b212828 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -27,6 +27,11 @@ #include "zend_shared_alloc.h" #include "zend_observer.h" +#ifdef __SSE2__ +/* For SSE2 adler32 */ +#include +#endif + typedef int (*id_function_t)(void *, void *); typedef void (*unique_copy_ctor_func_t)(void *pElement); @@ -451,11 +456,62 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, #define ADLER32_NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ -#define ADLER32_DO1(buf) {s1 += *(buf); s2 += s1;} -#define ADLER32_DO2(buf, i) ADLER32_DO1(buf + i); ADLER32_DO1(buf + i + 1); -#define ADLER32_DO4(buf, i) ADLER32_DO2(buf, i); ADLER32_DO2(buf, i + 2); -#define ADLER32_DO8(buf, i) ADLER32_DO4(buf, i); ADLER32_DO4(buf, i + 4); -#define ADLER32_DO16(buf) ADLER32_DO8(buf, 0); ADLER32_DO8(buf, 8); +#define ADLER32_SCALAR_DO1(buf) {s1 += *(buf); s2 += s1;} +#define ADLER32_SCALAR_DO2(buf, i) ADLER32_SCALAR_DO1(buf + i); ADLER32_SCALAR_DO1(buf + i + 1); +#define ADLER32_SCALAR_DO4(buf, i) ADLER32_SCALAR_DO2(buf, i); ADLER32_SCALAR_DO2(buf, i + 2); +#define ADLER32_SCALAR_DO8(buf, i) ADLER32_SCALAR_DO4(buf, i); ADLER32_SCALAR_DO4(buf, i + 4); +#define ADLER32_SCALAR_DO16(buf) ADLER32_SCALAR_DO8(buf, 0); ADLER32_SCALAR_DO8(buf, 8); + +static zend_always_inline void adler32_do16_loop(unsigned char *buf, unsigned char *end, unsigned int *s1_out, unsigned int *s2_out) +{ + unsigned int s1 = *s1_out; + unsigned int s2 = *s2_out; + +#ifdef __SSE2__ + const __m128i zero = _mm_setzero_si128(); + + __m128i accumulate_s2 = zero; + unsigned int accumulate_s1 = 0; + + do { + __m128i read = _mm_loadu_si128((__m128i *) buf); /* [A:P] */ + + /* Split the 8-bit-element vector into two 16-bit-element vectors where each element gets zero-extended from 8-bits to 16-bits */ + __m128i lower = _mm_unpacklo_epi8(read, zero); /* [A:H] zero-extended to 16-bits */ + __m128i higher = _mm_unpackhi_epi8(read, zero); /* [I:P] zero-extended to 16-bits */ + lower = _mm_madd_epi16(lower, _mm_set_epi16(9, 10, 11, 12, 13, 14, 15, 16)); /* [A * 16:H * 9] */ + higher = _mm_madd_epi16(higher, _mm_set_epi16(1, 2, 3, 4, 5, 6, 7, 8)); /* [I * 8:P * 1] */ + + /* We'll cheat here: it's difficult to add 16-bit elementwise, but we can do 32-bit additions. + * The highest value the sum of two elements of the vectors can take is 0xff * 16 + 0xff * 8 < 0xffff. + * That means there is no carry possible from 16->17 bits so the 32-bit addition is safe. */ + __m128i sum = _mm_add_epi32(lower, higher); /* [A * 16 + I * 8:H * 9 + P * 1] */ + accumulate_s2 = _mm_add_epi32(accumulate_s2, sum); + accumulate_s1 += s1; + + /* Computes 8-bit element-wise abs(buf - zero) and then sums the elements into two 16 bit parts */ + sum = _mm_sad_epu8(read, zero); + s1 += _mm_cvtsi128_si32(sum) + _mm_extract_epi16(sum, 4); + + buf += 16; + } while (buf != end); + + /* For convenience, let's do a rename of variables and let accumulate_s2 = [X, Y, Z, W] */ + __m128i shuffled = _mm_shuffle_epi32(accumulate_s2, _MM_SHUFFLE(1, 0, 0, 2)); /* [Y, X, X, Z] */ + accumulate_s2 = _mm_add_epi32(accumulate_s2, shuffled); /* [X + Y, Y + X, Z + X, W + Z] */ + shuffled = _mm_shuffle_epi32(accumulate_s2, _MM_SHUFFLE(3, 3, 3, 3)); /* [X + Y, X + Y, X + Y, X + Y] */ + accumulate_s2 = _mm_add_epi32(accumulate_s2, shuffled); /* [/, /, /, W + Z + X + Y] */ + s2 += accumulate_s1 * 16 + _mm_cvtsi128_si32(accumulate_s2); +#else + do { + ADLER32_SCALAR_DO16(buf); + buf += 16; + } while (buf != end); +#endif + + *s1_out = s1; + *s2_out = s2; +} unsigned int zend_adler32(unsigned int checksum, unsigned char *buf, uint32_t len) { @@ -466,10 +522,8 @@ unsigned int zend_adler32(unsigned int checksum, unsigned char *buf, uint32_t le while (len >= ADLER32_NMAX) { len -= ADLER32_NMAX; end = buf + ADLER32_NMAX; - do { - ADLER32_DO16(buf); - buf += 16; - } while (buf != end); + adler32_do16_loop(buf, end, &s1, &s2); + buf = end; s1 %= ADLER32_BASE; s2 %= ADLER32_BASE; } @@ -478,15 +532,13 @@ unsigned int zend_adler32(unsigned int checksum, unsigned char *buf, uint32_t le if (len >= 16) { end = buf + (len & 0xfff0); len &= 0xf; - do { - ADLER32_DO16(buf); - buf += 16; - } while (buf != end); + adler32_do16_loop(buf, end, &s1, &s2); + buf = end; } if (len) { end = buf + len; do { - ADLER32_DO1(buf); + ADLER32_SCALAR_DO1(buf); buf++; } while (buf != end); } From 49551d7c29ea2b4ebf904cd5a03e16f1b9f66634 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 21 Jan 2023 20:49:31 +0100 Subject: [PATCH 358/895] Sync boost/context assembly files for fibers Fixes GH-10398 The stack was misaligned upon entering the trampoline function [1], this causes a CPU trap when the SSE instruction is executed to copy data from the stack. This was fixed upstream [2]. This commit syncs all upstream changes from the boost/context assembly files to our copy. [1] https://github.com/php/php-src/pull/10407#issuecomment-1404180877 [2] https://github.com/boostorg/context/pull/219 Closes GH-10407. --- NEWS | 3 + Zend/asm/jump_i386_sysv_elf_gas.S | 44 ++++--- Zend/asm/jump_ppc32_sysv_macho_gas.S | 184 +++++++++++++-------------- Zend/asm/jump_ppc64_sysv_macho_gas.S | 18 +-- Zend/asm/jump_x86_64_sysv_elf_gas.S | 79 +++++++++--- Zend/asm/make_i386_sysv_elf_gas.S | 26 ++-- Zend/asm/make_i386_sysv_macho_gas.S | 4 +- Zend/asm/make_ppc32_sysv_macho_gas.S | 83 +++++++----- Zend/asm/make_ppc64_sysv_macho_gas.S | 16 +-- Zend/asm/make_x86_64_sysv_elf_gas.S | 71 ++++++++++- 10 files changed, 333 insertions(+), 195 deletions(-) diff --git a/NEWS b/NEWS index 2626b2d0a0305..ea21713af4c31 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) +- Fiber: + . Fixed assembly on alpine x86. (nielsdos) + - FPM: . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) . Fixed bug GH-10385 (FPM successful config test early exit). (nielsdos) diff --git a/Zend/asm/jump_i386_sysv_elf_gas.S b/Zend/asm/jump_i386_sysv_elf_gas.S index b96d4b5c0e70e..47be9e77822e0 100644 --- a/Zend/asm/jump_i386_sysv_elf_gas.S +++ b/Zend/asm/jump_i386_sysv_elf_gas.S @@ -12,14 +12,14 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | * + * | fc_mxcsr|fc_x87_cw| guard | EDI | ESI | EBX | EBP | EIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * - * | 0x20 | 0x24 | | * + * | 0x20 | 0x24 | 0x28 | | * * ---------------------------------------------------------------------------------- * - * | to | data | | * + * | hidden | to | data | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ @@ -30,50 +30,60 @@ .align 2 .type jump_fcontext,@function jump_fcontext: - leal -0x18(%esp), %esp /* prepare stack */ + leal -0x1c(%esp), %esp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%esp) /* save MMX control- and status-word */ fnstcw 0x4(%esp) /* save x87 control-word */ #endif - movl %edi, 0x8(%esp) /* save EDI */ - movl %esi, 0xc(%esp) /* save ESI */ - movl %ebx, 0x10(%esp) /* save EBX */ - movl %ebp, 0x14(%esp) /* save EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl %gs:0x14, %ecx /* read stack guard from TLS record */ + movl %ecx, 0x8(%esp) /* save stack guard */ +#endif + + movl %edi, 0xc(%esp) /* save EDI */ + movl %esi, 0x10(%esp) /* save ESI */ + movl %ebx, 0x14(%esp) /* save EBX */ + movl %ebp, 0x18(%esp) /* save EBP */ /* store ESP (pointing to context-data) in ECX */ movl %esp, %ecx /* first arg of jump_fcontext() == fcontext to jump to */ - movl 0x20(%esp), %eax + movl 0x24(%esp), %eax /* second arg of jump_fcontext() == data to be transferred */ - movl 0x24(%esp), %edx + movl 0x28(%esp), %edx /* restore ESP (pointing to context-data) from EAX */ movl %eax, %esp /* address of returned transport_t */ - movl 0x1c(%esp), %eax + movl 0x20(%esp), %eax /* return parent fcontext_t */ movl %ecx, (%eax) /* return data */ movl %edx, 0x4(%eax) - movl 0x18(%esp), %ecx /* restore EIP */ + movl 0x1c(%esp), %ecx /* restore EIP */ #if !defined(BOOST_USE_TSX) ldmxcsr (%esp) /* restore MMX control- and status-word */ fldcw 0x4(%esp) /* restore x87 control-word */ #endif - movl 0x8(%esp), %edi /* restore EDI */ - movl 0xc(%esp), %esi /* restore ESI */ - movl 0x10(%esp), %ebx /* restore EBX */ - movl 0x14(%esp), %ebp /* restore EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl 0x8(%esp), %edx /* load stack guard */ + movl %edx, %gs:0x14 /* restore stack guard to TLS record */ +#endif + + movl 0xc(%esp), %edi /* restore EDI */ + movl 0x10(%esp), %esi /* restore ESI */ + movl 0x14(%esp), %ebx /* restore EBX */ + movl 0x18(%esp), %ebp /* restore EBP */ - leal 0x20(%esp), %esp /* prepare stack */ + leal 0x24(%esp), %esp /* prepare stack */ /* jump to context */ jmp *%ecx diff --git a/Zend/asm/jump_ppc32_sysv_macho_gas.S b/Zend/asm/jump_ppc32_sysv_macho_gas.S index c555237afa2e9..fef90c295f8c9 100644 --- a/Zend/asm/jump_ppc32_sysv_macho_gas.S +++ b/Zend/asm/jump_ppc32_sysv_macho_gas.S @@ -80,122 +80,122 @@ _jump_fcontext: ; reserve space on stack subi r1, r1, 244 - stfd f14, 0(r1) # save F14 - stfd f15, 8(r1) # save F15 - stfd f16, 16(r1) # save F16 - stfd f17, 24(r1) # save F17 - stfd f18, 32(r1) # save F18 - stfd f19, 40(r1) # save F19 - stfd f20, 48(r1) # save F20 - stfd f21, 56(r1) # save F21 - stfd f22, 64(r1) # save F22 - stfd f23, 72(r1) # save F23 - stfd f24, 80(r1) # save F24 - stfd f25, 88(r1) # save F25 - stfd f26, 96(r1) # save F26 - stfd f27, 104(r1) # save F27 - stfd f28, 112(r1) # save F28 - stfd f29, 120(r1) # save F29 - stfd f30, 128(r1) # save F30 - stfd f31, 136(r1) # save F31 - mffs f0 # load FPSCR - stfd f0, 144(r1) # save FPSCR + stfd f14, 0(r1) ; save F14 + stfd f15, 8(r1) ; save F15 + stfd f16, 16(r1) ; save F16 + stfd f17, 24(r1) ; save F17 + stfd f18, 32(r1) ; save F18 + stfd f19, 40(r1) ; save F19 + stfd f20, 48(r1) ; save F20 + stfd f21, 56(r1) ; save F21 + stfd f22, 64(r1) ; save F22 + stfd f23, 72(r1) ; save F23 + stfd f24, 80(r1) ; save F24 + stfd f25, 88(r1) ; save F25 + stfd f26, 96(r1) ; save F26 + stfd f27, 104(r1) ; save F27 + stfd f28, 112(r1) ; save F28 + stfd f29, 120(r1) ; save F29 + stfd f30, 128(r1) ; save F30 + stfd f31, 136(r1) ; save F31 + mffs f0 ; load FPSCR + stfd f0, 144(r1) ; save FPSCR - stw r13, 152(r1) # save R13 - stw r14, 156(r1) # save R14 - stw r15, 160(r1) # save R15 - stw r16, 164(r1) # save R16 - stw r17, 168(r1) # save R17 - stw r18, 172(r1) # save R18 - stw r19, 176(r1) # save R19 - stw r20, 180(r1) # save R20 - stw r21, 184(r1) # save R21 - stw r22, 188(r1) # save R22 - stw r23, 192(r1) # save R23 - stw r24, 196(r1) # save R24 - stw r25, 200(r1) # save R25 - stw r26, 204(r1) # save R26 - stw r27, 208(r1) # save R27 - stw r28, 212(r1) # save R28 - stw r29, 216(r1) # save R29 - stw r30, 220(r1) # save R30 - stw r31, 224(r1) # save R31 - stw r3, 228(r1) # save hidden + stw r13, 152(r1) ; save R13 + stw r14, 156(r1) ; save R14 + stw r15, 160(r1) ; save R15 + stw r16, 164(r1) ; save R16 + stw r17, 168(r1) ; save R17 + stw r18, 172(r1) ; save R18 + stw r19, 176(r1) ; save R19 + stw r20, 180(r1) ; save R20 + stw r21, 184(r1) ; save R21 + stw r22, 188(r1) ; save R22 + stw r23, 192(r1) ; save R23 + stw r24, 196(r1) ; save R24 + stw r25, 200(r1) ; save R25 + stw r26, 204(r1) ; save R26 + stw r27, 208(r1) ; save R27 + stw r28, 212(r1) ; save R28 + stw r29, 216(r1) ; save R29 + stw r30, 220(r1) ; save R30 + stw r31, 224(r1) ; save R31 + stw r3, 228(r1) ; save hidden - # save CR + ; save CR mfcr r0 stw r0, 232(r1) - # save LR + ; save LR mflr r0 stw r0, 236(r1) - # save LR as PC + ; save LR as PC stw r0, 240(r1) - # store RSP (pointing to context-data) in R6 + ; store RSP (pointing to context-data) in R6 mr r6, r1 - # restore RSP (pointing to context-data) from R4 + ; restore RSP (pointing to context-data) from R4 mr r1, r4 - lfd f14, 0(r1) # restore F14 - lfd f15, 8(r1) # restore F15 - lfd f16, 16(r1) # restore F16 - lfd f17, 24(r1) # restore F17 - lfd f18, 32(r1) # restore F18 - lfd f19, 40(r1) # restore F19 - lfd f20, 48(r1) # restore F20 - lfd f21, 56(r1) # restore F21 - lfd f22, 64(r1) # restore F22 - lfd f23, 72(r1) # restore F23 - lfd f24, 80(r1) # restore F24 - lfd f25, 88(r1) # restore F25 - lfd f26, 96(r1) # restore F26 - lfd f27, 104(r1) # restore F27 - lfd f28, 112(r1) # restore F28 - lfd f29, 120(r1) # restore F29 - lfd f30, 128(r1) # restore F30 - lfd f31, 136(r1) # restore F31 - lfd f0, 144(r1) # load FPSCR - mtfsf 0xff, f0 # restore FPSCR + lfd f14, 0(r1) ; restore F14 + lfd f15, 8(r1) ; restore F15 + lfd f16, 16(r1) ; restore F16 + lfd f17, 24(r1) ; restore F17 + lfd f18, 32(r1) ; restore F18 + lfd f19, 40(r1) ; restore F19 + lfd f20, 48(r1) ; restore F20 + lfd f21, 56(r1) ; restore F21 + lfd f22, 64(r1) ; restore F22 + lfd f23, 72(r1) ; restore F23 + lfd f24, 80(r1) ; restore F24 + lfd f25, 88(r1) ; restore F25 + lfd f26, 96(r1) ; restore F26 + lfd f27, 104(r1) ; restore F27 + lfd f28, 112(r1) ; restore F28 + lfd f29, 120(r1) ; restore F29 + lfd f30, 128(r1) ; restore F30 + lfd f31, 136(r1) ; restore F31 + lfd f0, 144(r1) ; load FPSCR + mtfsf 0xff, f0 ; restore FPSCR - lwz r13, 152(r1) # restore R13 - lwz r14, 156(r1) # restore R14 - lwz r15, 160(r1) # restore R15 - lwz r16, 164(r1) # restore R16 - lwz r17, 168(r1) # restore R17 - lwz r18, 172(r1) # restore R18 - lwz r19, 176(r1) # restore R19 - lwz r20, 180(r1) # restore R20 - lwz r21, 184(r1) # restore R21 - lwz r22, 188(r1) # restore R22 - lwz r23, 192(r1) # restore R23 - lwz r24, 196(r1) # restore R24 - lwz r25, 200(r1) # restore R25 - lwz r26, 204(r1) # restore R26 - lwz r27, 208(r1) # restore R27 - lwz r28, 212(r1) # restore R28 - lwz r29, 216(r1) # restore R29 - lwz r30, 220(r1) # restore R30 - lwz r31, 224(r1) # restore R31 - lwz r3, 228(r1) # restore hidden + lwz r13, 152(r1) ; restore R13 + lwz r14, 156(r1) ; restore R14 + lwz r15, 160(r1) ; restore R15 + lwz r16, 164(r1) ; restore R16 + lwz r17, 168(r1) ; restore R17 + lwz r18, 172(r1) ; restore R18 + lwz r19, 176(r1) ; restore R19 + lwz r20, 180(r1) ; restore R20 + lwz r21, 184(r1) ; restore R21 + lwz r22, 188(r1) ; restore R22 + lwz r23, 192(r1) ; restore R23 + lwz r24, 196(r1) ; restore R24 + lwz r25, 200(r1) ; restore R25 + lwz r26, 204(r1) ; restore R26 + lwz r27, 208(r1) ; restore R27 + lwz r28, 212(r1) ; restore R28 + lwz r29, 216(r1) ; restore R29 + lwz r30, 220(r1) ; restore R30 + lwz r31, 224(r1) ; restore R31 + lwz r3, 228(r1) ; restore hidden - # restore CR + ; restore CR lwz r0, 232(r1) mtcr r0 - # restore LR + ; restore LR lwz r0, 236(r1) mtlr r0 - # load PC + ; load PC lwz r0, 240(r1) - # restore CTR + ; restore CTR mtctr r0 - # adjust stack + ; adjust stack addi r1, r1, 244 - # return transfer_t + ; return transfer_t stw r6, 0(r3) stw r5, 4(r3) - # jump to context + ; jump to context bctr diff --git a/Zend/asm/jump_ppc64_sysv_macho_gas.S b/Zend/asm/jump_ppc64_sysv_macho_gas.S index 74fcb2ab3528f..dcc6c645db619 100644 --- a/Zend/asm/jump_ppc64_sysv_macho_gas.S +++ b/Zend/asm/jump_ppc64_sysv_macho_gas.S @@ -12,7 +12,7 @@ * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * - * | TOC | R14 | R15 | R16 | * + * | R13 | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * @@ -61,7 +61,7 @@ * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * - * | TOC saved | FCTX | DATA | | * + * | FCTX | DATA | | | * * ------------------------------------------------- * * * *******************************************************/ @@ -138,27 +138,27 @@ _jump_fcontext: ; load PC ld r12, 176(r1) - # restore CTR + ; restore CTR mtctr r12 - # adjust stack + ; adjust stack addi r1, r1, 184 - # zero in r3 indicates first jump to context-function + ; zero in r3 indicates first jump to context-function cmpdi r3, 0 beq use_entry_arg - # return transfer_t + ; return transfer_t std r6, 0(r3) std r5, 8(r3) - # jump to context + ; jump to context bctr use_entry_arg: - # copy transfer_t into transfer_fn arg registers + ; copy transfer_t into transfer_fn arg registers mr r3, r6 mr r4, r5 - # jump to context + ; jump to context bctr diff --git a/Zend/asm/jump_x86_64_sysv_elf_gas.S b/Zend/asm/jump_x86_64_sysv_elf_gas.S index c675c8c774c23..58f0e241d70ff 100644 --- a/Zend/asm/jump_x86_64_sysv_elf_gas.S +++ b/Zend/asm/jump_x86_64_sysv_elf_gas.S @@ -12,20 +12,29 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * + * | fc_mxcsr|fc_x87_cw| guard | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * - * | R15 | RBX | RBP | RIP | * + * | R14 | R15 | RBX | RBP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | | * + * ---------------------------------------------------------------------------------- * + * | RIP | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ # if defined __CET__ # include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) # else # define _CET_ENDBR # endif @@ -36,19 +45,32 @@ .align 16 jump_fcontext: _CET_ENDBR - leaq -0x38(%rsp), %rsp /* prepare stack */ + leaq -0x40(%rsp), %rsp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%rsp) /* save MMX control- and status-word */ fnstcw 0x4(%rsp) /* save x87 control-word */ #endif - movq %r12, 0x8(%rsp) /* save R12 */ - movq %r13, 0x10(%rsp) /* save R13 */ - movq %r14, 0x18(%rsp) /* save R14 */ - movq %r15, 0x20(%rsp) /* save R15 */ - movq %rbx, 0x28(%rsp) /* save RBX */ - movq %rbp, 0x30(%rsp) /* save RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq %fs:0x28, %rcx /* read stack guard from TLS record */ + movq %rcx, 0x8(%rsp) /* save stack guard */ +#endif + + movq %r12, 0x10(%rsp) /* save R12 */ + movq %r13, 0x18(%rsp) /* save R13 */ + movq %r14, 0x20(%rsp) /* save R14 */ + movq %r15, 0x28(%rsp) /* save R15 */ + movq %rbx, 0x30(%rsp) /* save RBX */ + movq %rbp, 0x38(%rsp) /* save RBP */ + +#if BOOST_CONTEXT_SHADOW_STACK + /* grow the stack to reserve space for shadow stack pointer(SSP) */ + leaq -0x8(%rsp), %rsp + /* read the current SSP and store it */ + rdsspq %rcx + movq %rcx, (%rsp) +#endif /* store RSP (pointing to context-data) in RAX */ movq %rsp, %rax @@ -56,21 +78,44 @@ jump_fcontext: /* restore RSP (pointing to context-data) from RDI */ movq %rdi, %rsp - movq 0x38(%rsp), %r8 /* restore return-address */ +#if BOOST_CONTEXT_SHADOW_STACK + /* first 8 bytes are SSP */ + movq (%rsp), %rcx + leaq 0x8(%rsp), %rsp + + /* Restore target(new) shadow stack */ + rstorssp -8(%rcx) + /* restore token for previous shadow stack is pushed */ + /* on previous shadow stack after saveprevssp */ + saveprevssp + + /* when return, jump_fcontext jump to restored return address */ + /* (r8) instead of RET. This miss of RET implies us to unwind */ + /* shadow stack accordingly. Otherwise mismatch occur */ + movq $1, %rcx + incsspq %rcx +#endif + + movq 0x40(%rsp), %r8 /* restore return-address */ #if !defined(BOOST_USE_TSX) ldmxcsr (%rsp) /* restore MMX control- and status-word */ fldcw 0x4(%rsp) /* restore x87 control-word */ #endif - movq 0x8(%rsp), %r12 /* restore R12 */ - movq 0x10(%rsp), %r13 /* restore R13 */ - movq 0x18(%rsp), %r14 /* restore R14 */ - movq 0x20(%rsp), %r15 /* restore R15 */ - movq 0x28(%rsp), %rbx /* restore RBX */ - movq 0x30(%rsp), %rbp /* restore RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq 0x8(%rsp), %rdx /* load stack guard */ + movq %rdx, %fs:0x28 /* restore stack guard to TLS record */ +#endif + + movq 0x10(%rsp), %r12 /* restore R12 */ + movq 0x18(%rsp), %r13 /* restore R13 */ + movq 0x20(%rsp), %r14 /* restore R14 */ + movq 0x28(%rsp), %r15 /* restore R15 */ + movq 0x30(%rsp), %rbx /* restore RBX */ + movq 0x38(%rsp), %rbp /* restore RBP */ - leaq 0x40(%rsp), %rsp /* prepare stack */ + leaq 0x48(%rsp), %rsp /* prepare stack */ /* return transfer_t from jump */ #if !defined(_ILP32) diff --git a/Zend/asm/make_i386_sysv_elf_gas.S b/Zend/asm/make_i386_sysv_elf_gas.S index b76de260d211f..9261e566c0d45 100644 --- a/Zend/asm/make_i386_sysv_elf_gas.S +++ b/Zend/asm/make_i386_sysv_elf_gas.S @@ -12,14 +12,14 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | * + * | fc_mxcsr|fc_x87_cw| guard | EDI | ESI | EBX | EBP | EIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * - * | 0x20 | 0x24 | | * + * | 0x20 | 0x24 | 0x28 | | * * ---------------------------------------------------------------------------------- * - * | to | data | | * + * | hidden | to | data | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ @@ -40,23 +40,29 @@ make_fcontext: /* shift address in EAX to lower 16 byte boundary */ andl $-16, %eax - /* reserve space for context-data on context-stack */ - leal -0x28(%eax), %eax + /* reserve space for context-data on context-stack, and align the stack */ + leal -0x34(%eax), %eax /* third arg of make_fcontext() == address of context-function */ /* stored in EBX */ movl 0xc(%esp), %ecx - movl %ecx, 0x10(%eax) + movl %ecx, 0x14(%eax) /* save MMX control- and status-word */ stmxcsr (%eax) /* save x87 control-word */ fnstcw 0x4(%eax) +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + /* save stack guard */ + movl %gs:0x14, %ecx /* read stack guard from TLS record */ + movl %ecx, 0x8(%eax) /* save stack guard */ +#endif + /* return transport_t */ /* FCTX == EDI, DATA == ESI */ - leal 0x8(%eax), %ecx - movl %ecx, 0x1c(%eax) + leal 0xc(%eax), %ecx + movl %ecx, 0x20(%eax) /* compute abs address of label trampoline */ call 1f @@ -66,7 +72,7 @@ make_fcontext: addl $trampoline-1b, %ecx /* save address of trampoline as return address */ /* will be entered after calling jump_fcontext() first time */ - movl %ecx, 0x18(%eax) + movl %ecx, 0x1c(%eax) /* compute abs address of label finish */ call 2f @@ -76,7 +82,7 @@ make_fcontext: addl $finish-2b, %ecx /* save address of finish as return-address for context-function */ /* will be entered after context-function returns */ - movl %ecx, 0x14(%eax) + movl %ecx, 0x18(%eax) ret /* return pointer to context-data */ diff --git a/Zend/asm/make_i386_sysv_macho_gas.S b/Zend/asm/make_i386_sysv_macho_gas.S index fdcdb7c80fbff..519e406248bb2 100644 --- a/Zend/asm/make_i386_sysv_macho_gas.S +++ b/Zend/asm/make_i386_sysv_macho_gas.S @@ -38,8 +38,8 @@ _make_fcontext: /* shift address in EAX to lower 16 byte boundary */ andl $-16, %eax - /* reserve space for context-data on context-stack */ - leal -0x2c(%eax), %eax + /* reserve space for context-data on context-stack, and align the stack */ + leal -0x34(%eax), %eax /* third arg of make_fcontext() == address of context-function */ /* stored in EBX */ diff --git a/Zend/asm/make_ppc32_sysv_macho_gas.S b/Zend/asm/make_ppc32_sysv_macho_gas.S index 8f35eff9abbff..1102ee90ef076 100644 --- a/Zend/asm/make_ppc32_sysv_macho_gas.S +++ b/Zend/asm/make_ppc32_sysv_macho_gas.S @@ -77,61 +77,78 @@ .globl _make_fcontext .align 2 _make_fcontext: - # save return address into R6 + ; save return address into R6 mflr r6 - # first arg of make_fcontext() == top address of context-function - # shift address in R3 to lower 16 byte boundary + ; first arg of make_fcontext() == top address of context-function + ; shift address in R3 to lower 16 byte boundary clrrwi r3, r3, 4 - # reserve space for context-data on context-stack - # including 64 byte of linkage + parameter area (R1 16 == 0) + ; reserve space for context-data on context-stack + ; including 64 byte of linkage + parameter area (R1 % 16 == 0) subi r3, r3, 336 - # third arg of make_fcontext() == address of context-function - stw r5, 240(r3) + ; third arg of make_fcontext() == address of context-function + ; store as trampoline's R31 + stw r5, 224(r3) - # set back-chain to zero + ; set back-chain to zero li r0, 0 stw r0, 244(r3) - mffs f0 # load FPSCR - stfd f0, 144(r3) # save FPSCR + mffs f0 ; load FPSCR + stfd f0, 144(r3) ; save FPSCR - # compute address of returned transfer_t + ; compute address of returned transfer_t addi r0, r3, 252 mr r4, r0 stw r4, 228(r3) - # load LR + ; load LR mflr r0 - # jump to label 1 - bl 1f -1: - # load LR into R4 + ; jump to label 1 + bcl 20, 31, L1 +L1: + ; load LR into R4 mflr r4 - # compute abs address of label finish - addi r4, r4, finish - 1b - # restore LR + ; compute abs address of trampoline, use as PC + addi r5, r4, lo16(Ltrampoline - L1) + stw r5, 240(r3) + ; compute abs address of label finish + addi r4, r4, lo16(Lfinish - L1) + ; restore LR mtlr r0 - # save address of finish as return-address for context-function - # will be entered after context-function returns + ; save address of finish as return-address for context-function + ; will be entered after context-function returns stw r4, 236(r3) - # restore return address from R6 + ; restore return address from R6 mtlr r6 - blr # return pointer to context-data + blr ; return pointer to context-data -finish: - # save return address into R0 - mflr r0 - # save return address on stack, set up stack frame - stw r0, 4(r1) - # allocate stack space, R1 16 == 0 - stwu r1, -16(r1) +Ltrampoline: + ; We get R31 = context-function, R3 = address of transfer_t, + ; but we need to pass R3:R4 = transfer_t. + mtctr r31 + lwz r4, 4(r3) + lwz r3, 0(r3) + bctr - # exit code is zero +Lfinish: + ; load address of _exit into CTR + bcl 20, 31, L2 +L2: + mflr r4 + addis r4, r4, ha16(Lexitp - L2) + lwz r4, lo16(Lexitp - L2)(r4) + mtctr r4 + ; exit code is zero li r3, 0 - # exit application - bl _exit@plt + ; exit application + bctr + +.const_data +.align 2 +Lexitp: + .long __exit diff --git a/Zend/asm/make_ppc64_sysv_macho_gas.S b/Zend/asm/make_ppc64_sysv_macho_gas.S index 7b947bb6b030b..fb5cada265a64 100644 --- a/Zend/asm/make_ppc64_sysv_macho_gas.S +++ b/Zend/asm/make_ppc64_sysv_macho_gas.S @@ -12,7 +12,7 @@ * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * - * | TOC | R14 | R15 | R16 | * + * | R13 | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * @@ -61,7 +61,7 @@ * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * - * | TOC saved | FCTX | DATA | | * + * | FCTX | DATA | | | * * ------------------------------------------------- * * * @@ -77,19 +77,19 @@ _make_fcontext: ; reserve space for context-data on context-stack ; including 64 byte of linkage + parameter area (R1 16 == 0) - subi r3, r3, 248 + subi r3, r3, 240 ; third arg of make_fcontext() == address of context-function stw r5, 176(r3) ; set back-chain to zero - li %r0, 0 - std %r0, 184(%r3) + li r0, 0 + std r0, 184(r3) ; compute address of returned transfer_t - addi %r0, %r3, 232 - mr %r4, %r0 - std %r4, 152(%r3) + addi r0, r3, 224 + mr r4, r0 + std r4, 152(r3) ; load LR mflr r0 diff --git a/Zend/asm/make_x86_64_sysv_elf_gas.S b/Zend/asm/make_x86_64_sysv_elf_gas.S index d422c6972df9c..4294398a2edc2 100644 --- a/Zend/asm/make_x86_64_sysv_elf_gas.S +++ b/Zend/asm/make_x86_64_sysv_elf_gas.S @@ -12,20 +12,29 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * + * | fc_mxcsr|fc_x87_cw| guard | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * - * | R15 | RBX | RBP | RIP | * + * | R14 | R15 | RBX | RBP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | | * + * ---------------------------------------------------------------------------------- * + * | RIP | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ # if defined __CET__ # include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) # else # define _CET_ENDBR # endif @@ -36,6 +45,11 @@ .align 16 make_fcontext: _CET_ENDBR +#if BOOST_CONTEXT_SHADOW_STACK + /* the new shadow stack pointer (SSP) */ + movq -0x8(%rdi), %r9 +#endif + /* first arg of make_fcontext() == top of context-stack */ movq %rdi, %rax @@ -44,36 +58,79 @@ make_fcontext: /* reserve space for context-data on context-stack */ /* on context-function entry: (RSP -0x8) % 16 == 0 */ - leaq -0x40(%rax), %rax + leaq -0x48(%rax), %rax /* third arg of make_fcontext() == address of context-function */ /* stored in RBX */ - movq %rdx, 0x28(%rax) + movq %rdx, 0x30(%rax) /* save MMX control- and status-word */ stmxcsr (%rax) /* save x87 control-word */ fnstcw 0x4(%rax) +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + /* save stack guard */ + movq %fs:0x28, %rcx /* read stack guard from TLS record */ + movq %rcx, 0x8(%rsp) /* save stack guard */ +#endif + /* compute abs address of label trampoline */ leaq trampoline(%rip), %rcx /* save address of trampoline as return-address for context-function */ /* will be entered after calling jump_fcontext() first time */ - movq %rcx, 0x38(%rax) + movq %rcx, 0x40(%rax) /* compute abs address of label finish */ leaq finish(%rip), %rcx /* save address of finish as return-address for context-function */ /* will be entered after context-function returns */ - movq %rcx, 0x30(%rax) + movq %rcx, 0x38(%rax) + +#if BOOST_CONTEXT_SHADOW_STACK + /* Populate the shadow stack and normal stack */ + /* get original SSP */ + rdsspq %r8 + /* restore new shadow stack */ + rstorssp -0x8(%r9) + /* save the restore token on the original shadow stack */ + saveprevssp + /* push the address of "jmp trampoline" to the new shadow stack */ + /* as well as the stack */ + call 1f + jmp trampoline +1: + /* save address of "jmp trampoline" as return-address */ + /* for context-function */ + pop 0x38(%rax) + /* Get the new SSP. */ + rdsspq %r9 + /* restore original shadow stack */ + rstorssp -0x8(%r8) + /* save the restore token on the new shadow stack. */ + saveprevssp + + /* reserve space for the new SSP */ + leaq -0x8(%rax), %rax + /* save the new SSP to this fcontext */ + movq %r9, (%rax) +#endif ret /* return pointer to context-data */ trampoline: + _CET_ENDBR /* store return address on stack */ /* fix stack alignment */ - _CET_ENDBR +#if BOOST_CONTEXT_SHADOW_STACK + /* save address of "jmp *%rbp" as return-address */ + /* on stack and shadow stack */ + call 2f + jmp *%rbp +2: +#else push %rbp +#endif /* jump to context-function */ jmp *%rbx From c9cbe525e1a5ad4224e2a915601d2d9c986b45cc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 5 Feb 2023 18:02:24 +0100 Subject: [PATCH 359/895] Metaphone performance improvement (#10501) * Don't do toupper() redundantly in encoding the data for metaphone All inputs for ENCODE() are already uppercase, so there's no need to spend time uppercasing them again. * Don't compute uppercase letter redundantly in checks If it's a zero-terminator check, or an isalpha() check, there's no need to convert it to uppercase first. * Clean-up LookAhead helper * Add some letter caching to metaphone to increase performance We don't have to re-read letters, and re-uppercase them if we already did it once. By caching these results, we gain performance. Furthermore, we can avoid fetching and uppercasing in some conditions by first checking what we already had: e.g. if a condition depends on both Prev_Letter and After_Next_Letter, but we already have Prev_Letter cached, we can place that first to avoid a fetch+toupper of the "after next letter". --- ext/standard/metaphone.c | 144 ++++++++++++++++++++++----------------- 1 file changed, 83 insertions(+), 61 deletions(-) diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 2ba7a839c88e9..7726bba2f17e7 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -78,7 +78,8 @@ static const char _codes[26] = }; -#define ENCODE(c) (isalpha(c) ? _codes[((toupper(c)) - 'A')] : 0) +/* Note: these macros require an uppercase letter input! */ +#define ENCODE(c) (isalpha(c) ? _codes[((c) - 'A')] : 0) #define isvowel(c) (ENCODE(c) & 1) /* AEIOU */ @@ -101,16 +102,19 @@ static const char _codes[26] = /* I suppose I could have been using a character pointer instead of * accesssing the array directly... */ +#define Convert_Raw(c) toupper(c) /* Look at the next letter in the word */ -#define Next_Letter (toupper(word[w_idx+1])) +#define Read_Raw_Next_Letter (word[w_idx+1]) +#define Read_Next_Letter (Convert_Raw(Read_Raw_Next_Letter)) /* Look at the current letter in the word */ -#define Curr_Letter (toupper(word[w_idx])) +#define Read_Raw_Curr_Letter (word[w_idx]) +#define Read_Curr_Letter (Convert_Raw(Read_Raw_Curr_Letter)) /* Go N letters back. */ -#define Look_Back_Letter(n) (w_idx >= n ? toupper(word[w_idx-n]) : '\0') +#define Look_Back_Letter(n) (w_idx >= n ? Convert_Raw(word[w_idx-n]) : '\0') /* Previous letter. I dunno, should this return null on failure? */ -#define Prev_Letter (Look_Back_Letter(1)) +#define Read_Prev_Letter (Look_Back_Letter(1)) /* Look two letters down. It makes sure you don't walk off the string. */ -#define After_Next_Letter (Next_Letter != '\0' ? toupper(word[w_idx+2]) \ +#define Read_After_Next_Letter (Read_Raw_Next_Letter != '\0' ? Convert_Raw(word[w_idx+2]) \ : '\0') #define Look_Ahead_Letter(n) (toupper(Lookahead((char *) word+w_idx, n))) @@ -119,15 +123,13 @@ static const char _codes[26] = /* I probably could have just used strlen... */ static char Lookahead(char *word, int how_far) { - char letter_ahead = '\0'; /* null by default */ int idx; for (idx = 0; word[idx] != '\0' && idx < how_far; idx++); /* Edge forward in the string... */ - letter_ahead = word[idx]; /* idx will be either == to how_far or - * at the end of the string + return word[idx]; /* idx will be either == to how_far or + * at the end of the string where it will be null */ - return letter_ahead; } @@ -164,6 +166,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem int w_idx = 0; /* point in the phonization we're at. */ size_t p_idx = 0; /* end of the phoned phrase */ size_t max_buffer_len = 0; /* maximum length of the destination buffer */ + char curr_letter; ZEND_ASSERT(word != NULL); ZEND_ASSERT(max_phonemes >= 0); @@ -179,18 +182,20 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem /*-- The first phoneme has to be processed specially. --*/ /* Find our first letter */ - for (; !isalpha(Curr_Letter); w_idx++) { + for (; !isalpha(curr_letter = Read_Raw_Curr_Letter); w_idx++) { /* On the off chance we were given nothing but crap... */ - if (Curr_Letter == '\0') { + if (curr_letter == '\0') { End_Phoned_Word(); return; } } - switch (Curr_Letter) { + curr_letter = Convert_Raw(curr_letter); + + switch (curr_letter) { /* AE becomes E */ case 'A': - if (Next_Letter == 'E') { + if (Read_Next_Letter == 'E') { Phonize('E'); w_idx += 2; } @@ -204,7 +209,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem case 'G': case 'K': case 'P': - if (Next_Letter == 'N') { + if (Read_Next_Letter == 'N') { Phonize('N'); w_idx += 2; } @@ -212,16 +217,18 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem /* WH becomes W, WR becomes R W if followed by a vowel */ - case 'W': - if (Next_Letter == 'R') { - Phonize(Next_Letter); + case 'W': { + char next_letter = Read_Next_Letter; + if (next_letter == 'R') { + Phonize('R'); w_idx += 2; - } else if (Next_Letter == 'H' || isvowel(Next_Letter)) { + } else if (next_letter == 'H' || isvowel(next_letter)) { Phonize('W'); w_idx += 2; } /* else ignore */ break; + } /* X becomes S */ case 'X': Phonize('S'); @@ -236,7 +243,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem case 'I': case 'O': case 'U': - Phonize(Curr_Letter); + Phonize(curr_letter); w_idx++; break; default: @@ -247,7 +254,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem /* On to the metaphoning */ - for (; Curr_Letter != '\0' && + for (; (curr_letter = Read_Raw_Curr_Letter) != '\0' && (max_phonemes == 0 || Phone_Len < (size_t)max_phonemes); w_idx++) { /* How many letters to skip because an eariler encoding handled @@ -263,18 +270,23 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem */ /* Ignore non-alphas */ - if (!isalpha(Curr_Letter)) + if (!isalpha(curr_letter)) continue; + curr_letter = Convert_Raw(curr_letter); + /* Note: we can't cache curr_letter from the previous loop + * because of the skip_letter variable. */ + char prev_letter = Read_Prev_Letter; + /* Drop duplicates, except CC */ - if (Curr_Letter == Prev_Letter && - Curr_Letter != 'C') + if (curr_letter == prev_letter && + curr_letter != 'C') continue; - switch (Curr_Letter) { + switch (curr_letter) { /* B -> B unless in MB */ case 'B': - if (Prev_Letter != 'M') + if (prev_letter != 'M') Phonize('B'); break; /* 'sh' if -CIA- or -CH, but not SCH, except SCHW. @@ -283,20 +295,20 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem * dropped if -SCI-, SCE-, -SCY- (handed in S) * else K */ - case 'C': - if (MAKESOFT(Next_Letter)) { /* C[IEY] */ - if (After_Next_Letter == 'A' && - Next_Letter == 'I') { /* CIA */ + case 'C': { + char next_letter = Read_Next_Letter; + if (MAKESOFT(next_letter)) { /* C[IEY] */ + if (next_letter == 'I' && Read_After_Next_Letter == 'A') { /* CIA */ Phonize(SH); } /* SC[IEY] */ - else if (Prev_Letter == 'S') { + else if (prev_letter == 'S') { /* Dropped */ } else { Phonize('S'); } - } else if (Next_Letter == 'H') { - if ((!traditional) && (After_Next_Letter == 'R' || Prev_Letter == 'S')) { /* Christ, School */ + } else if (next_letter == 'H') { + if ((!traditional) && (prev_letter == 'S' || Read_After_Next_Letter == 'R')) { /* Christ, School */ Phonize('K'); } else { Phonize(SH); @@ -306,12 +318,13 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem Phonize('K'); } break; + } /* J if in -DGE-, -DGI- or -DGY- * else T */ case 'D': - if (Next_Letter == 'G' && - MAKESOFT(After_Next_Letter)) { + if (Read_Next_Letter == 'G' && + MAKESOFT(Read_After_Next_Letter)) { Phonize('J'); skip_letter++; } else @@ -323,8 +336,9 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem * else J if in -GE-, -GI, -GY and not GG * else K */ - case 'G': - if (Next_Letter == 'H') { + case 'G': { + char next_letter = Read_Next_Letter; + if (next_letter == 'H') { if (!(NOGHTOF(Look_Back_Letter(3)) || Look_Back_Letter(4) == 'H')) { Phonize('F'); @@ -332,38 +346,40 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem } else { /* silent */ } - } else if (Next_Letter == 'N') { - if (Isbreak(After_Next_Letter) || - (After_Next_Letter == 'E' && + } else if (next_letter == 'N') { + char after_next_letter = Read_After_Next_Letter; + if (Isbreak(after_next_letter) || + (after_next_letter == 'E' && Look_Ahead_Letter(3) == 'D')) { /* dropped */ } else Phonize('K'); - } else if (MAKESOFT(Next_Letter) && - Prev_Letter != 'G') { + } else if (MAKESOFT(next_letter) && + prev_letter != 'G') { Phonize('J'); } else { Phonize('K'); } break; + } /* H if before a vowel and not after C,G,P,S,T */ case 'H': - if (isvowel(Next_Letter) && - !AFFECTH(Prev_Letter)) + if (isvowel(Read_Next_Letter) && + !AFFECTH(prev_letter)) Phonize('H'); break; /* dropped if after C * else K */ case 'K': - if (Prev_Letter != 'C') + if (prev_letter != 'C') Phonize('K'); break; /* F if before H * else P */ case 'P': - if (Next_Letter == 'H') { + if (Read_Next_Letter == 'H') { Phonize('F'); } else { Phonize('P'); @@ -377,44 +393,50 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem /* 'sh' in -SH-, -SIO- or -SIA- or -SCHW- * else S */ - case 'S': - if (Next_Letter == 'I' && - (After_Next_Letter == 'O' || - After_Next_Letter == 'A')) { + case 'S': { + char next_letter = Read_Next_Letter; + char after_next_letter; + if (next_letter == 'I' && + ((after_next_letter = Read_After_Next_Letter) == 'O' || + after_next_letter == 'A')) { Phonize(SH); - } else if (Next_Letter == 'H') { + } else if (next_letter == 'H') { Phonize(SH); skip_letter++; - } else if ((!traditional) && (Next_Letter == 'C' && Look_Ahead_Letter(2) == 'H' && Look_Ahead_Letter(3) == 'W')) { + } else if ((!traditional) && (next_letter == 'C' && Look_Ahead_Letter(2) == 'H' && Look_Ahead_Letter(3) == 'W')) { Phonize(SH); skip_letter += 2; } else { Phonize('S'); } break; + } /* 'sh' in -TIA- or -TIO- * else 'th' before H * else T */ - case 'T': - if (Next_Letter == 'I' && - (After_Next_Letter == 'O' || - After_Next_Letter == 'A')) { + case 'T': { + char next_letter = Read_Next_Letter; + char after_next_letter; + if (next_letter == 'I' && + ((after_next_letter = Read_After_Next_Letter) == 'O' || + after_next_letter == 'A')) { Phonize(SH); - } else if (Next_Letter == 'H') { + } else if (next_letter == 'H') { Phonize(TH); skip_letter++; - } else if (!(Next_Letter == 'C' && After_Next_Letter == 'H')) { + } else if (!(next_letter == 'C' && Read_After_Next_Letter == 'H')) { Phonize('T'); } break; + } /* F */ case 'V': Phonize('F'); break; /* W before a vowel, else dropped */ case 'W': - if (isvowel(Next_Letter)) + if (isvowel(Read_Next_Letter)) Phonize('W'); break; /* KS */ @@ -424,7 +446,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem break; /* Y if followed by a vowel */ case 'Y': - if (isvowel(Next_Letter)) + if (isvowel(Read_Next_Letter)) Phonize('Y'); break; /* S */ @@ -438,7 +460,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem case 'M': case 'N': case 'R': - Phonize(Curr_Letter); + Phonize(curr_letter); break; default: /* nothing */ From 50a2de78a8ef5c14c5f6b5167316bd04c1bb5aba Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 2 Nov 2022 15:12:28 +0000 Subject: [PATCH 360/895] Do not build unnecessary FCI in Reflection --- ext/reflection/php_reflection.c | 85 ++++++++------------------------- 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 85c2aa7e07cad..dcc135e895987 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1973,9 +1973,8 @@ ZEND_METHOD(ReflectionFunction, invoke) { zval retval; zval *params; - int result, num_args; + uint32_t num_args; HashTable *named_params; - zend_fcall_info fci; zend_fcall_info_cache fcc; reflection_object *intern; zend_function *fptr; @@ -1986,14 +1985,6 @@ ZEND_METHOD(ReflectionFunction, invoke) GET_REFLECTION_OBJECT_PTR(fptr); - fci.size = sizeof(fci); - ZVAL_UNDEF(&fci.function_name); - fci.object = NULL; - fci.retval = &retval; - fci.param_count = num_args; - fci.params = params; - fci.named_params = named_params; - fcc.function_handler = fptr; fcc.called_scope = NULL; fcc.object = NULL; @@ -2003,20 +1994,18 @@ ZEND_METHOD(ReflectionFunction, invoke) Z_OBJ(intern->obj), &fcc.called_scope, &fcc.function_handler, &fcc.object, 0); } - result = zend_call_function(&fci, &fcc); + zend_call_known_fcc(&fcc, &retval, num_args, params, named_params); - if (result == FAILURE) { + if (Z_TYPE(retval) == IS_UNDEF && !EG(exception)) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); RETURN_THROWS(); } - if (Z_TYPE(retval) != IS_UNDEF) { - if (Z_ISREF(retval)) { - zend_unwrap_reference(&retval); - } - ZVAL_COPY_VALUE(return_value, &retval); + if (Z_ISREF(retval)) { + zend_unwrap_reference(&retval); } + ZVAL_COPY_VALUE(return_value, &retval); } /* }}} */ @@ -2024,8 +2013,6 @@ ZEND_METHOD(ReflectionFunction, invoke) ZEND_METHOD(ReflectionFunction, invokeArgs) { zval retval; - int result; - zend_fcall_info fci; zend_fcall_info_cache fcc; reflection_object *intern; zend_function *fptr; @@ -2037,14 +2024,6 @@ ZEND_METHOD(ReflectionFunction, invokeArgs) GET_REFLECTION_OBJECT_PTR(fptr); - fci.size = sizeof(fci); - ZVAL_UNDEF(&fci.function_name); - fci.object = NULL; - fci.retval = &retval; - fci.param_count = 0; - fci.params = NULL; - fci.named_params = params; - fcc.function_handler = fptr; fcc.called_scope = NULL; fcc.object = NULL; @@ -2054,20 +2033,18 @@ ZEND_METHOD(ReflectionFunction, invokeArgs) Z_OBJ(intern->obj), &fcc.called_scope, &fcc.function_handler, &fcc.object, 0); } - result = zend_call_function(&fci, &fcc); + zend_call_known_fcc(&fcc, &retval, /* num_params */ 0, /* params */ NULL, params); - if (result == FAILURE) { + if (Z_TYPE(retval) == IS_UNDEF && !EG(exception)) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); RETURN_THROWS(); } - if (Z_TYPE(retval) != IS_UNDEF) { - if (Z_ISREF(retval)) { - zend_unwrap_reference(&retval); - } - ZVAL_COPY_VALUE(return_value, &retval); + if (Z_ISREF(retval)) { + zend_unwrap_reference(&retval); } + ZVAL_COPY_VALUE(return_value, &retval); } /* }}} */ @@ -3360,10 +3337,8 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) zval *params = NULL, *object; HashTable *named_params = NULL; reflection_object *intern; - zend_function *mptr; - int argc = 0, result; - zend_fcall_info fci; - zend_fcall_info_cache fcc; + zend_function *mptr, *callback; + uint32_t argc = 0; zend_class_entry *obj_ce; GET_REFLECTION_OBJECT_PTR(mptr); @@ -3413,40 +3388,20 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) RETURN_THROWS(); } } + /* Copy the zend_function when calling via handler (e.g. Closure::__invoke()) */ + callback = _copy_function(mptr); + zend_call_known_function(callback, (object ? Z_OBJ_P(object) : NULL), intern->ce, &retval, argc, params, named_params); - fci.size = sizeof(fci); - ZVAL_UNDEF(&fci.function_name); - fci.object = object ? Z_OBJ_P(object) : NULL; - fci.retval = &retval; - fci.param_count = argc; - fci.params = params; - fci.named_params = named_params; - - fcc.function_handler = mptr; - fcc.called_scope = intern->ce; - fcc.object = object ? Z_OBJ_P(object) : NULL; - - /* - * Copy the zend_function when calling via handler (e.g. Closure::__invoke()) - */ - if ((mptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { - fcc.function_handler = _copy_function(mptr); - } - - result = zend_call_function(&fci, &fcc); - - if (result == FAILURE) { + if (Z_TYPE(retval) == IS_UNDEF && !EG(exception)) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Invocation of method %s::%s() failed", ZSTR_VAL(mptr->common.scope->name), ZSTR_VAL(mptr->common.function_name)); RETURN_THROWS(); } - if (Z_TYPE(retval) != IS_UNDEF) { - if (Z_ISREF(retval)) { - zend_unwrap_reference(&retval); - } - ZVAL_COPY_VALUE(return_value, &retval); + if (Z_ISREF(retval)) { + zend_unwrap_reference(&retval); } + ZVAL_COPY_VALUE(return_value, &retval); } /* }}} */ From d5d9900661acb1bab36f89c5b68759e6c3864308 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 5 Feb 2023 17:23:35 +0200 Subject: [PATCH 361/895] When fuzzing mbstring encoding conversion code, compare output with different intermediate buffer sizes Currently, php-fuzz-mbstring only confirms that no crashes (including ASAN violations) occur when converting text from one encoding to another. Try performing each conversion operation with two different sizes for the intermediate buffer which is used to pass data from the decoder to the encoder. If the encoding conversion code is correct, the size of that intermediate buffer shouldn't matter; we should always get exactly the same results. This is a much stricter test, which is more likely to catch bugs. --- sapi/fuzzer/fuzzer-mbstring.c | 58 +++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/sapi/fuzzer/fuzzer-mbstring.c b/sapi/fuzzer/fuzzer-mbstring.c index 61014b2399361..9b134c5f8c417 100644 --- a/sapi/fuzzer/fuzzer-mbstring.c +++ b/sapi/fuzzer/fuzzer-mbstring.c @@ -20,6 +20,34 @@ #include "fuzzer-sapi.h" #include "ext/mbstring/mbstring.h" +zend_string* convert_encoding(const uint8_t *Data, size_t Size, const mbfl_encoding *FromEncoding, const mbfl_encoding *ToEncoding, size_t BufSize, unsigned int *NumErrors) +{ + uint32_t *wchar_buf = ecalloc(BufSize, sizeof(uint32_t)); + unsigned int state = 0; + + mb_convert_buf buf; + mb_convert_buf_init(&buf, Size, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); + + while (Size) { + size_t out_len = FromEncoding->to_wchar((unsigned char**)&Data, &Size, wchar_buf, BufSize, &state); + ZEND_ASSERT(out_len <= BufSize); + ToEncoding->from_wchar(wchar_buf, out_len, &buf, !Size); + } + + *NumErrors = buf.errors; + zend_string *result = mb_convert_buf_result(&buf, ToEncoding); + efree(wchar_buf); + return result; +} + +void assert_zend_string_eql(zend_string *str1, zend_string *str2) +{ + ZEND_ASSERT(ZSTR_LEN(str1) == ZSTR_LEN(str2)); + for (int i = 0; i < ZSTR_LEN(str1); i++) { + ZEND_ASSERT(ZSTR_VAL(str1)[i] == ZSTR_VAL(str2)[i]); + } +} + int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { const uint8_t *Comma1 = memchr(Data, ',', Size); if (!Comma1) { @@ -45,14 +73,38 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { const mbfl_encoding *ToEncoding = mbfl_name2encoding(ToEncodingName); const mbfl_encoding *FromEncoding = mbfl_name2encoding(FromEncodingName); - if (!ToEncoding || !FromEncoding || fuzzer_request_startup() == FAILURE) { + if (!ToEncoding || !FromEncoding || Size < 2 || fuzzer_request_startup() == FAILURE) { efree(ToEncodingName); efree(FromEncodingName); return 0; } - zend_string *Result = php_mb_convert_encoding_ex((char *) Data, Size, ToEncoding, FromEncoding); - zend_string_release(Result); + /* Rather than converting an entire (possibly very long) string at once, mbstring converts + * strings 'chunk by chunk'; the decoder will run until it fills up its output buffer with + * wchars, then the encoder will process those wchars, then the decoder runs again until it + * again fills up its output buffer, and so on + * + * The most error-prone part of the decoder/encoder code is where we exit a decoder/encoder + * function and save its state to allow later resumption + * To stress-test that aspect of the decoders/encoders, try performing an encoding conversion + * operation with different, random buffer sizes + * If the code is correct, the result should always be the same either way */ + size_t bufsize1 = *Data++; + size_t bufsize2 = *Data++; + bufsize1 = MAX(bufsize1, MBSTRING_MIN_WCHAR_BUFSIZE); + bufsize2 = MAX(bufsize2, MBSTRING_MIN_WCHAR_BUFSIZE); + Size -= 2; + + unsigned int errors1 = 0, errors2 = 0; + + zend_string *Result1 = convert_encoding(Data, Size, FromEncoding, ToEncoding, bufsize1, &errors1); + zend_string *Result2 = convert_encoding(Data, Size, FromEncoding, ToEncoding, bufsize2, &errors2); + + assert_zend_string_eql(Result1, Result2); + ZEND_ASSERT(errors1 == errors2); + + zend_string_release(Result1); + zend_string_release(Result2); efree(ToEncodingName); efree(FromEncodingName); From c8ec2ed730334c266ddf01a54d501f3777704219 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 25 Jan 2023 22:28:10 +0200 Subject: [PATCH 362/895] Add AVX2-accelerated UTF-16 decoding/encoding routines As with other SIMD-accelerated functions in php-src, the new UTF-16 encoding and decoding routines can be compiled either with AVX2 acceleration "always on", "always off", or else with runtime detection of AVX2 support. With the new UTF-16 decoder/encoder, conversion of extremely short strings (as in several bytes) has the same performance as before, and conversion of medium-length (~100 character) strings is about 65% faster, but conversion of long (~10,000 character) strings is around 6 times faster. Many other mbstring functions will also be faster now when handling UTF-16; for example, mb_strlen is almost 3 times faster on medium strings, and almost 9 times faster on long strings. (Why does mb_strlen benefit more from AVX2 acceleration than mb_convert_encoding? It's because mb_strlen only needs to decode, but not re-encode, the input string, and the UTF-16 decoder benefits much more from SIMD acceleration than the UTF-16 encoder.) --- Zend/zend_bitset.h | 7 + build/php.m4 | 21 + configure.ac | 2 + ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 536 +++++++++++++++++- ext/mbstring/libmbfl/filters/mbfilter_utf16.h | 4 + ext/mbstring/mbstring.c | 1 + ext/mbstring/tests/utf_encodings.phpt | 11 + 7 files changed, 572 insertions(+), 10 deletions(-) diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index fdb6ab79a1e86..262fab24a5ebe 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -19,6 +19,13 @@ #ifndef _ZEND_BITSET_H_ #define _ZEND_BITSET_H_ +#include +#include +#include + +#include "zend_portability.h" +#include "zend_long.h" + typedef zend_ulong *zend_bitset; #define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong) diff --git a/build/php.m4 b/build/php.m4 index 698a9195e5760..9287d2fc60c76 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2643,6 +2643,27 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SADDLL_OVERFLOW], [ [$have_builtin_saddll_overflow], [Whether the compiler supports __builtin_saddll_overflow]) ]) +dnl +dnl PHP_CHECK_BUILTIN_USUB_OVERFLOW +dnl +AC_DEFUN([PHP_CHECK_BUILTIN_USUB_OVERFLOW], [ + AC_MSG_CHECKING([for __builtin_usub_overflow]) + + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ + unsigned int tmpvar; + return __builtin_usub_overflow(3, 7, &tmpvar); + ]])], [ + have_builtin_usub_overflow=1 + AC_MSG_RESULT([yes]) + ], [ + have_builtin_usub_overflow=0 + AC_MSG_RESULT([no]) + ]) + + AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_USUB_OVERFLOW], + [$have_builtin_usub_overflow], [Whether the compiler supports __builtin_usub_overflow]) +]) + dnl dnl PHP_CHECK_BUILTIN_SSUBL_OVERFLOW dnl diff --git a/configure.ac b/configure.ac index b0697e3208db0..cd77a89ff204d 100644 --- a/configure.ac +++ b/configure.ac @@ -504,6 +504,8 @@ dnl Check __builtin_saddl_overflow PHP_CHECK_BUILTIN_SADDL_OVERFLOW dnl Check __builtin_saddll_overflow PHP_CHECK_BUILTIN_SADDLL_OVERFLOW +dnl Check __builtin_usub_overflow +PHP_CHECK_BUILTIN_USUB_OVERFLOW dnl Check __builtin_ssubl_overflow PHP_CHECK_BUILTIN_SSUBL_OVERFLOW dnl Check __builtin_ssubll_overflow diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index eddd56f362756..9e0c98370b968 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -27,15 +27,154 @@ * */ +#include "zend_bitset.h" #include "mbfilter.h" #include "mbfilter_utf16.h" +#ifdef ZEND_INTRIN_AVX2_NATIVE + +/* We are building AVX2-only binary */ +# include +# define mb_utf16be_to_wchar mb_utf16be_to_wchar_avx2 +# define mb_utf16le_to_wchar mb_utf16le_to_wchar_avx2 +# define mb_wchar_to_utf16be mb_wchar_to_utf16be_avx2 +# define mb_wchar_to_utf16le mb_wchar_to_utf16le_avx2 + +static size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); + +#elif defined(ZEND_INTRIN_AVX2_RESOLVER) + +/* We are building binary which works with or without AVX2; whether or not to use + * AVX2-accelerated functions will be determined at runtime */ +# include +# include "Zend/zend_cpuinfo.h" + +static size_t mb_utf16be_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16be_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static size_t mb_utf16le_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16le_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); + +# ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +/* Dynamic linker will decide whether or not to use AVX2-based functions and + * resolve symbols accordingly */ + +ZEND_INTRIN_AVX2_FUNC_DECL(size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state)); +ZEND_INTRIN_AVX2_FUNC_DECL(void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end)); +ZEND_INTRIN_AVX2_FUNC_DECL(size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state)); +ZEND_INTRIN_AVX2_FUNC_DECL(void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end)); + +size_t mb_utf16be_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) __attribute__((ifunc("resolve_utf16be_wchar"))); +void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) __attribute__((ifunc("resolve_wchar_utf16be"))); +size_t mb_utf16le_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) __attribute__((ifunc("resolve_utf16le_wchar"))); +void mb_wchar_to_utf16le(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) __attribute__((ifunc("resolve_wchar_utf16le"))); + +ZEND_NO_SANITIZE_ADDRESS +ZEND_ATTRIBUTE_UNUSED +static mb_to_wchar_fn resolve_utf16be_wchar(void) +{ + return zend_cpu_supports_avx2() ? mb_utf16be_to_wchar_avx2 : mb_utf16be_to_wchar_default; +} + +ZEND_NO_SANITIZE_ADDRESS +ZEND_ATTRIBUTE_UNUSED +static mb_from_wchar_fn resolve_wchar_utf16be(void) +{ + return zend_cpu_supports_avx2() ? mb_wchar_to_utf16be_avx2 : mb_wchar_to_utf16be_default; +} + +ZEND_NO_SANITIZE_ADDRESS +ZEND_ATTRIBUTE_UNUSED +static mb_to_wchar_fn resolve_utf16le_wchar(void) +{ + return zend_cpu_supports_avx2() ? mb_utf16le_to_wchar_avx2 : mb_utf16le_to_wchar_default; +} + +ZEND_NO_SANITIZE_ADDRESS +ZEND_ATTRIBUTE_UNUSED +static mb_from_wchar_fn resolve_wchar_utf16le(void) +{ + return zend_cpu_supports_avx2() ? mb_wchar_to_utf16le_avx2 : mb_wchar_to_utf16le_default; +} + +# else /* ZEND_INTRIN_AVX2_FUNC_PTR */ +/* We are compiling for a target where the dynamic linker will not be able to + * resolve symbols according to whether the host supports AVX2 or not; so instead, + * we can make calls go through a function pointer and set the function pointer + * on module load */ + +#ifdef HAVE_FUNC_ATTRIBUTE_TARGET +static size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) __attribute__((target("avx2"))); +static void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) __attribute__((target("avx2"))); +static size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) __attribute__((target("avx2"))); +static void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) __attribute__((target("avx2"))); +#else +static size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +#endif + +static mb_to_wchar_fn utf16be_to_wchar_ptr = NULL; +static mb_from_wchar_fn wchar_to_utf16be_ptr = NULL; +static mb_to_wchar_fn utf16le_to_wchar_ptr = NULL; +static mb_from_wchar_fn wchar_to_utf16le_ptr = NULL; + +static size_t mb_utf16be_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +{ + return utf16be_to_wchar_ptr(in, in_len, buf, bufsize, NULL); +} + +static void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +{ + wchar_to_utf16be_ptr(in, len, buf, end); +} + +static size_t mb_utf16le_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +{ + return utf16le_to_wchar_ptr(in, in_len, buf, bufsize, NULL); +} + +static void mb_wchar_to_utf16le(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +{ + wchar_to_utf16le_ptr(in, len, buf, end); +} + +void init_convert_utf16(void) +{ + if (zend_cpu_supports_avx2()) { + utf16be_to_wchar_ptr = mb_utf16be_to_wchar_avx2; + wchar_to_utf16be_ptr = mb_wchar_to_utf16be_avx2; + utf16le_to_wchar_ptr = mb_utf16le_to_wchar_avx2; + wchar_to_utf16le_ptr = mb_wchar_to_utf16le_avx2; + } else { + utf16be_to_wchar_ptr = mb_utf16be_to_wchar_default; + wchar_to_utf16be_ptr = mb_wchar_to_utf16be_default; + utf16le_to_wchar_ptr = mb_utf16le_to_wchar_default; + wchar_to_utf16le_ptr = mb_wchar_to_utf16le_default; + } +} +# endif + +#else + +/* No AVX2 support */ +# define mb_utf16be_to_wchar mb_utf16be_to_wchar_default +# define mb_utf16le_to_wchar mb_utf16le_to_wchar_default +# define mb_wchar_to_utf16be mb_wchar_to_utf16be_default +# define mb_wchar_to_utf16le mb_wchar_to_utf16le_default + +static size_t mb_utf16be_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16be_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static size_t mb_utf16le_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); +static void mb_wchar_to_utf16le_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); + +#endif + static int mbfl_filt_conv_utf16_wchar_flush(mbfl_convert_filter *filter); static size_t mb_utf16_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); -static size_t mb_utf16be_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); -static void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); -static size_t mb_utf16le_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); -static void mb_wchar_to_utf16le(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); static const char *mbfl_encoding_utf16_aliases[] = {"utf16", NULL}; @@ -366,7 +505,7 @@ static size_t mb_utf16_to_wchar(unsigned char **in, size_t *in_len, uint32_t *bu return mb_utf16be_to_wchar(in, in_len, buf, bufsize, NULL); } -static size_t mb_utf16be_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +static size_t mb_utf16be_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) { /* We only want to read 16-bit words out of `str`; any trailing byte will be handled at the end */ unsigned char *p = *in, *e = p + (*in_len & ~1); @@ -419,7 +558,7 @@ static size_t mb_utf16be_to_wchar(unsigned char **in, size_t *in_len, uint32_t * return out - buf; } -static void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +static void mb_wchar_to_utf16be_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) { unsigned char *out, *limit; MB_CONVERT_BUF_LOAD(buf, out, limit); @@ -436,7 +575,7 @@ static void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, b MB_CONVERT_BUF_ENSURE(buf, out, limit, (len * 2) + 4); out = mb_convert_buf_add4(out, (n1 >> 8) & 0xFF, n1 & 0xFF, (n2 >> 8) & 0xFF, n2 & 0xFF); } else { - MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16be); + MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16be_default); MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); } } @@ -444,7 +583,7 @@ static void mb_wchar_to_utf16be(uint32_t *in, size_t len, mb_convert_buf *buf, b MB_CONVERT_BUF_STORE(buf, out, limit); } -static size_t mb_utf16le_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +static size_t mb_utf16le_to_wchar_default(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) { /* We only want to read 16-bit words out of `str`; any trailing byte will be handled at the end */ unsigned char *p = *in, *e = p + (*in_len & ~1); @@ -497,7 +636,7 @@ static size_t mb_utf16le_to_wchar(unsigned char **in, size_t *in_len, uint32_t * return out - buf; } -static void mb_wchar_to_utf16le(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +static void mb_wchar_to_utf16le_default(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) { unsigned char *out, *limit; MB_CONVERT_BUF_LOAD(buf, out, limit); @@ -514,10 +653,387 @@ static void mb_wchar_to_utf16le(uint32_t *in, size_t len, mb_convert_buf *buf, b MB_CONVERT_BUF_ENSURE(buf, out, limit, (len * 2) + 4); out = mb_convert_buf_add4(out, n1 & 0xFF, (n1 >> 8) & 0xFF, n2 & 0xFF, (n2 >> 8) & 0xFF); } else { - MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16le); + MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16le_default); MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); } } MB_CONVERT_BUF_STORE(buf, out, limit); } + +#if defined(ZEND_INTRIN_AVX2_NATIVE) || defined(ZEND_INTRIN_AVX2_RESOLVER) + +#ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +#else +static size_t mb_utf16be_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +#endif +{ + size_t len = *in_len; + + if (len >= 32 && bufsize >= 16) { + unsigned char *p = *in; + uint32_t *out = buf; + + /* Used to determine if a block of input bytes contains any surrogates */ + const __m256i _f8 = _mm256_set1_epi16(0xF8); + const __m256i _d8 = _mm256_set1_epi16(0xD8); + /* wchars must be in host byte order, which is little-endian on x86; + * Since we are reading in (big-endian) UTF-16BE, use this vector to swap byte order for output */ + const __m256i swap_bytes = _mm256_set_epi8(14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1); + + do { + __m256i operand = _mm256_loadu_si256((__m256i*)p); /* Load 32 bytes */ + + uint32_t surrogate_bitvec = _mm256_movemask_epi8(_mm256_cmpeq_epi16(_mm256_and_si256(operand, _f8), _d8)); + if (surrogate_bitvec == 0) { + /* There are no surrogates among these 16 characters + * So converting the UTF-16 input to wchars is very simple; just extend each 16-bit value + * to a 32-bit value, filling in zero bits in the high end */ + operand = _mm256_shuffle_epi8(operand, swap_bytes); + _mm256_storeu_si256((__m256i*)out, _mm256_cvtepu16_epi32(_mm256_castsi256_si128(operand))); + _mm256_storeu_si256((__m256i*)(out + 8), _mm256_cvtepu16_epi32(_mm256_extracti128_si256(operand, 1))); + out += 16; + bufsize -= 16; + p += sizeof(__m256i); + len -= sizeof(__m256i); + } else if ((surrogate_bitvec & 1) == 0) { + /* Some prefix of the current block is non-surrogates; output those */ + uint8_t n_chars = zend_ulong_ntz(surrogate_bitvec) >> 1; + operand = _mm256_shuffle_epi8(operand, swap_bytes); + /* We know that the output buffer has at least 64 bytes of space available + * So don't bother trimming the output down to only include the non-surrogate prefix; + * rather, write out an entire block of 64 (or 32) bytes, then bump our output pointer + * forward just past the 'good part', so the 'bad part' will be overwritten on the next + * iteration of this loop */ + _mm256_storeu_si256((__m256i*)out, _mm256_cvtepu16_epi32(_mm256_castsi256_si128(operand))); + if (n_chars > 8) { + _mm256_storeu_si256((__m256i*)(out + 8), _mm256_cvtepu16_epi32(_mm256_extracti128_si256(operand, 1))); + } + out += n_chars; + bufsize -= n_chars; + p += n_chars * 2; + len -= n_chars * 2; + } else { + /* Some prefix of the current block is (valid or invalid) surrogates + * Handle those using non-vectorized code */ + surrogate_bitvec = ~surrogate_bitvec; + unsigned int n_chars = surrogate_bitvec ? zend_ulong_ntz(surrogate_bitvec) >> 1 : 16; + do { + unsigned char c1 = *p++; + unsigned char c2 = *p++; + + if (c1 & 0x4 || len < 4) { + /* 2nd part of surrogate pair has come first OR string ended abruptly + * after 1st part of surrogate pair */ + *out++ = MBFL_BAD_INPUT; + bufsize--; + n_chars--; + len -= 2; + continue; + } + + uint16_t n = (c1 << 8) | c2; + unsigned char c3 = *p++; + unsigned char c4 = *p++; + + if ((c3 & 0xFC) == 0xDC) { + /* Valid surrogate pair */ + uint16_t n2 = (c3 << 8) | c4; + *out++ = (((n & 0x3FF) << 10) | (n2 & 0x3FF)) + 0x10000; + bufsize--; + len -= 4; +#ifdef PHP_HAVE_BUILTIN_USUB_OVERFLOW + /* Subtracting 2 from `n_chars` will automatically set the CPU's flags; + * branch directly off the appropriate flag (CF on x86) rather than using + * another instruction (CMP on x86) to check for underflow */ + if (__builtin_usub_overflow(n_chars, 2, &n_chars)) { + /* The last 2 bytes of this block and the first 2 bytes of the following + * block form a valid surrogate pair; now just make sure we don't get + * stuck in this loop due to underflow of the loop index */ + break; + } +#else + n_chars -= 2; + if (n_chars == UINT_MAX) { + break; + } +#endif + } else { + /* First half of surrogate pair was followed by another first half + * OR by a non-surrogate character */ + *out++ = MBFL_BAD_INPUT; + bufsize--; + n_chars--; + len -= 2; + p -= 2; /* Back up so the last 2 bytes will be processed again */ + } + } while (n_chars); + } + } while (len >= 32 && bufsize >= 16); + + if (len && bufsize >= 4) { + /* Finish up trailing bytes which don't fill a 32-byte block */ + out += mb_utf16be_to_wchar_default(&p, &len, out, bufsize, NULL); + } + + *in = p; + *in_len = len; + return out - buf; + } else if (len) { + return mb_utf16be_to_wchar_default(in, in_len, buf, bufsize, NULL); + } else { + return 0; + } +} + +#ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +#else +static void mb_wchar_to_utf16be_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +#endif +{ + if (len >= 8) { + unsigned char *out, *limit; + MB_CONVERT_BUF_LOAD(buf, out, limit); + MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); + + /* Used to find wchars which are outside the Unicode BMP (Basic Multilingual Plane) */ + const __m256i bmp_mask = _mm256_set1_epi32(0xFFFF); + /* Used to extract 16 bits which we want from each of eight 32-bit values */ + const __m256i pack_8x16 = _mm256_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, 12, 13, 8, 9, 4, 5, 0, 1, 12, 13, 8, 9, 4, 5, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1); + + do { + __m256i operand = _mm256_loadu_si256((__m256i*)in); /* Load 32 bytes */ + + uint32_t bmp_bitvec = _mm256_movemask_epi8(_mm256_cmpeq_epi32(_mm256_and_si256(operand, bmp_mask), operand)); + if (bmp_bitvec == 0xFFFFFFFF) { + /* All eight wchars are in the BMP + * Shuffle bytes around to get the 16 bytes we want into the low 16 bytes of YMM register + * (which is equivalent to an XMM register) */ + operand = _mm256_shuffle_epi8(operand, pack_8x16); + __m256i operand2 = _mm256_permute2x128_si256(operand, operand, 1); + operand = _mm256_alignr_epi8(operand2, operand, 8); + _mm_storeu_si128((__m128i*)out, _mm256_castsi256_si128(operand)); /* Store 16 bytes */ + out += 16; + len -= 8; + in += 8; + } else if (bmp_bitvec & 1) { + /* Some prefix of this block are codepoints in the BMP */ + unsigned int n_bytes = zend_ulong_ntz(~bmp_bitvec); + operand = _mm256_shuffle_epi8(operand, pack_8x16); + __m256i operand2 = _mm256_permute2x128_si256(operand, operand, 1); + operand = _mm256_alignr_epi8(operand2, operand, 8); + /* Store 16 bytes, but bump output pointer forward just past the 'good part', + * so the 'bad part' will be overwritten on the next iteration of this loop */ + _mm_storeu_si128((__m128i*)out, _mm256_castsi256_si128(operand)); + out += n_bytes >> 1; + len -= n_bytes >> 2; + in += n_bytes >> 2; + } else { + /* Some prefix of this block is codepoints outside the BMP OR error markers + * Handle them using non-vectorized code */ + unsigned int n_words = bmp_bitvec ? zend_ulong_ntz(bmp_bitvec) >> 2 : 8; + do { + uint32_t w = *in++; + n_words--; + len--; + + if (w < MBFL_WCSPLANE_UTF32MAX) { + uint16_t n1 = ((w >> 10) - 0x40) | 0xD800; + uint16_t n2 = (w & 0x3FF) | 0xDC00; + MB_CONVERT_BUF_ENSURE(buf, out, limit, (len * 2) + 4); + out = mb_convert_buf_add4(out, (n1 >> 8) & 0xFF, n1 & 0xFF, (n2 >> 8) & 0xFF, n2 & 0xFF); + } else { + MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16be_default); + MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); + } + } while (n_words); + } + } while (len >= 8); + + MB_CONVERT_BUF_STORE(buf, out, limit); + } + + if (len) { + mb_wchar_to_utf16be_default(in, len, buf, end); + } +} + +#ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +#else +static size_t mb_utf16le_to_wchar_avx2(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state) +#endif +{ + /* Most of this function is the same as `mb_utf16be_to_wchar_avx2`, above; + * See it for more detailed code comments */ + + size_t len = *in_len; + + if (len >= 32 && bufsize >= 16) { + unsigned char *p = *in; + uint32_t *out = buf; + + const __m256i _f8 = _mm256_set1_epi16(0xF800); + const __m256i _d8 = _mm256_set1_epi16(0xD800); + + do { + __m256i operand = _mm256_loadu_si256((__m256i*)p); + + uint32_t surrogate_bitvec = _mm256_movemask_epi8(_mm256_cmpeq_epi16(_mm256_and_si256(operand, _f8), _d8)); + if (surrogate_bitvec == 0) { + /* There are no surrogates among these 16 characters */ + _mm256_storeu_si256((__m256i*)out, _mm256_cvtepu16_epi32(_mm256_castsi256_si128(operand))); + _mm256_storeu_si256((__m256i*)(out + 8), _mm256_cvtepu16_epi32(_mm256_extracti128_si256(operand, 1))); + out += 16; + bufsize -= 16; + p += sizeof(__m256i); + len -= sizeof(__m256i); + } else if ((surrogate_bitvec & 1) == 0) { + /* Some prefix of the current block is non-surrogates */ + uint8_t n_chars = zend_ulong_ntz(surrogate_bitvec) >> 1; + _mm256_storeu_si256((__m256i*)out, _mm256_cvtepu16_epi32(_mm256_castsi256_si128(operand))); + if (n_chars > 8) { + _mm256_storeu_si256((__m256i*)(out + 8), _mm256_cvtepu16_epi32(_mm256_extracti128_si256(operand, 1))); + } + out += n_chars; + bufsize -= n_chars; + p += n_chars * 2; + len -= n_chars * 2; + } else { + /* Some prefix of the current block is (valid or invalid) surrogates */ + surrogate_bitvec = ~surrogate_bitvec; + unsigned int n_chars = surrogate_bitvec ? zend_ulong_ntz(surrogate_bitvec) >> 1 : 16; + do { + unsigned char c1 = *p++; + unsigned char c2 = *p++; + + if (c2 & 0x4 || len < 4) { + /* 2nd part of surrogate pair has come first OR string ended abruptly + * after 1st part of surrogate pair */ + *out++ = MBFL_BAD_INPUT; + bufsize--; + n_chars--; + len -= 2; + continue; + } + + uint16_t n = (c2 << 8) | c1; + unsigned char c3 = *p++; + unsigned char c4 = *p++; + + if ((c4 & 0xFC) == 0xDC) { + /* Valid surrogate pair */ + uint16_t n2 = (c4 << 8) | c3; + *out++ = (((n & 0x3FF) << 10) | (n2 & 0x3FF)) + 0x10000; + bufsize--; + len -= 4; +#ifdef PHP_HAVE_BUILTIN_USUB_OVERFLOW + if (__builtin_usub_overflow(n_chars, 2, &n_chars)) { + break; + } +#else + n_chars -= 2; + if (n_chars == UINT_MAX) { + break; + } +#endif + } else { + /* First half of surrogate pair was followed by another first half + * OR by a non-surrogate character */ + *out++ = MBFL_BAD_INPUT; + bufsize--; + n_chars--; + len -= 2; + p -= 2; /* Back up so the last 2 bytes will be processed again */ + } + } while (n_chars); + } + } while (len >= 32 && bufsize >= 16); + + if (len && bufsize >= 4) { + out += mb_utf16le_to_wchar_default(&p, &len, out, bufsize, NULL); + } + + *in = p; + *in_len = len; + return out - buf; + } else if (len) { + return mb_utf16le_to_wchar_default(in, in_len, buf, bufsize, NULL); + } else { + return 0; + } +} + +#ifdef ZEND_INTRIN_AVX2_FUNC_PROTO +void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +#else +static void mb_wchar_to_utf16le_avx2(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) +#endif +{ + if (len >= 8) { + unsigned char *out, *limit; + MB_CONVERT_BUF_LOAD(buf, out, limit); + MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); + + /* Used to find wchars which are outside the Unicode BMP (Basic Multilingual Plane) */ + const __m256i bmp_mask = _mm256_set1_epi32(0xFFFF); + /* Used to extract 16 bits which we want from each of eight 32-bit values */ + const __m256i pack_8x16 = _mm256_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, 13, 12, 9, 8, 5, 4, 1, 0, 13, 12, 9, 8, 5, 4, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1); + + do { + __m256i operand = _mm256_loadu_si256((__m256i*)in); + + uint32_t bmp_bitvec = _mm256_movemask_epi8(_mm256_cmpeq_epi32(_mm256_and_si256(operand, bmp_mask), operand)); + if (bmp_bitvec == 0xFFFFFFFF) { + /* All eight wchars are in the BMP + * Shuffle bytes around to get the 16 bytes we want into the low 16 bytes of YMM register + * (which is equivalent to an XMM register) */ + operand = _mm256_shuffle_epi8(operand, pack_8x16); + __m256i operand2 = _mm256_permute2x128_si256(operand, operand, 1); + operand = _mm256_alignr_epi8(operand2, operand, 8); + _mm_storeu_si128((__m128i*)out, _mm256_castsi256_si128(operand)); + out += 16; + len -= 8; + in += 8; + } else if (bmp_bitvec & 1) { + /* Some prefix of this block are codepoints in the BMP */ + unsigned int n_bytes = zend_ulong_ntz(~bmp_bitvec); + operand = _mm256_shuffle_epi8(operand, pack_8x16); + __m256i operand2 = _mm256_permute2x128_si256(operand, operand, 1); + operand = _mm256_alignr_epi8(operand2, operand, 8); + _mm_storeu_si128((__m128i*)out, _mm256_castsi256_si128(operand)); + out += n_bytes >> 1; + len -= n_bytes >> 2; + in += n_bytes >> 2; + } else { + /* Some prefix of this block is codepoints outside the BMP OR error markers */ + unsigned int n_words = bmp_bitvec ? zend_ulong_ntz(bmp_bitvec) >> 2 : 8; + do { + uint32_t w = *in++; + n_words--; + len--; + + if (w < MBFL_WCSPLANE_UTF32MAX) { + uint16_t n1 = ((w >> 10) - 0x40) | 0xD800; + uint16_t n2 = (w & 0x3FF) | 0xDC00; + MB_CONVERT_BUF_ENSURE(buf, out, limit, (len * 2) + 4); + out = mb_convert_buf_add4(out, n1 & 0xFF, (n1 >> 8) & 0xFF, n2 & 0xFF, (n2 >> 8) & 0xFF); + } else { + MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf16le_default); + MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); + } + } while (n_words); + } + } while (len >= 8); + + MB_CONVERT_BUF_STORE(buf, out, limit); + } + + if (len) { + mb_wchar_to_utf16le_default(in, len, buf, end); + } +} + +#endif /* defined(ZEND_INTRIN_AVX2_NATIVE) || defined(ZEND_INTRIN_AVX2_RESOLVER) */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.h b/ext/mbstring/libmbfl/filters/mbfilter_utf16.h index 727c231b3479e..291628549debe 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.h @@ -47,4 +47,8 @@ int mbfl_filt_conv_wchar_utf16be(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_utf16le_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_utf16le(int c, mbfl_convert_filter *filter); +#ifdef ZEND_INTRIN_AVX2_FUNC_PTR +void init_convert_utf16(void); +#endif + #endif /* MBFL_MBFILTER_UTF16_H */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index fa466842936bb..270dc2d36d7d2 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1080,6 +1080,7 @@ ZEND_TSRMLS_CACHE_UPDATE(); #ifdef ZEND_INTRIN_AVX2_FUNC_PTR init_check_utf8(); + init_convert_utf16(); #endif return SUCCESS; diff --git a/ext/mbstring/tests/utf_encodings.phpt b/ext/mbstring/tests/utf_encodings.phpt index 55a79274e3fe2..634d070ea27a2 100644 --- a/ext/mbstring/tests/utf_encodings.phpt +++ b/ext/mbstring/tests/utf_encodings.phpt @@ -895,6 +895,17 @@ testValidString("\xDC\x00", "\x00\xDC", 'UCS-2BE', 'UTF-16LE', false); convertInvalidString("\x00\x11\x56\x78", "\x00%", 'UCS-4BE', 'UTF-16BE'); convertInvalidString("\x00\x11\x56\x78", "%\x00", 'UCS-4BE', 'UTF-16LE'); +// Regression tests for bugs with initial AVX2-accelerated implementation +convertInvalidString(str_repeat("a\x00", 15) . "\x00\xD8\x00\xFC", str_repeat("\x00a", 15) . "\x00%\xFC\x00", 'UTF-16LE', 'UCS-2BE'); +convertInvalidString(str_repeat("\x00a", 15) . "\xD8\x00\xFC\x00", str_repeat("\x00a", 15) . "\x00%\xFC\x00", 'UTF-16BE', 'UCS-2BE'); + +// This string caused an out-of-bounds read; it was found by a fuzzer +$str = "\xdb\xdb\xdb#\xdb\xdb\xdf\xdb\xdf\xdb\xdb\x0b\xdb\x00\xdc\xdb\xdf\xdb\xdf\xdb\xda\x0b\xdb\x00\xdcY\xdf\x03\xdb\x03\xd9\xd9\xd8"; +convertInvalidString($str, "\x00\x25\x00\x25\xdb\xdb\xdf\xdb\x00\x25\x00\x25\xdb\x00\xdc\xdb\x00\x25\x00\x25\x00\x25\xdb\x00\xdc\x59\x00\x25\x00\x25\x00\x25\x00\x25", 'UTF-16BE', 'UTF-16BE'); + +$str = "\xda\xda\xda\xda\xda\xda\xd9\xdb\xda\xda\xda\xda\xdd\xda\xda\xd9\xdb\xda\xda\xda\xda\xdd\xda\xdd\xd9\x0a\xda\xda\xda\xda\xdd\xda\xdd\xd9\xda\xda\xda\xda\xda\xda\xda\xda\xda\xd9\xdb\xda\xda\xda\xd9\xdb\xda\xda\xda\xda\xdd\xda\xda\xd9\xdb"; +convertInvalidString($str, "\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\xda\xda\xda\xdd\x25\x00\xd9\x0a\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00", 'UTF-16LE', 'UTF-16LE'); + echo "== UTF-32 ==\n"; testValidCodepoints("UTF-32LE"); From a21195650e53e34266806a8c379dd5a91f0dbb61 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 6 Feb 2023 18:35:06 +0300 Subject: [PATCH 363/895] Fix possible exit_counters memory leak in ZTS build --- ext/opcache/jit/zend_jit.c | 15 +++++++++++---- ext/opcache/jit/zend_jit_trace.c | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 28404f2d2bdf0..b58614e50311e 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4759,6 +4759,13 @@ static void zend_jit_globals_ctor(zend_jit_globals *jit_globals) zend_jit_trace_init_caches(); } +#ifdef ZTS +static void zend_jit_globals_dtor(zend_jit_globals *jit_globals) +{ + zend_jit_trace_free_caches(); +} +#endif + static int zend_jit_parse_config_num(zend_long jit) { if (jit == 0) { @@ -4871,7 +4878,7 @@ ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int ZEND_EXT_API void zend_jit_init(void) { #ifdef ZTS - jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, NULL); + jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, zend_jit_globals_dtor); #else zend_jit_globals_ctor(&jit_globals); #endif @@ -5071,9 +5078,9 @@ ZEND_EXT_API void zend_jit_shutdown(void) zend_jit_perf_jitdump_close(); } #endif - if (JIT_G(exit_counters)) { - free(JIT_G(exit_counters)); - } +#ifndef ZTS + zend_jit_trace_free_caches(); +#endif } static void zend_jit_reset_counters(void) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 555a868b2d553..14cd945bbe650 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -8324,6 +8324,13 @@ static void zend_jit_trace_reset_caches(void) #endif } +static void zend_jit_trace_free_caches(void) +{ + if (JIT_G(exit_counters)) { + free(JIT_G(exit_counters)); + } +} + static void zend_jit_trace_restart(void) { ZEND_JIT_TRACE_NUM = 1; From 5c5707d44db3c7ab84cb113578926ee10bf2eabe Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 7 Feb 2023 13:13:05 +0300 Subject: [PATCH 364/895] Make fuzzer respect ZEND_MMAP_AHEAD Fixes oss-fuzz #55654 --- sapi/fuzzer/fuzzer-sapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c index 883c3a94ec3ff..cbb09e08f2730 100644 --- a/sapi/fuzzer/fuzzer-sapi.c +++ b/sapi/fuzzer/fuzzer-sapi.c @@ -262,7 +262,9 @@ int fuzzer_do_request_from_buffer( zend_file_handle file_handle; zend_stream_init_filename(&file_handle, filename); file_handle.primary_script = 1; - file_handle.buf = estrndup(data, data_len); + file_handle.buf = emalloc(data_len + ZEND_MMAP_AHEAD); + memcpy(file_handle.buf, data, data_len); + memset(file_handle.buf + data_len, 0, ZEND_MMAP_AHEAD); file_handle.len = data_len; /* Avoid ZEND_HANDLE_FILENAME for opcache. */ file_handle.type = ZEND_HANDLE_STREAM; From afbb28dfb7cb86af42e5369e9f2c1e93e6027ec2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2023 11:38:17 +0100 Subject: [PATCH 365/895] ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527) * ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types Regression by commit a21195650e53e34266806a8c379dd5a91f0dbb61 * TSRM/win32: fix ts_allocate_dtor cast The dtor was casted to ts_allocate_ctor; luckily, ts_allocate_dtor and ts_allocate_ctor just happen to be the same type. --- TSRM/tsrm_win32.c | 2 +- ext/opcache/jit/zend_jit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 4b5c58d6982a1..0cb4d36d4d7ab 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -91,7 +91,7 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals) TSRM_API void tsrm_win32_startup(void) {/*{{{*/ #ifdef ZTS - ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor); + ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_dtor)tsrm_win32_dtor); #else tsrm_win32_ctor(&win32_globals); #endif diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index b58614e50311e..d4699a4abc111 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4878,7 +4878,7 @@ ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int ZEND_EXT_API void zend_jit_init(void) { #ifdef ZTS - jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, zend_jit_globals_dtor); + jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, (ts_allocate_dtor) zend_jit_globals_dtor); #else zend_jit_globals_ctor(&jit_globals); #endif From c95125d37030a06cfea1a9e172601139525d3d74 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 7 Feb 2023 12:05:01 +0100 Subject: [PATCH 366/895] Disable timestamp for GitHub actions ccache --- .github/workflows/push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9fc0d05747c45..7c8e5698c7aae 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -48,6 +48,7 @@ jobs: # GitHub has no way to query the job name (github.job is the # job id, not the job name) key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}" + append-timestamp: false - name: ./configure uses: ./.github/actions/configure-x64 with: @@ -97,6 +98,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2 with: key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" + append-timestamp: false - name: ./configure uses: ./.github/actions/configure-x32 with: @@ -127,6 +129,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2 with: key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" + append-timestamp: false - name: ./configure uses: ./.github/actions/configure-macos with: From 131b862ac06fec7ab0f35a6033fda2cb72560453 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2023 14:09:17 +0100 Subject: [PATCH 367/895] ext/opcache/zend_jit: call TSRM dtor before unloading opcache.so (#10533) Commit a21195650e53e added a TSRM destructor, but that destructor will get called by tsrm_shutdown(), which is after opcache.so has already been unloaded, resulting in a shutdown crash, e.g.: #0 0x00007fad01737500 in ?? () #1 0x000055ac54e723c4 in tsrm_shutdown () at TSRM/TSRM.c:194 #2 0x000055ac54c42180 in main (argc=80, argv=0x55ac57bc14d0) at sapi/cli/php_cli.c:1388 By calling ts_free_id() before opcache.so gets unloaded, we can easily fix this crash bug. --- ext/opcache/jit/zend_jit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d4699a4abc111..d2f6df0537c9d 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -5078,7 +5078,9 @@ ZEND_EXT_API void zend_jit_shutdown(void) zend_jit_perf_jitdump_close(); } #endif -#ifndef ZTS +#ifdef ZTS + ts_free_id(jit_globals_id); +#else zend_jit_trace_free_caches(); #endif } From 4df4264ac95ca35a6f550af56e32283896e42042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 24 Mar 2022 15:56:20 +0100 Subject: [PATCH 368/895] Fix PDO OCI Bug #60994 (Reading a multibyte CLOB caps at 8192 chars) --- ext/pdo_oci/config.m4 | 8 ++++++++ ext/pdo_oci/oci_statement.c | 32 +++++++++++++++++++++++--------- ext/pdo_oci/tests/bug60994.phpt | 31 +++++++++++++++++++++---------- 3 files changed, 52 insertions(+), 19 deletions(-) diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index 1f5f436c3214e..05ecebf272c62 100644 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -182,6 +182,14 @@ if test "$PHP_PDO_OCI" != "no"; then -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD ]) + dnl Can handle bytes vs. characters? + PHP_CHECK_LIBRARY(clntsh, OCILobRead2, + [ + AC_DEFINE(HAVE_OCILOBREAD2,1,[ ]) + ], [], [ + -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD + ]) + PHP_CHECK_PDO_INCLUDES PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_cv_inc_path) diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index e77c78eef2d03..f3be69f9c32c2 100644 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -616,6 +616,7 @@ struct oci_lob_self { OCILobLocator *lob; oci_lob_env *E; ub4 offset; + ub1 csfrm; }; static ssize_t oci_blob_write(php_stream *stream, const char *buf, size_t count) @@ -641,23 +642,34 @@ static ssize_t oci_blob_write(php_stream *stream, const char *buf, size_t count) static ssize_t oci_blob_read(php_stream *stream, char *buf, size_t count) { struct oci_lob_self *self = (struct oci_lob_self*)stream->abstract; - ub4 amt; - sword r; +#if HAVE_OCILOBREAD2 + oraub8 byte_amt = (oraub8) count; + oraub8 char_amt = 0; - amt = (ub4) count; - r = OCILobRead(self->E->svc, self->E->err, self->lob, - &amt, self->offset, buf, (ub4) count, + sword r = OCILobRead2(self->E->svc, self->E->err, self->lob, + &byte_amt, &char_amt, (oraub8) self->offset, buf, (oraub8) count, + OCI_ONE_PIECE, NULL, NULL, 0, self->csfrm); +#else + ub4 byte_amt = (ub4) count; + + sword r = OCILobRead(self->E->svc, self->E->err, self->lob, + &byte_amt, self->offset, buf, (ub4) count, NULL, NULL, 0, SQLCS_IMPLICIT); +#endif if (r != OCI_SUCCESS && r != OCI_NEED_DATA) { - return (size_t)-1; + return (ssize_t)-1; } - self->offset += amt; - if (amt < count) { +#if HAVE_OCILOBREAD2 + self->offset += self->csfrm == 0 ? byte_amt : char_amt; +#else + self->offset += byte_amt; +#endif + if (byte_amt < count) { stream->eof = 1; } - return amt; + return byte_amt; } static int oci_blob_close(php_stream *stream, int close_handle) @@ -724,6 +736,8 @@ static php_stream *oci_create_lob_stream(zval *dbh, pdo_stmt_t *stmt, OCILobLoca self->E->svc = self->S->H->svc; self->E->err = self->S->err; + OCILobCharSetForm(self->S->H->env, self->S->err, self->lob, &self->csfrm); + stm = php_stream_alloc(&oci_blob_stream_ops, self, 0, "r+b"); if (stm) { diff --git a/ext/pdo_oci/tests/bug60994.phpt b/ext/pdo_oci/tests/bug60994.phpt index 15ec56c3e0283..6f5c9161dc8e5 100644 --- a/ext/pdo_oci/tests/bug60994.phpt +++ b/ext/pdo_oci/tests/bug60994.phpt @@ -21,18 +21,19 @@ $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); $dbh->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); @$dbh->exec('DROP TABLE pdo_oci_bug60994'); -$dbh->exec('CREATE TABLE pdo_oci_bug60994 (id NUMBER, data CLOB)'); +$dbh->exec('CREATE TABLE pdo_oci_bug60994 (id NUMBER, data CLOB, data2 NCLOB)'); $id = null; -$insert = $dbh->prepare('INSERT INTO pdo_oci_bug60994 (id, data) VALUES (:id, :data)'); +$insert = $dbh->prepare('INSERT INTO pdo_oci_bug60994 (id, data, data2) VALUES (:id, :data, :data2)'); $insert->bindParam(':id', $id, \PDO::PARAM_STR); -$select = $dbh->prepare("SELECT data FROM pdo_oci_bug60994 WHERE id = :id"); +$select = $dbh->prepare("SELECT data, data2 FROM pdo_oci_bug60994 WHERE id = :id"); echo PHP_EOL, 'Test 1: j', PHP_EOL; $string1 = 'abc' . str_repeat('j', 8187) . 'xyz'; // 8193 chars total works fine here (even 1 million works fine, subject to memory_limit) $id = 1; $insert->bindParam(':data', $string1, \PDO::PARAM_STR, strlen($string1)); // length in bytes +$insert->bindParam(':data2', $string1, \PDO::PARAM_STR, strlen($string1)); $insert->execute(); $select->bindParam(':id', $id, \PDO::PARAM_STR); $select->execute(); @@ -44,12 +45,15 @@ echo 'size of string1 is ', strlen($string1), ' bytes, ', mb_strlen($string1), ' echo 'size of stream1 is ', strlen($stream1), ' bytes, ', mb_strlen($stream1), ' chars.', PHP_EOL; echo 'beg of stream1 is ', $start1, PHP_EOL; echo 'end of stream1 is ', $ending1, PHP_EOL; - +if ($string1 != $stream1 || $stream1 != stream_get_contents($row['DATA2'])) { + echo 'Expected nclob value to match clob value for stream1', PHP_EOL; +} echo PHP_EOL, 'Test 2: £', PHP_EOL; $string2 = 'abc' . str_repeat('£', 8187) . 'xyz'; // 8193 chars total is when it breaks $id = 2; $insert->bindParam(':data', $string2, \PDO::PARAM_STR, strlen($string2)); // length in bytes +$insert->bindParam(':data2', $string2, \PDO::PARAM_STR, strlen($string2)); $insert->execute(); $select->bindParam(':id', $id, \PDO::PARAM_STR); $select->execute(); @@ -61,12 +65,15 @@ echo 'size of string2 is ', strlen($string2), ' bytes, ', mb_strlen($string2), ' echo 'size of stream2 is ', strlen($stream2), ' bytes, ', mb_strlen($stream2), ' chars.', PHP_EOL; echo 'beg of stream2 is ', $start2, PHP_EOL; echo 'end of stream2 is ', $ending2, PHP_EOL; - +if ($string2 != $stream2 || $stream2 != stream_get_contents($row['DATA2'])) { + echo 'Expected nclob value to match clob value for stream2', PHP_EOL; +} echo PHP_EOL, 'Test 3: Җ', PHP_EOL; $string3 = 'abc' . str_repeat('Җ', 8187) . 'xyz'; // 8193 chars total is when it breaks $id = 3; $insert->bindParam(':data', $string3, \PDO::PARAM_STR, strlen($string3)); // length in bytes +$insert->bindParam(':data2', $string3, \PDO::PARAM_STR, strlen($string3)); $insert->execute(); $select->bindParam(':id', $id, \PDO::PARAM_STR); $select->execute(); @@ -78,12 +85,15 @@ echo 'size of string3 is ', strlen($string3), ' bytes, ', mb_strlen($string3), ' echo 'size of stream3 is ', strlen($stream3), ' bytes, ', mb_strlen($stream3), ' chars.', PHP_EOL; echo 'beg of stream3 is ', $start3, PHP_EOL; echo 'end of stream3 is ', $ending3, PHP_EOL; - +if ($string3 != $stream3 || $stream3 != stream_get_contents($row['DATA2'])) { + echo 'Expected nclob value to match clob value for stream3', PHP_EOL; +} echo PHP_EOL, 'Test 4: の', PHP_EOL; $string4 = 'abc' . str_repeat('の', 8187) . 'xyz'; // 8193 chars total is when it breaks $id = 4; $insert->bindParam(':data', $string4, \PDO::PARAM_STR, strlen($string4)); // length in bytes +$insert->bindParam(':data2', $string4, \PDO::PARAM_STR, strlen($string4)); $insert->execute(); $select->bindParam(':id', $id, \PDO::PARAM_STR); $select->execute(); @@ -95,13 +105,14 @@ echo 'size of string4 is ', strlen($string4), ' bytes, ', mb_strlen($string4), ' echo 'size of stream4 is ', strlen($stream4), ' bytes, ', mb_strlen($stream4), ' chars.', PHP_EOL; echo 'beg of stream4 is ', $start4, PHP_EOL; echo 'end of stream4 is ', $ending4, PHP_EOL; +if ($string4 != $stream4 || $stream4 != stream_get_contents($row['DATA2'])) { + echo 'Expected nclob value to match clob value for stream4', PHP_EOL; +} ?> ---XFAIL-- -Fails due to Bug 60994 --EXPECT-- Test 1: j -size of string1 is 1000006 bytes, 1000006 chars. -size of stream1 is 1000006 bytes, 1000006 chars. +size of string1 is 8193 bytes, 8193 chars. +size of stream1 is 8193 bytes, 8193 chars. beg of stream1 is abcjjjjjjj end of stream1 is jjjjjjjxyz From ba282f1b2f425ea4e3e86a87c3b842a9bfa42710 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 7 Feb 2023 09:28:50 -0600 Subject: [PATCH 369/895] Update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index ea21713af4c31..bb3d77ca491b4 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,10 @@ PHP NEWS - Opcache: . Fix incorrect page_size check. (nielsdos) +- PDO OCI: + . Fixed bug #60994 (Reading a multibyte CLOB caps at 8192 chars). + (Michael Voříšek) + - Phar: . Fix incorrect check in phar tar parsing. (nielsdos) From 0752baa583e4d16fffd06eb7276724c7233dc0e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 28 Dec 2022 10:04:06 +0100 Subject: [PATCH 370/895] Zend/zend_cpuinfo, ext/standard/crc32_x86: fix -Wstrict-prototypes In plain C, a function without arguments must be explicitly declared (void). Close GH-10528 --- Zend/zend_cpuinfo.h | 2 +- ext/standard/crc32_x86.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h index fcaf33d5e721c..ebfbab799795d 100644 --- a/Zend/zend_cpuinfo.h +++ b/Zend/zend_cpuinfo.h @@ -208,7 +208,7 @@ static inline int zend_cpu_supports_avx2(void) { /* __builtin_cpu_supports has pclmul from gcc9 */ #if PHP_HAVE_BUILTIN_CPU_SUPPORTS && (!defined(__GNUC__) || (ZEND_GCC_VERSION >= 9000)) ZEND_NO_SANITIZE_ADDRESS -static inline int zend_cpu_supports_pclmul() { +static inline int zend_cpu_supports_pclmul(void) { #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif diff --git a/ext/standard/crc32_x86.c b/ext/standard/crc32_x86.c index eec023264002f..fdcbed8782557 100644 --- a/ext/standard/crc32_x86.c +++ b/ext/standard/crc32_x86.c @@ -323,7 +323,7 @@ typedef size_t (*crc32_x86_simd_func_t)(X86_CRC32_TYPE type, uint32_t *crc, cons ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static crc32_x86_simd_func_t resolve_crc32_x86_simd_update() { +static crc32_x86_simd_func_t resolve_crc32_x86_simd_update(void) { if (zend_cpu_supports_sse42() && zend_cpu_supports_pclmul()) { return crc32_sse42_pclmul_update; } From e6281db857b567eccc27ed856ab94efcf1a0f769 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Jan 2023 09:42:03 +0100 Subject: [PATCH 371/895] php.ini-production: disable opcache.huge_code_pages by default There are only very narrow circumstances under which this option has been reported to provide 1% performance gain due to reduction of TLB misses. In many setups, this option only increases memory usage, and will actually decrease performance. To avoid this, let's leave it disabled by default, and let it be an explicit decision to enable it. For a discussion, see https://github.com/php/php-src/pull/10301 Closes GH-10336 --- php.ini-development | 7 ++++++- php.ini-production | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/php.ini-development b/php.ini-development index a963e0d62ec65..e61f19b87cace 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1888,7 +1888,12 @@ ldap.max_links = -1 ;opcache.file_cache_fallback=1 ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. +; Under certain circumstances (if only a single global PHP process is +; started from which all others fork), this can increase performance +; by a tiny amount because TLB misses are reduced. On the other hand, this +; delays PHP startup, increases memory usage and degrades performance +; under memory pressure - use with care. +; Requires appropriate OS configuration. ;opcache.huge_code_pages=0 ; Validate cached file permissions. diff --git a/php.ini-production b/php.ini-production index 0864b40c60497..73a4db3c31bd5 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1890,8 +1890,13 @@ ldap.max_links = -1 ;opcache.file_cache_fallback=1 ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -;opcache.huge_code_pages=1 +; Under certain circumstances (if only a single global PHP process is +; started from which all others fork), this can increase performance +; by a tiny amount because TLB misses are reduced. On the other hand, this +; delays PHP startup, increases memory usage and degrades performance +; under memory pressure - use with care. +; Requires appropriate OS configuration. +;opcache.huge_code_pages=0 ; Validate cached file permissions. ;opcache.validate_permission=0 From 3ff8333473f79fe8255fd2e0781cd3477ebe6a25 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 8 Feb 2023 00:54:42 +0100 Subject: [PATCH 372/895] Cleanup dead code in array_slice (#10539) We can only get to this if condition if at least preserve_keys is true. Therefore, the else branch of this check can never execute. --- ext/standard/array.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index a1fe8287cd383..88d2335c0afb9 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3616,11 +3616,7 @@ PHP_FUNCTION(array_slice) break; } n++; - if (preserve_keys) { - entry = zend_hash_index_add_new(Z_ARRVAL_P(return_value), idx, zv); - } else { - entry = zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), zv); - } + entry = zend_hash_index_add_new(Z_ARRVAL_P(return_value), idx, zv); zval_add_ref(entry); } } From 71ddede5655fe654002ae18af6a18e033f717287 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 6 Feb 2023 21:59:07 +0100 Subject: [PATCH 373/895] Fix GH-10168: heap-buffer-overflow at zval_undefined_cv The problem is that we're using the variable_ptr in the opcode handler *after* it has already been destroyed. The solution is to create a specialised version of zend_assign_to_variable which takes in two destination zval pointers. Closes GH-10524 --- NEWS | 2 + Zend/tests/gh10168_1.phpt | 32 +++ Zend/tests/gh10168_2.phpt | 32 +++ Zend/tests/gh10168_3.phpt | 29 +++ Zend/zend_execute.c | 10 +- Zend/zend_execute.h | 50 +++- Zend/zend_vm_def.h | 20 +- Zend/zend_vm_execute.h | 504 +++++++++++++++++++++++++------------- 8 files changed, 486 insertions(+), 193 deletions(-) create mode 100644 Zend/tests/gh10168_1.phpt create mode 100644 Zend/tests/gh10168_2.phpt create mode 100644 Zend/tests/gh10168_3.phpt diff --git a/NEWS b/NEWS index bb3d77ca491b4..ce886d1638c7a 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS Generator emits an unavoidable fatal error or crashes). (Arnaud) . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout). (trowski) + . Fixed bug GH-10168: use-after-free when utilizing assigned object freed + during assignment. (nielsdos) - Date: . Fix GH-10447 ('p' format specifier does not yield 'Z' for 00:00). (Derick) diff --git a/Zend/tests/gh10168_1.phpt b/Zend/tests/gh10168_1.phpt new file mode 100644 index 0000000000000..6433453ed2448 --- /dev/null +++ b/Zend/tests/gh10168_1.phpt @@ -0,0 +1,32 @@ +--TEST-- +GH-10168 (heap-buffer-overflow at zval_undefined_cv): array variation +--FILE-- + 0; + var_dump(self::$instances); + } + + function __destruct() { + unset(self::$instances[NULL]); + } +} +new Test(); +new Test(); + +?> +--EXPECTF-- +Notice: Object of class Test could not be converted to int in %s on line %d +array(1) { + [""]=> + object(Test)#1 (0) { + } +} + +Notice: Object of class Test could not be converted to int in %s on line %d +array(0) { +} diff --git a/Zend/tests/gh10168_2.phpt b/Zend/tests/gh10168_2.phpt new file mode 100644 index 0000000000000..abab8b72f1cb9 --- /dev/null +++ b/Zend/tests/gh10168_2.phpt @@ -0,0 +1,32 @@ +--TEST-- +GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign global variation +--FILE-- + 0; + // Destructor called after comparison, so a will be NULL + var_dump($GLOBALS['a']); + } + + function __destruct() { + unset($GLOBALS['a']); + } +} +new Test(); +new Test(); + +?> +--EXPECTF-- +Notice: Object of class Test could not be converted to int in %s on line %d +object(Test)#1 (0) { +} + +Notice: Object of class Test could not be converted to int in %s on line %d + +Warning: Undefined global variable $a in %s on line %d +NULL diff --git a/Zend/tests/gh10168_3.phpt b/Zend/tests/gh10168_3.phpt new file mode 100644 index 0000000000000..fb8729c99661a --- /dev/null +++ b/Zend/tests/gh10168_3.phpt @@ -0,0 +1,29 @@ +--TEST-- +GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign typed prop +--FILE-- + +--EXPECTF-- +object(Test)#1 (0) { +} +object(Test)#2 (0) { +} diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 922b45c42baf4..49af6fc76957c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3562,7 +3562,7 @@ static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) { } } -ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict) +ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict, zval *result_variable_ptr) { bool ret; zval value; @@ -3582,6 +3582,9 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ze } else { zval_ptr_dtor_nogc(&value); } + if (result_variable_ptr) { + ZVAL_COPY(result_variable_ptr, variable_ptr); + } if (value_type & (IS_VAR|IS_TMP_VAR)) { if (UNEXPECTED(ref)) { if (UNEXPECTED(GC_DELREF(ref) == 0)) { @@ -3595,6 +3598,11 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ze return variable_ptr; } +ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict) +{ + return zend_assign_to_typed_ref_and_result(variable_ptr, orig_value, value_type, strict, NULL); +} + ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict) { zval *val = orig_val; if (Z_ISREF_P(val) && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(val))) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 3e61967cb2bea..1091b1ebe652b 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -108,6 +108,7 @@ ZEND_API bool zend_verify_internal_return_type(zend_function *zf, zval *ret); ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); +ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict, zval *result_variable_ptr); ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict); static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type) @@ -137,12 +138,22 @@ static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *v } } +static zend_always_inline void zend_handle_garbage_from_variable_assignment(zend_refcounted *garbage) +{ + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { /* we need to split */ + /* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */ + if (UNEXPECTED(GC_MAY_LEAK(garbage))) { + gc_possible_root(garbage); + } + } +} + static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict) { do { if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { - zend_refcounted *garbage; - if (Z_ISREF_P(variable_ptr)) { if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { return zend_assign_to_typed_ref(variable_ptr, value, value_type, strict); @@ -153,21 +164,42 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval break; } } - garbage = Z_COUNTED_P(variable_ptr); + zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); zend_copy_to_variable(variable_ptr, value, value_type); - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { /* we need to split */ - /* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */ - if (UNEXPECTED(GC_MAY_LEAK(garbage))) { - gc_possible_root(garbage); + zend_handle_garbage_from_variable_assignment(garbage); + return variable_ptr; + } + } while (0); + + zend_copy_to_variable(variable_ptr, value, value_type); + return variable_ptr; +} + +static zend_always_inline zval* zend_assign_to_two_variables(zval *result_variable_ptr, zval *variable_ptr, zval *value, zend_uchar value_type, bool strict) +{ + do { + if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { + if (Z_ISREF_P(variable_ptr)) { + if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { + variable_ptr = zend_assign_to_typed_ref_and_result(variable_ptr, value, value_type, strict, result_variable_ptr); + return variable_ptr; + } + + variable_ptr = Z_REFVAL_P(variable_ptr); + if (EXPECTED(!Z_REFCOUNTED_P(variable_ptr))) { + break; } } + zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); + zend_copy_to_variable(variable_ptr, value, value_type); + ZVAL_COPY(result_variable_ptr, variable_ptr); + zend_handle_garbage_from_variable_assignment(garbage); return variable_ptr; } } while (0); zend_copy_to_variable(variable_ptr, value, value_type); + ZVAL_COPY(result_variable_ptr, variable_ptr); return variable_ptr; } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 4845a92b95a7e..09d7b95896ec8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2577,6 +2577,9 @@ ZEND_VM_C_LABEL(try_assign_dim_array): Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (OP2_TYPE == IS_CONST) { @@ -2588,10 +2591,11 @@ ZEND_VM_C_LABEL(try_assign_dim_array): ZEND_VM_C_GOTO(assign_dim_error); } value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R); - value = zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -2685,12 +2689,14 @@ ZEND_VM_HANDLER(22, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL)) value = GET_OP2_ZVAL_PTR(BP_VAR_R); variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); - value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); } + FREE_OP1_VAR_PTR(); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a5a5eabf2b037..6f1b9b49f725a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -23464,6 +23464,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23475,10 +23478,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23612,6 +23616,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23623,10 +23630,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23761,6 +23769,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23772,10 +23783,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23910,6 +23922,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23921,10 +23936,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24017,12 +24033,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -24037,12 +24055,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -26163,6 +26183,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26174,10 +26197,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26311,6 +26335,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26322,10 +26349,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26460,6 +26488,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26471,10 +26502,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26609,6 +26641,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26620,10 +26655,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27346,12 +27382,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNU value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27366,12 +27404,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USE value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27430,12 +27470,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNU value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27450,12 +27492,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USE value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27694,6 +27738,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -27705,10 +27752,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27842,6 +27890,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -27853,10 +27904,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27991,6 +28043,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -28002,10 +28057,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28140,6 +28196,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -28151,10 +28210,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30370,6 +30430,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30381,10 +30444,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30518,6 +30582,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30529,10 +30596,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30667,6 +30735,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30678,10 +30749,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30816,6 +30888,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30827,10 +30902,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30923,12 +30999,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUS value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -30943,12 +31021,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -41421,6 +41501,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41432,10 +41515,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41569,6 +41653,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41580,10 +41667,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41718,6 +41806,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41729,10 +41820,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41867,6 +41959,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41878,10 +41973,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41974,12 +42070,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UN value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -41994,12 +42091,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_US value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -45199,6 +45297,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45210,10 +45311,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45347,6 +45449,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45358,10 +45463,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45496,6 +45602,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45507,10 +45616,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45645,6 +45755,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45656,10 +45769,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -46670,12 +46784,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUS value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46690,12 +46805,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46740,12 +46856,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUS value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46760,12 +46877,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -47177,6 +47295,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47188,10 +47309,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47325,6 +47447,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47336,10 +47461,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47474,6 +47600,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47485,10 +47614,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47623,6 +47753,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47634,10 +47767,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50514,6 +50648,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50525,10 +50662,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50662,6 +50800,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50673,10 +50814,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50811,6 +50953,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50822,10 +50967,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50960,6 +51106,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50971,10 +51120,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -51067,12 +51217,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSE value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -51087,12 +51238,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_ value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } else { + zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } - /* zend_assign_to_variable() always takes care of op2, never free it! */ + /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } From eabb9b7deab1c8469371dfd7d3ad9cc990e4a65a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 21 Jan 2023 11:36:10 +0100 Subject: [PATCH 374/895] .github/workflows/nightly.yml: add job to build out-of-tree extensions This aims to detect API breakages early by compiling a selection of out-of-tree extensions in the CI. Closes GH-10404 --- .github/workflows/nightly.yml | 102 ++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5b8a1687c9db0..276a7c64e69eb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -612,3 +612,105 @@ jobs: withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }} - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + PECL: + runs-on: ubuntu-20.04 + env: + CC: ccache gcc + CXX: ccache g++ + steps: + - name: git checkout PHP + uses: actions/checkout@v3 + with: + path: php + - name: git checkout apcu + uses: actions/checkout@v3 + with: + repository: krakjoe/apcu + path: apcu + - name: git checkout imagick + uses: actions/checkout@v3 + with: + repository: Imagick/imagick + path: imagick + - name: git checkout memcached + uses: actions/checkout@v3 + with: + repository: php-memcached-dev/php-memcached + path: memcached + - name: git checkout redis + uses: actions/checkout@v3 + with: + repository: phpredis/phpredis + path: redis + - name: git checkout xdebug + uses: actions/checkout@v3 + with: + repository: xdebug/xdebug + path: xdebug + - name: git checkout yaml + uses: actions/checkout@v3 + with: + repository: php/pecl-file_formats-yaml + path: yaml + - name: apt + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ccache \ + libmemcached-dev \ + bison \ + re2c + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: "${{github.job}}-${{hashFiles('php/main/php_version.h')}}" + append-timestamp: false + - name: build PHP + run: | + cd php + ./buildconf --force + ./configure \ + --enable-option-checking=fatal \ + --prefix=/opt/php \ + --enable-cli \ + --disable-all \ + --enable-session \ + --enable-werror + make -j$(/usr/bin/nproc) + sudo make install + - name: build apcu + run: | + cd apcu + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) + - name: build imagick + run: | + cd imagick + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) + - name: build memcached + run: | + cd memcached + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) + - name: build redis + run: | + cd redis + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) + - name: build xdebug + run: | + cd xdebug + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) + - name: build yaml + run: | + cd yaml + /opt/php/bin/phpize + ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config + make -j$(/usr/bin/nproc) From 0cfc45b6673032f26dbeffe06b571c02637fb30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 8 Feb 2023 09:36:12 +0100 Subject: [PATCH 375/895] random: Use branchless implementation for mask generation in Randomizer::getBytesFromString() (#10522) * random: Add `max_offset` local to Randomizer::getBytesFromString() * random: Use branchless implementation for mask generation in Randomizer::getBytesFromString() This was benchmarked against clzl with a standalone script with random inputs and is slightly faster. clzl requires an additional branch to handle the source_length = 1 / max_offset = 0 case. * Improve comment for masking in Randomizer::getBytesFromString() --- ext/random/randomizer.c | 35 +++++-------- .../methods/getBytesFromString_fast_path.phpt | 50 +++++++++++++++++++ 2 files changed, 62 insertions(+), 23 deletions(-) diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 75d3e7fb6ddee..6248d97f5b1d6 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -388,6 +388,7 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) ZEND_PARSE_PARAMETERS_END(); const size_t source_length = ZSTR_LEN(source); + const size_t max_offset = source_length - 1; if (source_length < 1) { zend_argument_value_error(1, "cannot be empty"); @@ -401,9 +402,9 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) retval = zend_string_alloc(length, 0); - if (source_length > 0x100) { + if (max_offset > 0xff) { while (total_size < length) { - uint64_t offset = randomizer->algo->range(randomizer->status, 0, source_length - 1); + uint64_t offset = randomizer->algo->range(randomizer->status, 0, max_offset); if (EG(exception)) { zend_string_free(retval); @@ -413,26 +414,14 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) ZSTR_VAL(retval)[total_size++] = ZSTR_VAL(source)[offset]; } } else { - uint64_t mask; - if (source_length <= 0x1) { - mask = 0x0; - } else if (source_length <= 0x2) { - mask = 0x1; - } else if (source_length <= 0x4) { - mask = 0x3; - } else if (source_length <= 0x8) { - mask = 0x7; - } else if (source_length <= 0x10) { - mask = 0xF; - } else if (source_length <= 0x20) { - mask = 0x1F; - } else if (source_length <= 0x40) { - mask = 0x3F; - } else if (source_length <= 0x80) { - mask = 0x7F; - } else { - mask = 0xFF; - } + uint64_t mask = max_offset; + // Copy the top-most bit into all lower bits. + // Shifting by 4 is sufficient, because max_offset + // is guaranteed to fit in an 8-bit integer at this + // point. + mask |= mask >> 1; + mask |= mask >> 2; + mask |= mask >> 4; int failures = 0; while (total_size < length) { @@ -445,7 +434,7 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) for (size_t i = 0; i < randomizer->status->last_generated_size; i++) { uint64_t offset = (result >> (i * 8)) & mask; - if (offset >= source_length) { + if (offset > max_offset) { if (++failures > PHP_RANDOM_RANGE_ATTEMPTS) { zend_string_free(retval); zend_throw_error(random_ce_Random_BrokenRandomEngineError, "Failed to generate an acceptable random number in %d attempts", PHP_RANDOM_RANGE_ATTEMPTS); diff --git a/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt b/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt index fe8fcbeb3873a..84c8ec611db80 100644 --- a/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt +++ b/ext/random/tests/03_randomizer/methods/getBytesFromString_fast_path.phpt @@ -47,6 +47,32 @@ for ($i = 1; $i <= strlen($allBytes); $i *= 2) { echo PHP_EOL; } +// Test lengths that are one more than the powers of two. For these +// the maximum offset will be a power of two and thus a minimal number +// of bits will be set in the offset. +for ($i = 1; ($i + 1) <= strlen($allBytes); $i *= 2) { + $oneMore = $i + 1; + + echo "{$oneMore}:", PHP_EOL; + + $wrapper = new TestWrapperEngine($xoshiro); + $r = new Randomizer($wrapper); + $result = $r->getBytesFromString(substr($allBytes, 0, $oneMore), 20000); + + $count = []; + for ($j = 0; $j < strlen($result); $j++) { + $b = $result[$j]; + $count[ord($b)] ??= 0; + $count[ord($b)]++; + } + + // We expect that each possible value appears at least once, if + // not is is very likely that some bits were erroneously masked away. + var_dump(count($count)); + + echo PHP_EOL; +} + echo "Slow Path:", PHP_EOL; $wrapper = new TestWrapperEngine($xoshiro); @@ -107,6 +133,30 @@ int(128) int(2500) int(256) +2: +int(2) + +3: +int(3) + +5: +int(5) + +9: +int(9) + +17: +int(17) + +33: +int(33) + +65: +int(65) + +129: +int(129) + Slow Path: int(20000) int(256) From b7860cd56476d737fcf2e1fdda109b042312e3fa Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 6 Jan 2023 15:31:16 +0000 Subject: [PATCH 376/895] Implement More Appropriate Date/Time Exceptions RFC --- NEWS | 3 + ext/date/php_date.c | 292 +++++++++++++----- ext/date/php_date.stub.php | 66 +++- ext/date/php_date_arginfo.h | 155 +++++++++- ext/date/tests/68062.phpt | 4 +- .../DateInterval_construct_exceptions.phpt | 21 ++ ...eInterval_createFromDateString_broken.phpt | 12 + .../tests/DateInterval_serialize-003.phpt | 17 +- .../DateInterval_set_state_exception.phpt | 22 ++ ...DateInterval_uninitialised_exceptions.phpt | 30 ++ .../tests/DatePeriod_by_ref_iterator.phpt | 22 ++ .../DatePeriod_modify_readonly_property.phpt | 25 ++ ext/date/tests/DatePeriod_properties2.phpt | 30 +- .../tests/DatePeriod_set_state_exception.phpt | 65 ++++ .../DatePeriod_uninitialised_exceptions.phpt | 45 +++ .../tests/DatePeriod_wrong_arguments.phpt | 25 ++ ...utable_createFromInterface_exceptions.phpt | 37 +++ ...teTimeImmutable_createFromMutable-001.phpt | 4 +- ...teTimeImmutable_createFromMutable-002.phpt | 4 +- ...mmutable_createFromMutable_exceptions.phpt | 23 ++ ...teTimeImmutable_modify_invalid_format.phpt | 9 +- ...DateTimeImmutable_set_state_exception.phpt | 38 +++ ...imeImmutable_uninitialised_exceptions.phpt | 79 +++++ ext/date/tests/DateTimeZone_compare.phpt | 46 +++ .../tests/DateTimeZone_compare_basic1.phpt | 14 +- .../tests/DateTimeZone_construct_error.phpt | 12 +- .../tests/DateTimeZone_serialize_errors.phpt | 7 +- .../DateTimeZone_set_state_exception.phpt | 38 +++ ...DateTimeZone_uninitialised_exceptions.phpt | 58 ++++ ext/date/tests/DateTime_compare.phpt | 48 +++ ext/date/tests/DateTime_construct_error.phpt | 12 +- .../DateTime_createFromImmutable-001.phpt | 4 +- .../DateTime_createFromImmutable-002.phpt | 4 +- .../tests/DateTime_modify_invalid_format.phpt | 18 ++ .../tests/DateTime_set_state_exception.phpt | 40 +++ .../DateTime_uninitialised_exceptions.phpt | 91 ++++++ ext/date/tests/DateTime_wakeup_exception.phpt | 34 ++ ext/date/tests/bug-gh8471.phpt | 8 +- ext/date/tests/bug-gh9763.phpt | 14 +- ext/date/tests/bug36988.phpt | 4 +- ext/date/tests/bug44562.phpt | 4 +- ext/date/tests/bug45866.phpt | 9 +- ext/date/tests/bug48476.phpt | 12 +- .../{bug50055.phpt => bug50055-001.phpt} | 4 +- ext/date/tests/bug50055-002.phpt | 36 +++ ext/date/tests/bug52062.phpt | 16 +- ext/date/tests/bug52808.phpt | 12 +- ext/date/tests/bug67118.phpt | 2 +- ext/date/tests/bug70245.phpt | 4 +- ext/date/tests/bug70277.phpt | 8 +- ext/date/tests/bug73239.phpt | 2 +- ext/date/tests/bug75002.phpt | 2 +- ext/date/tests/bug78139.phpt | 14 +- .../tests/date_interval_bad_format_leak.phpt | 12 +- ...terval_create_from_date_string_broken.phpt | 2 +- ...val_create_from_date_string_nullparam.phpt | 2 +- .../date_interval_non_relative_warning.phpt | 28 +- .../tests/date_period_bad_iso_format.phpt | 12 +- ext/date/tests/date_period_set_state2.phpt | 6 +- ext/date/tests/date_period_unserialize2.phpt | 6 +- ext/date/tests/date_period_unserialize3.phpt | 6 +- ext/date/tests/mktime_error.phpt | 12 +- ext/date/tests/oo_001.phpt | 26 +- ...ne_identifiers_list_wrong_constructor.phpt | 8 +- ext/date/tests/timezone_open_warning.phpt | 23 ++ .../tests/dateformat_formatObject_error.phpt | 2 +- 66 files changed, 1489 insertions(+), 261 deletions(-) create mode 100644 ext/date/tests/DateInterval_construct_exceptions.phpt create mode 100644 ext/date/tests/DateInterval_createFromDateString_broken.phpt create mode 100644 ext/date/tests/DateInterval_set_state_exception.phpt create mode 100644 ext/date/tests/DateInterval_uninitialised_exceptions.phpt create mode 100644 ext/date/tests/DatePeriod_by_ref_iterator.phpt create mode 100644 ext/date/tests/DatePeriod_modify_readonly_property.phpt create mode 100644 ext/date/tests/DatePeriod_set_state_exception.phpt create mode 100644 ext/date/tests/DatePeriod_uninitialised_exceptions.phpt create mode 100644 ext/date/tests/DatePeriod_wrong_arguments.phpt create mode 100644 ext/date/tests/DateTimeImmutable_createFromInterface_exceptions.phpt create mode 100644 ext/date/tests/DateTimeImmutable_createFromMutable_exceptions.phpt create mode 100644 ext/date/tests/DateTimeImmutable_set_state_exception.phpt create mode 100644 ext/date/tests/DateTimeImmutable_uninitialised_exceptions.phpt create mode 100644 ext/date/tests/DateTimeZone_compare.phpt create mode 100644 ext/date/tests/DateTimeZone_set_state_exception.phpt create mode 100644 ext/date/tests/DateTimeZone_uninitialised_exceptions.phpt create mode 100644 ext/date/tests/DateTime_compare.phpt create mode 100644 ext/date/tests/DateTime_modify_invalid_format.phpt create mode 100644 ext/date/tests/DateTime_set_state_exception.phpt create mode 100644 ext/date/tests/DateTime_uninitialised_exceptions.phpt create mode 100644 ext/date/tests/DateTime_wakeup_exception.phpt rename ext/date/tests/{bug50055.phpt => bug50055-001.phpt} (88%) create mode 100644 ext/date/tests/bug50055-002.phpt create mode 100644 ext/date/tests/timezone_open_warning.phpt diff --git a/NEWS b/NEWS index ad42da6774b2a..eea4bfe68969c 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,9 @@ PHP NEWS (ilutov) . Fix bug GH-10083 (Allow comments between & and parameter). (ilutov) +- Date: + . Implement More Appropriate Date/Time Exceptions RFC. (Derick) + - Exif: . Removed unneeded codepaths in exif_process_TIFF_in_JPEG(). (nielsdos) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 22353d6a7541c..350111c124a36 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -269,6 +269,8 @@ PHP_INI_END() zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval, *date_ce_period; zend_class_entry *date_ce_immutable, *date_ce_interface; +zend_class_entry *date_ce_date_error, *date_ce_date_object_error, *date_ce_date_range_error; +zend_class_entry *date_ce_date_exception, *date_ce_date_invalid_timezone_exception, *date_ce_date_invalid_operation_exception, *date_ce_date_malformed_string_exception, *date_ce_date_malformed_interval_string_exception, *date_ce_date_malformed_period_string_exception; PHPAPI zend_class_entry *php_date_get_date_ce(void) @@ -307,9 +309,25 @@ static zend_object_handlers date_object_handlers_timezone; static zend_object_handlers date_object_handlers_interval; static zend_object_handlers date_object_handlers_period; -#define DATE_CHECK_INITIALIZED(member, class_name) \ +static void date_throw_uninitialized_error(zend_class_entry *ce) +{ + if (ce->type == ZEND_INTERNAL_CLASS) { + zend_throw_error(date_ce_date_object_error, "Object of type %s has not been correctly initialized by calling parent::__construct() in its constructor", ZSTR_VAL(ce->name)); + } else { + zend_class_entry *ce_ptr = ce; + while (ce_ptr && ce_ptr->parent && ce_ptr->type == ZEND_USER_CLASS) { + ce_ptr = ce_ptr->parent; + } + if (ce_ptr->type != ZEND_INTERNAL_CLASS) { + zend_throw_error(date_ce_date_object_error, "Object of type %s not been correctly initialized by calling parent::__construct() in its constructor", ZSTR_VAL(ce->name)); + } + zend_throw_error(date_ce_date_object_error, "Object of type %s (inheriting %s) has not been correctly initialized by calling parent::__construct() in its constructor", ZSTR_VAL(ce->name), ZSTR_VAL(ce_ptr->name)); + } +} + +#define DATE_CHECK_INITIALIZED(member, ce) \ if (!(member)) { \ - zend_throw_error(NULL, "The " #class_name " object has not been correctly initialized by its constructor"); \ + date_throw_uninitialized_error(ce); \ RETURN_THROWS(); \ } @@ -561,7 +579,7 @@ PHPAPI timelib_tzinfo *get_timezone_info(void) tz = guess_timezone(DATE_TIMEZONEDB); tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB); if (! tzi) { - zend_throw_error(NULL, "Timezone database is corrupt. Please file a bug report as this should never happen"); + zend_throw_error(date_ce_date_error, "Timezone database is corrupt. Please file a bug report as this should never happen"); } return tzi; } @@ -1623,7 +1641,7 @@ static void date_period_it_rewind(zend_object_iterator *iter) timelib_time_dtor(iterator->object->current); } if (!iterator->object->start) { - zend_throw_error(NULL, "DatePeriod has not been initialized correctly"); + date_throw_uninitialized_error(date_ce_period); return; } @@ -1779,6 +1797,17 @@ static void date_register_classes(void) /* {{{ */ date_object_handlers_period.get_property_ptr_ptr = date_period_get_property_ptr_ptr; date_object_handlers_period.read_property = date_period_read_property; date_object_handlers_period.write_property = date_period_write_property; + + date_ce_date_error = register_class_DateError(zend_ce_error); + date_ce_date_object_error = register_class_DateObjectError(date_ce_date_error); + date_ce_date_range_error = register_class_DateRangeError(date_ce_date_error); + + date_ce_date_exception = register_class_DateException(zend_ce_exception); + date_ce_date_invalid_timezone_exception = register_class_DateInvalidTimeZoneException(date_ce_date_exception); + date_ce_date_invalid_operation_exception = register_class_DateInvalidOperationException(date_ce_date_exception); + date_ce_date_malformed_string_exception = register_class_DateMalformedStringException(date_ce_date_exception); + date_ce_date_malformed_interval_string_exception = register_class_DateMalformedIntervalStringException(date_ce_date_exception); + date_ce_date_malformed_period_string_exception = register_class_DateMalformedPeriodStringException(date_ce_date_exception); } /* }}} */ static zend_object *date_object_new_date(zend_class_entry *class_type) /* {{{ */ @@ -1830,7 +1859,7 @@ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */ o2 = Z_PHPDATE_P(d2); if (!o1->time || !o2->time) { - php_error_docref(NULL, E_WARNING, "Trying to compare an incomplete DateTime or DateTimeImmutable object"); + zend_throw_error(date_ce_date_object_error, "Trying to compare an incomplete DateTime or DateTimeImmutable object"); return ZEND_UNCOMPARABLE; } if (!o1->time->sse_uptodate) { @@ -1970,12 +1999,12 @@ static int date_object_compare_timezone(zval *tz1, zval *tz2) /* {{{ */ o2 = Z_PHPTIMEZONE_P(tz2); if (!o1->initialized || !o2->initialized) { - zend_throw_error(NULL, "Trying to compare uninitialized DateTimeZone objects"); + zend_throw_error(date_ce_date_object_error, "Trying to compare uninitialized DateTimeZone objects"); return 1; } if (o1->type != o2->type) { - php_error_docref(NULL, E_WARNING, "Trying to compare different kinds of DateTimeZone objects"); + zend_throw_error(date_ce_date_exception, "Cannot compare two different kinds of DateTimeZone objects"); return ZEND_UNCOMPARABLE; } @@ -2349,8 +2378,8 @@ PHPAPI bool php_date_initialize(php_date_obj *dateobj, const char *time_str, siz /* If called from a constructor throw an exception */ if ((flags & PHP_DATE_INIT_CTOR) && err && err->error_count) { /* spit out the first library error message, at least */ - zend_throw_exception_ex(NULL, 0, "Failed to parse time string (%s) at position %d (%c): %s", time_str, - err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message); + zend_throw_exception_ex(date_ce_date_malformed_string_exception, 0, "Failed to parse time string (%s) at position %d (%c): %s", time_str, + err->error_messages[0].position, err->error_messages[0].character ? err->error_messages[0].character : ' ', err->error_messages[0].message); } if (err && err->error_count) { timelib_time_dtor(dateobj->time); @@ -2560,7 +2589,7 @@ PHP_METHOD(DateTime, createFromImmutable) ZEND_PARSE_PARAMETERS_END(); old_obj = Z_PHPDATE_P(datetimeimmutable_object); - DATE_CHECK_INITIALIZED(old_obj->time, DateTimeImmutable); + DATE_CHECK_INITIALIZED(old_obj->time, Z_OBJCE_P(datetimeimmutable_object)); php_date_instantiate(execute_data->This.value.ce ? execute_data->This.value.ce : date_ce_date, return_value); new_obj = Z_PHPDATE_P(return_value); @@ -2581,7 +2610,7 @@ PHP_METHOD(DateTime, createFromInterface) ZEND_PARSE_PARAMETERS_END(); old_obj = Z_PHPDATE_P(datetimeinterface_object); - DATE_CHECK_INITIALIZED(old_obj->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(old_obj->time, Z_OBJCE_P(datetimeinterface_object)); php_date_instantiate(execute_data->This.value.ce ? execute_data->This.value.ce : date_ce_date, return_value); new_obj = Z_PHPDATE_P(return_value); @@ -2602,7 +2631,7 @@ PHP_METHOD(DateTimeImmutable, createFromMutable) ZEND_PARSE_PARAMETERS_END(); old_obj = Z_PHPDATE_P(datetime_object); - DATE_CHECK_INITIALIZED(old_obj->time, DateTime); + DATE_CHECK_INITIALIZED(old_obj->time, Z_OBJCE_P(datetime_object)); php_date_instantiate(execute_data->This.value.ce ? execute_data->This.value.ce : date_ce_immutable, return_value); new_obj = Z_PHPDATE_P(return_value); @@ -2623,7 +2652,7 @@ PHP_METHOD(DateTimeImmutable, createFromInterface) ZEND_PARSE_PARAMETERS_END(); old_obj = Z_PHPDATE_P(datetimeinterface_object); - DATE_CHECK_INITIALIZED(old_obj->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(old_obj->time, Z_OBJCE_P(datetimeinterface_object)); php_date_instantiate(execute_data->This.value.ce ? execute_data->This.value.ce : date_ce_immutable, return_value); new_obj = Z_PHPDATE_P(return_value); @@ -2741,7 +2770,7 @@ PHP_METHOD(DateTime, __serialize) ZEND_PARSE_PARAMETERS_NONE(); dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); array_init(return_value); myht = Z_ARRVAL_P(return_value); @@ -2761,7 +2790,7 @@ PHP_METHOD(DateTimeImmutable, __serialize) ZEND_PARSE_PARAMETERS_NONE(); dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTimeImmutable); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); array_init(return_value); myht = Z_ARRVAL_P(return_value); @@ -3034,7 +3063,7 @@ PHP_FUNCTION(date_format) RETURN_THROWS(); } dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); RETURN_STR(date_format(format, format_len, dateobj->time, dateobj->time->is_localtime)); } /* }}} */ @@ -3048,7 +3077,7 @@ static bool php_date_modify(zval *object, char *modify, size_t modify_len) /* {{ dateobj = Z_PHPDATE_P(object); if (!(dateobj->time)) { - zend_throw_error(NULL, "The DateTime object has not been correctly initialized by its constructor"); + date_throw_uninitialized_error(Z_OBJCE_P(object)); return 0; } @@ -3060,7 +3089,9 @@ static bool php_date_modify(zval *object, char *modify, size_t modify_len) /* {{ if (err && err->error_count) { /* spit out the first library error message, at least */ php_error_docref(NULL, E_WARNING, "Failed to parse time string (%s) at position %d (%c): %s", modify, - err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message); + err->error_messages[0].position, + err->error_messages[0].character ? err->error_messages[0].character : ' ', + err->error_messages[0].message); timelib_time_dtor(tmp_time); return 0; } @@ -3131,12 +3162,38 @@ PHP_FUNCTION(date_modify) } /* }}} */ +/* {{{ */ +PHP_METHOD(DateTime, modify) +{ + zval *object; + char *modify; + size_t modify_len; + zend_error_handling zeh; + + object = ZEND_THIS; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &modify, &modify_len) == FAILURE) { + RETURN_THROWS(); + } + + zend_replace_error_handling(EH_THROW, date_ce_date_malformed_string_exception, &zeh); + if (!php_date_modify(object, modify, modify_len)) { + zend_restore_error_handling(&zeh); + RETURN_THROWS(); + } + + zend_restore_error_handling(&zeh); + + RETURN_OBJ_COPY(Z_OBJ_P(object)); +} +/* }}} */ + /* {{{ */ PHP_METHOD(DateTimeImmutable, modify) { zval *object, new_object; char *modify; size_t modify_len; + zend_error_handling zeh; object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &modify, &modify_len) == FAILURE) { @@ -3144,11 +3201,16 @@ PHP_METHOD(DateTimeImmutable, modify) } date_clone_immutable(object, &new_object); + + zend_replace_error_handling(EH_THROW, date_ce_date_malformed_string_exception, &zeh); if (!php_date_modify(&new_object, modify, modify_len)) { zval_ptr_dtor(&new_object); - RETURN_FALSE; + zend_restore_error_handling(&zeh); + RETURN_THROWS(); } + zend_restore_error_handling(&zeh); + RETURN_OBJ(Z_OBJ(new_object)); } /* }}} */ @@ -3160,9 +3222,9 @@ static void php_date_add(zval *object, zval *interval, zval *return_value) /* {{ timelib_time *new_time; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); intobj = Z_PHPINTERVAL_P(interval); - DATE_CHECK_INITIALIZED(intobj->initialized, DateInterval); + DATE_CHECK_INITIALIZED(intobj->initialized, Z_OBJCE_P(interval)); if (intobj->civil_or_wall == PHP_DATE_WALL) { new_time = timelib_add_wall(dateobj->time, intobj->diff); @@ -3212,9 +3274,9 @@ static void php_date_sub(zval *object, zval *interval, zval *return_value) /* {{ timelib_time *new_time; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); intobj = Z_PHPINTERVAL_P(interval); - DATE_CHECK_INITIALIZED(intobj->initialized, DateInterval); + DATE_CHECK_INITIALIZED(intobj->initialized, Z_OBJCE_P(interval)); if (intobj->diff->have_weekday_relative || intobj->diff->have_special_relative) { php_error_docref(NULL, E_WARNING, "Only non-special relative time specifications are supported for subtraction"); @@ -3240,6 +3302,23 @@ PHP_FUNCTION(date_sub) } php_date_sub(object, interval, return_value); + RETURN_OBJ_COPY(Z_OBJ_P(object)); +} +/* }}} */ + +/* {{{ Subtracts an interval to the current date in object. */ +PHP_METHOD(DateTime, sub) +{ + zval *object, *interval; + zend_error_handling zeh; + + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &object, date_ce_date, &interval, date_ce_interval) == FAILURE) { + RETURN_THROWS(); + } + + zend_replace_error_handling(EH_THROW, date_ce_date_invalid_operation_exception, &zeh); + php_date_sub(object, interval, return_value); + zend_restore_error_handling(&zeh); RETURN_OBJ_COPY(Z_OBJ_P(object)); } @@ -3249,6 +3328,7 @@ PHP_FUNCTION(date_sub) PHP_METHOD(DateTimeImmutable, sub) { zval *object, *interval, new_object; + zend_error_handling zeh; object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &interval, date_ce_interval) == FAILURE) { @@ -3256,7 +3336,10 @@ PHP_METHOD(DateTimeImmutable, sub) } date_clone_immutable(object, &new_object); + + zend_replace_error_handling(EH_THROW, date_ce_date_invalid_operation_exception, &zeh); php_date_sub(&new_object, interval, return_value); + zend_restore_error_handling(&zeh); RETURN_OBJ(Z_OBJ(new_object)); } @@ -3299,7 +3382,7 @@ PHP_FUNCTION(date_timezone_get) RETURN_THROWS(); } dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); if (dateobj->time->is_localtime) { php_timezone_obj *tzobj; php_date_instantiate(date_ce_timezone, return_value); @@ -3317,7 +3400,7 @@ static void php_date_timezone_set(zval *object, zval *timezone_object, zval *ret php_timezone_obj *tzobj; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); tzobj = Z_PHPTIMEZONE_P(timezone_object); switch (tzobj->type) { @@ -3379,7 +3462,7 @@ PHP_FUNCTION(date_offset_get) RETURN_THROWS(); } dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); if (dateobj->time->is_localtime) { switch (dateobj->time->zone_type) { case TIMELIB_ZONETYPE_ID: @@ -3406,7 +3489,7 @@ static void php_date_time_set(zval *object, zend_long h, zend_long i, zend_long php_date_obj *dateobj; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); dateobj->time->h = h; dateobj->time->i = i; dateobj->time->s = s; @@ -3454,7 +3537,7 @@ static void php_date_date_set(zval *object, zend_long y, zend_long m, zend_long php_date_obj *dateobj; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); dateobj->time->y = y; dateobj->time->m = m; dateobj->time->d = d; @@ -3500,7 +3583,7 @@ static void php_date_isodate_set(zval *object, zend_long y, zend_long w, zend_lo php_date_obj *dateobj; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); dateobj->time->y = y; dateobj->time->m = 1; dateobj->time->d = 1; @@ -3550,7 +3633,7 @@ static void php_date_timestamp_set(zval *object, zend_long timestamp, zval *retu php_date_obj *dateobj; dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); timelib_unixtime2local(dateobj->time, (timelib_sll)timestamp); timelib_update_ts(dateobj->time, NULL); php_date_set_time_fraction(dateobj->time, 0); @@ -3602,7 +3685,7 @@ PHP_FUNCTION(date_timestamp_get) RETURN_THROWS(); } dateobj = Z_PHPDATE_P(object); - DATE_CHECK_INITIALIZED(dateobj->time, DateTime); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(object)); if (!dateobj->time->sse_uptodate) { timelib_update_ts(dateobj->time, NULL); @@ -3611,7 +3694,7 @@ PHP_FUNCTION(date_timestamp_get) timestamp = timelib_date_to_int(dateobj->time, &epoch_does_not_fit_in_zend_long); if (epoch_does_not_fit_in_zend_long) { - zend_value_error("Epoch doesn't fit in a PHP integer"); + zend_throw_error(date_ce_date_range_error, "Epoch doesn't fit in a PHP integer"); RETURN_THROWS(); } @@ -3632,8 +3715,8 @@ PHP_FUNCTION(date_diff) } dateobj1 = Z_PHPDATE_P(object1); dateobj2 = Z_PHPDATE_P(object2); - DATE_CHECK_INITIALIZED(dateobj1->time, DateTimeInterface); - DATE_CHECK_INITIALIZED(dateobj2->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(dateobj1->time, Z_OBJCE_P(object1)); + DATE_CHECK_INITIALIZED(dateobj2->time, Z_OBJCE_P(object2)); php_date_instantiate(date_ce_interval, return_value); interval = Z_PHPINTERVAL_P(return_value); @@ -3646,34 +3729,42 @@ PHP_FUNCTION(date_diff) } /* }}} */ -static bool timezone_initialize(php_timezone_obj *tzobj, const char *tz, size_t tz_len) /* {{{ */ +static bool timezone_initialize(php_timezone_obj *tzobj, const char *tz, size_t tz_len, char **warning_message) /* {{{ */ { timelib_time *dummy_t = ecalloc(1, sizeof(timelib_time)); int dst, not_found; const char *orig_tz = tz; if (strlen(tz) != tz_len) { - php_error_docref(NULL, E_WARNING, "Timezone must not contain null bytes"); + if (warning_message) { + spprintf(warning_message, 0, "Timezone must not contain null bytes"); + } efree(dummy_t); return false; } dummy_t->z = timelib_parse_zone(&tz, &dst, dummy_t, ¬_found, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); if ((dummy_t->z >= (100 * 60 * 60)) || (dummy_t->z <= (-100 * 60 * 60))) { - php_error_docref(NULL, E_WARNING, "Timezone offset is out of range (%s)", orig_tz); + if (warning_message) { + spprintf(warning_message, 0, "Timezone offset is out of range (%s)", orig_tz); + } timelib_free(dummy_t->tz_abbr); efree(dummy_t); - return FAILURE; + return false; } dummy_t->dst = dst; if (!not_found && (*tz != '\0')) { - php_error_docref(NULL, E_WARNING, "Unknown or bad timezone (%s)", orig_tz); + if (warning_message) { + spprintf(warning_message, 0, "Unknown or bad timezone (%s)", orig_tz); + } timelib_free(dummy_t->tz_abbr); efree(dummy_t); return false; } if (not_found) { - php_error_docref(NULL, E_WARNING, "Unknown or bad timezone (%s)", orig_tz); + if (warning_message) { + spprintf(warning_message, 0, "Unknown or bad timezone (%s)", orig_tz); + } efree(dummy_t); return false; } else { @@ -3689,13 +3780,16 @@ PHP_FUNCTION(timezone_open) { zend_string *tz; php_timezone_obj *tzobj; + char *warning_message; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_PATH_STR(tz) /* To prevent null bytes */ ZEND_PARSE_PARAMETERS_END(); tzobj = Z_PHPTIMEZONE_P(php_date_instantiate(date_ce_timezone, return_value)); - if (!timezone_initialize(tzobj, ZSTR_VAL(tz), ZSTR_LEN(tz))) { + if (!timezone_initialize(tzobj, ZSTR_VAL(tz), ZSTR_LEN(tz), &warning_message)) { + php_error_docref(NULL, E_WARNING, "%s", warning_message); + efree(warning_message); zval_ptr_dtor(return_value); RETURN_FALSE; } @@ -3707,16 +3801,17 @@ PHP_METHOD(DateTimeZone, __construct) { zend_string *tz; php_timezone_obj *tzobj; - zend_error_handling error_handling; + char *exception_message; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_PATH_STR(tz) /* To prevent null bytes */ ZEND_PARSE_PARAMETERS_END(); - zend_replace_error_handling(EH_THROW, NULL, &error_handling); tzobj = Z_PHPTIMEZONE_P(ZEND_THIS); - timezone_initialize(tzobj, ZSTR_VAL(tz), ZSTR_LEN(tz)); - zend_restore_error_handling(&error_handling); + if (!timezone_initialize(tzobj, ZSTR_VAL(tz), ZSTR_LEN(tz), &exception_message)) { + zend_throw_exception_ex(date_ce_date_invalid_timezone_exception, 0, "DateTimeZone::__construct(): %s", exception_message); + efree(exception_message); + } } /* }}} */ @@ -3737,10 +3832,13 @@ static bool php_date_timezone_initialize_from_hash(zval **return_value, php_time if (Z_TYPE_P(z_timezone_type) != IS_LONG) { return false; } + if (Z_LVAL_P(z_timezone_type) < TIMELIB_ZONETYPE_OFFSET || Z_LVAL_P(z_timezone_type) > TIMELIB_ZONETYPE_ID) { + return false; + } if (Z_TYPE_P(z_timezone) != IS_STRING) { return false; } - return timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone), Z_STRLEN_P(z_timezone)); + return timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone), Z_STRLEN_P(z_timezone), NULL); } /* }}} */ /* {{{ */ @@ -3759,8 +3857,7 @@ PHP_METHOD(DateTimeZone, __set_state) php_date_instantiate(date_ce_timezone, return_value); tzobj = Z_PHPTIMEZONE_P(return_value); if (!php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht)) { - zend_throw_error(NULL, "Timezone initialization failed"); - zval_ptr_dtor(return_value); + zend_throw_error(NULL, "Invalid serialization data for DateTimeZone object"); } } /* }}} */ @@ -3779,7 +3876,7 @@ PHP_METHOD(DateTimeZone, __wakeup) myht = Z_OBJPROP_P(object); if (!php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht)) { - zend_throw_error(NULL, "Timezone initialization failed"); + zend_throw_error(NULL, "Invalid serialization data for DateTimeZone object"); } } /* }}} */ @@ -3794,7 +3891,7 @@ PHP_METHOD(DateTimeZone, __serialize) ZEND_PARSE_PARAMETERS_NONE(); tzobj = Z_PHPTIMEZONE_P(object); - DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone); + DATE_CHECK_INITIALIZED(tzobj->initialized, Z_OBJCE_P(object)); array_init(return_value); myht = Z_ARRVAL_P(return_value); @@ -3861,7 +3958,7 @@ PHP_FUNCTION(timezone_name_get) RETURN_THROWS(); } tzobj = Z_PHPTIMEZONE_P(object); - DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone); + DATE_CHECK_INITIALIZED(tzobj->initialized, Z_OBJCE_P(object)); php_timezone_to_string(tzobj, return_value); } /* }}} */ @@ -3903,9 +4000,9 @@ PHP_FUNCTION(timezone_offset_get) RETURN_THROWS(); } tzobj = Z_PHPTIMEZONE_P(object); - DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone); + DATE_CHECK_INITIALIZED(tzobj->initialized, Z_OBJCE_P(object)); dateobj = Z_PHPDATE_P(dateobject); - DATE_CHECK_INITIALIZED(dateobj->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(dateobj->time, Z_OBJCE_P(dateobject)); switch (tzobj->type) { case TIMELIB_ZONETYPE_ID: @@ -3936,7 +4033,7 @@ PHP_FUNCTION(timezone_transitions_get) RETURN_THROWS(); } tzobj = Z_PHPTIMEZONE_P(object); - DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone); + DATE_CHECK_INITIALIZED(tzobj->initialized, Z_OBJCE_P(object)); if (tzobj->type != TIMELIB_ZONETYPE_ID) { RETURN_FALSE; } @@ -4069,7 +4166,7 @@ PHP_FUNCTION(timezone_location_get) RETURN_THROWS(); } tzobj = Z_PHPTIMEZONE_P(object); - DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone); + DATE_CHECK_INITIALIZED(tzobj->initialized, Z_OBJCE_P(object)); if (tzobj->type != TIMELIB_ZONETYPE_ID) { RETURN_FALSE; } @@ -4093,23 +4190,23 @@ static bool date_interval_initialize(timelib_rel_time **rt, /*const*/ char *form timelib_strtointerval(format, format_length, &b, &e, &p, &r, &errors); if (errors->error_count > 0) { - zend_throw_exception_ex(NULL, 0, "Unknown or bad format (%s)", format); + zend_throw_exception_ex(date_ce_date_malformed_interval_string_exception, 0, "Unknown or bad format (%s)", format); retval = false; if (p) { timelib_rel_time_dtor(p); } } else { - if(p) { + if (p) { *rt = p; retval = true; } else { - if(b && e) { + if (b && e) { timelib_update_ts(b, NULL); timelib_update_ts(e, NULL); *rt = timelib_diff(b, e); retval = true; } else { - zend_throw_exception_ex(NULL, 0, "Failed to parse interval (%s)", format); + zend_throw_exception_ex(date_ce_date_malformed_interval_string_exception, 0, "Failed to parse interval (%s)", format); retval = false; } } @@ -4281,8 +4378,7 @@ static void php_date_interval_initialize_from_hash(zval **return_value, php_inte time = timelib_strtotime(Z_STRVAL_P(date_str), Z_STRLEN_P(date_str), &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); if (err->error_count > 0) { - php_error_docref(NULL, - E_WARNING, + zend_throw_error(NULL, "Unknown or bad format (%s) at position %d (%c) while unserializing: %s", Z_STRVAL_P(date_str), err->error_messages[0].position, @@ -4413,7 +4509,7 @@ PHP_METHOD(DateInterval, __serialize) ZEND_PARSE_PARAMETERS_NONE(); intervalobj = Z_PHPINTERVAL_P(object); - DATE_CHECK_INITIALIZED(intervalobj->initialized, DateInterval); + DATE_CHECK_INITIALIZED(intervalobj->initialized, Z_OBJCE_P(object)); array_init(return_value); myht = Z_ARRVAL_P(return_value); @@ -4494,13 +4590,25 @@ PHP_METHOD(DateInterval, __wakeup) } /* }}} */ +static void date_interval_instantiate_from_time(zval *return_value, timelib_time *time, zend_string *time_str) +{ + php_interval_obj *diobj; + + php_date_instantiate(date_ce_interval, return_value); + diobj = Z_PHPINTERVAL_P(return_value); + diobj->diff = timelib_rel_time_clone(&time->relative); + diobj->initialized = 1; + diobj->civil_or_wall = PHP_DATE_CIVIL; + diobj->from_string = true; + diobj->date_string = zend_string_copy(time_str); +} + /* {{{ Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string */ PHP_FUNCTION(date_interval_create_from_date_string) { zend_string *time_str = NULL; timelib_time *time; timelib_error_container *err = NULL; - php_interval_obj *diobj; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(time_str) @@ -4521,13 +4629,39 @@ PHP_FUNCTION(date_interval_create_from_date_string) goto cleanup; } - php_date_instantiate(date_ce_interval, return_value); - diobj = Z_PHPINTERVAL_P(return_value); - diobj->diff = timelib_rel_time_clone(&time->relative); - diobj->initialized = 1; - diobj->civil_or_wall = PHP_DATE_CIVIL; - diobj->from_string = true; - diobj->date_string = zend_string_copy(time_str); + date_interval_instantiate_from_time(return_value, time, time_str); + +cleanup: + timelib_time_dtor(time); + timelib_error_container_dtor(err); +} +/* }}} */ + +/* {{{ Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string */ +PHP_METHOD(DateInterval, createFromDateString) +{ + zend_string *time_str = NULL; + timelib_time *time; + timelib_error_container *err = NULL; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_STR(time_str) + ZEND_PARSE_PARAMETERS_END(); + + time = timelib_strtotime(ZSTR_VAL(time_str), ZSTR_LEN(time_str), &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); + + if (err->error_count > 0) { + zend_throw_error(date_ce_date_malformed_interval_string_exception, "Unknown or bad format (%s) at position %d (%c): %s", ZSTR_VAL(time_str), + err->error_messages[0].position, err->error_messages[0].character ? err->error_messages[0].character : ' ', err->error_messages[0].message); + goto cleanup; + } + + if (time->have_date || time->have_time || time->have_zone) { + zend_throw_error(date_ce_date_malformed_interval_string_exception, "String '%s' contains non-relative elements", ZSTR_VAL(time_str)); + goto cleanup; + } + + date_interval_instantiate_from_time(return_value, time, time_str); cleanup: timelib_time_dtor(time); @@ -4617,7 +4751,7 @@ PHP_FUNCTION(date_interval_format) RETURN_THROWS(); } diobj = Z_PHPINTERVAL_P(object); - DATE_CHECK_INITIALIZED(diobj->initialized, DateInterval); + DATE_CHECK_INITIALIZED(diobj->initialized, Z_OBJCE_P(object)); RETURN_STR(date_interval_format(format, format_len, diobj->diff)); } @@ -4635,7 +4769,7 @@ static bool date_period_initialize(timelib_time **st, timelib_time **et, timelib if (errors->error_count > 0) { retval = false; - zend_throw_exception_ex(NULL, 0, "Unknown or bad format (%s)", format); + zend_throw_exception_ex(date_ce_date_malformed_period_string_exception, 0, "Unknown or bad format (%s)", format); if (b) { timelib_time_dtor(b); } @@ -4686,19 +4820,19 @@ PHP_METHOD(DatePeriod, __construct) if (dpobj->start == NULL) { zend_string *func = get_active_function_or_method_name(); - zend_throw_exception_ex(NULL, 0, "%s(): ISO interval must contain a start date, \"%s\" given", ZSTR_VAL(func), isostr); + zend_throw_exception_ex(date_ce_date_malformed_period_string_exception, 0, "%s(): ISO interval must contain a start date, \"%s\" given", ZSTR_VAL(func), isostr); zend_string_release(func); RETURN_THROWS(); } if (dpobj->interval == NULL) { zend_string *func = get_active_function_or_method_name(); - zend_throw_exception_ex(NULL, 0, "%s(): ISO interval must contain an interval, \"%s\" given", ZSTR_VAL(func), isostr); + zend_throw_exception_ex(date_ce_date_malformed_period_string_exception, 0, "%s(): ISO interval must contain an interval, \"%s\" given", ZSTR_VAL(func), isostr); zend_string_release(func); RETURN_THROWS(); } if (dpobj->end == NULL && recurrences == 0) { zend_string *func = get_active_function_or_method_name(); - zend_throw_exception_ex(NULL, 0, "%s(): ISO interval must contain an end date or a recurrence count, \"%s\" given", ZSTR_VAL(func), isostr); + zend_throw_exception_ex(date_ce_date_malformed_period_string_exception, 0, "%s(): ISO interval must contain an end date or a recurrence count, \"%s\" given", ZSTR_VAL(func), isostr); zend_string_release(func); RETURN_THROWS(); } @@ -4740,7 +4874,7 @@ PHP_METHOD(DatePeriod, __construct) if (dpobj->end == NULL && recurrences < 1) { zend_string *func = get_active_function_or_method_name(); - zend_throw_exception_ex(NULL, 0, "%s(): Recurrence count must be greater than 0", ZSTR_VAL(func)); + zend_throw_exception_ex(date_ce_date_malformed_period_string_exception, 0, "%s(): Recurrence count must be greater than 0", ZSTR_VAL(func)); zend_string_release(func); RETURN_THROWS(); } @@ -4767,7 +4901,7 @@ PHP_METHOD(DatePeriod, getStartDate) ZEND_PARSE_PARAMETERS_NONE(); dpobj = Z_PHPPERIOD_P(ZEND_THIS); - DATE_CHECK_INITIALIZED(dpobj->start, DatePeriod); + DATE_CHECK_INITIALIZED(dpobj->start, Z_OBJCE_P(ZEND_THIS)); php_date_instantiate(dpobj->start_ce, return_value); dateobj = Z_PHPDATE_P(return_value); @@ -4818,7 +4952,7 @@ PHP_METHOD(DatePeriod, getDateInterval) ZEND_PARSE_PARAMETERS_NONE(); dpobj = Z_PHPPERIOD_P(ZEND_THIS); - DATE_CHECK_INITIALIZED(dpobj->interval, DatePeriod); + DATE_CHECK_INITIALIZED(dpobj->interval, Z_OBJCE_P(ZEND_THIS)); php_date_instantiate(date_ce_interval, return_value); diobj = Z_PHPINTERVAL_P(return_value); @@ -5374,7 +5508,7 @@ PHP_METHOD(DatePeriod, __serialize) ZEND_PARSE_PARAMETERS_NONE(); period_obj = Z_PHPPERIOD_P(object); - DATE_CHECK_INITIALIZED(period_obj->start, DatePeriod); + DATE_CHECK_INITIALIZED(period_obj->start, Z_OBJCE_P(object)); array_init(return_value); myht = Z_ARRVAL_P(return_value); diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index 172ab6d8b1d22..0146704e42a0b 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -377,7 +377,6 @@ public function format(string $format): string {} /** * @tentative-return-type - * @alias date_modify */ public function modify(string $modifier): DateTime|false {} @@ -389,7 +388,6 @@ public function add(DateInterval $interval): DateTime {} /** * @tentative-return-type - * @alias date_sub */ public function sub(DateInterval $interval): DateTime {} @@ -668,7 +666,6 @@ public function __construct(string $duration) {} /** * @tentative-return-type - * @alias date_interval_create_from_date_string */ public static function createFromDateString(string $datetime): DateInterval|false {} @@ -749,3 +746,66 @@ public static function __set_state(array $array): DatePeriod {} public function getIterator(): Iterator {} } + +/** + * @strict-properties + */ +class DateError extends Error +{ +} + +/** + * @strict-properties + */ +class DateObjectError extends DateError +{ +} + +/** + * @strict-properties + */ +class DateRangeError extends DateRangeError +{ +} + +/** + * @strict-properties + */ +class DateException extends Exception +{ +} + +/** + * @strict-properties + */ +class DateInvalidTimeZoneException extends Exception +{ +} + +/** + * @strict-properties + */ +class DateInvalidOperationException extends DateException +{ +} + +/** + * @strict-properties + */ +class DateMalformedStringException extends DateException +{ +} + +/** + * @strict-properties + */ +class DateMalformedIntervalStringException extends DateException +{ +} + +/** + * @strict-properties + */ +class DateMalformedPeriodStringException extends DateException +{ +} diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index f7920da2ce4b5..a16b6467aeafb 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6949e2c795288f9615222b1fd496768ab20eb7c5 */ + * Stub hash: ce0bc9fd067a6598f66a65a9159674392e6cac4d */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0) @@ -549,6 +549,8 @@ ZEND_METHOD(DateTime, __wakeup); ZEND_METHOD(DateTime, __set_state); ZEND_METHOD(DateTime, createFromImmutable); ZEND_METHOD(DateTime, createFromInterface); +ZEND_METHOD(DateTime, modify); +ZEND_METHOD(DateTime, sub); ZEND_METHOD(DateTimeImmutable, __construct); ZEND_METHOD(DateTimeImmutable, __serialize); ZEND_METHOD(DateTimeImmutable, __unserialize); @@ -570,6 +572,7 @@ ZEND_METHOD(DateTimeZone, __unserialize); ZEND_METHOD(DateTimeZone, __wakeup); ZEND_METHOD(DateTimeZone, __set_state); ZEND_METHOD(DateInterval, __construct); +ZEND_METHOD(DateInterval, createFromDateString); ZEND_METHOD(DateInterval, __serialize); ZEND_METHOD(DateInterval, __unserialize); ZEND_METHOD(DateInterval, __wakeup); @@ -663,9 +666,9 @@ static const zend_function_entry class_DateTime_methods[] = { ZEND_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_class_DateTime_createFromFormat, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_class_DateTime_getLastErrors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME_MAPPING(format, date_format, arginfo_class_DateTime_format, ZEND_ACC_PUBLIC) - ZEND_ME_MAPPING(modify, date_modify, arginfo_class_DateTime_modify, ZEND_ACC_PUBLIC) + ZEND_ME(DateTime, modify, arginfo_class_DateTime_modify, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(add, date_add, arginfo_class_DateTime_add, ZEND_ACC_PUBLIC) - ZEND_ME_MAPPING(sub, date_sub, arginfo_class_DateTime_sub, ZEND_ACC_PUBLIC) + ZEND_ME(DateTime, sub, arginfo_class_DateTime_sub, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(getTimezone, date_timezone_get, arginfo_class_DateTime_getTimezone, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(setTimezone, date_timezone_set, arginfo_class_DateTime_setTimezone, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(getOffset, date_offset_get, arginfo_class_DateTime_getOffset, ZEND_ACC_PUBLIC) @@ -724,7 +727,7 @@ static const zend_function_entry class_DateTimeZone_methods[] = { static const zend_function_entry class_DateInterval_methods[] = { ZEND_ME(DateInterval, __construct, arginfo_class_DateInterval___construct, ZEND_ACC_PUBLIC) - ZEND_ME_MAPPING(createFromDateString, date_interval_create_from_date_string, arginfo_class_DateInterval_createFromDateString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(DateInterval, createFromDateString, arginfo_class_DateInterval_createFromDateString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME_MAPPING(format, date_interval_format, arginfo_class_DateInterval_format, ZEND_ACC_PUBLIC) ZEND_ME(DateInterval, __serialize, arginfo_class_DateInterval___serialize, ZEND_ACC_PUBLIC) ZEND_ME(DateInterval, __unserialize, arginfo_class_DateInterval___unserialize, ZEND_ACC_PUBLIC) @@ -748,6 +751,51 @@ static const zend_function_entry class_DatePeriod_methods[] = { ZEND_FE_END }; + +static const zend_function_entry class_DateError_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateObjectError_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateRangeError_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateException_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateInvalidTimeZoneException_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateInvalidOperationException_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateMalformedStringException_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateMalformedIntervalStringException_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DateMalformedPeriodStringException_methods[] = { + ZEND_FE_END +}; + static void register_php_date_symbols(int module_number) { REGISTER_STRING_CONSTANT("DATE_ATOM", DATE_FORMAT_RFC3339, CONST_PERSISTENT); @@ -1083,3 +1131,102 @@ static zend_class_entry *register_class_DatePeriod(zend_class_entry *class_entry return class_entry; } + +static zend_class_entry *register_class_DateError(zend_class_entry *class_entry_Error) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateError", class_DateError_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Error); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateObjectError(zend_class_entry *class_entry_DateError) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateObjectError", class_DateObjectError_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateError); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateRangeError(zend_class_entry *class_entry_DateRangeError) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateRangeError", class_DateRangeError_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateRangeError); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateException(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateException", class_DateException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateInvalidTimeZoneException(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateInvalidTimeZoneException", class_DateInvalidTimeZoneException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateInvalidOperationException(zend_class_entry *class_entry_DateException) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateInvalidOperationException", class_DateInvalidOperationException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateException); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateMalformedStringException(zend_class_entry *class_entry_DateException) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateMalformedStringException", class_DateMalformedStringException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateException); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateMalformedIntervalStringException(zend_class_entry *class_entry_DateException) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateMalformedIntervalStringException", class_DateMalformedIntervalStringException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateException); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +static zend_class_entry *register_class_DateMalformedPeriodStringException(zend_class_entry *class_entry_DateException) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DateMalformedPeriodStringException", class_DateMalformedPeriodStringException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DateException); + class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} diff --git a/ext/date/tests/68062.phpt b/ext/date/tests/68062.phpt index 66f7692cf4f30..15ec5fa81c1fc 100644 --- a/ext/date/tests/68062.phpt +++ b/ext/date/tests/68062.phpt @@ -10,9 +10,9 @@ echo $tz->getOffset($dt), "\n"; try { echo $tz->getOffset(1); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- 3600 -DateTimeZone::getOffset(): Argument #1 ($datetime) must be of type DateTimeInterface, int given +TypeError: DateTimeZone::getOffset(): Argument #1 ($datetime) must be of type DateTimeInterface, int given diff --git a/ext/date/tests/DateInterval_construct_exceptions.phpt b/ext/date/tests/DateInterval_construct_exceptions.phpt new file mode 100644 index 0000000000000..97df133adf088 --- /dev/null +++ b/ext/date/tests/DateInterval_construct_exceptions.phpt @@ -0,0 +1,21 @@ +--TEST-- +DateInterval constructor exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +check(fn() => new DateInterval("")); +check(fn() => new DateInterval("2007-05-11T15:30:00Z/")); +?> +--EXPECTF-- +DateMalformedIntervalStringException: Unknown or bad format () +DateMalformedIntervalStringException: Failed to parse interval (2007-05-11T15:30:00Z/) diff --git a/ext/date/tests/DateInterval_createFromDateString_broken.phpt b/ext/date/tests/DateInterval_createFromDateString_broken.phpt new file mode 100644 index 0000000000000..5b15fb154e8dc --- /dev/null +++ b/ext/date/tests/DateInterval_createFromDateString_broken.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test DateInterval::createFromDateString() function : nonsense data +--FILE-- +getMessage(), "\n"; +} +?> +--EXPECTF-- +DateMalformedIntervalStringException: Unknown or bad format (foobar) at position 0 (f): The timezone could not be found in the database diff --git a/ext/date/tests/DateInterval_serialize-003.phpt b/ext/date/tests/DateInterval_serialize-003.phpt index b338a9ae93adb..cc1d9a371bb02 100644 --- a/ext/date/tests/DateInterval_serialize-003.phpt +++ b/ext/date/tests/DateInterval_serialize-003.phpt @@ -32,7 +32,11 @@ var_dump($d); echo "\n\nUsed serialised interval:\n"; $now = new DateTimeImmutable("2022-04-22 16:25:11 BST"); var_dump($now->add($e)); -var_dump($now->sub($e)); +try { + var_dump($now->sub($e)); +} catch (DateInvalidOperationException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} ?> --EXPECTF-- Original object: @@ -84,13 +88,4 @@ object(DateTimeImmutable)#4 (3) { ["timezone"]=> string(3) "BST" } - -Warning: DateTimeImmutable::sub(): Only non-special relative time specifications are supported for subtraction in %s on line %d -object(DateTimeImmutable)#4 (3) { - ["date"]=> - string(26) "2022-04-22 16:25:11.000000" - ["timezone_type"]=> - int(2) - ["timezone"]=> - string(3) "BST" -} +DateInvalidOperationException: DateTimeImmutable::sub(): Only non-special relative time specifications are supported for subtraction diff --git a/ext/date/tests/DateInterval_set_state_exception.phpt b/ext/date/tests/DateInterval_set_state_exception.phpt new file mode 100644 index 0000000000000..3a3c6c980b5d2 --- /dev/null +++ b/ext/date/tests/DateInterval_set_state_exception.phpt @@ -0,0 +1,22 @@ +--TEST-- +DateInterval invalid serialization data with date_string +--FILE-- + $propertySet ] ); + echo "OK\n"; + } catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +OK +Error: Unknown or bad format (2023-01-16-foobar$*) at position 10 (-) while unserializing: Unexpected character diff --git a/ext/date/tests/DateInterval_uninitialised_exceptions.phpt b/ext/date/tests/DateInterval_uninitialised_exceptions.phpt new file mode 100644 index 0000000000000..7a7c296b7742d --- /dev/null +++ b/ext/date/tests/DateInterval_uninitialised_exceptions.phpt @@ -0,0 +1,30 @@ +--TEST-- +DateInterval uninitialised exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +$mdi = new MyDateInterval(); + +check(fn() => serialize($mdi)); +check(fn() => $mdi->format("Y-m-d")); +?> +--EXPECTF-- +DateObjectError: Object of type MyDateInterval (inheriting DateInterval) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateInterval (inheriting DateInterval) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DatePeriod_by_ref_iterator.phpt b/ext/date/tests/DatePeriod_by_ref_iterator.phpt new file mode 100644 index 0000000000000..07e7fce39b4c8 --- /dev/null +++ b/ext/date/tests/DatePeriod_by_ref_iterator.phpt @@ -0,0 +1,22 @@ +--TEST-- +DatePeriod by-ref iterator +--FILE-- + new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, +]; + +$d = DatePeriod::__set_state( $properties ); +try { + foreach( $d as &$item ) + { + echo $item->format(DateTime::ISO8601), "\n"; + } + echo "OK\n"; +} catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECT-- +Error: An iterator cannot be used with foreach by reference diff --git a/ext/date/tests/DatePeriod_modify_readonly_property.phpt b/ext/date/tests/DatePeriod_modify_readonly_property.phpt new file mode 100644 index 0000000000000..e57c72339d8fd --- /dev/null +++ b/ext/date/tests/DatePeriod_modify_readonly_property.phpt @@ -0,0 +1,25 @@ +--TEST-- +DatePeriod modify readonly property +--FILE-- +interval = "foo"; +} catch( \Error $e ) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +try { + $foo =& $dp->interval; +} catch( \Error $e ) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECTF-- +Error: Cannot modify readonly property DatePeriod::$interval +Error: Cannot modify readonly property DatePeriod::$interval diff --git a/ext/date/tests/DatePeriod_properties2.phpt b/ext/date/tests/DatePeriod_properties2.phpt index 376254698f9bb..1da4dcb9c2ff6 100644 --- a/ext/date/tests/DatePeriod_properties2.phpt +++ b/ext/date/tests/DatePeriod_properties2.phpt @@ -20,33 +20,33 @@ foreach ($properties as $property) { try { $period->$property = "new"; } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { $period->$property[] = "extra"; } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } try { $period->start->modify("+1 hour"); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -Cannot modify readonly property DatePeriod::$recurrences -Cannot modify readonly property DatePeriod::$recurrences -Cannot modify readonly property DatePeriod::$include_start_date -Cannot modify readonly property DatePeriod::$include_start_date -Cannot modify readonly property DatePeriod::$start -Cannot modify readonly property DatePeriod::$start -Cannot modify readonly property DatePeriod::$current -Cannot modify readonly property DatePeriod::$current -Cannot modify readonly property DatePeriod::$end -Cannot modify readonly property DatePeriod::$end -Cannot modify readonly property DatePeriod::$interval -Cannot modify readonly property DatePeriod::$interval +Error: Cannot modify readonly property DatePeriod::$recurrences +Error: Cannot modify readonly property DatePeriod::$recurrences +Error: Cannot modify readonly property DatePeriod::$include_start_date +Error: Cannot modify readonly property DatePeriod::$include_start_date +Error: Cannot modify readonly property DatePeriod::$start +Error: Cannot modify readonly property DatePeriod::$start +Error: Cannot modify readonly property DatePeriod::$current +Error: Cannot modify readonly property DatePeriod::$current +Error: Cannot modify readonly property DatePeriod::$end +Error: Cannot modify readonly property DatePeriod::$end +Error: Cannot modify readonly property DatePeriod::$interval +Error: Cannot modify readonly property DatePeriod::$interval diff --git a/ext/date/tests/DatePeriod_set_state_exception.phpt b/ext/date/tests/DatePeriod_set_state_exception.phpt new file mode 100644 index 0000000000000..07fd322ba2d7f --- /dev/null +++ b/ext/date/tests/DatePeriod_set_state_exception.phpt @@ -0,0 +1,65 @@ +--TEST-- +DatePeriod invalid serialization data +--FILE-- + new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => null, 'end' => null, 'current' => null, + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => false, 'include_end_date' => false, + ], + /* Error situations */ + [ + 'start' => "2023-01-13 12:29:30", 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => "2023-01-16 16:49:29", 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => "2023-01-15 00:00:00", + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => "tomorrow", 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => -1, 'include_start_date' => true, 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => "true", 'include_end_date' => true, + ], + [ + 'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \DateTimeImmutable("2023-01-15 00:00:00"), + 'interval' => DateInterval::createFromDateString("tomorrow"), 'recurrences' => 1, 'include_start_date' => true, 'include_end_date' => "true", + ], +]; + +foreach( $propertySets as $propertySet ) +{ + try { + $d = DatePeriod::__set_state( $propertySet ); + echo "OK\n"; + } catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +OK +OK +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object diff --git a/ext/date/tests/DatePeriod_uninitialised_exceptions.phpt b/ext/date/tests/DatePeriod_uninitialised_exceptions.phpt new file mode 100644 index 0000000000000..753bb0fa68c4a --- /dev/null +++ b/ext/date/tests/DatePeriod_uninitialised_exceptions.phpt @@ -0,0 +1,45 @@ +--TEST-- +DateTime uninitialised exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +$mdp = new MyDatePeriod(); + +check(fn() => serialize($mdp)); +check(fn() => $mdp->getStartDate()); +check(fn() => $mdp->getDateInterval()); + +check(function() use ($mdp) { + foreach($mdp as $foo) + { + } +}); + +/* Allowed to be empty */ +check(fn() => $mdp->getEndDate()); +check(fn() => $mdp->getRecurrences()); +?> +--EXPECTF-- +DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type DatePeriod has not been correctly initialized by calling parent::__construct() in its constructor +NULL +NULL diff --git a/ext/date/tests/DatePeriod_wrong_arguments.phpt b/ext/date/tests/DatePeriod_wrong_arguments.phpt new file mode 100644 index 0000000000000..0f33f5261a648 --- /dev/null +++ b/ext/date/tests/DatePeriod_wrong_arguments.phpt @@ -0,0 +1,25 @@ +--TEST-- +DatePeriod arguments/wrong arguments +--FILE-- +getMessage(), "\n"; +} +?> +--EXPECT-- +OK +OK +OK +TypeError: DatePeriod::__construct() accepts (DateTimeInterface, DateInterval, int [, int]), or (DateTimeInterface, DateInterval, DateTime [, int]), or (string [, int]) as arguments diff --git a/ext/date/tests/DateTimeImmutable_createFromInterface_exceptions.phpt b/ext/date/tests/DateTimeImmutable_createFromInterface_exceptions.phpt new file mode 100644 index 0000000000000..e3c2c4d33b735 --- /dev/null +++ b/ext/date/tests/DateTimeImmutable_createFromInterface_exceptions.phpt @@ -0,0 +1,37 @@ +--TEST-- +DateTimeImmutable::createFromInterface exception +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; +} + +$i = new MyDateTimeImmutable(); +try { + $m = DateTimeImmutable::createFromInterface( $i ); +} catch (\DateObjectError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECTF-- +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable-001.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable-001.phpt index 4f542c82c8009..a6ebaa82404b6 100644 --- a/ext/date/tests/DateTimeImmutable_createFromMutable-001.phpt +++ b/ext/date/tests/DateTimeImmutable_createFromMutable-001.phpt @@ -12,7 +12,7 @@ var_dump( $i ); try { DateTimeImmutable::createFromMutable( date_create_immutable( $current ) ); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECTF-- @@ -24,4 +24,4 @@ object(DateTimeImmutable)#%d (3) { ["timezone"]=> string(13) "Europe/London" } -DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, DateTimeImmutable given +TypeError: DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, DateTimeImmutable given diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable-002.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable-002.phpt index ccbbe33f1786c..78d87f1e898ce 100644 --- a/ext/date/tests/DateTimeImmutable_createFromMutable-002.phpt +++ b/ext/date/tests/DateTimeImmutable_createFromMutable-002.phpt @@ -14,7 +14,7 @@ var_dump( $i ); try { MyDateTimeImmutable::createFromMutable( date_create_immutable( $current ) ); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECTF-- @@ -26,4 +26,4 @@ object(MyDateTimeImmutable)#%d (3) { ["timezone"]=> string(13) "Europe/London" } -DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, DateTimeImmutable given +TypeError: DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, DateTimeImmutable given diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable_exceptions.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable_exceptions.phpt new file mode 100644 index 0000000000000..2d311ad138eb6 --- /dev/null +++ b/ext/date/tests/DateTimeImmutable_createFromMutable_exceptions.phpt @@ -0,0 +1,23 @@ +--TEST-- +DateTimeImmutable::createFromMutable exception +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; +} +?> +--EXPECTF-- +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DateTimeImmutable_modify_invalid_format.phpt b/ext/date/tests/DateTimeImmutable_modify_invalid_format.phpt index 3386f725acffa..8f4d5891da666 100644 --- a/ext/date/tests/DateTimeImmutable_modify_invalid_format.phpt +++ b/ext/date/tests/DateTimeImmutable_modify_invalid_format.phpt @@ -4,9 +4,12 @@ DateTimeImmutable::modify() with invalid format modify('')); +try { + var_dump($datetime->modify('')); +} catch (DateMalformedStringException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} ?> --EXPECTF-- -Warning: DateTimeImmutable::modify(): Failed to parse time string () at position 0 ( in %s on line %d -bool(false) +DateMalformedStringException: DateTimeImmutable::modify(): Failed to parse time string () at position 0 ( ): Empty string diff --git a/ext/date/tests/DateTimeImmutable_set_state_exception.phpt b/ext/date/tests/DateTimeImmutable_set_state_exception.phpt new file mode 100644 index 0000000000000..6f42c6a81fa2b --- /dev/null +++ b/ext/date/tests/DateTimeImmutable_set_state_exception.phpt @@ -0,0 +1,38 @@ +--TEST-- +DateTimeImmutable invalid serialization data +--FILE-- + "2023-01-13 12:29:30", 'timezone_type' => 1, 'timezone' => "+02:30" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], + [ 'date' => 2023.113, 'timezone_type' => 1, 'timezone' => "+02:30" ], + [ 'date' => 2023.113, 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1.4, 'timezone' => "+02:30" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3.4, 'timezone' => "Europe/Kyiv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1, 'timezone' => 2.5 ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => 2.5 ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => "Europe/Lviv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 4, 'timezone' => "Europe/Kyiv" ], +]; + +foreach( $propertySets as $propertySet ) +{ + try { + $d = DateTimeImmutable::__set_state( $propertySet ); + echo "OK\n"; + } catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +OK +OK +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object +Error: Invalid serialization data for DateTimeImmutable object diff --git a/ext/date/tests/DateTimeImmutable_uninitialised_exceptions.phpt b/ext/date/tests/DateTimeImmutable_uninitialised_exceptions.phpt new file mode 100644 index 0000000000000..38aed67b42c30 --- /dev/null +++ b/ext/date/tests/DateTimeImmutable_uninitialised_exceptions.phpt @@ -0,0 +1,79 @@ +--TEST-- +DateTime uninitialised exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +$mdti = new MyDateTimeImmutable(); +$dt = new DateTimeImmutable(); +$di = DateInterval::createFromDateString("tomorrow"); +$dtz = new DateTimeZone("Europe/Kyiv"); + +check(fn() => DateTimeImmutable::createFromInterface($mdti)); +check(fn() => DateTime::createFromImmutable($mdti)); +check(fn() => serialize($mdti)); +check(fn() => date_format($mdti, DateTime::ISO8601)); +check(fn() => $mdti->format(DateTime::ISO8601)); +check(fn() => $mdti->modify("+1 day")); +check(fn() => $mdti->add($di)); +check(fn() => $mdti->sub($di)); +check(fn() => date_timezone_get($mdti)); +check(fn() => $mdti->getTimeZone()); +check(fn() => $mdti->setTimeZone($dtz)); +check(fn() => date_offset_get($mdti)); +check(fn() => $mdti->getOffset()); +check(fn() => $mdti->setTime(17, 59, 53)); +check(fn() => $mdti->setDate(2023, 1, 16)); +check(fn() => $mdti->setISODate(2023, 3, 1)); +check(fn() => $mdti->setTimestamp(time())); +check(fn() => date_timestamp_get($mdti)); +check(fn() => $mdti->getTimestamp()); +check(fn() => date_diff($dt, $mdti)); +check(fn() => date_diff($mdti, $dt)); +check(fn() => date_diff($mdti, $mdti)); +check(fn() => $dt->diff($mdti)); +check(fn() => $mdti->diff($dt)); +check(fn() => $mdti->diff($mdti)); +?> +--EXPECTF-- +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DateTimeZone_compare.phpt b/ext/date/tests/DateTimeZone_compare.phpt new file mode 100644 index 0000000000000..c187be332cf56 --- /dev/null +++ b/ext/date/tests/DateTimeZone_compare.phpt @@ -0,0 +1,46 @@ +--TEST-- +DateTimeZone compare handler +--FILE-- +getMessage(), "\n"; +} + +try { + var_dump($dtzID < $mdtz); +} catch (\DateObjectError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +try { + var_dump($dtzID < $dtzAbbr); +} catch (\DateException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +try { + var_dump($dtzAbbr < $dtzUTC); +} catch (\DateException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECT-- +DateObjectError: Trying to compare uninitialized DateTimeZone objects +DateObjectError: Trying to compare uninitialized DateTimeZone objects +DateException: Cannot compare two different kinds of DateTimeZone objects +DateException: Cannot compare two different kinds of DateTimeZone objects diff --git a/ext/date/tests/DateTimeZone_compare_basic1.phpt b/ext/date/tests/DateTimeZone_compare_basic1.phpt index 27cd7e8208702..a45485a1a7b75 100644 --- a/ext/date/tests/DateTimeZone_compare_basic1.phpt +++ b/ext/date/tests/DateTimeZone_compare_basic1.phpt @@ -14,7 +14,11 @@ foreach ($timezones as [$timezone1, $timezone2]) { compare_timezones($timezone1, $timezone2); } -var_dump(new DateTimeZone('Europe/Berlin') == new DateTimeZone('CET')); +try { + var_dump(new DateTimeZone('Europe/Berlin') == new DateTimeZone('CET')); +} catch (DateException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} function compare_timezones($timezone1, $timezone2) { @@ -41,7 +45,7 @@ $tz2 = new MyDateTimeZone(); try { var_dump($tz1 == $tz2); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> @@ -70,7 +74,5 @@ compare Europe/Amsterdam with Europe/Berlin < bool(false) = bool(false) > bool(false) - -Warning: main(): Trying to compare different kinds of DateTimeZone objects in %s on line %d -bool(false) -Trying to compare uninitialized DateTimeZone objects +DateException: Cannot compare two different kinds of DateTimeZone objects +DateObjectError: Trying to compare uninitialized DateTimeZone objects diff --git a/ext/date/tests/DateTimeZone_construct_error.phpt b/ext/date/tests/DateTimeZone_construct_error.phpt index dd0b1bb70893e..6a48231c8dc96 100644 --- a/ext/date/tests/DateTimeZone_construct_error.phpt +++ b/ext/date/tests/DateTimeZone_construct_error.phpt @@ -1,9 +1,9 @@ --TEST-- -Test new DateTimeZone() : error conditions +Test new DateTimeZone(): Too few arguments --FILE-- getMessage(), "\n"; +} catch (ArgumentCountError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> @@ -21,4 +21,4 @@ try { *** Testing DateTimeZone() : error conditions *** -- Testing new DateTimeZone() with more than expected no. of arguments -- -DateTimeZone::__construct() expects exactly 1 argument, 2 given +ArgumentCountError: DateTimeZone::__construct() expects exactly 1 argument, 2 given diff --git a/ext/date/tests/DateTimeZone_serialize_errors.phpt b/ext/date/tests/DateTimeZone_serialize_errors.phpt index f89e3bfafcbf4..866624e5f520d 100644 --- a/ext/date/tests/DateTimeZone_serialize_errors.phpt +++ b/ext/date/tests/DateTimeZone_serialize_errors.phpt @@ -7,9 +7,8 @@ $serialized = 'O:12:"DateTimeZone":2:{s:13:"timezone_type";i:3;s:8:"timezone";s: try { $tz = unserialize($serialized); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> ---EXPECTF-- -Warning: DateTimeZone::__unserialize(): Timezone must not contain null bytes in %s on line %d -Invalid serialization data for DateTimeZone object +--EXPECT-- +Error: Invalid serialization data for DateTimeZone object diff --git a/ext/date/tests/DateTimeZone_set_state_exception.phpt b/ext/date/tests/DateTimeZone_set_state_exception.phpt new file mode 100644 index 0000000000000..68eb50a2fd6bd --- /dev/null +++ b/ext/date/tests/DateTimeZone_set_state_exception.phpt @@ -0,0 +1,38 @@ +--TEST-- +DateTimeZone invalid serialization data +--FILE-- + 1, 'timezone' => "+02:30" ], + [ 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], + [ 'timezone_type' => 1.4, 'timezone' => "+02:30" ], + [ 'timezone_type' => 3.4, 'timezone' => "Europe/Kyiv" ], + [ 'timezone_type' => 1, 'timezone' => 2.5 ], + [ 'timezone_type' => 3, 'timezone' => 2.5 ], + [ 'timezone_type' => 3, 'timezone' => "Europe/K\0v" ], + [ 'timezone_type' => 3, 'timezone' => "99:99:99" ], + [ 'timezone_type' => 3, 'timezone' => "Europe/Lviv" ], + [ 'timezone_type' => 4, 'timezone' => "Europe/Kyiv" ], +]; + +foreach( $propertySets as $propertySet ) +{ + try { + $d = DateTimeZone::__set_state( $propertySet ); + echo "OK\n"; + } catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +OK +OK +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object +Error: Invalid serialization data for DateTimeZone object diff --git a/ext/date/tests/DateTimeZone_uninitialised_exceptions.phpt b/ext/date/tests/DateTimeZone_uninitialised_exceptions.phpt new file mode 100644 index 0000000000000..ce036e306315c --- /dev/null +++ b/ext/date/tests/DateTimeZone_uninitialised_exceptions.phpt @@ -0,0 +1,58 @@ +--TEST-- +DateTime uninitialised exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +$mdt = new MyDateTime(); +$mdtz = new MyDateTimeZone(); +$dtz = new DateTimeZone("Europe/Kyiv"); +$dt = new DateTime("2023-01-16 18:18"); + +check(fn() => serialize($mdtz)); +check(fn() => timezone_name_get($mdtz)); +check(fn() => $mdtz->getName()); +check(fn() => timezone_offset_get($mdtz, $dt)); +check(fn() => $mdtz->getOffset($dt)); +check(fn() => timezone_offset_get($dtz, $mdt)); +check(fn() => $dtz->getOffset($mdt)); +check(fn() => timezone_transitions_get($mdtz, time())); +check(fn() => $mdtz->getTransitions(time())); +check(fn() => timezone_location_get($mdtz,)); +check(fn() => $mdtz->getLocation()); +?> +--EXPECTF-- +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DateTime_compare.phpt b/ext/date/tests/DateTime_compare.phpt new file mode 100644 index 0000000000000..9f712f121e433 --- /dev/null +++ b/ext/date/tests/DateTime_compare.phpt @@ -0,0 +1,48 @@ +--TEST-- +DateTime/DateTimeImmutable compare handler +--FILE-- +getMessage(), "\n"; +} + +try { + var_dump($MDT < $DT); +} catch (\DateObjectError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +try { + var_dump($DTI < $MDT); +} catch (\DateObjectError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +try { + var_dump($MDT < $DTI); +} catch (\DateObjectError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECT-- +bool(false) +DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object +DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object +DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object +DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object diff --git a/ext/date/tests/DateTime_construct_error.phpt b/ext/date/tests/DateTime_construct_error.phpt index 56ab1f3003ff5..e1a99ed7b3ddb 100644 --- a/ext/date/tests/DateTime_construct_error.phpt +++ b/ext/date/tests/DateTime_construct_error.phpt @@ -1,9 +1,9 @@ --TEST-- -Test new DateTime() : error conditions +Test new DateTime(): error conditions --FILE-- getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> @@ -22,4 +22,4 @@ try { *** Testing date_create() : error conditions *** -- Testing new DateTime() with more than expected no. of arguments -- -DateTime::__construct() expects at most 2 arguments, 3 given +ArgumentCountError: DateTime::__construct() expects at most 2 arguments, 3 given diff --git a/ext/date/tests/DateTime_createFromImmutable-001.phpt b/ext/date/tests/DateTime_createFromImmutable-001.phpt index 031c8764847a4..e29a5f32341a7 100644 --- a/ext/date/tests/DateTime_createFromImmutable-001.phpt +++ b/ext/date/tests/DateTime_createFromImmutable-001.phpt @@ -17,7 +17,7 @@ var_dump( $i->format('Y-m-d H:i:s') === $current ); try { DateTime::createFromImmutable( date_create( $current ) ); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECTF-- @@ -30,4 +30,4 @@ object(DateTime)#%d (3) { string(13) "Europe/London" } bool(true) -DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, DateTime given +TypeError: DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, DateTime given diff --git a/ext/date/tests/DateTime_createFromImmutable-002.phpt b/ext/date/tests/DateTime_createFromImmutable-002.phpt index 5b8c3a5a7cfe6..778e2a98af447 100644 --- a/ext/date/tests/DateTime_createFromImmutable-002.phpt +++ b/ext/date/tests/DateTime_createFromImmutable-002.phpt @@ -19,7 +19,7 @@ var_dump( $i->format('Y-m-d H:i:s') === $current ); try { MyDateTime::createFromImmutable( date_create( $current ) ); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECTF-- @@ -32,4 +32,4 @@ object(MyDateTime)#%d (3) { string(13) "Europe/London" } bool(true) -DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, DateTime given +TypeError: DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, DateTime given diff --git a/ext/date/tests/DateTime_modify_invalid_format.phpt b/ext/date/tests/DateTime_modify_invalid_format.phpt new file mode 100644 index 0000000000000..1e1a1721c4bca --- /dev/null +++ b/ext/date/tests/DateTime_modify_invalid_format.phpt @@ -0,0 +1,18 @@ +--TEST-- +DateTime::modify() with empty string as format +--FILE-- +modify('')); +} catch (DateMalformedStringException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +?> +--EXPECTF-- +Warning: date_modify(): Failed to parse time string () at position 0 ( ): Empty string in %s +bool(false) +DateMalformedStringException: DateTime::modify(): Failed to parse time string () at position 0 ( ): Empty string diff --git a/ext/date/tests/DateTime_set_state_exception.phpt b/ext/date/tests/DateTime_set_state_exception.phpt new file mode 100644 index 0000000000000..8b16ec7011b62 --- /dev/null +++ b/ext/date/tests/DateTime_set_state_exception.phpt @@ -0,0 +1,40 @@ +--TEST-- +DateTime invalid serialization data +--FILE-- + "2023-01-13 12:29:30", 'timezone_type' => 1, 'timezone' => "+02:30" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], + /* Error situations */ + [ 'date' => 2023.113, 'timezone_type' => 1, 'timezone' => "+02:30" ], + [ 'date' => 2023.113, 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1.4, 'timezone' => "+02:30" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3.4, 'timezone' => "Europe/Kyiv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1, 'timezone' => 2.5 ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => 2.5 ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3, 'timezone' => "Europe/Lviv" ], + [ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 4, 'timezone' => "Europe/Kyiv" ], +]; + +foreach( $propertySets as $propertySet ) +{ + try { + $d = DateTime::__set_state( $propertySet ); + echo "OK\n"; + } catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +OK +OK +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object diff --git a/ext/date/tests/DateTime_uninitialised_exceptions.phpt b/ext/date/tests/DateTime_uninitialised_exceptions.phpt new file mode 100644 index 0000000000000..1680fedb7e0bf --- /dev/null +++ b/ext/date/tests/DateTime_uninitialised_exceptions.phpt @@ -0,0 +1,91 @@ +--TEST-- +DateTime uninitialised exceptions +--INI-- +date.timezone=Europe/London +--FILE-- +getMessage(), "\n"; + } +} + +$mdt = new MyDateTime(); +$dt = new DateTime(); +$di = DateInterval::createFromDateString("tomorrow"); +$dtz = new DateTimeZone("Europe/Kyiv"); + +check(fn() => DateTime::createFromInterface($mdt)); +check(fn() => DateTimeImmutable::createFromMutable($mdt)); +check(fn() => serialize($mdt)); +check(fn() => date_format($mdt, DateTime::ISO8601)); +check(fn() => $mdt->format(DateTime::ISO8601)); +check(fn() => date_modify($mdt, "+1 day")); +check(fn() => $mdt->modify("+1 day")); +check(fn() => $mdt->add($di)); +check(fn() => $mdt->sub($di)); +check(fn() => date_timezone_get($mdt)); +check(fn() => $mdt->getTimeZone()); +check(fn() => date_timezone_set($mdt, $dtz)); +check(fn() => $mdt->setTimeZone($dtz)); +check(fn() => date_offset_get($mdt)); +check(fn() => $mdt->getOffset()); +check(fn() => date_time_set($mdt, 17, 59, 53)); +check(fn() => $mdt->setTime(17, 59, 53)); +check(fn() => date_date_set($mdt, 2023, 1, 16)); +check(fn() => $mdt->setDate(2023, 1, 16)); +check(fn() => date_isodate_set($mdt, 2023, 3, 1)); +check(fn() => $mdt->setISODate(2023, 3, 1)); +check(fn() => date_timestamp_set($mdt, time())); +check(fn() => $mdt->setTimestamp(time())); +check(fn() => date_timestamp_get($mdt)); +check(fn() => $mdt->getTimestamp()); +check(fn() => date_diff($dt, $mdt)); +check(fn() => date_diff($mdt, $dt)); +check(fn() => date_diff($mdt, $mdt)); +check(fn() => $dt->diff($mdt)); +check(fn() => $mdt->diff($dt)); +check(fn() => $mdt->diff($mdt)); +?> +--EXPECTF-- +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/DateTime_wakeup_exception.phpt b/ext/date/tests/DateTime_wakeup_exception.phpt new file mode 100644 index 0000000000000..dd51e52a9b1e3 --- /dev/null +++ b/ext/date/tests/DateTime_wakeup_exception.phpt @@ -0,0 +1,34 @@ +--TEST-- +DateTime invalid serialization data (wakeup) +--FILE-- +getMessage(), "\n"; + } +} +?> +--EXPECTF-- +OK? object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +Error: Invalid serialization data for DateTime object +OK? object + +Warning: unserialize(): Error at offset 109 of 122 bytes in %sDateTime_wakeup_exception.php on line 15 +OK? boolean diff --git a/ext/date/tests/bug-gh8471.phpt b/ext/date/tests/bug-gh8471.phpt index 6857551008e08..2f6656849f6c8 100644 --- a/ext/date/tests/bug-gh8471.phpt +++ b/ext/date/tests/bug-gh8471.phpt @@ -44,7 +44,7 @@ try { ?> --EXPECTF-- -The DateTime object has not been correctly initialized by its constructor -The DateTimeInterface object has not been correctly initialized by its constructor -The DateTimeImmutable object has not been correctly initialized by its constructor -The DateTimeInterface object has not been correctly initialized by its constructor +Object of type DateTime has not been correctly initialized by calling parent::__construct() in its constructor +Object of type DateTime has not been correctly initialized by calling parent::__construct() in its constructor +Object of type DateTimeImmutable has not been correctly initialized by calling parent::__construct() in its constructor +Object of type DateTimeImmutable has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/bug-gh9763.phpt b/ext/date/tests/bug-gh9763.phpt index dd7b0fb0e48e4..7166c7d27e823 100644 --- a/ext/date/tests/bug-gh9763.phpt +++ b/ext/date/tests/bug-gh9763.phpt @@ -11,18 +11,18 @@ foreach ( [ '+99:60', '+99:62', '-99:62', '-99:60', '+9960', '-9960', '+9959', ' $d = new DateTimeZone($test); echo $d->getName(), "\n"; } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } ?> --EXPECT-- -Testing +99:60: DateTimeZone::__construct(): Timezone offset is out of range (+99:60) -Testing +99:62: DateTimeZone::__construct(): Timezone offset is out of range (+99:62) -Testing -99:62: DateTimeZone::__construct(): Timezone offset is out of range (-99:62) -Testing -99:60: DateTimeZone::__construct(): Timezone offset is out of range (-99:60) -Testing +9960: DateTimeZone::__construct(): Timezone offset is out of range (+9960) -Testing -9960: DateTimeZone::__construct(): Timezone offset is out of range (-9960) +Testing +99:60: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (+99:60) +Testing +99:62: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (+99:62) +Testing -99:62: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (-99:62) +Testing -99:60: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (-99:60) +Testing +9960: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (+9960) +Testing -9960: DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (-9960) Testing +9959: +99:59 Testing -9959: -99:59 diff --git a/ext/date/tests/bug36988.phpt b/ext/date/tests/bug36988.phpt index 32359808517b1..4898ef68d0388 100644 --- a/ext/date/tests/bug36988.phpt +++ b/ext/date/tests/bug36988.phpt @@ -9,8 +9,8 @@ $start = microtime(true); try { $a = mktime(1, 1, 1, 1, 1, 11111111111); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -mktime(): Argument #6 ($year) must be of type ?int, float given +TypeError: mktime(): Argument #6 ($year) must be of type ?int, float given diff --git a/ext/date/tests/bug44562.phpt b/ext/date/tests/bug44562.phpt index 0448e95ec341a..2517207b367a4 100644 --- a/ext/date/tests/bug44562.phpt +++ b/ext/date/tests/bug44562.phpt @@ -7,7 +7,7 @@ date_default_timezone_set('Europe/Oslo'); try { $dp = new DatePeriod('2D'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } $begin = new DateTime( "2008-07-20T22:44:53+0200" ); @@ -21,7 +21,7 @@ foreach ( $dp as $d ) ?> --EXPECT-- -Unknown or bad format (2D) +DateMalformedPeriodStringException: Unknown or bad format (2D) string(24) "2008-07-20T22:44:53+0200" string(24) "2008-07-21T22:44:53+0200" string(24) "2008-07-22T22:44:53+0200" diff --git a/ext/date/tests/bug45866.phpt b/ext/date/tests/bug45866.phpt index f4b09b6daf7c9..0e062ffc397c6 100644 --- a/ext/date/tests/bug45866.phpt +++ b/ext/date/tests/bug45866.phpt @@ -13,12 +13,15 @@ $date->modify( "61538461538 day" ); echo $date->format( 'r' ), "\n"; $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); -$date->modify( "£61538461538 day" ); +try { + $date->modify( "£61538461538 day" ); +} catch (DateMalformedStringException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} echo $date->format( 'r' ), "\n"; ?> --EXPECTF-- Thu, 14 Aug 168488594 16:44:23 +0100 Thu, 14 Aug 168488594 16:44:23 +0100 - -Warning: DateTime::modify(): Failed to parse time string (£61538461538 day) at position 0 (%s): Unexpected character in %sbug45866.php on line 11 +DateMalformedStringException: DateTime::modify(): Failed to parse time string (£61538461538 day) at position 0 (%s): Unexpected character Wed, 29 Jul 2009 16:44:23 +0100 diff --git a/ext/date/tests/bug48476.phpt b/ext/date/tests/bug48476.phpt index 139c2e17e2bac..4b219e541e856 100644 --- a/ext/date/tests/bug48476.phpt +++ b/ext/date/tests/bug48476.phpt @@ -13,14 +13,14 @@ $o = new MyDateTime; try { var_dump($o->format("d")); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } $x = clone $o; try { var_dump($x->format("d")); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } clone $o; @@ -28,10 +28,10 @@ clone $o; try { var_dump(timezone_location_get(clone new MyDateTimezone)); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -The DateTime object has not been correctly initialized by its constructor -The DateTime object has not been correctly initialized by its constructor -The DateTimeZone object has not been correctly initialized by its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type MyDateTimeZone (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor diff --git a/ext/date/tests/bug50055.phpt b/ext/date/tests/bug50055-001.phpt similarity index 88% rename from ext/date/tests/bug50055.phpt rename to ext/date/tests/bug50055-001.phpt index 907bb93e44d26..9bff3405f52be 100644 --- a/ext/date/tests/bug50055.phpt +++ b/ext/date/tests/bug50055-001.phpt @@ -23,8 +23,8 @@ date_sub($ds2, $i); 2010-03-07T13:21:38+0000 2010-04-20T13:21:38+0000 -Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %sbug50055.php on line 9 +Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %s 2010-03-07T13:21:38+0000 2010-02-16T13:21:38+0000 -Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %sbug50055.php on line 17 +Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %s diff --git a/ext/date/tests/bug50055-002.phpt b/ext/date/tests/bug50055-002.phpt new file mode 100644 index 0000000000000..5e334666f8415 --- /dev/null +++ b/ext/date/tests/bug50055-002.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #50555 (DateTime::sub() allows 'relative' time modifications) (OO). +--FILE-- +format( DateTime::ISO8601 ), "\n"; +echo date_add($da1, $i)->format( DateTime::ISO8601 ), "\n"; +try { + $ds1->sub($i); +} catch (DateInvalidOperationException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} + +//negative DateInterval +$da2 = date_create( $now ); +$ds2 = date_create( $now ); +$i2 = DateInterval::createFromDateString('third Tuesday of last month'); +echo $da2->format( DateTime::ISO8601 ), "\n"; +echo date_add($da2, $i2)->format( DateTime::ISO8601 ), "\n";//works +try { + $ds2->sub($i); +} catch (DateInvalidOperationException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECTF-- +2010-03-07T13:21:38+0000 +2010-04-20T13:21:38+0000 +DateInvalidOperationException: DateTime::sub(): Only non-special relative time specifications are supported for subtraction +2010-03-07T13:21:38+0000 +2010-02-16T13:21:38+0000 +DateInvalidOperationException: DateTime::sub(): Only non-special relative time specifications are supported for subtraction diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt index f967773b1cc3c..e83063fe97666 100644 --- a/ext/date/tests/bug52062.phpt +++ b/ext/date/tests/bug52062.phpt @@ -12,21 +12,21 @@ $d = new DateTime('@100000000000'); var_dump($d->format('Y-m-d H:i:s U')); try { var_dump($d->getTimestamp()); -} catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; +} catch (\DateRangeError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } var_dump($d->format('U')); try { $d->setTimestamp(100000000000); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } var_dump($d->format('Y-m-d H:i:s U')); try { var_dump($d->getTimestamp()); -} catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; +} catch (\DateRangeError $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } $i = new DateInterval('PT100000000000S'); @@ -34,9 +34,9 @@ var_dump($i->format('%s')); ?> --EXPECT-- string(32) "5138-11-16 09:46:40 100000000000" -Epoch doesn't fit in a PHP integer +DateRangeError: Epoch doesn't fit in a PHP integer string(12) "100000000000" -DateTime::setTimestamp(): Argument #1 ($timestamp) must be of type int, float given +TypeError: DateTime::setTimestamp(): Argument #1 ($timestamp) must be of type int, float given string(32) "5138-11-16 09:46:40 100000000000" -Epoch doesn't fit in a PHP integer +DateRangeError: Epoch doesn't fit in a PHP integer string(10) "1215752192" diff --git a/ext/date/tests/bug52808.phpt b/ext/date/tests/bug52808.phpt index a059624fdd7a0..45568c754458d 100644 --- a/ext/date/tests/bug52808.phpt +++ b/ext/date/tests/bug52808.phpt @@ -4,9 +4,11 @@ Bug #52808 (Segfault when specifying interval as two dates) getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } echo "==DONE==\n"; @@ -91,7 +93,7 @@ object(DateInterval)#%d (%d) { ["from_string"]=> bool(false) } -Failed to parse interval (2007-05-11T15:30:00Z/) -Failed to parse interval (2007-05-11T15:30:00Z) -Unknown or bad format (2007-05-11T15:30:00Z/:00Z) +DateMalformedIntervalStringException: Failed to parse interval (2007-05-11T15:30:00Z/) +DateMalformedIntervalStringException: Failed to parse interval (2007-05-11T15:30:00Z) +DateMalformedIntervalStringException: Unknown or bad format (2007-05-11T15:30:00Z/:00Z) ==DONE== diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt index ee1d8efc0aa32..e5109aac02379 100644 --- a/ext/date/tests/bug67118.phpt +++ b/ext/date/tests/bug67118.phpt @@ -23,7 +23,7 @@ class mydt extends datetime new mydt("Funktionsansvarig rådgivning och juridik", "UTC"); ?> --EXPECTF-- -Fatal error: Uncaught Error: The DateTime object has not been correctly initialized by its constructor in %s:%d +Fatal error: Uncaught DateObjectError: Object of type mydt (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor in %s:%d Stack trace: #0 %s(%d): DateTime->format('Y') #1 %s(%d): mydt->__construct(%s) diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt index cdc9d4e37a7c6..90a4447cde3d3 100644 --- a/ext/date/tests/bug70245.phpt +++ b/ext/date/tests/bug70245.phpt @@ -6,8 +6,8 @@ $d = new DateTime('2011-01-15 00:00:00'); try { var_dump(strtotime('-1 month', $d)); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -strtotime(): Argument #2 ($baseTimestamp) must be of type ?int, DateTime given +TypeError: strtotime(): Argument #2 ($baseTimestamp) must be of type ?int, DateTime given diff --git a/ext/date/tests/bug70277.phpt b/ext/date/tests/bug70277.phpt index 49df2be410379..784f042a396d3 100644 --- a/ext/date/tests/bug70277.phpt +++ b/ext/date/tests/bug70277.phpt @@ -6,14 +6,14 @@ $timezone = "Europe/Zurich\0Foo"; try { var_dump(timezone_open($timezone)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump(new DateTimeZone($timezone)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -timezone_open(): Argument #1 ($timezone) must not contain any null bytes -DateTimeZone::__construct(): Argument #1 ($timezone) must not contain any null bytes +ValueError: timezone_open(): Argument #1 ($timezone) must not contain any null bytes +ValueError: DateTimeZone::__construct(): Argument #1 ($timezone) must not contain any null bytes diff --git a/ext/date/tests/bug73239.phpt b/ext/date/tests/bug73239.phpt index ce86e43c2c020..a05fcf817cea0 100644 --- a/ext/date/tests/bug73239.phpt +++ b/ext/date/tests/bug73239.phpt @@ -8,7 +8,7 @@ ini_set('date.timezone', 'dummy'); try { $dt = new DateTime('now'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECTF-- diff --git a/ext/date/tests/bug75002.phpt b/ext/date/tests/bug75002.phpt index 5c3085f316aee..2f4688eb35efe 100644 --- a/ext/date/tests/bug75002.phpt +++ b/ext/date/tests/bug75002.phpt @@ -16,7 +16,7 @@ foreach (new aaa($start) as $y) { ?> ==DONE== --EXPECTF-- -Fatal error: Uncaught Error: DatePeriod has not been initialized correctly in %sbug75002.php:%d +Fatal error: Uncaught DateObjectError: Object of type DatePeriod has not been correctly initialized by calling parent::__construct() in its constructor in %sbug75002.php:%d Stack trace: #0 {main} thrown in %sbug75002.php on line %d diff --git a/ext/date/tests/bug78139.phpt b/ext/date/tests/bug78139.phpt index 0ecf404274b03..47e5536cbaad6 100644 --- a/ext/date/tests/bug78139.phpt +++ b/ext/date/tests/bug78139.phpt @@ -20,8 +20,8 @@ foreach ($strings as $string) try { $tz = new \DateTimeZone($string); - } catch (Exception $e) { - echo $e->getMessage(), "\n"; + } catch (DateInvalidTimeZoneException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } echo "\n\n"; @@ -41,33 +41,33 @@ Parsing 'x UTC': Warning: timezone_open(): Unknown or bad timezone (x UTC) in %sbug78139.php on line %d bool(false) -DateTimeZone::__construct(): Unknown or bad timezone (x UTC) +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (x UTC) Parsing 'xx UTC': Warning: timezone_open(): Unknown or bad timezone (xx UTC) in %sbug78139.php on line %d bool(false) -DateTimeZone::__construct(): Unknown or bad timezone (xx UTC) +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (xx UTC) Parsing 'xUTC': Warning: timezone_open(): Unknown or bad timezone (xUTC) in %sbug78139.php on line %d bool(false) -DateTimeZone::__construct(): Unknown or bad timezone (xUTC) +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (xUTC) Parsing 'UTCx': Warning: timezone_open(): Unknown or bad timezone (UTCx) in %sbug78139.php on line %d bool(false) -DateTimeZone::__construct(): Unknown or bad timezone (UTCx) +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (UTCx) Parsing 'UTC xx': Warning: timezone_open(): Unknown or bad timezone (UTC xx) in %sbug78139.php on line %d bool(false) -DateTimeZone::__construct(): Unknown or bad timezone (UTC xx) +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (UTC xx) diff --git a/ext/date/tests/date_interval_bad_format_leak.phpt b/ext/date/tests/date_interval_bad_format_leak.phpt index 15e6eb9c64a91..c2e1b89fa0346 100644 --- a/ext/date/tests/date_interval_bad_format_leak.phpt +++ b/ext/date/tests/date_interval_bad_format_leak.phpt @@ -6,23 +6,23 @@ DateInterval with bad format should not leak period try { new DateInterval('P3"D'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DatePeriod('P3"D'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DatePeriod('2008-03-01T12:00:00Z1'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -Unknown or bad format (P3"D) -Unknown or bad format (P3"D) -Unknown or bad format (2008-03-01T12:00:00Z1) +DateMalformedIntervalStringException: Unknown or bad format (P3"D) +DateMalformedPeriodStringException: Unknown or bad format (P3"D) +DateMalformedPeriodStringException: Unknown or bad format (2008-03-01T12:00:00Z1) diff --git a/ext/date/tests/date_interval_create_from_date_string_broken.phpt b/ext/date/tests/date_interval_create_from_date_string_broken.phpt index c065de0f8c1ce..e3954b4895f5a 100644 --- a/ext/date/tests/date_interval_create_from_date_string_broken.phpt +++ b/ext/date/tests/date_interval_create_from_date_string_broken.phpt @@ -6,5 +6,5 @@ $i = date_interval_create_from_date_string("foobar"); var_dump($i); ?> --EXPECTF-- -Warning: date_interval_create_from_date_string(): Unknown or bad format (foobar) at position 0 (f): The timezone could not be found in the database in %sdate_interval_create_from_date_string_broken.php on line 2 +Warning: date_interval_create_from_date_string(): Unknown or bad format (foobar) at position 0 (f): The timezone could not be found in the database in %s bool(false) diff --git a/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt b/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt index afac12b7a33a4..1a4a17d786cfe 100644 --- a/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt +++ b/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt @@ -10,5 +10,5 @@ var_dump($i); --EXPECTF-- Deprecated: date_interval_create_from_date_string(): Passing null to parameter #1 ($datetime) of type string is deprecated in %s on line %d -Warning: date_interval_create_from_date_string(): Unknown or bad format () at position 0 ( ): Empty string in %sdate_interval_create_from_date_string_nullparam.php on line 2 +Warning: date_interval_create_from_date_string(): Unknown or bad format () at position 0 ( ): Empty string in %s bool(false) diff --git a/ext/date/tests/date_interval_non_relative_warning.phpt b/ext/date/tests/date_interval_non_relative_warning.phpt index fc0b246277940..9830c067e29ba 100644 --- a/ext/date/tests/date_interval_non_relative_warning.phpt +++ b/ext/date/tests/date_interval_non_relative_warning.phpt @@ -10,27 +10,31 @@ $formats = [ ]; foreach ($formats as $format) { - $d = DateInterval::createFromDateString($format); + try { + $d = DateInterval::createFromDateString($format); + } catch (DateMalformedIntervalStringException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } } +echo "====\n"; + foreach ($formats as $format) { $d = date_interval_create_from_date_string($format); } ?> --EXPECTF-- -Warning: DateInterval::createFromDateString(): String 'next weekday 15:30' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d - -Warning: DateInterval::createFromDateString(): String '+5 hours noon' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d - -Warning: DateInterval::createFromDateString(): String '-8 days March 23' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d - -Warning: DateInterval::createFromDateString(): String '+72 seconds UTC' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d +DateMalformedIntervalStringException: String 'next weekday 15:30' contains non-relative elements +DateMalformedIntervalStringException: String '+5 hours noon' contains non-relative elements +DateMalformedIntervalStringException: String '-8 days March 23' contains non-relative elements +DateMalformedIntervalStringException: String '+72 seconds UTC' contains non-relative elements +==== -Warning: date_interval_create_from_date_string(): String 'next weekday 15:30' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d +Warning: date_interval_create_from_date_string(): String 'next weekday 15:30' contains non-relative elements in %s on line %d -Warning: date_interval_create_from_date_string(): String '+5 hours noon' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d +Warning: date_interval_create_from_date_string(): String '+5 hours noon' contains non-relative elements in %s on line %d -Warning: date_interval_create_from_date_string(): String '-8 days March 23' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d +Warning: date_interval_create_from_date_string(): String '-8 days March 23' contains non-relative elements in %s on line %d -Warning: date_interval_create_from_date_string(): String '+72 seconds UTC' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d +Warning: date_interval_create_from_date_string(): String '+72 seconds UTC' contains non-relative elements in %s on line %d diff --git a/ext/date/tests/date_period_bad_iso_format.phpt b/ext/date/tests/date_period_bad_iso_format.phpt index fecc4fa23ceab..e0e8efdc2a29f 100644 --- a/ext/date/tests/date_period_bad_iso_format.phpt +++ b/ext/date/tests/date_period_bad_iso_format.phpt @@ -6,24 +6,24 @@ Test bad ISO date formats passed to DatePeriod constructor try { new DatePeriod("R4"); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DatePeriod("R4/2012-07-01T00:00:00Z"); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DatePeriod("2012-07-01T00:00:00Z/P7D"); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -DatePeriod::__construct(): ISO interval must contain a start date, "R4" given -DatePeriod::__construct(): ISO interval must contain an interval, "R4/2012-07-01T00:00:00Z" given -DatePeriod::__construct(): ISO interval must contain an end date or a recurrence count, "2012-07-01T00:00:00Z/P7D" given +DateMalformedPeriodStringException: DatePeriod::__construct(): ISO interval must contain a start date, "R4" given +DateMalformedPeriodStringException: DatePeriod::__construct(): ISO interval must contain an interval, "R4/2012-07-01T00:00:00Z" given +DateMalformedPeriodStringException: DatePeriod::__construct(): ISO interval must contain an end date or a recurrence count, "2012-07-01T00:00:00Z/P7D" given diff --git a/ext/date/tests/date_period_set_state2.phpt b/ext/date/tests/date_period_set_state2.phpt index 7d77a632dc7e2..61d0133a66363 100644 --- a/ext/date/tests/date_period_set_state2.phpt +++ b/ext/date/tests/date_period_set_state2.phpt @@ -9,10 +9,10 @@ try { "start" => new DateTime, ] ); -} catch (\Error $exception) { - echo $exception->getMessage() . "\n"; +} catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object diff --git a/ext/date/tests/date_period_unserialize2.phpt b/ext/date/tests/date_period_unserialize2.phpt index c368155dbe83e..5ea2466da8e97 100644 --- a/ext/date/tests/date_period_unserialize2.phpt +++ b/ext/date/tests/date_period_unserialize2.phpt @@ -14,10 +14,10 @@ try { "start" => new DateTime, ] ); -} catch (\Error $exception) { - echo $exception->getMessage() . "\n"; +} catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object diff --git a/ext/date/tests/date_period_unserialize3.phpt b/ext/date/tests/date_period_unserialize3.phpt index 4213320e30ae2..d5d4a57456d9a 100644 --- a/ext/date/tests/date_period_unserialize3.phpt +++ b/ext/date/tests/date_period_unserialize3.phpt @@ -20,15 +20,15 @@ try { "include_end_date" => true, ] ); -} catch (\Error $exception) { - echo $exception->getMessage() . "\n"; +} catch (\Error $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } var_dump($period); ?> --EXPECTF-- -Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object object(DatePeriod)#%d (%d) { ["start"]=> object(DateTime)#%d (%d) { diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt index 5bd1421369b9c..f333580b037b0 100644 --- a/ext/date/tests/mktime_error.phpt +++ b/ext/date/tests/mktime_error.phpt @@ -1,8 +1,8 @@ --TEST-- -Test mktime() function : error conditions +Test mktime() function: error conditions --FILE-- getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } echo "\n-- Testing mktime() function with more than expected no. of arguments --\n"; @@ -25,7 +25,7 @@ $extra_arg = 10; try { var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $extra_arg) ); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> @@ -33,7 +33,7 @@ try { *** Testing mktime() : error conditions *** -- Testing mktime() function with Zero arguments -- -mktime() expects at least 1 argument, 0 given +ArgumentCountError: mktime() expects at least 1 argument, 0 given -- Testing mktime() function with more than expected no. of arguments -- -mktime() expects at most 6 arguments, 7 given +ArgumentCountError: mktime() expects at most 6 arguments, 7 given diff --git a/ext/date/tests/oo_001.phpt b/ext/date/tests/oo_001.phpt index 5db101f858671..4cae1f8e41a4e 100644 --- a/ext/date/tests/oo_001.phpt +++ b/ext/date/tests/oo_001.phpt @@ -23,13 +23,13 @@ try { $d = new _d; var_dump($d->format("Y-m-d H:i:s")); } catch (Error $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DateTime("1am todax"); } catch (Exception $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } $t = new DateTimeZone("UTC"); @@ -39,36 +39,36 @@ try { $t = new _t; var_dump($t->getName()); } catch (Error $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { new DateTimeZone("GottaFindThisOne"); -} catch (Exception $e) { - echo $e->getMessage(),"\n"; +} catch (DateInvalidTimeZoneException $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } $p = new _p; try { var_dump($p->getStartDate()); } catch (Error $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump($p->getDateInterval()); } catch (Error $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } echo "DONE\n"; ?> --EXPECTF-- string(19) "%d-%d-%d %d:%d:%d" -The DateTime object has not been correctly initialized by its constructor -Failed to parse time string (1am todax) at position 4 (t): The timezone could not be found in the database +DateObjectError: Object of type _d (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor +DateMalformedStringException: Failed to parse time string (1am todax) at position 4 (t): The timezone could not be found in the database string(3) "UTC" -The DateTimeZone object has not been correctly initialized by its constructor -DateTimeZone::__construct(): Unknown or bad timezone (GottaFindThisOne) -The DatePeriod object has not been correctly initialized by its constructor -The DatePeriod object has not been correctly initialized by its constructor +DateObjectError: Object of type _t (inheriting DateTimeZone) has not been correctly initialized by calling parent::__construct() in its constructor +DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (GottaFindThisOne) +DateObjectError: Object of type _p (inheriting DatePeriod) has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type _p (inheriting DatePeriod) has not been correctly initialized by calling parent::__construct() in its constructor DONE diff --git a/ext/date/tests/timezone_identifiers_list_wrong_constructor.phpt b/ext/date/tests/timezone_identifiers_list_wrong_constructor.phpt index 0a697dd78fc84..2c2b603f8980f 100644 --- a/ext/date/tests/timezone_identifiers_list_wrong_constructor.phpt +++ b/ext/date/tests/timezone_identifiers_list_wrong_constructor.phpt @@ -10,15 +10,15 @@ date.timezone=UTC try { var_dump(timezone_identifiers_list(DateTimeZone::PER_COUNTRY)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump(timezone_identifiers_list(DateTimeZone::PER_COUNTRY, 'A')); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- -timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY -timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY +ValueError: timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY +ValueError: timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY diff --git a/ext/date/tests/timezone_open_warning.phpt b/ext/date/tests/timezone_open_warning.phpt new file mode 100644 index 0000000000000..012192beef453 --- /dev/null +++ b/ext/date/tests/timezone_open_warning.phpt @@ -0,0 +1,23 @@ +--TEST-- +timezone_open() invalid timezones +--FILE-- +getName(), "\n"; + } +} +?> +--EXPECTF-- +In: +02:30; Out: +02:30 +In: Europe/Kyiv; Out: Europe/Kyiv + +Warning: timezone_open(): Unknown or bad timezone (2.5) in %stimezone_open_warning.php on line 6 + +Warning: timezone_open(): Unknown or bad timezone (99:60) in %stimezone_open_warning.php on line 6 + +Warning: timezone_open(): Unknown or bad timezone (Europe/Lviv) in %stimezone_open_warning.php on line 6 diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt index 9f5a43c831f2b..839cb27d317c9 100644 --- a/ext/intl/tests/dateformat_formatObject_error.phpt +++ b/ext/intl/tests/dateformat_formatObject_error.phpt @@ -36,7 +36,7 @@ Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad IntlCalen bool(false) Warning: IntlDateFormatter::formatObject(): datefmt_format_object: error calling ::getTimeStamp() on the object in %s on line %d -The DateTime object has not been correctly initialized by its constructor +Object of type B (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the date/time format type is invalid in %s on line %d bool(false) From 641fe23e3a5dc8449fd123b9793817d4ac56b5e6 Mon Sep 17 00:00:00 2001 From: Marcos Marcolin <48370677+marcosmarcolin@users.noreply.github.com> Date: Wed, 8 Feb 2023 09:11:41 -0300 Subject: [PATCH 377/895] Improve illegal offset error messages (#10504) Co-authored-by: Marcos Marcolin --- Zend/tests/036.phpt | 2 +- Zend/tests/038.phpt | 2 +- Zend/tests/assign_dim_obj_null_return.phpt | 8 ++-- Zend/tests/bug79790.phpt | 2 +- Zend/tests/bug79947.phpt | 2 +- Zend/tests/bug80781.phpt | 2 +- ...expressions_invalid_offset_type_error.phpt | 2 +- Zend/tests/gh8821.phpt | 2 +- .../illegal_offset_unset_isset_empty.phpt | 6 +-- .../tests/init_array_illegal_offset_type.phpt | 2 +- Zend/tests/isset_array.phpt | 4 +- Zend/tests/offset_array.phpt | 4 +- Zend/zend_API.c | 12 ++++- Zend/zend_execute.c | 22 +++++++--- Zend/zend_vm_def.h | 4 +- Zend/zend_vm_execute.h | 44 +++++++++---------- ext/opcache/jit/zend_jit_helpers.c | 19 +++++--- ext/opcache/tests/jit/assign_dim_002.phpt | 6 +-- ext/opcache/tests/jit/assign_dim_op_001.phpt | 4 +- ext/opcache/tests/jit/fetch_dim_rw_004.phpt | 2 +- ext/opcache/tests/opt/inference_002.phpt | 4 +- ext/spl/spl_array.c | 27 +++++++++--- ext/spl/spl_fixedarray.c | 7 ++- ext/spl/tests/ArrayObject_illegal_offset.phpt | 10 ++--- ext/spl/tests/fixedarray_001.phpt | 2 +- ext/spl/tests/fixedarray_002.phpt | 2 +- ext/spl/tests/fixedarray_003.phpt | 40 ++++++++--------- .../iterator_to_array_nonscalar_keys.phpt | 2 +- .../tests/array/array_key_exists.phpt | 2 +- .../array/array_key_exists_variation1.phpt | 4 +- ext/standard/tests/array/bug68553.phpt | 4 +- tests/classes/tostring_001.phpt | 2 +- 32 files changed, 151 insertions(+), 106 deletions(-) diff --git a/Zend/tests/036.phpt b/Zend/tests/036.phpt index 8f74bccc075f0..4037d3d0e3d21 100644 --- a/Zend/tests/036.phpt +++ b/Zend/tests/036.phpt @@ -11,4 +11,4 @@ try { ?> --EXPECT-- -Illegal offset type +Cannot access offset of type object on array diff --git a/Zend/tests/038.phpt b/Zend/tests/038.phpt index e55757bbcd417..4f822a6f5a154 100644 --- a/Zend/tests/038.phpt +++ b/Zend/tests/038.phpt @@ -11,4 +11,4 @@ try { ?> --EXPECT-- -Illegal offset type +Cannot access offset of type object on array diff --git a/Zend/tests/assign_dim_obj_null_return.phpt b/Zend/tests/assign_dim_obj_null_return.phpt index 0a2ea94c552d5..02e709818669e 100644 --- a/Zend/tests/assign_dim_obj_null_return.phpt +++ b/Zend/tests/assign_dim_obj_null_return.phpt @@ -72,12 +72,12 @@ test(); ?> --EXPECT-- Cannot add element to the array as the next element is already occupied -Illegal offset type -Illegal offset type +Cannot access offset of type array on array +Cannot access offset of type object on array Cannot use a scalar value as an array Cannot add element to the array as the next element is already occupied -Illegal offset type -Illegal offset type +Cannot access offset of type array on array +Cannot access offset of type object on array Cannot use a scalar value as an array Attempt to assign property "foo" on true Attempt to assign property "foo" on true diff --git a/Zend/tests/bug79790.phpt b/Zend/tests/bug79790.phpt index 4fce25291bcb5..0d34e2be0fc1e 100644 --- a/Zend/tests/bug79790.phpt +++ b/Zend/tests/bug79790.phpt @@ -8,7 +8,7 @@ function b($a = array()[array ()]) { } ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Illegal offset type in %s:%d +Fatal error: Uncaught TypeError: Cannot access offset of type array on array in %s:%d Stack trace: #0 %s(%d): b() #1 {main} diff --git a/Zend/tests/bug79947.phpt b/Zend/tests/bug79947.phpt index 906f58144b41d..0593eacfd6c48 100644 --- a/Zend/tests/bug79947.phpt +++ b/Zend/tests/bug79947.phpt @@ -12,6 +12,6 @@ try { var_dump($array); ?> --EXPECT-- -Illegal offset type +Cannot access offset of type array on array array(0) { } diff --git a/Zend/tests/bug80781.phpt b/Zend/tests/bug80781.phpt index eb5109add9f6c..0dc004fb9d74c 100644 --- a/Zend/tests/bug80781.phpt +++ b/Zend/tests/bug80781.phpt @@ -25,7 +25,7 @@ if (isset($array[$data]) or getPlugin($data)) { ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in %s:%d +Fatal error: Uncaught TypeError: Cannot access offset of type array in isset or empty in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt index 649c3a325a0c2..1a0ef52dce082 100644 --- a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt +++ b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt @@ -8,7 +8,7 @@ const C2 = [C1, [] => 1]; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Illegal offset type in %s:%d +Fatal error: Uncaught TypeError: Cannot access offset of type array on array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/gh8821.phpt b/Zend/tests/gh8821.phpt index 8f1b3ceff34ab..e6abf5c1c4f1a 100644 --- a/Zend/tests/gh8821.phpt +++ b/Zend/tests/gh8821.phpt @@ -15,7 +15,7 @@ new Bravo(); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Illegal offset type in %sgh8821.php:8 +Fatal error: Uncaught TypeError: Cannot access offset of type object on array in %sgh8821.php:8 Stack trace: #0 %sgh8821.php(11): [constant expression]() #1 {main} diff --git a/Zend/tests/illegal_offset_unset_isset_empty.phpt b/Zend/tests/illegal_offset_unset_isset_empty.phpt index 9005053e67ed8..a09613748281b 100644 --- a/Zend/tests/illegal_offset_unset_isset_empty.phpt +++ b/Zend/tests/illegal_offset_unset_isset_empty.phpt @@ -22,6 +22,6 @@ try { ?> --EXPECT-- -Illegal offset type in unset -Illegal offset type in isset or empty -Illegal offset type in isset or empty +Cannot access offset of type array in unset +Cannot access offset of type array in isset or empty +Cannot access offset of type array in isset or empty diff --git a/Zend/tests/init_array_illegal_offset_type.phpt b/Zend/tests/init_array_illegal_offset_type.phpt index 2243ca2905ea0..2e5a0401d6e4a 100644 --- a/Zend/tests/init_array_illegal_offset_type.phpt +++ b/Zend/tests/init_array_illegal_offset_type.phpt @@ -12,4 +12,4 @@ try { } ?> --EXPECT-- -Illegal offset type +Cannot access offset of type object on array diff --git a/Zend/tests/isset_array.phpt b/Zend/tests/isset_array.phpt index 4a0652ae39d5f..792483294805d 100644 --- a/Zend/tests/isset_array.phpt +++ b/Zend/tests/isset_array.phpt @@ -46,5 +46,5 @@ bool(false) Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d bool(false) -Illegal offset type in isset or empty -Illegal offset type in isset or empty +Cannot access offset of type array in isset or empty +Cannot access offset of type object in isset or empty diff --git a/Zend/tests/offset_array.phpt b/Zend/tests/offset_array.phpt index 0109950cde848..e44244511fcf1 100644 --- a/Zend/tests/offset_array.phpt +++ b/Zend/tests/offset_array.phpt @@ -48,6 +48,6 @@ int(1) Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d int(%d) -Illegal offset type -Illegal offset type +Cannot access offset of type object on array +Cannot access offset of type array on array Done diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 21e768f0947c3..905687a00b953 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -407,6 +407,16 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error_variadic(zend_class_en } /* }}} */ +ZEND_API ZEND_COLD void zend_illegal_array_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s on array", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +ZEND_API ZEND_COLD void zend_illegal_empty_or_isset_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s in isset or empty", zend_get_type_by_const(Z_TYPE_P(offset))); +} + ZEND_API ZEND_COLD void zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format, ...) /* {{{ */ { va_list va; @@ -2074,7 +2084,7 @@ ZEND_API zend_result array_set_zval_key(HashTable *ht, zval *key, zval *value) / result = zend_hash_index_update(ht, zend_dval_to_lval_safe(Z_DVAL_P(key)), value); break; default: - zend_type_error("Illegal offset type"); + zend_illegal_array_offset(key); result = NULL; } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 58f57cbd20e53..0d7025b68a644 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1466,9 +1466,19 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_object_as_array(v zend_throw_error(NULL, "Cannot use object as array"); } -static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_offset(void) +static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_unset_offset(const zval *offset) { - zend_type_error("Illegal offset type"); + zend_type_error("Cannot access offset of type %s in unset", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_array_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s on array", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_empty_or_isset_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s in isset or empty", zend_get_type_by_const(Z_TYPE_P(offset))); } static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_string_offset(const zval *offset) @@ -2340,7 +2350,7 @@ static zend_never_inline zend_uchar slow_index_convert(HashTable *ht, const zval value->lval = 1; return IS_LONG; default: - zend_illegal_offset(); + zend_illegal_array_offset(dim); return IS_NULL; } } @@ -2414,7 +2424,7 @@ static zend_never_inline zend_uchar slow_index_convert_w(HashTable *ht, const zv value->lval = 1; return IS_LONG; default: - zend_illegal_offset(); + zend_illegal_array_offset(dim); return IS_NULL; } } @@ -2873,7 +2883,7 @@ static zend_never_inline zval* ZEND_FASTCALL zend_find_array_dim_slow(HashTable ZVAL_UNDEFINED_OP2(); goto str_idx; } else { - zend_type_error("Illegal offset type in isset or empty"); + zend_illegal_empty_or_isset_offset(offset); return NULL; } } @@ -2996,7 +3006,7 @@ static zend_never_inline bool ZEND_FASTCALL zend_array_key_exists_fast(HashTable str = ZSTR_EMPTY_ALLOC(); goto str_key; } else { - zend_illegal_offset(); + zend_illegal_array_offset(key); return 0; } } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index b377bf2f39c5d..1785fcfe2a148 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6069,7 +6069,7 @@ ZEND_VM_C_LABEL(num_index): str = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index); } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } FREE_OP2(); @@ -6585,7 +6585,7 @@ ZEND_VM_C_LABEL(num_index_dim): key = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index_dim); } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index b881272966ec1..00cf2461b91ce 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7347,7 +7347,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -9668,7 +9668,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_T str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -10591,7 +10591,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_U str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -12041,7 +12041,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -20037,7 +20037,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CON str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -20477,7 +20477,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -20938,7 +20938,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNU str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -21338,7 +21338,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_ str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -25125,7 +25125,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CON str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -25217,7 +25217,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDL key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { @@ -27549,7 +27549,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -27641,7 +27641,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HAND key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { @@ -29594,7 +29594,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNU str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -31869,7 +31869,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_ str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -31961,7 +31961,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER( key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { @@ -43387,7 +43387,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONS str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -43479,7 +43479,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLE key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { @@ -47011,7 +47011,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPV str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -47103,7 +47103,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDL key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { @@ -48936,7 +48936,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUS str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -52450,7 +52450,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_H str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { - zend_illegal_offset(); + zend_illegal_array_offset(offset); zval_ptr_dtor_nogc(expr_ptr); } @@ -52542,7 +52542,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(Z key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { - zend_type_error("Illegal offset type in unset"); + zend_illegal_unset_offset(offset); } break; } else if (Z_ISREF_P(container)) { diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 9c4b80e28513e..bf830ec3b8b12 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -27,9 +27,14 @@ static ZEND_COLD void undef_result_after_exception(void) { } } -static ZEND_COLD void zend_jit_illegal_offset(void) +static ZEND_COLD void zend_jit_illegal_array_offset(const zval *offset) { - zend_type_error("Illegal offset type"); + zend_type_error("Cannot access offset of type %s on array", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +static ZEND_COLD void zend_jit_illegal_empty_or_isset_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s in isset or empty", zend_get_type_by_const(Z_TYPE_P(offset))); } static ZEND_COLD void zend_jit_illegal_string_offset(zval *offset) @@ -488,7 +493,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim, hval = 1; goto num_index; default: - zend_jit_illegal_offset(); + zend_jit_illegal_array_offset(dim); undef_result_after_exception(); return; } @@ -630,7 +635,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_is_helper(zend_array *ht, zval *dim hval = 1; goto num_index; default: - zend_jit_illegal_offset(); + zend_jit_illegal_array_offset(dim); undef_result_after_exception(); return; } @@ -732,7 +737,7 @@ static int ZEND_FASTCALL zend_jit_fetch_dim_isset_helper(zend_array *ht, zval *d hval = 1; goto num_index; default: - zend_type_error("Illegal offset type in isset or empty"); + zend_jit_illegal_empty_or_isset_offset(dim); return 0; } @@ -868,7 +873,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di hval = 1; goto num_index; default: - zend_jit_illegal_offset(); + zend_jit_illegal_array_offset(dim); undef_result_after_exception(); return NULL; } @@ -1001,7 +1006,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim hval = 1; goto num_index; default: - zend_jit_illegal_offset(); + zend_jit_illegal_array_offset(dim); undef_result_after_exception(); if (EG(opline_before_exception) && (EG(opline_before_exception)+1)->opcode == ZEND_OP_DATA diff --git a/ext/opcache/tests/jit/assign_dim_002.phpt b/ext/opcache/tests/jit/assign_dim_002.phpt index 3f713a6c6a6a9..83b4bfdec7873 100644 --- a/ext/opcache/tests/jit/assign_dim_002.phpt +++ b/ext/opcache/tests/jit/assign_dim_002.phpt @@ -161,7 +161,7 @@ array(1) { int(1) } } -Illegal offset type +Cannot access offset of type object on array array(1) { [0]=> array(2) { @@ -198,7 +198,7 @@ array(1) { } Deprecated: Automatic conversion of false to array is deprecated in %s on line %d -Illegal offset type +Cannot access offset of type array on array Deprecated: Automatic conversion of false to array is deprecated in %s on line %d int(1) @@ -221,7 +221,7 @@ array(1) { } Deprecated: Automatic conversion of false to array is deprecated in %s on line %d -Illegal offset type +Cannot access offset of type array on array Warning: Undefined variable $undef in %s on line %d NULL diff --git a/ext/opcache/tests/jit/assign_dim_op_001.phpt b/ext/opcache/tests/jit/assign_dim_op_001.phpt index a533cbe9c283b..731a2e96420a7 100644 --- a/ext/opcache/tests/jit/assign_dim_op_001.phpt +++ b/ext/opcache/tests/jit/assign_dim_op_001.phpt @@ -79,7 +79,7 @@ Warning: Undefined array key 2 in %s on line %d Deprecated: Automatic conversion of false to array is deprecated in %s on line %d Deprecated: Automatic conversion of false to array is deprecated in %s on line %d -Illegal offset type +Cannot access offset of type array on array Deprecated: Automatic conversion of false to array is deprecated in %s on line %d @@ -104,5 +104,5 @@ array(1) { } Deprecated: Automatic conversion of false to array is deprecated in %s on line %d -Illegal offset type +Cannot access offset of type array on array Unsupported operand types: null % string diff --git a/ext/opcache/tests/jit/fetch_dim_rw_004.phpt b/ext/opcache/tests/jit/fetch_dim_rw_004.phpt index ea3fff88f1e45..d9302b8fd04ce 100644 --- a/ext/opcache/tests/jit/fetch_dim_rw_004.phpt +++ b/ext/opcache/tests/jit/fetch_dim_rw_004.phpt @@ -18,7 +18,7 @@ Stack trace: #0 %sfetch_dim_rw_004.php(5): {closure}(2, 'Undefined varia...', '%s', 5) #1 {main} -Next TypeError: Illegal offset type in %sfetch_dim_rw_004.php:5 +Next TypeError: Cannot access offset of type array on array in %sfetch_dim_rw_004.php:5 Stack trace: #0 {main} thrown in %sfetch_dim_rw_004.php on line 5 diff --git a/ext/opcache/tests/opt/inference_002.phpt b/ext/opcache/tests/opt/inference_002.phpt index 70412426c2fcc..3d8c69d054e5d 100644 --- a/ext/opcache/tests/opt/inference_002.phpt +++ b/ext/opcache/tests/opt/inference_002.phpt @@ -9,7 +9,7 @@ opcache.optimization_level=-1 var_dump([[]=>&$x]); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Illegal offset type in %sinference_002.php:2 +Fatal error: Uncaught TypeError: Cannot access offset of type array on array in %sinference_002.php:2 Stack trace: #0 {main} - thrown in %sinference_002.php on line 2 \ No newline at end of file + thrown in %sinference_002.php on line 2 diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 4098382c61c17..337c2b9902fba 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -12,7 +12,7 @@ +----------------------------------------------------------------------+ | Authors: Marcus Boerger | +----------------------------------------------------------------------+ - */ +*/ #ifdef HAVE_CONFIG_H # include "config.h" @@ -89,6 +89,21 @@ static inline HashTable **spl_array_get_hash_table_ptr(spl_array_object* intern) } /* }}} */ +static void spl_array_illegal_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s on ArrayObject", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +static void spl_array_illegal_empty_or_isset_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s in isset or empty", zend_get_type_by_const(Z_TYPE_P(offset))); +} + +static void spl_array_illegal_unset_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s in unset", zend_get_type_by_const(Z_TYPE_P(offset))); +} + static inline HashTable *spl_array_get_hash_table(spl_array_object* intern) { /* {{{ */ return *spl_array_get_hash_table_ptr(intern); } @@ -286,7 +301,7 @@ static zend_result get_hash_key(spl_hash_key *key, spl_array_object *intern, zva ZVAL_DEREF(offset); goto try_again; default: - zend_type_error("Illegal offset type"); + spl_array_illegal_offset(offset); return FAILURE; } @@ -313,7 +328,7 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object * } if (get_hash_key(&key, intern, offset) == FAILURE) { - zend_type_error("Illegal offset type"); + spl_array_illegal_offset(offset); return (type == BP_VAR_W || type == BP_VAR_RW) ? &EG(error_zval) : &EG(uninitialized_zval); } @@ -466,7 +481,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec } if (get_hash_key(&key, intern, offset) == FAILURE) { - zend_type_error("Illegal offset type"); + spl_array_illegal_offset(offset); zval_ptr_dtor(value); return; } @@ -502,7 +517,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec } if (get_hash_key(&key, intern, offset) == FAILURE) { - zend_type_error("Illegal offset type in unset"); + spl_array_illegal_unset_offset(offset); return; } @@ -566,7 +581,7 @@ static bool spl_array_has_dimension_ex(bool check_inherited, zend_object *object spl_hash_key key; if (get_hash_key(&key, intern, offset) == FAILURE) { - zend_type_error("Illegal offset type in isset or empty"); + spl_array_illegal_empty_or_isset_offset(offset); return 0; } diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 465c649e980aa..291744fce0d9f 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -83,6 +83,11 @@ static bool spl_fixedarray_empty(spl_fixedarray *array) return true; } +static void spl_fixedarray_illegal_offset(const zval *offset) +{ + zend_type_error("Cannot access offset of type %s on FixedArray", zend_get_type_by_const(Z_TYPE_P(offset))); +} + static void spl_fixedarray_default_ctor(spl_fixedarray *array) { array->size = 0; @@ -333,7 +338,7 @@ static zend_long spl_offset_convert_to_long(zval *offset) /* {{{ */ return Z_RES_HANDLE_P(offset); } - zend_type_error("Illegal offset type"); + spl_fixedarray_illegal_offset(offset); return 0; } diff --git a/ext/spl/tests/ArrayObject_illegal_offset.phpt b/ext/spl/tests/ArrayObject_illegal_offset.phpt index df25e4fa5e0fa..08353c704c6f3 100644 --- a/ext/spl/tests/ArrayObject_illegal_offset.phpt +++ b/ext/spl/tests/ArrayObject_illegal_offset.phpt @@ -32,8 +32,8 @@ try { ?> --EXPECT-- -Illegal offset type -Illegal offset type -Illegal offset type -Illegal offset type in isset or empty -Illegal offset type in unset +Cannot access offset of type array on ArrayObject +Cannot access offset of type array on ArrayObject +Cannot access offset of type array on ArrayObject +Cannot access offset of type array in isset or empty +Cannot access offset of type array in unset diff --git a/ext/spl/tests/fixedarray_001.phpt b/ext/spl/tests/fixedarray_001.phpt index a6ab149c75ca5..35a7a9cf17725 100644 --- a/ext/spl/tests/fixedarray_001.phpt +++ b/ext/spl/tests/fixedarray_001.phpt @@ -46,7 +46,7 @@ var_dump($b[0]); ?> --EXPECT-- RuntimeException: Index invalid or out of range -TypeError: Illegal offset type +TypeError: Cannot access offset of type string on FixedArray RuntimeException: Index invalid or out of range string(6) "value0" string(6) "value2" diff --git a/ext/spl/tests/fixedarray_002.phpt b/ext/spl/tests/fixedarray_002.phpt index 4f6682e6df3a0..940d5996f5dbc 100644 --- a/ext/spl/tests/fixedarray_002.phpt +++ b/ext/spl/tests/fixedarray_002.phpt @@ -71,7 +71,7 @@ var_dump(count($a), $a->getSize(), count($a) == $a->getSize()); A::offsetSet RuntimeException: Index invalid or out of range A::offsetGet -TypeError: Illegal offset type +TypeError: Cannot access offset of type string on FixedArray A::offsetUnset RuntimeException: Index invalid or out of range A::offsetSet diff --git a/ext/spl/tests/fixedarray_003.phpt b/ext/spl/tests/fixedarray_003.phpt index 277088d04f045..d246561c1b7e8 100644 --- a/ext/spl/tests/fixedarray_003.phpt +++ b/ext/spl/tests/fixedarray_003.phpt @@ -168,55 +168,55 @@ try { Write context Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d -Illegal offset type -Illegal offset type +Cannot access offset of type array on FixedArray +Cannot access offset of type object on FixedArray Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d -Illegal offset type -Illegal offset type -Illegal offset type +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray Read context string(1) "a" string(1) "b" Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d string(1) "c" -Illegal offset type -Illegal offset type +Cannot access offset of type array on FixedArray +Cannot access offset of type object on FixedArray Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d string(1) "f" string(1) "g" -Illegal offset type -Illegal offset type -Illegal offset type +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray isset() bool(true) bool(true) Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d bool(true) -Illegal offset type -Illegal offset type +Cannot access offset of type array on FixedArray +Cannot access offset of type object on FixedArray Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d bool(true) bool(true) -Illegal offset type -Illegal offset type -Illegal offset type +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray empty() bool(false) bool(false) Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d bool(false) -Illegal offset type -Illegal offset type +Cannot access offset of type array on FixedArray +Cannot access offset of type object on FixedArray Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d bool(false) bool(false) -Illegal offset type -Illegal offset type -Illegal offset type +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray +Cannot access offset of type string on FixedArray diff --git a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt index f3460bfccca77..44b4e2a0ebcbb 100644 --- a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt +++ b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt @@ -21,4 +21,4 @@ try { ?> --EXPECTF-- Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d -Illegal offset type +Cannot access offset of type array on array diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt index d6f9ca13de718..8cc2f9c5207c2 100644 --- a/ext/standard/tests/array/array_key_exists.phpt +++ b/ext/standard/tests/array/array_key_exists.phpt @@ -202,7 +202,7 @@ bool(false) bool(true) *** Testing error conditions *** -Illegal offset type +Cannot access offset of type array on array *** Testing operation on objects *** array_key_exists(): Argument #2 ($array) must be of type array, key_check given diff --git a/ext/standard/tests/array/array_key_exists_variation1.phpt b/ext/standard/tests/array/array_key_exists_variation1.phpt index 3a410258bb999..eb35d1bfae0c1 100644 --- a/ext/standard/tests/array/array_key_exists_variation1.phpt +++ b/ext/standard/tests/array/array_key_exists_variation1.phpt @@ -129,7 +129,7 @@ bool(false) bool(false) -- Iteration 13 -- -Illegal offset type +Cannot access offset of type array on array -- Iteration 14 -- bool(true) @@ -141,7 +141,7 @@ bool(true) bool(true) -- Iteration 17 -- -Illegal offset type +Cannot access offset of type object on array -- Iteration 18 -- bool(false) diff --git a/ext/standard/tests/array/bug68553.phpt b/ext/standard/tests/array/bug68553.phpt index dbb74c7994bb3..7325a68da5413 100644 --- a/ext/standard/tests/array/bug68553.phpt +++ b/ext/standard/tests/array/bug68553.phpt @@ -79,5 +79,5 @@ array(8) { NULL } } -Illegal offset type -Illegal offset type +Cannot access offset of type object on array +Cannot access offset of type array on array diff --git a/tests/classes/tostring_001.phpt b/tests/classes/tostring_001.phpt index abf41f97cdaca..ddbe4d152dde0 100644 --- a/tests/classes/tostring_001.phpt +++ b/tests/classes/tostring_001.phpt @@ -118,7 +118,7 @@ test2::__toString() Converted ====test7==== test2::__toString() -Illegal offset type +Cannot access offset of type object on array ====test8==== test2::__toString() string(9) "Converted" From 8c8a38a75ce638598732f316f895ecaca7ad9259 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2023 12:16:03 +0100 Subject: [PATCH 378/895] ext/curl: suppress -Wdeprecated-declarations Closes GH-10531. --- NEWS | 3 +++ ext/curl/interface.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index ce886d1638c7a..38fb6baefd980 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,9 @@ PHP NEWS . Fixed bug GH-10168: use-after-free when utilizing assigned object freed during assignment. (nielsdos) +- Curl: + . Fixed deprecation warning at compile time. (Max Kellermann) + - Date: . Fix GH-10447 ('p' format specifier does not yield 'Z' for 00:00). (Derick) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 4fc0415e78757..36300dacfcfba 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -62,6 +62,12 @@ #include "curl_private.h" #include "curl_arginfo.h" +#ifdef __GNUC__ +/* don't complain about deprecated CURLOPT_* we're exposing to PHP; we + need to keep using those to avoid breaking PHP API compatibiltiy */ +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */ static MUTEX_T *php_curl_openssl_tsl = NULL; From df853cb30571aba27ae8ca4ee3f333fa696c3baa Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 8 Feb 2023 11:17:39 +0000 Subject: [PATCH 379/895] Bump minimum re2c version requirement to 1.0.3 The release VMs already enforced this, but PHP's configure script did not. re2c 0.13.5, which timelib's date/time parser requires is no longer compatible with the current version of Zend/zend_language_scanner.l, as it starts spinning in a loop. --- build/php.m4 | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/php.m4 b/build/php.m4 index 9287d2fc60c76..78fbe14c8f8a2 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1870,7 +1870,7 @@ AC_DEFUN([PHP_PROG_RE2C],[ if test "$php_re2c_check" != "invalid"; then AC_MSG_RESULT([$php_re2c_version (ok)]) else - AC_MSG_RESULT([$php_re2c_version]) + AC_MSG_RESULT([$php_re2c_version (too old)]) fi fi diff --git a/configure.ac b/configure.ac index cd77a89ff204d..ff69c06adc688 100644 --- a/configure.ac +++ b/configure.ac @@ -164,7 +164,7 @@ PHP_RUNPATH_SWITCH dnl Checks for some support/generator progs. PHP_PROG_AWK PHP_PROG_BISON([3.0.0]) -PHP_PROG_RE2C([0.13.4]) +PHP_PROG_RE2C([1.0.3]) PHP_PROG_PHP() PHP_ARG_ENABLE([re2c-cgoto], From 81aedad4521a52daecfbb5221b0414ac556f933f Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 8 Feb 2023 22:42:44 +0000 Subject: [PATCH 380/895] opcache/pcntl/cli: Fixes few functions signatures. --- ext/opcache/jit/vtune/jitprofiling.c | 6 +++--- ext/pcntl/pcntl.c | 2 +- sapi/cli/ps_title.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/opcache/jit/vtune/jitprofiling.c b/ext/opcache/jit/vtune/jitprofiling.c index 86efe047c403d..3154611fec620 100644 --- a/ext/opcache/jit/vtune/jitprofiling.c +++ b/ext/opcache/jit/vtune/jitprofiling.c @@ -157,7 +157,7 @@ iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventSpecificData) return ReturnValue; } -ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive() +ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive(void) { if (!iJIT_DLL_is_missing) { @@ -171,7 +171,7 @@ ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive() * on success: all functions load, iJIT_DLL_is_missing = 0, return value = 1 * on failure: all functions are NULL, iJIT_DLL_is_missing = 1, return value = 0 */ -static int loadiJIT_Funcs() +static int loadiJIT_Funcs(void) { static int bDllWasLoaded = 0; char *dllName = (char*)rcsid; /* !! Just to avoid unused code elimination */ @@ -301,7 +301,7 @@ static int loadiJIT_Funcs() return 1; } -ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID() +ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID(void) { static unsigned int methodID = 1; diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 0c11344e2580c..6f7d4cb3da627 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1074,7 +1074,7 @@ static void pcntl_signal_handler(int signo) } } -void pcntl_signal_dispatch() +void pcntl_signal_dispatch(void) { zval params[2], *handle, retval; struct php_pcntl_pending_signal *queue, *next; diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c index a5a16f2dea125..8ff7ef719e17f 100644 --- a/sapi/cli/ps_title.c +++ b/sapi/cli/ps_title.c @@ -284,7 +284,7 @@ char** save_ps_args(int argc, char** argv) * and the init function was called. * Otherwise returns NOT_AVAILABLE or NOT_INITIALIZED */ -int is_ps_title_available() +int is_ps_title_available(void) { #ifdef PS_USE_NONE return PS_TITLE_NOT_AVAILABLE; /* disabled functionality */ From b4db690cb30e6debd595b5ae9e11ffe006a24abc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:08:44 +0100 Subject: [PATCH 381/895] Fix GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range (#10440) copy_file_range can return early without copying all the data. This is legal behaviour and worked properly, unless the mmap fallback was used. The mmap fallback would read too much data into the destination, corrupting the destination file. Furthermore, if the mmap fallback would fail and have to fallback to the regular file copying mechanism, a similar issue would occur because both maxlen and haveread are modified. Furthermore, there was a mmap-resource in one of the failure paths of the mmap fallback code. This patch fixes these issues. This also adds regression tests using the new copy_file_range early-return simulation added in the previous commit. --- ext/zend_test/php_test.h | 1 + ext/zend_test/test.c | 17 +++++++++++++ ext/zend_test/tests/gh10370.tar | Bin 0 -> 11776 bytes ext/zend_test/tests/gh10370_1.phpt | 29 ++++++++++++++++++++++ ext/zend_test/tests/gh10370_2.phpt | 30 +++++++++++++++++++++++ ext/zend_test/tests/gh10370_3.phpt | 36 +++++++++++++++++++++++++++ ext/zend_test/tests/gh10370_4.phpt | 38 +++++++++++++++++++++++++++++ main/streams/streams.c | 23 ++++++++++++++--- 8 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 ext/zend_test/tests/gh10370.tar create mode 100644 ext/zend_test/tests/gh10370_1.phpt create mode 100644 ext/zend_test/tests/gh10370_2.phpt create mode 100644 ext/zend_test/tests/gh10370_3.phpt create mode 100644 ext/zend_test/tests/gh10370_4.phpt diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index a5b11a6041dd6..87412ba34d3e4 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -53,6 +53,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zend_test) int replace_zend_execute_ex; int register_passes; bool print_stderr_mshutdown; + zend_long limit_copy_file_range; zend_test_fiber *active_fiber; zend_long quantity_value; zend_string *str_test; diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 96898d2d71f1c..c6a9c7fb60a8d 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -650,6 +650,9 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("zend_test.replace_zend_execute_ex", "0", PHP_INI_SYSTEM, OnUpdateBool, replace_zend_execute_ex, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.register_passes", "0", PHP_INI_SYSTEM, OnUpdateBool, register_passes, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.print_stderr_mshutdown", "0", PHP_INI_SYSTEM, OnUpdateBool, print_stderr_mshutdown, zend_zend_test_globals, zend_test_globals) +#ifdef HAVE_COPY_FILE_RANGE + STD_PHP_INI_ENTRY("zend_test.limit_copy_file_range", "-1", PHP_INI_ALL, OnUpdateLong, limit_copy_file_range, zend_zend_test_globals, zend_test_globals) +#endif STD_PHP_INI_ENTRY("zend_test.quantity_value", "0", PHP_INI_ALL, OnUpdateLong, quantity_value, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_ENTRY("zend_test.str_test", "", PHP_INI_ALL, OnUpdateStr, str_test, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_ENTRY("zend_test.not_empty_str_test", "val", PHP_INI_ALL, OnUpdateStrNotEmpty, not_empty_str_test, zend_zend_test_globals, zend_test_globals) @@ -930,3 +933,17 @@ PHP_ZEND_TEST_API void bug_gh9090_void_int_char_var(int i, char *fmt, ...) { va_end(args); } + +#ifdef HAVE_COPY_FILE_RANGE +/** + * This function allows us to simulate early return of copy_file_range by setting the limit_copy_file_range ini setting. + */ +PHP_ZEND_TEST_API ssize_t copy_file_range(int fd_in, off64_t *off_in, int fd_out, off64_t *off_out, size_t len, unsigned int flags) +{ + ssize_t (*original_copy_file_range)(int, off64_t *, int, off64_t *, size_t, unsigned int) = dlsym(RTLD_NEXT, "copy_file_range"); + if (ZT_G(limit_copy_file_range) >= Z_L(0)) { + len = ZT_G(limit_copy_file_range); + } + return original_copy_file_range(fd_in, off_in, fd_out, off_out, len, flags); +} +#endif diff --git a/ext/zend_test/tests/gh10370.tar b/ext/zend_test/tests/gh10370.tar new file mode 100644 index 0000000000000000000000000000000000000000..4dbb754430d5d896c2189f882a2558470c38f851 GIT binary patch literal 11776 zcmeHtQ*17P^JRH!+qP}nwvDfDznZspZ*AMQZS&Uct!=ma+ibGgWFPivH~a9PhndMt za&pdjoQ#`=tDB{bodwAM#b9P;=459l24QAq;o@NaU+aH1%&hGHNyIGdY@8gdEUfG- z9K_5lY%I(iAjHi77dib;XrQZ`iOYYeIoMd(x&F`T|K9wc_WxbVe{}o@>3`J!9pV4W z37@%=YPCx^-A#x{2M@*F?dNxcZm8g}TH+oMCE*o=mZ&UNyWX^WkMuB6D+6-u>M)=(zuw3}kbd?IZYI@*9nchC5K0P-F>?5#bXUn5lA7VKxt{a@G z+Ql{8p|i!VgiLO`;kPiUv)|WqR&_VSA{W}tS0?m92UtIW;y&LyfQ3?5|L-Y27%cwM zh8N|WbS$vt56$=4o9%Xu`dzR6!}M&FJ9#dKl>f-WsZT3|0P#lClSXh<_AgZ zm<4*Beu0D%lc$3^6;zkM5_Zij4@FCBn)#;c%6>;N;rXYy%#qBu>%`nw%BWQR@u^;3 zaIPD{&2YVWril1lV|_*SBt8WPD*U<2wr+|6JAA$=%W9OlV+HQw zxg;sUM7h(1-dtbwQ-aRl)(F8H!B@p#<~CSvxHFHI*GT)V(+vw1wIE5EF}DV0nbw1 z!sTxEWKID(Mm(CgKaPmkpcfM@`nJFoLDm_E?<-Da->joaQ_xI!bmPY0{_CLTO@joC zcp(N9yQ~24CP@^U@pYnSc+)ZsYDp+Ddm_pcNt47b7NkD5)p9Qc5)9iNy{n*4 z;ff~1ksdQ=Tv(p^c~%1@WR&qE!Yz_zj~1-_MXYNE@~h3B_0j&;4*6=mcjGYl`4O7V z(+)_sL;K;-ta({UOIP0a8an2VkZrxdmOSvA{b9NiBYnu_?+J(W|smqYa9CYHwUa zAc)t{enM0?s3iWvF}X^n>}3Y0?-ksu#1v)lXAYO{!bEy76l73WsC1s4Ef*3OK1Y}1 z`nXR0u^V3H&aK;WHw>ZAmfDIfr2e-?OG~UjMeB~k7N3VDSatg9uPjcTEuYW&D+8># zQd4}u15Cu}M@<(5l=?TmQehXO4;kdDPbFuPA65S=h8v2NVzxk)!1-^FY%S*8)I2b? zrr>sc+$b2GK~ET24xme9=llyuRijV0N6BzW{~~hf$!}+`a;O&2iSPJz*6cK-N?}m{ zEkWIS%j64Tt}_tEfAZQWEsMmil872HYB89g@cPYpYPBA6qd|k&3KoY4c!qrpCMej< zM1;%qXPjE}=-OmQ``TaqouuzOp`)=gc$ zu`cR9{u9n_5Gl84Z64DCZw7KIL&vzf(yFAcPqvE=l|F%O@Y1J1i7I>!16A)^x!6UH z4h)!`#+eJE`5iE(Ed>8gPi}v`;+oUCM(GK;=(qQrMf`l+N6271)#Hh~v+A7jM4|jh zGHRN4ek#9f_OF@1IHXf#`zhahb?Of^1Nznrz8?pI7mj6LH+NlSMCk%+Q?phYS340` z*rMI87Lq%}@?&=7UzTbe)IVUoj^@~sgF8`93dk7I@CDd;Gg=#5emO#n%433#EJ+e^ zzuDXqRoohu?rs>+%bl6eB;D?XM(Y72J21>NQ!poj*>d9tWi{ilpFJ&DP1lnTFUH$` zP$Z3LanD_?_0fBWXV8c=Zp0~QvFie*Y*sCeSc)OX`+&&&Qoe2u9~IVJs1!mf$Qj=f~cM-#bRVf|``tCtUOn61F#vjkwV8S1qPke8zX^cF?Wv zC$~Z;>_*+KM(=gP%80DMb+IAwX$L!F#p*S-D-~Fnc=?J z&tKeKwG(!G;UX#hfx^(3n;U)~SU@rY*PlK-LW!DDYYHpt9uw7Jb!s{t!BB33d-S+K z?ETPbd>RlX2W#;)HhW=18Bc!d?0oY2HYP)G9;P(CURE8pn0i^|YVd6Z$y7;%y=|qK zmd_ZDX?-4mE42$a??zuj{zrvG=v4sMxyEhF<(-%mawEMRkM>?XxD0?N>-oj2{;?r9 z#k`>VJZg$F4YE|N`>#9m-tYz`MfzzRWpGBGas#FifD;-)d1XML@mbh{X#UGv%uOBr zLw!+(j?1`{J;XQrVtMVbB0bi(D&j$nn|{jz{>99L49ndhIwAE;DK-%*3xQQq7?A$s zQ3N>o>aAP-Dw4vYG`pwUzP<0q(d~Ab5Oe-q+tJBze`9FvlpP>FXQTF>-F^E z;e;z^gkWNQGW-X~wlbA1?6}R_{((@OB?s4A&uws~Sy(Cm_c1R;Z73J*gb-*5mmn^~ zfX2X%R&;?YYg6*dWy;A|0=KtJ!R~g$_)8~LlN1IU=@}H$`NMt663`Lmi6SY$Q;m%B zsXPPhXOBOAv&6u?3F%0`##_RC>|Umb>VW(V1(aKE`J&E6$VZIAmcMRs=@XlAv>;-$ zS!ZhFGA74|6(}a}c+1mu0pn$ENZ}38p@PsWRzj>+6SKyK-}Kum@V$tUJWW9k;C!cT zaUC08mw7=lJ^h4k{$8#0QvM|QO4YYCuYjgNTD&GS7;|Mcve{M7*TVEdB8bQsO+Ilu z5eKZHnbDuQ#5Mif0F?k&n9{1~h9@Bn)$IFCct`WB0)O(@sc^m_yxCdMV5h`SfKYM= zqAJ|h6tX!xjpH=hDot4Bvi?(OeJ5|5WX@GO zo~@p0*4u=;9!mp%19Xc}Z3q({38eGaJ(xEKU%My4Tr;U>SAIZ7qEH3B>YVKTAj}$s z&B79HImiib*$#-UT5+Jk3N5Fbalb3T86H{EIQ7YX%HWv>+jLrNdYlnii1kNC;x@0v z@B9?W52HY#ZLYY2f>z_wesfW!=qC7{1R2*uZ&OI99yF$e>=8l_E|+%WlVg z;7x~#7*X*VLe|VKJSihuwZMb0w%9A&bE2h7PO^^Tx%p0@UR?YFNuQJy+9eMl@6ux zX<}nyPP{k1wnqYs5EM-m{dPnYF|31FQvp zL}Fk5Fr0-%j%m+tVr`-Kf^S%_X{fRV$>!7M?5F+1Dn)G!ou-BCx0=I!d{WlfTB~Rx z2Q|)2MPhBLC%zyP@2aq4vzNoE{ba0s&Tp>1a;;U8&&NfXV7+PHv@Z{}YyGEpA;5jK7^bi&fK3AcO(-g$b>9g^3QKQD2!4=rh|x1y2auc0 z4&e=Wxz#uFB+P_V>>FuDQk+*mKOPHgXCz`dEhBhI<~&MHNq@gP^@I#`Qfmka0t+k= zUv~@601-fB)wBFT;nFj9cc=bLQ*Tjv#QH?0;|hxRP2xi2c;9eyzf9*ZgN?l+GP$mM z#<4?%HZE$7A5!Ybn;DEAPc0s@58jjo!#G+6ZXCWPn;|lala0lz^Pem_^mT%1_Ti=A zIqAeXZQJc6VKn)FDw@;2>yEHArVz>rtk~YYKG_;WLX9gqd+-2_LHwWqtvsRDUTAqy z7d^yqB1vwalO)~3xjHx*Uw|vM5VZlztZMO4Q$k5lu zKriZ!epduG&cTd$OC;$kRKQ76;l)If;dMV) zh6gj+5H09=u9U%zWsgRlbJ(r(dXDhf?o1?S5LRdW&}hR5Lp=KI1VcP z==S^!IafO#diA}i5MB248t;)7I`UbL*&PV-0}29H;E2A@ag(IbFZ&Vi@sIU)@;(nK zg7RuC_4Y506q!eORWZbJWTX*g6`0KXa7vi<#L}b))LpDXKL|7`5pN4SafljVLb{a{~Xc}@(@%*8MRL&VoULkf|c&e!+k z;%k+mk@EcCXf^%#tcX|SU6_!2)?MFwh~O^AZZB*xHQ&9xB=?&zO~!WJa$AT`zfaa_ zxpaaPQV+LTu5Ft20)8(YjE)R~Qq)>tvXlNZ8(NB5JSXt+;;*V7vFTw5SIA)Sh_2STU1p;(cpO_@S#qMi+)U)D~C^pAYqpt$_^ zhnn~r;`rtH6#9xNKXix+TqGm^_PIJ{RL)=jZifE$R$M0F3BFWwAnzBulq@wyLYHaS zoM|bW5>@myTCA9lbpA?-Y{gn24`+l-MSxaT-h-zCtYlZHOuO1{oO1^Ez``l0xw1)j zV)%hQ?j?+W0_se$#KX5v=HH!RKMaGzKs>Cet6x`wWfF4zZ`s7tY`h&HW_seV0j#Yv)qM`L3AQIR#W_jUZm zZdTx2@r4}ERQ6>IWx@hwcE6Fza(Pl7Y z`o&8bBNXL zpXBYp(NE_yzrcqe=Cr_+=@-840RwDpYSFDPAwO+)6RFLn2luA1qC40E9Zbzhrc zQ@k?vVqW+N-Z}%#5Fc#yTAAbUq=pSm*rG~?z?KzY=jIdm<47 zDd7SKeb9OZ$@jUW<~5e`WQp%!;=!8HVBf+MqSmNACNAcWpd9Vn_$)_WW|YXv9WTyx zAALoxeqG|Q$1fsrEh)z8_NbL~^WUHdrB%U5mFK#NNAXFu>K-Ai8#LOL9V*b+?%68# zBf>~cceyE6qeW_Uo0?n&(1u)1ytPtK7$d(-=#}B^*KhgVV;rtWm=7jb5;zC=Yvr|> z{-UYEd^bTr#!X^wFf+;$HZ@}j6q*$LmVurkf^=;!yMFAfXBrD86KDNZOisqQA3ppz z(+1v}LU?)0arH>4vkPMB6&YhybHzPmoqYLRORf#yo9ChPnN>#B-&ToXS&DDdU(Qm7 zn1o`Lza%uG32mTCGbP~-IGdf!B>r~Vl=YwThYt? ztYDj=KLBE|gSWQ5b5pm$buRw;i}wdYk_WRY%r z(e%r)23FSFwUvZx@Lwd9C{}J79|#h{8BR>&39IAKoCbGzZY+Ok!V-M6+^zVqRiJ{> zrEV6dc^Bp|bn7Np$E_3RCkj&vuf$Fwfp?hc@55`j0e!S0OUWS*g{q#a_R# zt}4qUcDWp3Be(HrP4$`umMyObUliHJ0REqn#HfdfPk*XKqqagNZbo&7RNYWd%y9_D zLlcxfU=;icL&`t)P!Zi(!33pT7X4@UNp~B4ktV zuK~!(8k`q11dCT&rg(v&%`7)2nuq4E69{WkS1XT9%P($|I1i-`J$?f>BOz0KdX5;1 zHHYs{pc0cDlCu!f(5(coxu+b;5B#ucf5aUgvcW5`Em*KZuHqBDWuL+Q0en-Rnz+K` z(o&mJ@dv^+!O$NsE^Q0ig+WnccNxt+;c?j7GMx>~+SeN_b!qBV3)yf2m9;GhTn07K zHH;Bmcl)tcXjj%5w}ul{sL}rC7EauvqoavrmlRi&CfRyzFF;_aO-U5j(e~*zc{Ihq zl^|=#PZk^mTTSO?WjKEq-C>eM`k%do=bot^P%yEfe%iVhThDtd)1odzRR=D$h@S1H zH{U1!Jn@L2%$59&asHcqM4qy?w@Yoya+6&_?j?gAVYe7@Gp6VT0SDjZkZM$_W-(Cb zCY0m!jo1C$>E>&?b_xi^9rMtN@`7L?8e)$0Fn}xXc>-l&AI&cv@?Nd~gEY=~T+x?-km|c!^eTTsE>gzY9WLic2gAOSqJ4Y9Uvxr0x_+%WG9hsATR?Z8(;h zLALdu>-GoO%I+R=KMC;Q>0sS0@=r6WMjOcsM2B(%y_@gtg&6D>T4sB;?yM|ry0Oar z>F%F5tgUM|!HoiEc}t3c?F_oJYoeWKGiDdPFmE3}oArHexsLmh@94(FNH6$yKsPS3mhOYp2=N5}N8TxU63iqi#Fsv>1lKs% zG#`-wo+$NJ3+6Y>z%*uD=xL%ZWKmOaP>zPG)hbO)W&<-ZpN=%HibH|m?eV+qfl~ru zjMSZt`2fIUS$qNxDJ;1SJywp~3emRw{m>D$vJL;sxm*DIGs16Ooi(RHH|`KxVp z{h%e>f#K7PlUD&AOkq%!(DRt~CFre$od0q*YgX>PM& zotgelyWSN>-7GoniY6C2WAc%~TmdqYkoi(h{XD05XedC@b%04Bj>hUemzNxmLDS~@ zGnNXX!X#sM8Eqru+2EI{l`QeG0&%p#xe0>ukZL7?a%VF(%CjnI{_e}Fbs-RttKIi5W1jtmMsu6e&gjDCj2Tk6|K zbn+{r$_a`oERdoODta?>PF|!Z_CRTbtnQ=kQrNU)KeMWHPF7RMqWJmn3cJtp`K`Jq zMv8IQ5U9tf%k**KJWrQ+=6O-1T_L@?7n+^}nL3LB01VbXB0AfRlONjOQ}u6Rt0~#+ zHnt=GeT!>2z{3%@szZ)H&Js&G_fqNYbtwZo3*apLbvBdPIw=_*GojdzG2Y8`Xfy_~ zsF$~Eo{+Kq8eNR4c9E9IPWjhLY?mh5wYq_vp-wwWEQY)zMZG!DRKCM#WqN8S^6zrD zVP*F@3AsPw^VQ$+G-ujWZcGL4$vKI^gE4bO+20(D93-=iCxH%tpS5uZLhzNXW;CHV zQPngJeqEMp+*pu01`-i&QgP@Q7xtd^smb#~GHMAp?!Qp)?2SJ8{e+E(D53XjahSSd zu4Vv+oCBu0L=Zc8^!0~&(G5=ReVG|65H&rc+)|c^vr$tZ4PjemKy#^ivx4zPpvdZxMKfs0!`JTY9ddH?wHQ{$*}FBbP@3y6gqgXcFq429AAlg6pM zdQFo|VAJL~Q`_Xo@{C|cF*#RujYy>7@QK=w#>>N|Eb@W@yGS8FL(@Kv_(MY+EJ{<; zi@b9{4?pHy|1KW4pkoRR@m$|uj#P?ABJYW*JQP%Fq-mhr9I@jG4n=6h;6&5ET;vH& z%3zKBr`N%+n3fHPlE& zI49_Ab#HZ=o*0I>0op)WsgSP!aywRCU4n{Lp89VKPMsfr|pSJ>xB>({bSdVUtk_OTjK{nyCd z8#0bnt3K`LDnS6JSNthghBDuue>!7sE_}ixwbZQ1=)Qa>L7=2|5Hy70S@H)PXRCR= ztP3CEwnr0d3?oD*Y0LYMCFb$)8$Dfz34G#Xn%pW(w4eJdAj4Y zvofBWQ~R%=zSx`E#uy3Fqfo$nxwqSmX!SNaBN+p(dtyPJw0dBS7%fqDHcg;oS%j)a z`7p{oAO~Hc%JiLQ&LQ@dpY#fk52fEm@Sz{XoMt<0l5RVT`R7^TS5?-3k*N?a# zt>6HE;~4FesYC+6G%)Vdl2g5m$?>H&8EE!s;y%k!+bVTR22O;vOlkJs#q;4&g%#VeP)N5}f-NPClVj7zEw|EhIEChds15#d2 zaOyI$!)E!7@Fn(MI{-;k7~^viY`7WMc>ZDK3hO-1TxTuf zH$l7hT}Dt`^`0?`))C9$CuqI_n1R4v?~Ia^4WG{c&=1-dq0wAD2) zh8mvIxxZCnEFQ68%nJ-xj!?vas|4UOK}frji*9^>(b{C(N1Hq*&Af{dz#PQmJY%#T z%|$~q_*PI+qb)Ze=KB&Cjh`K(H-EXULE!^$Y(+z^Zku-{+#H_p(1%cLm)ooS=}DAC zYDW)hVFJ*!u|#{;9oucVUqP#c6Z?R`wXrGVxH#?{_*c{fYB(iXn_OhnLp4@&E~g=u z1eT+C?vJ+9hi?u;^5%fMI$!0bStr{*nP-J3Wu9~S*AzQFi@}9bFot@YgQ0(0;v0q1 zYhWV9hCryky!{SrCZr%_eS87*d}P58++AYJ(Oxe-5?4DOhLMdiT5@_=#elwjPD(uH zyuxDYw*K^&)!~>+e~mck@21Yg5$Gbd)B|B7Ku50p_Gs3^Hik(=NL#Bn-8xDJWI%Xt z?Gj_#sKYEtIL+R%x8d%P{uAoE|IaM22r8!Hwk`J!0-AN+e1mi3-EzH!+yar5JWfnm zrOW_%!_Kw!Ks@(K`|P^FB=$w8WX zPp~0Xqa}B7ip}duPQ%GLw2)V4#@-R!C=O*iZwTR}U70NrT}CvTKObMz%PllpSe#0l&@@+YBqXaL?M_AS7|&B)6Yjl|LnNlE zmnuVQ^1X3$@6Dc>gyt!NwfpByn73R`X~s?&Sj^)5% z5)v(6=Bx9_*~-mYB~OV7?crDsTvP@8o15!dOL2 z+Lp~b4Omuq#>ZUL9T(+khZtB8wvkcyywp6C$MV?k-=1-I>qHj7SMOgQL+67B3q$4S z7S$s}PdQ%}xWD95RZ6jPxDKGN2{Qj^M7puHu@B9b(j^1j+eX3vxoXK3v{q(bBG1zs z1!X5?z-KuIm#b8f!Dl)KY~t*`3oKlphdH9+2g#>B^?Y*g-yiR~;+4)kEK-biqWD;hoxf3-jor{exsCx-Hp~ zfk8YZTXS4n3m>nWrmNDEnn`FDC=)unTF0KzZ-`q|tPCtGZgZ=cxbjc8YMK;5XCMDx TJ|+GassD1|za02~;=q3cev%i& literal 0 HcmV?d00001 diff --git a/ext/zend_test/tests/gh10370_1.phpt b/ext/zend_test/tests/gh10370_1.phpt new file mode 100644 index 0000000000000..f594c3d70ec8d --- /dev/null +++ b/ext/zend_test/tests/gh10370_1.phpt @@ -0,0 +1,29 @@ +--TEST-- +GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range - partial copy +--EXTENSIONS-- +zend_test +phar +--SKIPIF-- + +--INI-- +zend_test.limit_copy_file_range=3584 +--FILE-- +extractTo(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370', ['testfile'])); +var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370' . DIRECTORY_SEPARATOR . 'testfile')); +?> +--EXPECT-- +bool(true) +string(40) "a723ae4ec7eababff73ca961a771b794be6388d2" +--CLEAN-- + diff --git a/ext/zend_test/tests/gh10370_2.phpt b/ext/zend_test/tests/gh10370_2.phpt new file mode 100644 index 0000000000000..6f0d9da1207bd --- /dev/null +++ b/ext/zend_test/tests/gh10370_2.phpt @@ -0,0 +1,30 @@ +--TEST-- +GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range - unlimited copy +--EXTENSIONS-- +zend_test +--SKIPIF-- + +--INI-- +zend_test.limit_copy_file_range=4096 +--FILE-- + +--EXPECT-- +string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" +string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" +--CLEAN-- + diff --git a/ext/zend_test/tests/gh10370_3.phpt b/ext/zend_test/tests/gh10370_3.phpt new file mode 100644 index 0000000000000..2df357742876d --- /dev/null +++ b/ext/zend_test/tests/gh10370_3.phpt @@ -0,0 +1,36 @@ +--TEST-- +GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range - partial copy using stream_copy_to_stream +--EXTENSIONS-- +zend_test +--SKIPIF-- + +--INI-- +zend_test.limit_copy_file_range=3584 +--FILE-- + +--EXPECT-- +int(10240) +string(40) "a723ae4ec7eababff73ca961a771b794be6388d2" +--CLEAN-- + diff --git a/ext/zend_test/tests/gh10370_4.phpt b/ext/zend_test/tests/gh10370_4.phpt new file mode 100644 index 0000000000000..69dce59ea229c --- /dev/null +++ b/ext/zend_test/tests/gh10370_4.phpt @@ -0,0 +1,38 @@ +--TEST-- +GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range - unlimited copy using stream_copy_to_stream +--EXTENSIONS-- +zend_test +--SKIPIF-- + +--INI-- +zend_test.limit_copy_file_range=4096 +--FILE-- + +--EXPECT-- +int(11776) +string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" +string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" +--CLEAN-- + diff --git a/main/streams/streams.c b/main/streams/streams.c index 20029fc73eebd..de53e483c62b6 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1634,8 +1634,21 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de char *p; do { - size_t chunk_size = (maxlen == 0 || maxlen > PHP_STREAM_MMAP_MAX) ? PHP_STREAM_MMAP_MAX : maxlen; - size_t mapped; + /* We must not modify maxlen here, because otherwise the file copy fallback below can fail */ + size_t chunk_size, must_read, mapped; + if (maxlen == 0) { + /* Unlimited read */ + must_read = chunk_size = PHP_STREAM_MMAP_MAX; + } else { + must_read = maxlen - haveread; + if (must_read >= PHP_STREAM_MMAP_MAX) { + chunk_size = PHP_STREAM_MMAP_MAX; + } else { + /* In case the length we still have to read from the file could be smaller than the file size, + * chunk_size must not get bigger the size we're trying to read. */ + chunk_size = must_read; + } + } p = php_stream_mmap_range(src, php_stream_tell(src), chunk_size, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped); @@ -1650,6 +1663,7 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de didwrite = php_stream_write(dest, p, mapped); if (didwrite < 0) { *len = haveread; + php_stream_mmap_unmap(src); return FAILURE; } @@ -1666,9 +1680,10 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de if (mapped < chunk_size) { return SUCCESS; } + /* If we're not reading as much as possible, so a bounded read */ if (maxlen != 0) { - maxlen -= mapped; - if (maxlen == 0) { + must_read -= mapped; + if (must_read == 0) { return SUCCESS; } } From f1694409ccf5ac14da80bc85d021915a2dd8ca1d Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 10 Feb 2023 13:11:03 +0100 Subject: [PATCH 382/895] [ci skip] NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 0da29180fc236..4fdc055c86aa5 100644 --- a/NEWS +++ b/NEWS @@ -568,6 +568,8 @@ PHP NEWS . Fixed bug GH-9653 (file copy between different filesystems). (David Carlier) . Fixed bug GH-9779 (stream_copy_to_stream fails if dest in append mode). (Jakub Zelenka) + . Fixed bug GH-10370 (File corruption in _php_stream_copy_to_stream_ex when + using copy_file_range). (nielsdos) - Windows: . Added preliminary support for (cross-)building for ARM64. (Yun Dou) From 10f2378584ba29ef3abeb0cdc502ad32186aad96 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 10 Feb 2023 13:31:57 +0100 Subject: [PATCH 383/895] Fix concurrent testing --- ext/zend_test/tests/gh10370_1.phpt | 8 ++++---- ext/zend_test/tests/gh10370_2.phpt | 6 +++--- ext/zend_test/tests/gh10370_3.phpt | 10 +++++----- ext/zend_test/tests/gh10370_4.phpt | 8 +++----- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/ext/zend_test/tests/gh10370_1.phpt b/ext/zend_test/tests/gh10370_1.phpt index f594c3d70ec8d..99a2da7547bfe 100644 --- a/ext/zend_test/tests/gh10370_1.phpt +++ b/ext/zend_test/tests/gh10370_1.phpt @@ -16,14 +16,14 @@ zend_test.limit_copy_file_range=3584 /* Note: the value 3584 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap * at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */ $archive = new PharData(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar'); -var_dump($archive->extractTo(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370', ['testfile'])); -var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370' . DIRECTORY_SEPARATOR . 'testfile')); +var_dump($archive->extractTo(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001', ['testfile'])); +var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001' . DIRECTORY_SEPARATOR . 'testfile')); ?> --EXPECT-- bool(true) string(40) "a723ae4ec7eababff73ca961a771b794be6388d2" --CLEAN-- diff --git a/ext/zend_test/tests/gh10370_2.phpt b/ext/zend_test/tests/gh10370_2.phpt index 6f0d9da1207bd..d78a3c395b6aa 100644 --- a/ext/zend_test/tests/gh10370_2.phpt +++ b/ext/zend_test/tests/gh10370_2.phpt @@ -15,16 +15,16 @@ zend_test.limit_copy_file_range=4096 /* Note: the value 4096 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap * at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */ $input_file = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar', 'r'); -file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out.tar', $input_file); +file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_002_out.tar', $input_file); fclose($input_file); var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar')); -var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out.tar')); +var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_002_out.tar')); ?> --EXPECT-- string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" --CLEAN-- diff --git a/ext/zend_test/tests/gh10370_3.phpt b/ext/zend_test/tests/gh10370_3.phpt index 2df357742876d..5701c18d50cb4 100644 --- a/ext/zend_test/tests/gh10370_3.phpt +++ b/ext/zend_test/tests/gh10370_3.phpt @@ -14,23 +14,23 @@ zend_test.limit_copy_file_range=3584 --EXPECT-- int(10240) string(40) "a723ae4ec7eababff73ca961a771b794be6388d2" --CLEAN-- diff --git a/ext/zend_test/tests/gh10370_4.phpt b/ext/zend_test/tests/gh10370_4.phpt index 69dce59ea229c..8cdb26356f02d 100644 --- a/ext/zend_test/tests/gh10370_4.phpt +++ b/ext/zend_test/tests/gh10370_4.phpt @@ -15,10 +15,8 @@ zend_test.limit_copy_file_range=4096 /* Note: the value 4096 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap * at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */ -mkdir(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370'); - $input = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar', 'r'); -$output = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out.tar', 'w'); +$output = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_004_out.tar', 'w'); var_dump(stream_copy_to_stream($input, $output)); @@ -26,7 +24,7 @@ fclose($input); fclose($output); var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar')); -var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out.tar')); +var_dump(sha1_file(__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_004_out.tar')); ?> --EXPECT-- int(11776) @@ -34,5 +32,5 @@ string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d" --CLEAN-- From 5d9ee8f920d297cb2da55f041abea0359159f735 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 7 Feb 2023 13:24:01 +0000 Subject: [PATCH 384/895] Fixed OSS fuzz issues #55589, #55599, and #55727 --- .gitattributes | 3 +++ ext/date/php_date.c | 12 ++++++--- ext/date/tests/ossfuzz-55589.txt | 1 + ext/date/tests/ossfuzz-55599.txt | 1 + ext/date/tests/ossfuzz-55727.txt | Bin 0 -> 512 bytes ext/date/tests/unserialize-test.phpt | 39 +++++++++++++++++++++++++++ 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 ext/date/tests/ossfuzz-55589.txt create mode 100644 ext/date/tests/ossfuzz-55599.txt create mode 100644 ext/date/tests/ossfuzz-55727.txt create mode 100644 ext/date/tests/unserialize-test.phpt diff --git a/.gitattributes b/.gitattributes index d71a50b7b135b..f8b91505bc983 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,3 +23,6 @@ **/*_arginfo.h linguist-generated /Zend/zend_vm_execute.h linguist-generated /Zend/zend_vm_opcodes.{h,c} linguist-generated + +# The OSS fuzz files are bunary +/ext/date/tests/ossfuzz*.txt binary diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 10992e3f487d9..9bfc4e19740ac 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2706,6 +2706,7 @@ PHP_METHOD(DateTime, __set_state) dateobj = Z_PHPDATE_P(return_value); if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTime object"); + RETURN_THROWS(); } } /* }}} */ @@ -2727,6 +2728,7 @@ PHP_METHOD(DateTimeImmutable, __set_state) dateobj = Z_PHPDATE_P(return_value); if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTimeImmutable object"); + RETURN_THROWS(); } } /* }}} */ @@ -2789,7 +2791,7 @@ static void restore_custom_datetime_properties(zval *object, HashTable *myht) zval *prop_val; ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { - if (date_time_is_internal_property(prop_name)) { + if (!prop_name || (Z_TYPE_P(prop_val) == IS_REFERENCE) || date_time_is_internal_property(prop_name)) { continue; } add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); @@ -2813,6 +2815,7 @@ PHP_METHOD(DateTime, __unserialize) if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTime object"); + RETURN_THROWS(); } restore_custom_datetime_properties(object, myht); @@ -2836,6 +2839,7 @@ PHP_METHOD(DateTimeImmutable, __unserialize) if (!php_date_initialize_from_hash(&dateobj, myht)) { zend_throw_error(NULL, "Invalid serialization data for DateTimeImmutable object"); + RETURN_THROWS(); } restore_custom_datetime_properties(object, myht); @@ -3821,7 +3825,7 @@ static void restore_custom_datetimezone_properties(zval *object, HashTable *myht zval *prop_val; ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { - if (date_timezone_is_internal_property(prop_name)) { + if (!prop_name || (Z_TYPE_P(prop_val) == IS_REFERENCE) || date_timezone_is_internal_property(prop_name)) { continue; } add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); @@ -4449,7 +4453,7 @@ static void restore_custom_dateinterval_properties(zval *object, HashTable *myht zval *prop_val; ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { - if (date_interval_is_internal_property(prop_name)) { + if (!prop_name || (Z_TYPE_P(prop_val) == IS_REFERENCE) || date_interval_is_internal_property(prop_name)) { continue; } add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); @@ -5411,7 +5415,7 @@ static void restore_custom_dateperiod_properties(zval *object, HashTable *myht) zval *prop_val; ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(myht, prop_name, prop_val) { - if (date_period_is_internal_property(prop_name)) { + if (!prop_name || (Z_TYPE_P(prop_val) == IS_REFERENCE) || date_period_is_internal_property(prop_name)) { continue; } add_property_zval_ex(object, ZSTR_VAL(prop_name), ZSTR_LEN(prop_name), prop_val); diff --git a/ext/date/tests/ossfuzz-55589.txt b/ext/date/tests/ossfuzz-55589.txt new file mode 100644 index 0000000000000..77b4041ffa27e --- /dev/null +++ b/ext/date/tests/ossfuzz-55589.txt @@ -0,0 +1 @@ +|O:12:"DaTeInterval":2:{i:2;r:1;i:0;R:2; \ No newline at end of file diff --git a/ext/date/tests/ossfuzz-55599.txt b/ext/date/tests/ossfuzz-55599.txt new file mode 100644 index 0000000000000..624a0058c8f42 --- /dev/null +++ b/ext/date/tests/ossfuzz-55599.txt @@ -0,0 +1 @@ +|O:8:"DateTime":1:{i:1;d:2; \ No newline at end of file diff --git a/ext/date/tests/ossfuzz-55727.txt b/ext/date/tests/ossfuzz-55727.txt new file mode 100644 index 0000000000000000000000000000000000000000..02389f0815c8ec80fd25a2e3724822cc6db75e11 GIT binary patch literal 512 zcmWewRFi0BW>uYOWn%4bWoTrjX}!PT2z*pqhw`hRb31ulzNn`i>-_dtdtbE zxwxT#lZ%V{|Ns9h%#^HaGp)?6L1tuH85mfn00|&4G%z#-iCW?{IZeqr$jTUELZX!+ z&_bXYKqD-S%?v^2nOh@^>XK?C#9^pTU|Ybzi0nCJCxAQvayyAG2Whh~rk#_~;{(ab OsD8tv5FD6j(E$L2WsZRW literal 0 HcmV?d00001 diff --git a/ext/date/tests/unserialize-test.phpt b/ext/date/tests/unserialize-test.phpt new file mode 100644 index 0000000000000..b88ef0a1fcfde --- /dev/null +++ b/ext/date/tests/unserialize-test.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test DateInterval::__unserialize OSS fuzz issues +--FILE-- +getMessage(), "\n"; + } + var_dump($x); + echo "\n\n"; +} +?> +--EXPECTF-- +ossfuzz-55589.txt: +%s: unserialize(): Error at offset 39 of 39 bytes in %sunserialize-test.php on line 14 +bool(false) + + +ossfuzz-55599.txt: +%s: unserialize(): Error at offset 26 of 26 bytes in %sunserialize-test.php on line 14 +Error: Invalid serialization data for DateTime object +bool(false) + + +ossfuzz-55727.txt: +%s: unserialize(): Error at offset 230 of 509 bytes in %sunserialize-test.php on line 14 +bool(false) From 704aadd098f0d77a283eabd65d2f4a0e8b412b3f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 8 Feb 2023 14:52:40 +0000 Subject: [PATCH 385/895] Fix memory leaks in ext-tidy We must not instantiate the object prior checking error conditions Moreover, we need to release the HUGE amount of memory for files which are over 4GB when throwing a ValueError Closes GH-10545 --- NEWS | 4 ++ ext/tidy/tests/parsing_file_too_large.phpt | 56 +++++++++++++++++++++ ext/tidy/tests/parsing_inexistent_file.phpt | 22 ++++++++ ext/tidy/tidy.c | 9 ++-- 4 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 ext/tidy/tests/parsing_file_too_large.phpt create mode 100644 ext/tidy/tests/parsing_inexistent_file.phpt diff --git a/NEWS b/NEWS index 38fb6baefd980..6d6114f7c0fec 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,10 @@ PHP NEWS . Fix bug GH-9697 for reset/end/next/prev() attempting to move pointer of properties table for certain internal classes such as FFI classes +- Tidy: + . Fix memory leaks when attempting to open a non-existing file or a file over + 4GB. (Girgias) + 02 Feb 2023, PHP 8.1.15 - Apache: diff --git a/ext/tidy/tests/parsing_file_too_large.phpt b/ext/tidy/tests/parsing_file_too_large.phpt new file mode 100644 index 0000000000000..603a588b4f8f0 --- /dev/null +++ b/ext/tidy/tests/parsing_file_too_large.phpt @@ -0,0 +1,56 @@ +--TEST-- +Trying to parse a file that is too large (over 4GB) +--EXTENSIONS-- +tidy +--SKIPIF-- + +--INI-- +memory_limit="5G" +--FILE-- +parseFile($path)); +} catch (\Throwable $e) { + echo $e::class, ': ', $e->getMessage(), PHP_EOL; +} + +try { + var_dump(tidy_parse_file($path)); +} catch (\Throwable $e) { + echo $e::class, ': ', $e->getMessage(), PHP_EOL; +} + +try { + $tidy = new tidy($path); +} catch (\Throwable $e) { + echo $e::class, ': ', $e->getMessage(), PHP_EOL; +} +?> +--CLEAN-- + +--EXPECT-- +int(0) +ValueError: Input string is too long +ValueError: Input string is too long +ValueError: Input string is too long diff --git a/ext/tidy/tests/parsing_inexistent_file.phpt b/ext/tidy/tests/parsing_inexistent_file.phpt new file mode 100644 index 0000000000000..26dfea798574e --- /dev/null +++ b/ext/tidy/tests/parsing_inexistent_file.phpt @@ -0,0 +1,22 @@ +--TEST-- +Trying to parse a non existent file +--EXTENSIONS-- +tidy +--FILE-- +parseFile("does_not_exist.html")); + +var_dump(tidy_parse_file("does_not_exist.html")); + +$tidy = new tidy("does_not_exist.html"); +?> +--EXPECTF-- +Warning: tidy::parseFile(): Cannot load "does_not_exist.html" into memory in %s on line %d +bool(false) + +Warning: tidy_parse_file(): Cannot load "does_not_exist.html" into memory in %s on line %d +bool(false) + +Warning: tidy::__construct(): Cannot load "does_not_exist.html" into memory in %s on line %d diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index acf73b8a7c68b..1d757f44fae76 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -1059,19 +1059,20 @@ PHP_FUNCTION(tidy_parse_file) Z_PARAM_BOOL(use_include_path) ZEND_PARSE_PARAMETERS_END(); - tidy_instanciate(tidy_ce_doc, return_value); - obj = Z_TIDY_P(return_value); - if (!(contents = php_tidy_file_to_mem(ZSTR_VAL(inputfile), use_include_path))) { php_error_docref(NULL, E_WARNING, "Cannot load \"%s\" into memory%s", ZSTR_VAL(inputfile), (use_include_path) ? " (using include path)" : ""); RETURN_FALSE; } if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) { + zend_string_release_ex(contents, 0); zend_value_error("Input string is too long"); RETURN_THROWS(); } + tidy_instanciate(tidy_ce_doc, return_value); + obj = Z_TIDY_P(return_value); + TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint32_t)ZSTR_LEN(contents), enc) == FAILURE) { @@ -1362,6 +1363,7 @@ PHP_METHOD(tidy, __construct) } if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) { + zend_string_release_ex(contents, 0); zend_value_error("Input string is too long"); RETURN_THROWS(); } @@ -1400,6 +1402,7 @@ PHP_METHOD(tidy, parseFile) } if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) { + zend_string_release_ex(contents, 0); zend_value_error("Input string is too long"); RETURN_THROWS(); } From 3af33a3e20b6a4a418c772e217dabd20a97553d9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Feb 2023 00:18:50 +0100 Subject: [PATCH 386/895] [ci skip] NEWS (#10561) --- NEWS | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1c2b15b648ad9..840fadd5d72aa 100644 --- a/NEWS +++ b/NEWS @@ -51,13 +51,17 @@ PHP NEWS mt_srand() unknown). (kocsismate) - Standard: - - Fixed bug GH-8086 (Introduce mail.mixed_lf_and_crlf INI). (Jakub Zelenka) + . Fixed bug GH-8086 (Introduce mail.mixed_lf_and_crlf INI). (Jakub Zelenka) . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) . Fix incorrect check in cs_8559_5 in map_from_unicode(). (nielsdos) . Fix bug GH-9697 for reset/end/next/prev() attempting to move pointer of properties table for certain internal classes such as FFI classes +- Streams: + . Fixed bug GH-10370 (File corruption in _php_stream_copy_to_stream_ex when + using copy_file_range). (nielsdos) + - Tidy: . Fix memory leaks when attempting to open a non-existing file or a file over 4GB. (Girgias) @@ -572,8 +576,6 @@ PHP NEWS . Fixed bug GH-9653 (file copy between different filesystems). (David Carlier) . Fixed bug GH-9779 (stream_copy_to_stream fails if dest in append mode). (Jakub Zelenka) - . Fixed bug GH-10370 (File corruption in _php_stream_copy_to_stream_ex when - using copy_file_range). (nielsdos) - Windows: . Added preliminary support for (cross-)building for ARM64. (Yun Dou) From 13c34aac05dd704564fee15a788129754fa39eb5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 11 Feb 2023 00:21:01 +0100 Subject: [PATCH 387/895] Mark test as XFAIL See https://github.com/php/php-src/pull/10546 --- Zend/tests/gh10168_3.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/tests/gh10168_3.phpt b/Zend/tests/gh10168_3.phpt index fb8729c99661a..35c8ed42f8470 100644 --- a/Zend/tests/gh10168_3.phpt +++ b/Zend/tests/gh10168_3.phpt @@ -1,5 +1,6 @@ --TEST-- GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign typed prop +--XFAIL-- --FILE-- Date: Sat, 11 Feb 2023 13:22:27 +0100 Subject: [PATCH 388/895] Temporarily disable odbc in ci The unixodbc.h header is suddenly missing. --- .github/actions/configure-x64/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/configure-x64/action.yml b/.github/actions/configure-x64/action.yml index ee802334490ae..72abc69da5eae 100644 --- a/.github/actions/configure-x64/action.yml +++ b/.github/actions/configure-x64/action.yml @@ -70,10 +70,10 @@ runs: --with-lmdb \ --with-qdbm \ --with-snmp \ - --with-unixODBC \ + `#--with-unixODBC` \ --with-imap \ --with-imap-ssl \ - --with-pdo-odbc=unixODBC,/usr \ + `#--with-pdo-odbc=unixODBC,/usr` \ --with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \ --with-oci8=shared,instantclient,/opt/oracle/instantclient \ --with-config-file-path=/etc \ From a11e9c9d0251fecd18b5f44b264e64fc563310c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 11 Feb 2023 14:50:25 +0100 Subject: [PATCH 389/895] Simplify php_reflection.c, class name cannot start with backslash (#10536) * fix comment typo * (normalized) class name never start with backslash --- ext/reflection/php_reflection.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index dcc135e895987..94bbfdc81943a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3496,7 +3496,7 @@ ZEND_METHOD(ReflectionFunctionAbstract, inNamespace) zend_string *name = fptr->common.function_name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - RETURN_BOOL(backslash && backslash > ZSTR_VAL(name)); + RETURN_BOOL(backslash); } /* }}} */ @@ -3514,7 +3514,7 @@ ZEND_METHOD(ReflectionFunctionAbstract, getNamespaceName) zend_string *name = fptr->common.function_name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - if (backslash && backslash > ZSTR_VAL(name)) { + if (backslash) { RETURN_STRINGL(ZSTR_VAL(name), backslash - ZSTR_VAL(name)); } RETURN_EMPTY_STRING(); @@ -3535,7 +3535,7 @@ ZEND_METHOD(ReflectionFunctionAbstract, getShortName) zend_string *name = fptr->common.function_name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - if (backslash && backslash > ZSTR_VAL(name)) { + if (backslash) { RETURN_STRINGL(backslash + 1, ZSTR_LEN(name) - (backslash - ZSTR_VAL(name) + 1)); } RETURN_STR_COPY(name); @@ -5363,7 +5363,7 @@ ZEND_METHOD(ReflectionClass, inNamespace) zend_string *name = ce->name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - RETURN_BOOL(backslash && backslash > ZSTR_VAL(name)); + RETURN_BOOL(backslash); } /* }}} */ @@ -5381,7 +5381,7 @@ ZEND_METHOD(ReflectionClass, getNamespaceName) zend_string *name = ce->name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - if (backslash && backslash > ZSTR_VAL(name)) { + if (backslash) { RETURN_STRINGL(ZSTR_VAL(name), backslash - ZSTR_VAL(name)); } RETURN_EMPTY_STRING(); @@ -5402,7 +5402,7 @@ ZEND_METHOD(ReflectionClass, getShortName) zend_string *name = ce->name; const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - if (backslash && backslash > ZSTR_VAL(name)) { + if (backslash) { RETURN_STRINGL(backslash + 1, ZSTR_LEN(name) - (backslash - ZSTR_VAL(name) + 1)); } RETURN_STR_COPY(name); @@ -5667,7 +5667,7 @@ ZEND_METHOD(ReflectionProperty, setValue) } /* }}} */ -/* {{{ Returns this property's value */ +/* {{{ Returns true if property was initialized */ ZEND_METHOD(ReflectionProperty, isInitialized) { reflection_object *intern; @@ -6499,7 +6499,7 @@ ZEND_METHOD(ReflectionAttribute, __toString) } /* }}} */ -/* {{{ * Returns the name of the attribute */ +/* {{{ Returns the name of the attribute */ ZEND_METHOD(ReflectionAttribute, getName) { reflection_object *intern; @@ -6514,7 +6514,7 @@ ZEND_METHOD(ReflectionAttribute, getName) } /* }}} */ -/* {{{ * Returns the target of the attribute */ +/* {{{ Returns the target of the attribute */ ZEND_METHOD(ReflectionAttribute, getTarget) { reflection_object *intern; @@ -6529,7 +6529,7 @@ ZEND_METHOD(ReflectionAttribute, getTarget) } /* }}} */ -/* {{{ * Returns true if the attribute is repeated */ +/* {{{ Returns true if the attribute is repeated */ ZEND_METHOD(ReflectionAttribute, isRepeated) { reflection_object *intern; @@ -6544,7 +6544,7 @@ ZEND_METHOD(ReflectionAttribute, isRepeated) } /* }}} */ -/* {{{ * Returns the arguments passed to the attribute */ +/* {{{ Returns the arguments passed to the attribute */ ZEND_METHOD(ReflectionAttribute, getArguments) { reflection_object *intern; @@ -6661,7 +6661,7 @@ static void attribute_ctor_cleanup( } /* }}} */ -/* {{{ * Returns the attribute as an object */ +/* {{{ Returns the attribute as an object */ ZEND_METHOD(ReflectionAttribute, newInstance) { reflection_object *intern; From e787d6c9e62df0419c32cbb638fa77b0019cd507 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Feb 2023 16:25:14 +0100 Subject: [PATCH 390/895] Fix GH-10548: copy() fails on cifs mounts because of incorrect length (cfr_max) specified in streams.c:1584 copy_file_range() (#10551) On some filesystems, the copy operation fails if we specify a size larger than the file size in certain circumstances and configurations. In those cases EIO will be returned as errno and we will therefore fall back to other methods. --- main/streams/streams.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/streams/streams.c b/main/streams/streams.c index de53e483c62b6..4cd211ad85fe5 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1614,6 +1614,13 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de /* not implemented by this Linux kernel */ break; + case EIO: + /* Some filesystems will cause failures if the max length is greater than the file length + * in certain circumstances and configuration. In those cases the errno is EIO and we will + * fall back to other methods. We cannot use stat to determine the file length upfront because + * that is prone to races and outdated caching. */ + break; + default: /* unexpected I/O error - give up, no fallback */ *len = haveread; From 4d0ce3a7e5d22b2621c99820dd32997a9b508225 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 11 Feb 2023 16:28:51 +0100 Subject: [PATCH 391/895] [ci skip] NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 840fadd5d72aa..ba47161ab0c1b 100644 --- a/NEWS +++ b/NEWS @@ -61,6 +61,8 @@ PHP NEWS - Streams: . Fixed bug GH-10370 (File corruption in _php_stream_copy_to_stream_ex when using copy_file_range). (nielsdos) + . Fixed bug GH-10548 (copy() fails on cifs mounts because of incorrect + copy_file_range() len). (nielsdos) - Tidy: . Fix memory leaks when attempting to open a non-existing file or a file over From 19a7281efa2ad16243988f51707025ce76a64df2 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 11 Feb 2023 07:50:36 +0000 Subject: [PATCH 392/895] sockets add SO_RERROR/SO_ZEROIZE/SO_SPLICE net/openbsd's constants. Closes GH-10563. --- NEWS | 1 + UPGRADING | 3 +++ ext/sockets/sockets.stub.php | 21 +++++++++++++++++++++ ext/sockets/sockets_arginfo.h | 11 ++++++++++- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index eea4bfe68969c..0c9efb5ba63d5 100644 --- a/NEWS +++ b/NEWS @@ -106,6 +106,7 @@ PHP NEWS . Added AF_DIVERT for raw socket for divert ports. (David Carlier) . Added SOL_UPDLITE, UDPLITE_RECV_CSCOV and UDPLITE_SEND_CSCOV for updlite protocol support. (David Carlier) + . Added SO_RERROR, SO_ZEROIZE and SO_SPLICE netbsd and openbsd constants. - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index 9b5febd600377..5a8429b6e7633 100644 --- a/UPGRADING +++ b/UPGRADING @@ -144,6 +144,9 @@ PHP 8.3 UPGRADE NOTES . SOL_UDPLITE. . UDPLITE_RECV_CSCOV. . UDPLITE_SEND_CSCOV. + . SO_RERROR (NetBSD only). + . SO_ZEROIZE (OpenBSD only). + . SO_SPLICE (OpenBSD only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 82969270fb846..391d259271cda 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -293,6 +293,27 @@ */ const SO_ACCEPTFILTER = UNKNOWN; #endif +#ifdef SO_RERROR +/** + * @var int + * @cvalue SO_RERROR + */ +const SO_RERROR = UNKNOWN; +#endif +#ifdef SO_SOPLICE +/** + * @var int + * @cvalue SO_SPLICE + */ +const SO_SPLICE = UNKNOWN; +#endif +#ifdef SO_ZEROIZE +/** + * @var int + * @cvalue SO_ZEROIZE + */ +const SO_ZEROIZE = UNKNOWN; +#endif #ifdef SOL_FILTER /** * @var int diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index f630d829f4cd6..b16bdf100aaec 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d02c3c772eab5d9c1310839d2464887993f8e8de */ + * Stub hash: 2ee788183fb6f9925b3a7a8166076703319ba8c3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -432,6 +432,15 @@ static void register_sockets_symbols(int module_number) #if defined(SO_ACCEPTFILTER) REGISTER_LONG_CONSTANT("SO_ACCEPTFILTER", SO_ACCEPTFILTER, CONST_PERSISTENT); #endif +#if defined(SO_RERROR) + REGISTER_LONG_CONSTANT("SO_RERROR", SO_RERROR, CONST_PERSISTENT); +#endif +#if defined(SO_SOPLICE) + REGISTER_LONG_CONSTANT("SO_SPLICE", SO_SPLICE, CONST_PERSISTENT); +#endif +#if defined(SO_ZEROIZE) + REGISTER_LONG_CONSTANT("SO_ZEROIZE", SO_ZEROIZE, CONST_PERSISTENT); +#endif #if defined(SOL_FILTER) REGISTER_LONG_CONSTANT("SOL_FILTER", SOL_FILTER, CONST_PERSISTENT); #endif From a9437ceb6fcb14ab3985efec579a7af0fc3363b9 Mon Sep 17 00:00:00 2001 From: Frank Du Date: Mon, 13 Feb 2023 11:30:47 +0800 Subject: [PATCH 393/895] base64: add avx512 and vbmi version. (#6361) 1. Implementation based on https://github.com/WojciechMula/base64simd 2. Only runtime path is added to reduce the complexity of SIMD variants. 3. Expand test case to cover SIMD implementation. Signed-off-by: Frank Du --- Zend/zend_cpuinfo.h | 38 +++ Zend/zend_portability.h | 40 +++ build/php.m4 | 55 ++++ configure.ac | 4 + ext/standard/base64.c | 300 +++++++++++++++++- ext/standard/base64.h | 4 +- .../tests/url/base64_decode_basic_002.phpt | 26 ++ .../tests/url/base64_encode_basic_001.phpt | 28 +- .../tests/url/base64_encode_basic_002.phpt | 14 +- ext/standard/tests/url/base64_loop_001.phpt | 35 ++ 10 files changed, 539 insertions(+), 5 deletions(-) create mode 100644 ext/standard/tests/url/base64_loop_001.phpt diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h index ebfbab799795d..31e7c54e0b6f0 100644 --- a/Zend/zend_cpuinfo.h +++ b/Zend/zend_cpuinfo.h @@ -61,6 +61,11 @@ typedef enum _zend_cpu_feature { /* EBX */ ZEND_CPU_FEATURE_AVX2 = (1<<5 | ZEND_CPU_EBX_MASK), + ZEND_CPU_FEATURE_AVX512F = (1<<16 | ZEND_CPU_EBX_MASK), + ZEND_CPU_FEATURE_AVX512DQ = (1<<17 | ZEND_CPU_EBX_MASK), + ZEND_CPU_FEATURE_AVX512CD = (1<<28 | ZEND_CPU_EBX_MASK), + /* intentionally don't support = (1<<30 | ZEND_CPU_EBX_MASK) */ + /* intentionally don't support = (1<<31 | ZEND_CPU_EBX_MASK) */ /* EDX */ ZEND_CPU_FEATURE_FPU = (1<<0 | ZEND_CPU_EDX_MASK), @@ -174,6 +179,29 @@ static inline int zend_cpu_supports_avx2(void) { #endif return __builtin_cpu_supports("avx2"); } + +#if PHP_HAVE_AVX512_SUPPORTS +ZEND_NO_SANITIZE_ADDRESS +static inline int zend_cpu_supports_avx512(void) { +#if PHP_HAVE_BUILTIN_CPU_INIT + __builtin_cpu_init(); +#endif + return __builtin_cpu_supports("avx512f") && __builtin_cpu_supports("avx512dq") + && __builtin_cpu_supports("avx512cd") && __builtin_cpu_supports("avx512bw") + && __builtin_cpu_supports("avx512vl"); +} +#endif + +#if PHP_HAVE_AVX512_VBMI_SUPPORTS +ZEND_NO_SANITIZE_ADDRESS +static inline int zend_cpu_supports_avx512_vbmi(void) { +#if PHP_HAVE_BUILTIN_CPU_INIT + __builtin_cpu_init(); +#endif + return zend_cpu_supports_avx512() && __builtin_cpu_supports("avx512vbmi"); +} +#endif + #else static inline int zend_cpu_supports_sse2(void) { @@ -203,6 +231,16 @@ static inline int zend_cpu_supports_avx(void) { static inline int zend_cpu_supports_avx2(void) { return zend_cpu_supports(ZEND_CPU_FEATURE_AVX2); } + +static inline int zend_cpu_supports_avx512(void) { + /* TODO: avx512_bw/avx512_vl use bit 30/31 which are reserved for mask */ + return 0; +} + +static zend_always_inline int zend_cpu_supports_avx512_vbmi(void) { + /* TODO: avx512_vbmi use ECX of cpuid 7 */ + return 0; +} #endif /* __builtin_cpu_supports has pclmul from gcc9 */ diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 83b4079cb8309..cb480e1f4d8b9 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -651,6 +651,46 @@ extern "C++" { # define ZEND_INTRIN_AVX2_FUNC_DECL(func) #endif +#if PHP_HAVE_AVX512_SUPPORTS && defined(HAVE_FUNC_ATTRIBUTE_TARGET) || defined(ZEND_WIN32) +#define ZEND_INTRIN_AVX512_RESOLVER 1 +#endif + +#if defined(ZEND_INTRIN_AVX512_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) +# define ZEND_INTRIN_AVX512_FUNC_PROTO 1 +#elif defined(ZEND_INTRIN_AVX512_RESOLVER) +# define ZEND_INTRIN_AVX512_FUNC_PTR 1 +#endif + +#ifdef ZEND_INTRIN_AVX512_RESOLVER +# ifdef HAVE_FUNC_ATTRIBUTE_TARGET +# define ZEND_INTRIN_AVX512_FUNC_DECL(func) ZEND_API func __attribute__((target("avx512f,avx512cd,avx512vl,avx512dq,avx512bw"))) +# else +# define ZEND_INTRIN_AVX512_FUNC_DECL(func) func +# endif +#else +# define ZEND_INTRIN_AVX512_FUNC_DECL(func) +#endif + +#if PHP_HAVE_AVX512_VBMI_SUPPORTS && defined(HAVE_FUNC_ATTRIBUTE_TARGET) +#define ZEND_INTRIN_AVX512_VBMI_RESOLVER 1 +#endif + +#if defined(ZEND_INTRIN_AVX512_VBMI_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) +# define ZEND_INTRIN_AVX512_VBMI_FUNC_PROTO 1 +#elif defined(ZEND_INTRIN_AVX512_VBMI_RESOLVER) +# define ZEND_INTRIN_AVX512_VBMI_FUNC_PTR 1 +#endif + +#ifdef ZEND_INTRIN_AVX512_VBMI_RESOLVER +# ifdef HAVE_FUNC_ATTRIBUTE_TARGET +# define ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(func) ZEND_API func __attribute__((target("avx512f,avx512cd,avx512vl,avx512dq,avx512bw,avx512vbmi"))) +# else +# define ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(func) func +# endif +#else +# define ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(func) +#endif + /* Intrinsics macros end. */ #ifdef ZEND_WIN32 diff --git a/build/php.m4 b/build/php.m4 index 78fbe14c8f8a2..4457af1d5e472 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2807,3 +2807,58 @@ AC_DEFUN([PHP_CHECK_PROCCTL], AC_MSG_RESULT([no]) ]) ]) + +dnl +dnl PHP_CHECK_AVX512_SUPPORTS +dnl +AC_DEFUN([PHP_CHECK_AVX512_SUPPORTS], [ + AC_MSG_CHECKING([for avx512 supports in compiler]) + save_CFLAGS="$CFLAGS" + CFLAGS="-mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw $CFLAGS" + + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { + __m512i mask = _mm512_set1_epi32(0x1); + char out[32]; + _mm512_storeu_si512(out, _mm512_shuffle_epi8(mask, mask)); + return 0; + }]])], [ + have_avx512_supports=1 + AC_MSG_RESULT([yes]) + ], [ + have_avx512_supports=0 + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$save_CFLAGS" + + AC_DEFINE_UNQUOTED([PHP_HAVE_AVX512_SUPPORTS], + [$have_avx512_supports], [Whether the compiler supports AVX512]) +]) + +dnl +dnl PHP_CHECK_AVX512_VBMI_SUPPORTS +dnl +AC_DEFUN([PHP_CHECK_AVX512_VBMI_SUPPORTS], [ + AC_MSG_CHECKING([for avx512 vbmi supports in compiler]) + save_CFLAGS="$CFLAGS" + CFLAGS="-mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw -mavx512vbmi $CFLAGS" + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { + __m512i mask = _mm512_set1_epi32(0x1); + char out[32]; + _mm512_storeu_si512(out, _mm512_permutexvar_epi8(mask, mask)); + return 0; + }]])], [ + have_avx512_vbmi_supports=1 + AC_MSG_RESULT([yes]) + ], [ + have_avx512_vbmi_supports=0 + AC_MSG_RESULT([no]) + ]) + CFLAGS="$save_CFLAGS" + AC_DEFINE_UNQUOTED([PHP_HAVE_AVX512_VBMI_SUPPORTS], + [$have_avx512_vbmi_supports], [Whether the compiler supports AVX512 VBMI]) +]) diff --git a/configure.ac b/configure.ac index ff69c06adc688..3970d6d77bd38 100644 --- a/configure.ac +++ b/configure.ac @@ -520,6 +520,10 @@ dnl Check prctl PHP_CHECK_PRCTL dnl Check procctl PHP_CHECK_PROCCTL +dnl Check AVX512 +PHP_CHECK_AVX512_SUPPORTS +dnl Check AVX512 VBMI +PHP_CHECK_AVX512_VBMI_SUPPORTS dnl Check for __alignof__ support in the compiler AC_CACHE_CHECK(whether the compiler supports __alignof__, ac_cv_alignof_exists,[ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 3893438839aee..54c987405a708 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -354,6 +354,20 @@ static zend_always_inline int php_base64_decode_impl(const unsigned char *in, si # endif #endif +/* Only enable avx512 resolver if avx2 use resolver also */ +#if ZEND_INTRIN_AVX2_FUNC_PROTO && ZEND_INTRIN_AVX512_FUNC_PROTO +#define BASE64_INTRIN_AVX512_FUNC_PROTO 1 +#endif +#if ZEND_INTRIN_AVX2_FUNC_PTR && ZEND_INTRIN_AVX512_FUNC_PTR +#define BASE64_INTRIN_AVX512_FUNC_PTR 1 +#endif +#if ZEND_INTRIN_AVX2_FUNC_PROTO && ZEND_INTRIN_AVX512_VBMI_FUNC_PROTO +#define BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO 1 +#endif +#if ZEND_INTRIN_AVX2_FUNC_PTR && ZEND_INTRIN_AVX512_VBMI_FUNC_PTR +#define BASE64_INTRIN_AVX512_VBMI_FUNC_PTR 1 +#endif + #if ZEND_INTRIN_AVX2_NATIVE # include #elif ZEND_INTRIN_SSSE3_NATIVE @@ -366,6 +380,15 @@ static zend_always_inline int php_base64_decode_impl(const unsigned char *in, si # endif /* (ZEND_INTRIN_SSSE3_RESOLVER || ZEND_INTRIN_AVX2_RESOLVER) */ # include "Zend/zend_cpuinfo.h" +# if BASE64_INTRIN_AVX512_FUNC_PROTO || BASE64_INTRIN_AVX512_FUNC_PTR +ZEND_INTRIN_AVX512_FUNC_DECL(zend_string *php_base64_encode_avx512(const unsigned char *str, size_t length)); +ZEND_INTRIN_AVX512_FUNC_DECL(zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, zend_bool strict)); +# endif +# if BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO || BASE64_INTRIN_AVX512_VBMI_FUNC_PTR +ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(zend_string *php_base64_encode_avx512_vbmi(const unsigned char *str, size_t length)); +ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, zend_bool strict)); +# endif + # if ZEND_INTRIN_AVX2_RESOLVER ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_encode_avx2(const unsigned char *str, size_t length)); ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, bool strict)); @@ -379,7 +402,7 @@ ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_decode_ex_ssse3(const unsign zend_string *php_base64_encode_default(const unsigned char *str, size_t length); zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, bool strict); -# if (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) +# if (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO || BASE64_INTRIN_AVX512_FUNC_PROTO || BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO) PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) __attribute__((ifunc("resolve_base64_encode"))); PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) __attribute__((ifunc("resolve_base64_decode"))); @@ -389,6 +412,16 @@ typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, bool ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ static base64_encode_func_t resolve_base64_encode(void) { +# if BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO + if (zend_cpu_supports_avx512_vbmi()) { + return php_base64_encode_avx512_vbmi; + } else +# endif +# if BASE64_INTRIN_AVX512_FUNC_PROTO + if (zend_cpu_supports_avx512()) { + return php_base64_encode_avx512; + } else +# endif # if ZEND_INTRIN_AVX2_FUNC_PROTO if (zend_cpu_supports_avx2()) { return php_base64_encode_avx2; @@ -405,6 +438,16 @@ static base64_encode_func_t resolve_base64_encode(void) { ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ static base64_decode_func_t resolve_base64_decode(void) { +# if BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO + if (zend_cpu_supports_avx512_vbmi()) { + return php_base64_decode_ex_avx512_vbmi; + } else +# endif +# if BASE64_INTRIN_AVX512_FUNC_PROTO + if (zend_cpu_supports_avx512()) { + return php_base64_decode_ex_avx512; + } else +# endif # if ZEND_INTRIN_AVX2_FUNC_PROTO if (zend_cpu_supports_avx2()) { return php_base64_decode_ex_avx2; @@ -431,6 +474,18 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length PHP_MINIT_FUNCTION(base64_intrin) { +# if BASE64_INTRIN_AVX512_VBMI_FUNC_PTR + if (zend_cpu_supports_avx512_vbmi()) { + php_base64_encode_ptr = php_base64_encode_avx512_vbmi; + php_base64_decode_ex_ptr = php_base64_decode_ex_avx512_vbmi; + } else +# endif +# if BASE64_INTRIN_AVX512_FUNC_PTR + if (zend_cpu_supports_avx512()) { + php_base64_encode_ptr = php_base64_encode_avx512; + php_base64_decode_ex_ptr = php_base64_decode_ex_avx512; + } else +# endif # if ZEND_INTRIN_AVX2_FUNC_PTR if (zend_cpu_supports_avx2()) { php_base64_encode_ptr = php_base64_encode_avx2; @@ -452,6 +507,249 @@ PHP_MINIT_FUNCTION(base64_intrin) # endif /* (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) */ #endif /* ZEND_INTRIN_AVX2_NATIVE */ +#if BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO || BASE64_INTRIN_AVX512_VBMI_FUNC_PTR +zend_string *php_base64_encode_avx512_vbmi(const unsigned char *str, size_t length) +{ + const unsigned char *c = str; + unsigned char *o; + zend_string *result; + + result = zend_string_safe_alloc(((length + 2) / 3), 4 * sizeof(char), 0, 0); + o = (unsigned char *)ZSTR_VAL(result); + + const __m512i shuffle_splitting = _mm512_setr_epi32( + 0x01020001, 0x04050304, 0x07080607, 0x0a0b090a, 0x0d0e0c0d, 0x10110f10, + 0x13141213, 0x16171516, 0x191a1819, 0x1c1d1b1c, 0x1f201e1f, 0x22232122, + 0x25262425, 0x28292728, 0x2b2c2a2b, 0x2e2f2d2e); + const __m512i multi_shifts = _mm512_set1_epi64(0x3036242a1016040a); + const char *ascii_lookup_tbl = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + const __m512i ascii_lookup = _mm512_loadu_si512((__m512i *)ascii_lookup_tbl); + + while (length > 63) { + /* Step 1: load input data */ + __m512i str = _mm512_loadu_si512((const __m512i *)c); + + /* Step 2: splitting 24-bit words into 32-bit lanes */ + str = _mm512_permutexvar_epi8(shuffle_splitting, str); + + /* Step 3: moving 6-bit word to sperate bytes */ + str = _mm512_multishift_epi64_epi8(multi_shifts, str); + + /* Step 4: conversion to ASCII */ + str = _mm512_permutexvar_epi8(str, ascii_lookup); + + /* Step 5: store the final result */ + _mm512_storeu_si512((__m512i *)o, str); + c += 48; + o += 64; + length -= 48; + } + + o = php_base64_encode_impl(c, length, o); + + ZSTR_LEN(result) = (o - (unsigned char *)ZSTR_VAL(result)); + + return result; +} + +zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, zend_bool strict) +{ + const unsigned char *c = str; + unsigned char *o; + size_t outl = 0; + zend_string *result; + + result = zend_string_alloc(length, 0); + o = (unsigned char *)ZSTR_VAL(result); + + const __m512i lookup_0 = _mm512_setr_epi32( + 0x80808080, 0x80808080, 0x80808080, 0x80808080, 0x80808080, 0x80808080, + 0x80808080, 0x80808080, 0x80808080, 0x80808080, 0x3e808080, 0x3f808080, + 0x37363534, 0x3b3a3938, 0x80803d3c, 0x80808080); + const __m512i lookup_1 = _mm512_setr_epi32( + 0x02010080, 0x06050403, 0x0a090807, 0x0e0d0c0b, 0x1211100f, 0x16151413, + 0x80191817, 0x80808080, 0x1c1b1a80, 0x201f1e1d, 0x24232221, 0x28272625, + 0x2c2b2a29, 0x302f2e2d, 0x80333231, 0x80808080); + + const __m512i merge_mask1 = _mm512_set1_epi32(0x01400140); + const __m512i merge_mask2 = _mm512_set1_epi32(0x00011000); + + const __m512i continuous_mask = _mm512_setr_epi32( + 0x06000102, 0x090a0405, 0x0c0d0e08, 0x16101112, 0x191a1415, 0x1c1d1e18, + 0x26202122, 0x292a2425, 0x2c2d2e28, 0x36303132, 0x393a3435, 0x3c3d3e38, + 0x00000000, 0x00000000, 0x00000000, 0x00000000); + + while (length > 64) { + /* Step 1: load input data */ + const __m512i input = _mm512_loadu_si512((__m512i *)c); + + /* Step 2: translation into 6-bit values(saved on bytes) from ASCII and error detection */ + __m512i str = _mm512_permutex2var_epi8(lookup_0, input, lookup_1); + const uint64_t mask = _mm512_movepi8_mask(_mm512_or_epi64(str, input)); /* convert MSBs to the mask */ + if (mask) { + break; + } + + /* Step 3: pack four fields within 32-bit words into 24-bit words. */ + const __m512i merge_ab_and_bc = _mm512_maddubs_epi16(str, merge_mask1); + str = _mm512_madd_epi16(merge_ab_and_bc, merge_mask2); + + /* Step 4: move 3-byte words into the continuous array. */ + str = _mm512_permutexvar_epi8(continuous_mask, str); + + /* Step 5: store the final result */ + _mm512_storeu_si512((__m512i *)o, str); + + c += 64; + o += 48; + outl += 48; + length -= 64; + } + + if (!php_base64_decode_impl(c, length, (unsigned char*)ZSTR_VAL(result), &outl, strict)) { + zend_string_efree(result); + return NULL; + } + + ZSTR_LEN(result) = outl; + + return result; +} +#endif + +#if BASE64_INTRIN_AVX512_FUNC_PROTO || BASE64_INTRIN_AVX512_FUNC_PTR +zend_string *php_base64_encode_avx512(const unsigned char *str, size_t length) +{ + const unsigned char *c = str; + unsigned char *o; + zend_string *result; + + result = zend_string_safe_alloc(((length + 2) / 3), 4 * sizeof(char), 0, 0); + o = (unsigned char *)ZSTR_VAL(result); + + while (length > 63) { + /* Step 1: load input data */ + /* [????|????|????|????|PPPO|OONN|NMMM|LLLK|KKJJ|JIII|HHHG|GGFF|FEEE|DDDC|CCBB|BAAA] */ + __m512i str = _mm512_loadu_si512((const __m512i *)c); + + /* Step 2: splitting 24-bit words into 32-bit lanes */ + /* [0000|PPPO|OONN|NMMM|0000|LLLK|KKJJ|JIII|0000|HHHG|GGFF|FEEE|0000|DDDC|CCBB|BAAA] */ + str = _mm512_permutexvar_epi32( + _mm512_set_epi32(-1, 11, 10, 9, -1, 8, 7, 6, -1, 5, 4, 3, -1, 2, 1, 0), str); + /* [D1 D2 D0 D1|C1 C2 C0 C1|B1 B2 B0 B1|A1 A2 A0 A1] x 4 */ + str = _mm512_shuffle_epi8(str, _mm512_set4_epi32(0x0a0b090a, 0x07080607, 0x04050304, 0x01020001)); + + /* Step 3: moving 6-bit word to sperate bytes */ + /* in: [bbbbcccc|ccdddddd|aaaaaabb|bbbbcccc] */ + /* t0: [0000cccc|cc000000|aaaaaa00|00000000] */ + const __m512i t0 = _mm512_and_si512(str, _mm512_set1_epi32(0x0fc0fc00)); + /* t1: [00000000|00cccccc|00000000|00aaaaaa] */ + const __m512i t1 = _mm512_srlv_epi16(t0, _mm512_set1_epi32(0x0006000a)); + /* t2: [ccdddddd|00000000|aabbbbbb|cccc0000] */ + const __m512i t2 = _mm512_sllv_epi16(str, _mm512_set1_epi32(0x00080004)); + /* str: [00dddddd|00cccccc|00bbbbbb|00aaaaaa] */ + str = _mm512_ternarylogic_epi32(_mm512_set1_epi32(0x3f003f00), t2, t1, 0xca); + + /* Step 4: conversion to ASCII */ + __m512i result = _mm512_subs_epu8(str, _mm512_set1_epi8(51)); + const __mmask64 less = _mm512_cmpgt_epi8_mask(_mm512_set1_epi8(26), str); + result = _mm512_mask_mov_epi8(result, less, _mm512_set1_epi8(13)); + const __m512i lut = _mm512_set4_epi32(0x000041f0, 0xedfcfcfc, 0xfcfcfcfc, 0xfcfcfc47); + result = _mm512_shuffle_epi8(lut, result); + result = _mm512_add_epi8(result, str); + + /* Step 5: store the final result */ + _mm512_storeu_si512((__m512i *)o, result); + c += 48; + o += 64; + length -= 48; + } + + o = php_base64_encode_impl(c, length, o); + + ZSTR_LEN(result) = (o - (unsigned char *)ZSTR_VAL(result)); + + return result; +} + +#define build_dword(b0, b1, b2, b3) \ + ((uint32_t)(uint8_t)b0 << 0) | ((uint32_t)(uint8_t)b1 << 8) | \ + ((uint32_t)(uint8_t)b2 << 16) | ((uint32_t)(uint8_t)b3 << 24) + +#define _mm512_set4lanes_epi8(b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15) \ + _mm512_setr4_epi32(build_dword(b0, b1, b2, b3), build_dword(b4, b5, b6, b7), \ + build_dword(b8, b9, b10, b11), build_dword(b12, b13, b14, b15)) + +zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, zend_bool strict) +{ + const unsigned char *c = str; + unsigned char *o; + size_t outl = 0; + zend_string *result; + + result = zend_string_alloc(length, 0); + o = (unsigned char *)ZSTR_VAL(result); + + while (length > 64) { + /* Step 1: load input data */ + __m512i str = _mm512_loadu_si512((__m512i *)c); + + /* Step 2: translation into 6-bit values(saved on bytes) from ASCII and error detection */ + const __m512i higher_nibble = _mm512_and_si512(_mm512_srli_epi32(str, 4), _mm512_set1_epi8(0x0f)); + const __m512i lower_nibble = _mm512_and_si512(str, _mm512_set1_epi8(0x0f)); + const __m512i shiftLUT = _mm512_set4lanes_epi8( + 0, 0, 19, 4, -65, -65, -71, -71, 0, 0, 0, 0, 0, 0, 0, 0); + const __m512i maskLUT = _mm512_set4lanes_epi8( + /* 0 : 0b1010_1000*/ 0xa8, + /* 1 .. 9 : 0b1111_1000*/ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + /* 10 : 0b1111_0000*/ 0xf0, + /* 11 : 0b0101_0100*/ 0x54, + /* 12 .. 14 : 0b0101_0000*/ 0x50, 0x50, 0x50, + /* 15 : 0b0101_0100*/ 0x54); + const __m512i bitposLUT = _mm512_set4lanes_epi8( + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + const __m512i M = _mm512_shuffle_epi8(maskLUT, lower_nibble); + const __m512i bit = _mm512_shuffle_epi8(bitposLUT, higher_nibble); + const uint64_t match = _mm512_test_epi8_mask(M, bit); + if (match != (uint64_t)-1) { + break; + } + const __m512i sh = _mm512_shuffle_epi8(shiftLUT, higher_nibble); + const __mmask64 eq_2f = _mm512_cmpeq_epi8_mask(str, _mm512_set1_epi8(0x2f)); + const __m512i shift = _mm512_mask_mov_epi8(sh, eq_2f, _mm512_set1_epi8(16)); + str = _mm512_add_epi8(str, shift); + + /* Step 3: pack four fields within 32-bit words into 24-bit words. */ + const __m512i merge_ab_and_bc = _mm512_maddubs_epi16(str, _mm512_set1_epi32(0x01400140)); + str = _mm512_madd_epi16(merge_ab_and_bc, _mm512_set1_epi32(0x00011000)); + + /* Step 4: move 3-byte words into the continuous array. */ + const __m512i t1 = _mm512_shuffle_epi8(str, + _mm512_set4lanes_epi8(2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1)); + const __m512i s6 = _mm512_setr_epi32(0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 0, 0, 0, 0); + const __m512i t2 = _mm512_permutexvar_epi32(s6, t1); + + /* Step 5: store the final result */ + _mm512_storeu_si512((__m512i *)o, t2); + + c += 64; + o += 48; + outl += 48; + length -= 64; + } + + if (!php_base64_decode_impl(c, length, (unsigned char*)ZSTR_VAL(result), &outl, strict)) { + zend_string_efree(result); + return NULL; + } + + ZSTR_LEN(result) = outl; + + return result; +} +#endif + #if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_AVX2_RESOLVER # if ZEND_INTRIN_AVX2_RESOLVER && defined(HAVE_FUNC_ATTRIBUTE_TARGET) static __m256i php_base64_encode_avx2_reshuffle(__m256i in) __attribute__((target("avx2"))); diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 5c4cfff42b442..5e1c6f195cc24 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -19,7 +19,7 @@ #define BASE64_H /* - * NEON implementation is based on https://github.com/WojciechMula/base64simd + * NEON and AVX512 implementation are based on https://github.com/WojciechMula/base64simd * which is copyrighted to: * Copyright (c) 2015-2018, Wojciech Mula * All rights reserved. @@ -57,7 +57,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if (ZEND_INTRIN_AVX2_FUNC_PTR || ZEND_INTRIN_SSSE3_FUNC_PTR) && !ZEND_INTRIN_AVX2_NATIVE +#if (ZEND_INTRIN_AVX2_FUNC_PTR || ZEND_INTRIN_SSSE3_FUNC_PTR || ZEND_INTRIN_AVX512_FUNC_PTR || ZEND_INTRIN_AVX512_VBMI_FUNC_PTR) && !ZEND_INTRIN_AVX2_NATIVE PHP_MINIT_FUNCTION(base64_intrin); #endif diff --git a/ext/standard/tests/url/base64_decode_basic_002.phpt b/ext/standard/tests/url/base64_decode_basic_002.phpt index 7d19e9cb9c65f..0b4b4f9e23cd7 100644 --- a/ext/standard/tests/url/base64_decode_basic_002.phpt +++ b/ext/standard/tests/url/base64_decode_basic_002.phpt @@ -21,6 +21,21 @@ var_dump(base64_decode($badChars)); var_dump(base64_decode($badChars, false)); var_dump(base64_decode($badChars, true)); +echo "\nTests on long string for SIMD\n"; +$noWhiteSpace = "UEhQIGlzIGEgcG9wdWxhciBnZW5lcmFsLXB1cnBvc2Ugc2NyaXB0aW5nIGxhbmd1YWdlIHRoYXQgaXMgZXNwZWNpYWxseSBzdWl0ZWQgdG8gd2ViIGRldmVsb3BtZW50"; +var_dump(base64_decode($noWhiteSpace)); +var_dump(base64_decode($noWhiteSpace, false)); +var_dump(base64_decode($noWhiteSpace, true)); +$withWhiteSpace = "UEhQIGlzIGE gcG9wdWxhciBnZW5lcmFsLXB1cnBvc2Ugc2NyaXB0aW5nIGxhbmd1YWdl IHRoYXQga + XMgZXNwZWNpYWxseSBzdWl0ZWQgdG8gd2ViIGRldmVsb3BtZW50"; +var_dump(base64_decode($withWhiteSpace)); +var_dump(base64_decode($withWhiteSpace, false)); +var_dump(base64_decode($withWhiteSpace, true)); +$badChars = $noWhiteSpace . '*'; +var_dump(base64_decode($badChars)); +var_dump(base64_decode($badChars, false)); +var_dump(base64_decode($badChars, true)); + echo "Done"; ?> --EXPECT-- @@ -38,4 +53,15 @@ Other chars outside the base64 alphabet are ignored when $strict===false, but ca string(12) "hello world!" string(12) "hello world!" bool(false) + +Tests on long string for SIMD +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +string(96) "PHP is a popular general-purpose scripting language that is especially suited to web development" +bool(false) Done diff --git a/ext/standard/tests/url/base64_encode_basic_001.phpt b/ext/standard/tests/url/base64_encode_basic_001.phpt index a85c1b0a0f8da..7d74696eb80da 100644 --- a/ext/standard/tests/url/base64_encode_basic_001.phpt +++ b/ext/standard/tests/url/base64_encode_basic_001.phpt @@ -14,7 +14,24 @@ for ($i=0; $i<256; $i++) { printf("0x%X: %s\n", $i, $enc); } -echo "Done"; +$values = array( + "Hello World", + "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!%^&*(){}[]", + "\n\t Line with control characters\r\n", + "\xC1\xC2\xC3\xC4\xC5\xC6", + "\75\76\77\78\79\80", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!\75\76\77\78\79\80", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!\75\76\77\78\79\80" +); + +foreach($values as $str) { + $enc = base64_encode($str); + printf("%s\n", $enc); +} + +echo "Done\n"; ?> --EXPECT-- *** Testing base64_encode() : basic functionality *** @@ -274,4 +291,13 @@ echo "Done"; 0xFD: /Q== 0xFE: /g== 0xFF: /w== +SGVsbG8gV29ybGQ= +QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVoxMjM0NTY3ODkwISVeJiooKXt9W10= +CgkgTGluZSB3aXRoIGNvbnRyb2wgY2hhcmFjdGVycw0K +wcLDxMXG +PT4/BzgHOVw4MA== +QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODklIQ== +QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODklIT0+Pwc4BzlcODA= +QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODklIUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5JSE= +QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODklIUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5JSE9Pj8HOAc5XDgw Done diff --git a/ext/standard/tests/url/base64_encode_basic_002.phpt b/ext/standard/tests/url/base64_encode_basic_002.phpt index 697afc09160d5..fff9b05c67b21 100644 --- a/ext/standard/tests/url/base64_encode_basic_002.phpt +++ b/ext/standard/tests/url/base64_encode_basic_002.phpt @@ -13,7 +13,11 @@ $values = array( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!%^&*(){}[]", "\n\t Line with control characters\r\n", "\xC1\xC2\xC3\xC4\xC5\xC6", - "\75\76\77\78\79\80" + "\75\76\77\78\79\80", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!\75\76\77\78\79\80", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%!\75\76\77\78\79\80" ); echo "\n--- Testing base64_encode() with binary string input ---\n"; @@ -49,3 +53,11 @@ TEST PASSED TEST PASSED -- Iteration 5 -- TEST PASSED +-- Iteration 6 -- +TEST PASSED +-- Iteration 7 -- +TEST PASSED +-- Iteration 8 -- +TEST PASSED +-- Iteration 9 -- +TEST PASSED diff --git a/ext/standard/tests/url/base64_loop_001.phpt b/ext/standard/tests/url/base64_loop_001.phpt new file mode 100644 index 0000000000000..e6b9b7adedb68 --- /dev/null +++ b/ext/standard/tests/url/base64_loop_001.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test base64_encode() and base64_decode() function : loop mode +--FILE-- + +--EXPECT-- +*** Testing base64_encode() and base64_decode(): loop mode *** +TEST PASSED +Done From c840f71524067aa474c00c3eacfb83bd860bfc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 21:15:24 +0100 Subject: [PATCH 394/895] crypt: Fix validation of malformed BCrypt hashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHP’s implementation of crypt_blowfish differs from the upstream Openwall version by adding a “PHP Hack”, which allows one to cut short the BCrypt salt by including a `$` character within the characters that represent the salt. Hashes that are affected by the “PHP Hack” may erroneously validate any password as valid when used with `password_verify` and when comparing the return value of `crypt()` against the input. The PHP Hack exists since the first version of PHP’s own crypt_blowfish implementation that was added in 1e820eca02dcf322b41fd2fe4ed2a6b8309f8ab5. No clear reason is given for the PHP Hack’s existence. This commit removes it, because BCrypt hashes containing a `$` character in their salt are not valid BCrypt hashes. --- ext/standard/crypt_blowfish.c | 8 -- .../tests/crypt/bcrypt_salt_dollar.phpt | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 ext/standard/tests/crypt/bcrypt_salt_dollar.phpt diff --git a/ext/standard/crypt_blowfish.c b/ext/standard/crypt_blowfish.c index 3806a290aee40..351d40308089e 100644 --- a/ext/standard/crypt_blowfish.c +++ b/ext/standard/crypt_blowfish.c @@ -371,7 +371,6 @@ static const unsigned char BF_atoi64[0x60] = { #define BF_safe_atoi64(dst, src) \ { \ tmp = (unsigned char)(src); \ - if (tmp == '$') break; /* PHP hack */ \ if ((unsigned int)(tmp -= 0x20) >= 0x60) return -1; \ tmp = BF_atoi64[tmp]; \ if (tmp > 63) return -1; \ @@ -399,13 +398,6 @@ static int BF_decode(BF_word *dst, const char *src, int size) *dptr++ = ((c3 & 0x03) << 6) | c4; } while (dptr < end); - if (end - dptr == size) { - return -1; - } - - while (dptr < end) /* PHP hack */ - *dptr++ = 0; - return 0; } diff --git a/ext/standard/tests/crypt/bcrypt_salt_dollar.phpt b/ext/standard/tests/crypt/bcrypt_salt_dollar.phpt new file mode 100644 index 0000000000000..32e335f4b087e --- /dev/null +++ b/ext/standard/tests/crypt/bcrypt_salt_dollar.phpt @@ -0,0 +1,82 @@ +--TEST-- +bcrypt correctly rejects salts containing $ +--FILE-- + +--EXPECT-- +string(8) "$2y$04$$" +string(2) "*0" +bool(false) +string(9) "$2y$04$0$" +string(2) "*0" +bool(false) +string(10) "$2y$04$00$" +string(2) "*0" +bool(false) +string(11) "$2y$04$000$" +string(2) "*0" +bool(false) +string(12) "$2y$04$0000$" +string(2) "*0" +bool(false) +string(13) "$2y$04$00000$" +string(2) "*0" +bool(false) +string(14) "$2y$04$000000$" +string(2) "*0" +bool(false) +string(15) "$2y$04$0000000$" +string(2) "*0" +bool(false) +string(16) "$2y$04$00000000$" +string(2) "*0" +bool(false) +string(17) "$2y$04$000000000$" +string(2) "*0" +bool(false) +string(18) "$2y$04$0000000000$" +string(2) "*0" +bool(false) +string(19) "$2y$04$00000000000$" +string(2) "*0" +bool(false) +string(20) "$2y$04$000000000000$" +string(2) "*0" +bool(false) +string(21) "$2y$04$0000000000000$" +string(2) "*0" +bool(false) +string(22) "$2y$04$00000000000000$" +string(2) "*0" +bool(false) +string(23) "$2y$04$000000000000000$" +string(2) "*0" +bool(false) +string(24) "$2y$04$0000000000000000$" +string(2) "*0" +bool(false) +string(25) "$2y$04$00000000000000000$" +string(2) "*0" +bool(false) +string(26) "$2y$04$000000000000000000$" +string(2) "*0" +bool(false) +string(27) "$2y$04$0000000000000000000$" +string(2) "*0" +bool(false) +string(28) "$2y$04$00000000000000000000$" +string(2) "*0" +bool(false) +string(29) "$2y$04$000000000000000000000$" +string(2) "*0" +bool(false) +string(30) "$2y$04$0000000000000000000000$" +string(60) "$2y$04$000000000000000000000u2a2UpVexIt9k3FMJeAVr3c04F5tcI8K" +bool(false) From a92acbad873a05470af1a47cb785a18eadd827b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jan 2023 22:13:57 +0100 Subject: [PATCH 395/895] crypt: Fix possible buffer overread in php_crypt() --- ext/standard/crypt.c | 1 + ext/standard/tests/password/password_bcrypt_short.phpt | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 ext/standard/tests/password/password_bcrypt_short.phpt diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 8c105cf910e85..8316c8b960639 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -135,6 +135,7 @@ PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const ch } else if ( salt[0] == '$' && salt[1] == '2' && + salt[2] != 0 && salt[3] == '$') { char output[PHP_MAX_SALT_LEN + 1]; diff --git a/ext/standard/tests/password/password_bcrypt_short.phpt b/ext/standard/tests/password/password_bcrypt_short.phpt new file mode 100644 index 0000000000000..085bc8a239045 --- /dev/null +++ b/ext/standard/tests/password/password_bcrypt_short.phpt @@ -0,0 +1,8 @@ +--TEST-- +Test that password_hash() does not overread buffers when a short hash is passed +--FILE-- + +--EXPECT-- +bool(false) From af2ddc64262216848d2e95108c121967a2b0a8a9 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 12 Feb 2023 20:53:06 -0700 Subject: [PATCH 396/895] Update NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 907a06b90ec97..82d773a3b2a23 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.0.28 +- Core: + . Fixed bug #81744 (Password_verify() always return true with some hash). + (CVE-2023-0567). (Tim Düsterhus) 05 Jan 2023, PHP 8.0.27 From ec10b28d64decbc54aa1e585dce580f0bd7a5953 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:28:27 +0100 Subject: [PATCH 397/895] Fix array overrun when appending slash to paths Fix it by extending the array sizes by one character. As the input is limited to the maximum path length, there will always be place to append the slash. As the php_check_specific_open_basedir() simply uses the strings to compare against each other, no new failures related to too long paths are introduced. We'll let the DOM and XML case handle a potentially too long path in the library code. --- ext/dom/document.c | 2 +- ext/xmlreader/php_xmlreader.c | 2 +- main/fopen_wrappers.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index dbbabb8bffde6..fa6a6377ad5ce 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1174,7 +1174,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so int validate, recover, resolve_externals, keep_blanks, substitute_ent; int resolved_path_len; int old_error_reporting = 0; - char *directory=NULL, resolved_path[MAXPATHLEN]; + char *directory=NULL, resolved_path[MAXPATHLEN + 1]; if (id != NULL) { intern = Z_DOMOBJ_P(id); diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index ecc52aa1d6f4c..d8f8105010c71 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -1024,7 +1024,7 @@ PHP_METHOD(XMLReader, XML) xmlreader_object *intern = NULL; char *source, *uri = NULL, *encoding = NULL; int resolved_path_len, ret = 0; - char *directory=NULL, resolved_path[MAXPATHLEN]; + char *directory=NULL, resolved_path[MAXPATHLEN + 1]; xmlParserInputBufferPtr inputbfr; xmlTextReaderPtr reader; diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 39a9c82d5984e..5e4a619c8fe70 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -129,10 +129,10 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) */ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path) { - char resolved_name[MAXPATHLEN]; - char resolved_basedir[MAXPATHLEN]; + char resolved_name[MAXPATHLEN + 1]; + char resolved_basedir[MAXPATHLEN + 1]; char local_open_basedir[MAXPATHLEN]; - char path_tmp[MAXPATHLEN]; + char path_tmp[MAXPATHLEN + 1]; char *path_file; size_t resolved_basedir_len; size_t resolved_name_len; From b5ccaaf613066e3862cca86dbe1f39d3c376649a Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 12 Feb 2023 21:04:31 -0700 Subject: [PATCH 398/895] Update NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 82d773a3b2a23..a6dfbec2629dc 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - Core: . Fixed bug #81744 (Password_verify() always return true with some hash). (CVE-2023-0567). (Tim Düsterhus) + . Fixed bug #81746 (1-byte array overrun in common path resolve code). + (CVE-2023-0568). (Niels Dossche) 05 Jan 2023, PHP 8.0.27 From 3b75f07c9a5d32c211ac8a213c1ab73d12146c5e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 13 Feb 2023 10:09:30 +0300 Subject: [PATCH 399/895] Stop copying internal functions into each thread (#10517) * Stop copying internal functions into each thread It seems we don't copy internal methods for a long time, so this shouldn't be a problem. We had to copy functions in PHP-5 times, but it seems we just forgot to remove this. It's possible that some third-part extensions (e.g. profilers, tracers, debuggers) modify internal functions. After this change that may cause race conditions in ZTS build (but we already jave the same behavior for internal methods). Observer API should provide necesssary functionality to avoid shared structures modification. * Remove unused function --- Zend/zend.c | 81 ++++++++++----------------------------------- Zend/zend_globals.h | 3 ++ 2 files changed, 20 insertions(+), 64 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 0eec5f89019d9..4f40ebc4f95a0 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -674,69 +674,6 @@ static void auto_global_dtor(zval *zv) /* {{{ */ /* }}} */ #ifdef ZTS -static void function_copy_ctor(zval *zv) /* {{{ */ -{ - zend_function *old_func = Z_FUNC_P(zv); - zend_function *func; - - if (old_func->type == ZEND_USER_FUNCTION) { - ZEND_ASSERT(old_func->op_array.fn_flags & ZEND_ACC_IMMUTABLE); - return; - } - func = pemalloc(sizeof(zend_internal_function), 1); - Z_FUNC_P(zv) = func; - memcpy(func, old_func, sizeof(zend_internal_function)); - function_add_ref(func); - if ((old_func->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) - && old_func->common.arg_info) { - uint32_t i; - uint32_t num_args = old_func->common.num_args + 1; - zend_arg_info *arg_info = old_func->common.arg_info - 1; - zend_arg_info *new_arg_info; - - if (old_func->common.fn_flags & ZEND_ACC_VARIADIC) { - num_args++; - } - new_arg_info = pemalloc(sizeof(zend_arg_info) * num_args, 1); - memcpy(new_arg_info, arg_info, sizeof(zend_arg_info) * num_args); - for (i = 0 ; i < num_args; i++) { - if (ZEND_TYPE_HAS_LIST(arg_info[i].type)) { - zend_type_list *old_list = ZEND_TYPE_LIST(arg_info[i].type); - zend_type_list *new_list = pemalloc(ZEND_TYPE_LIST_SIZE(old_list->num_types), 1); - memcpy(new_list, old_list, ZEND_TYPE_LIST_SIZE(old_list->num_types)); - ZEND_TYPE_SET_PTR(new_arg_info[i].type, new_list); - - zend_type *list_type; - ZEND_TYPE_LIST_FOREACH(new_list, list_type) { - zend_string *name = zend_string_dup(ZEND_TYPE_NAME(*list_type), 1); - ZEND_TYPE_SET_PTR(*list_type, name); - } ZEND_TYPE_LIST_FOREACH_END(); - } else if (ZEND_TYPE_HAS_NAME(arg_info[i].type)) { - zend_string *name = zend_string_dup(ZEND_TYPE_NAME(arg_info[i].type), 1); - ZEND_TYPE_SET_PTR(new_arg_info[i].type, name); - } - } - func->common.arg_info = new_arg_info + 1; - } - if (old_func->common.attributes) { - zend_attribute *old_attr; - - func->common.attributes = NULL; - - ZEND_HASH_PACKED_FOREACH_PTR(old_func->common.attributes, old_attr) { - uint32_t i; - zend_attribute *attr; - - attr = zend_add_attribute(&func->common.attributes, old_attr->name, old_attr->argc, old_attr->flags, old_attr->offset, old_attr->lineno); - - for (i = 0 ; i < old_attr->argc; i++) { - ZVAL_DUP(&attr->args[i].value, &old_attr->args[i].value); - } - } ZEND_HASH_FOREACH_END(); - } -} -/* }}} */ - static void auto_global_copy_ctor(zval *zv) /* {{{ */ { zend_auto_global *old_ag = (zend_auto_global *) Z_PTR_P(zv); @@ -756,7 +693,8 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{ compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); zend_hash_init(compiler_globals->function_table, 1024, NULL, ZEND_FUNCTION_DTOR, 1); - zend_hash_copy(compiler_globals->function_table, global_function_table, function_copy_ctor); + zend_hash_copy(compiler_globals->function_table, global_function_table, NULL); + compiler_globals->copied_functions_count = zend_hash_num_elements(compiler_globals->function_table); compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); zend_hash_init(compiler_globals->class_table, 64, NULL, ZEND_CLASS_DTOR, 1); @@ -790,6 +728,21 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals) /* {{{ */ { if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) { + uint32_t n = compiler_globals->copied_functions_count; + + /* Prevent destruction of functions copied from the main process context */ + if (zend_hash_num_elements(compiler_globals->function_table) <= n) { + compiler_globals->function_table->nNumUsed = 0; + } else { + Bucket *p = compiler_globals->function_table->arData; + + compiler_globals->function_table->nNumOfElements -= n; + while (n != 0) { + ZVAL_UNDEF(&p->val); + p++; + n--; + } + } zend_hash_destroy(compiler_globals->function_table); free(compiler_globals->function_table); } diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 6fca08e82d3ca..9c109e967cd50 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -144,6 +144,9 @@ struct _zend_compiler_globals { uint32_t rtd_key_counter; zend_stack short_circuiting_opnums; +#ifdef ZTS + uint32_t copied_functions_count; +#endif }; From d721dcc2efd91dbefbca2e1d0e11982af30f4cc3 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 10 Feb 2023 18:07:34 +0100 Subject: [PATCH 400/895] Fix colletion of unfinished function call in fibers Fixes GH-10496. Co-authored-by: Bob Weinand --- NEWS | 2 ++ Zend/tests/fibers/gh10496.phpt | 33 +++++++++++++++++++++++++++++++++ Zend/zend_execute.c | 30 +++++++++++++++++++++++++++--- Zend/zend_execute.h | 3 ++- Zend/zend_fibers.c | 2 +- Zend/zend_generators.c | 2 +- 6 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 Zend/tests/fibers/gh10496.phpt diff --git a/NEWS b/NEWS index 6d6114f7c0fec..8976f64b3f43d 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ PHP NEWS - Fiber: . Fixed assembly on alpine x86. (nielsdos) + . Fixed bug GH-10496 (segfault when garbage collector is invoked inside of + fiber). (Bob, Arnaud) - FPM: . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) diff --git a/Zend/tests/fibers/gh10496.phpt b/Zend/tests/fibers/gh10496.phpt new file mode 100644 index 0000000000000..76ea5fea78c98 --- /dev/null +++ b/Zend/tests/fibers/gh10496.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug GH-10496 (Segfault when garbage collector is invoked inside of fiber) +--FILE-- +start(); +unset($f); +gc_collect_cycles(); +print "Collected\n"; + +?> +--EXPECT-- +Cleaned +Dtor x() +Collected diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 49af6fc76957c..848d479651f86 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4459,7 +4459,24 @@ ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, cleanup_live_vars(execute_data, op_num, catch_op_num); } -ZEND_API HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer) +ZEND_API ZEND_ATTRIBUTE_DEPRECATED HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer) +{ + bool suspended_by_yield = false; + + if (Z_TYPE_INFO(EX(This)) & ZEND_CALL_GENERATOR) { + ZEND_ASSERT(EX(return_value)); + + /* The generator object is stored in EX(return_value) */ + zend_generator *generator = (zend_generator*) EX(return_value); + ZEND_ASSERT(execute_data == generator->execute_data); + + suspended_by_yield = !(generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING); + } + + return zend_unfinished_execution_gc_ex(execute_data, call, gc_buffer, suspended_by_yield); +} + +ZEND_API HashTable *zend_unfinished_execution_gc_ex(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer, bool suspended_by_yield) { if (!EX(func) || !ZEND_USER_CODE(EX(func)->common.type)) { return NULL; @@ -4495,8 +4512,15 @@ ZEND_API HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data } if (call) { - /* -1 required because we want the last run opcode, not the next to-be-run one. */ - uint32_t op_num = execute_data->opline - op_array->opcodes - 1; + uint32_t op_num = execute_data->opline - op_array->opcodes; + if (suspended_by_yield) { + /* When the execution was suspended by yield, EX(opline) points to + * next opline to execute. Otherwise, it points to the opline that + * suspended execution. */ + op_num--; + ZEND_ASSERT(EX(func)->op_array.opcodes[op_num].opcode == ZEND_YIELD + || EX(func)->op_array.opcodes[op_num].opcode == ZEND_YIELD_FROM); + } zend_unfinished_calls_gc(execute_data, call, op_num, gc_buffer); } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 1091b1ebe652b..eaad706cee3d5 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -410,7 +410,8 @@ ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table); ZEND_API void ZEND_FASTCALL zend_free_compiled_variables(zend_execute_data *execute_data); ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_execute_data *call, uint32_t op_num, zend_get_gc_buffer *buf); ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num); -ZEND_API HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer); +ZEND_API ZEND_ATTRIBUTE_DEPRECATED HashTable *zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer); +ZEND_API HashTable *zend_unfinished_execution_gc_ex(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer, bool suspended_by_yield); zval * ZEND_FASTCALL zend_handle_named_arg( zend_execute_data **call_ptr, zend_string *arg_name, diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 051a9dceaea7a..a0892effdf2a7 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -652,7 +652,7 @@ static HashTable *zend_fiber_object_gc(zend_object *object, zval **table, int *n HashTable *lastSymTable = NULL; zend_execute_data *ex = fiber->execute_data; for (; ex; ex = ex->prev_execute_data) { - HashTable *symTable = zend_unfinished_execution_gc(ex, ex->call, buf); + HashTable *symTable = zend_unfinished_execution_gc_ex(ex, ex->call, buf, false); if (symTable) { if (lastSymTable) { zval *val; diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index a192170cae3ba..5d7bef3854f5e 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -372,7 +372,7 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * call = zend_generator_revert_call_stack(generator->frozen_call_stack); } - zend_unfinished_execution_gc(execute_data, call, gc_buffer); + zend_unfinished_execution_gc_ex(execute_data, call, gc_buffer, true); if (UNEXPECTED(generator->frozen_call_stack)) { zend_generator_revert_call_stack(call); From 95016138a54b3352a0988878cd71c2ebe7cdeca5 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Mon, 13 Feb 2023 16:30:21 +0000 Subject: [PATCH 401/895] Fix GH-10496: Fibers must not be garbage collected while implicitly suspended by resumption of another fiber --- .../fibers/{gh10496.phpt => gh10496-001.phpt} | 2 +- Zend/tests/fibers/gh10496-002.phpt | 26 +++++++++++++++++++ Zend/zend_fibers.c | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) rename Zend/tests/fibers/{gh10496.phpt => gh10496-001.phpt} (83%) create mode 100644 Zend/tests/fibers/gh10496-002.phpt diff --git a/Zend/tests/fibers/gh10496.phpt b/Zend/tests/fibers/gh10496-001.phpt similarity index 83% rename from Zend/tests/fibers/gh10496.phpt rename to Zend/tests/fibers/gh10496-001.phpt index 76ea5fea78c98..9ca371fa2a6c5 100644 --- a/Zend/tests/fibers/gh10496.phpt +++ b/Zend/tests/fibers/gh10496-001.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug GH-10496 (Segfault when garbage collector is invoked inside of fiber) +Bug GH-10496 001 (Segfault when garbage collector is invoked inside of fiber) --FILE-- start(); + })(); + })(); +}); +$f->start(); +$f->resume(); + +?> +--EXPECT-- +Success diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index a0892effdf2a7..59aa63ba21b43 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -644,7 +644,7 @@ static HashTable *zend_fiber_object_gc(zend_object *object, zval **table, int *n zend_get_gc_buffer_add_zval(buf, &fiber->fci.function_name); zend_get_gc_buffer_add_zval(buf, &fiber->result); - if (fiber->context.status != ZEND_FIBER_STATUS_SUSPENDED) { + if (fiber->context.status != ZEND_FIBER_STATUS_SUSPENDED || fiber->caller != NULL) { zend_get_gc_buffer_use(buf, table, num); return NULL; } From 28d68f501360cc2a0f239925ab61d76943a19712 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Mon, 13 Feb 2023 13:16:07 -0600 Subject: [PATCH 402/895] PHP-8.1 is now for PHP 8.1.17-dev --- NEWS | 10 +++++++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 8976f64b3f43d..fdd0aef2aaea7 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.1.16 +?? ??? ????, PHP 8.1.17 - Core: . Fixed incorrect check condition in ZEND_YIELD. (nielsdos) @@ -52,6 +52,14 @@ PHP NEWS . Fix memory leaks when attempting to open a non-existing file or a file over 4GB. (Girgias) +14 Feb 2023, PHP 8.1.16 + +- Core: + . Fixed bug #81744 (Password_verify() always return true with some hash). + (CVE-2023-0567). (Tim Düsterhus) + . Fixed bug #81746 (1-byte array overrun in common path resolve code). + (CVE-2023-0568). (Niels Dossche) + 02 Feb 2023, PHP 8.1.15 - Apache: diff --git a/Zend/zend.h b/Zend/zend.h index 16b0ce6a1bd82..18e605c5bc27a 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.1.16-dev" +#define ZEND_VERSION "4.1.17-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 6bf3274d2705b..ca3d695120da4 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.16-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.17-dev],[https://bugs.php.net],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 4231920700d72..b5568bffa819e 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 16 +#define PHP_RELEASE_VERSION 17 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.16-dev" -#define PHP_VERSION_ID 80116 +#define PHP_VERSION "8.1.17-dev" +#define PHP_VERSION_ID 80117 From 1a5fc6e1a3315053d43e96489a4bd320a34da4d5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:38:28 +0100 Subject: [PATCH 403/895] Fix assertion failure when var_dump'ing void FFI result (#10568) --- ext/ffi/ffi.c | 2 ++ ext/ffi/tests/gh10568.phpt | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 ext/ffi/tests/gh10568.phpt diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 107d2862c1256..ee5183ce9d46c 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -1982,6 +1982,8 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp) } switch (type->kind) { + case ZEND_FFI_TYPE_VOID: + return NULL; case ZEND_FFI_TYPE_BOOL: case ZEND_FFI_TYPE_CHAR: case ZEND_FFI_TYPE_ENUM: diff --git a/ext/ffi/tests/gh10568.phpt b/ext/ffi/tests/gh10568.phpt new file mode 100644 index 0000000000000..bd76671438d1b --- /dev/null +++ b/ext/ffi/tests/gh10568.phpt @@ -0,0 +1,25 @@ +--TEST-- +GH-10568 (Assertion failure when var_dump'ing void FFI result) +--EXTENSIONS-- +ffi +--SKIPIF-- + +--INI-- +ffi.enable=1 +--FILE-- +strlen("abc")); +?> +DONE +--EXPECT-- +object(FFI\CData:void)#2 (0) { +} +DONE From ab3f871846dab2e94cc9bd0f707c0674c01749db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Mon, 13 Feb 2023 16:07:38 +0000 Subject: [PATCH 404/895] posix: fix misuse of bool (invalid code in c23) a bool pointer argument cannot take true or false but either &boolval or NULL Closes GH-10577. --- ext/posix/posix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 505493ec2f68f..35a99af923ec6 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -458,7 +458,7 @@ PHP_FUNCTION(posix_ttyname) RETURN_FALSE; } } else { - if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ NULL, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); @@ -508,7 +508,7 @@ PHP_FUNCTION(posix_isatty) RETURN_FALSE; } } else { - if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ NULL, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); @@ -1242,7 +1242,7 @@ PHP_FUNCTION(posix_fpathconf) RETURN_FALSE; } } else { - if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { + if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ NULL, /* check_null */ false, /* arg_num */ 1)) { zend_argument_type_error(1, "must be of type int|resource, %s given", zend_zval_value_name(z_fd)); RETURN_THROWS(); From 851e4623f58926ff387c43960ab5c31e09701c51 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 13 Feb 2023 22:42:39 +0300 Subject: [PATCH 405/895] Make C functions returning "void" to return PHP "null" In PHP-2.0 and below we by mistake returned "obcect(FFI\CData:void)#2 (0) {}". We decided not to fix this in PHP-2.0 and below to aboid BC breaks. --- ext/ffi/ffi.c | 6 +++++- ext/ffi/tests/gh10568.phpt | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index ebb2522f84790..f22c44e80c460 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -2832,7 +2832,11 @@ static ZEND_FUNCTION(ffi_trampoline) /* {{{ */ free_alloca(arg_values, arg_values_use_heap); } - zend_ffi_cdata_to_zval(NULL, ret, ZEND_FFI_TYPE(type->func.ret_type), BP_VAR_R, return_value, 0, 1, 0); + if (ZEND_FFI_TYPE(type->func.ret_type)->kind != ZEND_FFI_TYPE_VOID) { + zend_ffi_cdata_to_zval(NULL, ret, ZEND_FFI_TYPE(type->func.ret_type), BP_VAR_R, return_value, 0, 1, 0); + } else { + ZVAL_NULL(return_value); + } free_alloca(ret, ret_use_heap); exit: diff --git a/ext/ffi/tests/gh10568.phpt b/ext/ffi/tests/gh10568.phpt index bd76671438d1b..9da9334920666 100644 --- a/ext/ffi/tests/gh10568.phpt +++ b/ext/ffi/tests/gh10568.phpt @@ -20,6 +20,5 @@ var_dump($libc->strlen("abc")); ?> DONE --EXPECT-- -object(FFI\CData:void)#2 (0) { -} +NULL DONE From 10c26ce7903198d30da0e415b027ec38a88ae8e5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 13 Feb 2023 19:43:29 +0000 Subject: [PATCH 406/895] [ci skip] NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 0c9efb5ba63d5..8182f2245a994 100644 --- a/NEWS +++ b/NEWS @@ -81,6 +81,7 @@ PHP NEWS . Added posix_sysconf. (David Carlier) . Added posix_pathconf. (David Carlier) . Added posix_fpathconf. (David Carlier) + . Fixed zend_parse_arg_long's bool pointer argument assignment. (Cristian Rodriguez) - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) From d94ddbed2c428f288f95b08790d6c407a887594d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:29:29 +0100 Subject: [PATCH 407/895] Fix updating SSA object type for *_ASSIGN_OP (#10458) The code fetched the class entry into ce for objects and static properties. However, when the actual update needs to take place (when result_def exists), the class entry in ce was reset to NULL. So the SSA object type update never happened. Fetch the class entry in the result_def>=0 case instead after the reset of ce to NULL. --- Zend/Optimizer/zend_inference.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 33b01dda038f4..17373db2b636a 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -2464,7 +2464,7 @@ static zend_always_inline int _zend_update_type_info( if (opline->opcode == ZEND_ASSIGN_OBJ_OP) { prop_info = zend_fetch_prop_info(op_array, ssa, opline, ssa_op); orig = t1; - t1 = zend_fetch_prop_type(script, prop_info, &ce); + t1 = zend_fetch_prop_type(script, prop_info, NULL); t2 = OP1_DATA_INFO(); } else if (opline->opcode == ZEND_ASSIGN_DIM_OP) { if (t1 & MAY_BE_ARRAY_OF_REF) { @@ -2475,7 +2475,7 @@ static zend_always_inline int _zend_update_type_info( t2 = OP1_DATA_INFO(); } else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) { prop_info = zend_fetch_static_prop_info(script, op_array, ssa, opline); - t1 = zend_fetch_prop_type(script, prop_info, &ce); + t1 = zend_fetch_prop_type(script, prop_info, NULL); t2 = OP1_DATA_INFO(); } else { if (t1 & MAY_BE_REF) { @@ -2537,7 +2537,7 @@ static zend_always_inline int _zend_update_type_info( } else if (opline->opcode == ZEND_ASSIGN_OBJ_OP) { /* The return value must also satisfy the property type */ if (prop_info) { - t1 = zend_fetch_prop_type(script, prop_info, NULL); + t1 = zend_fetch_prop_type(script, prop_info, &ce); if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG && (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) { /* DOUBLE may be auto-converted to LONG */ @@ -2549,7 +2549,7 @@ static zend_always_inline int _zend_update_type_info( } else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) { /* The return value must also satisfy the property type */ if (prop_info) { - t1 = zend_fetch_prop_type(script, prop_info, NULL); + t1 = zend_fetch_prop_type(script, prop_info, &ce); if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG && (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) { /* DOUBLE may be auto-converted to LONG */ From e45850c195dcd5534394cf357a3f776d4916b655 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 19 Jan 2023 14:11:18 +0000 Subject: [PATCH 408/895] Fix repeated warning for file uploads limit exceeding --- main/rfc1867.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/rfc1867.c b/main/rfc1867.c index c2f606c64aa1a..b43cfae5a1e2f 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -911,7 +911,10 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ skip_upload = 1; } else if (upload_cnt <= 0) { skip_upload = 1; - sapi_module.sapi_error(E_WARNING, "Maximum number of allowable file uploads has been exceeded"); + if (upload_cnt == 0) { + --upload_cnt; + sapi_module.sapi_error(E_WARNING, "Maximum number of allowable file uploads has been exceeded"); + } } /* Return with an error if the posted data is garbled */ From 716de0cff539f46294ef70fe75d548cd66766370 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 19 Jan 2023 14:31:25 +0000 Subject: [PATCH 409/895] Introduce max_multipart_body_parts INI This fixes GHSA-54hq-v5wp-fqgv DOS vulnerabality by limitting number of parsed multipart body parts as currently all parts were always parsed. --- main/main.c | 1 + main/rfc1867.c | 11 ++ ...-54hq-v5wp-fqgv-max-body-parts-custom.phpt | 53 +++++++++ ...54hq-v5wp-fqgv-max-body-parts-default.phpt | 54 +++++++++ .../ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt | 52 +++++++++ sapi/fpm/tests/tester.inc | 106 +++++++++++++++--- 6 files changed, 262 insertions(+), 15 deletions(-) create mode 100644 sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt create mode 100644 sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-default.phpt create mode 100644 sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt diff --git a/main/main.c b/main/main.c index 40684f32dc146..c58ea58bf5ac7 100644 --- a/main/main.c +++ b/main/main.c @@ -751,6 +751,7 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("disable_classes", "", PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("max_file_uploads", "20", PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL) + PHP_INI_ENTRY("max_multipart_body_parts", "-1", PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL) STD_PHP_INI_BOOLEAN("allow_url_fopen", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("allow_url_include", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_url_include, php_core_globals, core_globals) diff --git a/main/rfc1867.c b/main/rfc1867.c index b43cfae5a1e2f..3086e8da3dbe7 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -687,6 +687,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ void *event_extra_data = NULL; unsigned int llen = 0; int upload_cnt = INI_INT("max_file_uploads"); + int body_parts_cnt = INI_INT("max_multipart_body_parts"); const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(); php_rfc1867_getword_t getword; php_rfc1867_getword_conf_t getword_conf; @@ -708,6 +709,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ return; } + if (body_parts_cnt < 0) { + body_parts_cnt = PG(max_input_vars) + upload_cnt; + } + int body_parts_limit = body_parts_cnt; + /* Get the boundary */ boundary = strstr(content_type_dup, "boundary"); if (!boundary) { @@ -792,6 +798,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ char *pair = NULL; int end = 0; + if (--body_parts_cnt < 0) { + php_error_docref(NULL, E_WARNING, "Multipart body parts limit exceeded %d. To increase the limit change max_multipart_body_parts in php.ini.", body_parts_limit); + goto fileupload_done; + } + while (isspace(*cd)) { ++cd; } diff --git a/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt new file mode 100644 index 0000000000000..d2239ac3c410b --- /dev/null +++ b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt @@ -0,0 +1,53 @@ +--TEST-- +FPM: GHSA-54hq-v5wp-fqgv - max_multipart_body_parts ini custom value +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +echo $tester + ->request(stdin: [ + 'parts' => [ + 'count' => 30, + ] + ]) + ->getBody(); +$tester->terminate(); +$tester->close(); + +?> +--EXPECT-- +Warning: Unknown: Multipart body parts limit exceeded 10. To increase the limit change max_multipart_body_parts in php.ini. in Unknown on line 0 +int(10) +--CLEAN-- + diff --git a/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-default.phpt b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-default.phpt new file mode 100644 index 0000000000000..42b5afbf9ee7d --- /dev/null +++ b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-default.phpt @@ -0,0 +1,54 @@ +--TEST-- +FPM: GHSA-54hq-v5wp-fqgv - max_multipart_body_parts ini default +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +echo $tester + ->request(stdin: [ + 'parts' => [ + 'count' => 30, + ] + ]) + ->getBody(); +$tester->terminate(); +$tester->close(); + +?> +--EXPECT-- +Warning: Unknown: Input variables exceeded 20. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 + +Warning: Unknown: Multipart body parts limit exceeded 25. To increase the limit change max_multipart_body_parts in php.ini. in Unknown on line 0 +int(20) +--CLEAN-- + diff --git a/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt new file mode 100644 index 0000000000000..da81174c72806 --- /dev/null +++ b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt @@ -0,0 +1,52 @@ +--TEST-- +FPM: GHSA-54hq-v5wp-fqgv - exceeding max_file_uploads +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +echo $tester + ->request(stdin: [ + 'parts' => [ + 'count' => 10, + 'param' => 'filename' + ] + ]) + ->getBody(); +$tester->terminate(); +$tester->close(); + +?> +--EXPECT-- +Warning: Maximum number of allowable file uploads has been exceeded in Unknown on line 0 +int(5) +--CLEAN-- + diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index 6197cdba53f5c..e51aa0f691435 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -567,13 +567,17 @@ class Tester * @param string $query * @param array $headers * @param string|null $uri + * @param string|null $scriptFilename + * @param string|null $stdin * * @return array */ private function getRequestParams( string $query = '', array $headers = [], - string $uri = null + string $uri = null, + string $scriptFilename = null, + ?string $stdin = null ): array { if (is_null($uri)) { $uri = $this->makeSourceFile(); @@ -582,8 +586,8 @@ class Tester $params = array_merge( [ 'GATEWAY_INTERFACE' => 'FastCGI/1.0', - 'REQUEST_METHOD' => 'GET', - 'SCRIPT_FILENAME' => $uri, + 'REQUEST_METHOD' => is_null($stdin) ? 'GET' : 'POST', + 'SCRIPT_FILENAME' => $scriptFilename ?: $uri, 'SCRIPT_NAME' => $uri, 'QUERY_STRING' => $query, 'REQUEST_URI' => $uri . ($query ? '?' . $query : ""), @@ -597,7 +601,7 @@ class Tester 'SERVER_PROTOCOL' => 'HTTP/1.1', 'DOCUMENT_ROOT' => __DIR__, 'CONTENT_TYPE' => '', - 'CONTENT_LENGTH' => 0 + 'CONTENT_LENGTH' => strlen($stdin ?? "") // Default to 0 ], $headers ); @@ -607,20 +611,86 @@ class Tester }); } + /** + * Parse stdin and generate data for multipart config. + * + * @param array $stdin + * @param array $headers + * + * @return void + * @throws \Exception + */ + private function parseStdin(array $stdin, array &$headers) + { + $parts = $stdin['parts'] ?? null; + if (empty($parts)) { + throw new \Exception('The stdin array needs to contain parts'); + } + $boundary = $stdin['boundary'] ?? 'AaB03x'; + if ( ! isset($headers['CONTENT_TYPE'])) { + $headers['CONTENT_TYPE'] = 'multipart/form-data; boundary=' . $boundary; + } + $count = $parts['count'] ?? null; + if ( ! is_null($count)) { + $dispositionType = $parts['disposition'] ?? 'form-data'; + $dispositionParam = $parts['param'] ?? 'name'; + $namePrefix = $parts['prefix'] ?? 'f'; + $nameSuffix = $parts['suffix'] ?? ''; + $value = $parts['value'] ?? 'test'; + $parts = []; + for ($i = 0; $i < $count; $i++) { + $parts[] = [ + 'disposition' => $dispositionType, + 'param' => $dispositionParam, + 'name' => "$namePrefix$i$nameSuffix", + 'value' => $value + ]; + } + } + $out = ''; + $nl = "\r\n"; + foreach ($parts as $part) { + if (!is_array($part)) { + $part = ['name' => $part]; + } elseif ( ! isset($part['name'])) { + throw new \Exception('Each part has to have a name'); + } + $name = $part['name']; + $dispositionType = $part['disposition'] ?? 'form-data'; + $dispositionParam = $part['param'] ?? 'name'; + $value = $part['value'] ?? 'test'; + $partHeaders = $part['headers'] ?? []; + + $out .= "--$boundary$nl"; + $out .= "Content-disposition: $dispositionType; $dispositionParam=\"$name\"$nl"; + foreach ($partHeaders as $headerName => $headerValue) { + $out .= "$headerName: $headerValue$nl"; + } + $out .= $nl; + $out .= "$value$nl"; + } + $out .= "--$boundary--$nl"; + + return $out; + } + /** * Execute request. * - * @param string $query - * @param array $headers - * @param string|null $uri - * @param string|null $address - * @param string|null $successMessage - * @param string|null $errorMessage - * @param bool $connKeepAlive - * @param bool $expectError - * @param int $readLimit + * @param string $query + * @param array $headers + * @param string|null $uri + * @param string|null $address + * @param string|null $successMessage + * @param string|null $errorMessage + * @param bool $connKeepAlive + * @param string|null $scriptFilename = null + * @param string|array|null $stdin = null + * @param bool $expectError + * @param int $readLimit * * @return Response + * @throws \Exception */ public function request( string $query = '', @@ -630,6 +700,8 @@ class Tester string $successMessage = null, string $errorMessage = null, bool $connKeepAlive = false, + string $scriptFilename = null, + string|array $stdin = null, bool $expectError = false, int $readLimit = -1, ): Response { @@ -637,12 +709,16 @@ class Tester return new Response(null, true); } - $params = $this->getRequestParams($query, $headers, $uri); + if (is_array($stdin)) { + $stdin = $this->parseStdin($stdin, $headers); + } + + $params = $this->getRequestParams($query, $headers, $uri, $scriptFilename, $stdin); $this->trace('Request params', $params); try { $this->response = new Response( - $this->getClient($address, $connKeepAlive)->request_data($params, false, $readLimit) + $this->getClient($address, $connKeepAlive)->request_data($params, $stdin, $readLimit) ); if ($expectError) { $this->error('Expected request error but the request was successful'); From 054c7b09f91946c0618171072fc650af2ff61f0a Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 14 Feb 2023 10:23:59 +0000 Subject: [PATCH 410/895] Update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index a6dfbec2629dc..f14370becbdb0 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS . Fixed bug #81746 (1-byte array overrun in common path resolve code). (CVE-2023-0568). (Niels Dossche) +- FPM + . Fixed bug GHSA-54hq-v5wp-fqgv (DOS vulnerability when parsing multipart + request body). (CVE-2023-0662) (Jakub Zelenka) + 05 Jan 2023, PHP 8.0.27 - PDO/SQLite: From caaaf759908a7366c877399273cafdd246c5402c Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 14 Feb 2023 10:33:56 +0000 Subject: [PATCH 411/895] Fix incorrect character in NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f14370becbdb0..d0a31784b0141 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ PHP NEWS - FPM . Fixed bug GHSA-54hq-v5wp-fqgv (DOS vulnerability when parsing multipart - request body). (CVE-2023-0662) (Jakub Zelenka) + request body). (CVE-2023-0662) (Jakub Zelenka) 05 Jan 2023, PHP 8.0.27 From eef29d434a302904dc0310032c38980b0dfaded0 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 14 Feb 2023 10:42:36 +0000 Subject: [PATCH 412/895] Change NEWS for GHSA-54hq-v5wp-fqgv as it is for all SAPIs --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d0a31784b0141..25a6a6e5d031a 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ PHP NEWS . Fixed bug #81746 (1-byte array overrun in common path resolve code). (CVE-2023-0568). (Niels Dossche) -- FPM +- SAPI . Fixed bug GHSA-54hq-v5wp-fqgv (DOS vulnerability when parsing multipart request body). (CVE-2023-0662) (Jakub Zelenka) From 937b1e38e2677cdc07ddc93e228765469f647e73 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 14 Feb 2023 10:46:48 +0000 Subject: [PATCH 413/895] Fix missing colon in NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 25a6a6e5d031a..ed5df77edfc82 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ PHP NEWS . Fixed bug #81746 (1-byte array overrun in common path resolve code). (CVE-2023-0568). (Niels Dossche) -- SAPI +- SAPI: . Fixed bug GHSA-54hq-v5wp-fqgv (DOS vulnerability when parsing multipart request body). (CVE-2023-0662) (Jakub Zelenka) From e86d8704b44dde164e36b5364036e1988ac566fe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Feb 2023 14:13:40 +0100 Subject: [PATCH 414/895] more config for new FPM tests --- sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt | 4 +++- .../fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-default.phpt | 4 +++- sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-file-uploads.phpt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt index d2239ac3c410b..d5c4c4d469871 100644 --- a/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt +++ b/sapi/fpm/tests/ghsa-54hq-v5wp-fqgv-max-body-parts-custom.phpt @@ -21,7 +21,9 @@ php_admin_value[html_errors] = false php_admin_value[max_input_vars] = 20 php_admin_value[max_file_uploads] = 5 php_admin_value[max_multipart_body_parts] = 10 -php_flag[display_errors] = On +php_admin_flag[display_errors] = On +php_admin_flag[display_startup_errors] = On +php_admin_flag[log_errors] = On EOT; $code = << Date: Tue, 14 Feb 2023 15:18:53 +0100 Subject: [PATCH 415/895] [ci skip] Next release will be 8.0.29 --- NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ed5df77edfc82..9b41aeb1ed7d5 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.0.28 +?? ??? ????, PHP 8.0.29 + + +14 Feb 2023, PHP 8.0.28 - Core: . Fixed bug #81744 (Password_verify() always return true with some hash). From dc054488da471c8c83ceafcbf7730601f0ad0a78 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 14 Feb 2023 10:02:46 -0500 Subject: [PATCH 416/895] PHP-8.2 is now for PHP 8.2.4-dev --- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zend/zend.h b/Zend/zend.h index 9665526aa96bd..82023d4227f62 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.2.3-dev" +#define ZEND_VERSION "4.2.4-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 9b2b3d3cb7be9..bfad1d7146baa 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.2.3-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.2.4-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 1cb5aaaa2c5b6..ee77da66220fc 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 3 +#define PHP_RELEASE_VERSION 4 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.2.3-dev" -#define PHP_VERSION_ID 80203 +#define PHP_VERSION "8.2.4-dev" +#define PHP_VERSION_ID 80204 From e35e6dc351aa9f9283ff9369cc76fc1cc209b3ed Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 14 Feb 2023 20:27:29 +0100 Subject: [PATCH 417/895] [ci skip] NEWS (#10586) --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 3a3043759b02b..f6eb0e8e09f30 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP NEWS function after bailout). (trowski) . Fixed bug GH-10168: use-after-free when utilizing assigned object freed during assignment. (nielsdos) + . Fixed SSA object type update for compound assignment opcodes. (nielsdos) - Curl: . Fixed deprecation warning at compile time. (Max Kellermann) From 586e81b25993eb1a7247af452512c785b170fde5 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 14 Feb 2023 13:43:08 -0600 Subject: [PATCH 418/895] Point to the issue tracker on GitHub --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ca3d695120da4..9aa8c5caf2e2d 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.17-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.17-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER From 843ba82b536ce0a3bf3d08030b378655440a75a3 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 14 Feb 2023 13:48:28 -0600 Subject: [PATCH 419/895] Use gtar if it's in the PATH --- scripts/dev/makedist | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/dev/makedist b/scripts/dev/makedist index ad5c3c01b2070..555e7680e2eeb 100755 --- a/scripts/dev/makedist +++ b/scripts/dev/makedist @@ -5,6 +5,10 @@ # Written by Stig Bakken 1997-05-28. # Adapted to Git by Stanislav Malyshev . +# Check whether gtar is present (GNU tar) +tar="$(which gtar)" +tar="${tar:-$(which tar)}" + # Go to project root directory. cd $(CDPATH= cd -- "$(dirname -- "$0")/../../" && pwd -P) @@ -124,7 +128,7 @@ fi # Export PHP. echo "makedist: Exporting $treeish from $git" -git archive --format=tar $remote_option --prefix=$prefix/ $treeish | tar xvf - || exit 4 +git archive --format=tar $remote_option --prefix=$prefix/ $treeish | "$tar" xvf - || exit 4 cd $prefix || exit 5 @@ -166,7 +170,7 @@ cd .. echo "" echo "makedist: Creating $prefix.tar archive." -tar cf "$prefix".tar "$prefix" +"$tar" cf "$prefix".tar "$prefix" rm -rf "$prefix" "$prefix".tar.* echo "makedist: Creating $prefix.tar.gz archive." From d9ac59b0a94676d1ab4da348ff8f59a0ec4e46c3 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 14 Feb 2023 14:13:01 -0600 Subject: [PATCH 420/895] Ensure tar is not bsdtar --- scripts/dev/makedist | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dev/makedist b/scripts/dev/makedist index 555e7680e2eeb..38553d63d3151 100755 --- a/scripts/dev/makedist +++ b/scripts/dev/makedist @@ -9,6 +9,11 @@ tar="$(which gtar)" tar="${tar:-$(which tar)}" +if [[ $($tar --version) == *"bsdtar"* ]]; then + echo "Found bsdtar at $tar, but this script needs GNU tar." + exit 1 +fi + # Go to project root directory. cd $(CDPATH= cd -- "$(dirname -- "$0")/../../" && pwd -P) From 5845a52973ba8f34c2329cc5d85acf0b05b574bb Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Wed, 25 May 2022 12:35:12 -0500 Subject: [PATCH 421/895] Add a SECURITY.md community health file to the repo Following GitHub's best practices,[^1] this adds our previously voted on and approved[^2] security classification document[^3] to the repository. [^1]: https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository [^2]: https://wiki.php.net/rfc/security-classification [^3]: https://wiki.php.net/security --- SECURITY.md | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000000..cdc5a8be15ba5 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,165 @@ +# Security Classification Document + +*The canonical version of this document is located at . +Where there are discrepancies, the canonical version takes precedence.* + +## Meta + +- Authors: Release Managers +- Date: November 2016 +- Version: 1.0.1 +- RFC: [Security Issue Classification](https://wiki.php.net/rfc/security-classification) + +## Introduction + +For the sake of our users, we classify some of the issues found in PHP +as "security issues". This document is intended to explain which issues +are thus classified, how we handle those issues and how to report them. + +## Classification + +We classify as security issues bugs that: + +- allow users to execute unauthorized actions +- cross security boundaries +- access data that is not intended to be accessible +- severely impact accessibility or performance of the system + +The purpose of this classification is to alert the users and the +developers about the bugs that need to be prioritized in their handling. + +We define three categories of security issues, by their severity, +described below. Please note that this categorization is in many aspects +subjective, so it ultimately relies on the judgement of the PHP +developers. + +### High severity + +These issues may allow: + +- third party to compromise any, or most installations of PHP +- the execution of arbitrary code +- disabling the system completely +- access to any file a local PHP user can access. + +The issue can be triggered on any, or on most typical installations, and +does not require exotic and non-recommended settings to be triggered. + +This category also includes issues that can be triggered in code or +functions known to be frequently used (session, json, mysql, openssl, +etc.) during typical usage, and that require settings or configurations +that may not be strictly the best practice, but are commonly used. + +This category also may include issues that require special code or code +pattern if such code or pattern is present in many popular libraries. + +This kind of issues usually requires a CVE report. + +### Medium severity + +These issues may have the same potential to compromise an installation +as a high severity issue, but may also require: + +- an extension that is not commonly used +- a particular type of configuration that is used only in narrow + specific circumstances +- relies on old version of a third-party library being used +- code, or patterns of code, that are known to be used infrequently +- code that is very old, or extremely uncommon (and so is used + infrequently) + +This kind of issues usually will have a CVE number, unless the required +configuration is particularly exotic to the point it's not practically +usable. + +### Low severity + +This issue allows theoretical compromise of security, but practical +attack is usually impossible or extremely hard due to common practices +or limitations that are virtually always present or imposed. + +This also includes problems with configuration, documentation, and other +non-code parts of the PHP project that may mislead users, or cause them +to make their system, or their code less secure. + +Issues that can trigger unauthorized actions that do not seem to be +useful for any practical attack can also be categorized as low severity. + +Security issues, that are present only in unstable branches, belong to +this category, too. Any branch that has no stable release, is per se not +intended for the production use. + +Low severity issues usually do not need to have CVE and may, at the +discretion of the PHP developers, be disclosed publicly before the fix +is released or available. + +### Not a security issue + +We do not classify as a security issue any issue that: + +- requires invocation of specific code, which may be valid but is + obviously malicious +- requires invocation of functions with specific arguments, which may + be valid but are obviously malicious +- requires specific actions to be performed on the server, which are + not commonly performed, or are not commonly permissible for the user + (uid) executing PHP +- requires privileges superior to that of the user (uid) executing PHP +- requires the use of debugging facilities - ex. xdebug, var_dump +- requires the use of settings not recommended for production - ex. + error reporting to output +- requires the use of non-standard environment variables - ex. + USE_ZEND_ALLOC +- requires the use of non-standard builds - ex. obscure embedded + platform, not commonly used compiler +- requires the use of code or settings known to be insecure +- requires the use of FFI +- requires an open_basedir bypass + +## Handling issues + +High and medium severity fixes are merged into a security repository and +merged before the release is tagged. + +Low severity fixes are merged immediately after the fix is available and +handled like all regular bugs are handled consequently. However, release +managers may choose to pull those fixes into the RC branch after the +branch is created, and also backport them into security-only release +branch. + +## FAQ + +Q. How do I report a security issue?\ +A. Please report it on , choosing type "Security". +This will automatically make it private. If for some reason you can not +do that, or need to talk to somebody about a PHP security issue that is +not exactly a bug report, please write to security@php.net. + +Q. What do you consider a responsible disclosure?\ +A. Please report the issue as described above. Please communicate with +the developers about when the fix will be released - usually it's the +next monthly release after the bug was reported. Some issues can take +longer. After the fix is released (releases usually happen on Thursday) +please feel free to disclose the issue as you see fit. + +Q. What if I think it's a security issue but developers disagree?\ +A. Please read the above and try to explain to us why it fits the +description. + +Q. What if developers still don't think it's a security issue?\ +A. We'll have to agree to disagree. + +Q. The bug I submitted was classified as "not a security issue", you +don't believe it's real?\ +A. It has nothing to do with the bug being real or its importance to +you. It just means it does not fit our specific definitions for issues +that we will handle in a special way. We fix a lot of non-security bugs +and pull requests are always welcome. + +Q. But you classified bug #424242 as security issue, but not this +one?!\ +A. Each bug usually has its aspects, if a short discussion does not +yield agreement we'd rather do more fixing and less arguing. + +Q. Do you pay bounties for security issues?\ +A. PHP is a volunteer project. We have no money, thus we can't pay them. From bbc1f821ddc274e81ba7999c6eb1d531936a8d7b Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Wed, 25 May 2022 13:37:43 -0500 Subject: [PATCH 422/895] Update SECURITY.md Co-authored-by: Christoph M. Becker --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index cdc5a8be15ba5..61e3d8a50383e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -130,7 +130,7 @@ branch. ## FAQ Q. How do I report a security issue?\ -A. Please report it on , choosing type "Security". +A. Please report it on , choosing type "Security". This will automatically make it private. If for some reason you can not do that, or need to talk to somebody about a PHP security issue that is not exactly a bug report, please write to security@php.net. From d62968cd12a8e0db5083dadef46c1bbeedd4ad1e Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Wed, 15 Feb 2023 20:53:16 -0600 Subject: [PATCH 423/895] Update to use GitHub security issue reporting --- SECURITY.md | 69 ++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 61e3d8a50383e..161e0810b5862 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,14 +1,6 @@ -# Security Classification Document +# Vulnerability Disclosure Policy -*The canonical version of this document is located at . -Where there are discrepancies, the canonical version takes precedence.* - -## Meta - -- Authors: Release Managers -- Date: November 2016 -- Version: 1.0.1 -- RFC: [Security Issue Classification](https://wiki.php.net/rfc/security-classification) +*This document was originally published at .* ## Introduction @@ -118,48 +110,59 @@ We do not classify as a security issue any issue that: ## Handling issues -High and medium severity fixes are merged into a security repository and -merged before the release is tagged. +High and medium severity fixes are merged into a private security repository, +and then merged to the main repository before the release is tagged. Low severity fixes are merged immediately after the fix is available and handled like all regular bugs are handled consequently. However, release managers may choose to pull those fixes into the RC branch after the -branch is created, and also backport them into security-only release +branch is created, and also backport them into a security-only release branch. ## FAQ -Q. How do I report a security issue?\ -A. Please report it on , choosing type "Security". -This will automatically make it private. If for some reason you can not -do that, or need to talk to somebody about a PHP security issue that is -not exactly a bug report, please write to security@php.net. +### How do I report a security issue? + +Please report security vulnerabilities on GitHub at: + + +If for some reason you cannot use the form at GitHub, or you need to talk to +somebody about a PHP security issue that might not be a bug report, please write +to . + +Vulnerability reports remain private until published. When published, you will +be credited as a contributor, and your contribution will reflect the MITRE +Credit System. + +### What do you consider a responsible disclosure? -Q. What do you consider a responsible disclosure?\ -A. Please report the issue as described above. Please communicate with +Please report the issue as described above. Please communicate with the developers about when the fix will be released - usually it's the next monthly release after the bug was reported. Some issues can take -longer. After the fix is released (releases usually happen on Thursday) +longer. After the fix is released (releases usually happen on Thursdays) please feel free to disclose the issue as you see fit. -Q. What if I think it's a security issue but developers disagree?\ -A. Please read the above and try to explain to us why it fits the +### What if I think it's a security issue but the developers disagree? + +Please read the above and try to explain to us why it fits the description. -Q. What if developers still don't think it's a security issue?\ -A. We'll have to agree to disagree. +### What if the developers still don't think it's a security issue? + +We'll have to agree to disagree. + +### The bug I submitted was classified as "not a security issue." You don't believe it's real? -Q. The bug I submitted was classified as "not a security issue", you -don't believe it's real?\ -A. It has nothing to do with the bug being real or its importance to +It has nothing to do with the bug being real or its importance to you. It just means it does not fit our specific definitions for issues that we will handle in a special way. We fix a lot of non-security bugs and pull requests are always welcome. -Q. But you classified bug #424242 as security issue, but not this -one?!\ -A. Each bug usually has its aspects, if a short discussion does not +### But you classified bug #424242 as a security issue, but not this one?! + +Each bug usually has its aspects, if a short discussion does not yield agreement we'd rather do more fixing and less arguing. -Q. Do you pay bounties for security issues?\ -A. PHP is a volunteer project. We have no money, thus we can't pay them. +### Do you pay bounties for security issues? + +PHP is a volunteer project. We have no money, thus we can't pay bounties. From 7b68ff46da9817a258f2679af1adc7977ce5e8c1 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 16 Feb 2023 14:07:17 +0100 Subject: [PATCH 424/895] Revert "Fix GH-10168: heap-buffer-overflow at zval_undefined_cv" This reverts commit 71ddede5655fe654002ae18af6a18e033f717287. --- NEWS | 2 - Zend/tests/gh10168_1.phpt | 32 --- Zend/tests/gh10168_2.phpt | 32 --- Zend/tests/gh10168_3.phpt | 30 --- Zend/zend_execute.c | 10 +- Zend/zend_execute.h | 50 +--- Zend/zend_vm_def.h | 20 +- Zend/zend_vm_execute.h | 504 +++++++++++++------------------------- 8 files changed, 193 insertions(+), 487 deletions(-) delete mode 100644 Zend/tests/gh10168_1.phpt delete mode 100644 Zend/tests/gh10168_2.phpt delete mode 100644 Zend/tests/gh10168_3.phpt diff --git a/NEWS b/NEWS index f6eb0e8e09f30..9cc8620f9f5d7 100644 --- a/NEWS +++ b/NEWS @@ -10,8 +10,6 @@ PHP NEWS Generator emits an unavoidable fatal error or crashes). (Arnaud) . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout). (trowski) - . Fixed bug GH-10168: use-after-free when utilizing assigned object freed - during assignment. (nielsdos) . Fixed SSA object type update for compound assignment opcodes. (nielsdos) - Curl: diff --git a/Zend/tests/gh10168_1.phpt b/Zend/tests/gh10168_1.phpt deleted file mode 100644 index 6433453ed2448..0000000000000 --- a/Zend/tests/gh10168_1.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -GH-10168 (heap-buffer-overflow at zval_undefined_cv): array variation ---FILE-- - 0; - var_dump(self::$instances); - } - - function __destruct() { - unset(self::$instances[NULL]); - } -} -new Test(); -new Test(); - -?> ---EXPECTF-- -Notice: Object of class Test could not be converted to int in %s on line %d -array(1) { - [""]=> - object(Test)#1 (0) { - } -} - -Notice: Object of class Test could not be converted to int in %s on line %d -array(0) { -} diff --git a/Zend/tests/gh10168_2.phpt b/Zend/tests/gh10168_2.phpt deleted file mode 100644 index abab8b72f1cb9..0000000000000 --- a/Zend/tests/gh10168_2.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign global variation ---FILE-- - 0; - // Destructor called after comparison, so a will be NULL - var_dump($GLOBALS['a']); - } - - function __destruct() { - unset($GLOBALS['a']); - } -} -new Test(); -new Test(); - -?> ---EXPECTF-- -Notice: Object of class Test could not be converted to int in %s on line %d -object(Test)#1 (0) { -} - -Notice: Object of class Test could not be converted to int in %s on line %d - -Warning: Undefined global variable $a in %s on line %d -NULL diff --git a/Zend/tests/gh10168_3.phpt b/Zend/tests/gh10168_3.phpt deleted file mode 100644 index 35c8ed42f8470..0000000000000 --- a/Zend/tests/gh10168_3.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign typed prop ---XFAIL-- ---FILE-- - ---EXPECTF-- -object(Test)#1 (0) { -} -object(Test)#2 (0) { -} diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 848d479651f86..a46a93ad96fcc 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3562,7 +3562,7 @@ static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) { } } -ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict, zval *result_variable_ptr) +ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict) { bool ret; zval value; @@ -3582,9 +3582,6 @@ ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *ori } else { zval_ptr_dtor_nogc(&value); } - if (result_variable_ptr) { - ZVAL_COPY(result_variable_ptr, variable_ptr); - } if (value_type & (IS_VAR|IS_TMP_VAR)) { if (UNEXPECTED(ref)) { if (UNEXPECTED(GC_DELREF(ref) == 0)) { @@ -3598,11 +3595,6 @@ ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *ori return variable_ptr; } -ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict) -{ - return zend_assign_to_typed_ref_and_result(variable_ptr, orig_value, value_type, strict, NULL); -} - ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict) { zval *val = orig_val; if (Z_ISREF_P(val) && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(val))) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index eaad706cee3d5..bf7b2afdf88bc 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -108,7 +108,6 @@ ZEND_API bool zend_verify_internal_return_type(zend_function *zf, zval *ret); ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); -ZEND_API zval* zend_assign_to_typed_ref_and_result(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict, zval *result_variable_ptr); ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict); static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type) @@ -138,22 +137,12 @@ static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *v } } -static zend_always_inline void zend_handle_garbage_from_variable_assignment(zend_refcounted *garbage) -{ - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { /* we need to split */ - /* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */ - if (UNEXPECTED(GC_MAY_LEAK(garbage))) { - gc_possible_root(garbage); - } - } -} - static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict) { do { if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { + zend_refcounted *garbage; + if (Z_ISREF_P(variable_ptr)) { if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { return zend_assign_to_typed_ref(variable_ptr, value, value_type, strict); @@ -164,42 +153,21 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval break; } } - zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); + garbage = Z_COUNTED_P(variable_ptr); zend_copy_to_variable(variable_ptr, value, value_type); - zend_handle_garbage_from_variable_assignment(garbage); - return variable_ptr; - } - } while (0); - - zend_copy_to_variable(variable_ptr, value, value_type); - return variable_ptr; -} - -static zend_always_inline zval* zend_assign_to_two_variables(zval *result_variable_ptr, zval *variable_ptr, zval *value, zend_uchar value_type, bool strict) -{ - do { - if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { - if (Z_ISREF_P(variable_ptr)) { - if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { - variable_ptr = zend_assign_to_typed_ref_and_result(variable_ptr, value, value_type, strict, result_variable_ptr); - return variable_ptr; - } - - variable_ptr = Z_REFVAL_P(variable_ptr); - if (EXPECTED(!Z_REFCOUNTED_P(variable_ptr))) { - break; + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { /* we need to split */ + /* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */ + if (UNEXPECTED(GC_MAY_LEAK(garbage))) { + gc_possible_root(garbage); } } - zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); - zend_copy_to_variable(variable_ptr, value, value_type); - ZVAL_COPY(result_variable_ptr, variable_ptr); - zend_handle_garbage_from_variable_assignment(garbage); return variable_ptr; } } while (0); zend_copy_to_variable(variable_ptr, value, value_type); - ZVAL_COPY(result_variable_ptr, variable_ptr); return variable_ptr; } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 09d7b95896ec8..4845a92b95a7e 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2577,9 +2577,6 @@ ZEND_VM_C_LABEL(try_assign_dim_array): Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (OP2_TYPE == IS_CONST) { @@ -2591,11 +2588,10 @@ ZEND_VM_C_LABEL(try_assign_dim_array): ZEND_VM_C_GOTO(assign_dim_error); } value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -2689,14 +2685,12 @@ ZEND_VM_HANDLER(22, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL)) value = GET_OP2_ZVAL_PTR(BP_VAR_R); variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); + value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - FREE_OP1_VAR_PTR(); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 6f1b9b49f725a..a5a5eabf2b037 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -23464,9 +23464,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23478,11 +23475,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23616,9 +23612,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23630,11 +23623,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23769,9 +23761,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23783,11 +23772,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -23922,9 +23910,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -23936,11 +23921,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24033,14 +24017,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -24055,14 +24037,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -26183,9 +26163,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26197,11 +26174,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26335,9 +26311,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26349,11 +26322,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26488,9 +26460,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26502,11 +26471,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -26641,9 +26609,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -26655,11 +26620,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27382,14 +27346,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNU value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27404,14 +27366,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USE value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27470,14 +27430,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNU value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27492,14 +27450,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USE value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -27738,9 +27694,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -27752,11 +27705,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27890,9 +27842,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -27904,11 +27853,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28043,9 +27991,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -28057,11 +28002,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28196,9 +28140,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -28210,11 +28151,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30430,9 +30370,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30444,11 +30381,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30582,9 +30518,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30596,11 +30529,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30735,9 +30667,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30749,11 +30678,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30888,9 +30816,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -30902,11 +30827,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30999,14 +30923,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUS value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -31021,14 +30943,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -41501,9 +41421,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41515,11 +41432,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41653,9 +41569,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41667,11 +41580,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41806,9 +41718,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41820,11 +41729,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -41959,9 +41867,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = RT_CONSTANT(opline, opline->op2); if (IS_CONST == IS_CONST) { @@ -41973,11 +41878,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -42070,13 +41974,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UN value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -42091,13 +41994,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_US value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -45297,9 +45199,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45311,11 +45210,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45449,9 +45347,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45463,11 +45358,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45602,9 +45496,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45616,11 +45507,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -45755,9 +45645,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -45769,11 +45656,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -46784,13 +46670,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUS value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46805,13 +46690,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46856,13 +46740,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUS value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -46877,13 +46760,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -47295,9 +47177,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47309,11 +47188,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47447,9 +47325,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47461,11 +47336,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47600,9 +47474,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47614,11 +47485,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47753,9 +47623,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = NULL; if (IS_UNUSED == IS_CONST) { @@ -47767,11 +47634,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50648,9 +50514,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50662,11 +50525,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50800,9 +50662,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50814,11 +50673,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -50953,9 +50811,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -50967,11 +50822,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -51106,9 +50960,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ Z_ADDREF_P(value); } } - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); - } } else { dim = EX_VAR(opline->op2.var); if (IS_CV == IS_CONST) { @@ -51120,11 +50971,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + } + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -51217,13 +51067,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSE value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(0)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -51238,13 +51087,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_ value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); if (UNEXPECTED(1)) { - zend_assign_to_two_variables(EX_VAR(opline->result.var), variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - } else { - zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + ZVAL_COPY(EX_VAR(opline->result.var), value); } - /* zend_assign_to_(two_)variable(s)() always takes care of op2, never free it! */ + /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } From 0493187024ebb2d8203fad2d30ac964368d24a06 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 16 Feb 2023 11:18:56 -0600 Subject: [PATCH 425/895] Update RM doc with new PGP keyserver [ci skip] --- docs/release-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-process.md b/docs/release-process.md index 4e7a5c228808b..a082aabc65bef 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -961,7 +961,7 @@ volunteers to begin the selection process for the next release managers. public key to a keyserver: ```shell - gpg --keyserver pgp.mit.edu --send-keys YOURKEYID + gpg --keyserver keys.openpgp.org --send-keys YOURKEYID gpg --keyserver keyserver.ubuntu.com --send-keys YOURKEYID ``` From 81f3fcd5cc08bc36a60b52dbc7a7a2d8f9398137 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 17 Feb 2023 00:28:33 +0100 Subject: [PATCH 426/895] Revert "Remove useless UNEXPECTED around RETURN_VALUE_USED in specialized RETVAL handler" This reverts commit 5b801612cb33d238a5dafbe04374dadc6e3a9f35. --- Zend/zend_vm_def.h | 12 ++++++------ Zend/zend_vm_execute.h | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index b1303896625b0..bebfd7f9b158f 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1516,7 +1516,7 @@ ZEND_VM_HOT_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY, SPEC(RETVAL)) if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_increment_function(var_ptr); - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -1568,7 +1568,7 @@ ZEND_VM_HOT_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY, SPEC(RETVAL)) if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_decrement_function(var_ptr); - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -9634,7 +9634,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); Z_LVAL_P(var_ptr)++; - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -9647,7 +9647,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); fast_long_increment_function(var_ptr); - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -9660,7 +9660,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); Z_LVAL_P(var_ptr)--; - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -9673,7 +9673,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); fast_long_decrement_function(var_ptr); - if (RETURN_VALUE_USED(opline)) { + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a3e65d73c742e..9e61f5ede160f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -21355,7 +21355,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_R if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_increment_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -21373,7 +21373,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_R if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_increment_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -21425,7 +21425,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_R if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_decrement_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -21443,7 +21443,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_R if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_decrement_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -38159,7 +38159,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_RE if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_increment_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -38177,7 +38177,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_RE if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_increment_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -38228,7 +38228,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_RE if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_decrement_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -38246,7 +38246,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_RE if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) { fast_long_decrement_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -39616,7 +39616,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OV var_ptr = EX_VAR(opline->op1.var); Z_LVAL_P(var_ptr)++; - if (0) { + if (UNEXPECTED(0)) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -39629,7 +39629,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OV var_ptr = EX_VAR(opline->op1.var); Z_LVAL_P(var_ptr)++; - if (1) { + if (UNEXPECTED(1)) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -39642,7 +39642,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_ var_ptr = EX_VAR(opline->op1.var); fast_long_increment_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -39655,7 +39655,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_ var_ptr = EX_VAR(opline->op1.var); fast_long_increment_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -39668,7 +39668,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OV var_ptr = EX_VAR(opline->op1.var); Z_LVAL_P(var_ptr)--; - if (0) { + if (UNEXPECTED(0)) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -39681,7 +39681,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OV var_ptr = EX_VAR(opline->op1.var); Z_LVAL_P(var_ptr)--; - if (1) { + if (UNEXPECTED(1)) { ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); } ZEND_VM_NEXT_OPCODE(); @@ -39694,7 +39694,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_ var_ptr = EX_VAR(opline->op1.var); fast_long_decrement_function(var_ptr); - if (0) { + if (UNEXPECTED(0)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); @@ -39707,7 +39707,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_ var_ptr = EX_VAR(opline->op1.var); fast_long_decrement_function(var_ptr); - if (1) { + if (UNEXPECTED(1)) { ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr); } ZEND_VM_NEXT_OPCODE(); From fd3cc17cbdca9f3fabb3780ce043ca9c1e91387e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 17 Feb 2023 13:21:18 +0000 Subject: [PATCH 427/895] Add max_multipart_body_parts info into php.ini files --- php.ini-development | 5 +++++ php.ini-production | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/php.ini-development b/php.ini-development index e61f19b87cace..c1aca130c380b 100644 --- a/php.ini-development +++ b/php.ini-development @@ -423,6 +423,11 @@ max_input_time = 60 ; How many GET/POST/COOKIE input variables may be accepted ;max_input_vars = 1000 +; How many multipart body parts (combined input variable and file uploads) may +; be accepted. +; Default Value: -1 (Sum of max_input_vars and max_file_uploads) +;max_multipart_body_parts = 1500 + ; Maximum amount of memory a script may consume ; https://php.net/memory-limit memory_limit = 128M diff --git a/php.ini-production b/php.ini-production index 73a4db3c31bd5..a90451fe6dca2 100644 --- a/php.ini-production +++ b/php.ini-production @@ -425,6 +425,11 @@ max_input_time = 60 ; How many GET/POST/COOKIE input variables may be accepted ;max_input_vars = 1000 +; How many multipart body parts (combined input variable and file uploads) may +; be accepted. +; Default Value: -1 (Sum of max_input_vars and max_file_uploads) +;max_multipart_body_parts = 1500 + ; Maximum amount of memory a script may consume ; https://php.net/memory-limit memory_limit = 128M From 52c96f21bef653eb62bb04582f2aaf17ec94367b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 17 Feb 2023 14:56:28 +0100 Subject: [PATCH 428/895] [skip ci] Skip slow tidy test on asan --- ext/tidy/tests/parsing_file_too_large.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/tidy/tests/parsing_file_too_large.phpt b/ext/tidy/tests/parsing_file_too_large.phpt index 603a588b4f8f0..abc64d5c17c37 100644 --- a/ext/tidy/tests/parsing_file_too_large.phpt +++ b/ext/tidy/tests/parsing_file_too_large.phpt @@ -6,6 +6,7 @@ tidy --INI-- memory_limit="5G" From 7c3b92fc913e7606cbc33c68eeddff36256c33f7 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 17 Feb 2023 15:14:30 +0100 Subject: [PATCH 429/895] Fix strict prototypes warnings --- TSRM/TSRM.c | 2 +- ext/json/json_parser.y | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 76ffe3fb3376f..dc1d0d2a87a9f 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -779,7 +779,7 @@ TSRM_API const char *tsrm_api_name(void) #endif }/*}}}*/ -TSRM_API bool tsrm_is_managed_thread() +TSRM_API bool tsrm_is_managed_thread(void) {/*{{{*/ return tsrm_tls_get() ? true : false; }/*}}}*/ diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index 4727280f549b8..d570cddc91e4b 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -370,7 +370,7 @@ PHP_JSON_API int php_json_parse(php_json_parser *parser) return php_json_yyparse(parser); } -const php_json_parser_methods* php_json_get_validate_methods() +const php_json_parser_methods* php_json_get_validate_methods(void) { return &validate_parser_methods; } From 2fde3afffb5c20ffca896de913436f72d6c30e01 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Dec 2022 11:56:40 +1100 Subject: [PATCH 430/895] ext/json: add php_json_scanner_defs.h as make target To prevent build failures like: make: *** No rule to make target '/code/master/ext/json/php_json_scanner_defs.h', needed by 'ext/json/json_scanner.lo'. Stop. --- ext/json/Makefile.frag | 4 ++-- ext/json/Makefile.frag.w32 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/json/Makefile.frag b/ext/json/Makefile.frag index f5fe3c3306598..d9b8f1349a506 100644 --- a/ext/json/Makefile.frag +++ b/ext/json/Makefile.frag @@ -1,5 +1,5 @@ -$(srcdir)/json_scanner.c: $(srcdir)/json_scanner.re +$(srcdir)/json_scanner.c $(srcdir)/php_json_scanner_defs.h: $(srcdir)/json_scanner.re $(srcdir)/json_parser.tab.h @$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re -$(srcdir)/json_parser.tab.c: $(srcdir)/json_parser.y +$(srcdir)/json_parser.tab.c $(srcdir)/json_parser.tab.h: $(srcdir)/json_parser.y @$(YACC) $(YFLAGS) --defines -l $(srcdir)/json_parser.y -o $@ diff --git a/ext/json/Makefile.frag.w32 b/ext/json/Makefile.frag.w32 index 1463eda70b7ad..75250626dce68 100644 --- a/ext/json/Makefile.frag.w32 +++ b/ext/json/Makefile.frag.w32 @@ -1,5 +1,5 @@ -ext\json\json_scanner.c: ext\json\json_scanner.re +ext\json\json_scanner.c ext\json\php_json_scanner_defs.h: ext\json\json_scanner.re ext\json\json_parser.tab.h $(RE2C) $(RE2C_FLAGS) -t ext/json/php_json_scanner_defs.h --no-generation-date -bci -o ext/json/json_scanner.c ext/json/json_scanner.re -ext\json\json_parser.tab.c: ext\json\json_parser.y +ext\json\json_parser.tab.c ext\json\json_parser.tab.h: ext\json\json_parser.y $(BISON) --defines -l ext/json/json_parser.y -o ext/json/json_parser.tab.c From e83cda0887f8f9a243b42eb4e808b45c5f138cf8 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Dec 2022 13:37:40 +1100 Subject: [PATCH 431/895] ext/Zend: zend_language_scanner_defs.h as make target --- Zend/Makefile.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/Makefile.frag b/Zend/Makefile.frag index 1e0dc92803da8..054a63bf60af5 100644 --- a/Zend/Makefile.frag +++ b/Zend/Makefile.frag @@ -5,7 +5,7 @@ $(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h $(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h -$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l +$(srcdir)/zend_language_scanner.c $(srcdir)/zend_language_scanner_defs.h: $(srcdir)/zend_language_scanner.l @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l) $(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c From 2b3fa5edacea1af3bf6e915d65d8d36ac5e26689 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 6 Dec 2022 09:26:46 +1100 Subject: [PATCH 432/895] zend win32 RE2C header files to Make targets and generated_files like zend_ini_parser.h, list zend_ini_scanner_defs.h and zend_language_scanner_defs.h. Add all these files to generated_files so they don't get missed. --- win32/build/Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/win32/build/Makefile b/win32/build/Makefile index 9d063549113aa..64dc71660a0e3 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -59,14 +59,17 @@ all: generated_files $(EXT_TARGETS) $(PECL_TARGETS) $(SAPI_TARGETS) build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV) !if $(RE2C) == "" -generated_files: build_dirs Zend\zend_ini_parser.c \ +generated_files: build_dirs \ + Zend\zend_ini_parser.c Zend\zend_ini_parser.h \ Zend\zend_language_parser.c \ sapi\phpdbg\phpdbg_parser.c \ $(PHPDEF) $(MCFILE) !else -generated_files: build_dirs Zend\zend_ini_parser.c \ - Zend\zend_language_parser.c Zend\zend_ini_scanner.c \ - Zend\zend_language_scanner.c \ +generated_files: build_dirs \ + Zend\zend_ini_parser.c Zend\zend_ini_parser.h \ + Zend\zend_language_parser.c \ + Zend\zend_ini_scanner.c Zend\zend_ini_scanner_defs.h \ + Zend\zend_language_scanner.c Zend\zend_language_scanner_defs.h \ sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_lexer.c \ $(PHPDEF) $(MCFILE) !endif @@ -87,10 +90,10 @@ sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_pars $(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d sapi/phpdbg/phpdbg_parser.y !if $(RE2C) != "" -Zend\zend_ini_scanner.c: Zend\zend_ini_scanner.l +Zend\zend_ini_scanner.c Zend\zend_ini_scanner_defs.h: Zend\zend_ini_scanner.l $(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l -Zend\zend_language_scanner.c: Zend\zend_language_scanner.l +Zend\zend_language_scanner.c Zend\zend_language_scanner_defs.h: Zend\zend_language_scanner.l $(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l sapi\phpdbg\phpdbg_lexer.c: sapi\phpdbg\phpdbg_lexer.l From 4f731fa2ecd646e8792b18c0ea0ac1e24e8ee561 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 17 Feb 2023 15:55:55 +0000 Subject: [PATCH 433/895] Fix php_json_scanner_defs.h target in ext/json/Makefile.frag --- ext/json/Makefile.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/json/Makefile.frag b/ext/json/Makefile.frag index d9b8f1349a506..45687a11b7bf5 100644 --- a/ext/json/Makefile.frag +++ b/ext/json/Makefile.frag @@ -1,5 +1,5 @@ $(srcdir)/json_scanner.c $(srcdir)/php_json_scanner_defs.h: $(srcdir)/json_scanner.re $(srcdir)/json_parser.tab.h - @$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re + @$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $(srcdir)/json_scanner.c $(srcdir)/json_scanner.re $(srcdir)/json_parser.tab.c $(srcdir)/json_parser.tab.h: $(srcdir)/json_parser.y - @$(YACC) $(YFLAGS) --defines -l $(srcdir)/json_parser.y -o $@ + @$(YACC) $(YFLAGS) --defines -l $(srcdir)/json_parser.y -o $(srcdir)/json_parser.tab.c From a9e4f5184412013c973224530c78281a7a2a8dfb Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 17 Feb 2023 16:36:43 +0000 Subject: [PATCH 434/895] Update NEWS with scanner and parser build fixes --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 9cc8620f9f5d7..7bb57d67e97cd 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ PHP NEWS . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout). (trowski) . Fixed SSA object type update for compound assignment opcodes. (nielsdos) + . Fixed language scanner generation build. (Daniel Black) - Curl: . Fixed deprecation warning at compile time. (Max Kellermann) @@ -30,6 +31,10 @@ PHP NEWS . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) . Fixed bug GH-10385 (FPM successful config test early exit). (nielsdos) +- JSON: + . Fixed JSON scanner and parser generation build. + (Daniel Black, Jakub Zelenka) + - Opcache: . Fix incorrect page_size check. (nielsdos) From 7d229787b0f37ef9e327e59d2e2fabe3993eb5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 18 Feb 2023 11:17:08 +0100 Subject: [PATCH 435/895] makedist: Use fixed owner/group in generated tarball (#10613) This reduces the amount of system-dependent data within the tarball and makes it more reproducible. Instead of the information of the release manager that generates the tarball, the tarball will include the fixed 0:0 value as owner:group. --- scripts/dev/makedist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/makedist b/scripts/dev/makedist index 38553d63d3151..80930fea795f3 100755 --- a/scripts/dev/makedist +++ b/scripts/dev/makedist @@ -175,7 +175,7 @@ cd .. echo "" echo "makedist: Creating $prefix.tar archive." -"$tar" cf "$prefix".tar "$prefix" +"$tar" cf "$prefix".tar --owner=0 --group=0 --numeric-owner "$prefix" rm -rf "$prefix" "$prefix".tar.* echo "makedist: Creating $prefix.tar.gz archive." From 5e617d0b4d1f7511379383e418c9fc07723d7a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sat, 18 Feb 2023 15:48:11 -0300 Subject: [PATCH 436/895] proc_open: reject array with empty command name (#10559) --- UPGRADING | 1 + ext/standard/proc_open.c | 6 ++++++ .../tests/general_functions/proc_open_array.phpt | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/UPGRADING b/UPGRADING index 5a8429b6e7633..81b072a088d0c 100644 --- a/UPGRADING +++ b/UPGRADING @@ -73,6 +73,7 @@ PHP 8.3 UPGRADE NOTES . strtok() raises a warning in the case token is not provided when starting tokenization. . password_hash() will now chain the underlying Random\RandomException as the ValueError’s $previous Exception when salt generation fails. + . proc_open() $command array must now have at least one non empty element. ======================================== 6. New Functions diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index dfffed6cfbe36..613cc48644c49 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -475,6 +475,12 @@ static zend_string *get_valid_arg_string(zval *zv, int elem_num) { return NULL; } + if (elem_num == 1 && ZSTR_LEN(str) == 0) { + zend_value_error("First element must contain a non-empty program name"); + zend_string_release(str); + return NULL; + } + if (strlen(ZSTR_VAL(str)) != ZSTR_LEN(str)) { zend_value_error("Command array element %d contains a null byte", elem_num); zend_string_release(str); diff --git a/ext/standard/tests/general_functions/proc_open_array.phpt b/ext/standard/tests/general_functions/proc_open_array.phpt index 9f969a1c32f24..239dc116cd601 100644 --- a/ext/standard/tests/general_functions/proc_open_array.phpt +++ b/ext/standard/tests/general_functions/proc_open_array.phpt @@ -31,6 +31,13 @@ try { echo $exception->getMessage() . "\n"; } +echo "\nEmpty program name:\n"; +try { + proc_open([""], $ds, $pipes); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} + echo "\nBasic usage:\n"; $proc = proc_open([$php, '-r', 'echo "Hello World!\n";'], $ds, $pipes); fpassthru($pipes[1]); @@ -76,6 +83,9 @@ Command array element 1 contains a null byte Nul byte in argument: Command array element 2 contains a null byte +Empty program name: +First element must contain a non-empty program name + Basic usage: Hello World! From 413844d6263c594897f39d4796f89cba7f589b31 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Feb 2023 20:31:28 +0100 Subject: [PATCH 437/895] Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in main/php.h. --- .gdbinit | 2 +- Zend/zend_API.c | 2 +- Zend/zend_API.h | 10 +++++----- Zend/zend_alloc.c | 8 ++++---- Zend/zend_compile.h | 2 +- Zend/zend_execute.c | 2 +- Zend/zend_execute_API.c | 2 +- Zend/zend_hash.h | 2 +- Zend/zend_inheritance.c | 4 ++-- Zend/zend_object_handlers.c | 6 +++--- Zend/zend_objects_API.h | 8 ++++---- Zend/zend_portability.h | 2 +- Zend/zend_types.h | 4 ---- Zend/zend_vm_execute.h | 10 +++++----- Zend/zend_vm_execute.skl | 10 +++++----- docs/parameter-parsing-api.md | 6 +++--- ext/date/php_date.c | 4 ++-- ext/opcache/ZendAccelerator.c | 6 +++--- ext/opcache/jit/zend_jit_disasm.c | 2 +- ext/opcache/jit/zend_jit_oprofile.c | 2 +- ext/opcache/jit/zend_jit_trace.c | 2 +- ext/opcache/zend_file_cache.c | 4 ++-- ext/opcache/zend_persist.c | 10 +++++----- ext/opcache/zend_shared_alloc.c | 2 +- ext/opcache/zend_shared_alloc.h | 2 +- ext/standard/base64.c | 8 ++++---- ext/standard/proc_open.c | 2 +- ext/standard/var.c | 4 ++-- ext/standard/var_unserializer.re | 6 +++--- main/SAPI.c | 2 +- main/main.c | 2 +- main/php.h | 6 ++++++ main/streams/plain_wrapper.c | 6 +++--- win32/build/cppcheck_x64.cfg | 3 --- win32/build/cppcheck_x86.cfg | 3 --- win32/select.c | 2 +- 36 files changed, 77 insertions(+), 81 deletions(-) diff --git a/.gdbinit b/.gdbinit index 6117922621068..d3b456239e375 100644 --- a/.gdbinit +++ b/.gdbinit @@ -482,7 +482,7 @@ end define print_pi set $pi = (zend_property_info *)$arg0 - set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)])) + set $initial_offset = ((uint32_t)(uintptr_t)(&((zend_object*)0)->properties_table[(0)])) set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset) printf "[%p] {\n", $pi printf " offset = %p\n", $pi->offset diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 905687a00b953..11c00f7732c68 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2764,7 +2764,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1; internal_function->num_args = ptr->num_args; /* Currently you cannot denote that the function can accept less arguments than num_args */ - if (info->required_num_args == (zend_uintptr_t)-1) { + if (info->required_num_args == (uintptr_t)-1) { internal_function->required_num_args = ptr->num_args; } else { internal_function->required_num_args = info->required_num_args; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index f8197060acf76..ca33e96656bca 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -156,7 +156,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, return_reference, required_num_args, class_name, allow_null, is_tentative_return_type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), \ + { (const char*)(uintptr_t)(required_num_args), \ ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \ @@ -170,7 +170,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, is_tentative_return_type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, + { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) \ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, 0) @@ -180,7 +180,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, is_tentative_return_type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, + { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, 0) @@ -190,7 +190,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, is_tentative_return_type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, + { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, 0) @@ -203,7 +203,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL }, + { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL }, #define ZEND_BEGIN_ARG_INFO(name, _unused) \ ZEND_BEGIN_ARG_INFO_EX(name, {}, ZEND_RETURN_VALUE, -1) #define ZEND_END_ARG_INFO() }; diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 5f11f49b07157..c09ce622ecaf7 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -774,7 +774,7 @@ static void *zend_mm_chunk_alloc(zend_mm_heap *heap, size_t size, size_t alignme #if ZEND_MM_STORAGE if (UNEXPECTED(heap->storage)) { void *ptr = heap->storage->handlers.chunk_alloc(heap->storage, size, alignment); - ZEND_ASSERT(((zend_uintptr_t)((char*)ptr + (alignment-1)) & (alignment-1)) == (zend_uintptr_t)ptr); + ZEND_ASSERT(((uintptr_t)((char*)ptr + (alignment-1)) & (alignment-1)) == (uintptr_t)ptr); return ptr; } #endif @@ -2171,7 +2171,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap) repeated = zend_mm_find_leaks_huge(heap, list); total += 1 + repeated; if (repeated) { - zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated); + zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated); } heap->huge_list = list = list->next; @@ -2210,7 +2210,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap) zend_mm_find_leaks(heap, p, i + bin_pages[bin_num], &leak); total += 1 + repeated; if (repeated) { - zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated); + zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated); } } dbg = (zend_mm_debug_info*)((char*)dbg + bin_data_size[bin_num]); @@ -2236,7 +2236,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap) repeated = zend_mm_find_leaks(heap, p, i + pages_count, &leak); total += 1 + repeated; if (repeated) { - zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated); + zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(uintptr_t)repeated); } i += pages_count; } diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 97b11cdb3034b..0f54d8cd4f4ea 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -431,7 +431,7 @@ typedef struct _zend_arg_info { * It's also used for the return type. */ typedef struct _zend_internal_function_info { - zend_uintptr_t required_num_args; + uintptr_t required_num_args; zend_type type; const char *default_value; } zend_internal_function_info; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index dcbb6a7ffba56..51d68294ec528 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4804,7 +4804,7 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_array(zend_ar } /* }}} */ -#define ZEND_FAKE_OP_ARRAY ((zend_op_array*)(zend_intptr_t)-1) +#define ZEND_FAKE_OP_ARRAY ((zend_op_array*)(intptr_t)-1) static zend_never_inline zend_op_array* ZEND_FASTCALL zend_include_or_eval(zval *inc_filename_zv, int type) /* {{{ */ { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 17c3caae21432..efdebc6498a0e 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1141,7 +1141,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string * ALLOC_HASHTABLE(CG(unlinked_uses)); zend_hash_init(CG(unlinked_uses), 0, NULL, NULL, 0); } - zend_hash_index_add_empty_element(CG(unlinked_uses), (zend_long)(zend_uintptr_t)ce); + zend_hash_index_add_empty_element(CG(unlinked_uses), (zend_long)(uintptr_t)ce); return ce; } return NULL; diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 93b9f0d4530a4..d9210d073182f 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -298,7 +298,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber); ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_t compar, uint32_t flag); -static zend_always_inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucket_compare_func_t compare_func, zend_bool renumber) { +static zend_always_inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucket_compare_func_t compare_func, bool renumber) { zend_hash_sort_ex(ht, zend_sort, compare_func, renumber); } diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 0f030d14217bd..61b1e06e7cb65 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2682,7 +2682,7 @@ static void check_unrecoverable_load_failure(zend_class_entry *ce) { * a dependence on the inheritance hierarchy of this specific class. Instead we fall back to * a fatal error, as would happen if we did not allow exceptions in the first place. */ if (CG(unlinked_uses) - && zend_hash_index_del(CG(unlinked_uses), (zend_long)(zend_uintptr_t)ce) == SUCCESS) { + && zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t)ce) == SUCCESS) { zend_exception_uncaught_error( "During inheritance of %s with variance dependencies", ZSTR_VAL(ce->name)); } @@ -2957,7 +2957,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string } if (CG(unlinked_uses)) { - zend_hash_index_del(CG(unlinked_uses), (zend_long)(zend_uintptr_t) ce); + zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t) ce); } orig_linking_class = CG(current_linking_class); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 6e0373d4f9601..20d773e1d3713 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -536,7 +536,7 @@ ZEND_API zend_result zend_check_property_access(const zend_object *zobj, zend_st static void zend_property_guard_dtor(zval *el) /* {{{ */ { uint32_t *ptr = (uint32_t*)Z_PTR_P(el); - if (EXPECTED(!(((zend_uintptr_t)ptr) & 1))) { + if (EXPECTED(!(((uintptr_t)ptr) & 1))) { efree_size(ptr, sizeof(uint32_t)); } } @@ -565,7 +565,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0); /* mark pointer as "special" using low bit */ zend_hash_add_new_ptr(guards, str, - (void*)(((zend_uintptr_t)&Z_PROPERTY_GUARD_P(zv)) | 1)); + (void*)(((uintptr_t)&Z_PROPERTY_GUARD_P(zv)) | 1)); zval_ptr_dtor_str(zv); ZVAL_ARR(zv, guards); } @@ -574,7 +574,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe ZEND_ASSERT(guards != NULL); zv = zend_hash_find(guards, member); if (zv != NULL) { - return (uint32_t*)(((zend_uintptr_t)Z_PTR_P(zv)) & ~1); + return (uint32_t*)(((uintptr_t)Z_PTR_P(zv)) & ~1); } } else { ZEND_ASSERT(Z_TYPE_P(zv) == IS_UNDEF); diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index 7a9a3a00082c0..422bf6a53e2f3 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -25,14 +25,14 @@ #define OBJ_BUCKET_INVALID (1<<0) -#define IS_OBJ_VALID(o) (!(((zend_uintptr_t)(o)) & OBJ_BUCKET_INVALID)) +#define IS_OBJ_VALID(o) (!(((uintptr_t)(o)) & OBJ_BUCKET_INVALID)) -#define SET_OBJ_INVALID(o) ((zend_object*)((((zend_uintptr_t)(o)) | OBJ_BUCKET_INVALID))) +#define SET_OBJ_INVALID(o) ((zend_object*)((((uintptr_t)(o)) | OBJ_BUCKET_INVALID))) -#define GET_OBJ_BUCKET_NUMBER(o) (((zend_intptr_t)(o)) >> 1) +#define GET_OBJ_BUCKET_NUMBER(o) (((intptr_t)(o)) >> 1) #define SET_OBJ_BUCKET_NUMBER(o, n) do { \ - (o) = (zend_object*)((((zend_uintptr_t)(n)) << 1) | OBJ_BUCKET_INVALID); \ + (o) = (zend_object*)((((uintptr_t)(n)) << 1) | OBJ_BUCKET_INVALID); \ } while (0) #define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST(h) do { \ diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index cb480e1f4d8b9..8f9b7fd4a9e30 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -701,7 +701,7 @@ extern "C++" { # define ZEND_SET_ALIGNED(alignment, decl) decl #endif -#define ZEND_SLIDE_TO_ALIGNED(alignment, ptr) (((zend_uintptr_t)(ptr) + ((alignment)-1)) & ~((alignment)-1)) +#define ZEND_SLIDE_TO_ALIGNED(alignment, ptr) (((uintptr_t)(ptr) + ((alignment)-1)) & ~((alignment)-1)) #define ZEND_SLIDE_TO_ALIGNED16(ptr) ZEND_SLIDE_TO_ALIGNED(Z_UL(16), ptr) #ifdef ZEND_WIN32 diff --git a/Zend/zend_types.h b/Zend/zend_types.h index e6505d8b62ad1..7bcb5c1d73832 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -47,7 +47,6 @@ # define ZEND_ENDIAN_LOHI_C_4(a, b, c, d) a, b, c, d #endif -typedef bool zend_bool; typedef unsigned char zend_uchar; typedef enum { @@ -71,9 +70,6 @@ typedef ZEND_RESULT_CODE zend_result; # endif #endif -typedef intptr_t zend_intptr_t; -typedef uintptr_t zend_uintptr_t; - #ifdef ZTS #define ZEND_TLS static TSRM_TLS #define ZEND_EXT_TLS TSRM_TLS diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 0e3720b120351..3768d869dc3be 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -64706,7 +64706,7 @@ static void init_opcode_serialiser(void) Z_TYPE_INFO(tmp) = IS_LONG; for (i = 0; i < zend_handlers_count; i++) { Z_LVAL(tmp) = i; - zend_hash_index_add(zend_handlers_table, (zend_long)(zend_uintptr_t)zend_opcode_handlers[i], &tmp); + zend_hash_index_add(zend_handlers_table, (zend_long)(uintptr_t)zend_opcode_handlers[i], &tmp); } } @@ -64717,14 +64717,14 @@ ZEND_API void ZEND_FASTCALL zend_serialize_opcode_handler(zend_op *op) if (!zend_handlers_table) { init_opcode_serialiser(); } - zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler); + zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler); ZEND_ASSERT(zv != NULL); - op->handler = (const void *)(zend_uintptr_t)Z_LVAL_P(zv); + op->handler = (const void *)(uintptr_t)Z_LVAL_P(zv); } ZEND_API void ZEND_FASTCALL zend_deserialize_opcode_handler(zend_op *op) { - op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler]; + op->handler = zend_opcode_handlers[(uintptr_t)op->handler]; } ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *op) @@ -64737,7 +64737,7 @@ ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *o if (!zend_handlers_table) { init_opcode_serialiser(); } - zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler); + zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler); ZEND_ASSERT(zv != NULL); return zend_opcode_handler_funcs[Z_LVAL_P(zv)]; #else diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl index a131eead57205..717d4ffd3e8af 100644 --- a/Zend/zend_vm_execute.skl +++ b/Zend/zend_vm_execute.skl @@ -102,7 +102,7 @@ static void init_opcode_serialiser(void) Z_TYPE_INFO(tmp) = IS_LONG; for (i = 0; i < zend_handlers_count; i++) { Z_LVAL(tmp) = i; - zend_hash_index_add(zend_handlers_table, (zend_long)(zend_uintptr_t)zend_opcode_handlers[i], &tmp); + zend_hash_index_add(zend_handlers_table, (zend_long)(uintptr_t)zend_opcode_handlers[i], &tmp); } } @@ -113,14 +113,14 @@ ZEND_API void ZEND_FASTCALL zend_serialize_opcode_handler(zend_op *op) if (!zend_handlers_table) { init_opcode_serialiser(); } - zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler); + zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler); ZEND_ASSERT(zv != NULL); - op->handler = (const void *)(zend_uintptr_t)Z_LVAL_P(zv); + op->handler = (const void *)(uintptr_t)Z_LVAL_P(zv); } ZEND_API void ZEND_FASTCALL zend_deserialize_opcode_handler(zend_op *op) { - op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler]; + op->handler = zend_opcode_handlers[(uintptr_t)op->handler]; } ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *op) @@ -133,7 +133,7 @@ ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *o if (!zend_handlers_table) { init_opcode_serialiser(); } - zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler); + zv = zend_hash_index_find(zend_handlers_table, (zend_long)(uintptr_t)op->handler); ZEND_ASSERT(zv != NULL); return zend_opcode_handler_funcs[Z_LVAL_P(zv)]; #else diff --git a/docs/parameter-parsing-api.md b/docs/parameter-parsing-api.md index 76c571068d796..a5a405e6a241a 100644 --- a/docs/parameter-parsing-api.md +++ b/docs/parameter-parsing-api.md @@ -67,7 +67,7 @@ on input and is used to verify the PHP parameter is an instance of that class. ```txt a - array (zval*) A - array or object (zval*) -b - boolean (zend_bool) +b - boolean (bool) C - class (zend_class_entry*) d - double (double) f - function or array containing php method call info (returned as @@ -97,9 +97,9 @@ The following characters also have a meaning in the specifier string: * `!` - the parameter it follows can be of specified type or NULL. If NULL is passed, and the output for such type is a pointer, then the output pointer is set to a native NULL pointer. For 'b', 'l' and 'd', an extra argument of type - zend_bool* must be passed after the corresponding bool*, zend_long* or + bool* must be passed after the corresponding bool*, zend_long* or double* arguments, respectively. A non-zero value will be written to the - zend_bool if a PHP NULL is passed. + bool if a PHP NULL is passed. For `f` use the ``ZEND_FCI_INITIALIZED(fci)`` macro to check if a callable has been provided and ``!ZEND_FCI_INITIALIZED(fci)`` to check if a PHP NULL is passed. diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0c1c59c8c7bdd..cd06a8fb5458e 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2145,7 +2145,7 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl /* Records whether this is a special relative interval that needs to be recreated from a string */ if (intervalobj->from_string) { - ZVAL_BOOL(&zv, (zend_bool)intervalobj->from_string); + ZVAL_BOOL(&zv, (bool)intervalobj->from_string); zend_hash_str_update(props, "from_string", strlen("from_string"), &zv); ZVAL_STR_COPY(&zv, intervalobj->date_string); zend_hash_str_update(props, "date_string", strlen("date_string"), &zv); @@ -2171,7 +2171,7 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl ZVAL_FALSE(&zv); zend_hash_str_update(props, "days", sizeof("days")-1, &zv); } - ZVAL_BOOL(&zv, (zend_bool)intervalobj->from_string); + ZVAL_BOOL(&zv, (bool)intervalobj->from_string); zend_hash_str_update(props, "from_string", strlen("from_string"), &zv); #undef PHP_DATE_INTERVAL_ADD_PROPERTY diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 4d68bc3191cb9..1887f289f2f41 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -1507,11 +1507,11 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script #if defined(__AVX__) || defined(__SSE2__) /* Align to 64-byte boundary */ ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 64); - ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L); + ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 63L) & ~63L); #elif ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT /* Align to 8-byte boundary */ ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 8); - ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L); + ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 7L) & ~7L); #else ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used); #endif @@ -2410,7 +2410,7 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce, #if ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT /* Align to 8-byte boundary */ - ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L); + ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 7L) & ~7L); #endif memset(ZCG(mem), 0, size); diff --git a/ext/opcache/jit/zend_jit_disasm.c b/ext/opcache/jit/zend_jit_disasm.c index 8ce35f198c0e4..a9ac28308a5c8 100644 --- a/ext/opcache/jit/zend_jit_disasm.c +++ b/ext/opcache/jit/zend_jit_disasm.c @@ -262,7 +262,7 @@ static const char* zend_jit_disasm_resolver( ((void)ud); # endif const char *name; - void *a = (void*)(zend_uintptr_t)(addr); + void *a = (void*)(uintptr_t)(addr); Dl_info info; name = zend_jit_disasm_find_symbol(addr, offset); diff --git a/ext/opcache/jit/zend_jit_oprofile.c b/ext/opcache/jit/zend_jit_oprofile.c index a83b8056e0336..36081064b543e 100644 --- a/ext/opcache/jit/zend_jit_oprofile.c +++ b/ext/opcache/jit/zend_jit_oprofile.c @@ -27,7 +27,7 @@ static void zend_jit_oprofile_register(const char *name, size_t size) { if (op_agent) { - op_write_native_code(op_agent, name, (uint64_t)(zend_uintptr_t)start, start, size); + op_write_native_code(op_agent, name, (uint64_t)(uintptr_t)start, start, size); } } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 39429a316859c..ce7bb1374440a 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -46,7 +46,7 @@ static zend_always_inline const char *zend_jit_trace_star_desc(uint8_t trace_fla } } -static int zend_jit_trace_startup(zend_bool reattached) +static int zend_jit_trace_startup(bool reattached) { if (!reattached) { zend_jit_traces = (zend_jit_trace_info*)zend_shared_alloc(sizeof(zend_jit_trace_info) * JIT_G(max_root_traces)); diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 1cd639403f68b..e1307c8ead04a 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1098,7 +1098,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, bool in_shm) #if defined(__AVX__) || defined(__SSE2__) /* Align to 64-byte boundary */ mem = emalloc(script->size + 64); - buf = (void*)(((zend_uintptr_t)mem + 63L) & ~63L); + buf = (void*)(((uintptr_t)mem + 63L) & ~63L); #else mem = buf = emalloc(script->size); #endif @@ -1834,7 +1834,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl #if defined(__AVX__) || defined(__SSE2__) /* Align to 64-byte boundary */ mem = zend_arena_alloc(&CG(arena), info.mem_size + info.str_size + 64); - mem = (void*)(((zend_uintptr_t)mem + 63L) & ~63L); + mem = (void*)(((uintptr_t)mem + 63L) & ~63L); #else mem = zend_arena_alloc(&CG(arena), info.mem_size + info.str_size); #endif diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 7bc95b711102a..9698d584e80db 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -136,7 +136,7 @@ static void zend_hash_persist(HashTable *ht) hash_size >>= 1; } ht->nTableMask = (uint32_t)(-(int32_t)hash_size); - ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ + ZEND_ASSERT(((uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ HT_SET_DATA_ADDR(ht, ZCG(mem)); ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE((hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket)))); HT_HASH_RESET(ht); @@ -157,7 +157,7 @@ static void zend_hash_persist(HashTable *ht) void *data = ZCG(mem); void *old_data = HT_GET_DATA_ADDR(ht); - ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ + ZEND_ASSERT(((uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ ZCG(mem) = (void*)((char*)data + ZEND_ALIGNED_SIZE(HT_USED_SIZE(ht))); memcpy(data, old_data, HT_USED_SIZE(ht)); if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) { @@ -1308,7 +1308,7 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script script->mem = ZCG(mem); - ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ + ZEND_ASSERT(((uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ script = zend_shared_memdup_free(script, sizeof(zend_persistent_script)); script->corrupted = false; @@ -1323,9 +1323,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script #if defined(__AVX__) || defined(__SSE2__) /* Align to 64-byte boundary */ - ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L); + ZCG(mem) = (void*)(((uintptr_t)ZCG(mem) + 63L) & ~63L); #else - ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ + ZEND_ASSERT(((uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */ #endif #ifdef HAVE_JIT diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index f32f8c46eae48..cdb1ebfeb815c 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -355,7 +355,7 @@ void *zend_shared_alloc(size_t size) ZSMMG(shared_segments)[i]->pos += block_size; ZSMMG(shared_free) -= block_size; - ZEND_ASSERT(((zend_uintptr_t)retval & 0x7) == 0); /* should be 8 byte aligned */ + ZEND_ASSERT(((uintptr_t)retval & 0x7) == 0); /* should be 8 byte aligned */ return retval; } } diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 7c52997f18a79..2c62f878cbe47 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -141,7 +141,7 @@ static inline void *zend_shared_alloc_aligned(size_t size) { #if defined(__AVX__) || defined(__SSE2__) /* Align to 64-byte boundary */ void *p = zend_shared_alloc(size + 64); - return (void *)(((zend_uintptr_t)p + 63L) & ~63L); + return (void *)(((uintptr_t)p + 63L) & ~63L); #else return zend_shared_alloc(size); #endif diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 54c987405a708..4257a76ce5b6b 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -382,11 +382,11 @@ static zend_always_inline int php_base64_decode_impl(const unsigned char *in, si # if BASE64_INTRIN_AVX512_FUNC_PROTO || BASE64_INTRIN_AVX512_FUNC_PTR ZEND_INTRIN_AVX512_FUNC_DECL(zend_string *php_base64_encode_avx512(const unsigned char *str, size_t length)); -ZEND_INTRIN_AVX512_FUNC_DECL(zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_AVX512_FUNC_DECL(zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, bool strict)); # endif # if BASE64_INTRIN_AVX512_VBMI_FUNC_PROTO || BASE64_INTRIN_AVX512_VBMI_FUNC_PTR ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(zend_string *php_base64_encode_avx512_vbmi(const unsigned char *str, size_t length)); -ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_AVX512_VBMI_FUNC_DECL(zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, bool strict)); # endif # if ZEND_INTRIN_AVX2_RESOLVER @@ -552,7 +552,7 @@ zend_string *php_base64_encode_avx512_vbmi(const unsigned char *str, size_t leng return result; } -zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_avx512_vbmi(const unsigned char *str, size_t length, bool strict) { const unsigned char *c = str; unsigned char *o; @@ -680,7 +680,7 @@ zend_string *php_base64_encode_avx512(const unsigned char *str, size_t length) _mm512_setr4_epi32(build_dword(b0, b1, b2, b3), build_dword(b4, b5, b6, b7), \ build_dword(b8, b9, b10, b11), build_dword(b12, b13, b14, b15)) -zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_avx512(const unsigned char *str, size_t length, bool strict) { const unsigned char *c = str; unsigned char *o; diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 613cc48644c49..3f1d5e5db99cd 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -1282,7 +1282,7 @@ PHP_FUNCTION(proc_open) } #ifdef PHP_WIN32 - stream = php_stream_fopen_from_fd(_open_osfhandle((zend_intptr_t)descriptors[i].parentend, + stream = php_stream_fopen_from_fd(_open_osfhandle((intptr_t)descriptors[i].parentend, descriptors[i].mode_flags), mode_string, NULL); php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, blocking_pipes, NULL); #else diff --git a/ext/standard/var.c b/ext/standard/var.c index e98cb99cf5827..e8145ab227141 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -680,7 +680,7 @@ static inline zend_long php_add_var_hash(php_serialize_data_t data, zval *var) / /* Index for the variable is stored using the numeric value of the pointer to * the zend_refcounted struct */ - key = (zend_ulong) (zend_uintptr_t) Z_COUNTED_P(var); + key = (zend_ulong) (uintptr_t) Z_COUNTED_P(var); zv = zend_hash_index_find(&data->ht, key); if (zv) { @@ -1148,7 +1148,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_ } else { /* Mark this value in the var_hash, to avoid creating references to it. */ zval *var_idx = zend_hash_index_find(&var_hash->ht, - (zend_ulong) (zend_uintptr_t) Z_COUNTED_P(struc)); + (zend_ulong) (uintptr_t) Z_COUNTED_P(struc)); if (var_idx) { ZVAL_LONG(var_idx, -1); } diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 62f9aa4363972..a050fb5f74a70 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -616,7 +616,7 @@ declared_property: if ((*var_hash)->ref_props) { /* Remove old entry from ref_props table, if it exists. */ zend_hash_index_del( - (*var_hash)->ref_props, (zend_uintptr_t) data); + (*var_hash)->ref_props, (uintptr_t) data); } } /* We may override default property value, but they are usually immutable */ @@ -705,7 +705,7 @@ second_try: zend_hash_init((*var_hash)->ref_props, 8, NULL, NULL, 0); } zend_hash_index_update_ptr( - (*var_hash)->ref_props, (zend_uintptr_t) data, info); + (*var_hash)->ref_props, (uintptr_t) data, info); } } @@ -915,7 +915,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER) if (!Z_ISREF_P(rval_ref)) { zend_property_info *info = NULL; if ((*var_hash)->ref_props) { - info = zend_hash_index_find_ptr((*var_hash)->ref_props, (zend_uintptr_t) rval_ref); + info = zend_hash_index_find_ptr((*var_hash)->ref_props, (uintptr_t) rval_ref); } ZVAL_NEW_REF(rval_ref, rval_ref); if (info) { diff --git a/main/SAPI.c b/main/SAPI.c index 019de09782dec..e71cba0fb1db2 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -683,7 +683,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg) switch (op) { case SAPI_HEADER_SET_STATUS: - sapi_update_response_code((int)(zend_intptr_t) arg); + sapi_update_response_code((int)(intptr_t) arg); return SUCCESS; case SAPI_HEADER_ADD: diff --git a/main/main.c b/main/main.c index 99dbe341b6f32..65d7d4a03df10 100644 --- a/main/main.c +++ b/main/main.c @@ -1627,7 +1627,7 @@ static ZEND_COLD void php_message_handler_for_zend(zend_long message, const void strlcat(memory_leak_buf, relay_buf, sizeof(memory_leak_buf)); } } else { - unsigned long leak_count = (zend_uintptr_t) data; + unsigned long leak_count = (uintptr_t) data; snprintf(memory_leak_buf, 512, "Last leak repeated %lu time%s\n", leak_count, (leak_count>1?"s":"")); } diff --git a/main/php.h b/main/php.h index b7101ed22f0a6..3385fb799927e 100644 --- a/main/php.h +++ b/main/php.h @@ -434,4 +434,10 @@ END_EXTERN_C() #include "php_reentrancy.h" +/* the following typedefs are deprecated and will be removed in PHP + * 9.0; use the standard C99 types instead */ +typedef bool zend_bool; +typedef intptr_t zend_intptr_t; +typedef uintptr_t zend_uintptr_t; + #endif diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index e9a30f3334016..3a6b2ccf28dcc 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -258,9 +258,9 @@ static void detect_is_seekable(php_stdio_stream_data *self) { self->is_pipe = S_ISFIFO(self->sb.st_mode); } #elif defined(PHP_WIN32) - zend_uintptr_t handle = _get_osfhandle(self->fd); + uintptr_t handle = _get_osfhandle(self->fd); - if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) { + if (handle != (uintptr_t)INVALID_HANDLE_VALUE) { DWORD file_type = GetFileType((HANDLE)handle); self->is_seekable = !(file_type == FILE_TYPE_PIPE || file_type == FILE_TYPE_CHAR); @@ -733,7 +733,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void return -1; } - if ((zend_uintptr_t) ptrparam == PHP_STREAM_LOCK_SUPPORTED) { + if ((uintptr_t) ptrparam == PHP_STREAM_LOCK_SUPPORTED) { return 0; } diff --git a/win32/build/cppcheck_x64.cfg b/win32/build/cppcheck_x64.cfg index 4c221a6fcd3a5..6003d5dc7af23 100644 --- a/win32/build/cppcheck_x64.cfg +++ b/win32/build/cppcheck_x64.cfg @@ -2,11 +2,8 @@ - - - \n", 2 * ZT_G(observer_nesting_depth), "", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + } else { + php_printf("%*s\n", 2 * ZT_G(observer_nesting_depth), "", ZSTR_VAL(fbc->common.function_name)); + } + } else { + php_printf("%*s\n", 2 * ZT_G(observer_nesting_depth), "", ZSTR_VAL(fbc->op_array.filename)); + } + + if (zend_test_prev_execute_internal) { + zend_test_prev_execute_internal(execute_data, return_value); + } else { + fbc->internal_function.handler(execute_data, return_value); + } +} + static ZEND_INI_MH(zend_test_observer_OnUpdateCommaList) { zend_array **p = (zend_array **) ZEND_INI_GET_ADDR(); @@ -291,6 +312,7 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("zend_test.observer.fiber_init", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_fiber_init, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.observer.fiber_switch", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_fiber_switch, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.observer.fiber_destroy", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_fiber_destroy, zend_zend_test_globals, zend_test_globals) + STD_PHP_INI_BOOLEAN("zend_test.observer.execute_internal", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_execute_internal, zend_zend_test_globals, zend_test_globals) PHP_INI_END() void zend_test_observer_init(INIT_FUNC_ARGS) @@ -316,6 +338,11 @@ void zend_test_observer_init(INIT_FUNC_ARGS) zend_observer_fiber_switch_register(fiber_suspend_observer); zend_observer_fiber_destroy_register(fiber_destroy_observer); } + + if (ZT_G(observer_execute_internal)) { + zend_test_prev_execute_internal = zend_execute_internal; + zend_execute_internal = zend_test_execute_internal; + } } void zend_test_observer_shutdown(SHUTDOWN_FUNC_ARGS) diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index e51854699caa2..05f658e91bdb6 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -48,6 +48,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zend_test) int observer_fiber_init; int observer_fiber_switch; int observer_fiber_destroy; + int observer_execute_internal; HashTable global_weakmap; int replace_zend_execute_ex; int register_passes; diff --git a/ext/zend_test/tests/execute_internal.phpt b/ext/zend_test/tests/execute_internal.phpt new file mode 100644 index 0000000000000..ce6cb851aed60 --- /dev/null +++ b/ext/zend_test/tests/execute_internal.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test zend_execute_internal being called +--EXTENSIONS-- +zend_test +--INI-- +zend_test.observer.execute_internal=1 +--FILE-- + 0 ? [1, 2, 3] : []); + +?> +--EXPECT-- + + + +int(6) From b3e28e22904aca99beb5e8a26a34d7c8b46c69ee Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 12 Mar 2023 16:38:01 +0100 Subject: [PATCH 624/895] Fix module shutdown crash during ZTS JIT shutdown Commit a21195650e53 fixed a leak by adding a TSRM destructor for the JIT globals in ZTS mode. In case the main thread shuts down the TSRM, it will call all the destructors. The JIT globals destructor will be invoked, but will always access the main thread globals using JIT_G. This means that instead of freeing the JIT globals in the different threads, the one in the main thread is freed repeatedly over and over, crashing PHP. Fix it by always passing the pointer instead of relying on JIT_G. Closes GH-10835. --- ext/opcache/jit/zend_jit.c | 4 ++-- ext/opcache/jit/zend_jit_trace.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d2f6df0537c9d..8c6934dfb6358 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4762,7 +4762,7 @@ static void zend_jit_globals_ctor(zend_jit_globals *jit_globals) #ifdef ZTS static void zend_jit_globals_dtor(zend_jit_globals *jit_globals) { - zend_jit_trace_free_caches(); + zend_jit_trace_free_caches(jit_globals); } #endif @@ -5081,7 +5081,7 @@ ZEND_EXT_API void zend_jit_shutdown(void) #ifdef ZTS ts_free_id(jit_globals_id); #else - zend_jit_trace_free_caches(); + zend_jit_trace_free_caches(&jit_globals); #endif } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 14cd945bbe650..eac9719a98c2c 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -8324,10 +8324,10 @@ static void zend_jit_trace_reset_caches(void) #endif } -static void zend_jit_trace_free_caches(void) +static void zend_jit_trace_free_caches(zend_jit_globals *jit_globals) { - if (JIT_G(exit_counters)) { - free(JIT_G(exit_counters)); + if (jit_globals->exit_counters) { + free(jit_globals->exit_counters); } } From 974a3d84412ac5412e0cdb36353f6f88fd0e60ce Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 11 Mar 2023 22:29:36 +0000 Subject: [PATCH 625/895] ext/mysqli/pgsql: mysqli_fetch_object/pgsql_fetch_object raises ValueError on constructor args error. Closes GH-10832. --- NEWS | 8 ++++++++ UPGRADING | 7 +++++++ ext/mysqli/mysqli.c | 3 +-- .../tests/mysqli_fetch_object_no_constructor.phpt | 10 +++++----- ext/pgsql/pgsql.c | 3 +-- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 0f083bebf119b..375dbfbc0e448 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,10 @@ PHP NEWS Underscores must be encoded as "=5F" in such MIME encoded words. (Alex Dowad) +- mysqli: + . mysqli_fetch_object raises a ValueError instead of an Exception. + (David Carlier) + - Opcache: . Added start, restart and force restart time to opcache's phpinfo section. (Mikhail Galanin) @@ -90,6 +94,10 @@ PHP NEWS . SA_ONSTACK is now set for pcntl_signal. (Kévin Dunglas) . Added SIGINFO constant. (David Carlier) +- PGSQL: + . pg_fetch_object raises a ValueError instead of an Exception. + (David Carlier) + - Posix: . Added posix_sysconf. (David Carlier) . Added posix_pathconf. (David Carlier) diff --git a/UPGRADING b/UPGRADING index 419fcf5919a29..de81b63dec5c6 100644 --- a/UPGRADING +++ b/UPGRADING @@ -92,6 +92,13 @@ PHP 8.3 UPGRADE NOTES Underscores must be encoded as "=5F" in such MIME encoded words. (Alex Dowad) +- mysqli: + . mysqli_fetch_object now raises a ValueError instead of an Exception when the constructor_args + argument is non empty with the class not having constructor. +- PGSQL: + . pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args + argument is non empty with the class not having constructor. + - Standard: . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index b42226a13f96c..f98ab2fc15f46 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -805,8 +805,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags zend_call_known_function(ce->constructor, Z_OBJ_P(return_value), Z_OBJCE_P(return_value), /* retval */ NULL, /* argc */ 0, /* params */ NULL, ctor_params); } else if (ctor_params && zend_hash_num_elements(ctor_params) > 0) { - /* TODO Convert this to a ValueError */ - zend_argument_error(zend_ce_exception, ERROR_ARG_POS(3), + zend_argument_value_error(ERROR_ARG_POS(3), "must be empty when the specified class (%s) does not have a constructor", ZSTR_VAL(ce->name) ); diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt index 345eef6e28245..371299808ce25 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt @@ -32,11 +32,11 @@ require_once('skipifconnectfailure.inc'); printf("No exception with PHP:\n"); var_dump($obj = new mysqli_fetch_object_test(1, 2)); - printf("\nException with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed:\n"); + printf("\nValueError with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed:\n"); try { var_dump($obj = mysqli_fetch_object($res, 'mysqli_fetch_object_test', array(1, 2))); - } catch (Exception $e) { - printf("Exception: %s\n", $e->getMessage()); + } catch (ValueError $e) { + printf("ValueError: %s\n", $e->getMessage()); } printf("\nFatal error with PHP (but no exception!):\n"); @@ -62,8 +62,8 @@ object(mysqli_fetch_object_test)#%d (%d) { NULL } -Exception with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed: -Exception: mysqli_fetch_object(): Argument #3 ($constructor_args) must be empty when the specified class (mysqli_fetch_object_test) does not have a constructor +ValueError with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed: +ValueError: mysqli_fetch_object(): Argument #3 ($constructor_args) must be empty when the specified class (mysqli_fetch_object_test) does not have a constructor Fatal error with PHP (but no exception!): diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 5157c0e6162ad..a2d6da12209b0 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1847,8 +1847,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ zend_call_known_function(ce->constructor, Z_OBJ_P(return_value), Z_OBJCE_P(return_value), /* retval */ NULL, /* argc */ 0, /* params */ NULL, ctor_params); } else if (ctor_params && zend_hash_num_elements(ctor_params) > 0) { - /* TODO Convert this to a ValueError */ - zend_argument_error(zend_ce_exception, 3, + zend_argument_value_error(3, "must be empty when the specified class (%s) does not have a constructor", ZSTR_VAL(ce->name) ); From f575027b56e8a67cb9e58237ffc4c4be8928199b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Mar 2023 15:27:11 +0100 Subject: [PATCH 626/895] avoid test file being consider binary --- ext/date/tests/gh10747-1.phpt | Bin 1092 -> 1118 bytes ext/date/tests/gh10747-2.phpt | Bin 1044 -> 1070 bytes ext/date/tests/gh10747-3.phpt | Bin 1409 -> 1435 bytes ext/date/tests/gh10747-4.phpt | Bin 3198 -> 3224 bytes ext/date/tests/gh10747-error.phpt | Bin 1833 -> 1885 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/ext/date/tests/gh10747-1.phpt b/ext/date/tests/gh10747-1.phpt index 04f3efc1296cb462764074a0dffe7afb77916046..e02d84b0886c803540720972d7a5f48f04b41f50 100644 GIT binary patch delta 104 zcmX@YagSreL`Iq7lA`#c)PkJE(Z46Tc;%&n9lB1Rw)BdCZLNR2T_#27BJ*^Zfw5dd^s9HsyO delta 78 zcmcb|afD;TL`Ei+;>~Lrix@2#JQ>Ooiwu>lGp!7*i>=J9lprETAQ2;|h!#kVF-XK1 LF0wg-nT-(uYfBUk diff --git a/ext/date/tests/gh10747-2.phpt b/ext/date/tests/gh10747-2.phpt index 7bda7858d88df02b29b8faac5a3283103826f67e..ba5e02731e0b6c723ac5be8f325938ea2c64c5e9 100644 GIT binary patch delta 103 zcmbQjv5sTI3`UvalA`#c)PkJE(Z46Tc;%&n9lB1Rw)BdCZLNR2T_#279zS%vun04>cN;s5{u delta 77 zcmZ3-F@}wa0~swDJQ>Ooiwu>lGp!7*i>=J9lprETAQ2;|h!#kVF-XK1 KE;8AU`2zqpUld9J diff --git a/ext/date/tests/gh10747-3.phpt b/ext/date/tests/gh10747-3.phpt index 2ea11619e7bb2484235eaa4001c4e55bd19b5eae..ea37c26eb2494be6778d6bc37afb4938c86dc92e 100644 GIT binary patch delta 104 zcmZqVp3S{s0;5cENl|=JYC%q7a;iphMv;brrjCNTqPmWPO0nkVNsJ~;mWrN=Wr;Y=G`bUw diff --git a/ext/date/tests/gh10747-4.phpt b/ext/date/tests/gh10747-4.phpt index 500c0e320c7f48b3525ab1724d702421a2c13dc8..9933902a498d840b7e713f11f8a67225da2e04d8 100644 GIT binary patch delta 104 zcmew-F+*~L50gxBNl|=JYC%q7a;iphMv;brrjCNTqPmWPO0nihiC5VU-NW=&#q6Jc83=%Ph Li)=o?af2BEJ4_Ug diff --git a/ext/date/tests/gh10747-error.phpt b/ext/date/tests/gh10747-error.phpt index c0863d1d8723adba23ec090cbe9696bb91e59ba3..b6c3900e23b9a5539a8ca8dae87ce6aee6ddd0e6 100644 GIT binary patch delta 327 zcmZ3hiC5VU-NW=&#q6Jc83=%Phi%hmhiC5VU-NW=&#q6Jc83=%Phi%kB_D9@x) rJlTxtg(ZU*h9TY{5uy#5#JrFKm)Nt3Z*FF326~2EcWkz2lVbz`mgPl8 From 63525ee600806e2b26f9ae4c2200a8963d05d807 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 14 Mar 2023 11:39:39 +0100 Subject: [PATCH 627/895] use_tls=0 on MSAN Attempt to fix MSAN failure in CI Closes GH-10851 --- run-tests.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/run-tests.php b/run-tests.php index edfab1f57adcd..175e0a5c48eea 100755 --- a/run-tests.php +++ b/run-tests.php @@ -580,14 +580,22 @@ function main(): void $environment['USE_TRACKED_ALLOC'] = 1; $environment['SKIP_ASAN'] = 1; $environment['SKIP_PERF_SENSITIVE'] = 1; + $lsan_options = []; if ($switch === '--msan') { $environment['SKIP_MSAN'] = 1; + // use_tls=0 is a workaround for MSAN crashing with "Tracer caught signal 11" (SIGSEGV), + // which seems to be an issue with TLS support in newer glibc versions under virtualized + // environments. Follow https://github.com/google/sanitizers/issues/1342 and + // https://github.com/google/sanitizers/issues/1409 to track this issue. + $lsan_options[] = 'use_tls=0'; } - $lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt'; if (file_exists($lsanSuppressions)) { - $environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions - . ':print_suppressions=0'; + $lsan_options[] = 'suppressions=' . $lsanSuppressions; + $lsan_options[] = 'print_suppressions=0'; + } + if (!empty($lsan_options)) { + $environment['LSAN_OPTIONS'] = join(':', $lsan_options); } break; case '--repeat': From a14154359478e158d3c2847d37939d8fc8d1438f Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Tue, 14 Mar 2023 09:55:33 +0100 Subject: [PATCH 628/895] Fix test on non-UTC platforms --- ext/date/tests/gh10747-1.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/date/tests/gh10747-1.phpt b/ext/date/tests/gh10747-1.phpt index e02d84b0886c8..6976422cdf206 100644 --- a/ext/date/tests/gh10747-1.phpt +++ b/ext/date/tests/gh10747-1.phpt @@ -1,5 +1,7 @@ --TEST-- Bug GH-10747 (Private fields in serialized DateTimeImmutable objects throw) +--INI-- +date.timezone=UTC --FILE-- Date: Tue, 7 Mar 2023 11:29:39 +0100 Subject: [PATCH 629/895] Fix mysql tests on Cirrus ASAN We used localhost instead of 127.0.0.1, so the tests were never actually run. Closes GH-10802 --- .cirrus.yml | 8 +++++--- ext/pdo_mysql/tests/pdo_mysql___construct.phpt | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index a7676803d1fe3..1b1e133756fe5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,8 +7,10 @@ asan_task: image: gcc:latest additional_containers: - name: mysql - image: mysql:latest + image: mysql:8 port: 3306 + cpu: 1.0 + memory: 1G env: MYSQL_ROOT_PASSWORD: "root" MYSQL_DATABASE: "test" @@ -160,10 +162,10 @@ asan_task: tests_script: - export SKIP_IO_CAPTURE_TESTS=1 - export CI_NO_IPV6=1 - - export MYSQL_TEST_HOST=mysql + - export MYSQL_TEST_HOST=127.0.0.1 - export MYSQL_TEST_USER=root - export MYSQL_TEST_PASSWD=root - - export PDO_MYSQL_TEST_DSN="mysql:host=mysql;dbname=test" + - export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test" - export PDO_MYSQL_TEST_USER=root - export PDO_MYSQL_TEST_PASS=root - >- diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index bf70cad4fce7d..fd0a2f55d001c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -6,6 +6,7 @@ pdo_mysql --FILE-- Date: Wed, 15 Mar 2023 00:08:11 +0100 Subject: [PATCH 630/895] [skip ci] Fix misleading xfail message --- ext/pdo_mysql/tests/pdo_mysql___construct.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index fd0a2f55d001c..1f009185267c5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -6,7 +6,7 @@ pdo_mysql --FILE-- Date: Mon, 6 Mar 2023 16:18:18 +0100 Subject: [PATCH 631/895] Move ARM64 build to Cirrus Travis is very unreliable lately Closes GH-10795 --- .cirrus.yml | 205 +++++++++++++++++- .travis.yml | 4 - .../tests/pdo_mysql___construct.phpt | 1 + ext/standard/tests/file/bug52820.phpt | 2 + .../tests/file/disk_free_space_basic.phpt | 1 + 5 files changed, 204 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2db9f81aa50d..270fd25551b64 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,12 +1,12 @@ env: CIRRUS_CLONE_DEPTH: 1 - ARCH: amd64 -freebsd_instance: - image_family: freebsd-13-0 - -task: +freebsd_task: name: FREEBSD_DEBUG_NTS + freebsd_instance: + image_family: freebsd-13-0 + env: + ARCH: amd64 install_script: #- sed -i -e 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf #- pkg upgrade -y @@ -26,3 +26,198 @@ task: - export SKIP_IO_CAPTURE_TESTS=1 - export CI_NO_IPV6=1 - sapi/cli/php run-tests.php -P -q -j2 -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so + +arm_task: + name: ARM_DEBUG_NTS + arm_container: + image: gcc:10 + additional_containers: + - name: mysql + image: mysql:8 + port: 3306 + cpu: 1.0 + memory: 1G + env: + MYSQL_ALLOW_EMPTY_PASSWORD: true + MYSQL_ROOT_PASSWORD: "" + MYSQL_DATABASE: "test" + - name: postgres + image: postgres:latest + port: 5432 + env: + POSTGRES_PASSWORD: "postgres" + POSTGRES_DB: "test" + install_script: + - export DEBIAN_FRONTEND=noninteractive + - apt-get update -y + - >- + apt-get install -y + bison + re2c + locales + locales-all + ldap-utils + openssl + slapd + libgmp-dev + libicu-dev + libtidy-dev + libenchant-dev + libaspell-dev + libpspell-dev + libsasl2-dev + libxpm-dev + libzip-dev + libsqlite3-dev + libwebp-dev + libonig-dev + libkrb5-dev + libgssapi-krb5-2 + libcurl4-openssl-dev + libxml2-dev + libxslt1-dev + libpq-dev + libreadline-dev + libldap2-dev + libsodium-dev + libargon2-0-dev + libmm-dev + libsnmp-dev + snmpd + `#snmp-mibs-downloader` + freetds-dev + `#unixodbc-dev` + libc-client-dev + dovecot-core + dovecot-pop3d + dovecot-imapd + sendmail + firebird-dev + liblmdb-dev + libtokyocabinet-dev + libdb-dev + libqdbm-dev + libjpeg-dev + libpng-dev + libfreetype6-dev + build_script: + - ./buildconf -f + - >- + ./configure + --enable-debug + --enable-zts + --enable-option-checking=fatal + --prefix=/usr + --enable-phpdbg + --enable-fpm + --enable-opcache + --with-pdo-mysql=mysqlnd + --with-mysqli=mysqlnd + --with-pgsql + --with-pdo-pgsql + --with-pdo-sqlite + --enable-intl + --without-pear + --enable-gd + --with-jpeg + --with-webp + --with-freetype + --with-xpm + --enable-exif + --with-zip + --with-zlib + --with-zlib-dir=/usr + --enable-soap + --enable-xmlreader + --with-xsl + --with-tidy + --enable-sysvsem + --enable-sysvshm + --enable-shmop + --enable-pcntl + --with-readline + --enable-mbstring + --with-curl + --with-gettext + --enable-sockets + --with-bz2 + --with-openssl + --with-gmp + --enable-bcmath + --enable-calendar + --enable-ftp + --with-pspell=/usr + --with-enchant=/usr + --with-kerberos + --enable-sysvmsg + --with-ffi + --enable-zend-test + --enable-dl-test=shared + --with-ldap + --with-ldap-sasl + --with-password-argon2 + --with-mhash + --with-sodium + --enable-dba + --with-cdb + --enable-flatfile + --enable-inifile + --with-tcadb + --with-lmdb + --with-qdbm + --with-snmp + `#--with-unixODBC` + --with-imap + --with-kerberos + --with-imap-ssl + `#--with-pdo-odbc=unixODBC,/usr` + `#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient` + `#--with-oci8=shared,instantclient,/opt/oracle/instantclient` + --with-config-file-path=/etc + --with-config-file-scan-dir=/etc/php.d + --with-pdo-firebird + `#--with-pdo-dblib` + --disable-phpdbg + `#--enable-werror` + - make -j2 > /dev/null + - make install + - mkdir -p /etc/php.d + - echo opcache.enable_cli=1 > /etc/php.d/opcache.ini + - echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini + # Specify opcache.preload_user as we're running as root. + - echo opcache.preload_user=root >> /etc/php.d/opcache.ini + tests_script: + - export SKIP_IO_CAPTURE_TESTS=1 + - export CI_NO_IPV6=1 + - export MYSQL_TEST_HOST=127.0.0.1 + - export MYSQL_TEST_USER=root + - export MYSQL_TEST_PASSWD= + - export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test" + - export PDO_MYSQL_TEST_USER=root + - export PDO_MYSQL_TEST_PASS= + - export PDO_PGSQL_TEST_DSN="pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=postgres" + - >- + sapi/cli/php run-tests.php + -d zend_extension=opcache.so + -d opcache.enable_cli=1 + -d opcache.jit_buffer_size=16M + -d opcache.jit=function + -P -q -x -j2 + -g FAIL,BORK,LEAK,XLEAK + --offline + --show-diff + --show-slow 1000 + --set-timeout 120 + - >- + sapi/cli/php run-tests.php + -d zend_extension=opcache.so + -d opcache.enable_cli=1 + -d opcache.jit_buffer_size=16M + -d opcache.jit=tracing + -P -q -x -j2 + -g FAIL,BORK,LEAK,XLEAK + --offline + --show-diff + --show-slow 1000 + --set-timeout 120 + --repeat 2 diff --git a/.travis.yml b/.travis.yml index d5032d20ff5a9..9f764251afffc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,8 +68,6 @@ env: jobs: include: - - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 ARM64=1 - arch: arm64 - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 S390X=1 arch: s390x @@ -88,8 +86,6 @@ before_script: # Run PHPs run-tests.php script: - ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing - - if [[ "$ARM64" == 1 ]]; then ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=function; fi - - if [[ "$ARM64" == 1 ]]; then ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing --repeat 2; fi - sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");' after_success: diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index bf70cad4fce7d..1f009185267c5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -6,6 +6,7 @@ pdo_mysql --FILE-- --FILE-- --INI-- memory_limit=32M From 84e7d4a3c8bbde6a36db1613614eb8f17317a581 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 15 Mar 2023 02:11:11 +0100 Subject: [PATCH 632/895] [skip ci] Skip upload_2G.phpt on Cirrus --- sapi/cli/tests/upload_2G.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt index 6993a6776d197..7ca9177229191 100644 --- a/sapi/cli/tests/upload_2G.phpt +++ b/sapi/cli/tests/upload_2G.phpt @@ -36,6 +36,8 @@ if (getenv('TRAVIS')) { die("skip Fails intermittently on travis"); } +if (getenv('CIRRUS_CI')) die('skip Fails on Cirrus'); + if (getenv('SKIP_PERF_SENSITIVE')) { die("skip Test may be very slow if PHP is instrumented"); } From bdf2f722cac2f518481e29bfc17e3dfb590db157 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 3 Mar 2023 11:12:13 +0100 Subject: [PATCH 633/895] remove assert raising strange behavior with GCC 10 --- ext/reflection/php_reflection.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 9a9685e7292e7..42fec082c1737 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1748,7 +1748,6 @@ ZEND_METHOD(ReflectionFunctionAbstract, getClosureUsedVariables) zend_op *opline = ops->opcodes + ops->num_args; if (ops->fn_flags & ZEND_ACC_VARIADIC) { - ZEND_ASSERT(opline->opcode == ZEND_RECV_VARIADIC); opline++; } From 6ebb506637034ea075ee1b552c993d248e2c4ac3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 15 Mar 2023 13:03:42 +0100 Subject: [PATCH 634/895] Upgrade cirrus arm build to GCC 12 (#10855) --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index cf99d596e68e0..ceacdf28b8a34 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -211,7 +211,7 @@ freebsd_task: arm_task: name: ARM_DEBUG_NTS arm_container: - image: gcc:10 + image: gcc:12 additional_containers: - name: mysql image: mysql:8 @@ -243,7 +243,7 @@ arm_task: libgmp-dev libicu-dev libtidy-dev - libenchant-dev + libenchant-2-dev libaspell-dev libpspell-dev libsasl2-dev From 0ce755be261f7bd1d78dbf4e3abad2e93e13c784 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 17 Feb 2023 13:51:02 +0200 Subject: [PATCH 635/895] Implement mb_encode_mimeheader using fast text conversion filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The behavior of the new mb_encode_mimeheader implementation closely follows the old implementation, except for three points: • The old implementation was missing a call to the mbfl_convert_filter flush function. So it would sometimes truncate the input string just before its end. • The old implementation would drop zero bytes when QPrint-encoding. So for example, if you tried to QPrint-encode the UTF-32BE string "\x00\x00\x12\x34", its QPrint-encoding would be "=12=34", which does not decode to a valid UTF-32BE string. This is now fixed. • In some rare corner cases, the new implementation will choose to Base64-encode or QPrint-encode the input string, where the old implementation would have just added newlines to it. Specifically, this can happen when there is a non-space ASCII character, followed by a large number of ASCII spaces, followed by a non-ASCII character. The new implementation is around 2.5-8x faster than the old one, depending on the text encoding and transfer encoding used. Performance gains are greater with Base64 transfer encoding than with QPrint transfer encoding; this is not because QPrint-encoding bytes is slow, but because QPrint-encoded output is much bigger than Base64-encoded output and takes more lines, so we have to go through the process of finding the right place to break a line many more times. --- .../libmbfl/filters/mbfilter_base64.c | 22 +- .../libmbfl/filters/mbfilter_qprint.c | 38 +- ext/mbstring/libmbfl/mbfl/mbfilter.c | 309 ----------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 25 - ext/mbstring/libmbfl/mbfl/mbfl_consts.h | 3 - ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 46 +- ext/mbstring/mbstring.c | 510 +++++++++++++++--- .../tests/mb_encode_mimeheader_basic4.phpt | 160 ++++++ 8 files changed, 649 insertions(+), 464 deletions(-) create mode 100644 ext/mbstring/tests/mb_encode_mimeheader_basic4.phpt diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index ede3eef18ce7c..f53ea4d9ae6f6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -99,15 +99,13 @@ int mbfl_filt_conv_base64enc(int c, mbfl_convert_filter *filter) filter->cache |= (c & 0xff) << 8; } else { filter->status &= ~0xff; - if ((filter->status & MBFL_BASE64_STS_MIME_HEADER) == 0) { - n = (filter->status & 0xff00) >> 8; - if (n > 72) { - CK((*filter->output_function)(0x0d, filter->data)); /* CR */ - CK((*filter->output_function)(0x0a, filter->data)); /* LF */ - filter->status &= ~0xff00; - } - filter->status += 0x400; + n = (filter->status & 0xff00) >> 8; + if (n > 72) { + CK((*filter->output_function)(0x0d, filter->data)); /* CR */ + CK((*filter->output_function)(0x0a, filter->data)); /* LF */ + filter->status &= ~0xff00; } + filter->status += 0x400; n = filter->cache | (c & 0xff); CK((*filter->output_function)(mbfl_base64_table[(n >> 18) & 0x3f], filter->data)); CK((*filter->output_function)(mbfl_base64_table[(n >> 12) & 0x3f], filter->data)); @@ -129,11 +127,9 @@ int mbfl_filt_conv_base64enc_flush(mbfl_convert_filter *filter) filter->cache = 0; /* flush fragments */ if (status >= 1) { - if ((filter->status & MBFL_BASE64_STS_MIME_HEADER) == 0) { - if (len > 72){ - CK((*filter->output_function)(0x0d, filter->data)); /* CR */ - CK((*filter->output_function)(0x0a, filter->data)); /* LF */ - } + if (len > 72){ + CK((*filter->output_function)(0x0d, filter->data)); /* CR */ + CK((*filter->output_function)(0x0a, filter->data)); /* LF */ } CK((*filter->output_function)(mbfl_base64_table[(cache >> 18) & 0x3f], filter->data)); CK((*filter->output_function)(mbfl_base64_table[(cache >> 12) & 0x3f], filter->data)); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 5fde30ee80935..1ff2f3c2161c8 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -29,7 +29,6 @@ #include "mbfilter.h" #include "mbfilter_qprint.h" -#include "unicode_prop.h" static size_t mb_qprint_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_qprint(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); @@ -96,28 +95,25 @@ int mbfl_filt_conv_qprintenc(int c, mbfl_convert_filter *filter) break; } - if ((filter->status & MBFL_QPRINT_STS_MIME_HEADER) == 0) { - if (s == 0x0a || (s == 0x0d && c != 0x0a)) { /* line feed */ - CK((*filter->output_function)(0x0d, filter->data)); /* CR */ - CK((*filter->output_function)(0x0a, filter->data)); /* LF */ - filter->status &= ~0xff00; - break; - } else if (s == 0x0d) { - break; - } + if (s == '\n' || (s == '\r' && c != '\n')) { /* line feed */ + CK((*filter->output_function)('\r', filter->data)); + CK((*filter->output_function)('\n', filter->data)); + filter->status &= ~0xff00; + break; + } else if (s == 0x0d) { + break; } - if ((filter->status & MBFL_QPRINT_STS_MIME_HEADER) == 0 && n >= 72) { /* soft line feed */ - CK((*filter->output_function)(0x3d, filter->data)); /* '=' */ - CK((*filter->output_function)(0x0d, filter->data)); /* CR */ - CK((*filter->output_function)(0x0a, filter->data)); /* LF */ + if (n >= 72) { /* soft line feed */ + CK((*filter->output_function)('=', filter->data)); + CK((*filter->output_function)('\r', filter->data)); + CK((*filter->output_function)('\n', filter->data)); filter->status &= ~0xff00; } - if (s <= 0 || s >= 0x80 || s == 0x3d /* not ASCII or '=' */ - || ((filter->status & MBFL_QPRINT_STS_MIME_HEADER) && mime_char_needs_qencode[s])) { + if (s <= 0 || s >= 0x80 || s == '=') { /* not ASCII or '=' */ /* hex-octet */ - CK((*filter->output_function)(0x3d, filter->data)); /* '=' */ + CK((*filter->output_function)('=', filter->data)); n = (s >> 4) & 0xf; if (n < 10) { n += 48; /* '0' */ @@ -132,14 +128,10 @@ int mbfl_filt_conv_qprintenc(int c, mbfl_convert_filter *filter) n += 55; } CK((*filter->output_function)(n, filter->data)); - if ((filter->status & MBFL_QPRINT_STS_MIME_HEADER) == 0) { - filter->status += 0x300; - } + filter->status += 0x300; } else { CK((*filter->output_function)(s, filter->data)); - if ((filter->status & MBFL_QPRINT_STS_MIME_HEADER) == 0) { - filter->status += 0x100; - } + filter->status += 0x100; } break; } diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index cbf487b1a5b7d..02af1cde45734 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -523,312 +523,3 @@ mbfl_strcut( return result; } - - -/* - * MIME header encode - */ -struct mime_header_encoder_data { - mbfl_convert_filter *conv1_filter; - mbfl_convert_filter *block_filter; - mbfl_convert_filter *conv2_filter; - mbfl_convert_filter *conv2_filter_backup; - mbfl_convert_filter *encod_filter; - mbfl_convert_filter *encod_filter_backup; - mbfl_memory_device outdev; - mbfl_memory_device tmpdev; - int status1; - int status2; - size_t prevpos; - size_t linehead; - size_t firstindent; - int encnamelen; - int lwsplen; - char encname[128]; - char lwsp[16]; -}; - -static int -mime_header_encoder_block_collector(int c, void *data) -{ - size_t n; - struct mime_header_encoder_data *pe = (struct mime_header_encoder_data *)data; - - switch (pe->status2) { - case 1: /* encoded word */ - pe->prevpos = pe->outdev.pos; - mbfl_convert_filter_copy(pe->conv2_filter, pe->conv2_filter_backup); - mbfl_convert_filter_copy(pe->encod_filter, pe->encod_filter_backup); - (*pe->conv2_filter->filter_function)(c, pe->conv2_filter); - (*pe->conv2_filter->filter_flush)(pe->conv2_filter); - (*pe->encod_filter->filter_flush)(pe->encod_filter); - n = pe->outdev.pos - pe->linehead + pe->firstindent; - pe->outdev.pos = pe->prevpos; - mbfl_convert_filter_copy(pe->conv2_filter_backup, pe->conv2_filter); - mbfl_convert_filter_copy(pe->encod_filter_backup, pe->encod_filter); - if (n >= 74) { - (*pe->conv2_filter->filter_flush)(pe->conv2_filter); - (*pe->encod_filter->filter_flush)(pe->encod_filter); - mbfl_memory_device_strncat(&pe->outdev, "\x3f\x3d", 2); /* ?= */ - mbfl_memory_device_strncat(&pe->outdev, pe->lwsp, pe->lwsplen); - pe->linehead = pe->outdev.pos; - pe->firstindent = 0; - mbfl_memory_device_strncat(&pe->outdev, pe->encname, pe->encnamelen); - c = (*pe->conv2_filter->filter_function)(c, pe->conv2_filter); - } else { - c = (*pe->conv2_filter->filter_function)(c, pe->conv2_filter); - } - break; - - default: - mbfl_memory_device_strncat(&pe->outdev, pe->encname, pe->encnamelen); - c = (*pe->conv2_filter->filter_function)(c, pe->conv2_filter); - pe->status2 = 1; - break; - } - - return 0; -} - -static int -mime_header_encoder_collector(int c, void *data) -{ - static int qp_table[256] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ - 0, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 1, 0, 1, /* 0x10 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x50 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x70 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xA0 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xB0 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xC0 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xD0 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xE0 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 /* 0xF0 */ - }; - - size_t n; - struct mime_header_encoder_data *pe = (struct mime_header_encoder_data *)data; - - switch (pe->status1) { - case 11: /* encoded word */ - (*pe->block_filter->filter_function)(c, pe->block_filter); - break; - - default: /* ASCII */ - if (c <= 0x00ff && !qp_table[(c & 0xff)]) { /* ordinary characters */ - mbfl_memory_device_output(c, &pe->tmpdev); - pe->status1 = 1; - } else if (pe->status1 == 0 && c == 0x20) { /* repeat SPACE */ - mbfl_memory_device_output(c, &pe->tmpdev); - } else { - if (pe->tmpdev.pos < 74 && c == 0x20) { - n = pe->outdev.pos - pe->linehead + pe->tmpdev.pos + pe->firstindent; - if (n > 74) { - mbfl_memory_device_strncat(&pe->outdev, pe->lwsp, pe->lwsplen); /* LWSP */ - pe->linehead = pe->outdev.pos; - pe->firstindent = 0; - } else if (pe->outdev.pos > 0) { - mbfl_memory_device_output(0x20, &pe->outdev); - } - mbfl_memory_device_devcat(&pe->outdev, &pe->tmpdev); - mbfl_memory_device_reset(&pe->tmpdev); - pe->status1 = 0; - } else { - n = pe->outdev.pos - pe->linehead + pe->encnamelen + pe->firstindent; - if (n > 60) { - mbfl_memory_device_strncat(&pe->outdev, pe->lwsp, pe->lwsplen); /* LWSP */ - pe->linehead = pe->outdev.pos; - pe->firstindent = 0; - } else if (pe->outdev.pos > 0) { - mbfl_memory_device_output(0x20, &pe->outdev); - } - mbfl_convert_filter_devcat(pe->block_filter, &pe->tmpdev); - mbfl_memory_device_reset(&pe->tmpdev); - (*pe->block_filter->filter_function)(c, pe->block_filter); - pe->status1 = 11; - } - } - break; - } - - return 0; -} - -mbfl_string * -mime_header_encoder_result(struct mime_header_encoder_data *pe, mbfl_string *result) -{ - if (pe->status1 >= 10) { - (*pe->conv2_filter->filter_flush)(pe->conv2_filter); - (*pe->encod_filter->filter_flush)(pe->encod_filter); - mbfl_memory_device_strncat(&pe->outdev, "\x3f\x3d", 2); /* ?= */ - } else if (pe->tmpdev.pos > 0) { - if (pe->outdev.pos > 0) { - if ((pe->outdev.pos - pe->linehead + pe->tmpdev.pos + pe->firstindent) > 74) { - mbfl_memory_device_strncat(&pe->outdev, pe->lwsp, pe->lwsplen); - } else { - mbfl_memory_device_output(0x20, &pe->outdev); - } - } - mbfl_memory_device_devcat(&pe->outdev, &pe->tmpdev); - } - mbfl_memory_device_reset(&pe->tmpdev); - pe->prevpos = 0; - pe->linehead = 0; - pe->status1 = 0; - pe->status2 = 0; - - return mbfl_memory_device_result(&pe->outdev, result); -} - -struct mime_header_encoder_data* -mime_header_encoder_new( - const mbfl_encoding *incode, - const mbfl_encoding *outcode, - const mbfl_encoding *transenc) -{ - size_t n; - const char *s; - struct mime_header_encoder_data *pe; - - /* get output encoding and check MIME charset name */ - if (outcode->mime_name == NULL || outcode->mime_name[0] == '\0') { - return NULL; - } - - pe = emalloc(sizeof(struct mime_header_encoder_data)); - mbfl_memory_device_init(&pe->outdev, 0, 0); - mbfl_memory_device_init(&pe->tmpdev, 0, 0); - pe->prevpos = 0; - pe->linehead = 0; - pe->firstindent = 0; - pe->status1 = 0; - pe->status2 = 0; - - /* make the encoding description string exp. "=?ISO-2022-JP?B?" */ - n = 0; - pe->encname[n++] = 0x3d; - pe->encname[n++] = 0x3f; - s = outcode->mime_name; - while (*s) { - pe->encname[n++] = *s++; - } - pe->encname[n++] = 0x3f; - if (transenc->no_encoding == mbfl_no_encoding_qprint) { - pe->encname[n++] = 0x51; - } else { - pe->encname[n++] = 0x42; - transenc = &mbfl_encoding_base64; - } - pe->encname[n++] = 0x3f; - pe->encname[n] = '\0'; - pe->encnamelen = n; - - n = 0; - pe->lwsp[n++] = 0x0d; - pe->lwsp[n++] = 0x0a; - pe->lwsp[n++] = 0x20; - pe->lwsp[n] = '\0'; - pe->lwsplen = n; - - /* transfer encode filter */ - pe->encod_filter = mbfl_convert_filter_new(outcode, transenc, mbfl_memory_device_output, 0, &(pe->outdev)); - pe->encod_filter_backup = mbfl_convert_filter_new(outcode, transenc, mbfl_memory_device_output, 0, &(pe->outdev)); - - /* Output code filter */ - pe->conv2_filter = mbfl_convert_filter_new(&mbfl_encoding_wchar, outcode, mbfl_filter_output_pipe, 0, pe->encod_filter); - pe->conv2_filter_backup = mbfl_convert_filter_new(&mbfl_encoding_wchar, outcode, mbfl_filter_output_pipe, 0, pe->encod_filter); - - /* encoded block filter */ - pe->block_filter = mbfl_convert_filter_new(&mbfl_encoding_wchar, &mbfl_encoding_wchar, mime_header_encoder_block_collector, 0, pe); - - /* Input code filter */ - pe->conv1_filter = mbfl_convert_filter_new(incode, &mbfl_encoding_wchar, mime_header_encoder_collector, 0, pe); - - if (pe->encod_filter == NULL || - pe->encod_filter_backup == NULL || - pe->conv2_filter == NULL || - pe->conv2_filter_backup == NULL || - pe->conv1_filter == NULL) { - mime_header_encoder_delete(pe); - return NULL; - } - - if (transenc->no_encoding == mbfl_no_encoding_qprint) { - pe->encod_filter->status |= MBFL_QPRINT_STS_MIME_HEADER; - pe->encod_filter_backup->status |= MBFL_QPRINT_STS_MIME_HEADER; - } else { - pe->encod_filter->status |= MBFL_BASE64_STS_MIME_HEADER; - pe->encod_filter_backup->status |= MBFL_BASE64_STS_MIME_HEADER; - } - - return pe; -} - -void -mime_header_encoder_delete(struct mime_header_encoder_data *pe) -{ - if (pe) { - mbfl_convert_filter_delete(pe->conv1_filter); - mbfl_convert_filter_delete(pe->block_filter); - mbfl_convert_filter_delete(pe->conv2_filter); - mbfl_convert_filter_delete(pe->conv2_filter_backup); - mbfl_convert_filter_delete(pe->encod_filter); - mbfl_convert_filter_delete(pe->encod_filter_backup); - mbfl_memory_device_clear(&pe->outdev); - mbfl_memory_device_clear(&pe->tmpdev); - efree((void*)pe); - } -} - -mbfl_string * -mbfl_mime_header_encode( - mbfl_string *string, - mbfl_string *result, - const mbfl_encoding *outcode, - const mbfl_encoding *encoding, - const char *linefeed, - int indent) -{ - size_t n; - unsigned char *p; - struct mime_header_encoder_data *pe; - - mbfl_string_init(result); - result->encoding = &mbfl_encoding_ascii; - - pe = mime_header_encoder_new(string->encoding, outcode, encoding); - if (pe == NULL) { - return NULL; - } - - if (linefeed != NULL) { - n = 0; - while (*linefeed && n < 8) { - pe->lwsp[n++] = *linefeed++; - } - pe->lwsp[n++] = 0x20; - pe->lwsp[n] = '\0'; - pe->lwsplen = n; - } - if (indent > 0 && indent < 74) { - pe->firstindent = indent; - } - - n = string->len; - p = string->val; - while (n > 0) { - (*pe->conv1_filter->filter_function)(*p++, pe->conv1_filter); - n--; - } - - result = mime_header_encoder_result(pe, result); - mime_header_encoder_delete(pe); - - return result; -} diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index e3678584fa340..5f23c2b98c0ba 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -168,29 +168,4 @@ static inline int mbfl_is_error(size_t len) { MBFLAPI extern mbfl_string * mbfl_strcut(mbfl_string *string, mbfl_string *result, size_t from, size_t length); -/* - * MIME header encode - */ -struct mime_header_encoder_data; /* forward declaration */ - -MBFLAPI extern struct mime_header_encoder_data * -mime_header_encoder_new( - const mbfl_encoding *incode, - const mbfl_encoding *outcode, - const mbfl_encoding *encoding); - -MBFLAPI extern void -mime_header_encoder_delete(struct mime_header_encoder_data *pe); - -MBFLAPI extern mbfl_string * -mime_header_encoder_result(struct mime_header_encoder_data *pe, mbfl_string *result); - -MBFLAPI extern mbfl_string * -mbfl_mime_header_encode( - mbfl_string *string, mbfl_string *result, - const mbfl_encoding *outcode, - const mbfl_encoding *encoding, - const char *linefeed, - int indent); - #endif /* MBFL_MBFILTER_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index 32504a3fc3b99..c5fa66f6e6ece 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -44,9 +44,6 @@ /* Marker for an erroneous input byte (or sequence of bytes) */ #define MBFL_BAD_INPUT (-1) -#define MBFL_QPRINT_STS_MIME_HEADER 0x1000000 -#define MBFL_BASE64_STS_MIME_HEADER 0x1000000 - #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE 0 #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR 1 #define MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG 2 diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index c20cb7bded40b..a8eb2976caca6 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -162,17 +162,17 @@ static inline void mb_convert_buf_init(mb_convert_buf *buf, size_t initsize, uin #define MB_CONVERT_BUF_ENSURE(buf, out, limit, needed) \ ZEND_ASSERT(out <= limit); \ if ((limit - out) < (needed)) { \ - size_t oldsize = limit - (unsigned char*)ZSTR_VAL(buf->str); \ + size_t oldsize = limit - (unsigned char*)ZSTR_VAL((buf)->str); \ size_t newsize = oldsize + MAX(oldsize >> 1, needed); \ - zend_string *newstr = erealloc(buf->str, _ZSTR_STRUCT_SIZE(newsize)); \ - out = (unsigned char*)ZSTR_VAL(newstr) + (out - (unsigned char*)ZSTR_VAL(buf->str)); \ + zend_string *newstr = erealloc((buf)->str, _ZSTR_STRUCT_SIZE(newsize)); \ + out = (unsigned char*)ZSTR_VAL(newstr) + (out - (unsigned char*)ZSTR_VAL((buf)->str)); \ limit = (unsigned char*)ZSTR_VAL(newstr) + newsize; \ - buf->str = newstr; \ + (buf)->str = newstr; \ } -#define MB_CONVERT_BUF_STORE(buf, _out, _limit) buf->out = _out; buf->limit = _limit +#define MB_CONVERT_BUF_STORE(buf, _out, _limit) (buf)->out = _out; (buf)->limit = _limit -#define MB_CONVERT_BUF_LOAD(buf, _out, _limit) _out = buf->out; _limit = buf->limit +#define MB_CONVERT_BUF_LOAD(buf, _out, _limit) _out = (buf)->out; _limit = (buf)->limit #define MB_CONVERT_ERROR(buf, out, limit, bad_cp, conv_fn) \ MB_CONVERT_BUF_STORE(buf, out, limit); \ @@ -209,6 +209,22 @@ static inline unsigned char* mb_convert_buf_add4(unsigned char *out, char c1, ch return out; } +static inline unsigned char* mb_convert_buf_appends(unsigned char *out, const char *s) +{ + while (*s) { + *out++ = *s++; + } + return out; +} + +static inline unsigned char* mb_convert_buf_appendn(unsigned char *out, const char *s, size_t n) +{ + while (n--) { + *out++ = *s++; + } + return out; +} + static inline zend_string* mb_convert_buf_result_raw(mb_convert_buf *buf) { ZEND_ASSERT(buf->out <= buf->limit); @@ -246,6 +262,24 @@ static inline zend_string* mb_convert_buf_result(mb_convert_buf *buf, const mbfl return ret; } +/* Used if we initialize an `mb_convert_buf` but then discover we don't actually + * want to return `zend_string` */ +static inline void mb_convert_buf_free(mb_convert_buf *buf) +{ + efree(buf->str); +} + +static inline size_t mb_convert_buf_len(mb_convert_buf *buf) +{ + return buf->out - (unsigned char*)ZSTR_VAL(buf->str); +} + +static inline void mb_convert_buf_reset(mb_convert_buf *buf, size_t len) +{ + buf->out = (unsigned char*)ZSTR_VAL(buf->str) + len; + ZEND_ASSERT(buf->out <= buf->limit); +} + MBFLAPI extern const mbfl_encoding *mbfl_name2encoding(const char *name); MBFLAPI extern const mbfl_encoding *mbfl_no2encoding(enum mbfl_no_encoding no_encoding); MBFLAPI extern const mbfl_encoding **mbfl_get_supported_encodings(void); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index a52cc2a092760..3277284be51cb 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -46,6 +46,7 @@ #include "libmbfl/filters/mbfilter_utf16.h" #include "libmbfl/filters/mbfilter_singlebyte.h" #include "libmbfl/filters/translit_kana_jisx0201_jisx0208.h" +#include "libmbfl/filters/unicode_prop.h" #include "php_variables.h" #include "php_globals.h" @@ -91,6 +92,8 @@ static bool mb_check_str_encoding(zend_string *str, const mbfl_encoding *encodin static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding **elist, unsigned int elist_size, bool strict); +static zend_string* mb_mime_header_encode(zend_string *input, const mbfl_encoding *incode, const mbfl_encoding *outcode, bool base64, char *linefeed, size_t linefeed_len, zend_long indent); + /* See mbfilter_cp5022x.c */ uint32_t mb_convert_kana_codepoint(uint32_t c, uint32_t next, bool *consumed, uint32_t *second, int mode); /* }}} */ @@ -3201,66 +3204,6 @@ PHP_FUNCTION(mb_encoding_aliases) } /* }}} */ -/* {{{ Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ -PHP_FUNCTION(mb_encode_mimeheader) -{ - const mbfl_encoding *charset, *transenc; - mbfl_string string, result, *ret; - zend_string *charset_name = NULL; - char *trans_enc_name = NULL, *string_val; - size_t trans_enc_name_len; - char *linefeed = "\r\n"; - size_t linefeed_len; - zend_long indent = 0; - - string.encoding = MBSTRG(current_internal_encoding); - - ZEND_PARSE_PARAMETERS_START(1, 5) - Z_PARAM_STRING(string_val, string.len) - Z_PARAM_OPTIONAL - Z_PARAM_STR(charset_name) - Z_PARAM_STRING(trans_enc_name, trans_enc_name_len) - Z_PARAM_STRING(linefeed, linefeed_len) - Z_PARAM_LONG(indent) - ZEND_PARSE_PARAMETERS_END(); - - string.val = (unsigned char*)string_val; - charset = &mbfl_encoding_pass; - transenc = &mbfl_encoding_base64; - - if (charset_name != NULL) { - charset = php_mb_get_encoding(charset_name, 2); - if (!charset) { - RETURN_THROWS(); - } else if (charset->mime_name == NULL || charset->mime_name[0] == '\0') { - zend_argument_value_error(2, "\"%s\" cannot be used for MIME header encoding", ZSTR_VAL(charset_name)); - RETURN_THROWS(); - } - } else { - const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); - if (lang != NULL) { - charset = mbfl_no2encoding(lang->mail_charset); - transenc = mbfl_no2encoding(lang->mail_header_encoding); - } - } - - if (trans_enc_name != NULL) { - if (*trans_enc_name == 'B' || *trans_enc_name == 'b') { - transenc = &mbfl_encoding_base64; - } else if (*trans_enc_name == 'Q' || *trans_enc_name == 'q') { - transenc = &mbfl_encoding_qprint; - } - } - - mbfl_string_init(&result); - ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); - ZEND_ASSERT(ret != NULL); - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ - efree(ret->val); -} -/* }}} */ - static zend_string* jp_kana_convert(zend_string *input, const mbfl_encoding *encoding, unsigned int mode) { /* Each wchar may potentially expand to 2 when we perform kana conversion... @@ -4156,8 +4099,7 @@ PHP_FUNCTION(mb_send_mail) size_t to_len; char *message; size_t message_len; - char *subject; - size_t subject_len; + zend_string *subject; zend_string *extra_cmd = NULL; HashTable *headers_ht = NULL; zend_string *str_headers = NULL; @@ -4169,9 +4111,7 @@ PHP_FUNCTION(mb_send_mail) int cnt_trans_enc:1; } suppressed_hdrs = { 0, 0 }; - char *subject_buf = NULL, *p; - mbfl_string orig_str, conv_str; - mbfl_string *pstr; /* pointer to mbfl string for return value */ + char *p; enum mbfl_no_encoding; const mbfl_encoding *tran_cs, /* transfer text charset */ *head_enc, /* header transfer encoding */ @@ -4181,10 +4121,6 @@ PHP_FUNCTION(mb_send_mail) HashTable ht_headers; zval *s; - /* initialize */ - mbfl_string_init(&orig_str); - mbfl_string_init(&conv_str); - /* character-set, transfer-encoding */ tran_cs = &mbfl_encoding_utf8; head_enc = &mbfl_encoding_base64; @@ -4198,7 +4134,7 @@ PHP_FUNCTION(mb_send_mail) ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_PATH(to, to_len) - Z_PARAM_PATH(subject, subject_len) + Z_PARAM_PATH_STR(subject) Z_PARAM_PATH(message, message_len) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_HT_OR_STR(headers_ht, str_headers) @@ -4310,22 +4246,17 @@ PHP_FUNCTION(mb_send_mail) } /* Subject: */ - orig_str.val = (unsigned char *)subject; - orig_str.len = subject_len; - orig_str.encoding = MBSTRG(current_internal_encoding); - if (orig_str.encoding->no_encoding == mbfl_no_encoding_invalid || orig_str.encoding->no_encoding == mbfl_no_encoding_pass) { - orig_str.encoding = mb_guess_encoding((unsigned char*)subject, subject_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + const mbfl_encoding *enc = MBSTRG(current_internal_encoding); + if (enc == &mbfl_encoding_pass) { + enc = mb_guess_encoding((unsigned char*)ZSTR_VAL(subject), ZSTR_LEN(subject), MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } const char *line_sep = PG(mail_mixed_lf_and_crlf) ? "\n" : CRLF; size_t line_sep_len = strlen(line_sep); - pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, line_sep, strlen("Subject: [PHP-jp nnnnnnnn]") + line_sep_len); - if (pstr != NULL) { - subject_buf = subject = (char *)pstr->val; - } + + subject = mb_mime_header_encode(subject, enc, tran_cs, head_enc == &mbfl_encoding_base64, (char*)line_sep, line_sep_len, strlen("Subject: [PHP-jp nnnnnnnn]") + line_sep_len); /* message body */ const mbfl_encoding *msg_enc = MBSTRG(current_internal_encoding); - if (msg_enc == &mbfl_encoding_pass) { msg_enc = mb_guess_encoding((unsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } @@ -4401,18 +4332,15 @@ PHP_FUNCTION(mb_send_mail) extra_cmd = php_escape_shell_cmd(ZSTR_VAL(extra_cmd)); } - RETVAL_BOOL(!err && php_mail(to_r, subject, message, ZSTR_VAL(str_headers), extra_cmd ? ZSTR_VAL(extra_cmd) : NULL)); + RETVAL_BOOL(!err && php_mail(to_r, ZSTR_VAL(subject), message, ZSTR_VAL(str_headers), extra_cmd ? ZSTR_VAL(extra_cmd) : NULL)); if (extra_cmd) { zend_string_release_ex(extra_cmd, 0); } - if (to_r != to) { efree(to_r); } - if (subject_buf) { - efree((void *)subject_buf); - } + zend_string_release(subject); zend_string_free(conv); zend_hash_destroy(&ht_headers); if (str_headers) { @@ -5634,6 +5562,418 @@ static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding) /* {{{ } /* }}} */ +static const unsigned char base64_table[] = { + /* 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', */ + 0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d, + /* 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', */ + 0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a, + /* 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', */ + 0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d, + /* 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', */ + 0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a, + /* '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '\0' */ + 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x2b,0x2f,0x00 +}; + +static size_t transfer_encoded_size(mb_convert_buf *tmpbuf, bool base64) +{ + if (base64) { + return ((mb_convert_buf_len(tmpbuf) + 2) / 3) * 4; + } else { + size_t enc_size = 0; + unsigned char *p = (unsigned char*)ZSTR_VAL(tmpbuf->str); + while (p < tmpbuf->out) { + unsigned char c = *p++; + enc_size += (c > 0x7F || c == '=' || mime_char_needs_qencode[c]) ? 3 : 1; + } + return enc_size; + } +} + +static void transfer_encode_mime_bytes(mb_convert_buf *tmpbuf, mb_convert_buf *outbuf, bool base64) +{ + unsigned char *out, *limit; + MB_CONVERT_BUF_LOAD(outbuf, out, limit); + unsigned char *p = (unsigned char*)ZSTR_VAL(tmpbuf->str), *e = tmpbuf->out; + + if (base64) { + MB_CONVERT_BUF_ENSURE(outbuf, out, limit, ((e - p) + 2) / 3 * 4); + while ((e - p) >= 3) { + unsigned char a = *p++; + unsigned char b = *p++; + unsigned char c = *p++; + uint32_t bits = (a << 16) | (b << 8) | c; + out = mb_convert_buf_add4(out, + base64_table[(bits >> 18) & 0x3F], + base64_table[(bits >> 12) & 0x3F], + base64_table[(bits >> 6) & 0x3F], + base64_table[bits & 0x3F]); + } + if (p != e) { + if ((e - p) == 1) { + uint32_t bits = *p++; + out = mb_convert_buf_add4(out, base64_table[(bits >> 2) & 0x3F], base64_table[(bits & 0x3) << 4], '=', '='); + } else { + unsigned char a = *p++; + unsigned char b = *p++; + uint32_t bits = (a << 8) | b; + out = mb_convert_buf_add4(out, base64_table[(bits >> 10) & 0x3F], base64_table[(bits >> 4) & 0x3F], base64_table[(bits & 0xF) << 2], '='); + } + } + } else { + MB_CONVERT_BUF_ENSURE(outbuf, out, limit, (e - p) * 3); + while (p < e) { + unsigned char c = *p++; + if (c > 0x7F || c == '=' || mime_char_needs_qencode[c]) { + out = mb_convert_buf_add3(out, '=', "0123456789ABCDEF"[(c >> 4) & 0xF], "0123456789ABCDEF"[c & 0xF]); + } else { + out = mb_convert_buf_add(out, c); + } + } + } + + mb_convert_buf_reset(tmpbuf, 0); + MB_CONVERT_BUF_STORE(outbuf, out, limit); +} + +static zend_string* mb_mime_header_encode(zend_string *input, const mbfl_encoding *incode, const mbfl_encoding *outcode, bool base64, char *linefeed, size_t linefeed_len, zend_long indent) +{ + unsigned char *in = (unsigned char*)ZSTR_VAL(input); + size_t in_len = ZSTR_LEN(input); + + if (!in_len) { + return zend_empty_string; + } + + if (indent < 0 || indent >= 74) { + indent = 0; + } + + if (linefeed_len > 8) { + linefeed_len = 8; + } + /* Maintain legacy behavior as regards embedded NUL (zero) bytes in linefeed string */ + for (size_t i = 0; i < linefeed_len; i++) { + if (linefeed[i] == '\0') { + linefeed_len = i; + break; + } + } + + unsigned int state = 0; + /* wchar_buf should be big enough that when it is full, we definitely have enough + * wchars to fill an entire line of output */ + uint32_t wchar_buf[80]; + uint32_t *p, *e; + /* What part of wchar_buf is filled with still-unprocessed data which should not + * be overwritten? */ + unsigned int offset = 0; + size_t line_start = 0; + + /* If the entire input string is ASCII with no spaces (except possibly leading + * spaces), just pass it through unchanged */ + bool checking_leading_spaces = true; + while (in_len) { + size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf, 80, &state); + p = wchar_buf; + e = wchar_buf + out_len; + + while (p < e) { + uint32_t w = *p++; + if (checking_leading_spaces) { + if (w == ' ') { + continue; + } else { + checking_leading_spaces = false; + } + } + if (w < 0x21 || w > 0x7E || w == '=' || w == '?' || w == '_') { + /* We cannot simply pass input string through unchanged; start again */ + in = (unsigned char*)ZSTR_VAL(input); + in_len = ZSTR_LEN(input); + goto no_passthrough; + } + } + } + + return zend_string_copy(input); /* This just increments refcount */ + +no_passthrough: ; + + mb_convert_buf buf; + mb_convert_buf_init(&buf, in_len, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); + + /* Encode some prefix of the input string as plain ASCII if possible + * If we find it necessary to switch to Base64/QPrint encoding, we will + * do so all the way to the end of the string */ + while (in_len) { + /* Decode part of the input string, refill wchar_buf */ + ZEND_ASSERT(offset < 80); + size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, 80 - offset, &state); + ZEND_ASSERT(out_len <= 80 - offset); + p = wchar_buf; + e = wchar_buf + offset + out_len; + /* ASCII output is broken into space-delimited 'words' + * If we find a non-ASCII character in the middle of a word, we will + * transfer-encode the entire word */ + uint32_t *word_start = p; + + /* Don't consider adding line feed for spaces at the beginning of a word */ + while (p < e && *p == ' ' && (p - word_start) <= 74) { + p++; + } + + while (p < e) { + uint32_t w = *p++; + + if (w < 0x20 || w > 0x7E || w == '?' || w == '=' || w == '_' || (w == ' ' && (p - word_start) > 74)) { + /* Non-ASCII character (or line too long); switch to Base64/QPrint encoding + * If we are already too far along on a line to include Base64/QPrint encoded data + * on the same line (without overrunning max line length), then add a line feed + * right now */ + if (mb_convert_buf_len(&buf) - line_start + indent + strlen(outcode->mime_name) > 55) { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + linefeed_len + 1); + buf.out = mb_convert_buf_appendn(buf.out, linefeed, linefeed_len); + buf.out = mb_convert_buf_add(buf.out, ' '); + indent = 0; + line_start = mb_convert_buf_len(&buf); + } else if (mb_convert_buf_len(&buf) > 0) { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, 1); + buf.out = mb_convert_buf_add(buf.out, ' '); + } + p = word_start; /* Back up to where MIME encoding of input chars should start */ + goto mime_encoding_needed; + } else if (w == ' ') { + /* When we see a space, check whether we should insert a line break */ + if (mb_convert_buf_len(&buf) - line_start + (p - word_start) + indent > 75) { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + linefeed_len + 1); + buf.out = mb_convert_buf_appendn(buf.out, linefeed, linefeed_len); + buf.out = mb_convert_buf_add(buf.out, ' '); + indent = 0; + line_start = mb_convert_buf_len(&buf); + } else if (mb_convert_buf_len(&buf) > 0) { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + 1); + buf.out = mb_convert_buf_add(buf.out, ' '); + } + /* Output one (space-delimited) word as plain ASCII */ + while (word_start < p-1) { + buf.out = mb_convert_buf_add(buf.out, *word_start++ & 0xFF); + } + word_start++; + while (p < e && *p == ' ') { + p++; + } + } + } + + if (in_len) { + /* Copy chars which are part of an incomplete 'word' to the beginning + * of wchar_buf and reprocess them on the next iteration */ + offset = e - word_start; + if (offset) { + memmove(wchar_buf, word_start, offset * sizeof(uint32_t)); + } + } else { + /* We have reached the end of the input string while still in 'ASCII mode'; + * process any trailing ASCII chars which were not followed by a space */ + if (word_start < e && mb_convert_buf_len(&buf) > 0) { + /* The whole input string was not just one big ASCII 'word' with no spaces + * consider adding a line feed if necessary to prevent output lines from + * being too long */ + if (mb_convert_buf_len(&buf) - line_start + (p - word_start) + indent > 74) { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + linefeed_len + 1); + buf.out = mb_convert_buf_appendn(buf.out, linefeed, linefeed_len); + buf.out = mb_convert_buf_add(buf.out, ' '); + } else { + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + 1); + buf.out = mb_convert_buf_add(buf.out, ' '); + } + } + while (word_start < e) { + buf.out = mb_convert_buf_add(buf.out, *word_start++ & 0xFF); + } + } + } + + /* Ensure output string is marked as valid UTF-8 (ASCII strings are always 'valid UTF-8') */ + return mb_convert_buf_result(&buf, &mbfl_encoding_utf8); + +mime_encoding_needed: ; + + /* We will generate the output line by line, first converting wchars to bytes + * in the requested output encoding, then transfer-encoding those bytes as + * Base64 or QPrint + * 'tmpbuf' will receive the bytes which need to be transfer-encoded before + * sending them to 'buf' */ + mb_convert_buf tmpbuf; + mb_convert_buf_init(&tmpbuf, in_len, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); + + /* Do we need to refill wchar_buf to make sure we don't run out of wchars + * in the middle of a line? */ + if (p == wchar_buf) { + goto start_new_line; + } + offset = e - p; + memmove(wchar_buf, p, offset * sizeof(uint32_t)); + + while(true) { +refill_wchar_buf: ; + ZEND_ASSERT(offset < 80); + size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, 80 - offset, &state); + ZEND_ASSERT(out_len <= 80 - offset); + p = wchar_buf; + e = wchar_buf + offset + out_len; + +start_new_line: ; + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, strlen(outcode->mime_name) + 5); + buf.out = mb_convert_buf_add2(buf.out, '=', '?'); + buf.out = mb_convert_buf_appends(buf.out, outcode->mime_name); + buf.out = mb_convert_buf_add3(buf.out, '?', base64 ? 'B' : 'Q', '?'); + + /* How many wchars should we try converting to Base64/QPrint-encoded bytes? + * We do something like a 'binary search' to find the greatest number which + * can be included on this line without exceeding max line length */ + unsigned int n = 12; + size_t space_available = 73 - indent - (mb_convert_buf_len(&buf) - line_start); + + while (true) { + ZEND_ASSERT(p < e); + + /* Remember where we were in process of generating output, so we can back + * up if necessary */ + size_t tmppos = mb_convert_buf_len(&tmpbuf); + unsigned int tmpstate = tmpbuf.state; + + /* Try encoding 'n' wchars in output text encoding and sending output + * bytes to 'tmpbuf'. Hopefully this is not too many to fit on the + * current line. */ + n = MIN(n, e - p); + outcode->from_wchar(p, n, &tmpbuf, false); + + /* For some output text encodings, there may be a few ending bytes + * which need to be emitted to output before we break a line. + * Again, remember where we were so we can back up */ + size_t tmppos2 = mb_convert_buf_len(&tmpbuf); + unsigned int tmpstate2 = tmpbuf.state; + outcode->from_wchar(NULL, 0, &tmpbuf, true); + + if (transfer_encoded_size(&tmpbuf, base64) <= space_available || (n == 1 && tmppos == 0)) { + /* If we convert 'n' more wchars on the current line, it will not + * overflow the maximum line length */ + p += n; + + if (p == e) { + /* We are done; we shouldn't reach here if there is more remaining + * of the input string which needs to be processed */ + ZEND_ASSERT(!in_len); + transfer_encode_mime_bytes(&tmpbuf, &buf, base64); + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, 2); + buf.out = mb_convert_buf_add2(buf.out, '?', '='); + mb_convert_buf_free(&tmpbuf); + return mb_convert_buf_result(&buf, &mbfl_encoding_utf8); + } else { + /* It's possible that more chars might fit on the current line, + * so back up to where we were before emitting any ending bytes */ + mb_convert_buf_reset(&tmpbuf, tmppos2); + tmpbuf.state = tmpstate2; + } + } else { + /* Converting 'n' more wchars on this line would be too much. + * Back up to where we were before we tried that. */ + mb_convert_buf_reset(&tmpbuf, tmppos); + tmpbuf.state = tmpstate; + + if (n == 1) { + /* We have found the exact number of chars which will fit on the + * current line. Finish up and move to a new line. */ + outcode->from_wchar(NULL, 0, &tmpbuf, true); + transfer_encode_mime_bytes(&tmpbuf, &buf, base64); + tmpbuf.state = 0; + + MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, 3 + linefeed_len); + buf.out = mb_convert_buf_add2(buf.out, '?', '='); + + indent = 0; /* Indent argument must only affect the first line */ + + if (in_len) { + /* We still have more of input string remaining to decode */ + buf.out = mb_convert_buf_appendn(buf.out, linefeed, linefeed_len); + buf.out = mb_convert_buf_add(buf.out, ' '); + line_start = mb_convert_buf_len(&buf); + /* Copy remaining wchars to beginning of buffer so they will be + * processed on the next iteration of outer 'do' loop */ + offset = e - p; + memmove(wchar_buf, p, offset * sizeof(uint32_t)); + goto refill_wchar_buf; + } else if (p < e) { + /* Input string is finished, but we still have trailing wchars + * remaining to be processed in wchar_buf */ + buf.out = mb_convert_buf_appendn(buf.out, linefeed, linefeed_len); + buf.out = mb_convert_buf_add(buf.out, ' '); + line_start = mb_convert_buf_len(&buf); + goto start_new_line; + } else { + /* We are done! */ + mb_convert_buf_free(&tmpbuf); + return mb_convert_buf_result(&buf, &mbfl_encoding_utf8); + } + } else { + /* Try a smaller number of wchars */ + n = MAX(n >> 1, 1); + } + } + } + } +} + +PHP_FUNCTION(mb_encode_mimeheader) +{ + const mbfl_encoding *charset = &mbfl_encoding_pass; + zend_string *str, *charset_name = NULL, *transenc_name = NULL; + char *linefeed = "\r\n"; + size_t linefeed_len = 2; + zend_long indent = 0; + bool base64 = true; + + ZEND_PARSE_PARAMETERS_START(1, 5) + Z_PARAM_STR(str) + Z_PARAM_OPTIONAL + Z_PARAM_STR(charset_name) + Z_PARAM_STR(transenc_name) + Z_PARAM_STRING(linefeed, linefeed_len) + Z_PARAM_LONG(indent) + ZEND_PARSE_PARAMETERS_END(); + + if (charset_name != NULL) { + charset = php_mb_get_encoding(charset_name, 2); + if (!charset) { + RETURN_THROWS(); + } else if (charset->mime_name == NULL || charset->mime_name[0] == '\0') { + zend_argument_value_error(2, "\"%s\" cannot be used for MIME header encoding", ZSTR_VAL(charset_name)); + RETURN_THROWS(); + } + } else { + const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); + if (lang != NULL) { + charset = mbfl_no2encoding(lang->mail_charset); + const mbfl_encoding *transenc = mbfl_no2encoding(lang->mail_header_encoding); + char t = transenc->name[0]; + if (t == 'Q' || t == 'q') { + base64 = false; + } + } + } + + if (transenc_name != NULL && ZSTR_LEN(transenc_name) > 0) { + char t = ZSTR_VAL(transenc_name)[0]; + if (t == 'Q' || t == 'q') { + base64 = false; + } + } + + RETURN_STR(mb_mime_header_encode(str, MBSTRG(current_internal_encoding), charset, base64, linefeed, linefeed_len, indent)); +} + static int8_t decode_base64(unsigned char c) { if (c >= 'A' && c <= 'Z') { diff --git a/ext/mbstring/tests/mb_encode_mimeheader_basic4.phpt b/ext/mbstring/tests/mb_encode_mimeheader_basic4.phpt new file mode 100644 index 0000000000000..7bf05b43ae36b --- /dev/null +++ b/ext/mbstring/tests/mb_encode_mimeheader_basic4.phpt @@ -0,0 +1,160 @@ +--TEST-- +Test mb_encode_mimeheader() function : test cases found by fuzzer +--EXTENSIONS-- +mbstring +--FILE-- +\x00\x00\x00\x00", "HZ", "Q", "", 71)); + +// ASCII strings with no spaces should pass through unchanged +var_dump(mb_encode_mimeheader("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyBIG5", "BIG-5", "B")); + +// Regression test: After decoding part of a line as ASCII, before we switch into Base64/QPrint encoding mode, +// refill our buffer of wchars so we don't hit the end of the buffer in the middle of a line +var_dump(mb_encode_mimeheader("\x20\x20\x20\x202\x20\x20\x20sssssssssssssssssssssssssss\x20\x20\x20\x20W\x20\x20\x20\x20\x20\x20W\x20\x20\x20\x20\xb9S\x01\x00\xf0`\x00\x00\x20\x20\x20\x20mSCII\xee\x20\x20\x20\x20mSCII\xeeI\xee", "ArmSCII-8", "B", "")); + +// Regression test: Input string with a huge number of spaces +var_dump(mb_encode_mimeheader("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x00", "CP936", "Q", "")); + +// Regression test: Long string, all ASCII, but with spaces at the beginning +var_dump(mb_encode_mimeheader("\x20\x201111111111111111111111111111111111111111111111111111111111111111111111111", "ASCII", "Q", "")); + +// Only a single character in input, but when we convert it to outcode and then +// transfer-encode it, it takes too many bytes to fit on a single line +// Legacy implementation would always include at least one wchar in each encoded word; +// imitate the same behavior +var_dump(mb_encode_mimeheader("\xe7\xad\xb5", "HZ", "Q", "", 44)); + +// Regression test: Exploring corner cases of when legacy implementation would output plain ASCII +// with no transfer encoding, and when it would transfer-encode +var_dump(mb_encode_mimeheader("2\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20!3", "GB18030", "Q", "")); +var_dump(mb_encode_mimeheader("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20!3\x20", "GB18030", "Q", "")); + +// Change in behavior: The old implementation would output the following string as plain ASCII, +// but the new one transfer-encodes it +// In the general case, matching the old implementation's decision to transfer-encode or not +// perfectly would require allocating potentially unbounded scratch memory (up to the size of +// the input string), but we aim to only use a constant amount of temporarily allocated memory +var_dump(mb_encode_mimeheader("2\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20!3", "GB18030", "Q", "")); + +echo "Done"; +?> +--EXPECT-- +string(0) "" +string(21) "=?UTF-8?Q?abc=00abc?=" +string(16) "=?UTF-8?B?Pw==?=" +string(19) "=?US-ASCII?B?Pw==?=" +string(18) "=?US-ASCII?Q?=3F?=" +string(19) "=?US-ASCII?B?PQ==?=" +string(18) "=?US-ASCII?Q?=3D?=" +string(19) "=?US-ASCII?B?Xw==?=" +string(18) "=?US-ASCII?Q?=5F?=" +string(19) "=?US-ASCII?B?fw==?=" +string(1) " " +string(1) " " +string(3) " " +string(3) " " +string(8) "ab ab " +string(8) "ab ab " +string(1) "`" +string(1) "S" +string(2) "S4" +string(2) "S4" +string(61) "=?UCS-4?Q?=00=00=00=32=00=00=00=34?= =?UCS-4?Q?=00=00=00=0A?=" +string(21) "o =?US-ASCII?B?AA==?=" +string(68) "=?UCS-4?B?AAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==?=" +string(271) "=?UCS-2?B?AAEAAAA/AD8APwA/AD8APwA9AD8APwA/AD0APwABAAAAYQAAAAAAPwA/AD8=?= =?UCS-2?B?AD0APwA/AD8APwA/AD8APwA/AD8APwA/ADQAPwA0AD8APwA/AD8APwA9AD8=?= =?UCS-2?B?AAEAAAAAAAAAAQAAAAAABgA/AD8APwA/AD8APwA/AD8APwA9AD8APwA/AD8=?= =?UCS-2?B?AD8APwA/AD8APwA/AD8ANAA/AD8APwA/AD8APwA0?=" +string(27) "=aaaaaa= =?US-ASCII?Q?=3F?=" +string(9) "=aaaaaa=?" +string(55) ", =?ISO-2022-JP?Q?o=00=01=00=00?= =?ISO-2022-JP?Q?=28?=" +string(19) " =?US-ASCII?Q?=3F?=" +string(76) " =?HZ-GB-2312?Q?=3F=7E=7EH=7E=7E=3F=3F=00=00=3F=3F=3F=3F=3F=3E=00=00=00=00?=" +string(75) "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyBIG5" +string(108) " 2 sssssssssssssssssssssssssss W W =?ArmSCII-8?B?ICAgP1MBAD9gAAAgICAgbVNDSUk/ICAgIG1TQ0lJP0k/?=" +string(294) "=?CP936?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?CP936?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?CP936?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?CP936?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=00?=" +string(75) " 1111111111111111111111111111111111111111111111111111111111111111111111111" +string(33) "=?HZ-GB-2312?Q?=7E=7Bs=5B=7E=7D?=" +string(77) "2 !3" +string(282) "=?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20!=33=20?=" +string(296) "2 =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?GB18030?Q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20!=33?=" +Done From 394470c052d5769820cf6d9f3b742fdc1ef98681 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 13 Mar 2023 20:16:33 +0000 Subject: [PATCH 636/895] php_pgsql_meta_data raises a ValueError when table name is invalid. --- ext/pgsql/pgsql.c | 3 +-- ext/pgsql/tests/pg_insert_002.phpt | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a2d6da12209b0..944f0d14fae3d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4137,9 +4137,8 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string src = estrdup(ZSTR_VAL(table_name)); tmp_name = php_strtok_r(src, ".", &tmp_name2); if (!tmp_name) { - // TODO ValueError (empty table name)? efree(src); - php_error_docref(NULL, E_WARNING, "The table name must be specified"); + zend_argument_value_error(2, "The table name must be specified (%s)", ZSTR_VAL(table_name)); return FAILURE; } if (!tmp_name2 || !*tmp_name2) { diff --git a/ext/pgsql/tests/pg_insert_002.phpt b/ext/pgsql/tests/pg_insert_002.phpt index e3e593999f680..11e9b32d2ed9a 100644 --- a/ext/pgsql/tests/pg_insert_002.phpt +++ b/ext/pgsql/tests/pg_insert_002.phpt @@ -23,9 +23,6 @@ Done --EXPECTF-- pg_insert(): Argument #2 ($table_name) cannot be empty -Warning: pg_insert(): The table name must be specified in %s on line %d -bool(false) - -Warning: pg_insert(): The table name must be specified in %s on line %d -bool(false) +pg_insert(): The table name must be specified (.) +pg_insert(): The table name must be specified (..) Done From 90a39fd52c9d8241ed3d7e43b255daa2b6413e7e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 14 Mar 2023 20:34:46 +0000 Subject: [PATCH 637/895] ext/mysqi: mysqli_poll raises a ValueError on absent 1st and 2ng arguments. --- UPGRADING | 2 ++ ext/mysqli/mysqli_nonapi.c | 5 ++--- ext/mysqli/tests/bug62885.phpt | 16 ++++++++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/UPGRADING b/UPGRADING index de81b63dec5c6..c20a815a0bb2a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -95,6 +95,8 @@ PHP 8.3 UPGRADE NOTES - mysqli: . mysqli_fetch_object now raises a ValueError instead of an Exception when the constructor_args argument is non empty with the class not having constructor. + . mysqli_poll now raises a ValueError when the read nor error arguments are passed. + - PGSQL: . pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args argument is non empty with the class not having constructor. diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 7de8c89b620a6..406d928699784 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -762,10 +762,9 @@ PHP_FUNCTION(mysqli_poll) RETURN_THROWS(); } - // TODO Error promotion if (!r_array && !e_array) { - php_error_docref(NULL, E_WARNING, "No stream arrays were passed"); - RETURN_FALSE; + zend_value_error("No stream arrays were passed"); + RETURN_THROWS(); } if (r_array != NULL) { diff --git a/ext/mysqli/tests/bug62885.phpt b/ext/mysqli/tests/bug62885.phpt index 9674f8a5af00c..79ed0c6edde77 100644 --- a/ext/mysqli/tests/bug62885.phpt +++ b/ext/mysqli/tests/bug62885.phpt @@ -10,15 +10,23 @@ require_once("connect.inc"); getMessage() . \PHP_EOL; +} $test2 = array(); $test2 = array(); -$test1 = mysqli_poll($test2, $test3, $tablica, 0); +try { + $test1 = mysqli_poll($test2, $test3, $tablica, 0); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} echo "okey"; ?> --EXPECTF-- -Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d +No stream arrays were passed -Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d +Warning: mysqli_poll(): No stream arrays were passed in %s on line %d okey From c4c8d6ced7c39e56eb1ec07231d0b3d788071523 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Wed, 1 Mar 2023 10:14:01 +0100 Subject: [PATCH 638/895] Fix missing and inconsistent error check on SQLAllocHandle * Missing check: SQLAllocHandle() for the environment wasn't checked in pdo_odbc_handle_factory(). Add a check similar to the other ones for SQLAllocHandle(). * Inconsistent check: one of the SQLAllocHandle() calls wasn't checked for SQL_SUCCESS_WITH_INFO. However, looking at the other uses and the documentation we should probably check this as well. Furthermore, since there was a mix of "SQLAllocHandle: reason" and "SQLAllocHandle (reason)" in the error reporting, I made them consistently use the first option as that seems to be the most used for error reporting in this file. Closes GH-10740. --- NEWS | 3 +++ ext/pdo_odbc/odbc_driver.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b684773f976cb..d6a6b39107b25 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,9 @@ PHP NEWS - OpenSSL: . Add missing error checks on file writing functions. (nielsdos) +- PDO ODBC: + . Fixed missing and inconsistent error checks on SQLAllocHandle. (nielsdos) + - Phar: . Fixed bug GH-10766 (PharData archive created with Phar::Zip format does not keep files metadata (datetime)). (nielsdos) diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 42a95c5707cf8..b258d5658cae8 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -220,7 +220,7 @@ static zend_long odbc_handle_doer(pdo_dbh_t *dbh, const zend_string *sql) PDO_ODBC_HSTMT stmt; rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt); - if (rc != SQL_SUCCESS) { + if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { pdo_odbc_drv_error("SQLAllocHandle: STMT"); return -1; } @@ -439,7 +439,12 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ dbh->driver_data = H; - SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env); + rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env); + if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { + pdo_odbc_drv_error("SQLAllocHandle: ENV"); + goto fail; + } + rc = SQLSetEnvAttr(H->env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { @@ -459,7 +464,7 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ rc = SQLAllocHandle(SQL_HANDLE_DBC, H->env, &H->dbc); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - pdo_odbc_drv_error("SQLAllocHandle (DBC)"); + pdo_odbc_drv_error("SQLAllocHandle: DBC"); goto fail; } From 5239f9fc86448f302a99983286bd5ec74416df01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 15 Mar 2023 17:20:26 +0100 Subject: [PATCH 639/895] Remove CTE flag from array_diff_ukey(), which was added by mistake This was accidentally added in GH-7780, but since it takes a callable argument, this flag is useless on this function. Closes GH-10859. --- NEWS | 2 ++ ext/standard/basic_functions.stub.php | 1 - ext/standard/basic_functions_arginfo.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index cbdfd03f5d13b..92e7d68d6de97 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ PHP NEWS . Fixed bug GH-8646 (Memory leak PHP FPM 8.1). (nielsdos) . Re-add some CTE functions that were removed from being CTE by a mistake. (mvorisek) + . Remove CTE flag from array_diff_ukey(), which was added by mistake. + (mvorisek) . Fixed bug GH-10801 (Named arguments in CTE functions cause a segfault). (nielsdos) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index be833d94bb5c5..e64d772a44427 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1125,7 +1125,6 @@ function array_diff_key(array $array, array ...$arrays): array {} /** * @param array|callable $rest * @refcount 1 - * @compile-time-eval */ function array_diff_ukey(array $array, ...$rest): array {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 7473ac3a1ad82..d7eb83b55690a 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 24cd8eddbff4da67929041932494952b49746f91 */ + * Stub hash: 87494cb9126aefff143d4f55db9e282d8a30f4a2 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -2906,7 +2906,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(array_intersect_uassoc, arginfo_array_intersect_uassoc) ZEND_FE(array_uintersect_uassoc, arginfo_array_uintersect_uassoc) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_diff_key, arginfo_array_diff_key) - ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_diff_ukey, arginfo_array_diff_ukey) + ZEND_FE(array_diff_ukey, arginfo_array_diff_ukey) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_diff, arginfo_array_diff) ZEND_FE(array_udiff, arginfo_array_udiff) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_diff_assoc, arginfo_array_diff_assoc) From 471105abd710b092d2104fe66f14dd9e07841f25 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 15 Mar 2023 10:46:15 +0100 Subject: [PATCH 640/895] Another attempt to fix MSAN nightly on master --- run-tests.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/run-tests.php b/run-tests.php index 175e0a5c48eea..8bc59e2d847ec 100755 --- a/run-tests.php +++ b/run-tests.php @@ -580,22 +580,15 @@ function main(): void $environment['USE_TRACKED_ALLOC'] = 1; $environment['SKIP_ASAN'] = 1; $environment['SKIP_PERF_SENSITIVE'] = 1; - $lsan_options = []; if ($switch === '--msan') { $environment['SKIP_MSAN'] = 1; - // use_tls=0 is a workaround for MSAN crashing with "Tracer caught signal 11" (SIGSEGV), - // which seems to be an issue with TLS support in newer glibc versions under virtualized - // environments. Follow https://github.com/google/sanitizers/issues/1342 and - // https://github.com/google/sanitizers/issues/1409 to track this issue. - $lsan_options[] = 'use_tls=0'; + $environment['MSAN_OPTIONS'] = 'intercept_tls_get_addr=0'; } + $lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt'; if (file_exists($lsanSuppressions)) { - $lsan_options[] = 'suppressions=' . $lsanSuppressions; - $lsan_options[] = 'print_suppressions=0'; - } - if (!empty($lsan_options)) { - $environment['LSAN_OPTIONS'] = join(':', $lsan_options); + $environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions + . ':print_suppressions=0'; } break; case '--repeat': From feb82d91b9915928477c339cf366e0084d8e2f12 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 15 Mar 2023 22:57:25 +0000 Subject: [PATCH 641/895] pgsql_insert fix unit tests (#10860) --- UPGRADING | 1 + ext/pgsql/pgsql.c | 2 +- ext/pgsql/tests/pg_insert_002.phpt | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UPGRADING b/UPGRADING index c20a815a0bb2a..210215c3fab7e 100644 --- a/UPGRADING +++ b/UPGRADING @@ -100,6 +100,7 @@ PHP 8.3 UPGRADE NOTES - PGSQL: . pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args argument is non empty with the class not having constructor. + . pg_insert now raises a ValueError instead of a WARNING when the table specified is invalid. - Standard: . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 944f0d14fae3d..5112a37d58be8 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4138,7 +4138,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string tmp_name = php_strtok_r(src, ".", &tmp_name2); if (!tmp_name) { efree(src); - zend_argument_value_error(2, "The table name must be specified (%s)", ZSTR_VAL(table_name)); + zend_argument_value_error(2, "must be specified (%s)", ZSTR_VAL(table_name)); return FAILURE; } if (!tmp_name2 || !*tmp_name2) { diff --git a/ext/pgsql/tests/pg_insert_002.phpt b/ext/pgsql/tests/pg_insert_002.phpt index 11e9b32d2ed9a..19537e8a5d5d1 100644 --- a/ext/pgsql/tests/pg_insert_002.phpt +++ b/ext/pgsql/tests/pg_insert_002.phpt @@ -22,7 +22,6 @@ foreach (array('', '.', '..') as $table) { Done --EXPECTF-- pg_insert(): Argument #2 ($table_name) cannot be empty - -pg_insert(): The table name must be specified (.) -pg_insert(): The table name must be specified (..) +pg_insert(): Argument #2 ($table_name) must be specified (.) +pg_insert(): Argument #2 ($table_name) must be specified (..) Done From f42e56286a1fee433f363ffc14fc7341a8466225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 9 Mar 2023 21:08:27 +0100 Subject: [PATCH 642/895] Windows CI log verbosity, CI bat file guard Closes GH-10817 --- .github/scripts/windows/build.bat | 5 +++++ .github/scripts/windows/build_task.bat | 5 +++++ .github/scripts/windows/test.bat | 5 +++++ .github/scripts/windows/test_task.bat | 7 ++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/scripts/windows/build.bat b/.github/scripts/windows/build.bat index 5f29baefabad0..9aec8f5c2b791 100644 --- a/.github/scripts/windows/build.bat +++ b/.github/scripts/windows/build.bat @@ -1,5 +1,10 @@ @echo off +if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" ( + echo for CI only + exit /b 3 +) + set SDK_REMOTE=https://github.com/php/php-sdk-binary-tools.git set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH% set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index dde252d2ef7c2..166712675ae5f 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -1,5 +1,10 @@ @echo off +if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" ( + echo for CI only + exit /b 3 +) + if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL if %errorlevel% neq 0 exit /b 3 if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL diff --git a/.github/scripts/windows/test.bat b/.github/scripts/windows/test.bat index 24ee260464fde..7e2b869db8c1f 100644 --- a/.github/scripts/windows/test.bat +++ b/.github/scripts/windows/test.bat @@ -1,5 +1,10 @@ @echo off +if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" ( + echo for CI only + exit /b 3 +) + set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat if not exist "%SDK_RUNNER%" ( echo "%SDK_RUNNER%" doesn't exist diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index bca81878527e6..e9ed59c8175f2 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -1,5 +1,10 @@ @echo off +if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" ( + echo for CI only + exit /b 3 +) + set NO_INTERACTION=1 set REPORT_EXIT_STATUS=1 set SKIP_IO_CAPTURE_TESTS=1 @@ -119,7 +124,7 @@ mkdir c:\tests_tmp set TEST_PHP_JUNIT=c:\junit.out.xml -nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp --bless %PARALLEL%" +nmake test TESTS="%OPCACHE_OPTS% -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp --bless %PARALLEL%" set EXIT_CODE=%errorlevel% From d835de19931d71a3728ad2950335786871d0925f Mon Sep 17 00:00:00 2001 From: Tony Su Date: Fri, 17 Mar 2023 17:54:13 +0800 Subject: [PATCH 643/895] [zend_hash]: Use AVX2 instructions for better code efficiency (#10858) We prefer to use AVX2 instructions for code efficiency improvement 1) Reduce instruction path length Generic x86 Instr: 16, SSE2: 6, AVX2: 4 2) Better ICache locality and density To enable AVX2 instructions, compile with '-mavx2' option via CFLAGS environment variable or command line argument. Note: '-mavx' option still leads to using SSE2 instructions. _mm256_cmpeq_epi64() requires AVX2 (-mavx2). Testing: Build with and without '-mavx2', 'make TEST_PHP_ARGS=-j8 test' presented the same test report. Signed-off-by: Tony Su --- Zend/zend_hash.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 93d10119519b0..9c09dfdc274a6 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -26,7 +26,10 @@ # include #endif -#ifdef __SSE2__ +/* Prefer to use AVX2 instructions for better latency and throughput */ +#if defined(__AVX2__) +# include +#elif defined( __SSE2__) # include # include #endif @@ -176,7 +179,14 @@ static zend_always_inline void zend_hash_real_init_mixed_ex(HashTable *ht) HT_SET_DATA_ADDR(ht, data); /* Don't overwrite iterator count. */ ht->u.v.flags = HASH_FLAG_STATIC_KEYS; -#ifdef __SSE2__ +#if defined(__AVX2__) + do { + __m256i ymm0 = _mm256_setzero_si256(); + ymm0 = _mm256_cmpeq_epi64(ymm0, ymm0); + _mm256_storeu_si256((__m256i*)&HT_HASH_EX(data, 0), ymm0); + _mm256_storeu_si256((__m256i*)&HT_HASH_EX(data, 8), ymm0); + } while(0); +#elif defined (__SSE2__) do { __m128i xmm0 = _mm_setzero_si128(); xmm0 = _mm_cmpeq_epi8(xmm0, xmm0); From 3125155b5dc87a509d0ba281fafcdb58da2f7708 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 18:54:39 +0000 Subject: [PATCH 644/895] Add extra option to FPM tester for handling script filename --- sapi/fpm/tests/tester.inc | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index e051a9d73db3f..ee4dff4b95815 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -583,18 +583,28 @@ class Tester array $headers = [], string $uri = null, string $scriptFilename = null, + string $scriptName = null, ?string $stdin = null ): array { - if (is_null($uri)) { - $uri = $this->makeSourceFile(); + if (is_null($scriptFilename) && is_null($uri)) { + $scriptFilename = $this->makeSourceFile(); + } else { + if (is_null($scriptFilename)) { + $scriptFilename = $uri; + } elseif (is_null($scriptName)) { + $scriptName = $uri; + } + } + if (is_null($scriptName)) { + $scriptName = '/' . basename($scriptFilename); } $params = array_merge( [ 'GATEWAY_INTERFACE' => 'FastCGI/1.0', 'REQUEST_METHOD' => is_null($stdin) ? 'GET' : 'POST', - 'SCRIPT_FILENAME' => $scriptFilename ?: $uri, - 'SCRIPT_NAME' => $uri, + 'SCRIPT_FILENAME' => $scriptFilename === '' ? null : $scriptFilename, + 'SCRIPT_NAME' => $scriptName, 'QUERY_STRING' => $query, 'REQUEST_URI' => $uri . ($query ? '?' . $query : ""), 'DOCUMENT_URI' => $uri, @@ -691,6 +701,7 @@ class Tester * @param string|null $errorMessage * @param bool $connKeepAlive * @param string|null $scriptFilename = null + * @param string|null $scriptName = null * @param string|array|null $stdin = null * @param bool $expectError * @param int $readLimit @@ -707,6 +718,7 @@ class Tester string $errorMessage = null, bool $connKeepAlive = false, string $scriptFilename = null, + string $scriptName = null, string|array $stdin = null, bool $expectError = false, int $readLimit = -1, @@ -719,7 +731,7 @@ class Tester $stdin = $this->parseStdin($stdin, $headers); } - $params = $this->getRequestParams($query, $headers, $uri, $scriptFilename, $stdin); + $params = $this->getRequestParams($query, $headers, $uri, $scriptFilename, $scriptName, $stdin); $this->trace('Request params', $params); try { @@ -1290,6 +1302,18 @@ class Tester return $this->makeFile('src.php', $this->code, overwrite: false); } + /** + * Create a source file and script name. + * + * @return string[] + */ + public function createSourceFileAndScriptName(): array + { + $sourceFile = $this->makeFile('src.php', $this->code, overwrite: false); + + return [$sourceFile, '/' . basename($sourceFile)]; + } + /** * @param string|null $msg */ From 92d2cd5cb8b73e01777baab551ff7a6292220c48 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 19:20:13 +0000 Subject: [PATCH 645/895] Test FPM FCGI envs without path info fix for custom source --- ...i-env-nopif-custom-with-pi-with-pt-pd.phpt | 58 +++++++++++++++++++ ...fcgi-env-nopif-custom-with-pi-with-pt.phpt | 58 +++++++++++++++++++ ...i-env-nopif-custom-with-pi-without-pt.phpt | 56 ++++++++++++++++++ ...i-env-nopif-custom-without-pi-with-pt.phpt | 56 ++++++++++++++++++ ...nv-nopif-custom-without-pi-without-pt.phpt | 52 +++++++++++++++++ ...i-env-nopif-custom-without-sf-with-pt.phpt | 58 +++++++++++++++++++ 6 files changed, 338 insertions(+) create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt-pd.phpt create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt.phpt create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-without-pt.phpt create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-with-pt.phpt create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-without-pt.phpt create mode 100644 sapi/fpm/tests/fcgi-env-nopif-custom-without-sf-with-pt.phpt diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt-pd.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt-pd.phpt new file mode 100644 index 0000000000000..40b1edc8a930f --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt-pd.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup with PATH_INFO, PATH_TRANSLATED and path discard +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__, + ], + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt.phpt new file mode 100644 index 0000000000000..d68173920eb4c --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-with-pt.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup with PATH_INFO and PATH_TRANSLATED +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => $sourceFilePath, + ], + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath . '/pinfo', // used just for variable display + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath . '/pinfo', '/pinfo', '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-without-pt.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-without-pt.phpt new file mode 100644 index 0000000000000..84255f9737a21 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-with-pi-without-pt.phpt @@ -0,0 +1,56 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup with PATH_INFO and without PATH_TRANSLATED +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + ], + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-with-pt.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-with-pt.phpt new file mode 100644 index 0000000000000..f580b25804e4e --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-with-pt.phpt @@ -0,0 +1,56 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup without PATH_INFO and with PATH_TRANSLATED +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_TRANSLATED' => $sourceFilePath, + ], + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath . '/pinfo', // should be ignored as PATH_TRANSLATED is used + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath . '/pinfo', $scriptName]); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-without-pt.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-without-pt.phpt new file mode 100644 index 0000000000000..b0ed4ad750290 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-without-pi-without-pt.phpt @@ -0,0 +1,52 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup without PATH_INFO and PATH_TRANSLATED +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, $scriptName]); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-nopif-custom-without-sf-with-pt.phpt b/sapi/fpm/tests/fcgi-env-nopif-custom-without-sf-with-pt.phpt new file mode 100644 index 0000000000000..3e602e2f18825 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-custom-without-sf-with-pt.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var no path info fix for custom setup without SCRIPT_FILENAME and with PATH_TRANSLATED +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => $sourceFilePath, + ], + uri: $scriptName . '/pinfo', + scriptFilename: '', + scriptName: $scriptName, + ) + ->expectBody([$scriptName, 'unset', '/pinfo', '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From b53b0ac2ead24e952d029f9a6784ee7ef0de0f0e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 19:23:25 +0000 Subject: [PATCH 646/895] Test FPM FCGI envs with path info fix for Apache proxy balancer --- .../fcgi-env-pif-apache-balancer-legacy.phpt | 57 ++++++++++++++++++ .../fcgi-env-pif-apache-balancer-real.phpt | 58 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-balancer-legacy.phpt create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-balancer-real.phpt diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-balancer-legacy.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-balancer-legacy.phpt new file mode 100644 index 0000000000000..a7c4c2e6208b5 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-balancer-legacy.phpt @@ -0,0 +1,57 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache balancer legacy setup +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__ . '/pinfo', + ], + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:balancer://" . $tester->getAddr() . $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', $scriptName . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-balancer-real.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-balancer-real.phpt new file mode 100644 index 0000000000000..df8df4a8fb042 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-balancer-real.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache balancer real configuration +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$pathTranslatedPart = __DIR__ . $sourceFilePath . '/pinfo'; +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => $sourceFilePath . '/pinfo', + 'PATH_TRANSLATED' => 'proxy:balancer://myappcluster' . $pathTranslatedPart . $pathTranslatedPart, + ], + uri: $scriptName . '/pinfo', + scriptFilename: $sourceFilePath . '/pinfo', + scriptName: '', + ) + ->expectBody([$sourceFilePath, $sourceFilePath, '/pinfo', $sourceFilePath . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From 8cf621e0e446f6dfcce9552f46d27001f542931a Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 19:23:51 +0000 Subject: [PATCH 647/895] Test FPM FCGI envs with path info fix for Apache proxy handler --- .../fcgi-env-pif-apache-handler-basic.phpt | 57 +++++++++++++++++ ...cgi-env-pif-apache-handler-with-query.phpt | 58 +++++++++++++++++ ...nv-pif-apache-handler-without-docroot.phpt | 63 +++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-handler-with-query.phpt create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-handler-without-docroot.phpt diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt new file mode 100644 index 0000000000000..a99f373cf3321 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt @@ -0,0 +1,57 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache handler basic +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__ . '/pinfo', + ], + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', $scriptName . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-handler-with-query.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-handler-with-query.phpt new file mode 100644 index 0000000000000..1b1ad05fa5693 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-handler-with-query.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache handler basic +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + query: 'q=1', + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__ . '/pinfo', + ], + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '?q=1', + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', $scriptName . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-handler-without-docroot.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-handler-without-docroot.phpt new file mode 100644 index 0000000000000..5d2559adbb530 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-handler-without-docroot.phpt @@ -0,0 +1,63 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache handler basic +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__ . '/pinfo', + 'DOCUMENT_ROOT' => null, + ], + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', $scriptName . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From 38d2e7ea9a7d62208e9c1b78ffcd01eae21b244c Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 19:24:11 +0000 Subject: [PATCH 648/895] Test FPM FCGI envs with path info fix for Apache proxy pass --- ...fcgi-env-pif-apache-pp-sn-strip-basic.phpt | 54 +++++++++++++++++++ ...gi-env-pif-apache-pp-sn-strip-invalid.phpt | 54 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-basic.phpt create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-invalid.phpt diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-basic.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-basic.phpt new file mode 100644 index 0000000000000..c0c0fc9360844 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-basic.phpt @@ -0,0 +1,54 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache ProxyPass SCRIPT_NAME stripping with basic path +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '/pinfo', + scriptName: $scriptName . '/pinfo' + ) + ->expectBody([$scriptName, $scriptName . '/pinfo', $sourceFilePath, '/pinfo', $scriptName . '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-invalid.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-invalid.phpt new file mode 100644 index 0000000000000..ebc86bf931eb8 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-invalid.phpt @@ -0,0 +1,54 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache ProxyPass SCRIPT_NAME stripping with invalid path +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + uri: $scriptName . '/pinfox', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '/pinfoy', + scriptName: $scriptName . '/pinfox' // this would be a bug in Apache - just for testing + ) + ->expectBody([$scriptName . '/pinfox', 'none', $sourceFilePath, '/pinfoy', $scriptName . '/pinfox/pinfoy']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From 7d987ebbbf3f4841c8454bc403b3c6ab82603a3e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 17 Mar 2023 14:55:51 +0000 Subject: [PATCH 649/895] Fix FPM tester $scriptName logic --- sapi/fpm/tests/tester.inc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index ee4dff4b95815..0b6ad9d0f831b 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -586,17 +586,14 @@ class Tester string $scriptName = null, ?string $stdin = null ): array { - if (is_null($scriptFilename) && is_null($uri)) { + if (is_null($scriptFilename)) { $scriptFilename = $this->makeSourceFile(); - } else { - if (is_null($scriptFilename)) { - $scriptFilename = $uri; - } elseif (is_null($scriptName)) { - $scriptName = $uri; - } + } + if (is_null($uri)) { + $uri = '/' . basename($scriptFilename); } if (is_null($scriptName)) { - $scriptName = '/' . basename($scriptFilename); + $scriptName = $uri; } $params = array_merge( From 4da0da7f2d3b9855bfe70440a34a7d32ea97c7d2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:08:47 +0100 Subject: [PATCH 650/895] Implement GH-10854: TSRM should set a smarter value for expected_threads (#10867) The tsrm_startup() function is currently always called with expected_threads = 1. This means that the hashtable used in the TSRM will only contain a single bucket, and all thread resources will therefore be in the same linked list. So it's not really a hashtable right now, even though it's supposed to be. This patch adds a function tsrm_startup_ex() which takes the expected thread count as an argument. It also keeps the tsrm_startup() function so there are no BC breaks. In the Apache SAPI we query how many threads we have, and pass that to the tsrm_startup_ex() function. --- main/main.c | 11 ++++++++--- main/php_main.h | 1 + sapi/apache2handler/sapi_apache2.c | 11 ++++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/main/main.c b/main/main.c index 8e09f4cd4c0b2..d9defc974cc40 100644 --- a/main/main.c +++ b/main/main.c @@ -2647,13 +2647,18 @@ PHPAPI void php_reserve_tsrm_memory(void) } /* }}} */ -/* {{{ php_tsrm_startup */ -PHPAPI bool php_tsrm_startup(void) +PHPAPI bool php_tsrm_startup_ex(int expected_threads) { - bool ret = tsrm_startup(1, 1, 0, NULL); + bool ret = tsrm_startup(expected_threads, 1, 0, NULL); php_reserve_tsrm_memory(); (void)ts_resource(0); return ret; } + +/* {{{ php_tsrm_startup */ +PHPAPI bool php_tsrm_startup(void) +{ + return php_tsrm_startup_ex(1); +} /* }}} */ #endif diff --git a/main/php_main.h b/main/php_main.h index 561635faea6c3..40c1b773fd2f0 100644 --- a/main/php_main.h +++ b/main/php_main.h @@ -47,6 +47,7 @@ extern int php_shutdown_environ(void); #ifdef ZTS PHPAPI void php_reserve_tsrm_memory(void); +PHPAPI bool php_tsrm_startup_ex(int expected_threads); PHPAPI bool php_tsrm_startup(void); #define PHP_ZTS 1 diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 30e05aec79ef8..a5d4e8984a5a8 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -485,7 +485,16 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp apache2_sapi_module.php_ini_path_override = apache2_php_ini_path_override; } #ifdef ZTS - php_tsrm_startup(); + int expected_threads; +#ifdef AP_MPMQ_MAX_THREADS + if (ap_mpm_query(AP_MPMQ_MAX_THREADS, &expected_threads) != APR_SUCCESS) { + expected_threads = 1; + } +#else + expected_threads = 1; +#endif + + php_tsrm_startup_ex(expected_threads); # ifdef PHP_WIN32 ZEND_TSRMLS_CACHE_UPDATE(); # endif From ac9964502cc6d89ca58a6b6e8e76d7ab62ac0fb5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:09:14 +0100 Subject: [PATCH 651/895] Fix GH-10634: Lexing memory corruption (#10866) We're not relying on re2c's bounds checking mechanism because re2c:yyfill:check = 0; is set. We just return 0 if we read over the end of the input in YYFILL. Note that we used to use the "any character" wildcard in the comment regexes. But that means if we go over the end in the comment regexes, we don't know that and it's just like the 0 bytes are part of the token. Since a 0 byte already is considered as an end-of-file, we can just block those in the regex. For the regexes with newlines, I had to not only include \x00 in the denylist, but also \n and \r because otherwise it would greedily match those and let the single-line comment run over multiple lines. --- Zend/tests/gh10634.phpt | 24 ++++++++++++++++++++++++ Zend/zend_language_scanner.l | 10 +++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/gh10634.phpt diff --git a/Zend/tests/gh10634.phpt b/Zend/tests/gh10634.phpt new file mode 100644 index 0000000000000..41407bf307d7f --- /dev/null +++ b/Zend/tests/gh10634.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-10634 (Lexing memory corruption) +--FILE-- +getMessage()); + } +} + +test_input("y&/*"); +test_input("y&/**"); +test_input("y&#"); +test_input("y&# "); +test_input("y&//"); +?> +--EXPECT-- +string(36) "Unterminated comment starting line 1" +string(36) "Unterminated comment starting line 1" +string(36) "syntax error, unexpected end of file" +string(36) "syntax error, unexpected end of file" +string(36) "syntax error, unexpected end of file" diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 7abd91b23a58a..054ed7bdc1ef6 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1369,9 +1369,13 @@ TOKENS [;:,.|^&+-/*=%!~$<>?@] ANY_CHAR [^] NEWLINE ("\r"|"\n"|"\r\n") OPTIONAL_WHITESPACE [ \n\r\t]* -MULTI_LINE_COMMENT "/*"([^*]*"*"+)([^*/][^*]*"*"+)*"/" -SINGLE_LINE_COMMENT "//".*[\n\r] -HASH_COMMENT "#"(([^[].*[\n\r])|[\n\r]) +/* We don't use re2c with bounds checking, we just return 0 bytes if we read past the input. + * If we use wildcard matching for comments, we can read past the input, which crashes + * once we try to report a syntax error because the 0 bytes are not actually part of + * the token. We prevent this by not allowing 0 bytes, which already aren't valid anyway. */ +MULTI_LINE_COMMENT "/*"([^*\x00]*"*"+)([^*/\x00][^*\x00]*"*"+)*"/" +SINGLE_LINE_COMMENT "//"[^\x00\n\r]*[\n\r] +HASH_COMMENT "#"(([^[\x00][^\x00\n\r]*[\n\r])|[\n\r]) WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_COMMENT}|{HASH_COMMENT})+ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_COMMENT}|{HASH_COMMENT})* From 53763e14b72deb2223b6de432a9d30eed362bfa3 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 17 Mar 2023 18:12:51 +0100 Subject: [PATCH 652/895] Remove xfail from tests that do not fail anymore (#10871) --- ext/opcache/tests/bug78175_2.phpt | 1 - ext/opcache/tests/bug78376.phpt | 1 - ext/opcache/tests/preload_method_static_vars.phpt | 1 - ext/opcache/tests/preload_trait_static.phpt | 1 - 4 files changed, 4 deletions(-) diff --git a/ext/opcache/tests/bug78175_2.phpt b/ext/opcache/tests/bug78175_2.phpt index 0030962c4fb71..a994c3568617d 100644 --- a/ext/opcache/tests/bug78175_2.phpt +++ b/ext/opcache/tests/bug78175_2.phpt @@ -10,7 +10,6 @@ opcache --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- Date: Thu, 16 Mar 2023 19:28:07 +0000 Subject: [PATCH 653/895] ext/psql: pg_meta_data, extended mode, fix typo for pseudo typtype. Closes GH-10865. --- NEWS | 4 ++++ ext/pgsql/pgsql.c | 2 +- ext/pgsql/tests/pg_meta_data_001.phpt | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index d6a6b39107b25..5f59d716a9a0e 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,10 @@ PHP NEWS . Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit(). (nielsdos) +- PGSQL: + . Fixed typo in the array returned from pg_meta_data (extended mode). + (David Carlier) + - SPL: . Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a0c83fd955abe..13120e2b588b4 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4343,7 +4343,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string /* pg_type.typtype */ add_assoc_bool_ex(&elem, "is base", sizeof("is base") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "b")); add_assoc_bool_ex(&elem, "is composite", sizeof("is composite") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "c")); - add_assoc_bool_ex(&elem, "is pesudo", sizeof("is pesudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p")); + add_assoc_bool_ex(&elem, "is pseudo", sizeof("is pseudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p")); /* pg_description.description */ add_assoc_string_ex(&elem, "description", sizeof("description") - 1, PQgetvalue(pg_result, i, 8)); } diff --git a/ext/pgsql/tests/pg_meta_data_001.phpt b/ext/pgsql/tests/pg_meta_data_001.phpt index 72f2f4fa5ad48..a69fcb2ef63eb 100644 --- a/ext/pgsql/tests/pg_meta_data_001.phpt +++ b/ext/pgsql/tests/pg_meta_data_001.phpt @@ -122,7 +122,7 @@ array(2) { bool(true) ["is composite"]=> bool(false) - ["is pesudo"]=> + ["is pseudo"]=> bool(false) ["description"]=> string(0) "" @@ -147,7 +147,7 @@ array(2) { bool(true) ["is composite"]=> bool(false) - ["is pesudo"]=> + ["is pseudo"]=> bool(false) ["description"]=> string(0) "" From 06ae75007a25f766be66e85331e2e196a88b959b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 15 Mar 2023 22:28:08 +0100 Subject: [PATCH 654/895] Fix GH-8789 and GH-10015: Fix ZTS zend signal crashes due to NULL globals Fixes GH-8789. Fixes GH-10015. This is one small part of the underlying bug for GH-10737, as in my attempts to reproduce the issue I constantly hit this crash easily. (The fix for the other underlying issue for that bug will follow soon.) It's possible that a signal arrives at a thread that never handled a PHP request before. This causes the signal globals to dereference a NULL pointer because the TSRM pointers for the thread aren't set up to point to the thread resources yet. PR GH-9766 previously fixed this for master by ignoring the signal if the thread didn't handle a PHP request yet. While this fixes the crash bug, I think the solution is suboptimal for 3 reasons: 1) The signal is ignored and a message is printed saying there is a bug. However, this is not a bug at all. For example in Apache, the signal set up happens on child process creation, and the thread resource creation happens lazily when the first request is handled by the thread. Hence, the fact that the thread resources aren't set up yet is not actually buggy behaviour. 2) I believe since it was believed to be buggy behaviour, that fix was only applied to master, so 8.1 & 8.2 keep on crashing. 3) We can do better than ignoring the signal. By just acting in the same way as if the signals aren't active. This means we need to take the same path as if the TSRM had already shut down. Closes GH-10861. --- NEWS | 4 ++++ Zend/zend_signal.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5f59d716a9a0e..0bf8ec8fc8cf1 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed bug GH-8646 (Memory leak PHP FPM 8.1). (nielsdos) . Fixed bug GH-10801 (Named arguments in CTE functions cause a segfault). (nielsdos) + . Fixed bug GH-8789 (PHP 8.0.20 (ZTS) zend_signal_handler_defer crashes on + apache). (nielsdos) + . Fixed bug GH-10015 (zend_signal_handler_defer crashes on apache shutdown). + (nielsdos) - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index 3c090ccb8c524..3b9dd514bcc42 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -85,8 +85,10 @@ void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context) zend_signal_queue_t *queue, *qtmp; #ifdef ZTS - /* A signal could hit after TSRM shutdown, in this case globals are already freed. */ - if (tsrm_is_shutdown()) { + /* A signal could hit after TSRM shutdown, in this case globals are already freed. + * Or it could be delivered to a thread that didn't execute PHP yet. + * In the latter case we act as if SIGG(active) is false. */ + if (tsrm_is_shutdown() || !tsrm_get_ls_cache()) { /* Forward to default handler handler */ zend_signal_handler(signo, siginfo, context); return; @@ -178,7 +180,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context) sigset_t sigset; zend_signal_entry_t p_sig; #ifdef ZTS - if (tsrm_is_shutdown()) { + if (tsrm_is_shutdown() || !tsrm_get_ls_cache()) { p_sig.flags = 0; p_sig.handler = SIG_DFL; } else From f30e71cbde10acdff4ad71bf387a828ed210ffa5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 Feb 2023 13:21:37 +0100 Subject: [PATCH 655/895] Destroy file_handle in fpm_main If it's not in the CG(open_files) list, we need to destroy the file handle ourselves. Co-authored-by: Jakub Zelenka Closes GH-10707. --- NEWS | 1 + sapi/fpm/fpm/fpm_main.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 0bf8ec8fc8cf1..de9ebfee8beab 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ PHP NEWS - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) + . Destroy file_handle in fpm_main. (Jakub Zelenka, nielsdos) - FTP: . Propagate success status of ftp_close(). (nielsdos) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 7cb0a0a33b814..aae4fea80b432 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1918,6 +1918,13 @@ consult the installation file that came with this distribution, or visit \n\ php_execute_script(&file_handle); + /* Without opcache, or the first time with opcache, the file handle will be placed + * in the CG(open_files) list by open_file_for_scanning(). Starting from the second + * request in opcache, the file handle won't be in the list and therefore won't be destroyed for us. */ + if (!file_handle.in_list) { + zend_destroy_file_handle(&file_handle); + } + fastcgi_request_done: if (EXPECTED(primary_script)) { efree(primary_script); From b5726c2cb15626fe5ac03e42107c24e5ec39ea91 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 17 Mar 2023 19:35:58 +0100 Subject: [PATCH 656/895] Fix NUL byte in exception string terminating Exception::__toString() Fixes GH-10810 Closes GH-10873 --- NEWS | 2 ++ Zend/tests/gh10810.phpt | 10 ++++++++++ Zend/zend_exceptions.c | 34 +++++++++++++++++++++++----------- Zend/zend_string.h | 2 ++ 4 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 Zend/tests/gh10810.phpt diff --git a/NEWS b/NEWS index de9ebfee8beab..5fe7729b8fb97 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ PHP NEWS apache). (nielsdos) . Fixed bug GH-10015 (zend_signal_handler_defer crashes on apache shutdown). (nielsdos) + . Fixed bug GH-10810 (Fix NUL byte terminating Exception::__toString()). + (ilutov) - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) diff --git a/Zend/tests/gh10810.phpt b/Zend/tests/gh10810.phpt new file mode 100644 index 0000000000000..2539d5c7b40d6 --- /dev/null +++ b/Zend/tests/gh10810.phpt @@ -0,0 +1,10 @@ +--TEST-- +GH-10810: Fix NUL byte terminating Exception::__toString() +--FILE-- + +--EXPECTF-- +Exception: Hello%0World in %s:%d +Stack trace: +#0 {main} diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 7ccdaeea44311..89d75627e3f23 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -680,24 +680,36 @@ ZEND_METHOD(Exception, __toString) } if ((Z_OBJCE_P(exception) == zend_ce_type_error || Z_OBJCE_P(exception) == zend_ce_argument_count_error) && strstr(ZSTR_VAL(message), ", called in ")) { - zend_string *real_message = zend_strpprintf(0, "%s and defined", ZSTR_VAL(message)); + zval message_zv; + ZVAL_STR(&message_zv, message); + zend_string *real_message = zend_strpprintf_unchecked(0, "%Z and defined", &message_zv); zend_string_release_ex(message, 0); message = real_message; } + zend_string *tmp_trace = (Z_TYPE(trace) == IS_STRING && Z_STRLEN(trace)) + ? zend_string_copy(Z_STR(trace)) + : ZSTR_INIT_LITERAL("#0 {main}\n", false); + + zval name_zv, trace_zv, file_zv, prev_str_zv; + ZVAL_STR(&name_zv, Z_OBJCE_P(exception)->name); + ZVAL_STR(&trace_zv, tmp_trace); + ZVAL_STR(&file_zv, file); + ZVAL_STR(&prev_str_zv, prev_str); + if (ZSTR_LEN(message) > 0) { - str = zend_strpprintf(0, "%s: %s in %s:" ZEND_LONG_FMT - "\nStack trace:\n%s%s%s", - ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(message), ZSTR_VAL(file), line, - (Z_TYPE(trace) == IS_STRING && Z_STRLEN(trace)) ? Z_STRVAL(trace) : "#0 {main}\n", - ZSTR_LEN(prev_str) ? "\n\nNext " : "", ZSTR_VAL(prev_str)); + zval message_zv; + ZVAL_STR(&message_zv, message); + + str = zend_strpprintf_unchecked(0, "%Z: %Z in %Z:" ZEND_LONG_FMT "\nStack trace:\n%Z%s%Z", + &name_zv, &message_zv, &file_zv, line, + &trace_zv, ZSTR_LEN(prev_str) ? "\n\nNext " : "", &prev_str_zv); } else { - str = zend_strpprintf(0, "%s in %s:" ZEND_LONG_FMT - "\nStack trace:\n%s%s%s", - ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(file), line, - (Z_TYPE(trace) == IS_STRING && Z_STRLEN(trace)) ? Z_STRVAL(trace) : "#0 {main}\n", - ZSTR_LEN(prev_str) ? "\n\nNext " : "", ZSTR_VAL(prev_str)); + str = zend_strpprintf_unchecked(0, "%Z in %Z:" ZEND_LONG_FMT "\nStack trace:\n%Z%s%Z", + &name_zv, &file_zv, line, + &trace_zv, ZSTR_LEN(prev_str) ? "\n\nNext " : "", &prev_str_zv); } + zend_string_release_ex(tmp_trace, false); zend_string_release_ex(prev_str, 0); zend_string_release_ex(message, 0); diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 472bf6bbfde63..32acba9f21ce0 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -108,6 +108,8 @@ END_EXTERN_C() #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) +#define ZSTR_INIT_LITERAL(s, persistent) (zend_string_init((s), strlen(s), (persistent))) + /*---*/ static zend_always_inline zend_ulong zend_string_hash_val(zend_string *s) From 0d4d471847902dcb44d047d3bbf3f25f9aacdf88 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 12 Mar 2023 19:30:16 +0000 Subject: [PATCH 657/895] Fix bug #74129: Incorrect SCRIPT_NAME with apache ProxyPassMatch This happens when there are spaces are in the path info. The reason is that Apache decodes the path info part in the SCRIPT_NAME as per CGI RFC. FPM tries to strip path info from the SCRIPT_NAME but the comparison is done against SCRIPT_FILENAME which is not decoded. For that to work we have to decode it before comparison if there is any encoded character. Closes GH-10869 --- NEWS | 2 + sapi/fpm/fpm/fpm_main.c | 26 +++++++-- ...gi-env-pif-apache-pp-sn-strip-encoded.phpt | 54 +++++++++++++++++++ 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-encoded.phpt diff --git a/NEWS b/NEWS index 5fe7729b8fb97..85bb5c240b715 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ PHP NEWS - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) . Destroy file_handle in fpm_main. (Jakub Zelenka, nielsdos) + . Fixed bug #74129 (Incorrect SCRIPT_NAME with apache ProxyPassMatch when + spaces are in path). (Jakub Zelenka) - FTP: . Propagate success status of ftp_close(). (nielsdos) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index aae4fea80b432..64ef27dadeb39 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1157,12 +1157,32 @@ static void init_request_info(void) * As we can extract PATH_INFO from PATH_TRANSLATED * it is probably also in SCRIPT_NAME and need to be removed */ - int snlen = strlen(env_script_name); - if (snlen>slen && !strcmp(env_script_name+snlen-slen, path_info)) { + char *decoded_path_info = NULL; + size_t decoded_path_info_len = 0; + if (strchr(path_info, '%')) { + decoded_path_info = estrdup(path_info); + decoded_path_info_len = php_url_decode(decoded_path_info, strlen(path_info)); + } + size_t snlen = strlen(env_script_name); + size_t env_script_file_info_start = 0; + if ( + ( + snlen > slen && + !strcmp(env_script_name + (env_script_file_info_start = snlen - slen), path_info) + ) || + ( + decoded_path_info && + snlen > decoded_path_info_len && + !strcmp(env_script_name + (env_script_file_info_start = snlen - decoded_path_info_len), decoded_path_info) + ) + ) { FCGI_PUTENV(request, "ORIG_SCRIPT_NAME", orig_script_name); - env_script_name[snlen-slen] = 0; + env_script_name[env_script_file_info_start] = 0; SG(request_info).request_uri = FCGI_PUTENV(request, "SCRIPT_NAME", env_script_name); } + if (decoded_path_info) { + efree(decoded_path_info); + } } env_path_info = FCGI_PUTENV(request, "PATH_INFO", path_info); } diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-encoded.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-encoded.phpt new file mode 100644 index 0000000000000..22114e1abde47 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-pp-sn-strip-encoded.phpt @@ -0,0 +1,54 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache ProxyPass SCRIPT_NAME stripping with encoded path (bug #74129) +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + uri: $scriptName . '/1%202', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '/1%202', + scriptName: $scriptName . '/1 2' + ) + ->expectBody([$scriptName, $scriptName . '/1 2', $sourceFilePath, '/1%202', $scriptName . '/1%202']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From edae24313d6ea84a84b5712b505d0a7add070af7 Mon Sep 17 00:00:00 2001 From: "Su, Tao" Date: Tue, 14 Mar 2023 00:48:03 -0700 Subject: [PATCH 658/895] Fix GH-10755: Memory leak in phar_rename_archive() In phar_renmae_archive() context, added one reference but immediately destroyed another, so do not need to increase refcount. With removal of refcount++ line, PHP/Zend no longer reports memory leak. Updated bug69958.phpt test file accordingly. Closes GH-10856 --- NEWS | 3 +++ ext/phar/phar_object.c | 4 +++- ext/phar/tests/bug69958.phpt | 8 +++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 375dbfbc0e448..dca8db6eba10e 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,9 @@ PHP NEWS . pg_fetch_object raises a ValueError instead of an Exception. (David Carlier) +- Phar: + . Fix memory leak in phar_rename_archive(). (stkeke) + - Posix: . Added posix_sysconf. (David Carlier) . Added posix_pathconf. (David Carlier) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index ba47cd88439c5..6a593b981a149 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -2113,10 +2113,12 @@ static zend_object *phar_rename_archive(phar_archive_data **sphar, char *ext) /* pphar->flags = phar->flags; pphar->fp = phar->fp; phar->fp = NULL; + /* FIX: GH-10755 Double-free issue caught by ASAN check */ + pphar->alias = phar->alias; /* Transfer alias to pphar to */ + phar->alias = NULL; /* avoid being free'd twice */ phar_destroy_phar_data(phar); *sphar = NULL; phar = pphar; - phar->refcount++; newpath = oldpath; goto its_ok; } diff --git a/ext/phar/tests/bug69958.phpt b/ext/phar/tests/bug69958.phpt index b53c76a104951..447efce57db7c 100644 --- a/ext/phar/tests/bug69958.phpt +++ b/ext/phar/tests/bug69958.phpt @@ -1,7 +1,5 @@ --TEST-- Phar: bug #69958: Segfault in Phar::convertToData on invalid file ---XFAIL-- -Still has memory leaks, see https://bugs.php.net/bug.php?id=70005 --EXTENSIONS-- phar --FILE-- @@ -10,8 +8,8 @@ $tarphar = new PharData(__DIR__.'/bug69958.tar'); $phar = $tarphar->convertToData(Phar::TAR); ?> --EXPECTF-- -Fatal error: Uncaught BadMethodCallException: phar "%s/bug69958.tar" exists and must be unlinked prior to conversion in %s/bug69958.php:%d +Fatal error: Uncaught BadMethodCallException: phar "%sbug69958.tar" exists and must be unlinked prior to conversion in %sbug69958.php:%d Stack trace: -#0 %s/bug69958.php(%d): PharData->convertToData(%d) +#0 %sbug69958.php(%d): PharData->convertToData(%d) #1 {main} - thrown in %s/bug69958.php on line %d + thrown in %sbug69958.php on line %d From 9d5f2f1343a891eba122bdd0bd7fa8758fd4c493 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 20 Mar 2023 16:19:05 +0100 Subject: [PATCH 659/895] Use new ZSTR_INIT_LITERAL macro (#10879) --- Zend/zend_builtin_functions.c | 4 ++-- Zend/zend_compile.c | 8 +++---- Zend/zend_enum.c | 4 ++-- Zend/zend_exceptions.c | 2 +- Zend/zend_execute_API.c | 2 +- Zend/zend_language_parser.y | 4 ++-- ext/bcmath/bcmath.c | 2 +- ext/date/php_date.c | 2 +- ext/dom/php_dom.c | 2 +- ext/fileinfo/libmagic.patch | 2 +- ext/fileinfo/libmagic/softmagic.c | 2 +- ext/iconv/iconv.c | 6 ++--- ext/imap/php_imap.c | 2 +- ext/mbstring/mbstring.c | 2 +- ext/opcache/ZendAccelerator.c | 4 ++-- ext/pdo/pdo_dbh.c | 2 +- ext/pdo_dblib/dblib_stmt.c | 2 +- ext/pdo_firebird/firebird_driver.c | 2 +- ext/pdo_mysql/mysql_driver.c | 2 +- ext/pdo_oci/oci_driver.c | 2 +- ext/phar/phar_object.c | 2 +- ext/phar/stream.c | 2 +- ext/random/randomizer.c | 2 +- ext/session/session.c | 36 +++++++++++++++--------------- ext/soap/soap.c | 2 +- ext/sodium/sodium_pwhash.c | 2 +- ext/spl/spl_directory.c | 6 ++--- ext/spl/spl_iterators.c | 8 +++---- ext/standard/assert.c | 8 +++---- ext/standard/basic_functions.c | 4 ++-- ext/standard/http_fopen_wrapper.c | 2 +- ext/standard/password.c | 4 ++-- ext/standard/user_filters.c | 4 ++-- ext/xsl/xsltprocessor.c | 4 ++-- main/SAPI.c | 2 +- main/main.c | 2 +- sapi/fpm/fpm/fpm_status.c | 2 +- sapi/fuzzer/fuzzer-function-jit.c | 2 +- sapi/fuzzer/fuzzer-tracing-jit.c | 2 +- sapi/litespeed/lsapi_main.c | 2 +- 40 files changed, 78 insertions(+), 78 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 93cd9040dd3a7..c332f5a3220eb 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -110,7 +110,7 @@ ZEND_FUNCTION(gc_enable) ZEND_PARSE_PARAMETERS_NONE(); - key = zend_string_init("zend.enable_gc", sizeof("zend.enable_gc")-1, 0); + key = ZSTR_INIT_LITERAL("zend.enable_gc", 0); zend_alter_ini_entry_chars(key, "1", sizeof("1")-1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); } @@ -123,7 +123,7 @@ ZEND_FUNCTION(gc_disable) ZEND_PARSE_PARAMETERS_NONE(); - key = zend_string_init("zend.enable_gc", sizeof("zend.enable_gc")-1, 0); + key = ZSTR_INIT_LITERAL("zend.enable_gc", 0); zend_alter_ini_entry_chars(key, "0", sizeof("0")-1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 711f33b568bae..a082a71c48170 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2016,7 +2016,7 @@ zend_ast *zend_negate_num_string(zend_ast *ast) /* {{{ */ zval *zv = zend_ast_get_zval(ast); if (Z_TYPE_P(zv) == IS_LONG) { if (Z_LVAL_P(zv) == 0) { - ZVAL_NEW_STR(zv, zend_string_init("-0", sizeof("-0")-1, 0)); + ZVAL_NEW_STR(zv, ZSTR_INIT_LITERAL("-0", 0)); } else { ZEND_ASSERT(Z_LVAL_P(zv) > 0); Z_LVAL_P(zv) *= -1; @@ -4221,7 +4221,7 @@ static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string /* If the original argument was named, add the new argument as named as well, * as mixing named and positional is not allowed. */ zend_ast *name = zend_ast_create_zval_from_str( - zend_string_init("description", sizeof("description") - 1, 0)); + ZSTR_INIT_LITERAL("description", 0)); arg = zend_ast_create(ZEND_AST_NAMED_ARG, name, arg); } zend_ast_list_add((zend_ast *) args, arg); @@ -7295,9 +7295,9 @@ static void add_stringable_interface(zend_class_entry *ce) { erealloc(ce->interface_names, sizeof(zend_class_name) * ce->num_interfaces); // TODO: Add known interned strings instead? ce->interface_names[ce->num_interfaces - 1].name = - zend_string_init("Stringable", sizeof("Stringable") - 1, 0); + ZSTR_INIT_LITERAL("Stringable", 0); ce->interface_names[ce->num_interfaces - 1].lc_name = - zend_string_init("stringable", sizeof("stringable") - 1, 0); + ZSTR_INIT_LITERAL("stringable", 0); } static zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, bool has_body) /* {{{ */ diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index 4abca60fa85b1..21628f74956bb 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -183,11 +183,11 @@ void zend_enum_add_interfaces(zend_class_entry *ce) ce->interface_names = erealloc(ce->interface_names, sizeof(zend_class_name) * ce->num_interfaces); ce->interface_names[num_interfaces_before].name = zend_string_copy(zend_ce_unit_enum->name); - ce->interface_names[num_interfaces_before].lc_name = zend_string_init("unitenum", sizeof("unitenum") - 1, 0); + ce->interface_names[num_interfaces_before].lc_name = ZSTR_INIT_LITERAL("unitenum", 0); if (ce->enum_backing_type != IS_UNDEF) { ce->interface_names[num_interfaces_before + 1].name = zend_string_copy(zend_ce_backed_enum->name); - ce->interface_names[num_interfaces_before + 1].lc_name = zend_string_init("backedenum", sizeof("backedenum") - 1, 0); + ce->interface_names[num_interfaces_before + 1].lc_name = ZSTR_INIT_LITERAL("backedenum", 0); } ce->default_object_handlers = &zend_enum_object_handlers; diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 5846b51c662a3..8dea48042336c 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -647,7 +647,7 @@ ZEND_METHOD(Exception, __toString) str = ZSTR_EMPTY_ALLOC(); exception = ZEND_THIS; - fname = zend_string_init("gettraceasstring", sizeof("gettraceasstring")-1, 0); + fname = ZSTR_INIT_LITERAL("gettraceasstring", 0); while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), zend_ce_throwable)) { zend_string *prev_str = str; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 9b10db265da7d..9efe205abe037 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -572,7 +572,7 @@ ZEND_API zend_string *get_function_or_method_name(const zend_function *func) /* return zend_create_member_string(func->common.scope->name, func->common.function_name); } - return func->common.function_name ? zend_string_copy(func->common.function_name) : zend_string_init("main", sizeof("main") - 1, 0); + return func->common.function_name ? zend_string_copy(func->common.function_name) : ZSTR_INIT_LITERAL("main", 0); } /* }}} */ diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 1f9cdfb3c389a..d1d54ade4dfd0 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -1256,12 +1256,12 @@ inline_function: function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type backup_fn_flags '{' inner_statement_list '}' backup_fn_flags { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2 | $13, $1, $3, - zend_string_init("{closure}", sizeof("{closure}") - 1, 0), + ZSTR_INIT_LITERAL("{closure}", 0), $5, $7, $11, $8, NULL); CG(extra_fn_flags) = $9; } | fn returns_ref backup_doc_comment '(' parameter_list ')' return_type T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags { $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $3, - zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $5, NULL, $11, $7, NULL); + ZSTR_INIT_LITERAL("{closure}", 0), $5, NULL, $11, $7, NULL); CG(extra_fn_flags) = $9; } ; diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index d6147269b0ebb..af36e399b016d 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -633,7 +633,7 @@ PHP_FUNCTION(bcscale) RETURN_THROWS(); } - zend_string *ini_name = zend_string_init("bcmath.scale", sizeof("bcmath.scale") - 1, 0); + zend_string *ini_name = ZSTR_INIT_LITERAL("bcmath.scale", 0); zend_string *new_scale_str = zend_long_to_str(new_scale); zend_alter_ini_entry(ini_name, new_scale_str, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release(new_scale_str); diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 4219b6977f629..6b2e94c718596 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1650,7 +1650,7 @@ static void date_period_it_move_forward(zend_object_iterator *iter) } create_date_period_datetime(object->current, object->start_ce, ¤t_zv); - zend_string *property_name = zend_string_init("current", sizeof("current") - 1, 0); + zend_string *property_name = ZSTR_INIT_LITERAL("current", 0); zend_std_write_property(&object->std, property_name, ¤t_zv, NULL); zval_ptr_dtor(¤t_zv); zend_string_release(property_name); diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index d9463012f146b..662c6e9ef7ce1 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -403,7 +403,7 @@ static HashTable* dom_get_debug_info_helper(zend_object *object, int *is_temp) / return debug_info; } - object_str = zend_string_init("(object value omitted)", sizeof("(object value omitted)")-1, 0); + object_str = ZSTR_INIT_LITERAL("(object value omitted)", 0); ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(prop_handlers, string_key, entry) { zval value; diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index 908cc0608044c..a0c62be524f04 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -2949,7 +2949,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c - if (rc == 0) { - rc = file_regexec(ms, &rx, fmt, 0, 0, 0); - rv = !rc; -+ pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0); ++ pattern = ZSTR_INIT_LITERAL("~%[-0-9\\.]*s~", 0); + if ((pce = pcre_get_compiled_regex_cache_ex(pattern, 0)) == NULL) { + rv = -1; + } else { diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c index afb77ba256e48..32d24a37d3df1 100644 --- a/ext/fileinfo/libmagic/softmagic.c +++ b/ext/fileinfo/libmagic/softmagic.c @@ -493,7 +493,7 @@ check_fmt(struct magic_set *ms, const char *fmt) if (strchr(fmt, '%') == NULL) return 0; - pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0); + pattern = ZSTR_INIT_LITERAL("~%[-0-9\\.]*s~", 0); if ((pce = pcre_get_compiled_regex_cache_ex(pattern, 0)) == NULL) { rv = -1; } else { diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index e61c448c305f8..c2ed3f258bc88 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2236,11 +2236,11 @@ PHP_FUNCTION(iconv_set_encoding) } if(zend_string_equals_literal_ci(type, "input_encoding")) { - name = zend_string_init("iconv.input_encoding", sizeof("iconv.input_encoding") - 1, 0); + name = ZSTR_INIT_LITERAL("iconv.input_encoding", 0); } else if(zend_string_equals_literal_ci(type, "output_encoding")) { - name = zend_string_init("iconv.output_encoding", sizeof("iconv.output_encoding") - 1, 0); + name = ZSTR_INIT_LITERAL("iconv.output_encoding", 0); } else if(zend_string_equals_literal_ci(type, "internal_encoding")) { - name = zend_string_init("iconv.internal_encoding", sizeof("iconv.internal_encoding") - 1, 0); + name = ZSTR_INIT_LITERAL("iconv.internal_encoding", 0); } else { RETURN_FALSE; } diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 96d91a11f654b..7723669417af3 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -822,7 +822,7 @@ PHP_FUNCTION(imap_append) } if (internal_date) { - zend_string *regex = zend_string_init("/[0-3][0-9]-((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))-[0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [+-][0-9]{4}/", sizeof("/[0-3][0-9]-((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))-[0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [+-][0-9]{4}/") - 1, 0); + zend_string *regex = ZSTR_INIT_LITERAL("/[0-3][0-9]-((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))-[0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [+-][0-9]{4}/", 0); pcre_cache_entry *pce; /* Compiled regex */ zval *subpats = NULL; /* Parts (not used) */ int global = 0; diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 3277284be51cb..d12d160153c22 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1203,7 +1203,7 @@ PHP_FUNCTION(mb_language) if (name == NULL) { RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language))); } else { - zend_string *ini_name = zend_string_init("mbstring.language", sizeof("mbstring.language") - 1, 0); + zend_string *ini_name = ZSTR_INIT_LITERAL("mbstring.language", 0); if (FAILURE == zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME)) { zend_argument_value_error(1, "must be a valid language, \"%s\" given", ZSTR_VAL(name)); zend_string_release_ex(ini_name, 0); diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3d0254e8307ee..9f5992831d1e9 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2656,7 +2656,7 @@ zend_result accel_activate(INIT_FUNC_ARGS) ZCG(root_hash) = buf.st_ino; if (sizeof(buf.st_ino) > sizeof(ZCG(root_hash))) { if (ZCG(root_hash) != buf.st_ino) { - zend_string *key = zend_string_init("opcache.enable", sizeof("opcache.enable")-1, 0); + zend_string *key = ZSTR_INIT_LITERAL("opcache.enable", 0); zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode"); @@ -4479,7 +4479,7 @@ static zend_result accel_preload(const char *config, bool in_child) script->ping_auto_globals_mask = ping_auto_globals_mask; /* Store all functions and classes in a single pseudo-file */ - CG(compiled_filename) = zend_string_init("$PRELOAD$", sizeof("$PRELOAD$") - 1, 0); + CG(compiled_filename) = ZSTR_INIT_LITERAL("$PRELOAD$", 0); #if ZEND_USE_ABS_CONST_ADDR init_op_array(&script->script.main_op_array, ZEND_USER_FUNCTION, 1); #else diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 290587b5db100..b4664e60fb790 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -461,7 +461,7 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt zend_string *key; ZVAL_STR(&query_string, stmt->query_string); - key = zend_string_init("queryString", sizeof("queryString") - 1, 0); + key = ZSTR_INIT_LITERAL("queryString", 0); zend_std_write_property(Z_OBJ_P(object), key, &query_string, NULL); zend_string_release_ex(key, 0); diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index 2a946c81dc242..acdbf7306d409 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -243,7 +243,7 @@ static int pdo_dblib_stmt_describe(pdo_stmt_t *stmt, int colno) len = snprintf(buf, sizeof(buf), "computed%d", S->computed_column_name_count); col->name = zend_string_init(buf, len, 0); } else { - col->name = zend_string_init("computed", strlen("computed"), 0); + col->name = ZSTR_INIT_LITERAL("computed", 0); } S->computed_column_name_count++; diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 7dc40f510d459..cbd7ee7cfd377 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -671,7 +671,7 @@ static zend_string* firebird_handle_quoter(pdo_dbh_t *dbh, const zend_string *un zend_string *quoted_str; if (ZSTR_LEN(unquoted) == 0) { - return zend_string_init("''", 2, 0); + return ZSTR_INIT_LITERAL("''", 0); } /* Firebird only requires single quotes to be doubled if string lengths are used */ diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 698b4e2d28cf4..2907c6c0c877e 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -356,7 +356,7 @@ static bool mysql_handle_begin(pdo_dbh_t *dbh) PDO_DBG_ENTER("mysql_handle_begin"); PDO_DBG_INF_FMT("dbh=%p", dbh); - command = zend_string_init("START TRANSACTION", strlen("START TRANSACTION"), 0); + command = ZSTR_INIT_LITERAL("START TRANSACTION", 0); return_value = mysql_handle_doer(dbh, command); zend_string_release_ex(command, 0); PDO_DBG_RETURN(0 <= return_value); diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index f74c67ff4ed39..6a16420b95760 100644 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -363,7 +363,7 @@ static zend_string* oci_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquote zend_string *quoted_str; if (ZSTR_LEN(unquoted) == 0) { - return zend_string_init("''", 2, 0); + return ZSTR_INIT_LITERAL("''", 0); } /* count single quotes */ diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 6a593b981a149..7791ddb10a070 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1435,7 +1435,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ } close_fp = 0; - opened = zend_string_init("[stream]", sizeof("[stream]") - 1, 0); + opened = ZSTR_INIT_LITERAL("[stream]", 0); goto after_open_fp; case IS_OBJECT: if (instanceof_function(Z_OBJCE_P(value), spl_ce_SplFileInfo)) { diff --git a/ext/phar/stream.c b/ext/phar/stream.c index b45b662398c79..e400699780e1f 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -84,7 +84,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, const char *filename, const return NULL; } resource = ecalloc(1, sizeof(php_url)); - resource->scheme = zend_string_init("phar", 4, 0); + resource->scheme = ZSTR_INIT_LITERAL("phar", 0); resource->host = zend_string_init(arch, arch_len, 0); efree(arch); resource->path = zend_string_init(entry, entry_len, 0); diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 6248d97f5b1d6..fe9ad5fc35a9c 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -42,7 +42,7 @@ static inline void randomizer_common_init(php_random_randomizer *randomizer, zen zend_string *mname; zend_function *generate_method; - mname = zend_string_init("generate", strlen("generate"), 0); + mname = ZSTR_INIT_LITERAL("generate", 0); generate_method = zend_hash_find_ptr(&engine_object->ce->function_table, mname); zend_string_release(mname); diff --git a/ext/session/session.c b/ext/session/session.c index 5c8cf470b33f6..66fbe7adaa330 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -215,7 +215,7 @@ PHPAPI zval* php_get_session_var(zend_string *name) /* {{{ */ static void php_session_track_init(void) /* {{{ */ { zval session_vars; - zend_string *var_name = zend_string_init("_SESSION", sizeof("_SESSION") - 1, 0); + zend_string *var_name = ZSTR_INIT_LITERAL("_SESSION", 0); /* Unconditionally destroy existing array -- possible dirty data */ zend_delete_global_variable(var_name); @@ -841,7 +841,7 @@ PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */ zval session_vars; php_unserialize_data_t var_hash; bool result; - zend_string *var_name = zend_string_init("_SESSION", sizeof("_SESSION") - 1, 0); + zend_string *var_name = ZSTR_INIT_LITERAL("_SESSION", 0); ZVAL_NULL(&session_vars); PHP_VAR_UNSERIALIZE_INIT(var_hash); @@ -1758,7 +1758,7 @@ PHP_FUNCTION(session_set_cookie_params) } if (lifetime) { - ini_name = zend_string_init("session.cookie_lifetime", sizeof("session.cookie_lifetime") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_lifetime", 0); result = zend_alter_ini_entry(ini_name, lifetime, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1767,7 +1767,7 @@ PHP_FUNCTION(session_set_cookie_params) } } if (path) { - ini_name = zend_string_init("session.cookie_path", sizeof("session.cookie_path") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_path", 0); result = zend_alter_ini_entry(ini_name, path, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1776,7 +1776,7 @@ PHP_FUNCTION(session_set_cookie_params) } } if (domain) { - ini_name = zend_string_init("session.cookie_domain", sizeof("session.cookie_domain") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_domain", 0); result = zend_alter_ini_entry(ini_name, domain, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1785,7 +1785,7 @@ PHP_FUNCTION(session_set_cookie_params) } } if (!secure_null) { - ini_name = zend_string_init("session.cookie_secure", sizeof("session.cookie_secure") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_secure", 0); result = zend_alter_ini_entry_chars(ini_name, secure ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1794,7 +1794,7 @@ PHP_FUNCTION(session_set_cookie_params) } } if (!httponly_null) { - ini_name = zend_string_init("session.cookie_httponly", sizeof("session.cookie_httponly") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_httponly", 0); result = zend_alter_ini_entry_chars(ini_name, httponly ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1803,7 +1803,7 @@ PHP_FUNCTION(session_set_cookie_params) } } if (samesite) { - ini_name = zend_string_init("session.cookie_samesite", sizeof("session.cookie_samesite") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cookie_samesite", 0); result = zend_alter_ini_entry(ini_name, samesite, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); if (result == FAILURE) { @@ -1865,7 +1865,7 @@ PHP_FUNCTION(session_name) RETVAL_STRING(PS(session_name)); if (name) { - ini_name = zend_string_init("session.name", sizeof("session.name") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.name", 0); zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); } @@ -1915,7 +1915,7 @@ PHP_FUNCTION(session_module_name) } PS(mod_data) = NULL; - ini_name = zend_string_init("session.save_handler", sizeof("session.save_handler") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.save_handler", 0); zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); } @@ -1939,8 +1939,8 @@ static bool can_session_handler_be_changed(void) { static inline void set_user_save_handler_ini(void) { zend_string *ini_name, *ini_val; - ini_name = zend_string_init("session.save_handler", sizeof("session.save_handler") - 1, 0); - ini_val = zend_string_init("user", sizeof("user") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.save_handler", 0); + ini_val = ZSTR_INIT_LITERAL("user", 0); PS(set_handler) = 1; zend_alter_ini_entry(ini_name, ini_val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); PS(set_handler) = 0; @@ -2015,7 +2015,7 @@ PHP_FUNCTION(session_set_save_handler) /* Find implemented methods - SessionIdInterface (optional) */ /* First release old handlers */ SESSION_RELEASE_USER_HANDLER_OO(ps_create_sid); - zend_string *create_sid_name = zend_string_init("create_sid", strlen("create_sid"), false); + zend_string *create_sid_name = ZSTR_INIT_LITERAL("create_sid", false); if (instanceof_function(Z_OBJCE_P(obj), php_session_id_iface_entry)) { SESSION_SET_USER_HANDLER_OO(ps_create_sid, zend_string_copy(create_sid_name)); } else if (zend_hash_find_ptr(object_methods, create_sid_name)) { @@ -2029,8 +2029,8 @@ PHP_FUNCTION(session_set_save_handler) SESSION_RELEASE_USER_HANDLER_OO(ps_validate_sid); SESSION_RELEASE_USER_HANDLER_OO(ps_update_timestamp); /* Method names need to be lowercase */ - zend_string *validate_sid_name = zend_string_init("validateid", strlen("validateid"), false); - zend_string *update_timestamp_name = zend_string_init("updatetimestamp", strlen("updatetimestamp"), false); + zend_string *validate_sid_name = ZSTR_INIT_LITERAL("validateid", false); + zend_string *update_timestamp_name = ZSTR_INIT_LITERAL("updatetimestamp", false); if (instanceof_function(Z_OBJCE_P(obj), php_session_update_timestamp_iface_entry)) { /* Validate ID handler */ SESSION_SET_USER_HANDLER_OO(ps_validate_sid, zend_string_copy(validate_sid_name)); @@ -2171,7 +2171,7 @@ PHP_FUNCTION(session_save_path) RETVAL_STRING(PS(save_path)); if (name) { - ini_name = zend_string_init("session.save_path", sizeof("session.save_path") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.save_path", 0); zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); } @@ -2409,7 +2409,7 @@ PHP_FUNCTION(session_cache_limiter) RETVAL_STRING(PS(cache_limiter)); if (limiter) { - ini_name = zend_string_init("session.cache_limiter", sizeof("session.cache_limiter") - 1, 0); + ini_name = ZSTR_INIT_LITERAL("session.cache_limiter", 0); zend_alter_ini_entry(ini_name, limiter, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); } @@ -2439,7 +2439,7 @@ PHP_FUNCTION(session_cache_expire) RETVAL_LONG(PS(cache_expire)); if (!expires_is_null) { - zend_string *ini_name = zend_string_init("session.cache_expire", sizeof("session.cache_expire") - 1, 0); + zend_string *ini_name = ZSTR_INIT_LITERAL("session.cache_expire", 0); zend_string *ini_value = zend_long_to_str(expires); zend_alter_ini_entry(ini_name, ini_value, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 44a3a3519f430..fea43f2f82146 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1753,7 +1753,7 @@ static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, z instanceof_function(Z_OBJCE_P(error_object), soap_server_class_entry) && (service = soap_server_object_fetch(Z_OBJ_P(error_object))->service) && !service->send_errors) { - buffer = zend_string_init("Internal Error", sizeof("Internal Error")-1, 0); + buffer = ZSTR_INIT_LITERAL("Internal Error", 0); } else { buffer = zend_string_copy(message); diff --git a/ext/sodium/sodium_pwhash.c b/ext/sodium/sodium_pwhash.c index 8eaac64207f5f..45e206bcd9435 100644 --- a/ext/sodium/sodium_pwhash.c +++ b/ext/sodium/sodium_pwhash.c @@ -171,7 +171,7 @@ static const php_password_algo sodium_algo_argon2id = { }; PHP_MINIT_FUNCTION(sodium_password_hash) /* {{{ */ { - zend_string *argon2i = zend_string_init("argon2i", strlen("argon2i"), 1); + zend_string *argon2i = ZSTR_INIT_LITERAL("argon2i", 1); if (php_password_algo_find(argon2i)) { /* Nothing to do. Core has registered these algorithms for us. */ diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 8fa3627582c5e..029edcdfb21de 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2074,14 +2074,14 @@ PHP_METHOD(SplTempFileObject, __construct) } if (max_memory < 0) { - file_name = zend_string_init("php://memory", sizeof("php://memory")-1, 0); + file_name = ZSTR_INIT_LITERAL("php://memory", 0); } else if (ZEND_NUM_ARGS()) { file_name = zend_strpprintf(0, "php://temp/maxmemory:" ZEND_LONG_FMT, max_memory); } else { - file_name = zend_string_init("php://temp", sizeof("php://temp")-1, 0); + file_name = ZSTR_INIT_LITERAL("php://temp", 0); } intern->file_name = file_name; - intern->u.file.open_mode = zend_string_init("wb", sizeof("wb")-1, 0); + intern->u.file.open_mode = ZSTR_INIT_LITERAL("wb", 0); /* spl_filesystem_file_open() can generate E_WARNINGs which we want to promote to exceptions */ zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index a3daad3951975..4ff21a6f0b750 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1001,10 +1001,10 @@ static zend_object *spl_RecursiveIteratorIterator_new_ex(zend_class_entry *class if (init_prefix) { intern->prefix[0] = ZSTR_EMPTY_ALLOC(); - intern->prefix[1] = zend_string_init("| ", 2, 0); - intern->prefix[2] = zend_string_init(" ", 2, 0); - intern->prefix[3] = zend_string_init("|-", 2, 0); - intern->prefix[4] = zend_string_init("\\-", 2, 0); + intern->prefix[1] = ZSTR_INIT_LITERAL("| ", 0); + intern->prefix[2] = ZSTR_INIT_LITERAL(" ", 0); + intern->prefix[3] = ZSTR_INIT_LITERAL("|-", 0); + intern->prefix[4] = ZSTR_INIT_LITERAL("\\-", 0); intern->prefix[5] = ZSTR_EMPTY_ALLOC(); intern->postfix[0] = ZSTR_EMPTY_ALLOC(); diff --git a/ext/standard/assert.c b/ext/standard/assert.c index f5f10752fe54c..0b43033dd4d30 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -213,7 +213,7 @@ PHP_FUNCTION(assert_options) RETURN_THROWS(); } - key = zend_string_init("assert.active", sizeof("assert.active")-1, 0); + key = ZSTR_INIT_LITERAL("assert.active", 0); zend_alter_ini_entry_ex(key, value_str, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0); zend_string_release_ex(key, 0); zend_string_release_ex(value_str, 0); @@ -229,7 +229,7 @@ PHP_FUNCTION(assert_options) RETURN_THROWS(); } - key = zend_string_init("assert.bail", sizeof("assert.bail")-1, 0); + key = ZSTR_INIT_LITERAL("assert.bail", 0); zend_alter_ini_entry_ex(key, value_str, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0); zend_string_release_ex(key, 0); zend_string_release_ex(value_str, 0); @@ -245,7 +245,7 @@ PHP_FUNCTION(assert_options) RETURN_THROWS(); } - key = zend_string_init("assert.warning", sizeof("assert.warning")-1, 0); + key = ZSTR_INIT_LITERAL("assert.warning", 0); zend_alter_ini_entry_ex(key, value_str, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0); zend_string_release_ex(key, 0); zend_string_release_ex(value_str, 0); @@ -280,7 +280,7 @@ PHP_FUNCTION(assert_options) RETURN_THROWS(); } - key = zend_string_init("assert.exception", sizeof("assert.exception")-1, 0); + key = ZSTR_INIT_LITERAL("assert.exception", 0); zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0); zend_string_release_ex(val, 0); zend_string_release_ex(key, 0); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f65a71a7266dd..1c84ddcc98947 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2104,7 +2104,7 @@ PHP_FUNCTION(set_include_path) RETVAL_FALSE; } - key = zend_string_init("include_path", sizeof("include_path") - 1, 0); + key = ZSTR_INIT_LITERAL("include_path", 0); if (zend_alter_ini_entry_ex(key, new_value, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0) == FAILURE) { zend_string_release_ex(key, 0); zval_ptr_dtor_str(return_value); @@ -2185,7 +2185,7 @@ PHP_FUNCTION(ignore_user_abort) old_setting = (unsigned short)PG(ignore_user_abort); if (!arg_is_null) { - zend_string *key = zend_string_init("ignore_user_abort", sizeof("ignore_user_abort") - 1, 0); + zend_string *key = ZSTR_INIT_LITERAL("ignore_user_abort", 0); zend_alter_ini_entry_chars(key, arg ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); } diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index be0ee30b7d832..9ae725f7b0d75 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -857,7 +857,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, s = ZSTR_VAL(resource->path); if (!ZSTR_LEN(resource->path)) { zend_string_release_ex(resource->path, 0); - resource->path = zend_string_init("/", 1, 0); + resource->path = ZSTR_INIT_LITERAL("/", 0); s = ZSTR_VAL(resource->path); } else { *s = '/'; diff --git a/ext/standard/password.c b/ext/standard/password.c index 30e524dafbb18..af1b68af1082d 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -497,14 +497,14 @@ static const php_password_algo* php_password_algo_find_zval(zend_string *arg_str #else case 2: { - zend_string *n = zend_string_init("argon2i", sizeof("argon2i")-1, 0); + zend_string *n = ZSTR_INIT_LITERAL("argon2i", 0); const php_password_algo* ret = php_password_algo_find(n); zend_string_release(n); return ret; } case 3: { - zend_string *n = zend_string_init("argon2id", sizeof("argon2id")-1, 0); + zend_string *n = ZSTR_INIT_LITERAL("argon2id", 0); const php_password_algo* ret = php_password_algo_find(n); zend_string_release(n); return ret; diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 2c4d5d3d263fb..adfec58e8dbee 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -112,7 +112,7 @@ static void userfilter_dtor(php_stream_filter *thisfilter) return; } - zend_string *func_name = zend_string_init("onclose", sizeof("onclose")-1, 0); + zend_string *func_name = ZSTR_INIT_LITERAL("onclose", 0); zend_call_method_if_exists(Z_OBJ_P(obj), func_name, &retval, 0, NULL); zend_string_release(func_name); @@ -313,7 +313,7 @@ static php_stream_filter *user_filter_factory_create(const char *filtername, } /* invoke the constructor */ - zend_string *func_name = zend_string_init("oncreate", sizeof("oncreate")-1, 0); + zend_string *func_name = ZSTR_INIT_LITERAL("oncreate", 0); zend_call_method_if_exists(Z_OBJ(obj), func_name, &retval, 0, NULL); zend_string_release(func_name); diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 8dbe6b27a113b..7f3d1e0e42170 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -359,7 +359,7 @@ PHP_METHOD(XSLTProcessor, importStylesheet) intern = Z_XSL_P(id); - member = zend_string_init("cloneDocument", sizeof("cloneDocument")-1, 0); + member = ZSTR_INIT_LITERAL("cloneDocument", 0); cloneDocu = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv); if (Z_TYPE_P(cloneDocu) != IS_NULL) { convert_to_long(cloneDocu); @@ -460,7 +460,7 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl ctxt = xsltNewTransformContext(style, doc); ctxt->_private = (void *) intern; - member = zend_string_init("doXInclude", sizeof("doXInclude")-1, 0); + member = ZSTR_INIT_LITERAL("doXInclude", 0); doXInclude = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv); if (Z_TYPE_P(doXInclude) != IS_NULL) { convert_to_long(doXInclude); diff --git a/main/SAPI.c b/main/SAPI.c index e71cba0fb1db2..2e697f9779669 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -801,7 +801,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg) * to disable compression altogether. This contributes to making scripts * portable between setups that have and don't have zlib compression * enabled globally. See req #44164 */ - zend_string *key = zend_string_init("zlib.output_compression", sizeof("zlib.output_compression")-1, 0); + zend_string *key = ZSTR_INIT_LITERAL("zlib.output_compression", 0); zend_alter_ini_entry_chars(key, "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); diff --git a/main/main.c b/main/main.c index d9defc974cc40..022f26bd5f435 100644 --- a/main/main.c +++ b/main/main.c @@ -1492,7 +1492,7 @@ PHP_FUNCTION(set_time_limit) new_timeout_strlen = zend_spprintf(&new_timeout_str, 0, ZEND_LONG_FMT, new_timeout); - key = zend_string_init("max_execution_time", sizeof("max_execution_time")-1, 0); + key = ZSTR_INIT_LITERAL("max_execution_time", 0); if (zend_alter_ini_entry_chars_ex(key, new_timeout_str, new_timeout_strlen, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0) == SUCCESS) { RETVAL_TRUE; } else { diff --git a/sapi/fpm/fpm/fpm_status.c b/sapi/fpm/fpm/fpm_status.c index 514d60d176e39..e78cbeab1105a 100644 --- a/sapi/fpm/fpm/fpm_status.c +++ b/sapi/fpm/fpm/fpm_status.c @@ -171,7 +171,7 @@ int fpm_status_handle_request(void) /* {{{ */ fpm_request_executing(); /* full status ? */ - _GET_str = zend_string_init("_GET", sizeof("_GET")-1, 0); + _GET_str = ZSTR_INIT_LITERAL("_GET", 0); full = (fpm_php_get_string_from_table(_GET_str, "full") != NULL); short_syntax = short_post = NULL; full_separator = full_pre = full_syntax = full_post = NULL; diff --git a/sapi/fuzzer/fuzzer-function-jit.c b/sapi/fuzzer/fuzzer-function-jit.c index c637bcfa608f6..bd99299984ae4 100644 --- a/sapi/fuzzer/fuzzer-function-jit.c +++ b/sapi/fuzzer/fuzzer-function-jit.c @@ -23,7 +23,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; } - zend_string *jit_option = zend_string_init("opcache.jit", sizeof("opcache.jit") - 1, 1); + zend_string *jit_option = ZSTR_INIT_LITERAL("opcache.jit", 1); /* First run without JIT to determine whether we bail out. We should not run JITed code if * we bail out here, as the JIT code may loop infinitely. */ diff --git a/sapi/fuzzer/fuzzer-tracing-jit.c b/sapi/fuzzer/fuzzer-tracing-jit.c index 585bf55304a44..7113bf0796913 100644 --- a/sapi/fuzzer/fuzzer-tracing-jit.c +++ b/sapi/fuzzer/fuzzer-tracing-jit.c @@ -23,7 +23,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; } - zend_string *jit_option = zend_string_init("opcache.jit", sizeof("opcache.jit") - 1, 1); + zend_string *jit_option = ZSTR_INIT_LITERAL("opcache.jit", 1); /* First run without JIT to determine whether we bail out. We should not run JITed code if * we bail out here, as the JIT code may loop infinitely. */ diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 79fae63507c16..46ad97f2bf335 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -702,7 +702,7 @@ static void lsapi_clean_shutdown(void) setitimer(ITIMER_PROF, &tmv, NULL); #if PHP_MAJOR_VERSION >= 7 - key = zend_string_init("error_reporting", 15, 1); + key = ZSTR_INIT_LITERAL("error_reporting", 1); zend_alter_ini_entry_chars_ex(key, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_SHUTDOWN, 1); zend_string_release(key); From 122f1287a07c43d79c2c934d79d67e3fe194470b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 20 Mar 2023 12:08:13 +0100 Subject: [PATCH 660/895] Fix GH-10885: Leaking stream_socket_server context `php_stream_context_set` already increases the refcount. Closes GH-10886 --- NEWS | 3 +++ ext/standard/streamsfuncs.c | 4 ---- ext/standard/tests/gh10885.phpt | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 ext/standard/tests/gh10885.phpt diff --git a/NEWS b/NEWS index 85bb5c240b715..01cf4ac6317a9 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,9 @@ PHP NEWS - SPL: . Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman) +- Standard: + . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) + 16 Mar 2023, PHP 8.1.17 - Core: diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 13f3ead5aecf8..188bcee885481 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -213,10 +213,6 @@ PHP_FUNCTION(stream_socket_server) context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); - if (context) { - GC_ADDREF(context->res); - } - if (zerrno) { ZEND_TRY_ASSIGN_REF_LONG(zerrno, 0); } diff --git a/ext/standard/tests/gh10885.phpt b/ext/standard/tests/gh10885.phpt new file mode 100644 index 0000000000000..167b832aa25ad --- /dev/null +++ b/ext/standard/tests/gh10885.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10885: stream_socket_server context leaks +--FILE-- + +--EXPECTF-- +resource(%d) of type (stream-context) refcount(2) +resource(%d) of type (stream-context) refcount(3) +resource(%d) of type (stream-context) refcount(2) From f89a67ea00d48a6bfa14b90e6bb984614b2d2b05 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 31 May 2022 16:32:31 -0500 Subject: [PATCH 661/895] add a basic CODEOWNERS file Closes GH-8670 --- CODEOWNERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000000..9893ca8bd766d --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,12 @@ +# The following volunteers have self-identified as subject matter experts +# or interested parties over a particular area of the php-src source code. +# While requesting a review from someone does not obligate that person to +# review a pull request, these reviewers might have valuable knowledge of +# the problem area and could aid in deciding whether a pull request is ready +# for merging. +# +# For more information, see the GitHub CODEOWNERS documentation: +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners + +/ext/opcache @iluuu1994 +/Zend @iluuu1994 From e73d8de7849da83ede42a00eb5cde8221763210c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 20 Mar 2023 19:11:59 +0100 Subject: [PATCH 662/895] CODEOWNERS: Add myself to ext/random --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 9893ca8bd766d..ee2ee16d31eea 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -9,4 +9,5 @@ # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners /ext/opcache @iluuu1994 +/ext/random @TimWolla /Zend @iluuu1994 From 90d4a1e980e3bfcd0338e28378fb0949fbad1faf Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 20 Mar 2023 19:11:45 +0100 Subject: [PATCH 663/895] [skip ci] Add @iluuu1994 as CODEOWNER of /.github --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index ee2ee16d31eea..87f1e79d22256 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,6 +8,7 @@ # For more information, see the GitHub CODEOWNERS documentation: # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners +/.github @iluuu1994 /ext/opcache @iluuu1994 /ext/random @TimWolla /Zend @iluuu1994 From 6879c987ae3bd4de86cf8e1d069a58fd4a46c778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 20 Mar 2023 19:23:28 +0100 Subject: [PATCH 664/895] [skip ci] Update ext/random year for myself in EXTENSIONS --- EXTENSIONS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXTENSIONS b/EXTENSIONS index 1d07c1c2e9516..4e480854a8fdd 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -428,7 +428,7 @@ SINCE: 4.0.2 ------------------------------------------------------------------------------- EXTENSION: random PRIMARY MAINTAINER Go Kudo (2022 - 2022) - Tim Düsterhus (2022 - 2022) + Tim Düsterhus (2022 - 2023) MAINTENANCE: Maintained STATUS: Working SINCE: 8.2.0 From c407243712c0086ee6db70f83d200a14e61f08dc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 19 Mar 2023 22:11:09 +0100 Subject: [PATCH 665/895] Fix GH-10052: Browscap crashes PHP 8.1.12 on request shutdown (apache2) get_browser() implements a lazy parse system for the browscap INI configuration. There are two possible moments when a browscap configuration can be loaded: during module startup or during request. In case of module startup, the strings are persistent strings, while for the request they are not. The INI parser must therefore know whether to create persistent or non-persistent strings. It does this by looking at CG(ini_parser_unbuffered_errors). If that value is 1 it's persistent, otherwise non-persistent. Note that this also controls how the errors are reported: if it's 1 then the errors are sent to stderr, otherwise we get E_WARNINGs. Currently, a hardcoded value of 1 is always used for that CG value in browscap_read_file(). This means we'll always create persistent strings *and* we'll not report parse errors correctly as E_WARNINGs. We fix both the crash and the lack of warnings by passing the value of persistent instead of a hardcoded 1. This is also in line with how other INI parsing code is called in ext/standard: they also make sure that during request a value of 0 is passed. Closes GH-10883. --- NEWS | 2 ++ ext/standard/browscap.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 01cf4ac6317a9..c3a3dfbbe2a58 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,8 @@ PHP NEWS - Standard: . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) + . Fixed bug GH-10052 (Browscap crashes PHP 8.1.12 on request shutdown + (apache2)). (nielsdos) 16 Mar 2023, PHP 8.1.17 diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 490acac2f99a5..53504098fb85a 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -432,7 +432,7 @@ static int browscap_read_file(char *filename, browser_data *browdata, int persis ctx.current_section_name = NULL; zend_hash_init(&ctx.str_interned, 8, NULL, str_interned_dtor, persistent); - zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_RAW, + zend_parse_ini_file(&fh, persistent, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t) php_browscap_parser_cb, &ctx); /* Destroy parser context */ From 301418284dba6f4933f8069b4f21d0c0fbf72d91 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 6 Feb 2023 22:53:29 +0100 Subject: [PATCH 666/895] Fix GH-10521: ftp_get/ftp_nb_get resumepos offset is maximum 10GB The char arrays were too small for a long on 64-bit systems, which resulted in cutting off the string at the end with a NUL byte. Use a size of MAX_LENGTH_OF_LONG to fix this issue instead of a fixed size of 11 chars. Closes GH-10525. --- NEWS | 2 ++ ext/ftp/ftp.c | 8 ++++---- ext/ftp/tests/gh10521.phpt | 39 ++++++++++++++++++++++++++++++++++++++ ext/ftp/tests/server.inc | 4 ++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 ext/ftp/tests/gh10521.phpt diff --git a/NEWS b/NEWS index c3a3dfbbe2a58..cfc752ccf2119 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ PHP NEWS - FTP: . Propagate success status of ftp_close(). (nielsdos) + . Fixed bug GH-10521 (ftp_get/ftp_nb_get resumepos offset is maximum 10GB). + (nielsdos) - Opcache: . Fixed build for macOS to cater with pkg-config settings. (David Carlier) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index ef91fdec97988..09367097cdb5d 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -867,7 +867,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t pat { databuf_t *data = NULL; size_t rcvd; - char arg[11]; + char arg[MAX_LENGTH_OF_LONG]; if (ftp == NULL) { return 0; @@ -964,7 +964,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *inst zend_long size; char *ptr; int ch; - char arg[11]; + char arg[MAX_LENGTH_OF_LONG]; if (ftp == NULL) { return 0; @@ -2057,7 +2057,7 @@ int ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t path_len, ftptype_t type, zend_long resumepos) { databuf_t *data = NULL; - char arg[11]; + char arg[MAX_LENGTH_OF_LONG]; if (ftp == NULL) { return PHP_FTP_FAILED; @@ -2176,7 +2176,7 @@ int ftp_nb_put(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type, zend_long startpos) { databuf_t *data = NULL; - char arg[11]; + char arg[MAX_LENGTH_OF_LONG]; if (ftp == NULL) { return 0; diff --git a/ext/ftp/tests/gh10521.phpt b/ext/ftp/tests/gh10521.phpt new file mode 100644 index 0000000000000..1dc40d4004271 --- /dev/null +++ b/ext/ftp/tests/gh10521.phpt @@ -0,0 +1,39 @@ +--TEST-- +GH-10521 (ftp_get/ftp_nb_get resumepos offset is maximum 10GB) +--EXTENSIONS-- +ftp +pcntl +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +bool(true) + +%s: ftp_fget(): Can't open data connection (12345678910). in %s on line %d + +%s: ftp_fget(): Can't open data connection (9223372036854775807). in %s on line %d diff --git a/ext/ftp/tests/server.inc b/ext/ftp/tests/server.inc index b08eaf8af4d10..612cb4fd9a846 100644 --- a/ext/ftp/tests/server.inc +++ b/ext/ftp/tests/server.inc @@ -387,6 +387,10 @@ if ($pid) { case "/bug73457": fputs($s, "150 File status okay; about to open data connection.\r\n"); break; + case "gh10521": + // Just a side channel for getting the received file size. + fputs($s, "425 Can't open data connection (".$GLOBALS['rest_pos'].").\r\n"); + break; default: fputs($s, "550 {$matches[1]}: No such file or directory \r\n"); From b698108133f5403bb440bc94dbebe92ff487e667 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Mar 2023 07:40:29 +0300 Subject: [PATCH 667/895] CODEOWNERS: Add myself as an owner of ext/ffi, ext/opcache and the core Zend files --- CODEOWNERS | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 87f1e79d22256..b0b0e5fea01b8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -9,6 +9,25 @@ # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners /.github @iluuu1994 -/ext/opcache @iluuu1994 +/ext/ffi @dstogov +/ext/opcache @dstogov @iluuu1994 /ext/random @TimWolla /Zend @iluuu1994 +/Zend/Optimizer @dstogov +/Zend/zend.* @dstogov +/Zend/zend_alloc.* @dstogov +/Zend/zend_API.* @dstogov +/Zend/zend_closures.* @dstogov +/Zend/zend_execute.* @dstogov +/Zend/zend_execute_API.c @dstogov +/Zend/zend_gc.* @dstogov +/Zend/zend_hash.* @dstogov +/Zend/zend_inheritance.* @dstogov +/Zend/zend_object_handlers.* @dstogov +/Zend/zend_objects.* @dstogov +/Zend/zend_objects_API.* @dstogov +/Zend/zend_opcode.* @dstogov +/Zend/zend_string.* @dstogov +/Zend/zend_type*.h @dstogov +/Zend/zend_variables.* @dstogov +/Zend/zend_vm* @dstogov From 9b220cf113f7840c45049ab7ccb94f09e4cd2dfa Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 21 Mar 2023 11:41:43 +0100 Subject: [PATCH 668/895] [skip ci] Make Tim CODEOWNER of /.github --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index b0b0e5fea01b8..8043260f107c9 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,7 +8,7 @@ # For more information, see the GitHub CODEOWNERS documentation: # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -/.github @iluuu1994 +/.github @iluuu1994 @TimWolla /ext/ffi @dstogov /ext/opcache @dstogov @iluuu1994 /ext/random @TimWolla From 3deba4c2e8d3febdf5f613a5d8ca48b19c435480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 21 Mar 2023 11:52:52 +0100 Subject: [PATCH 669/895] Update assertion about unsupported property types --- Zend/zend_execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index d7d41937867c9..74403e468735f 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -987,7 +987,7 @@ static zend_always_inline bool i_zend_check_property_type(const zend_property_in } uint32_t type_mask = ZEND_TYPE_FULL_MASK(info->type); - ZEND_ASSERT(!(type_mask & (MAY_BE_CALLABLE|MAY_BE_STATIC))); + ZEND_ASSERT(!(type_mask & (MAY_BE_CALLABLE|MAY_BE_STATIC|MAY_BE_NEVER|MAY_BE_VOID))); return zend_verify_scalar_type_hint(type_mask, property, strict, 0); } From b6ceae30c28f1b758349725d8d5bf4c3fa5ff567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 21 Mar 2023 12:00:02 +0100 Subject: [PATCH 670/895] [skip ci] Add myself as code owner of stubs --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 8043260f107c9..8ec78eb683479 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -31,3 +31,5 @@ /Zend/zend_type*.h @dstogov /Zend/zend_variables.* @dstogov /Zend/zend_vm* @dstogov +/build/gen_stub.php @kocsismate +*.stub.php @kocsismate From cb462dc6e3c1b1802049aeeb12a2c1b435ec1582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 21 Mar 2023 16:45:10 +0100 Subject: [PATCH 671/895] [skip ci] Reorder rules alphabetically --- CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 8ec78eb683479..1ea193c4f627b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,7 +8,9 @@ # For more information, see the GitHub CODEOWNERS documentation: # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners +*.stub.php @kocsismate /.github @iluuu1994 @TimWolla +/build/gen_stub.php @kocsismate /ext/ffi @dstogov /ext/opcache @dstogov @iluuu1994 /ext/random @TimWolla @@ -31,5 +33,3 @@ /Zend/zend_type*.h @dstogov /Zend/zend_variables.* @dstogov /Zend/zend_vm* @dstogov -/build/gen_stub.php @kocsismate -*.stub.php @kocsismate From 1a2fdeb0c616478743738748d3719085ec3d083a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 21 Mar 2023 17:08:23 +0000 Subject: [PATCH 672/895] [skip ci] Add myself as CODEOWNER for a couple of extensions Mainly because I'm the one who's touched them the most recently and has a vague idea how these extensions work. --- CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 1ea193c4f627b..b4f3375d30715 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,9 +11,14 @@ *.stub.php @kocsismate /.github @iluuu1994 @TimWolla /build/gen_stub.php @kocsismate +/ext/dba @Girgias /ext/ffi @dstogov +/ext/gmp @Girgias +/ext/imap @Girgias /ext/opcache @dstogov @iluuu1994 /ext/random @TimWolla +/ext/session @Girgias +/ext/spl @Girgias /Zend @iluuu1994 /Zend/Optimizer @dstogov /Zend/zend.* @dstogov From 0842b13e5c4cea3ed27a00cb05ced89a6a5220ec Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 21 Mar 2023 19:17:06 +0100 Subject: [PATCH 673/895] [skip ci] Add CONFLICTS file for curl tests --- ext/curl/tests/CONFLICTS | 1 + 1 file changed, 1 insertion(+) create mode 100644 ext/curl/tests/CONFLICTS diff --git a/ext/curl/tests/CONFLICTS b/ext/curl/tests/CONFLICTS new file mode 100644 index 0000000000000..13368f82902d8 --- /dev/null +++ b/ext/curl/tests/CONFLICTS @@ -0,0 +1 @@ +curl From 5342e0ee4bc350c2fc7ceeb78175054a98f2ac9d Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Tue, 21 Mar 2023 18:30:33 +0000 Subject: [PATCH 674/895] [skip ci] Add myself in CODEOWNERS for few extensions (#10903) --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index b4f3375d30715..33b7ed0c0144d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,8 +16,10 @@ /ext/gmp @Girgias /ext/imap @Girgias /ext/opcache @dstogov @iluuu1994 +/ext/pgsql @devnexen /ext/random @TimWolla /ext/session @Girgias +/ext/sockets @devnexen /ext/spl @Girgias /Zend @iluuu1994 /Zend/Optimizer @dstogov From b5262218d4ab17d0f30e6e9f868c75bb6dd0c6f5 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 21 Mar 2023 18:38:43 +0000 Subject: [PATCH 675/895] Add myself for ext/date --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 33b7ed0c0144d..b320888505a35 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -12,6 +12,7 @@ /.github @iluuu1994 @TimWolla /build/gen_stub.php @kocsismate /ext/dba @Girgias +/ext/date @derickr /ext/ffi @dstogov /ext/gmp @Girgias /ext/imap @Girgias From 4fe91fc8614b6de011b5d0c489ce0926a4282883 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 21 Mar 2023 23:01:26 +0100 Subject: [PATCH 676/895] [skip ci] Fix CODEOWNERS sorting The alphabet is hard :stuck_out_tongue_winking_eye: --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index b320888505a35..138217a254d0a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,8 +11,8 @@ *.stub.php @kocsismate /.github @iluuu1994 @TimWolla /build/gen_stub.php @kocsismate -/ext/dba @Girgias /ext/date @derickr +/ext/dba @Girgias /ext/ffi @dstogov /ext/gmp @Girgias /ext/imap @Girgias From ca6704c4e9e920801b1d31424fb266146d03d8fa Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Wed, 22 Mar 2023 00:13:17 -0400 Subject: [PATCH 677/895] [skip ci] Add myself in CODEOWNERS for curl --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 138217a254d0a..f2028f171806b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,6 +11,7 @@ *.stub.php @kocsismate /.github @iluuu1994 @TimWolla /build/gen_stub.php @kocsismate +/ext/curl @adoy /ext/date @derickr /ext/dba @Girgias /ext/ffi @dstogov From 7eee0d1bc7b10b45af6df8766c4d2ad40a50a813 Mon Sep 17 00:00:00 2001 From: Tony Su Date: Wed, 22 Mar 2023 18:16:29 +0800 Subject: [PATCH 678/895] [Zend]: Remove unused code in MAKE_NOP macro (#10906) Prefer to see clean code. In MAKE_NOP macro, op.num is first set to 0, but immediately set to -1 by SET_UNUSED macro, which invalidates previous set-to-zero code. So clean the code to make it look nice and neat. Signed-off-by: Tony Su --- Zend/zend_compile.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 8ff8ab0f509fb..f9fcfa6649b80 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -34,9 +34,6 @@ } while (0) #define MAKE_NOP(opline) do { \ - (opline)->op1.num = 0; \ - (opline)->op2.num = 0; \ - (opline)->result.num = 0; \ (opline)->opcode = ZEND_NOP; \ SET_UNUSED((opline)->op1); \ SET_UNUSED((opline)->op2); \ From 6a6e91f3c7abf161ac92d84b2835c38c1ade6294 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:26:42 +0100 Subject: [PATCH 679/895] Shrink some commonly used structs by reordering members (#10880) Struct members require some alignment based on their type. This means that if a struct member is not aligned, there will be a hole created by the compiler in the struct, which is wasted space. This patch reorders some of the most commonly used structs, but in such a way that the fields which were in the same cache line still belong together. The only exception to this is exception_ignore_args, which was temporally not close to nearby members, and as such I placed it further up to close a hole. On 64-bit Linux this gives us the following shrinks: * zend_op_array: 248 -> 240 * zend_ssa_var: 56 -> 48 * zend_ssa_var_info: 48 -> 40 * php_core_globals: 672 -> 608 * zend_executor_globals: 1824 -> 1792 On 32-bit, the sizes will either remain the same or will result in smaller shrinks. --- UPGRADING.INTERNALS | 3 +++ Zend/Optimizer/zend_ssa.h | 18 +++++++++--------- Zend/zend_compile.h | 6 +++--- Zend/zend_execute.c | 2 +- Zend/zend_globals.h | 20 +++++++++++--------- main/php_globals.h | 40 ++++++++++++++++++++------------------- 6 files changed, 48 insertions(+), 41 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 487a2ac147e00..4ec7cc5271191 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -39,6 +39,9 @@ PHP 8.3 INTERNALS UPGRADE NOTES - zend_fiber_init_context() * The fast_add_function() has been removed, use add_function() that will call the static inline add_function_fast() instead. +* The order of members of zend_op_array, zend_ssa_var, zend_ssa_var_info, + zend_executor_globals and php_core_globals have changed to improve + struct packing which reduces their size. ======================== 2. Build system changes diff --git a/Zend/Optimizer/zend_ssa.h b/Zend/Optimizer/zend_ssa.h index ce33a3732fee8..1867653184858 100644 --- a/Zend/Optimizer/zend_ssa.h +++ b/Zend/Optimizer/zend_ssa.h @@ -110,8 +110,8 @@ typedef struct _zend_ssa_var { int var; /* original var number; op.var for CVs and following numbers for VARs and TMP_VARs */ int scc; /* strongly connected component */ int definition; /* opcode that defines this value */ - zend_ssa_phi *definition_phi; /* phi that defines this value */ int use_chain; /* uses of this value, linked through opN_use_chain */ + zend_ssa_phi *definition_phi; /* phi that defines this value */ zend_ssa_phi *phi_use_chain; /* uses of this value in Phi, linked through use_chain */ zend_ssa_phi *sym_use_chain; /* uses of this value in Pi constraints */ unsigned int no_val : 1; /* value doesn't matter (used as op1 in ZEND_ASSIGN) */ @@ -122,16 +122,16 @@ typedef struct _zend_ssa_var { typedef struct _zend_ssa_var_info { uint32_t type; /* inferred type (see zend_inference.h) */ + bool has_range : 1; + bool is_instanceof : 1; /* 0 - class == "ce", 1 - may be child of "ce" */ + bool recursive : 1; + bool use_as_double : 1; + bool delayed_fetch_this : 1; + bool avoid_refcounting : 1; + bool guarded_reference : 1; + bool indirect_reference : 1; /* IS_INDIRECT returned by FETCH_DIM_W/FETCH_OBJ_W */ zend_ssa_range range; zend_class_entry *ce; - unsigned int has_range : 1; - unsigned int is_instanceof : 1; /* 0 - class == "ce", 1 - may be child of "ce" */ - unsigned int recursive : 1; - unsigned int use_as_double : 1; - unsigned int delayed_fetch_this : 1; - unsigned int avoid_refcounting : 1; - unsigned int guarded_reference : 1; - unsigned int indirect_reference : 1; /* IS_INDIRECT returned by FETCH_DIM_W/FETCH_OBJ_W */ } zend_ssa_var_info; typedef struct _zend_ssa { diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index f9fcfa6649b80..31ed95f675188 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -448,8 +448,8 @@ struct _zend_op_array { uint32_t required_num_args; zend_arg_info *arg_info; HashTable *attributes; - uint32_t T; /* number of temporary variables */ ZEND_MAP_PTR_DEF(void **, run_time_cache); + uint32_t T; /* number of temporary variables */ /* END of common elements */ int cache_size; /* number of run_time_cache_slots * sizeof(void*) */ @@ -503,8 +503,8 @@ typedef struct _zend_internal_function { uint32_t required_num_args; zend_internal_arg_info *arg_info; HashTable *attributes; - uint32_t T; /* number of temporary variables */ ZEND_MAP_PTR_DEF(void **, run_time_cache); + uint32_t T; /* number of temporary variables */ /* END of common elements */ zif_handler handler; @@ -529,8 +529,8 @@ union _zend_function { uint32_t required_num_args; zend_arg_info *arg_info; /* index -1 represents the return value info, if any */ HashTable *attributes; - uint32_t T; /* number of temporary variables */ ZEND_MAP_PTR_DEF(void **, run_time_cache); + uint32_t T; /* number of temporary variables */ } common; zend_op_array op_array; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 74403e468735f..abe3b8042c96e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -145,8 +145,8 @@ ZEND_API const zend_internal_function zend_pass_function = { 0, /* required_num_args */ (zend_internal_arg_info *) zend_pass_function_arg_info + 1, /* arg_info */ NULL, /* attributes */ - 0, /* T */ NULL, /* run_time_cache */ + 0, /* T */ ZEND_FN(pass), /* handler */ NULL, /* module */ {NULL,NULL,NULL,NULL} /* reserved */ diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 71f1f8168ba7c..8900a5f416f53 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -193,22 +193,24 @@ struct _zend_executor_globals { uint32_t jit_trace_num; /* Used by tracing JIT to reference the currently running trace */ - zend_long precision; - int ticks_count; + zend_long precision; + uint32_t persistent_constants_count; uint32_t persistent_functions_count; uint32_t persistent_classes_count; - HashTable *in_autoload; - bool full_tables_cleanup; - /* for extended information support */ bool no_extensions; + bool full_tables_cleanup; + zend_atomic_bool vm_interrupt; zend_atomic_bool timed_out; + + HashTable *in_autoload; + zend_long hard_timeout; void *stack_base; void *stack_limit; @@ -221,20 +223,21 @@ struct _zend_executor_globals { HashTable persistent_list; int user_error_handler_error_reporting; + bool exception_ignore_args; zval user_error_handler; zval user_exception_handler; zend_stack user_error_handlers_error_reporting; zend_stack user_error_handlers; zend_stack user_exception_handlers; - zend_error_handling_t error_handling; zend_class_entry *exception_class; + zend_error_handling_t error_handling; + + int capture_warnings_during_sccp; /* timeout support */ zend_long timeout_seconds; - int capture_warnings_during_sccp; - HashTable *ini_directives; HashTable *modified_ini_directives; zend_ini_entry *error_reporting_ini_entry; @@ -266,7 +269,6 @@ struct _zend_executor_globals { HashTable weakrefs; - bool exception_ignore_args; zend_long exception_string_param_max_len; zend_get_gc_buffer get_gc_buffer; diff --git a/main/php_globals.h b/main/php_globals.h index d5e372cf2b408..d62516f9d6833 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -53,12 +53,19 @@ typedef struct _arg_separators { } arg_separators; struct _php_core_globals { - bool implicit_flush; - zend_long output_buffering; + bool implicit_flush; + bool enable_dl; + uint8_t display_errors; + bool display_startup_errors; + bool log_errors; + bool ignore_repeated_errors; + bool ignore_repeated_source; + bool report_memleaks; + char *output_handler; char *unserialize_callback_func; @@ -67,12 +74,6 @@ struct _php_core_globals { zend_long memory_limit; zend_long max_input_time; - uint8_t display_errors; - bool display_startup_errors; - bool log_errors; - bool ignore_repeated_errors; - bool ignore_repeated_source; - bool report_memleaks; char *error_log; char *doc_root; @@ -116,12 +117,12 @@ struct _php_core_globals { bool register_argc_argv; bool auto_globals_jit; - char *docref_root; - char *docref_ext; - bool html_errors; bool xmlrpc_errors; + char *docref_root; + char *docref_ext; + zend_long xmlrpc_error_number; bool activated_auto_globals[8]; @@ -134,39 +135,40 @@ struct _php_core_globals { bool report_zend_debug; int last_error_type; + int last_error_lineno; zend_string *last_error_message; zend_string *last_error_file; - int last_error_lineno; char *php_sys_temp_dir; char *disable_classes; - bool allow_url_include; -#ifdef PHP_WIN32 - bool com_initialized; -#endif zend_long max_input_nesting_level; zend_long max_input_vars; - bool in_user_include; char *user_ini_filename; zend_long user_ini_cache_ttl; char *request_order; + char *mail_log; bool mail_x_header; bool mail_mixed_lf_and_crlf; - char *mail_log; bool in_error_log; + bool allow_url_include; +#ifdef PHP_WIN32 + bool com_initialized; +#endif + bool in_user_include; + #ifdef PHP_WIN32 bool windows_show_crt_warning; #endif + bool have_called_openlog; zend_long syslog_facility; char *syslog_ident; - bool have_called_openlog; zend_long syslog_filter; zend_long error_log_mode; }; From ac961bbb1d5ef2b272c0e2d2db6fa0d2bc876684 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 18 Mar 2023 00:08:11 +0100 Subject: [PATCH 680/895] Implement better diff for run-tests.php Borrow sebastianbergmann/diff with MemoryEfficientLongestCommonSubsequenceCalculator Fixes GH-10806 Closes GH-10875 --- run-tests.php | 546 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 327 insertions(+), 219 deletions(-) diff --git a/run-tests.php b/run-tests.php index 4bc4dca3200aa..d6436df7e6fad 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2612,49 +2612,7 @@ function run_test(string $php, $file, array $env): string $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if ($test->hasSection('EXPECTF')) { - // do preg_quote, but miss out any %r delimited sections - $temp = ""; - $r = "%r"; - $startOffset = 0; - $length = strlen($wanted_re); - while ($startOffset < $length) { - $start = strpos($wanted_re, $r, $startOffset); - if ($start !== false) { - // we have found a start tag - $end = strpos($wanted_re, $r, $start + 2); - if ($end === false) { - // unbalanced tag, ignore it. - $end = $start = $length; - } - } else { - // no more %r sections - $start = $end = $length; - } - // quote a non re portion of the string - $temp .= preg_quote(substr($wanted_re, $startOffset, $start - $startOffset), '/'); - // add the re unquoted. - if ($end > $start) { - $temp .= '(' . substr($wanted_re, $start + 2, $end - $start - 2) . ')'; - } - $startOffset = $end + 2; - } - $wanted_re = $temp; - - // Stick to basics - $wanted_re = strtr($wanted_re, [ - '%e' => preg_quote(DIRECTORY_SEPARATOR, '/'), - '%s' => '[^\r\n]+', - '%S' => '[^\r\n]*', - '%a' => '.+', - '%A' => '.*', - '%w' => '\s*', - '%i' => '[+-]?\d+', - '%d' => '\d+', - '%x' => '[0-9a-fA-F]+', - '%f' => '[+-]?(?:\d+|(?=\.\d))(?:\.\d+)?(?:[Ee][+-]?\d+)?', - '%c' => '.', - '%0' => '\x00', - ]); + $wanted_re = expectf_to_regex($wanted_re); } if (preg_match('/^' . $wanted_re . '$/s', $output)) { @@ -2845,20 +2803,54 @@ function run_test(string $php, $file, array $env): string return $restype[0] . 'ED'; } -/** - * Map "Zend OPcache" to "opcache" and convert all ext names to lowercase. - */ -function remap_loaded_extensions_names(array $names): array +function expectf_to_regex(?string $wanted): string { - $exts = []; - foreach ($names as $name) { - if ($name === 'Core') { - continue; - } - $exts[] = ['Zend OPcache' => 'opcache'][$name] ?? strtolower($name); - } - - return $exts; + $wanted_re = $wanted ?? ''; + + $wanted_re = preg_replace('/\r\n/', "\n", $wanted_re); + + // do preg_quote, but miss out any %r delimited sections + $temp = ""; + $r = "%r"; + $startOffset = 0; + $length = strlen($wanted_re); + while ($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { + // we have found a start tag + $end = strpos($wanted_re, $r, $start + 2); + if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; + } + } else { + // no more %r sections + $start = $end = $length; + } + // quote a non re portion of the string + $temp .= preg_quote(substr($wanted_re, $startOffset, $start - $startOffset), '/'); + // add the re unquoted. + if ($end > $start) { + $temp .= '(' . substr($wanted_re, $start + 2, $end - $start - 2) . ')'; + } + $startOffset = $end + 2; + } + $wanted_re = $temp; + + return strtr($wanted_re, [ + '%e' => preg_quote(DIRECTORY_SEPARATOR, '/'), + '%s' => '[^\r\n]+', + '%S' => '[^\r\n]*', + '%a' => '.+', + '%A' => '.*', + '%w' => '\s*', + '%i' => '[+-]?\d+', + '%d' => '\d+', + '%x' => '[0-9a-fA-F]+', + '%f' => '[+-]?(?:\d+|(?=\.\d))(?:\.\d+)?(?:[Ee][+-]?\d+)?', + '%c' => '.', + '%0' => '\x00', + ]); } /** @@ -2873,171 +2865,20 @@ function comp_line(string $l1, string $l2, bool $is_reg) return !strcmp($l1, $l2); } -function count_array_diff( - array $ar1, - array $ar2, - bool $is_reg, - array $w, - int $idx1, - int $idx2, - int $cnt1, - int $cnt2, - int $steps -): int { - $equal = 0; - - while ($idx1 < $cnt1 && $idx2 < $cnt2 && comp_line($ar1[$idx1], $ar2[$idx2], $is_reg)) { - $idx1++; - $idx2++; - $equal++; - $steps--; - } - if (--$steps > 0) { - $eq1 = 0; - $st = $steps / 2; - - for ($ofs1 = $idx1 + 1; $ofs1 < $cnt1 && $st-- > 0; $ofs1++) { - $eq = @count_array_diff($ar1, $ar2, $is_reg, $w, $ofs1, $idx2, $cnt1, $cnt2, $st); - - if ($eq > $eq1) { - $eq1 = $eq; - } - } - - $eq2 = 0; - $st = $steps; - - for ($ofs2 = $idx2 + 1; $ofs2 < $cnt2 && $st-- > 0; $ofs2++) { - $eq = @count_array_diff($ar1, $ar2, $is_reg, $w, $idx1, $ofs2, $cnt1, $cnt2, $st); - if ($eq > $eq2) { - $eq2 = $eq; - } - } - - if ($eq1 > $eq2) { - $equal += $eq1; - } elseif ($eq2 > 0) { - $equal += $eq2; - } - } - - return $equal; -} - -function generate_array_diff(array $ar1, array $ar2, bool $is_reg, array $w): array +/** + * Map "Zend OPcache" to "opcache" and convert all ext names to lowercase. + */ +function remap_loaded_extensions_names(array $names): array { - global $context_line_count; - $idx1 = 0; - $cnt1 = @count($ar1); - $idx2 = 0; - $cnt2 = @count($ar2); - $diff = []; - $old1 = []; - $old2 = []; - $number_len = max(3, strlen((string)max($cnt1 + 1, $cnt2 + 1))); - $line_number_spec = '%0' . $number_len . 'd'; - - /** Mapping from $idx2 to $idx1, including indexes of idx2 that are identical to idx1 as well as entries that don't have matches */ - $mapping = []; - - while ($idx1 < $cnt1 && $idx2 < $cnt2) { - $mapping[$idx2] = $idx1; - if (comp_line($ar1[$idx1], $ar2[$idx2], $is_reg)) { - $idx1++; - $idx2++; + $exts = []; + foreach ($names as $name) { + if ($name === 'Core') { continue; } - - $c1 = @count_array_diff($ar1, $ar2, $is_reg, $w, $idx1 + 1, $idx2, $cnt1, $cnt2, 10); - $c2 = @count_array_diff($ar1, $ar2, $is_reg, $w, $idx1, $idx2 + 1, $cnt1, $cnt2, 10); - - if ($c1 > $c2) { - $old1[$idx1] = sprintf("{$line_number_spec}- ", $idx1 + 1) . $w[$idx1++]; - } elseif ($c2 > 0) { - $old2[$idx2] = sprintf("{$line_number_spec}+ ", $idx2 + 1) . $ar2[$idx2++]; - } else { - $old1[$idx1] = sprintf("{$line_number_spec}- ", $idx1 + 1) . $w[$idx1++]; - $old2[$idx2] = sprintf("{$line_number_spec}+ ", $idx2 + 1) . $ar2[$idx2++]; - } - $last_printed_context_line = $idx1; - } - $mapping[$idx2] = $idx1; - - reset($old1); - $k1 = key($old1); - $l1 = -2; - reset($old2); - $k2 = key($old2); - $l2 = -2; - $old_k1 = -1; - $add_context_lines = function (int $new_k1) use (&$old_k1, &$diff, $w, $context_line_count, $number_len) { - if ($old_k1 >= $new_k1 || !$context_line_count) { - return; - } - $end = $new_k1 - 1; - $range_end = min($end, $old_k1 + $context_line_count); - if ($old_k1 >= 0) { - while ($old_k1 < $range_end) { - $diff[] = str_repeat(' ', $number_len + 2) . $w[$old_k1++]; - } - } - if ($end - $context_line_count > $old_k1) { - $old_k1 = $end - $context_line_count; - if ($old_k1 > 0) { - // Add a '--' to mark sections where the common areas were truncated - $diff[] = '--'; - } - } - $old_k1 = max($old_k1, 0); - while ($old_k1 < $end) { - $diff[] = str_repeat(' ', $number_len + 2) . $w[$old_k1++]; - } - $old_k1 = $new_k1; - }; - - while ($k1 !== null || $k2 !== null) { - if ($k1 == $l1 + 1 || $k2 === null) { - $add_context_lines($k1); - $l1 = $k1; - $diff[] = current($old1); - $old_k1 = $k1; - $k1 = next($old1) ? key($old1) : null; - } elseif ($k2 == $l2 + 1 || $k1 === null) { - $add_context_lines($mapping[$k2]); - $l2 = $k2; - $diff[] = current($old2); - $k2 = next($old2) ? key($old2) : null; - } elseif ($k1 < $mapping[$k2]) { - $add_context_lines($k1); - $l1 = $k1; - $diff[] = current($old1); - $k1 = next($old1) ? key($old1) : null; - } else { - $add_context_lines($mapping[$k2]); - $l2 = $k2; - $diff[] = current($old2); - $k2 = next($old2) ? key($old2) : null; - } - } - - while ($idx1 < $cnt1) { - $add_context_lines($idx1 + 1); - $diff[] = sprintf("{$line_number_spec}- ", $idx1 + 1) . $w[$idx1++]; - } - - while ($idx2 < $cnt2) { - if (isset($mapping[$idx2])) { - $add_context_lines($mapping[$idx2] + 1); - } - $diff[] = sprintf("{$line_number_spec}+ ", $idx2 + 1) . $ar2[$idx2++]; - } - $add_context_lines(min($old_k1 + $context_line_count + 1, $cnt1 + 1)); - if ($context_line_count && $old_k1 < $cnt1 + 1) { - // Add a '--' to mark sections where the common areas were truncated - $diff[] = '--'; + $exts[] = ['Zend OPcache' => 'opcache'][$name] ?? strtolower($name); } - return $diff; + return $exts; } function generate_diff_external(string $diff_cmd, string $exp_file, string $output_file): string @@ -3051,10 +2892,17 @@ function generate_diff(string $wanted, ?string $wanted_re, string $output): stri { $w = explode("\n", $wanted); $o = explode("\n", $output); - $r = is_null($wanted_re) ? $w : explode("\n", $wanted_re); - $diff = generate_array_diff($r, $o, !is_null($wanted_re), $w); + $is_regex = $wanted_re !== null; - return implode(PHP_EOL, $diff); + $differ = new Differ(function ($expected, $new) use ($is_regex) { + if (!$is_regex) { + return $expected === $new; + } + $regex = '/^' . expectf_to_regex($expected). '$/s'; + return preg_match($regex, $new); + }); + $result = $differ->diff($w, $o); + return $result; } function error(string $message): void @@ -4083,4 +3931,264 @@ function bless_failed_tests(array $failedTests): void proc_open($args, [], $pipes); } +/* + * BSD 3-Clause License + * + * Copyright (c) 2002-2023, Sebastian Bergmann + * All rights reserved. + * + * This file is part of sebastian/diff. + * https://github.com/sebastianbergmann/diff + */ + +final class Differ +{ + public const OLD = 0; + public const ADDED = 1; + public const REMOVED = 2; + private $outputBuilder; + private $isEqual; + + public function __construct(callable $isEqual) + { + $this->outputBuilder = new DiffOutputBuilder; + $this->isEqual = $isEqual; + } + + public function diff(array $from, array $to): string + { + $diff = $this->diffToArray($from, $to); + + return $this->outputBuilder->getDiff($diff); + } + + public function diffToArray(array $from, array $to): array + { + $fromLine = 1; + $toLine = 1; + + [$from, $to, $start, $end] = $this->getArrayDiffParted($from, $to); + + $common = $this->calculateCommonSubsequence(array_values($from), array_values($to)); + $diff = []; + + foreach ($start as $token) { + $diff[] = [$token, self::OLD]; + $fromLine++; + $toLine++; + } + + reset($from); + reset($to); + + foreach ($common as $token) { + while (($fromToken = reset($from)) !== $token) { + $diff[] = [array_shift($from), self::REMOVED, $fromLine++]; + } + + while (($toToken = reset($to)) !== $token) { + $diff[] = [array_shift($to), self::ADDED, $toLine++]; + } + + $diff[] = [$token, self::OLD]; + $fromLine++; + $toLine++; + + array_shift($from); + array_shift($to); + } + + while (($token = array_shift($from)) !== null) { + $diff[] = [$token, self::REMOVED, $fromLine++]; + } + + while (($token = array_shift($to)) !== null) { + $diff[] = [$token, self::ADDED, $toLine++]; + } + + foreach ($end as $token) { + $diff[] = [$token, self::OLD]; + $fromLine++; + $toLine++; + } + + return $diff; + } + + private function getArrayDiffParted(array &$from, array &$to): array + { + $start = []; + $end = []; + + reset($to); + + foreach ($from as $k => $v) { + $toK = key($to); + + if (($this->isEqual)($toK, $k) && ($this->isEqual)($v, $to[$k])) { + $start[$k] = $v; + + unset($from[$k], $to[$k]); + } else { + break; + } + } + + end($from); + end($to); + + do { + $fromK = key($from); + $toK = key($to); + + if (null === $fromK || null === $toK || current($from) !== current($to)) { + break; + } + + prev($from); + prev($to); + + $end = [$fromK => $from[$fromK]] + $end; + unset($from[$fromK], $to[$toK]); + } while (true); + + return [$from, $to, $start, $end]; + } + + public function calculateCommonSubsequence(array $from, array $to): array + { + $cFrom = count($from); + $cTo = count($to); + + if ($cFrom === 0) { + return []; + } + + if ($cFrom === 1) { + if (in_array($from[0], $to, true)) { + return [$from[0]]; + } + + return []; + } + + $i = (int) ($cFrom / 2); + $fromStart = array_slice($from, 0, $i); + $fromEnd = array_slice($from, $i); + $llB = $this->commonSubsequenceLength($fromStart, $to); + $llE = $this->commonSubsequenceLength(array_reverse($fromEnd), array_reverse($to)); + $jMax = 0; + $max = 0; + + for ($j = 0; $j <= $cTo; $j++) { + $m = $llB[$j] + $llE[$cTo - $j]; + + if ($m >= $max) { + $max = $m; + $jMax = $j; + } + } + + $toStart = array_slice($to, 0, $jMax); + $toEnd = array_slice($to, $jMax); + + return array_merge( + $this->calculateCommonSubsequence($fromStart, $toStart), + $this->calculateCommonSubsequence($fromEnd, $toEnd) + ); + } + + private function commonSubsequenceLength(array $from, array $to): array + { + $current = array_fill(0, count($to) + 1, 0); + $cFrom = count($from); + $cTo = count($to); + + for ($i = 0; $i < $cFrom; $i++) { + $prev = $current; + + for ($j = 0; $j < $cTo; $j++) { + if (($this->isEqual)($from[$i], $to[$j])) { + $current[$j + 1] = $prev[$j] + 1; + } else { + $current[$j + 1] = max($current[$j], $prev[$j + 1]); + } + } + } + + return $current; + } +} + +class DiffOutputBuilder +{ + public function getDiff(array $diffs): string + { + global $context_line_count; + $i = 0; + $string = ''; + $number_len = max(3, strlen((string)count($diffs))); + $line_number_spec = '%0' . $number_len . 'd'; + $buffer = fopen('php://memory', 'r+b'); + while ($i < count($diffs)) { + // Find next difference + $next = $i; + while ($next < count($diffs)) { + if ($diffs[$next][1] !== Differ::OLD) { + break; + } + $next++; + } + // Found no more differenciating rows, we're done + if ($next === count($diffs)) { + var_dump($i, count($diffs)); + if (($i - 1) < count($diffs)) { + fwrite($buffer, "--\n"); + } + break; + } + // Print separator if necessary + if ($i < ($next - $context_line_count)) { + fwrite($buffer, "--\n"); + $i = $next - $context_line_count; + } + // Print leading context + while ($i < $next) { + fwrite($buffer, str_repeat(' ', $number_len + 2)); + fwrite($buffer, $diffs[$i][0]); + fwrite($buffer, "\n"); + $i++; + } + // Print differences + while ($i < count($diffs) && $diffs[$i][1] !== Differ::OLD) { + fwrite($buffer, sprintf($line_number_spec, $diffs[$i][2])); + switch ($diffs[$i][1]) { + case Differ::ADDED: + fwrite($buffer, '+ '); + break; + case Differ::REMOVED: + fwrite($buffer, '- '); + break; + } + fwrite($buffer, $diffs[$i][0]); + fwrite($buffer, "\n"); + $i++; + } + // Print trailing context + $afterContext = min($i + $context_line_count, count($diffs)); + while ($i < $afterContext && $diffs[$i][1] === Differ::OLD) { + fwrite($buffer, str_repeat(' ', $number_len + 2)); + fwrite($buffer, $diffs[$i][0]); + fwrite($buffer, "\n"); + $i++; + } + } + + $diff = stream_get_contents($buffer, -1, 0); + fclose($buffer); + + return $diff; + } +} + main(); From 2646d76abc180e22a504a2bcea912a70ef19e29f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Feb 2023 11:31:25 +0100 Subject: [PATCH 681/895] ext/curl: suppress -Wdeprecated-declarations in curl_arginfo.h Disable the warning before including curl_arginfo.h. (Follow-up for https://github.com/php/php-src/pull/10531) --- ext/curl/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8e881a78f3529..025c876ad5bcd 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -60,7 +60,6 @@ #include "ext/standard/file.h" #include "ext/standard/url.h" #include "curl_private.h" -#include "curl_arginfo.h" #ifdef __GNUC__ /* don't complain about deprecated CURLOPT_* we're exposing to PHP; we @@ -68,6 +67,8 @@ # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +#include "curl_arginfo.h" + #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */ static MUTEX_T *php_curl_openssl_tsl = NULL; From 8424b5caaa6002f94a81ddd2397f4983257893a1 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 23 Mar 2023 10:10:21 +0000 Subject: [PATCH 682/895] Updated to version 2023.1 (2023a) --- ext/date/lib/timezonedb.h | 4337 ++++++++++++++++++++----------------- 1 file changed, 2402 insertions(+), 1935 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 2b4f626f23ec4..4219b12911224 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -19,593 +19,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000A9B }, { (char*) "Africa/Bujumbura" , 0x000B2A }, { (char*) "Africa/Cairo" , 0x000BB9 }, - { (char*) "Africa/Casablanca" , 0x0010C1 }, - { (char*) "Africa/Ceuta" , 0x00184C }, - { (char*) "Africa/Conakry" , 0x001A98 }, - { (char*) "Africa/Dakar" , 0x001B42 }, - { (char*) "Africa/Dar_es_Salaam" , 0x001BE3 }, - { (char*) "Africa/Djibouti" , 0x001C90 }, - { (char*) "Africa/Douala" , 0x001D1F }, - { (char*) "Africa/El_Aaiun" , 0x001DAE }, - { (char*) "Africa/Freetown" , 0x0024E0 }, - { (char*) "Africa/Gaborone" , 0x002630 }, - { (char*) "Africa/Harare" , 0x0026F0 }, - { (char*) "Africa/Johannesburg" , 0x00277F }, - { (char*) "Africa/Juba" , 0x002849 }, - { (char*) "Africa/Kampala" , 0x002A1F }, - { (char*) "Africa/Khartoum" , 0x002AE1 }, - { (char*) "Africa/Kigali" , 0x002CB7 }, - { (char*) "Africa/Kinshasa" , 0x002D46 }, - { (char*) "Africa/Lagos" , 0x002DEE }, - { (char*) "Africa/Libreville" , 0x002EAE }, - { (char*) "Africa/Lome" , 0x002F3D }, - { (char*) "Africa/Luanda" , 0x002FCB }, - { (char*) "Africa/Lubumbashi" , 0x003069 }, - { (char*) "Africa/Lusaka" , 0x003124 }, - { (char*) "Africa/Malabo" , 0x0031B3 }, - { (char*) "Africa/Maputo" , 0x003255 }, - { (char*) "Africa/Maseru" , 0x0032E4 }, - { (char*) "Africa/Mbabane" , 0x00338D }, - { (char*) "Africa/Mogadishu" , 0x00341E }, - { (char*) "Africa/Monrovia" , 0x0034CB }, - { (char*) "Africa/Nairobi" , 0x00357B }, - { (char*) "Africa/Ndjamena" , 0x003646 }, - { (char*) "Africa/Niamey" , 0x0036F2 }, - { (char*) "Africa/Nouakchott" , 0x0037A7 }, - { (char*) "Africa/Ouagadougou" , 0x003851 }, - { (char*) "Africa/Porto-Novo" , 0x0038DF }, - { (char*) "Africa/Sao_Tome" , 0x003981 }, - { (char*) "Africa/Timbuktu" , 0x003A3A }, - { (char*) "Africa/Tripoli" , 0x003AC8 }, - { (char*) "Africa/Tunis" , 0x003C83 }, - { (char*) "Africa/Windhoek" , 0x003E50 }, - { (char*) "America/Adak" , 0x0040DA }, - { (char*) "America/Anchorage" , 0x0044BF }, - { (char*) "America/Anguilla" , 0x0048AF }, - { (char*) "America/Antigua" , 0x00493D }, - { (char*) "America/Araguaina" , 0x0049DE }, - { (char*) "America/Argentina/Buenos_Aires" , 0x004C43 }, - { (char*) "America/Argentina/Catamarca" , 0x004F28 }, - { (char*) "America/Argentina/ComodRivadavia" , 0x005213 }, - { (char*) "America/Argentina/Cordoba" , 0x0054E3 }, - { (char*) "America/Argentina/Jujuy" , 0x0057E9 }, - { (char*) "America/Argentina/La_Rioja" , 0x005AB1 }, - { (char*) "America/Argentina/Mendoza" , 0x005D97 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x006073 }, - { (char*) "America/Argentina/Salta" , 0x006352 }, - { (char*) "America/Argentina/San_Juan" , 0x006626 }, - { (char*) "America/Argentina/San_Luis" , 0x00690C }, - { (char*) "America/Argentina/Tucuman" , 0x006BF2 }, - { (char*) "America/Argentina/Ushuaia" , 0x006EE0 }, - { (char*) "America/Aruba" , 0x0071C5 }, - { (char*) "America/Asuncion" , 0x007268 }, - { (char*) "America/Atikokan" , 0x0075E8 }, - { (char*) "America/Atka" , 0x0076F5 }, - { (char*) "America/Bahia" , 0x007ACA }, - { (char*) "America/Bahia_Banderas" , 0x007D85 }, - { (char*) "America/Barbados" , 0x00807A }, - { (char*) "America/Belem" , 0x00819C }, - { (char*) "America/Belize" , 0x008344 }, - { (char*) "America/Blanc-Sablon" , 0x008765 }, - { (char*) "America/Boa_Vista" , 0x00885A }, - { (char*) "America/Bogota" , 0x008A1B }, - { (char*) "America/Boise" , 0x008ADA }, - { (char*) "America/Buenos_Aires" , 0x008EED }, - { (char*) "America/Cambridge_Bay" , 0x0091BD }, - { (char*) "America/Campo_Grande" , 0x009550 }, - { (char*) "America/Cancun" , 0x009926 }, - { (char*) "America/Caracas" , 0x009B4F }, - { (char*) "America/Catamarca" , 0x009C19 }, - { (char*) "America/Cayenne" , 0x009EE9 }, - { (char*) "America/Cayman" , 0x009F8C }, - { (char*) "America/Chicago" , 0x00A02D }, - { (char*) "America/Chihuahua" , 0x00A727 }, - { (char*) "America/Ciudad_Juarez" , 0x00A9FC }, - { (char*) "America/Coral_Harbour" , 0x00ACF2 }, - { (char*) "America/Cordoba" , 0x00AD93 }, - { (char*) "America/Costa_Rica" , 0x00B063 }, - { (char*) "America/Creston" , 0x00B157 }, - { (char*) "America/Cuiaba" , 0x00B213 }, - { (char*) "America/Curacao" , 0x00B5D0 }, - { (char*) "America/Danmarkshavn" , 0x00B673 }, - { (char*) "America/Dawson" , 0x00B858 }, - { (char*) "America/Dawson_Creek" , 0x00BC7B }, - { (char*) "America/Denver" , 0x00BF52 }, - { (char*) "America/Detroit" , 0x00C385 }, - { (char*) "America/Dominica" , 0x00C72D }, - { (char*) "America/Edmonton" , 0x00C7BB }, - { (char*) "America/Eirunepe" , 0x00CBAE }, - { (char*) "America/El_Salvador" , 0x00CD7D }, - { (char*) "America/Ensenada" , 0x00CE39 }, - { (char*) "America/Fort_Nelson" , 0x00D246 }, - { (char*) "America/Fort_Wayne" , 0x00D80E }, - { (char*) "America/Fortaleza" , 0x00DA2D }, - { (char*) "America/Glace_Bay" , 0x00DC43 }, - { (char*) "America/Godthab" , 0x00DFDA }, - { (char*) "America/Goose_Bay" , 0x00E389 }, - { (char*) "America/Grand_Turk" , 0x00E9E1 }, - { (char*) "America/Grenada" , 0x00ED42 }, - { (char*) "America/Guadeloupe" , 0x00EDD0 }, - { (char*) "America/Guatemala" , 0x00EE5E }, - { (char*) "America/Guayaquil" , 0x00EF3E }, - { (char*) "America/Guyana" , 0x00F00F }, - { (char*) "America/Halifax" , 0x00F0D0 }, - { (char*) "America/Havana" , 0x00F782 }, - { (char*) "America/Hermosillo" , 0x00FBEB }, - { (char*) "America/Indiana/Indianapolis" , 0x00FD1B }, - { (char*) "America/Indiana/Knox" , 0x00FF53 }, - { (char*) "America/Indiana/Marengo" , 0x01036C }, - { (char*) "America/Indiana/Petersburg" , 0x0105C6 }, - { (char*) "America/Indiana/Tell_City" , 0x010890 }, - { (char*) "America/Indiana/Vevay" , 0x010ABA }, - { (char*) "America/Indiana/Vincennes" , 0x010C51 }, - { (char*) "America/Indiana/Winamac" , 0x010EA7 }, - { (char*) "America/Indianapolis" , 0x01112D }, - { (char*) "America/Inuvik" , 0x01134C }, - { (char*) "America/Iqaluit" , 0x01169D }, - { (char*) "America/Jamaica" , 0x011A19 }, - { (char*) "America/Jujuy" , 0x011B78 }, - { (char*) "America/Juneau" , 0x011E36 }, - { (char*) "America/Kentucky/Louisville" , 0x01221C }, - { (char*) "America/Kentucky/Monticello" , 0x012720 }, - { (char*) "America/Knox_IN" , 0x012B0C }, - { (char*) "America/Kralendijk" , 0x012F10 }, - { (char*) "America/La_Paz" , 0x012FCD }, - { (char*) "America/Lima" , 0x013083 }, - { (char*) "America/Los_Angeles" , 0x0131AA }, - { (char*) "America/Louisville" , 0x0136CB }, - { (char*) "America/Lower_Princes" , 0x013BB1 }, - { (char*) "America/Maceio" , 0x013C6E }, - { (char*) "America/Managua" , 0x013E80 }, - { (char*) "America/Manaus" , 0x013FB3 }, - { (char*) "America/Marigot" , 0x01416A }, - { (char*) "America/Martinique" , 0x014227 }, - { (char*) "America/Matamoros" , 0x0142E5 }, - { (char*) "America/Mazatlan" , 0x0144D2 }, - { (char*) "America/Mendoza" , 0x0147DE }, - { (char*) "America/Menominee" , 0x014AAE }, - { (char*) "America/Merida" , 0x014E6E }, - { (char*) "America/Metlakatla" , 0x015119 }, - { (char*) "America/Mexico_City" , 0x01538F }, - { (char*) "America/Miquelon" , 0x0156AE }, - { (char*) "America/Moncton" , 0x0158E0 }, - { (char*) "America/Monterrey" , 0x015ED9 }, - { (char*) "America/Montevideo" , 0x01619F }, - { (char*) "America/Montreal" , 0x016574 }, - { (char*) "America/Montserrat" , 0x016C35 }, - { (char*) "America/Nassau" , 0x016CC3 }, - { (char*) "America/New_York" , 0x0170BD }, - { (char*) "America/Nipigon" , 0x0177AD }, - { (char*) "America/Nome" , 0x017E6E }, - { (char*) "America/Noronha" , 0x018256 }, - { (char*) "America/North_Dakota/Beulah" , 0x018456 }, - { (char*) "America/North_Dakota/Center" , 0x01888A }, - { (char*) "America/North_Dakota/New_Salem" , 0x018C89 }, - { (char*) "America/Nuuk" , 0x01908E }, - { (char*) "America/Ojinaga" , 0x019453 }, - { (char*) "America/Panama" , 0x019740 }, - { (char*) "America/Pangnirtung" , 0x0197E1 }, - { (char*) "America/Paramaribo" , 0x019B44 }, - { (char*) "America/Phoenix" , 0x019C0B }, - { (char*) "America/Port-au-Prince" , 0x019D24 }, - { (char*) "America/Port_of_Spain" , 0x019F65 }, - { (char*) "America/Porto_Acre" , 0x019FF3 }, - { (char*) "America/Porto_Velho" , 0x01A1A1 }, - { (char*) "America/Puerto_Rico" , 0x01A33F }, - { (char*) "America/Punta_Arenas" , 0x01A3FC }, - { (char*) "America/Rainy_River" , 0x01A8DE }, - { (char*) "America/Rankin_Inlet" , 0x01ADF8 }, - { (char*) "America/Recife" , 0x01B141 }, - { (char*) "America/Regina" , 0x01B33B }, - { (char*) "America/Resolute" , 0x01B5DA }, - { (char*) "America/Rio_Branco" , 0x01B924 }, - { (char*) "America/Rosario" , 0x01BAD6 }, - { (char*) "America/Santa_Isabel" , 0x01BDA6 }, - { (char*) "America/Santarem" , 0x01C1B3 }, - { (char*) "America/Santiago" , 0x01C363 }, - { (char*) "America/Santo_Domingo" , 0x01C8CB }, - { (char*) "America/Sao_Paulo" , 0x01CA14 }, - { (char*) "America/Scoresbysund" , 0x01CE0E }, - { (char*) "America/Shiprock" , 0x01D016 }, - { (char*) "America/Sitka" , 0x01D434 }, - { (char*) "America/St_Barthelemy" , 0x01D80F }, - { (char*) "America/St_Johns" , 0x01D8CC }, - { (char*) "America/St_Kitts" , 0x01E050 }, - { (char*) "America/St_Lucia" , 0x01E0DE }, - { (char*) "America/St_Thomas" , 0x01E17F }, - { (char*) "America/St_Vincent" , 0x01E20D }, - { (char*) "America/Swift_Current" , 0x01E2AE }, - { (char*) "America/Tegucigalpa" , 0x01E43C }, - { (char*) "America/Thule" , 0x01E50A }, - { (char*) "America/Thunder_Bay" , 0x01E6EB }, - { (char*) "America/Tijuana" , 0x01EDAC }, - { (char*) "America/Toronto" , 0x01F1C8 }, - { (char*) "America/Tortola" , 0x01F8A6 }, - { (char*) "America/Vancouver" , 0x01F934 }, - { (char*) "America/Virgin" , 0x01FE8B }, - { (char*) "America/Whitehorse" , 0x01FF48 }, - { (char*) "America/Winnipeg" , 0x02036B }, - { (char*) "America/Yakutat" , 0x0208A2 }, - { (char*) "America/Yellowknife" , 0x020C70 }, - { (char*) "Antarctica/Casey" , 0x020FDF }, - { (char*) "Antarctica/Davis" , 0x0210E3 }, - { (char*) "Antarctica/DumontDUrville" , 0x0211B9 }, - { (char*) "Antarctica/Macquarie" , 0x02126D }, - { (char*) "Antarctica/Mawson" , 0x021659 }, - { (char*) "Antarctica/McMurdo" , 0x021703 }, - { (char*) "Antarctica/Palmer" , 0x021A35 }, - { (char*) "Antarctica/Rothera" , 0x021DBE }, - { (char*) "Antarctica/South_Pole" , 0x021E55 }, - { (char*) "Antarctica/Syowa" , 0x022274 }, - { (char*) "Antarctica/Troll" , 0x02230A }, - { (char*) "Antarctica/Vostok" , 0x0223CC }, - { (char*) "Arctic/Longyearbyen" , 0x022463 }, - { (char*) "Asia/Aden" , 0x022730 }, - { (char*) "Asia/Almaty" , 0x0227C1 }, - { (char*) "Asia/Amman" , 0x022A45 }, - { (char*) "Asia/Anadyr" , 0x022DF1 }, - { (char*) "Asia/Aqtau" , 0x0230F7 }, - { (char*) "Asia/Aqtobe" , 0x023376 }, - { (char*) "Asia/Ashgabat" , 0x0235F6 }, - { (char*) "Asia/Ashkhabad" , 0x023779 }, - { (char*) "Asia/Atyrau" , 0x0238FC }, - { (char*) "Asia/Baghdad" , 0x023B85 }, - { (char*) "Asia/Bahrain" , 0x023E07 }, - { (char*) "Asia/Baku" , 0x023EC0 }, - { (char*) "Asia/Bangkok" , 0x0241B4 }, - { (char*) "Asia/Barnaul" , 0x024258 }, - { (char*) "Asia/Beirut" , 0x024563 }, - { (char*) "Asia/Bishkek" , 0x02484B }, - { (char*) "Asia/Brunei" , 0x024AC1 }, - { (char*) "Asia/Calcutta" , 0x024B67 }, - { (char*) "Asia/Chita" , 0x024C4F }, - { (char*) "Asia/Choibalsan" , 0x024F5D }, - { (char*) "Asia/Chongqing" , 0x0251E6 }, - { (char*) "Asia/Chungking" , 0x02537B }, - { (char*) "Asia/Colombo" , 0x025510 }, - { (char*) "Asia/Dacca" , 0x025613 }, - { (char*) "Asia/Damascus" , 0x025706 }, - { (char*) "Asia/Dhaka" , 0x025BE4 }, - { (char*) "Asia/Dili" , 0x025CD7 }, - { (char*) "Asia/Dubai" , 0x025D8D }, - { (char*) "Asia/Dushanbe" , 0x025E1E }, - { (char*) "Asia/Famagusta" , 0x025F98 }, - { (char*) "Asia/Gaza" , 0x02635F }, - { (char*) "Asia/Harbin" , 0x02685F }, - { (char*) "Asia/Hebron" , 0x0269F4 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x026F05 }, - { (char*) "Asia/Hong_Kong" , 0x026FFD }, - { (char*) "Asia/Hovd" , 0x027310 }, - { (char*) "Asia/Irkutsk" , 0x027599 }, - { (char*) "Asia/Istanbul" , 0x0278B7 }, - { (char*) "Asia/Jakarta" , 0x027D73 }, - { (char*) "Asia/Jayapura" , 0x027E84 }, - { (char*) "Asia/Jerusalem" , 0x027F71 }, - { (char*) "Asia/Kabul" , 0x0283AF }, - { (char*) "Asia/Kamchatka" , 0x02845A }, - { (char*) "Asia/Karachi" , 0x02874F }, - { (char*) "Asia/Kashgar" , 0x028865 }, - { (char*) "Asia/Kathmandu" , 0x0288F6 }, - { (char*) "Asia/Katmandu" , 0x0289A3 }, - { (char*) "Asia/Khandyga" , 0x028A50 }, - { (char*) "Asia/Kolkata" , 0x028D81 }, - { (char*) "Asia/Krasnoyarsk" , 0x028E69 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029173 }, - { (char*) "Asia/Kuching" , 0x029293 }, - { (char*) "Asia/Kuwait" , 0x0293ED }, - { (char*) "Asia/Macao" , 0x02947E }, - { (char*) "Asia/Macau" , 0x0297A1 }, - { (char*) "Asia/Magadan" , 0x029AC4 }, - { (char*) "Asia/Makassar" , 0x029DCF }, - { (char*) "Asia/Manila" , 0x029EE2 }, - { (char*) "Asia/Muscat" , 0x029FDC }, - { (char*) "Asia/Nicosia" , 0x02A06D }, - { (char*) "Asia/Novokuznetsk" , 0x02A2E1 }, - { (char*) "Asia/Novosibirsk" , 0x02A5D4 }, - { (char*) "Asia/Omsk" , 0x02A8E5 }, - { (char*) "Asia/Oral" , 0x02ABE3 }, - { (char*) "Asia/Phnom_Penh" , 0x02AE6F }, - { (char*) "Asia/Pontianak" , 0x02AF43 }, - { (char*) "Asia/Pyongyang" , 0x02B05C }, - { (char*) "Asia/Qatar" , 0x02B11F }, - { (char*) "Asia/Qostanay" , 0x02B1C3 }, - { (char*) "Asia/Qyzylorda" , 0x02B450 }, - { (char*) "Asia/Rangoon" , 0x02B6E9 }, - { (char*) "Asia/Riyadh" , 0x02B7B0 }, - { (char*) "Asia/Saigon" , 0x02B841 }, - { (char*) "Asia/Sakhalin" , 0x02B939 }, - { (char*) "Asia/Samarkand" , 0x02BC50 }, - { (char*) "Asia/Seoul" , 0x02BDDB }, - { (char*) "Asia/Shanghai" , 0x02BF86 }, - { (char*) "Asia/Singapore" , 0x02C127 }, - { (char*) "Asia/Srednekolymsk" , 0x02C233 }, - { (char*) "Asia/Taipei" , 0x02C547 }, - { (char*) "Asia/Tashkent" , 0x02C752 }, - { (char*) "Asia/Tbilisi" , 0x02C8DD }, - { (char*) "Asia/Tehran" , 0x02CB5E }, - { (char*) "Asia/Tel_Aviv" , 0x02CE96 }, - { (char*) "Asia/Thimbu" , 0x02D2D4 }, - { (char*) "Asia/Thimphu" , 0x02D37A }, - { (char*) "Asia/Tokyo" , 0x02D420 }, - { (char*) "Asia/Tomsk" , 0x02D501 }, - { (char*) "Asia/Ujung_Pandang" , 0x02D80C }, - { (char*) "Asia/Ulaanbaatar" , 0x02D8D6 }, - { (char*) "Asia/Ulan_Bator" , 0x02DB49 }, - { (char*) "Asia/Urumqi" , 0x02DDA7 }, - { (char*) "Asia/Ust-Nera" , 0x02DE45 }, - { (char*) "Asia/Vientiane" , 0x02E168 }, - { (char*) "Asia/Vladivostok" , 0x02E24E }, - { (char*) "Asia/Yakutsk" , 0x02E553 }, - { (char*) "Asia/Yangon" , 0x02E857 }, - { (char*) "Asia/Yekaterinburg" , 0x02E91E }, - { (char*) "Asia/Yerevan" , 0x02EC30 }, - { (char*) "Atlantic/Azores" , 0x02EF00 }, - { (char*) "Atlantic/Bermuda" , 0x02F4BF }, - { (char*) "Atlantic/Canary" , 0x02F8CB }, - { (char*) "Atlantic/Cape_Verde" , 0x02FAC3 }, - { (char*) "Atlantic/Faeroe" , 0x02FB7E }, - { (char*) "Atlantic/Faroe" , 0x02FD43 }, - { (char*) "Atlantic/Jan_Mayen" , 0x02FF08 }, - { (char*) "Atlantic/Madeira" , 0x0301D5 }, - { (char*) "Atlantic/Reykjavik" , 0x03079D }, - { (char*) "Atlantic/South_Georgia" , 0x030A9A }, - { (char*) "Atlantic/St_Helena" , 0x030B2A }, - { (char*) "Atlantic/Stanley" , 0x030BCB }, - { (char*) "Australia/ACT" , 0x030EEC }, - { (char*) "Australia/Adelaide" , 0x031280 }, - { (char*) "Australia/Brisbane" , 0x031634 }, - { (char*) "Australia/Broken_Hill" , 0x031778 }, - { (char*) "Australia/Canberra" , 0x031B4D }, - { (char*) "Australia/Currie" , 0x031EE1 }, - { (char*) "Australia/Darwin" , 0x0322D8 }, - { (char*) "Australia/Eucla" , 0x0323E0 }, - { (char*) "Australia/Hobart" , 0x03253F }, - { (char*) "Australia/LHI" , 0x03293E }, - { (char*) "Australia/Lindeman" , 0x032BFE }, - { (char*) "Australia/Lord_Howe" , 0x032D6E }, - { (char*) "Australia/Melbourne" , 0x03303E }, - { (char*) "Australia/North" , 0x0333DA }, - { (char*) "Australia/NSW" , 0x0334D0 }, - { (char*) "Australia/Perth" , 0x033864 }, - { (char*) "Australia/Queensland" , 0x0339C0 }, - { (char*) "Australia/South" , 0x033AED }, - { (char*) "Australia/Sydney" , 0x033E92 }, - { (char*) "Australia/Tasmania" , 0x034242 }, - { (char*) "Australia/Victoria" , 0x034639 }, - { (char*) "Australia/West" , 0x0349CD }, - { (char*) "Australia/Yancowinna" , 0x034B0B }, - { (char*) "Brazil/Acre" , 0x034EC4 }, - { (char*) "Brazil/DeNoronha" , 0x035072 }, - { (char*) "Brazil/East" , 0x035262 }, - { (char*) "Brazil/West" , 0x035626 }, - { (char*) "Canada/Atlantic" , 0x0357CE }, - { (char*) "Canada/Central" , 0x035E62 }, - { (char*) "Canada/Eastern" , 0x03637C }, - { (char*) "Canada/Mountain" , 0x036A3D }, - { (char*) "Canada/Newfoundland" , 0x036E13 }, - { (char*) "Canada/Pacific" , 0x037575 }, - { (char*) "Canada/Saskatchewan" , 0x037AB3 }, - { (char*) "Canada/Yukon" , 0x037D3D }, - { (char*) "CET" , 0x03814E }, - { (char*) "Chile/Continental" , 0x0383C7 }, - { (char*) "Chile/EasterIsland" , 0x03891D }, - { (char*) "CST6CDT" , 0x038DBF }, - { (char*) "Cuba" , 0x039182 }, - { (char*) "EET" , 0x0395EB }, - { (char*) "Egypt" , 0x0397E8 }, - { (char*) "Eire" , 0x039CF0 }, - { (char*) "EST" , 0x03A2D4 }, - { (char*) "EST5EDT" , 0x03A34F }, - { (char*) "Etc/GMT" , 0x03A712 }, - { (char*) "Etc/GMT+0" , 0x03A78D }, - { (char*) "Etc/GMT+1" , 0x03A808 }, - { (char*) "Etc/GMT+10" , 0x03A885 }, - { (char*) "Etc/GMT+11" , 0x03A903 }, - { (char*) "Etc/GMT+12" , 0x03A981 }, - { (char*) "Etc/GMT+2" , 0x03A9FF }, - { (char*) "Etc/GMT+3" , 0x03AA7C }, - { (char*) "Etc/GMT+4" , 0x03AAF9 }, - { (char*) "Etc/GMT+5" , 0x03AB76 }, - { (char*) "Etc/GMT+6" , 0x03ABF3 }, - { (char*) "Etc/GMT+7" , 0x03AC70 }, - { (char*) "Etc/GMT+8" , 0x03ACED }, - { (char*) "Etc/GMT+9" , 0x03AD6A }, - { (char*) "Etc/GMT-0" , 0x03ADE7 }, - { (char*) "Etc/GMT-1" , 0x03AE62 }, - { (char*) "Etc/GMT-10" , 0x03AEE0 }, - { (char*) "Etc/GMT-11" , 0x03AF5F }, - { (char*) "Etc/GMT-12" , 0x03AFDE }, - { (char*) "Etc/GMT-13" , 0x03B05D }, - { (char*) "Etc/GMT-14" , 0x03B0DC }, - { (char*) "Etc/GMT-2" , 0x03B15B }, - { (char*) "Etc/GMT-3" , 0x03B1D9 }, - { (char*) "Etc/GMT-4" , 0x03B257 }, - { (char*) "Etc/GMT-5" , 0x03B2D5 }, - { (char*) "Etc/GMT-6" , 0x03B353 }, - { (char*) "Etc/GMT-7" , 0x03B3D1 }, - { (char*) "Etc/GMT-8" , 0x03B44F }, - { (char*) "Etc/GMT-9" , 0x03B4CD }, - { (char*) "Etc/GMT0" , 0x03B54B }, - { (char*) "Etc/Greenwich" , 0x03B5C6 }, - { (char*) "Etc/UCT" , 0x03B641 }, - { (char*) "Etc/Universal" , 0x03B6BC }, - { (char*) "Etc/UTC" , 0x03B737 }, - { (char*) "Etc/Zulu" , 0x03B7B2 }, - { (char*) "Europe/Amsterdam" , 0x03B82D }, - { (char*) "Europe/Andorra" , 0x03BC68 }, - { (char*) "Europe/Astrakhan" , 0x03BDF9 }, - { (char*) "Europe/Athens" , 0x03C0ED }, - { (char*) "Europe/Belfast" , 0x03C3A3 }, - { (char*) "Europe/Belgrade" , 0x03C9EE }, - { (char*) "Europe/Berlin" , 0x03CBD8 }, - { (char*) "Europe/Bratislava" , 0x03CEB9 }, - { (char*) "Europe/Brussels" , 0x03D198 }, - { (char*) "Europe/Bucharest" , 0x03D5F3 }, - { (char*) "Europe/Budapest" , 0x03D894 }, - { (char*) "Europe/Busingen" , 0x03DB9E }, - { (char*) "Europe/Chisinau" , 0x03DDA3 }, - { (char*) "Europe/Copenhagen" , 0x03E0A2 }, - { (char*) "Europe/Dublin" , 0x03E31D }, - { (char*) "Europe/Gibraltar" , 0x03E901 }, - { (char*) "Europe/Guernsey" , 0x03EDD1 }, - { (char*) "Europe/Helsinki" , 0x03F428 }, - { (char*) "Europe/Isle_of_Man" , 0x03F615 }, - { (char*) "Europe/Istanbul" , 0x03FC60 }, - { (char*) "Europe/Jersey" , 0x04011C }, - { (char*) "Europe/Kaliningrad" , 0x040773 }, - { (char*) "Europe/Kiev" , 0x040B1B }, - { (char*) "Europe/Kirov" , 0x040D55 }, - { (char*) "Europe/Kyiv" , 0x04103C }, - { (char*) "Europe/Lisbon" , 0x04128A }, - { (char*) "Europe/Ljubljana" , 0x041857 }, - { (char*) "Europe/London" , 0x041A41 }, - { (char*) "Europe/Luxembourg" , 0x04208C }, - { (char*) "Europe/Madrid" , 0x0424D7 }, - { (char*) "Europe/Malta" , 0x042874 }, - { (char*) "Europe/Mariehamn" , 0x042C20 }, - { (char*) "Europe/Minsk" , 0x042E0D }, - { (char*) "Europe/Monaco" , 0x043141 }, - { (char*) "Europe/Moscow" , 0x0435A7 }, - { (char*) "Europe/Nicosia" , 0x043953 }, - { (char*) "Europe/Oslo" , 0x043BB4 }, - { (char*) "Europe/Paris" , 0x043E64 }, - { (char*) "Europe/Podgorica" , 0x0442C1 }, - { (char*) "Europe/Prague" , 0x0444AB }, - { (char*) "Europe/Riga" , 0x04478A }, - { (char*) "Europe/Rome" , 0x044A4C }, - { (char*) "Europe/Samara" , 0x044E0B }, - { (char*) "Europe/San_Marino" , 0x04510C }, - { (char*) "Europe/Sarajevo" , 0x0454CB }, - { (char*) "Europe/Saratov" , 0x0456B5 }, - { (char*) "Europe/Simferopol" , 0x0459A7 }, - { (char*) "Europe/Skopje" , 0x045D1A }, - { (char*) "Europe/Sofia" , 0x045F04 }, - { (char*) "Europe/Stockholm" , 0x046160 }, - { (char*) "Europe/Tallinn" , 0x04635D }, - { (char*) "Europe/Tirane" , 0x04660C }, - { (char*) "Europe/Tiraspol" , 0x046874 }, - { (char*) "Europe/Ulyanovsk" , 0x046B73 }, - { (char*) "Europe/Uzhgorod" , 0x046E89 }, - { (char*) "Europe/Vaduz" , 0x0470C3 }, - { (char*) "Europe/Vatican" , 0x0472AD }, - { (char*) "Europe/Vienna" , 0x04766C }, - { (char*) "Europe/Vilnius" , 0x04790A }, - { (char*) "Europe/Volgograd" , 0x047BBA }, - { (char*) "Europe/Warsaw" , 0x047EB7 }, - { (char*) "Europe/Zagreb" , 0x04825E }, - { (char*) "Europe/Zaporozhye" , 0x048448 }, - { (char*) "Europe/Zurich" , 0x048682 }, - { (char*) "Factory" , 0x04887F }, - { (char*) "GB" , 0x0488FC }, - { (char*) "GB-Eire" , 0x048F47 }, - { (char*) "GMT" , 0x049592 }, - { (char*) "GMT+0" , 0x04960D }, - { (char*) "GMT-0" , 0x049688 }, - { (char*) "GMT0" , 0x049703 }, - { (char*) "Greenwich" , 0x04977E }, - { (char*) "Hongkong" , 0x0497F9 }, - { (char*) "HST" , 0x049B0C }, - { (char*) "Iceland" , 0x049B88 }, - { (char*) "Indian/Antananarivo" , 0x049C16 }, - { (char*) "Indian/Chagos" , 0x049CC2 }, - { (char*) "Indian/Christmas" , 0x049D66 }, - { (char*) "Indian/Cocos" , 0x049DF7 }, - { (char*) "Indian/Comoro" , 0x049E8F }, - { (char*) "Indian/Kerguelen" , 0x049F1E }, - { (char*) "Indian/Mahe" , 0x049FAF }, - { (char*) "Indian/Maldives" , 0x04A040 }, - { (char*) "Indian/Mauritius" , 0x04A0E4 }, - { (char*) "Indian/Mayotte" , 0x04A1A3 }, - { (char*) "Indian/Reunion" , 0x04A232 }, - { (char*) "Iran" , 0x04A2C3 }, - { (char*) "Israel" , 0x04A5FB }, - { (char*) "Jamaica" , 0x04AA39 }, - { (char*) "Japan" , 0x04AB98 }, - { (char*) "Kwajalein" , 0x04AC79 }, - { (char*) "Libya" , 0x04AD60 }, - { (char*) "MET" , 0x04AF1B }, - { (char*) "Mexico/BajaNorte" , 0x04B194 }, - { (char*) "Mexico/BajaSur" , 0x04B5A1 }, - { (char*) "Mexico/General" , 0x04B87B }, - { (char*) "MST" , 0x04BB8C }, - { (char*) "MST7MDT" , 0x04BC07 }, - { (char*) "Navajo" , 0x04BFCA }, - { (char*) "NZ" , 0x04C3E8 }, - { (char*) "NZ-CHAT" , 0x04C807 }, - { (char*) "Pacific/Apia" , 0x04CB3B }, - { (char*) "Pacific/Auckland" , 0x04CCDE }, - { (char*) "Pacific/Bougainville" , 0x04D115 }, - { (char*) "Pacific/Chatham" , 0x04D1F6 }, - { (char*) "Pacific/Chuuk" , 0x04D539 }, - { (char*) "Pacific/Easter" , 0x04D617 }, - { (char*) "Pacific/Efate" , 0x04DAC6 }, - { (char*) "Pacific/Enderbury" , 0x04DC28 }, - { (char*) "Pacific/Fakaofo" , 0x04DCE0 }, - { (char*) "Pacific/Fiji" , 0x04DD85 }, - { (char*) "Pacific/Funafuti" , 0x04DF1D }, - { (char*) "Pacific/Galapagos" , 0x04DFAF }, - { (char*) "Pacific/Gambier" , 0x04E07B }, - { (char*) "Pacific/Guadalcanal" , 0x04E11A }, - { (char*) "Pacific/Guam" , 0x04E1AC }, - { (char*) "Pacific/Honolulu" , 0x04E316 }, - { (char*) "Pacific/Johnston" , 0x04E405 }, - { (char*) "Pacific/Kanton" , 0x04E4EE }, - { (char*) "Pacific/Kiritimati" , 0x04E5B5 }, - { (char*) "Pacific/Kosrae" , 0x04E67B }, - { (char*) "Pacific/Kwajalein" , 0x04E77F }, - { (char*) "Pacific/Majuro" , 0x04E86F }, - { (char*) "Pacific/Marquesas" , 0x04E972 }, - { (char*) "Pacific/Midway" , 0x04EA1A }, - { (char*) "Pacific/Nauru" , 0x04EADD }, - { (char*) "Pacific/Niue" , 0x04EBA0 }, - { (char*) "Pacific/Norfolk" , 0x04EC46 }, - { (char*) "Pacific/Noumea" , 0x04ED49 }, - { (char*) "Pacific/Pago_Pago" , 0x04EE1B }, - { (char*) "Pacific/Palau" , 0x04EEB9 }, - { (char*) "Pacific/Pitcairn" , 0x04EF59 }, - { (char*) "Pacific/Pohnpei" , 0x04EFFE }, - { (char*) "Pacific/Ponape" , 0x04F0EE }, - { (char*) "Pacific/Port_Moresby" , 0x04F180 }, - { (char*) "Pacific/Rarotonga" , 0x04F243 }, - { (char*) "Pacific/Saipan" , 0x04F3E5 }, - { (char*) "Pacific/Samoa" , 0x04F546 }, - { (char*) "Pacific/Tahiti" , 0x04F5E4 }, - { (char*) "Pacific/Tarawa" , 0x04F684 }, - { (char*) "Pacific/Tongatapu" , 0x04F725 }, - { (char*) "Pacific/Truk" , 0x04F81E }, - { (char*) "Pacific/Wake" , 0x04F8C4 }, - { (char*) "Pacific/Wallis" , 0x04F961 }, - { (char*) "Pacific/Yap" , 0x04F9F3 }, - { (char*) "Poland" , 0x04FA99 }, - { (char*) "Portugal" , 0x04FE40 }, - { (char*) "PRC" , 0x0503FA }, - { (char*) "PST8PDT" , 0x05058F }, - { (char*) "ROC" , 0x050952 }, - { (char*) "ROK" , 0x050B5D }, - { (char*) "Singapore" , 0x050D08 }, - { (char*) "Turkey" , 0x050E14 }, - { (char*) "UCT" , 0x0512D0 }, - { (char*) "Universal" , 0x05134B }, - { (char*) "US/Alaska" , 0x0513C6 }, - { (char*) "US/Aleutian" , 0x0517A3 }, - { (char*) "US/Arizona" , 0x051B78 }, - { (char*) "US/Central" , 0x051C74 }, - { (char*) "US/East-Indiana" , 0x05235A }, - { (char*) "US/Eastern" , 0x052579 }, - { (char*) "US/Hawaii" , 0x052C55 }, - { (char*) "US/Indiana-Starke" , 0x052D3E }, - { (char*) "US/Michigan" , 0x053142 }, - { (char*) "US/Mountain" , 0x0534D1 }, - { (char*) "US/Pacific" , 0x0538EF }, - { (char*) "US/Samoa" , 0x053E09 }, - { (char*) "UTC" , 0x053EA7 }, - { (char*) "W-SU" , 0x053F22 }, - { (char*) "WET" , 0x0542BA }, - { (char*) "Zulu" , 0x0544B4 }, + { (char*) "Africa/Casablanca" , 0x0010E2 }, + { (char*) "Africa/Ceuta" , 0x00186D }, + { (char*) "Africa/Conakry" , 0x001AB9 }, + { (char*) "Africa/Dakar" , 0x001B63 }, + { (char*) "Africa/Dar_es_Salaam" , 0x001C04 }, + { (char*) "Africa/Djibouti" , 0x001CB1 }, + { (char*) "Africa/Douala" , 0x001D40 }, + { (char*) "Africa/El_Aaiun" , 0x001DCF }, + { (char*) "Africa/Freetown" , 0x002501 }, + { (char*) "Africa/Gaborone" , 0x002651 }, + { (char*) "Africa/Harare" , 0x002711 }, + { (char*) "Africa/Johannesburg" , 0x0027A0 }, + { (char*) "Africa/Juba" , 0x00286A }, + { (char*) "Africa/Kampala" , 0x002A40 }, + { (char*) "Africa/Khartoum" , 0x002B02 }, + { (char*) "Africa/Kigali" , 0x002CD8 }, + { (char*) "Africa/Kinshasa" , 0x002D67 }, + { (char*) "Africa/Lagos" , 0x002E0F }, + { (char*) "Africa/Libreville" , 0x002ECF }, + { (char*) "Africa/Lome" , 0x002F5E }, + { (char*) "Africa/Luanda" , 0x002FEC }, + { (char*) "Africa/Lubumbashi" , 0x00308A }, + { (char*) "Africa/Lusaka" , 0x003145 }, + { (char*) "Africa/Malabo" , 0x0031D4 }, + { (char*) "Africa/Maputo" , 0x003276 }, + { (char*) "Africa/Maseru" , 0x003305 }, + { (char*) "Africa/Mbabane" , 0x0033AE }, + { (char*) "Africa/Mogadishu" , 0x00343F }, + { (char*) "Africa/Monrovia" , 0x0034EC }, + { (char*) "Africa/Nairobi" , 0x00359C }, + { (char*) "Africa/Ndjamena" , 0x003667 }, + { (char*) "Africa/Niamey" , 0x003713 }, + { (char*) "Africa/Nouakchott" , 0x0037C8 }, + { (char*) "Africa/Ouagadougou" , 0x003872 }, + { (char*) "Africa/Porto-Novo" , 0x003900 }, + { (char*) "Africa/Sao_Tome" , 0x0039A2 }, + { (char*) "Africa/Timbuktu" , 0x003A5B }, + { (char*) "Africa/Tripoli" , 0x003AE9 }, + { (char*) "Africa/Tunis" , 0x003CA4 }, + { (char*) "Africa/Windhoek" , 0x003E71 }, + { (char*) "America/Adak" , 0x0040FB }, + { (char*) "America/Anchorage" , 0x0044EA }, + { (char*) "America/Anguilla" , 0x0048DA }, + { (char*) "America/Antigua" , 0x004968 }, + { (char*) "America/Araguaina" , 0x004A09 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x004C6E }, + { (char*) "America/Argentina/Catamarca" , 0x004F53 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x00523E }, + { (char*) "America/Argentina/Cordoba" , 0x00550E }, + { (char*) "America/Argentina/Jujuy" , 0x005814 }, + { (char*) "America/Argentina/La_Rioja" , 0x005ADC }, + { (char*) "America/Argentina/Mendoza" , 0x005DC2 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x00609E }, + { (char*) "America/Argentina/Salta" , 0x00637D }, + { (char*) "America/Argentina/San_Juan" , 0x006651 }, + { (char*) "America/Argentina/San_Luis" , 0x006937 }, + { (char*) "America/Argentina/Tucuman" , 0x006C1D }, + { (char*) "America/Argentina/Ushuaia" , 0x006F0B }, + { (char*) "America/Aruba" , 0x0071F0 }, + { (char*) "America/Asuncion" , 0x007293 }, + { (char*) "America/Atikokan" , 0x007613 }, + { (char*) "America/Atka" , 0x007720 }, + { (char*) "America/Bahia" , 0x007AF5 }, + { (char*) "America/Bahia_Banderas" , 0x007DB0 }, + { (char*) "America/Barbados" , 0x0080A5 }, + { (char*) "America/Belem" , 0x0081C7 }, + { (char*) "America/Belize" , 0x00836F }, + { (char*) "America/Blanc-Sablon" , 0x008790 }, + { (char*) "America/Boa_Vista" , 0x008885 }, + { (char*) "America/Bogota" , 0x008A46 }, + { (char*) "America/Boise" , 0x008B05 }, + { (char*) "America/Buenos_Aires" , 0x008F18 }, + { (char*) "America/Cambridge_Bay" , 0x0091E8 }, + { (char*) "America/Campo_Grande" , 0x00957B }, + { (char*) "America/Cancun" , 0x009951 }, + { (char*) "America/Caracas" , 0x009B7A }, + { (char*) "America/Catamarca" , 0x009C44 }, + { (char*) "America/Cayenne" , 0x009F14 }, + { (char*) "America/Cayman" , 0x009FB7 }, + { (char*) "America/Chicago" , 0x00A058 }, + { (char*) "America/Chihuahua" , 0x00A752 }, + { (char*) "America/Ciudad_Juarez" , 0x00AA27 }, + { (char*) "America/Coral_Harbour" , 0x00AD1D }, + { (char*) "America/Cordoba" , 0x00ADBE }, + { (char*) "America/Costa_Rica" , 0x00B08E }, + { (char*) "America/Creston" , 0x00B182 }, + { (char*) "America/Cuiaba" , 0x00B23E }, + { (char*) "America/Curacao" , 0x00B5FB }, + { (char*) "America/Danmarkshavn" , 0x00B69E }, + { (char*) "America/Dawson" , 0x00B883 }, + { (char*) "America/Dawson_Creek" , 0x00BCA6 }, + { (char*) "America/Denver" , 0x00BF7D }, + { (char*) "America/Detroit" , 0x00C3B0 }, + { (char*) "America/Dominica" , 0x00C758 }, + { (char*) "America/Edmonton" , 0x00C7E6 }, + { (char*) "America/Eirunepe" , 0x00CBE1 }, + { (char*) "America/El_Salvador" , 0x00CDB0 }, + { (char*) "America/Ensenada" , 0x00CE6C }, + { (char*) "America/Fort_Nelson" , 0x00D279 }, + { (char*) "America/Fort_Wayne" , 0x00D841 }, + { (char*) "America/Fortaleza" , 0x00DA60 }, + { (char*) "America/Glace_Bay" , 0x00DC76 }, + { (char*) "America/Godthab" , 0x00E00D }, + { (char*) "America/Goose_Bay" , 0x00E3DE }, + { (char*) "America/Grand_Turk" , 0x00EA36 }, + { (char*) "America/Grenada" , 0x00ED97 }, + { (char*) "America/Guadeloupe" , 0x00EE25 }, + { (char*) "America/Guatemala" , 0x00EEB3 }, + { (char*) "America/Guayaquil" , 0x00EF93 }, + { (char*) "America/Guyana" , 0x00F064 }, + { (char*) "America/Halifax" , 0x00F125 }, + { (char*) "America/Havana" , 0x00F7D7 }, + { (char*) "America/Hermosillo" , 0x00FC40 }, + { (char*) "America/Indiana/Indianapolis" , 0x00FD70 }, + { (char*) "America/Indiana/Knox" , 0x00FFA8 }, + { (char*) "America/Indiana/Marengo" , 0x0103C1 }, + { (char*) "America/Indiana/Petersburg" , 0x01061B }, + { (char*) "America/Indiana/Tell_City" , 0x0108E5 }, + { (char*) "America/Indiana/Vevay" , 0x010B0F }, + { (char*) "America/Indiana/Vincennes" , 0x010CA6 }, + { (char*) "America/Indiana/Winamac" , 0x010EFC }, + { (char*) "America/Indianapolis" , 0x011182 }, + { (char*) "America/Inuvik" , 0x0113A1 }, + { (char*) "America/Iqaluit" , 0x0116F2 }, + { (char*) "America/Jamaica" , 0x011A6E }, + { (char*) "America/Jujuy" , 0x011BCD }, + { (char*) "America/Juneau" , 0x011E8B }, + { (char*) "America/Kentucky/Louisville" , 0x012271 }, + { (char*) "America/Kentucky/Monticello" , 0x012775 }, + { (char*) "America/Knox_IN" , 0x012B61 }, + { (char*) "America/Kralendijk" , 0x012F65 }, + { (char*) "America/La_Paz" , 0x013022 }, + { (char*) "America/Lima" , 0x0130D8 }, + { (char*) "America/Los_Angeles" , 0x0131FF }, + { (char*) "America/Louisville" , 0x013720 }, + { (char*) "America/Lower_Princes" , 0x013C06 }, + { (char*) "America/Maceio" , 0x013CC3 }, + { (char*) "America/Managua" , 0x013ED5 }, + { (char*) "America/Manaus" , 0x014008 }, + { (char*) "America/Marigot" , 0x0141BF }, + { (char*) "America/Martinique" , 0x01427C }, + { (char*) "America/Matamoros" , 0x01433A }, + { (char*) "America/Mazatlan" , 0x014527 }, + { (char*) "America/Mendoza" , 0x014833 }, + { (char*) "America/Menominee" , 0x014B03 }, + { (char*) "America/Merida" , 0x014EC3 }, + { (char*) "America/Metlakatla" , 0x01516E }, + { (char*) "America/Mexico_City" , 0x0153E4 }, + { (char*) "America/Miquelon" , 0x015703 }, + { (char*) "America/Moncton" , 0x015935 }, + { (char*) "America/Monterrey" , 0x015F2E }, + { (char*) "America/Montevideo" , 0x0161F4 }, + { (char*) "America/Montreal" , 0x0165C9 }, + { (char*) "America/Montserrat" , 0x016C8A }, + { (char*) "America/Nassau" , 0x016D18 }, + { (char*) "America/New_York" , 0x017112 }, + { (char*) "America/Nipigon" , 0x017802 }, + { (char*) "America/Nome" , 0x017EC3 }, + { (char*) "America/Noronha" , 0x0182AB }, + { (char*) "America/North_Dakota/Beulah" , 0x0184AB }, + { (char*) "America/North_Dakota/Center" , 0x0188DF }, + { (char*) "America/North_Dakota/New_Salem" , 0x018CDE }, + { (char*) "America/Nuuk" , 0x0190E3 }, + { (char*) "America/Ojinaga" , 0x0194C5 }, + { (char*) "America/Panama" , 0x0197B2 }, + { (char*) "America/Pangnirtung" , 0x019853 }, + { (char*) "America/Paramaribo" , 0x019BB6 }, + { (char*) "America/Phoenix" , 0x019C7D }, + { (char*) "America/Port-au-Prince" , 0x019D91 }, + { (char*) "America/Port_of_Spain" , 0x019FD2 }, + { (char*) "America/Porto_Acre" , 0x01A060 }, + { (char*) "America/Porto_Velho" , 0x01A20E }, + { (char*) "America/Puerto_Rico" , 0x01A3AC }, + { (char*) "America/Punta_Arenas" , 0x01A469 }, + { (char*) "America/Rainy_River" , 0x01A94B }, + { (char*) "America/Rankin_Inlet" , 0x01AE65 }, + { (char*) "America/Recife" , 0x01B1AE }, + { (char*) "America/Regina" , 0x01B3A8 }, + { (char*) "America/Resolute" , 0x01B647 }, + { (char*) "America/Rio_Branco" , 0x01B991 }, + { (char*) "America/Rosario" , 0x01BB43 }, + { (char*) "America/Santa_Isabel" , 0x01BE13 }, + { (char*) "America/Santarem" , 0x01C220 }, + { (char*) "America/Santiago" , 0x01C3D0 }, + { (char*) "America/Santo_Domingo" , 0x01C933 }, + { (char*) "America/Sao_Paulo" , 0x01CA7C }, + { (char*) "America/Scoresbysund" , 0x01CE76 }, + { (char*) "America/Shiprock" , 0x01D07E }, + { (char*) "America/Sitka" , 0x01D49C }, + { (char*) "America/St_Barthelemy" , 0x01D877 }, + { (char*) "America/St_Johns" , 0x01D934 }, + { (char*) "America/St_Kitts" , 0x01E0B8 }, + { (char*) "America/St_Lucia" , 0x01E146 }, + { (char*) "America/St_Thomas" , 0x01E1E7 }, + { (char*) "America/St_Vincent" , 0x01E275 }, + { (char*) "America/Swift_Current" , 0x01E316 }, + { (char*) "America/Tegucigalpa" , 0x01E4A4 }, + { (char*) "America/Thule" , 0x01E572 }, + { (char*) "America/Thunder_Bay" , 0x01E753 }, + { (char*) "America/Tijuana" , 0x01EE14 }, + { (char*) "America/Toronto" , 0x01F230 }, + { (char*) "America/Tortola" , 0x01F90E }, + { (char*) "America/Vancouver" , 0x01F99C }, + { (char*) "America/Virgin" , 0x01FEF3 }, + { (char*) "America/Whitehorse" , 0x01FFB0 }, + { (char*) "America/Winnipeg" , 0x0203D3 }, + { (char*) "America/Yakutat" , 0x02090A }, + { (char*) "America/Yellowknife" , 0x020CD8 }, + { (char*) "Antarctica/Casey" , 0x0210AE }, + { (char*) "Antarctica/Davis" , 0x0211B2 }, + { (char*) "Antarctica/DumontDUrville" , 0x021288 }, + { (char*) "Antarctica/Macquarie" , 0x02133C }, + { (char*) "Antarctica/Mawson" , 0x021728 }, + { (char*) "Antarctica/McMurdo" , 0x0217D2 }, + { (char*) "Antarctica/Palmer" , 0x021B04 }, + { (char*) "Antarctica/Rothera" , 0x021E8D }, + { (char*) "Antarctica/South_Pole" , 0x021F24 }, + { (char*) "Antarctica/Syowa" , 0x022343 }, + { (char*) "Antarctica/Troll" , 0x0223D9 }, + { (char*) "Antarctica/Vostok" , 0x02249B }, + { (char*) "Arctic/Longyearbyen" , 0x022532 }, + { (char*) "Asia/Aden" , 0x0227FF }, + { (char*) "Asia/Almaty" , 0x022890 }, + { (char*) "Asia/Amman" , 0x022B0F }, + { (char*) "Asia/Anadyr" , 0x022EBB }, + { (char*) "Asia/Aqtau" , 0x0231C1 }, + { (char*) "Asia/Aqtobe" , 0x023440 }, + { (char*) "Asia/Ashgabat" , 0x0236C0 }, + { (char*) "Asia/Ashkhabad" , 0x023843 }, + { (char*) "Asia/Atyrau" , 0x0239C6 }, + { (char*) "Asia/Baghdad" , 0x023C4F }, + { (char*) "Asia/Bahrain" , 0x023ED1 }, + { (char*) "Asia/Baku" , 0x023F8A }, + { (char*) "Asia/Bangkok" , 0x02427E }, + { (char*) "Asia/Barnaul" , 0x024322 }, + { (char*) "Asia/Beirut" , 0x02462D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[345391] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -833,7 +833,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -897,7 +897,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -905,10 +905,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, -0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0xB7, 0x2E, +0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -949,7 +951,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, +0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, @@ -957,7 +959,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, -0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, @@ -965,7 +967,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, +0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, @@ -973,7 +975,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, -0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, @@ -981,7 +983,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, @@ -989,7 +991,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, @@ -997,7 +999,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, @@ -1005,15 +1007,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -1166,7 +1168,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, -0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, @@ -1174,7 +1176,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, +0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, @@ -1182,7 +1184,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, -0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, @@ -1190,7 +1192,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, +0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, @@ -1198,7 +1200,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, -0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, @@ -1206,7 +1208,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, @@ -1214,7 +1216,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, @@ -1222,15 +1224,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, @@ -1839,8 +1841,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, -0x72, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, -0x6C, 0x61, 0x6E, 0x64, 0x73, +0x72, 0x00, 0x00, 0x00, 0x1A, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, +0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4139,9 +4141,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, 0x00, 0x65, -0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, -0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, -0x28, 0x57, 0x29, +0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, +0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x54, 0x20, +0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4486,9 +4488,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -4532,16 +4534,19 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7466,9 +7471,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -7512,18 +7517,20 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, -0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, +0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, +0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7675,9 +7682,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, -0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, -0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, -0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, +0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, +0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, +0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8414,8 +8421,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, -0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, 0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, +0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9556,14 +9563,21 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, -0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, -0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, +0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, 0x91, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, 0xE8, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, 0xCA, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xE7, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xC9, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, +0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, @@ -9599,18 +9613,18 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, -0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, -0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, -0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, -0x4D, 0x44, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, -0x00, 0x64, 0x2C, 0x88, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x4E, 0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, +0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, +0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, +0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, +0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10069,9 +10083,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x08, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, -0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, -0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11065,7 +11078,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11125,7 +11138,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11133,14 +11216,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, -0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, -0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, -0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, -0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, -0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, - +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, +0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, +0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, +0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, +0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11176,7 +11267,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11237,7 +11328,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11245,14 +11406,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, -0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, -0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, -0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, -0x6B, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, +0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, +0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, +0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12150,8 +12319,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, -0x13, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12748,9 +12916,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, 0x36, 0x12, 0x00, 0x00, -0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, -0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x4B, 0x75, 0x72, 0x69, -0x6C, 0x20, 0x49, 0x73, +0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, +0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, + /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13128,9 +13296,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x03, 0x00, 0x00, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, -0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, -0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16316,7 +16483,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -16380,7 +16547,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -16388,10 +16555,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -17288,9 +17457,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x30, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x4D, 0x54, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, -0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, -0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18339,7 +18507,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -18372,15 +18540,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x01, 0x04, 0x01, 0x03, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x03, 0x01, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x03, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, -0x2B, 0x30, 0x34, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, -0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, -0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, +0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, +0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18418,8 +18587,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, -0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, -0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, +0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -20192,7 +20361,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -20226,15 +20395,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x02, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x02, 0x05, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, -0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, -0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, +0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, +0x35, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -21655,9 +21825,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, -0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x18, 0x4E, -0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, -0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x13, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, +0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22096,9 +22266,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, -0xE3, 0x80, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, -0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0xE3, 0x80, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, +0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22270,9 +22439,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, 0x01, 0xF3, -0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, -0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x50, 0x61, +0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -23705,593 +23873,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000E79 }, { (char*) "Africa/Bujumbura" , 0x000F1A }, { (char*) "Africa/Cairo" , 0x000FBB }, - { (char*) "Africa/Casablanca" , 0x00176A }, - { (char*) "Africa/Ceuta" , 0x0020F3 }, - { (char*) "Africa/Conakry" , 0x002911 }, - { (char*) "Africa/Dakar" , 0x0029ED }, - { (char*) "Africa/Dar_es_Salaam" , 0x002AAF }, - { (char*) "Africa/Djibouti" , 0x002B90 }, - { (char*) "Africa/Douala" , 0x002C31 }, - { (char*) "Africa/El_Aaiun" , 0x002CD2 }, - { (char*) "Africa/Freetown" , 0x0035D5 }, - { (char*) "Africa/Gaborone" , 0x0037B1 }, - { (char*) "Africa/Harare" , 0x0038A8 }, - { (char*) "Africa/Johannesburg" , 0x003949 }, - { (char*) "Africa/Juba" , 0x003A4B }, - { (char*) "Africa/Kampala" , 0x003CFE }, - { (char*) "Africa/Khartoum" , 0x003E05 }, - { (char*) "Africa/Kigali" , 0x0040B8 }, - { (char*) "Africa/Kinshasa" , 0x004159 }, - { (char*) "Africa/Lagos" , 0x004213 }, - { (char*) "Africa/Libreville" , 0x00430A }, - { (char*) "Africa/Lome" , 0x0043AB }, - { (char*) "Africa/Luanda" , 0x00444B }, - { (char*) "Africa/Lubumbashi" , 0x004512 }, - { (char*) "Africa/Lusaka" , 0x0045EE }, - { (char*) "Africa/Malabo" , 0x00468F }, - { (char*) "Africa/Maputo" , 0x004752 }, - { (char*) "Africa/Maseru" , 0x0047F3 }, - { (char*) "Africa/Mbabane" , 0x0048BF }, - { (char*) "Africa/Mogadishu" , 0x004963 }, - { (char*) "Africa/Monrovia" , 0x004A44 }, - { (char*) "Africa/Nairobi" , 0x004B20 }, - { (char*) "Africa/Ndjamena" , 0x004C35 }, - { (char*) "Africa/Niamey" , 0x004D08 }, - { (char*) "Africa/Nouakchott" , 0x004DED }, - { (char*) "Africa/Ouagadougou" , 0x004EC9 }, - { (char*) "Africa/Porto-Novo" , 0x004F69 }, - { (char*) "Africa/Sao_Tome" , 0x00502C }, - { (char*) "Africa/Timbuktu" , 0x005136 }, - { (char*) "Africa/Tripoli" , 0x0051D6 }, - { (char*) "Africa/Tunis" , 0x005453 }, - { (char*) "Africa/Windhoek" , 0x005710 }, - { (char*) "America/Adak" , 0x005AD7 }, - { (char*) "America/Anchorage" , 0x006427 }, - { (char*) "America/Anguilla" , 0x006D89 }, - { (char*) "America/Antigua" , 0x006E29 }, - { (char*) "America/Araguaina" , 0x006EEB }, - { (char*) "America/Argentina/Buenos_Aires" , 0x007266 }, - { (char*) "America/Argentina/Catamarca" , 0x0076AD }, - { (char*) "America/Argentina/ComodRivadavia" , 0x007AFA }, - { (char*) "America/Argentina/Cordoba" , 0x007F2C }, - { (char*) "America/Argentina/Jujuy" , 0x008394 }, - { (char*) "America/Argentina/La_Rioja" , 0x0087B4 }, - { (char*) "America/Argentina/Mendoza" , 0x008C01 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x00903F }, - { (char*) "America/Argentina/Salta" , 0x009480 }, - { (char*) "America/Argentina/San_Juan" , 0x0098AC }, - { (char*) "America/Argentina/San_Luis" , 0x009CF9 }, - { (char*) "America/Argentina/Tucuman" , 0x00A152 }, - { (char*) "America/Argentina/Ushuaia" , 0x00A5AC }, - { (char*) "America/Aruba" , 0x00A9F3 }, - { (char*) "America/Asuncion" , 0x00AAB9 }, - { (char*) "America/Atikokan" , 0x00B2B3 }, - { (char*) "America/Atka" , 0x00B430 }, - { (char*) "America/Bahia" , 0x00BD70 }, - { (char*) "America/Bahia_Banderas" , 0x00C173 }, - { (char*) "America/Barbados" , 0x00C610 }, - { (char*) "America/Belem" , 0x00C7D0 }, - { (char*) "America/Belize" , 0x00CA20 }, - { (char*) "America/Blanc-Sablon" , 0x00D07A }, - { (char*) "America/Boa_Vista" , 0x00D1CC }, - { (char*) "America/Bogota" , 0x00D449 }, - { (char*) "America/Boise" , 0x00D53D }, - { (char*) "America/Buenos_Aires" , 0x00DED3 }, - { (char*) "America/Cambridge_Bay" , 0x00E305 }, - { (char*) "America/Campo_Grande" , 0x00EBF3 }, - { (char*) "America/Cancun" , 0x00F1A7 }, - { (char*) "America/Caracas" , 0x00F501 }, - { (char*) "America/Catamarca" , 0x00F607 }, - { (char*) "America/Cayenne" , 0x00FA39 }, - { (char*) "America/Cayman" , 0x00FAFD }, - { (char*) "America/Chicago" , 0x00FBBF }, - { (char*) "America/Chihuahua" , 0x0109E7 }, - { (char*) "America/Ciudad_Juarez" , 0x010E57 }, - { (char*) "America/Coral_Harbour" , 0x011481 }, - { (char*) "America/Cordoba" , 0x011543 }, - { (char*) "America/Costa_Rica" , 0x011975 }, - { (char*) "America/Creston" , 0x011ABD }, - { (char*) "America/Cuiaba" , 0x011BAB }, - { (char*) "America/Curacao" , 0x01213C }, - { (char*) "America/Danmarkshavn" , 0x012202 }, - { (char*) "America/Dawson" , 0x0124E2 }, - { (char*) "America/Dawson_Creek" , 0x012B4E }, - { (char*) "America/Denver" , 0x012F94 }, - { (char*) "America/Detroit" , 0x013951 }, - { (char*) "America/Dominica" , 0x01422C }, - { (char*) "America/Edmonton" , 0x0142CC }, - { (char*) "America/Eirunepe" , 0x014C11 }, - { (char*) "America/El_Salvador" , 0x014EAE }, - { (char*) "America/Ensenada" , 0x014F9A }, - { (char*) "America/Fort_Nelson" , 0x0158EC }, - { (char*) "America/Fort_Wayne" , 0x0161CC }, - { (char*) "America/Fortaleza" , 0x01686A }, - { (char*) "America/Glace_Bay" , 0x016B5A }, - { (char*) "America/Godthab" , 0x017411 }, - { (char*) "America/Goose_Bay" , 0x0179C5 }, - { (char*) "America/Grand_Turk" , 0x01867B }, - { (char*) "America/Grenada" , 0x018DB1 }, - { (char*) "America/Guadeloupe" , 0x018E51 }, - { (char*) "America/Guatemala" , 0x018EF1 }, - { (char*) "America/Guayaquil" , 0x019015 }, - { (char*) "America/Guyana" , 0x01911B }, - { (char*) "America/Halifax" , 0x01921F }, - { (char*) "America/Havana" , 0x019FA9 }, - { (char*) "America/Hermosillo" , 0x01A925 }, - { (char*) "America/Indiana/Indianapolis" , 0x01AAFF }, - { (char*) "America/Indiana/Knox" , 0x01B1B6 }, - { (char*) "America/Indiana/Marengo" , 0x01BB63 }, - { (char*) "America/Indiana/Petersburg" , 0x01C250 }, - { (char*) "America/Indiana/Tell_City" , 0x01C9EF }, - { (char*) "America/Indiana/Vevay" , 0x01D0B3 }, - { (char*) "America/Indiana/Vincennes" , 0x01D66F }, - { (char*) "America/Indiana/Winamac" , 0x01DD45 }, - { (char*) "America/Indianapolis" , 0x01E469 }, - { (char*) "America/Inuvik" , 0x01EB07 }, - { (char*) "America/Iqaluit" , 0x01F341 }, - { (char*) "America/Jamaica" , 0x01FC00 }, - { (char*) "America/Jujuy" , 0x01FDEE }, - { (char*) "America/Juneau" , 0x020204 }, - { (char*) "America/Kentucky/Louisville" , 0x020B55 }, - { (char*) "America/Kentucky/Monticello" , 0x021663 }, - { (char*) "America/Knox_IN" , 0x021FC3 }, - { (char*) "America/Kralendijk" , 0x02295B }, - { (char*) "America/La_Paz" , 0x022A5D }, - { (char*) "America/Lima" , 0x022B43 }, - { (char*) "America/Los_Angeles" , 0x022CD7 }, - { (char*) "America/Louisville" , 0x02380E }, - { (char*) "America/Lower_Princes" , 0x0242FE }, - { (char*) "America/Maceio" , 0x024400 }, - { (char*) "America/Managua" , 0x0246F6 }, - { (char*) "America/Manaus" , 0x0248B0 }, - { (char*) "America/Marigot" , 0x024B19 }, - { (char*) "America/Martinique" , 0x024C1B }, - { (char*) "America/Matamoros" , 0x024D0F }, - { (char*) "America/Mazatlan" , 0x0252D1 }, - { (char*) "America/Mendoza" , 0x025777 }, - { (char*) "America/Menominee" , 0x025BA9 }, - { (char*) "America/Merida" , 0x0264B6 }, - { (char*) "America/Metlakatla" , 0x0268BF }, - { (char*) "America/Mexico_City" , 0x026E71 }, - { (char*) "America/Miquelon" , 0x027351 }, - { (char*) "America/Moncton" , 0x0279D1 }, - { (char*) "America/Monterrey" , 0x028647 }, - { (char*) "America/Montevideo" , 0x028A5D }, - { (char*) "America/Montreal" , 0x029041 }, - { (char*) "America/Montserrat" , 0x029DF3 }, - { (char*) "America/Nassau" , 0x029E93 }, - { (char*) "America/New_York" , 0x02A7F3 }, - { (char*) "America/Nipigon" , 0x02B5F3 }, - { (char*) "America/Nome" , 0x02C3A5 }, - { (char*) "America/Noronha" , 0x02CCFD }, - { (char*) "America/North_Dakota/Beulah" , 0x02CFD7 }, - { (char*) "America/North_Dakota/Center" , 0x02D954 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E2D1 }, - { (char*) "America/Nuuk" , 0x02EC54 }, - { (char*) "America/Ojinaga" , 0x02F21E }, - { (char*) "America/Panama" , 0x02F83A }, - { (char*) "America/Pangnirtung" , 0x02F8FC }, - { (char*) "America/Paramaribo" , 0x0301A2 }, - { (char*) "America/Phoenix" , 0x0302A6 }, - { (char*) "America/Port-au-Prince" , 0x030437 }, - { (char*) "America/Port_of_Spain" , 0x0309DD }, - { (char*) "America/Porto_Acre" , 0x030A7D }, - { (char*) "America/Porto_Velho" , 0x030CEF }, - { (char*) "America/Puerto_Rico" , 0x030F35 }, - { (char*) "America/Punta_Arenas" , 0x031037 }, - { (char*) "America/Rainy_River" , 0x0317C5 }, - { (char*) "America/Rankin_Inlet" , 0x032305 }, - { (char*) "America/Recife" , 0x032B39 }, - { (char*) "America/Regina" , 0x032E0D }, - { (char*) "America/Resolute" , 0x033202 }, - { (char*) "America/Rio_Branco" , 0x033A37 }, - { (char*) "America/Rosario" , 0x033CAD }, - { (char*) "America/Santa_Isabel" , 0x0340DF }, - { (char*) "America/Santarem" , 0x034A31 }, - { (char*) "America/Santiago" , 0x034C94 }, - { (char*) "America/Santo_Domingo" , 0x035685 }, - { (char*) "America/Sao_Paulo" , 0x03585B }, - { (char*) "America/Scoresbysund" , 0x035E33 }, - { (char*) "America/Shiprock" , 0x0365CA }, - { (char*) "America/Sitka" , 0x036F72 }, - { (char*) "America/St_Barthelemy" , 0x0378AA }, - { (char*) "America/St_Johns" , 0x0379AC }, - { (char*) "America/St_Kitts" , 0x038821 }, - { (char*) "America/St_Lucia" , 0x0388C1 }, - { (char*) "America/St_Thomas" , 0x038983 }, - { (char*) "America/St_Vincent" , 0x038A23 }, - { (char*) "America/Swift_Current" , 0x038AE5 }, - { (char*) "America/Tegucigalpa" , 0x038D33 }, - { (char*) "America/Thule" , 0x038E3B }, - { (char*) "America/Thunder_Bay" , 0x039433 }, - { (char*) "America/Tijuana" , 0x03A1E5 }, - { (char*) "America/Toronto" , 0x03AB46 }, - { (char*) "America/Tortola" , 0x03B915 }, - { (char*) "America/Vancouver" , 0x03B9B5 }, - { (char*) "America/Virgin" , 0x03C526 }, - { (char*) "America/Whitehorse" , 0x03C628 }, - { (char*) "America/Winnipeg" , 0x03CC94 }, - { (char*) "America/Yakutat" , 0x03D7F1 }, - { (char*) "America/Yellowknife" , 0x03E10E }, - { (char*) "Antarctica/Casey" , 0x03E989 }, - { (char*) "Antarctica/Davis" , 0x03EB0C }, - { (char*) "Antarctica/DumontDUrville" , 0x03EC38 }, - { (char*) "Antarctica/Macquarie" , 0x03ED08 }, - { (char*) "Antarctica/Mawson" , 0x03F5F8 }, - { (char*) "Antarctica/McMurdo" , 0x03F6C3 }, - { (char*) "Antarctica/Palmer" , 0x03FEBE }, - { (char*) "Antarctica/Rothera" , 0x04044C }, - { (char*) "Antarctica/South_Pole" , 0x0404F5 }, - { (char*) "Antarctica/Syowa" , 0x040E86 }, - { (char*) "Antarctica/Troll" , 0x040F2E }, - { (char*) "Antarctica/Vostok" , 0x0413BB }, - { (char*) "Arctic/Longyearbyen" , 0x041464 }, - { (char*) "Asia/Aden" , 0x041D6A }, - { (char*) "Asia/Almaty" , 0x041E0D }, - { (char*) "Asia/Amman" , 0x042207 }, - { (char*) "Asia/Anadyr" , 0x0427AC }, - { (char*) "Asia/Aqtau" , 0x042C61 }, - { (char*) "Asia/Aqtobe" , 0x04304B }, - { (char*) "Asia/Ashgabat" , 0x043449 }, - { (char*) "Asia/Ashkhabad" , 0x0436B2 }, - { (char*) "Asia/Atyrau" , 0x04391B }, - { (char*) "Asia/Baghdad" , 0x043D0D }, - { (char*) "Asia/Bahrain" , 0x0440E2 }, - { (char*) "Asia/Baku" , 0x0441CD }, - { (char*) "Asia/Bangkok" , 0x044696 }, - { (char*) "Asia/Barnaul" , 0x04475B }, - { (char*) "Asia/Beirut" , 0x044C2C }, - { (char*) "Asia/Bishkek" , 0x0454A2 }, - { (char*) "Asia/Brunei" , 0x045877 }, - { (char*) "Asia/Calcutta" , 0x045940 }, - { (char*) "Asia/Chita" , 0x045A69 }, - { (char*) "Asia/Choibalsan" , 0x045F40 }, - { (char*) "Asia/Chongqing" , 0x046305 }, - { (char*) "Asia/Chungking" , 0x046542 }, - { (char*) "Asia/Colombo" , 0x04677F }, - { (char*) "Asia/Dacca" , 0x0468F1 }, - { (char*) "Asia/Damascus" , 0x046A40 }, - { (char*) "Asia/Dhaka" , 0x04719D }, - { (char*) "Asia/Dili" , 0x0472EC }, - { (char*) "Asia/Dubai" , 0x0473CD }, - { (char*) "Asia/Dushanbe" , 0x047470 }, - { (char*) "Asia/Famagusta" , 0x0476BD }, - { (char*) "Asia/Gaza" , 0x047EC4 }, - { (char*) "Asia/Harbin" , 0x048850 }, - { (char*) "Asia/Hebron" , 0x048A8D }, - { (char*) "Asia/Ho_Chi_Minh" , 0x049434 }, - { (char*) "Asia/Hong_Kong" , 0x049591 }, - { (char*) "Asia/Hovd" , 0x049A6E }, - { (char*) "Asia/Irkutsk" , 0x049E12 }, - { (char*) "Asia/Istanbul" , 0x04A305 }, - { (char*) "Asia/Jakarta" , 0x04AA9E }, - { (char*) "Asia/Jayapura" , 0x04AC36 }, - { (char*) "Asia/Jerusalem" , 0x04AD55 }, - { (char*) "Asia/Kabul" , 0x04B6B5 }, - { (char*) "Asia/Kamchatka" , 0x04B783 }, - { (char*) "Asia/Karachi" , 0x04BC21 }, - { (char*) "Asia/Kashgar" , 0x04BDA8 }, - { (char*) "Asia/Kathmandu" , 0x04BE4B }, - { (char*) "Asia/Katmandu" , 0x04BF1D }, - { (char*) "Asia/Khandyga" , 0x04BFEF }, - { (char*) "Asia/Kolkata" , 0x04C502 }, - { (char*) "Asia/Krasnoyarsk" , 0x04C62B }, - { (char*) "Asia/Kuala_Lumpur" , 0x04CAF9 }, - { (char*) "Asia/Kuching" , 0x04CCAA }, - { (char*) "Asia/Kuwait" , 0x04CE99 }, - { (char*) "Asia/Macao" , 0x04CF3C }, - { (char*) "Asia/Macau" , 0x04D413 }, - { (char*) "Asia/Magadan" , 0x04D8EA }, - { (char*) "Asia/Makassar" , 0x04DDBE }, - { (char*) "Asia/Manila" , 0x04DF11 }, - { (char*) "Asia/Muscat" , 0x04E065 }, - { (char*) "Asia/Nicosia" , 0x04E108 }, - { (char*) "Asia/Novokuznetsk" , 0x04E8F9 }, - { (char*) "Asia/Novosibirsk" , 0x04ED95 }, - { (char*) "Asia/Omsk" , 0x04F26C }, - { (char*) "Asia/Oral" , 0x04F72E }, - { (char*) "Asia/Phnom_Penh" , 0x04FB28 }, - { (char*) "Asia/Pontianak" , 0x04FC4D }, - { (char*) "Asia/Pyongyang" , 0x04FDD0 }, - { (char*) "Asia/Qatar" , 0x04FEC9 }, - { (char*) "Asia/Qostanay" , 0x04FF8E }, - { (char*) "Asia/Qyzylorda" , 0x050399 }, - { (char*) "Asia/Rangoon" , 0x0507B5 }, - { (char*) "Asia/Riyadh" , 0x0508BF }, - { (char*) "Asia/Saigon" , 0x050962 }, - { (char*) "Asia/Sakhalin" , 0x050ABF }, - { (char*) "Asia/Samarkand" , 0x050F87 }, - { (char*) "Asia/Seoul" , 0x0511D7 }, - { (char*) "Asia/Shanghai" , 0x05144C }, - { (char*) "Asia/Singapore" , 0x051695 }, - { (char*) "Asia/Srednekolymsk" , 0x051832 }, - { (char*) "Asia/Taipei" , 0x051D0A }, - { (char*) "Asia/Tashkent" , 0x05200F }, - { (char*) "Asia/Tbilisi" , 0x05226D }, - { (char*) "Asia/Tehran" , 0x052676 }, - { (char*) "Asia/Tel_Aviv" , 0x052B62 }, - { (char*) "Asia/Thimbu" , 0x0534C2 }, - { (char*) "Asia/Thimphu" , 0x05358B }, - { (char*) "Asia/Tokyo" , 0x053654 }, - { (char*) "Asia/Tomsk" , 0x053795 }, - { (char*) "Asia/Ujung_Pandang" , 0x053C66 }, - { (char*) "Asia/Ulaanbaatar" , 0x053D70 }, - { (char*) "Asia/Ulan_Bator" , 0x0540FE }, - { (char*) "Asia/Urumqi" , 0x054477 }, - { (char*) "Asia/Ust-Nera" , 0x054527 }, - { (char*) "Asia/Vientiane" , 0x054A1D }, - { (char*) "Asia/Vladivostok" , 0x054B5E }, - { (char*) "Asia/Yakutsk" , 0x055027 }, - { (char*) "Asia/Yangon" , 0x0554EF }, - { (char*) "Asia/Yekaterinburg" , 0x0555F9 }, - { (char*) "Asia/Yerevan" , 0x055AE0 }, - { (char*) "Atlantic/Azores" , 0x055F5D }, - { (char*) "Atlantic/Bermuda" , 0x056D19 }, - { (char*) "Atlantic/Canary" , 0x057681 }, - { (char*) "Atlantic/Cape_Verde" , 0x057E04 }, - { (char*) "Atlantic/Faeroe" , 0x057F10 }, - { (char*) "Atlantic/Faroe" , 0x058633 }, - { (char*) "Atlantic/Jan_Mayen" , 0x058D56 }, - { (char*) "Atlantic/Madeira" , 0x05965C }, - { (char*) "Atlantic/Reykjavik" , 0x05A426 }, - { (char*) "Atlantic/South_Georgia" , 0x05A8BC }, - { (char*) "Atlantic/St_Helena" , 0x05A95E }, - { (char*) "Atlantic/Stanley" , 0x05AA20 }, - { (char*) "Australia/ACT" , 0x05AEDC }, - { (char*) "Australia/Adelaide" , 0x05B776 }, - { (char*) "Australia/Brisbane" , 0x05C031 }, - { (char*) "Australia/Broken_Hill" , 0x05C1F7 }, - { (char*) "Australia/Canberra" , 0x05CAD4 }, - { (char*) "Australia/Currie" , 0x05D36E }, - { (char*) "Australia/Darwin" , 0x05DCB0 }, - { (char*) "Australia/Eucla" , 0x05DE13 }, - { (char*) "Australia/Hobart" , 0x05E000 }, - { (char*) "Australia/LHI" , 0x05E94A }, - { (char*) "Australia/Lindeman" , 0x05F08C }, - { (char*) "Australia/Lord_Howe" , 0x05F292 }, - { (char*) "Australia/Melbourne" , 0x05F9E4 }, - { (char*) "Australia/North" , 0x060286 }, - { (char*) "Australia/NSW" , 0x0603D7 }, - { (char*) "Australia/Perth" , 0x060C71 }, - { (char*) "Australia/Queensland" , 0x060E59 }, - { (char*) "Australia/South" , 0x061008 }, - { (char*) "Australia/Sydney" , 0x0618B4 }, - { (char*) "Australia/Tasmania" , 0x06216A }, - { (char*) "Australia/Victoria" , 0x062AAC }, - { (char*) "Australia/West" , 0x063346 }, - { (char*) "Australia/Yancowinna" , 0x063510 }, - { (char*) "Brazil/Acre" , 0x063DD1 }, - { (char*) "Brazil/DeNoronha" , 0x064043 }, - { (char*) "Brazil/East" , 0x06430D }, - { (char*) "Brazil/West" , 0x0648AF }, - { (char*) "Canada/Atlantic" , 0x064B09 }, - { (char*) "Canada/Central" , 0x065875 }, - { (char*) "Canada/Eastern" , 0x0663B5 }, - { (char*) "Canada/Mountain" , 0x067167 }, - { (char*) "Canada/Newfoundland" , 0x067A8F }, - { (char*) "Canada/Pacific" , 0x0688E2 }, - { (char*) "Canada/Saskatchewan" , 0x06943A }, - { (char*) "Canada/Yukon" , 0x06981A }, - { (char*) "CET" , 0x069E74 }, - { (char*) "Chile/Continental" , 0x06A6AE }, - { (char*) "Chile/EasterIsland" , 0x06B08D }, - { (char*) "CST6CDT" , 0x06B944 }, - { (char*) "Cuba" , 0x06C256 }, - { (char*) "EET" , 0x06CBD2 }, - { (char*) "Egypt" , 0x06D352 }, - { (char*) "Eire" , 0x06DB01 }, - { (char*) "EST" , 0x06E8B1 }, - { (char*) "EST5EDT" , 0x06E92F }, - { (char*) "Etc/GMT" , 0x06F241 }, - { (char*) "Etc/GMT+0" , 0x06F2BF }, - { (char*) "Etc/GMT+1" , 0x06F33D }, - { (char*) "Etc/GMT+10" , 0x06F3BD }, - { (char*) "Etc/GMT+11" , 0x06F43E }, - { (char*) "Etc/GMT+12" , 0x06F4BF }, - { (char*) "Etc/GMT+2" , 0x06F540 }, - { (char*) "Etc/GMT+3" , 0x06F5C0 }, - { (char*) "Etc/GMT+4" , 0x06F640 }, - { (char*) "Etc/GMT+5" , 0x06F6C0 }, - { (char*) "Etc/GMT+6" , 0x06F740 }, - { (char*) "Etc/GMT+7" , 0x06F7C0 }, - { (char*) "Etc/GMT+8" , 0x06F840 }, - { (char*) "Etc/GMT+9" , 0x06F8C0 }, - { (char*) "Etc/GMT-0" , 0x06F940 }, - { (char*) "Etc/GMT-1" , 0x06F9BE }, - { (char*) "Etc/GMT-10" , 0x06FA3F }, - { (char*) "Etc/GMT-11" , 0x06FAC1 }, - { (char*) "Etc/GMT-12" , 0x06FB43 }, - { (char*) "Etc/GMT-13" , 0x06FBC5 }, - { (char*) "Etc/GMT-14" , 0x06FC47 }, - { (char*) "Etc/GMT-2" , 0x06FCC9 }, - { (char*) "Etc/GMT-3" , 0x06FD4A }, - { (char*) "Etc/GMT-4" , 0x06FDCB }, - { (char*) "Etc/GMT-5" , 0x06FE4C }, - { (char*) "Etc/GMT-6" , 0x06FECD }, - { (char*) "Etc/GMT-7" , 0x06FF4E }, - { (char*) "Etc/GMT-8" , 0x06FFCF }, - { (char*) "Etc/GMT-9" , 0x070050 }, - { (char*) "Etc/GMT0" , 0x0700D1 }, - { (char*) "Etc/Greenwich" , 0x07014F }, - { (char*) "Etc/UCT" , 0x0701CD }, - { (char*) "Etc/Universal" , 0x07024B }, - { (char*) "Etc/UTC" , 0x0702C9 }, - { (char*) "Etc/Zulu" , 0x070347 }, - { (char*) "Europe/Amsterdam" , 0x0703C5 }, - { (char*) "Europe/Andorra" , 0x070F2F }, - { (char*) "Europe/Astrakhan" , 0x071609 }, - { (char*) "Europe/Athens" , 0x071AA6 }, - { (char*) "Europe/Belfast" , 0x072388 }, - { (char*) "Europe/Belgrade" , 0x0731E4 }, - { (char*) "Europe/Berlin" , 0x073970 }, - { (char*) "Europe/Bratislava" , 0x07428A }, - { (char*) "Europe/Brussels" , 0x074B93 }, - { (char*) "Europe/Bucharest" , 0x075714 }, - { (char*) "Europe/Budapest" , 0x075FA8 }, - { (char*) "Europe/Busingen" , 0x0768F4 }, - { (char*) "Europe/Chisinau" , 0x07707D }, - { (char*) "Europe/Copenhagen" , 0x0779DF }, - { (char*) "Europe/Dublin" , 0x078244 }, - { (char*) "Europe/Gibraltar" , 0x078FF4 }, - { (char*) "Europe/Guernsey" , 0x079BFC }, - { (char*) "Europe/Helsinki" , 0x07AA9C }, - { (char*) "Europe/Isle_of_Man" , 0x07B214 }, - { (char*) "Europe/Istanbul" , 0x07C060 }, - { (char*) "Europe/Jersey" , 0x07C7F9 }, - { (char*) "Europe/Kaliningrad" , 0x07D699 }, - { (char*) "Europe/Kiev" , 0x07DC8E }, - { (char*) "Europe/Kirov" , 0x07E4E2 }, - { (char*) "Europe/Kyiv" , 0x07E96F }, - { (char*) "Europe/Lisbon" , 0x07F1D7 }, - { (char*) "Europe/Ljubljana" , 0x07FF9F }, - { (char*) "Europe/London" , 0x08072B }, - { (char*) "Europe/Luxembourg" , 0x081587 }, - { (char*) "Europe/Madrid" , 0x082115 }, - { (char*) "Europe/Malta" , 0x082B67 }, - { (char*) "Europe/Mariehamn" , 0x0835AF }, - { (char*) "Europe/Minsk" , 0x083D27 }, - { (char*) "Europe/Monaco" , 0x08424E }, - { (char*) "Europe/Moscow" , 0x084DDA }, - { (char*) "Europe/Nicosia" , 0x0853F9 }, - { (char*) "Europe/Oslo" , 0x085BD7 }, - { (char*) "Europe/Paris" , 0x086497 }, - { (char*) "Europe/Podgorica" , 0x087035 }, - { (char*) "Europe/Prague" , 0x0877C1 }, - { (char*) "Europe/Riga" , 0x0880CA }, - { (char*) "Europe/Rome" , 0x08896C }, - { (char*) "Europe/Samara" , 0x0893C9 }, - { (char*) "Europe/San_Marino" , 0x08989F }, - { (char*) "Europe/Sarajevo" , 0x08A2FC }, - { (char*) "Europe/Saratov" , 0x08AA88 }, - { (char*) "Europe/Simferopol" , 0x08AF35 }, - { (char*) "Europe/Skopje" , 0x08B504 }, - { (char*) "Europe/Sofia" , 0x08BC90 }, - { (char*) "Europe/Stockholm" , 0x08C4B9 }, - { (char*) "Europe/Tallinn" , 0x08CC3A }, - { (char*) "Europe/Tirane" , 0x08D4AA }, - { (char*) "Europe/Tiraspol" , 0x08DCDA }, - { (char*) "Europe/Ulyanovsk" , 0x08E63C }, - { (char*) "Europe/Uzhgorod" , 0x08EB3F }, - { (char*) "Europe/Vaduz" , 0x08F393 }, - { (char*) "Europe/Vatican" , 0x08FAFF }, - { (char*) "Europe/Vienna" , 0x09055C }, - { (char*) "Europe/Vilnius" , 0x090E00 }, - { (char*) "Europe/Volgograd" , 0x09167E }, - { (char*) "Europe/Warsaw" , 0x091B1B }, - { (char*) "Europe/Zagreb" , 0x092585 }, - { (char*) "Europe/Zaporozhye" , 0x092D11 }, - { (char*) "Europe/Zurich" , 0x093565 }, - { (char*) "Factory" , 0x093CE6 }, - { (char*) "GB" , 0x093D66 }, - { (char*) "GB-Eire" , 0x094BC2 }, - { (char*) "GMT" , 0x095A1E }, - { (char*) "GMT+0" , 0x095A9C }, - { (char*) "GMT-0" , 0x095B1A }, - { (char*) "GMT0" , 0x095B98 }, - { (char*) "Greenwich" , 0x095C16 }, - { (char*) "Hongkong" , 0x095C94 }, - { (char*) "HST" , 0x096171 }, - { (char*) "Iceland" , 0x0961F0 }, - { (char*) "Indian/Antananarivo" , 0x096290 }, - { (char*) "Indian/Chagos" , 0x096377 }, - { (char*) "Indian/Christmas" , 0x09643C }, - { (char*) "Indian/Cocos" , 0x0964DF }, - { (char*) "Indian/Comoro" , 0x09658B }, - { (char*) "Indian/Kerguelen" , 0x09662C }, - { (char*) "Indian/Mahe" , 0x0966CF }, - { (char*) "Indian/Maldives" , 0x096772 }, - { (char*) "Indian/Mauritius" , 0x096837 }, - { (char*) "Indian/Mayotte" , 0x096926 }, - { (char*) "Indian/Reunion" , 0x0969C7 }, - { (char*) "Iran" , 0x096A6A }, - { (char*) "Israel" , 0x096F56 }, - { (char*) "Jamaica" , 0x0978B6 }, - { (char*) "Japan" , 0x097AA4 }, - { (char*) "Kwajalein" , 0x097BE5 }, - { (char*) "Libya" , 0x097D1F }, - { (char*) "MET" , 0x097F9C }, - { (char*) "Mexico/BajaNorte" , 0x0987D6 }, - { (char*) "Mexico/BajaSur" , 0x099128 }, - { (char*) "Mexico/General" , 0x09959C }, - { (char*) "MST" , 0x099A6E }, - { (char*) "MST7MDT" , 0x099AEC }, - { (char*) "Navajo" , 0x09A3FE }, - { (char*) "NZ" , 0x09ADA6 }, - { (char*) "NZ-CHAT" , 0x09B737 }, - { (char*) "Pacific/Apia" , 0x09BF49 }, - { (char*) "Pacific/Auckland" , 0x09C1AB }, - { (char*) "Pacific/Bougainville" , 0x09CB54 }, - { (char*) "Pacific/Chatham" , 0x09CC6A }, - { (char*) "Pacific/Chuuk" , 0x09D48B }, - { (char*) "Pacific/Easter" , 0x09D5A5 }, - { (char*) "Pacific/Efate" , 0x09DE69 }, - { (char*) "Pacific/Enderbury" , 0x09E081 }, - { (char*) "Pacific/Fakaofo" , 0x09E169 }, - { (char*) "Pacific/Fiji" , 0x09E22F }, - { (char*) "Pacific/Funafuti" , 0x09E46F }, - { (char*) "Pacific/Galapagos" , 0x09E513 }, - { (char*) "Pacific/Gambier" , 0x09E610 }, - { (char*) "Pacific/Guadalcanal" , 0x09E6C1 }, - { (char*) "Pacific/Guam" , 0x09E765 }, - { (char*) "Pacific/Honolulu" , 0x09E95F }, - { (char*) "Pacific/Johnston" , 0x09EABA }, - { (char*) "Pacific/Kanton" , 0x09EC0F }, - { (char*) "Pacific/Kiritimati" , 0x09ED06 }, - { (char*) "Pacific/Kosrae" , 0x09EDFE }, - { (char*) "Pacific/Kwajalein" , 0x09EF61 }, - { (char*) "Pacific/Majuro" , 0x09F0A4 }, - { (char*) "Pacific/Marquesas" , 0x09F1F5 }, - { (char*) "Pacific/Midway" , 0x09F2B1 }, - { (char*) "Pacific/Nauru" , 0x09F3A4 }, - { (char*) "Pacific/Niue" , 0x09F49E }, - { (char*) "Pacific/Norfolk" , 0x09F567 }, - { (char*) "Pacific/Noumea" , 0x09F8D5 }, - { (char*) "Pacific/Pago_Pago" , 0x09FA03 }, - { (char*) "Pacific/Palau" , 0x09FABE }, - { (char*) "Pacific/Pitcairn" , 0x09FB70 }, - { (char*) "Pacific/Pohnpei" , 0x09FC38 }, - { (char*) "Pacific/Ponape" , 0x09FD73 }, - { (char*) "Pacific/Port_Moresby" , 0x09FE17 }, - { (char*) "Pacific/Rarotonga" , 0x09FEEC }, - { (char*) "Pacific/Saipan" , 0x0A0145 }, - { (char*) "Pacific/Samoa" , 0x0A0331 }, - { (char*) "Pacific/Tahiti" , 0x0A03EC }, - { (char*) "Pacific/Tarawa" , 0x0A049E }, - { (char*) "Pacific/Tongatapu" , 0x0A0551 }, - { (char*) "Pacific/Truk" , 0x0A06C3 }, - { (char*) "Pacific/Wake" , 0x0A077B }, - { (char*) "Pacific/Wallis" , 0x0A082A }, - { (char*) "Pacific/Yap" , 0x0A08CE }, - { (char*) "Poland" , 0x0A0986 }, - { (char*) "Portugal" , 0x0A13F0 }, - { (char*) "PRC" , 0x0A21A5 }, - { (char*) "PST8PDT" , 0x0A23E2 }, - { (char*) "ROC" , 0x0A2CF4 }, - { (char*) "ROK" , 0x0A2FF9 }, - { (char*) "Singapore" , 0x0A326E }, - { (char*) "Turkey" , 0x0A340B }, - { (char*) "UCT" , 0x0A3BA4 }, - { (char*) "Universal" , 0x0A3C22 }, - { (char*) "US/Alaska" , 0x0A3CA0 }, - { (char*) "US/Aleutian" , 0x0A45EF }, - { (char*) "US/Arizona" , 0x0A4F2F }, - { (char*) "US/Central" , 0x0A50A3 }, - { (char*) "US/East-Indiana" , 0x0A5EB7 }, - { (char*) "US/Eastern" , 0x0A6555 }, - { (char*) "US/Hawaii" , 0x0A7341 }, - { (char*) "US/Indiana-Starke" , 0x0A7496 }, - { (char*) "US/Michigan" , 0x0A7E2E }, - { (char*) "US/Mountain" , 0x0A86F0 }, - { (char*) "US/Pacific" , 0x0A9098 }, - { (char*) "US/Samoa" , 0x0A9BC8 }, - { (char*) "UTC" , 0x0A9C83 }, - { (char*) "W-SU" , 0x0A9D01 }, - { (char*) "WET" , 0x0AA30C }, - { (char*) "Zulu" , 0x0AAA89 }, + { (char*) "Africa/Casablanca" , 0x001926 }, + { (char*) "Africa/Ceuta" , 0x0022AF }, + { (char*) "Africa/Conakry" , 0x002ACD }, + { (char*) "Africa/Dakar" , 0x002BA9 }, + { (char*) "Africa/Dar_es_Salaam" , 0x002C6B }, + { (char*) "Africa/Djibouti" , 0x002D4C }, + { (char*) "Africa/Douala" , 0x002DED }, + { (char*) "Africa/El_Aaiun" , 0x002E8E }, + { (char*) "Africa/Freetown" , 0x003791 }, + { (char*) "Africa/Gaborone" , 0x00396D }, + { (char*) "Africa/Harare" , 0x003A64 }, + { (char*) "Africa/Johannesburg" , 0x003B05 }, + { (char*) "Africa/Juba" , 0x003C07 }, + { (char*) "Africa/Kampala" , 0x003EBA }, + { (char*) "Africa/Khartoum" , 0x003FC1 }, + { (char*) "Africa/Kigali" , 0x004274 }, + { (char*) "Africa/Kinshasa" , 0x004315 }, + { (char*) "Africa/Lagos" , 0x0043CF }, + { (char*) "Africa/Libreville" , 0x0044C6 }, + { (char*) "Africa/Lome" , 0x004567 }, + { (char*) "Africa/Luanda" , 0x004607 }, + { (char*) "Africa/Lubumbashi" , 0x0046CE }, + { (char*) "Africa/Lusaka" , 0x0047AA }, + { (char*) "Africa/Malabo" , 0x00484B }, + { (char*) "Africa/Maputo" , 0x00490E }, + { (char*) "Africa/Maseru" , 0x0049AF }, + { (char*) "Africa/Mbabane" , 0x004A7B }, + { (char*) "Africa/Mogadishu" , 0x004B1F }, + { (char*) "Africa/Monrovia" , 0x004C00 }, + { (char*) "Africa/Nairobi" , 0x004CDC }, + { (char*) "Africa/Ndjamena" , 0x004DF1 }, + { (char*) "Africa/Niamey" , 0x004EC4 }, + { (char*) "Africa/Nouakchott" , 0x004FA9 }, + { (char*) "Africa/Ouagadougou" , 0x005085 }, + { (char*) "Africa/Porto-Novo" , 0x005125 }, + { (char*) "Africa/Sao_Tome" , 0x0051E8 }, + { (char*) "Africa/Timbuktu" , 0x0052F2 }, + { (char*) "Africa/Tripoli" , 0x005392 }, + { (char*) "Africa/Tunis" , 0x00560F }, + { (char*) "Africa/Windhoek" , 0x0058CC }, + { (char*) "America/Adak" , 0x005C93 }, + { (char*) "America/Anchorage" , 0x0065ED }, + { (char*) "America/Anguilla" , 0x006F4F }, + { (char*) "America/Antigua" , 0x006FEF }, + { (char*) "America/Araguaina" , 0x0070B1 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x00742C }, + { (char*) "America/Argentina/Catamarca" , 0x007873 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x007CC0 }, + { (char*) "America/Argentina/Cordoba" , 0x0080F2 }, + { (char*) "America/Argentina/Jujuy" , 0x00855A }, + { (char*) "America/Argentina/La_Rioja" , 0x00897A }, + { (char*) "America/Argentina/Mendoza" , 0x008DC7 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x009205 }, + { (char*) "America/Argentina/Salta" , 0x009646 }, + { (char*) "America/Argentina/San_Juan" , 0x009A72 }, + { (char*) "America/Argentina/San_Luis" , 0x009EBF }, + { (char*) "America/Argentina/Tucuman" , 0x00A318 }, + { (char*) "America/Argentina/Ushuaia" , 0x00A772 }, + { (char*) "America/Aruba" , 0x00ABB9 }, + { (char*) "America/Asuncion" , 0x00AC7F }, + { (char*) "America/Atikokan" , 0x00B479 }, + { (char*) "America/Atka" , 0x00B5F6 }, + { (char*) "America/Bahia" , 0x00BF36 }, + { (char*) "America/Bahia_Banderas" , 0x00C339 }, + { (char*) "America/Barbados" , 0x00C7D6 }, + { (char*) "America/Belem" , 0x00C996 }, + { (char*) "America/Belize" , 0x00CBE6 }, + { (char*) "America/Blanc-Sablon" , 0x00D240 }, + { (char*) "America/Boa_Vista" , 0x00D392 }, + { (char*) "America/Bogota" , 0x00D60F }, + { (char*) "America/Boise" , 0x00D703 }, + { (char*) "America/Buenos_Aires" , 0x00E099 }, + { (char*) "America/Cambridge_Bay" , 0x00E4CB }, + { (char*) "America/Campo_Grande" , 0x00EDB9 }, + { (char*) "America/Cancun" , 0x00F36D }, + { (char*) "America/Caracas" , 0x00F6C7 }, + { (char*) "America/Catamarca" , 0x00F7CD }, + { (char*) "America/Cayenne" , 0x00FBFF }, + { (char*) "America/Cayman" , 0x00FCC3 }, + { (char*) "America/Chicago" , 0x00FD85 }, + { (char*) "America/Chihuahua" , 0x010BAD }, + { (char*) "America/Ciudad_Juarez" , 0x01101D }, + { (char*) "America/Coral_Harbour" , 0x011647 }, + { (char*) "America/Cordoba" , 0x011709 }, + { (char*) "America/Costa_Rica" , 0x011B3B }, + { (char*) "America/Creston" , 0x011C83 }, + { (char*) "America/Cuiaba" , 0x011D71 }, + { (char*) "America/Curacao" , 0x012302 }, + { (char*) "America/Danmarkshavn" , 0x0123C8 }, + { (char*) "America/Dawson" , 0x0126A8 }, + { (char*) "America/Dawson_Creek" , 0x012D14 }, + { (char*) "America/Denver" , 0x01315A }, + { (char*) "America/Detroit" , 0x013B17 }, + { (char*) "America/Dominica" , 0x0143F2 }, + { (char*) "America/Edmonton" , 0x014492 }, + { (char*) "America/Eirunepe" , 0x014DDF }, + { (char*) "America/El_Salvador" , 0x01507C }, + { (char*) "America/Ensenada" , 0x015168 }, + { (char*) "America/Fort_Nelson" , 0x015ABA }, + { (char*) "America/Fort_Wayne" , 0x01639A }, + { (char*) "America/Fortaleza" , 0x016A38 }, + { (char*) "America/Glace_Bay" , 0x016D28 }, + { (char*) "America/Godthab" , 0x0175DF }, + { (char*) "America/Goose_Bay" , 0x017D5A }, + { (char*) "America/Grand_Turk" , 0x018A10 }, + { (char*) "America/Grenada" , 0x019146 }, + { (char*) "America/Guadeloupe" , 0x0191E6 }, + { (char*) "America/Guatemala" , 0x019286 }, + { (char*) "America/Guayaquil" , 0x0193AA }, + { (char*) "America/Guyana" , 0x0194B0 }, + { (char*) "America/Halifax" , 0x0195B4 }, + { (char*) "America/Havana" , 0x01A33E }, + { (char*) "America/Hermosillo" , 0x01ACBA }, + { (char*) "America/Indiana/Indianapolis" , 0x01AE94 }, + { (char*) "America/Indiana/Knox" , 0x01B54B }, + { (char*) "America/Indiana/Marengo" , 0x01BEF8 }, + { (char*) "America/Indiana/Petersburg" , 0x01C5E5 }, + { (char*) "America/Indiana/Tell_City" , 0x01CD84 }, + { (char*) "America/Indiana/Vevay" , 0x01D448 }, + { (char*) "America/Indiana/Vincennes" , 0x01DA04 }, + { (char*) "America/Indiana/Winamac" , 0x01E0DA }, + { (char*) "America/Indianapolis" , 0x01E7FE }, + { (char*) "America/Inuvik" , 0x01EE9C }, + { (char*) "America/Iqaluit" , 0x01F6D6 }, + { (char*) "America/Jamaica" , 0x01FF95 }, + { (char*) "America/Jujuy" , 0x020183 }, + { (char*) "America/Juneau" , 0x020599 }, + { (char*) "America/Kentucky/Louisville" , 0x020EEA }, + { (char*) "America/Kentucky/Monticello" , 0x0219F8 }, + { (char*) "America/Knox_IN" , 0x022358 }, + { (char*) "America/Kralendijk" , 0x022CF0 }, + { (char*) "America/La_Paz" , 0x022DF2 }, + { (char*) "America/Lima" , 0x022ED8 }, + { (char*) "America/Los_Angeles" , 0x02306C }, + { (char*) "America/Louisville" , 0x023BA3 }, + { (char*) "America/Lower_Princes" , 0x024693 }, + { (char*) "America/Maceio" , 0x024795 }, + { (char*) "America/Managua" , 0x024A8B }, + { (char*) "America/Manaus" , 0x024C45 }, + { (char*) "America/Marigot" , 0x024EAE }, + { (char*) "America/Martinique" , 0x024FB0 }, + { (char*) "America/Matamoros" , 0x0250A4 }, + { (char*) "America/Mazatlan" , 0x025666 }, + { (char*) "America/Mendoza" , 0x025B0C }, + { (char*) "America/Menominee" , 0x025F3E }, + { (char*) "America/Merida" , 0x02684B }, + { (char*) "America/Metlakatla" , 0x026C54 }, + { (char*) "America/Mexico_City" , 0x027206 }, + { (char*) "America/Miquelon" , 0x0276E6 }, + { (char*) "America/Moncton" , 0x027D66 }, + { (char*) "America/Monterrey" , 0x0289DC }, + { (char*) "America/Montevideo" , 0x028DF2 }, + { (char*) "America/Montreal" , 0x0293D6 }, + { (char*) "America/Montserrat" , 0x02A188 }, + { (char*) "America/Nassau" , 0x02A228 }, + { (char*) "America/New_York" , 0x02AB88 }, + { (char*) "America/Nipigon" , 0x02B988 }, + { (char*) "America/Nome" , 0x02C73A }, + { (char*) "America/Noronha" , 0x02D092 }, + { (char*) "America/North_Dakota/Beulah" , 0x02D36C }, + { (char*) "America/North_Dakota/Center" , 0x02DCE9 }, + { (char*) "America/North_Dakota/New_Salem" , 0x02E666 }, + { (char*) "America/Nuuk" , 0x02EFE9 }, + { (char*) "America/Ojinaga" , 0x02F775 }, + { (char*) "America/Panama" , 0x02FD91 }, + { (char*) "America/Pangnirtung" , 0x02FE53 }, + { (char*) "America/Paramaribo" , 0x0306F9 }, + { (char*) "America/Phoenix" , 0x0307FD }, + { (char*) "America/Port-au-Prince" , 0x030989 }, + { (char*) "America/Port_of_Spain" , 0x030F2F }, + { (char*) "America/Porto_Acre" , 0x030FCF }, + { (char*) "America/Porto_Velho" , 0x031241 }, + { (char*) "America/Puerto_Rico" , 0x031487 }, + { (char*) "America/Punta_Arenas" , 0x031589 }, + { (char*) "America/Rainy_River" , 0x031D17 }, + { (char*) "America/Rankin_Inlet" , 0x032857 }, + { (char*) "America/Recife" , 0x03308B }, + { (char*) "America/Regina" , 0x03335F }, + { (char*) "America/Resolute" , 0x033754 }, + { (char*) "America/Rio_Branco" , 0x033F89 }, + { (char*) "America/Rosario" , 0x0341FF }, + { (char*) "America/Santa_Isabel" , 0x034631 }, + { (char*) "America/Santarem" , 0x034F83 }, + { (char*) "America/Santiago" , 0x0351E6 }, + { (char*) "America/Santo_Domingo" , 0x035BD2 }, + { (char*) "America/Sao_Paulo" , 0x035DA8 }, + { (char*) "America/Scoresbysund" , 0x036380 }, + { (char*) "America/Shiprock" , 0x036B17 }, + { (char*) "America/Sitka" , 0x0374BF }, + { (char*) "America/St_Barthelemy" , 0x037DF7 }, + { (char*) "America/St_Johns" , 0x037EF9 }, + { (char*) "America/St_Kitts" , 0x038D6E }, + { (char*) "America/St_Lucia" , 0x038E0E }, + { (char*) "America/St_Thomas" , 0x038ED0 }, + { (char*) "America/St_Vincent" , 0x038F70 }, + { (char*) "America/Swift_Current" , 0x039032 }, + { (char*) "America/Tegucigalpa" , 0x039280 }, + { (char*) "America/Thule" , 0x039388 }, + { (char*) "America/Thunder_Bay" , 0x039980 }, + { (char*) "America/Tijuana" , 0x03A732 }, + { (char*) "America/Toronto" , 0x03B093 }, + { (char*) "America/Tortola" , 0x03BE62 }, + { (char*) "America/Vancouver" , 0x03BF02 }, + { (char*) "America/Virgin" , 0x03CA73 }, + { (char*) "America/Whitehorse" , 0x03CB75 }, + { (char*) "America/Winnipeg" , 0x03D1E1 }, + { (char*) "America/Yakutat" , 0x03DD3E }, + { (char*) "America/Yellowknife" , 0x03E65B }, + { (char*) "Antarctica/Casey" , 0x03EF83 }, + { (char*) "Antarctica/Davis" , 0x03F106 }, + { (char*) "Antarctica/DumontDUrville" , 0x03F232 }, + { (char*) "Antarctica/Macquarie" , 0x03F302 }, + { (char*) "Antarctica/Mawson" , 0x03FBF2 }, + { (char*) "Antarctica/McMurdo" , 0x03FCBD }, + { (char*) "Antarctica/Palmer" , 0x0404B8 }, + { (char*) "Antarctica/Rothera" , 0x040A46 }, + { (char*) "Antarctica/South_Pole" , 0x040AEF }, + { (char*) "Antarctica/Syowa" , 0x041480 }, + { (char*) "Antarctica/Troll" , 0x041528 }, + { (char*) "Antarctica/Vostok" , 0x0419B5 }, + { (char*) "Arctic/Longyearbyen" , 0x041A5E }, + { (char*) "Asia/Aden" , 0x042364 }, + { (char*) "Asia/Almaty" , 0x042407 }, + { (char*) "Asia/Amman" , 0x0427FC }, + { (char*) "Asia/Anadyr" , 0x042DA1 }, + { (char*) "Asia/Aqtau" , 0x043256 }, + { (char*) "Asia/Aqtobe" , 0x043640 }, + { (char*) "Asia/Ashgabat" , 0x043A3E }, + { (char*) "Asia/Ashkhabad" , 0x043CA7 }, + { (char*) "Asia/Atyrau" , 0x043F10 }, + { (char*) "Asia/Baghdad" , 0x044302 }, + { (char*) "Asia/Bahrain" , 0x0446D7 }, + { (char*) "Asia/Baku" , 0x0447C2 }, + { (char*) "Asia/Bangkok" , 0x044C8B }, + { (char*) "Asia/Barnaul" , 0x044D50 }, + { (char*) "Asia/Beirut" , 0x045221 }, + { (char*) "Asia/Bishkek" , 0x045A97 }, + { (char*) "Asia/Brunei" , 0x045E6C }, + { (char*) "Asia/Calcutta" , 0x045F35 }, + { (char*) "Asia/Chita" , 0x04605E }, + { (char*) "Asia/Choibalsan" , 0x046535 }, + { (char*) "Asia/Chongqing" , 0x0468FA }, + { (char*) "Asia/Chungking" , 0x046B37 }, + { (char*) "Asia/Colombo" , 0x046D74 }, + { (char*) "Asia/Dacca" , 0x046EE6 }, + { (char*) "Asia/Damascus" , 0x047035 }, + { (char*) "Asia/Dhaka" , 0x047792 }, + { (char*) "Asia/Dili" , 0x0478E1 }, + { (char*) "Asia/Dubai" , 0x0479C2 }, + { (char*) "Asia/Dushanbe" , 0x047A65 }, + { (char*) "Asia/Famagusta" , 0x047CB2 }, + { (char*) "Asia/Gaza" , 0x0484B9 }, + { (char*) "Asia/Harbin" , 0x0493AF }, + { (char*) "Asia/Hebron" , 0x0495EC }, + { (char*) "Asia/Ho_Chi_Minh" , 0x04A4FD }, + { (char*) "Asia/Hong_Kong" , 0x04A65A }, + { (char*) "Asia/Hovd" , 0x04AB37 }, + { (char*) "Asia/Irkutsk" , 0x04AEDB }, + { (char*) "Asia/Istanbul" , 0x04B3CE }, + { (char*) "Asia/Jakarta" , 0x04BB67 }, + { (char*) "Asia/Jayapura" , 0x04BCFF }, + { (char*) "Asia/Jerusalem" , 0x04BE1E }, + { (char*) "Asia/Kabul" , 0x04C77E }, + { (char*) "Asia/Kamchatka" , 0x04C84C }, + { (char*) "Asia/Karachi" , 0x04CCEA }, + { (char*) "Asia/Kashgar" , 0x04CE71 }, + { (char*) "Asia/Kathmandu" , 0x04CF14 }, + { (char*) "Asia/Katmandu" , 0x04CFE6 }, + { (char*) "Asia/Khandyga" , 0x04D0B8 }, + { (char*) "Asia/Kolkata" , 0x04D5CB }, + { (char*) "Asia/Krasnoyarsk" , 0x04D6F4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x04DBC2 }, + { (char*) "Asia/Kuching" , 0x04DD73 }, + { (char*) "Asia/Kuwait" , 0x04DF62 }, + { (char*) "Asia/Macao" , 0x04E005 }, + { (char*) "Asia/Macau" , 0x04E4DC }, + { (char*) "Asia/Magadan" , 0x04E9B3 }, + { (char*) "Asia/Makassar" , 0x04EE87 }, + { (char*) "Asia/Manila" , 0x04EFDA }, + { (char*) "Asia/Muscat" , 0x04F12E }, + { (char*) "Asia/Nicosia" , 0x04F1D1 }, + { (char*) "Asia/Novokuznetsk" , 0x04F9BD }, + { (char*) "Asia/Novosibirsk" , 0x04FE59 }, + { (char*) "Asia/Omsk" , 0x050330 }, + { (char*) "Asia/Oral" , 0x0507F2 }, + { (char*) "Asia/Phnom_Penh" , 0x050BEC }, + { (char*) "Asia/Pontianak" , 0x050D11 }, + { (char*) "Asia/Pyongyang" , 0x050E94 }, + { (char*) "Asia/Qatar" , 0x050F8D }, + { (char*) "Asia/Qostanay" , 0x051052 }, + { (char*) "Asia/Qyzylorda" , 0x05145D }, + { (char*) "Asia/Rangoon" , 0x051879 }, + { (char*) "Asia/Riyadh" , 0x051983 }, + { (char*) "Asia/Saigon" , 0x051A26 }, + { (char*) "Asia/Sakhalin" , 0x051B83 }, + { (char*) "Asia/Samarkand" , 0x05204B }, + { (char*) "Asia/Seoul" , 0x05229B }, + { (char*) "Asia/Shanghai" , 0x052510 }, + { (char*) "Asia/Singapore" , 0x052759 }, + { (char*) "Asia/Srednekolymsk" , 0x0528F6 }, + { (char*) "Asia/Taipei" , 0x052DCA }, + { (char*) "Asia/Tashkent" , 0x0530CF }, + { (char*) "Asia/Tbilisi" , 0x05332D }, + { (char*) "Asia/Tehran" , 0x053736 }, + { (char*) "Asia/Tel_Aviv" , 0x053C22 }, + { (char*) "Asia/Thimbu" , 0x054582 }, + { (char*) "Asia/Thimphu" , 0x05464B }, + { (char*) "Asia/Tokyo" , 0x054714 }, + { (char*) "Asia/Tomsk" , 0x054855 }, + { (char*) "Asia/Ujung_Pandang" , 0x054D26 }, + { (char*) "Asia/Ulaanbaatar" , 0x054E30 }, + { (char*) "Asia/Ulan_Bator" , 0x0551B9 }, + { (char*) "Asia/Urumqi" , 0x055532 }, + { (char*) "Asia/Ust-Nera" , 0x0555E2 }, + { (char*) "Asia/Vientiane" , 0x055AD8 }, + { (char*) "Asia/Vladivostok" , 0x055C19 }, + { (char*) "Asia/Yakutsk" , 0x0560E2 }, + { (char*) "Asia/Yangon" , 0x0565AA }, + { (char*) "Asia/Yekaterinburg" , 0x0566B4 }, + { (char*) "Asia/Yerevan" , 0x056B9B }, + { (char*) "Atlantic/Azores" , 0x057018 }, + { (char*) "Atlantic/Bermuda" , 0x057DD4 }, + { (char*) "Atlantic/Canary" , 0x05873C }, + { (char*) "Atlantic/Cape_Verde" , 0x058EBF }, + { (char*) "Atlantic/Faeroe" , 0x058FCB }, + { (char*) "Atlantic/Faroe" , 0x0596EE }, + { (char*) "Atlantic/Jan_Mayen" , 0x059E11 }, + { (char*) "Atlantic/Madeira" , 0x05A717 }, + { (char*) "Atlantic/Reykjavik" , 0x05B4E1 }, + { (char*) "Atlantic/South_Georgia" , 0x05B977 }, + { (char*) "Atlantic/St_Helena" , 0x05BA19 }, + { (char*) "Atlantic/Stanley" , 0x05BADB }, + { (char*) "Australia/ACT" , 0x05BF97 }, + { (char*) "Australia/Adelaide" , 0x05C831 }, + { (char*) "Australia/Brisbane" , 0x05D0EC }, + { (char*) "Australia/Broken_Hill" , 0x05D2B2 }, + { (char*) "Australia/Canberra" , 0x05DB8F }, + { (char*) "Australia/Currie" , 0x05E429 }, + { (char*) "Australia/Darwin" , 0x05ED6B }, + { (char*) "Australia/Eucla" , 0x05EECE }, + { (char*) "Australia/Hobart" , 0x05F0BB }, + { (char*) "Australia/LHI" , 0x05FA05 }, + { (char*) "Australia/Lindeman" , 0x060147 }, + { (char*) "Australia/Lord_Howe" , 0x06034D }, + { (char*) "Australia/Melbourne" , 0x060A9F }, + { (char*) "Australia/North" , 0x061341 }, + { (char*) "Australia/NSW" , 0x061492 }, + { (char*) "Australia/Perth" , 0x061D2C }, + { (char*) "Australia/Queensland" , 0x061F14 }, + { (char*) "Australia/South" , 0x0620C3 }, + { (char*) "Australia/Sydney" , 0x06296F }, + { (char*) "Australia/Tasmania" , 0x063225 }, + { (char*) "Australia/Victoria" , 0x063B67 }, + { (char*) "Australia/West" , 0x064401 }, + { (char*) "Australia/Yancowinna" , 0x0645CB }, + { (char*) "Brazil/Acre" , 0x064E8C }, + { (char*) "Brazil/DeNoronha" , 0x0650FE }, + { (char*) "Brazil/East" , 0x0653C8 }, + { (char*) "Brazil/West" , 0x06596A }, + { (char*) "Canada/Atlantic" , 0x065BC4 }, + { (char*) "Canada/Central" , 0x066930 }, + { (char*) "Canada/Eastern" , 0x067470 }, + { (char*) "Canada/Mountain" , 0x068222 }, + { (char*) "Canada/Newfoundland" , 0x068B4A }, + { (char*) "Canada/Pacific" , 0x06999D }, + { (char*) "Canada/Saskatchewan" , 0x06A4F5 }, + { (char*) "Canada/Yukon" , 0x06A8D5 }, + { (char*) "CET" , 0x06AF2F }, + { (char*) "Chile/Continental" , 0x06B769 }, + { (char*) "Chile/EasterIsland" , 0x06C148 }, + { (char*) "CST6CDT" , 0x06C9FF }, + { (char*) "Cuba" , 0x06D311 }, + { (char*) "EET" , 0x06DC8D }, + { (char*) "Egypt" , 0x06E40D }, + { (char*) "Eire" , 0x06ED78 }, + { (char*) "EST" , 0x06FB28 }, + { (char*) "EST5EDT" , 0x06FBA6 }, + { (char*) "Etc/GMT" , 0x0704B8 }, + { (char*) "Etc/GMT+0" , 0x070536 }, + { (char*) "Etc/GMT+1" , 0x0705B4 }, + { (char*) "Etc/GMT+10" , 0x070634 }, + { (char*) "Etc/GMT+11" , 0x0706B5 }, + { (char*) "Etc/GMT+12" , 0x070736 }, + { (char*) "Etc/GMT+2" , 0x0707B7 }, + { (char*) "Etc/GMT+3" , 0x070837 }, + { (char*) "Etc/GMT+4" , 0x0708B7 }, + { (char*) "Etc/GMT+5" , 0x070937 }, + { (char*) "Etc/GMT+6" , 0x0709B7 }, + { (char*) "Etc/GMT+7" , 0x070A37 }, + { (char*) "Etc/GMT+8" , 0x070AB7 }, + { (char*) "Etc/GMT+9" , 0x070B37 }, + { (char*) "Etc/GMT-0" , 0x070BB7 }, + { (char*) "Etc/GMT-1" , 0x070C35 }, + { (char*) "Etc/GMT-10" , 0x070CB6 }, + { (char*) "Etc/GMT-11" , 0x070D38 }, + { (char*) "Etc/GMT-12" , 0x070DBA }, + { (char*) "Etc/GMT-13" , 0x070E3C }, + { (char*) "Etc/GMT-14" , 0x070EBE }, + { (char*) "Etc/GMT-2" , 0x070F40 }, + { (char*) "Etc/GMT-3" , 0x070FC1 }, + { (char*) "Etc/GMT-4" , 0x071042 }, + { (char*) "Etc/GMT-5" , 0x0710C3 }, + { (char*) "Etc/GMT-6" , 0x071144 }, + { (char*) "Etc/GMT-7" , 0x0711C5 }, + { (char*) "Etc/GMT-8" , 0x071246 }, + { (char*) "Etc/GMT-9" , 0x0712C7 }, + { (char*) "Etc/GMT0" , 0x071348 }, + { (char*) "Etc/Greenwich" , 0x0713C6 }, + { (char*) "Etc/UCT" , 0x071444 }, + { (char*) "Etc/Universal" , 0x0714C2 }, + { (char*) "Etc/UTC" , 0x071540 }, + { (char*) "Etc/Zulu" , 0x0715BE }, + { (char*) "Europe/Amsterdam" , 0x07163C }, + { (char*) "Europe/Andorra" , 0x0721A6 }, + { (char*) "Europe/Astrakhan" , 0x072880 }, + { (char*) "Europe/Athens" , 0x072D1D }, + { (char*) "Europe/Belfast" , 0x0735FF }, + { (char*) "Europe/Belgrade" , 0x07445B }, + { (char*) "Europe/Berlin" , 0x074BE7 }, + { (char*) "Europe/Bratislava" , 0x0754FC }, + { (char*) "Europe/Brussels" , 0x075E05 }, + { (char*) "Europe/Bucharest" , 0x076986 }, + { (char*) "Europe/Budapest" , 0x07721A }, + { (char*) "Europe/Busingen" , 0x077B66 }, + { (char*) "Europe/Chisinau" , 0x0782EF }, + { (char*) "Europe/Copenhagen" , 0x078C51 }, + { (char*) "Europe/Dublin" , 0x0794B6 }, + { (char*) "Europe/Gibraltar" , 0x07A266 }, + { (char*) "Europe/Guernsey" , 0x07AE6E }, + { (char*) "Europe/Helsinki" , 0x07BD0E }, + { (char*) "Europe/Isle_of_Man" , 0x07C486 }, + { (char*) "Europe/Istanbul" , 0x07D2D2 }, + { (char*) "Europe/Jersey" , 0x07DA6B }, + { (char*) "Europe/Kaliningrad" , 0x07E90B }, + { (char*) "Europe/Kiev" , 0x07EF00 }, + { (char*) "Europe/Kirov" , 0x07F754 }, + { (char*) "Europe/Kyiv" , 0x07FC0F }, + { (char*) "Europe/Lisbon" , 0x080472 }, + { (char*) "Europe/Ljubljana" , 0x08123A }, + { (char*) "Europe/London" , 0x0819C6 }, + { (char*) "Europe/Luxembourg" , 0x082822 }, + { (char*) "Europe/Madrid" , 0x0833B0 }, + { (char*) "Europe/Malta" , 0x083E02 }, + { (char*) "Europe/Mariehamn" , 0x08484A }, + { (char*) "Europe/Minsk" , 0x084FC2 }, + { (char*) "Europe/Monaco" , 0x0854E9 }, + { (char*) "Europe/Moscow" , 0x086075 }, + { (char*) "Europe/Nicosia" , 0x086694 }, + { (char*) "Europe/Oslo" , 0x086E72 }, + { (char*) "Europe/Paris" , 0x087732 }, + { (char*) "Europe/Podgorica" , 0x0882D0 }, + { (char*) "Europe/Prague" , 0x088A5C }, + { (char*) "Europe/Riga" , 0x089365 }, + { (char*) "Europe/Rome" , 0x089C07 }, + { (char*) "Europe/Samara" , 0x08A664 }, + { (char*) "Europe/San_Marino" , 0x08AB3A }, + { (char*) "Europe/Sarajevo" , 0x08B597 }, + { (char*) "Europe/Saratov" , 0x08BD23 }, + { (char*) "Europe/Simferopol" , 0x08C1D0 }, + { (char*) "Europe/Skopje" , 0x08C79F }, + { (char*) "Europe/Sofia" , 0x08CF2B }, + { (char*) "Europe/Stockholm" , 0x08D754 }, + { (char*) "Europe/Tallinn" , 0x08DED5 }, + { (char*) "Europe/Tirane" , 0x08E745 }, + { (char*) "Europe/Tiraspol" , 0x08EF75 }, + { (char*) "Europe/Ulyanovsk" , 0x08F8D7 }, + { (char*) "Europe/Uzhgorod" , 0x08FDDA }, + { (char*) "Europe/Vaduz" , 0x09062E }, + { (char*) "Europe/Vatican" , 0x090D9A }, + { (char*) "Europe/Vienna" , 0x0917F7 }, + { (char*) "Europe/Vilnius" , 0x09209B }, + { (char*) "Europe/Volgograd" , 0x092919 }, + { (char*) "Europe/Warsaw" , 0x092DE0 }, + { (char*) "Europe/Zagreb" , 0x09384A }, + { (char*) "Europe/Zaporozhye" , 0x093FD6 }, + { (char*) "Europe/Zurich" , 0x09482A }, + { (char*) "Factory" , 0x094FAB }, + { (char*) "GB" , 0x09502B }, + { (char*) "GB-Eire" , 0x095E87 }, + { (char*) "GMT" , 0x096CE3 }, + { (char*) "GMT+0" , 0x096D61 }, + { (char*) "GMT-0" , 0x096DDF }, + { (char*) "GMT0" , 0x096E5D }, + { (char*) "Greenwich" , 0x096EDB }, + { (char*) "Hongkong" , 0x096F59 }, + { (char*) "HST" , 0x097436 }, + { (char*) "Iceland" , 0x0974B5 }, + { (char*) "Indian/Antananarivo" , 0x097555 }, + { (char*) "Indian/Chagos" , 0x09763C }, + { (char*) "Indian/Christmas" , 0x097701 }, + { (char*) "Indian/Cocos" , 0x0977A4 }, + { (char*) "Indian/Comoro" , 0x097850 }, + { (char*) "Indian/Kerguelen" , 0x0978F1 }, + { (char*) "Indian/Mahe" , 0x097994 }, + { (char*) "Indian/Maldives" , 0x097A37 }, + { (char*) "Indian/Mauritius" , 0x097AFC }, + { (char*) "Indian/Mayotte" , 0x097BEB }, + { (char*) "Indian/Reunion" , 0x097C8C }, + { (char*) "Iran" , 0x097D2F }, + { (char*) "Israel" , 0x09821B }, + { (char*) "Jamaica" , 0x098B7B }, + { (char*) "Japan" , 0x098D69 }, + { (char*) "Kwajalein" , 0x098EAA }, + { (char*) "Libya" , 0x098FE4 }, + { (char*) "MET" , 0x099261 }, + { (char*) "Mexico/BajaNorte" , 0x099A9B }, + { (char*) "Mexico/BajaSur" , 0x09A3ED }, + { (char*) "Mexico/General" , 0x09A861 }, + { (char*) "MST" , 0x09AD33 }, + { (char*) "MST7MDT" , 0x09ADB1 }, + { (char*) "Navajo" , 0x09B6C3 }, + { (char*) "NZ" , 0x09C06B }, + { (char*) "NZ-CHAT" , 0x09C9FC }, + { (char*) "Pacific/Apia" , 0x09D20E }, + { (char*) "Pacific/Auckland" , 0x09D470 }, + { (char*) "Pacific/Bougainville" , 0x09DE14 }, + { (char*) "Pacific/Chatham" , 0x09DF2A }, + { (char*) "Pacific/Chuuk" , 0x09E74B }, + { (char*) "Pacific/Easter" , 0x09E865 }, + { (char*) "Pacific/Efate" , 0x09F129 }, + { (char*) "Pacific/Enderbury" , 0x09F341 }, + { (char*) "Pacific/Fakaofo" , 0x09F429 }, + { (char*) "Pacific/Fiji" , 0x09F4EF }, + { (char*) "Pacific/Funafuti" , 0x09F72F }, + { (char*) "Pacific/Galapagos" , 0x09F7D3 }, + { (char*) "Pacific/Gambier" , 0x09F8D0 }, + { (char*) "Pacific/Guadalcanal" , 0x09F981 }, + { (char*) "Pacific/Guam" , 0x09FA25 }, + { (char*) "Pacific/Honolulu" , 0x09FC1F }, + { (char*) "Pacific/Johnston" , 0x09FD7A }, + { (char*) "Pacific/Kanton" , 0x09FECF }, + { (char*) "Pacific/Kiritimati" , 0x09FFC6 }, + { (char*) "Pacific/Kosrae" , 0x0A00BE }, + { (char*) "Pacific/Kwajalein" , 0x0A0221 }, + { (char*) "Pacific/Majuro" , 0x0A0364 }, + { (char*) "Pacific/Marquesas" , 0x0A04B0 }, + { (char*) "Pacific/Midway" , 0x0A056C }, + { (char*) "Pacific/Nauru" , 0x0A065F }, + { (char*) "Pacific/Niue" , 0x0A0759 }, + { (char*) "Pacific/Norfolk" , 0x0A0822 }, + { (char*) "Pacific/Noumea" , 0x0A0B90 }, + { (char*) "Pacific/Pago_Pago" , 0x0A0CBE }, + { (char*) "Pacific/Palau" , 0x0A0D79 }, + { (char*) "Pacific/Pitcairn" , 0x0A0E2B }, + { (char*) "Pacific/Pohnpei" , 0x0A0EF3 }, + { (char*) "Pacific/Ponape" , 0x0A102E }, + { (char*) "Pacific/Port_Moresby" , 0x0A10D2 }, + { (char*) "Pacific/Rarotonga" , 0x0A11A2 }, + { (char*) "Pacific/Saipan" , 0x0A13FB }, + { (char*) "Pacific/Samoa" , 0x0A15E7 }, + { (char*) "Pacific/Tahiti" , 0x0A16A2 }, + { (char*) "Pacific/Tarawa" , 0x0A1754 }, + { (char*) "Pacific/Tongatapu" , 0x0A1807 }, + { (char*) "Pacific/Truk" , 0x0A1979 }, + { (char*) "Pacific/Wake" , 0x0A1A31 }, + { (char*) "Pacific/Wallis" , 0x0A1AE0 }, + { (char*) "Pacific/Yap" , 0x0A1B84 }, + { (char*) "Poland" , 0x0A1C3C }, + { (char*) "Portugal" , 0x0A26A6 }, + { (char*) "PRC" , 0x0A345B }, + { (char*) "PST8PDT" , 0x0A3698 }, + { (char*) "ROC" , 0x0A3FAA }, + { (char*) "ROK" , 0x0A42AF }, + { (char*) "Singapore" , 0x0A4524 }, + { (char*) "Turkey" , 0x0A46C1 }, + { (char*) "UCT" , 0x0A4E5A }, + { (char*) "Universal" , 0x0A4ED8 }, + { (char*) "US/Alaska" , 0x0A4F56 }, + { (char*) "US/Aleutian" , 0x0A58A5 }, + { (char*) "US/Arizona" , 0x0A61E5 }, + { (char*) "US/Central" , 0x0A6359 }, + { (char*) "US/East-Indiana" , 0x0A716D }, + { (char*) "US/Eastern" , 0x0A780B }, + { (char*) "US/Hawaii" , 0x0A85F7 }, + { (char*) "US/Indiana-Starke" , 0x0A874C }, + { (char*) "US/Michigan" , 0x0A90E4 }, + { (char*) "US/Mountain" , 0x0A99A6 }, + { (char*) "US/Pacific" , 0x0AA34E }, + { (char*) "US/Samoa" , 0x0AAE7E }, + { (char*) "UTC" , 0x0AAF39 }, + { (char*) "W-SU" , 0x0AAFB7 }, + { (char*) "WET" , 0x0AB5C2 }, + { (char*) "Zulu" , 0x0ABD3F }, }; -const unsigned char timelib_timezone_db_data_builtin[699143] = { +const unsigned char timelib_timezone_db_data_builtin[703933] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24582,7 +24750,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Africa/Cairo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -24614,95 +24782,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24723,11 +24919,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x59, 0x58, 0x53, 0xA0, 0x59, 0xF5, 0x36, 0x20, 0x5A, 0xB7, 0x02, 0xA0, 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, -0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x4D, 0xCB, 0xA0, +0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, -0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xE7, 0x58, 0x20, +0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, @@ -24775,7 +24971,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, +0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, @@ -24783,7 +24979,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, -0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, @@ -24791,7 +24987,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, +0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, @@ -24799,7 +24995,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, -0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, @@ -24807,7 +25003,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, +0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, @@ -24815,7 +25011,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, -0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, @@ -24823,7 +25019,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, @@ -24831,15 +25027,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, -0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -25082,11 +25278,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, -0x64, 0x4D, 0xCB, 0xA0, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, +0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, -0x72, 0xE7, 0x58, 0x20, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, +0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 0x01, 0x03, 0x02, 0x03, @@ -25127,7 +25323,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, -0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, @@ -25135,7 +25331,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, +0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, @@ -25143,7 +25339,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, -0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, @@ -25151,7 +25347,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, +0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, @@ -25159,7 +25355,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, -0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, @@ -25167,7 +25363,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, +0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, @@ -25175,7 +25371,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, -0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, @@ -25183,15 +25379,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, +0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, @@ -26037,9 +26233,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, -0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x10, -0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, - +0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x1A, +0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, +0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -29888,9 +30084,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, -0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, -0x4B, 0x20, 0x28, 0x57, 0x29, +0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, +0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, +0x54, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -30552,8 +30748,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Godthab */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -30575,74 +30771,102 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -36729,8 +36953,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Nuuk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -36752,75 +36976,103 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, -0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, +0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -37121,9 +37373,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, -0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, -0x29, +0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, +0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -38482,9 +38733,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, -0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, -0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, 0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40764,142 +41014,153 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xBE, 0x2A, 0x18, 0x00, -0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0x04, 0x61, 0x19, 0x90, -0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, 0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, -0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, 0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, -0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, -0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, 0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, -0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, 0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, -0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, 0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, -0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, 0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, -0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, 0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, -0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, -0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, -0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, -0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, 0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, -0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, 0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, -0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, 0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, -0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, -0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, -0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, 0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, -0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, 0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, -0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, -0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, 0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, -0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, 0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, -0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, 0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, -0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, -0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, -0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, -0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, 0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, -0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, 0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, -0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, 0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, -0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, -0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, -0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, 0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, -0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, 0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, -0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, -0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, -0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, -0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, -0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, -0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, -0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, -0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, -0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, -0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, -0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, -0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, -0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, -0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, -0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, -0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, -0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, -0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, -0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, -0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, -0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, -0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, -0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, -0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, -0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, -0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, -0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, -0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, -0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, -0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, -0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, -0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, -0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, -0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, -0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, -0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, -0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, 0x00, 0x64, 0x2C, 0x88, -0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, -0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x88, 0xDE, 0xCE, 0xE0, +0x9E, 0xB8, 0xAF, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x98, 0x91, 0x90, 0xA0, 0xD2, 0x85, 0x80, +0xA2, 0x8A, 0xE8, 0x90, 0xA3, 0x84, 0x06, 0x00, 0xA4, 0x6A, 0xCA, 0x90, 0xA5, 0x35, 0xC3, 0x80, +0xA6, 0x53, 0xE7, 0x10, 0xA7, 0x15, 0xA5, 0x80, 0xA8, 0x33, 0xC9, 0x10, 0xA8, 0xFE, 0xC2, 0x00, +0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xD5, 0x55, 0xE3, 0x10, +0xD6, 0x20, 0xDC, 0x00, 0x04, 0x61, 0x19, 0x90, 0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, +0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, 0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, +0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, 0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, +0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, +0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, 0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, +0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, 0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, +0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, 0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, +0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, 0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, +0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, 0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, +0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, +0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, +0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, 0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, +0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, 0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, +0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, 0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, +0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, +0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, +0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, +0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, +0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, +0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, +0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, +0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, +0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, +0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, +0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, +0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, +0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, +0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, +0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, +0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, +0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, +0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, +0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, +0x7F, 0x98, 0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, +0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, +0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, +0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, +0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, +0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, +0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, +0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, +0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, +0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, +0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, +0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, +0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, +0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, +0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, +0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, +0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, +0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, +0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, +0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, +0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, +0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, +0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, +0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, +0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, +0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, +0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, +0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, +0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, +0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, +0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, +0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, +0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, +0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, +0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, +0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, +0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, +0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, +0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, +0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, +0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, +0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, +0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, +0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, +0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, +0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, +0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, +0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, +0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, +0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, +0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, +0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, +0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, +0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, +0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, +0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, +0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, +0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, +0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, +0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, +0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, +0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, +0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, +0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, +0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, +0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, +0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, +0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, +0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, +0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, +0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, +0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, +0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, +0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, +0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, +0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, +0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -41840,8 +42101,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x60, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, 0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, -0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, +0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43430,15 +43691,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0x29, 0x5C, 0x60, 0x56, 0xF5, 0xC2, 0xF0, 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, -0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, -0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, +0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, +0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, -0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, -0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, +0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43456,7 +43717,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, +0x00, 0x01, 0x30, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, @@ -43517,9 +43778,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, -0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, -0x07, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, -0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, +0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, +0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, +0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, @@ -43530,8 +43791,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, -0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, -0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, +0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, +0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, +0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, +0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, +0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, +0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, +0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, +0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, +0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, +0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, +0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, +0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, +0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, +0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, +0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, +0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, +0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, +0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, +0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, +0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, +0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, +0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, +0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, +0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, +0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, +0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, +0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, +0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, +0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, +0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, +0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, +0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, +0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, +0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, +0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, +0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, +0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, +0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, +0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, +0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, +0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, +0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, +0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, +0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, +0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, +0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, +0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, +0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, +0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, +0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, +0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, +0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, +0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, +0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, +0x94, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, +0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, +0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, +0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, +0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, +0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, +0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, +0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, +0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, +0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, +0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, +0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43541,16 +43879,26 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, -0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, -0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, -0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, -0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, -0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, +0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, +0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, +0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, +0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, +0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43624,14 +43972,14 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, 0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, -0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, -0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, +0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, +0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, 0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, -0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, +0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43649,7 +43997,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, +0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, @@ -43711,9 +44059,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, -0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x56, 0x00, 0x00, 0x00, 0x00, -0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, @@ -43725,8 +44073,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, +0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, +0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, +0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, +0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, +0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, +0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, +0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, +0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, +0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, +0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, +0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, +0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, 0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, 0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, 0x94, 0x10, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, 0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, 0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, 0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, +0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43735,17 +44160,27 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, -0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, -0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, -0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, -0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, +0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, +0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, +0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, +0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, +0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45169,9 +45604,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x13, 0x43, 0x79, -0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46050,9 +46484,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x9A, 0xB0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, -0x36, 0x12, 0x00, 0x00, 0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, -0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, -0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, +0x36, 0x12, 0x00, 0x00, 0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, +0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, +0x6C, 0x20, 0x49, 0x73, /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46654,8 +47088,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, 0x38, 0x0A, 0x00, 0xD2, 0x71, -0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, -0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, +0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -53257,7 +53691,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Egypt */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -53289,95 +53723,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -55153,8 +55615,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, -0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, +0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -57798,8 +58260,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Kirov */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0x00, 0x39, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0x00, 0x39, 0x80, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -57819,57 +58281,60 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, -0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, -0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, -0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, -0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, -0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, -0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, -0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, -0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, -0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, -0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, -0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, -0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, -0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, -0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, -0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, -0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, -0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, -0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, -0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, -0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, -0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, -0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, -0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, -0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, -0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, -0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, -0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, -0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, -0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, -0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, -0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, -0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, -0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, +0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, +0x30, 0x34, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, -0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, -0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, -0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, -0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, -0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, +0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, +0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, +0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, +0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x4D, 0x53, +0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -58005,8 +58470,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, -0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, +0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -62776,8 +63241,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Volgograd */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0xF5, 0x46, 0xDC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0xF5, 0x46, 0xDC, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -62797,58 +63262,61 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, -0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, -0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, -0x08, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, -0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, -0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, -0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, -0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, -0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, -0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, -0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, -0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, +0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, +0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x4D, 0x53, 0x44, +0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, +0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, 0x07, 0x00, 0x00, -0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, -0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, -0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, -0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, +0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, +0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, +0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, +0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, +0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -65776,8 +66244,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, -0x18, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, -0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x13, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, +0x6C, 0x61, 0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66446,9 +66914,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, 0xE3, 0x80, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, -0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, 0x72, 0x73, +0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66683,9 +67150,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x90, 0x01, 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, -0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, -0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, +0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, + /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -69532,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2022.7", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From d9e89416f889258777687bccdd9f1ccc12604ab6 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 23 Mar 2023 10:10:22 +0000 Subject: [PATCH 683/895] Updated to version 2023.1 (2023a) --- ext/date/lib/timezonedb.h | 4337 ++++++++++++++++++++----------------- 1 file changed, 2402 insertions(+), 1935 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 2b4f626f23ec4..4219b12911224 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -19,593 +19,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000A9B }, { (char*) "Africa/Bujumbura" , 0x000B2A }, { (char*) "Africa/Cairo" , 0x000BB9 }, - { (char*) "Africa/Casablanca" , 0x0010C1 }, - { (char*) "Africa/Ceuta" , 0x00184C }, - { (char*) "Africa/Conakry" , 0x001A98 }, - { (char*) "Africa/Dakar" , 0x001B42 }, - { (char*) "Africa/Dar_es_Salaam" , 0x001BE3 }, - { (char*) "Africa/Djibouti" , 0x001C90 }, - { (char*) "Africa/Douala" , 0x001D1F }, - { (char*) "Africa/El_Aaiun" , 0x001DAE }, - { (char*) "Africa/Freetown" , 0x0024E0 }, - { (char*) "Africa/Gaborone" , 0x002630 }, - { (char*) "Africa/Harare" , 0x0026F0 }, - { (char*) "Africa/Johannesburg" , 0x00277F }, - { (char*) "Africa/Juba" , 0x002849 }, - { (char*) "Africa/Kampala" , 0x002A1F }, - { (char*) "Africa/Khartoum" , 0x002AE1 }, - { (char*) "Africa/Kigali" , 0x002CB7 }, - { (char*) "Africa/Kinshasa" , 0x002D46 }, - { (char*) "Africa/Lagos" , 0x002DEE }, - { (char*) "Africa/Libreville" , 0x002EAE }, - { (char*) "Africa/Lome" , 0x002F3D }, - { (char*) "Africa/Luanda" , 0x002FCB }, - { (char*) "Africa/Lubumbashi" , 0x003069 }, - { (char*) "Africa/Lusaka" , 0x003124 }, - { (char*) "Africa/Malabo" , 0x0031B3 }, - { (char*) "Africa/Maputo" , 0x003255 }, - { (char*) "Africa/Maseru" , 0x0032E4 }, - { (char*) "Africa/Mbabane" , 0x00338D }, - { (char*) "Africa/Mogadishu" , 0x00341E }, - { (char*) "Africa/Monrovia" , 0x0034CB }, - { (char*) "Africa/Nairobi" , 0x00357B }, - { (char*) "Africa/Ndjamena" , 0x003646 }, - { (char*) "Africa/Niamey" , 0x0036F2 }, - { (char*) "Africa/Nouakchott" , 0x0037A7 }, - { (char*) "Africa/Ouagadougou" , 0x003851 }, - { (char*) "Africa/Porto-Novo" , 0x0038DF }, - { (char*) "Africa/Sao_Tome" , 0x003981 }, - { (char*) "Africa/Timbuktu" , 0x003A3A }, - { (char*) "Africa/Tripoli" , 0x003AC8 }, - { (char*) "Africa/Tunis" , 0x003C83 }, - { (char*) "Africa/Windhoek" , 0x003E50 }, - { (char*) "America/Adak" , 0x0040DA }, - { (char*) "America/Anchorage" , 0x0044BF }, - { (char*) "America/Anguilla" , 0x0048AF }, - { (char*) "America/Antigua" , 0x00493D }, - { (char*) "America/Araguaina" , 0x0049DE }, - { (char*) "America/Argentina/Buenos_Aires" , 0x004C43 }, - { (char*) "America/Argentina/Catamarca" , 0x004F28 }, - { (char*) "America/Argentina/ComodRivadavia" , 0x005213 }, - { (char*) "America/Argentina/Cordoba" , 0x0054E3 }, - { (char*) "America/Argentina/Jujuy" , 0x0057E9 }, - { (char*) "America/Argentina/La_Rioja" , 0x005AB1 }, - { (char*) "America/Argentina/Mendoza" , 0x005D97 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x006073 }, - { (char*) "America/Argentina/Salta" , 0x006352 }, - { (char*) "America/Argentina/San_Juan" , 0x006626 }, - { (char*) "America/Argentina/San_Luis" , 0x00690C }, - { (char*) "America/Argentina/Tucuman" , 0x006BF2 }, - { (char*) "America/Argentina/Ushuaia" , 0x006EE0 }, - { (char*) "America/Aruba" , 0x0071C5 }, - { (char*) "America/Asuncion" , 0x007268 }, - { (char*) "America/Atikokan" , 0x0075E8 }, - { (char*) "America/Atka" , 0x0076F5 }, - { (char*) "America/Bahia" , 0x007ACA }, - { (char*) "America/Bahia_Banderas" , 0x007D85 }, - { (char*) "America/Barbados" , 0x00807A }, - { (char*) "America/Belem" , 0x00819C }, - { (char*) "America/Belize" , 0x008344 }, - { (char*) "America/Blanc-Sablon" , 0x008765 }, - { (char*) "America/Boa_Vista" , 0x00885A }, - { (char*) "America/Bogota" , 0x008A1B }, - { (char*) "America/Boise" , 0x008ADA }, - { (char*) "America/Buenos_Aires" , 0x008EED }, - { (char*) "America/Cambridge_Bay" , 0x0091BD }, - { (char*) "America/Campo_Grande" , 0x009550 }, - { (char*) "America/Cancun" , 0x009926 }, - { (char*) "America/Caracas" , 0x009B4F }, - { (char*) "America/Catamarca" , 0x009C19 }, - { (char*) "America/Cayenne" , 0x009EE9 }, - { (char*) "America/Cayman" , 0x009F8C }, - { (char*) "America/Chicago" , 0x00A02D }, - { (char*) "America/Chihuahua" , 0x00A727 }, - { (char*) "America/Ciudad_Juarez" , 0x00A9FC }, - { (char*) "America/Coral_Harbour" , 0x00ACF2 }, - { (char*) "America/Cordoba" , 0x00AD93 }, - { (char*) "America/Costa_Rica" , 0x00B063 }, - { (char*) "America/Creston" , 0x00B157 }, - { (char*) "America/Cuiaba" , 0x00B213 }, - { (char*) "America/Curacao" , 0x00B5D0 }, - { (char*) "America/Danmarkshavn" , 0x00B673 }, - { (char*) "America/Dawson" , 0x00B858 }, - { (char*) "America/Dawson_Creek" , 0x00BC7B }, - { (char*) "America/Denver" , 0x00BF52 }, - { (char*) "America/Detroit" , 0x00C385 }, - { (char*) "America/Dominica" , 0x00C72D }, - { (char*) "America/Edmonton" , 0x00C7BB }, - { (char*) "America/Eirunepe" , 0x00CBAE }, - { (char*) "America/El_Salvador" , 0x00CD7D }, - { (char*) "America/Ensenada" , 0x00CE39 }, - { (char*) "America/Fort_Nelson" , 0x00D246 }, - { (char*) "America/Fort_Wayne" , 0x00D80E }, - { (char*) "America/Fortaleza" , 0x00DA2D }, - { (char*) "America/Glace_Bay" , 0x00DC43 }, - { (char*) "America/Godthab" , 0x00DFDA }, - { (char*) "America/Goose_Bay" , 0x00E389 }, - { (char*) "America/Grand_Turk" , 0x00E9E1 }, - { (char*) "America/Grenada" , 0x00ED42 }, - { (char*) "America/Guadeloupe" , 0x00EDD0 }, - { (char*) "America/Guatemala" , 0x00EE5E }, - { (char*) "America/Guayaquil" , 0x00EF3E }, - { (char*) "America/Guyana" , 0x00F00F }, - { (char*) "America/Halifax" , 0x00F0D0 }, - { (char*) "America/Havana" , 0x00F782 }, - { (char*) "America/Hermosillo" , 0x00FBEB }, - { (char*) "America/Indiana/Indianapolis" , 0x00FD1B }, - { (char*) "America/Indiana/Knox" , 0x00FF53 }, - { (char*) "America/Indiana/Marengo" , 0x01036C }, - { (char*) "America/Indiana/Petersburg" , 0x0105C6 }, - { (char*) "America/Indiana/Tell_City" , 0x010890 }, - { (char*) "America/Indiana/Vevay" , 0x010ABA }, - { (char*) "America/Indiana/Vincennes" , 0x010C51 }, - { (char*) "America/Indiana/Winamac" , 0x010EA7 }, - { (char*) "America/Indianapolis" , 0x01112D }, - { (char*) "America/Inuvik" , 0x01134C }, - { (char*) "America/Iqaluit" , 0x01169D }, - { (char*) "America/Jamaica" , 0x011A19 }, - { (char*) "America/Jujuy" , 0x011B78 }, - { (char*) "America/Juneau" , 0x011E36 }, - { (char*) "America/Kentucky/Louisville" , 0x01221C }, - { (char*) "America/Kentucky/Monticello" , 0x012720 }, - { (char*) "America/Knox_IN" , 0x012B0C }, - { (char*) "America/Kralendijk" , 0x012F10 }, - { (char*) "America/La_Paz" , 0x012FCD }, - { (char*) "America/Lima" , 0x013083 }, - { (char*) "America/Los_Angeles" , 0x0131AA }, - { (char*) "America/Louisville" , 0x0136CB }, - { (char*) "America/Lower_Princes" , 0x013BB1 }, - { (char*) "America/Maceio" , 0x013C6E }, - { (char*) "America/Managua" , 0x013E80 }, - { (char*) "America/Manaus" , 0x013FB3 }, - { (char*) "America/Marigot" , 0x01416A }, - { (char*) "America/Martinique" , 0x014227 }, - { (char*) "America/Matamoros" , 0x0142E5 }, - { (char*) "America/Mazatlan" , 0x0144D2 }, - { (char*) "America/Mendoza" , 0x0147DE }, - { (char*) "America/Menominee" , 0x014AAE }, - { (char*) "America/Merida" , 0x014E6E }, - { (char*) "America/Metlakatla" , 0x015119 }, - { (char*) "America/Mexico_City" , 0x01538F }, - { (char*) "America/Miquelon" , 0x0156AE }, - { (char*) "America/Moncton" , 0x0158E0 }, - { (char*) "America/Monterrey" , 0x015ED9 }, - { (char*) "America/Montevideo" , 0x01619F }, - { (char*) "America/Montreal" , 0x016574 }, - { (char*) "America/Montserrat" , 0x016C35 }, - { (char*) "America/Nassau" , 0x016CC3 }, - { (char*) "America/New_York" , 0x0170BD }, - { (char*) "America/Nipigon" , 0x0177AD }, - { (char*) "America/Nome" , 0x017E6E }, - { (char*) "America/Noronha" , 0x018256 }, - { (char*) "America/North_Dakota/Beulah" , 0x018456 }, - { (char*) "America/North_Dakota/Center" , 0x01888A }, - { (char*) "America/North_Dakota/New_Salem" , 0x018C89 }, - { (char*) "America/Nuuk" , 0x01908E }, - { (char*) "America/Ojinaga" , 0x019453 }, - { (char*) "America/Panama" , 0x019740 }, - { (char*) "America/Pangnirtung" , 0x0197E1 }, - { (char*) "America/Paramaribo" , 0x019B44 }, - { (char*) "America/Phoenix" , 0x019C0B }, - { (char*) "America/Port-au-Prince" , 0x019D24 }, - { (char*) "America/Port_of_Spain" , 0x019F65 }, - { (char*) "America/Porto_Acre" , 0x019FF3 }, - { (char*) "America/Porto_Velho" , 0x01A1A1 }, - { (char*) "America/Puerto_Rico" , 0x01A33F }, - { (char*) "America/Punta_Arenas" , 0x01A3FC }, - { (char*) "America/Rainy_River" , 0x01A8DE }, - { (char*) "America/Rankin_Inlet" , 0x01ADF8 }, - { (char*) "America/Recife" , 0x01B141 }, - { (char*) "America/Regina" , 0x01B33B }, - { (char*) "America/Resolute" , 0x01B5DA }, - { (char*) "America/Rio_Branco" , 0x01B924 }, - { (char*) "America/Rosario" , 0x01BAD6 }, - { (char*) "America/Santa_Isabel" , 0x01BDA6 }, - { (char*) "America/Santarem" , 0x01C1B3 }, - { (char*) "America/Santiago" , 0x01C363 }, - { (char*) "America/Santo_Domingo" , 0x01C8CB }, - { (char*) "America/Sao_Paulo" , 0x01CA14 }, - { (char*) "America/Scoresbysund" , 0x01CE0E }, - { (char*) "America/Shiprock" , 0x01D016 }, - { (char*) "America/Sitka" , 0x01D434 }, - { (char*) "America/St_Barthelemy" , 0x01D80F }, - { (char*) "America/St_Johns" , 0x01D8CC }, - { (char*) "America/St_Kitts" , 0x01E050 }, - { (char*) "America/St_Lucia" , 0x01E0DE }, - { (char*) "America/St_Thomas" , 0x01E17F }, - { (char*) "America/St_Vincent" , 0x01E20D }, - { (char*) "America/Swift_Current" , 0x01E2AE }, - { (char*) "America/Tegucigalpa" , 0x01E43C }, - { (char*) "America/Thule" , 0x01E50A }, - { (char*) "America/Thunder_Bay" , 0x01E6EB }, - { (char*) "America/Tijuana" , 0x01EDAC }, - { (char*) "America/Toronto" , 0x01F1C8 }, - { (char*) "America/Tortola" , 0x01F8A6 }, - { (char*) "America/Vancouver" , 0x01F934 }, - { (char*) "America/Virgin" , 0x01FE8B }, - { (char*) "America/Whitehorse" , 0x01FF48 }, - { (char*) "America/Winnipeg" , 0x02036B }, - { (char*) "America/Yakutat" , 0x0208A2 }, - { (char*) "America/Yellowknife" , 0x020C70 }, - { (char*) "Antarctica/Casey" , 0x020FDF }, - { (char*) "Antarctica/Davis" , 0x0210E3 }, - { (char*) "Antarctica/DumontDUrville" , 0x0211B9 }, - { (char*) "Antarctica/Macquarie" , 0x02126D }, - { (char*) "Antarctica/Mawson" , 0x021659 }, - { (char*) "Antarctica/McMurdo" , 0x021703 }, - { (char*) "Antarctica/Palmer" , 0x021A35 }, - { (char*) "Antarctica/Rothera" , 0x021DBE }, - { (char*) "Antarctica/South_Pole" , 0x021E55 }, - { (char*) "Antarctica/Syowa" , 0x022274 }, - { (char*) "Antarctica/Troll" , 0x02230A }, - { (char*) "Antarctica/Vostok" , 0x0223CC }, - { (char*) "Arctic/Longyearbyen" , 0x022463 }, - { (char*) "Asia/Aden" , 0x022730 }, - { (char*) "Asia/Almaty" , 0x0227C1 }, - { (char*) "Asia/Amman" , 0x022A45 }, - { (char*) "Asia/Anadyr" , 0x022DF1 }, - { (char*) "Asia/Aqtau" , 0x0230F7 }, - { (char*) "Asia/Aqtobe" , 0x023376 }, - { (char*) "Asia/Ashgabat" , 0x0235F6 }, - { (char*) "Asia/Ashkhabad" , 0x023779 }, - { (char*) "Asia/Atyrau" , 0x0238FC }, - { (char*) "Asia/Baghdad" , 0x023B85 }, - { (char*) "Asia/Bahrain" , 0x023E07 }, - { (char*) "Asia/Baku" , 0x023EC0 }, - { (char*) "Asia/Bangkok" , 0x0241B4 }, - { (char*) "Asia/Barnaul" , 0x024258 }, - { (char*) "Asia/Beirut" , 0x024563 }, - { (char*) "Asia/Bishkek" , 0x02484B }, - { (char*) "Asia/Brunei" , 0x024AC1 }, - { (char*) "Asia/Calcutta" , 0x024B67 }, - { (char*) "Asia/Chita" , 0x024C4F }, - { (char*) "Asia/Choibalsan" , 0x024F5D }, - { (char*) "Asia/Chongqing" , 0x0251E6 }, - { (char*) "Asia/Chungking" , 0x02537B }, - { (char*) "Asia/Colombo" , 0x025510 }, - { (char*) "Asia/Dacca" , 0x025613 }, - { (char*) "Asia/Damascus" , 0x025706 }, - { (char*) "Asia/Dhaka" , 0x025BE4 }, - { (char*) "Asia/Dili" , 0x025CD7 }, - { (char*) "Asia/Dubai" , 0x025D8D }, - { (char*) "Asia/Dushanbe" , 0x025E1E }, - { (char*) "Asia/Famagusta" , 0x025F98 }, - { (char*) "Asia/Gaza" , 0x02635F }, - { (char*) "Asia/Harbin" , 0x02685F }, - { (char*) "Asia/Hebron" , 0x0269F4 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x026F05 }, - { (char*) "Asia/Hong_Kong" , 0x026FFD }, - { (char*) "Asia/Hovd" , 0x027310 }, - { (char*) "Asia/Irkutsk" , 0x027599 }, - { (char*) "Asia/Istanbul" , 0x0278B7 }, - { (char*) "Asia/Jakarta" , 0x027D73 }, - { (char*) "Asia/Jayapura" , 0x027E84 }, - { (char*) "Asia/Jerusalem" , 0x027F71 }, - { (char*) "Asia/Kabul" , 0x0283AF }, - { (char*) "Asia/Kamchatka" , 0x02845A }, - { (char*) "Asia/Karachi" , 0x02874F }, - { (char*) "Asia/Kashgar" , 0x028865 }, - { (char*) "Asia/Kathmandu" , 0x0288F6 }, - { (char*) "Asia/Katmandu" , 0x0289A3 }, - { (char*) "Asia/Khandyga" , 0x028A50 }, - { (char*) "Asia/Kolkata" , 0x028D81 }, - { (char*) "Asia/Krasnoyarsk" , 0x028E69 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029173 }, - { (char*) "Asia/Kuching" , 0x029293 }, - { (char*) "Asia/Kuwait" , 0x0293ED }, - { (char*) "Asia/Macao" , 0x02947E }, - { (char*) "Asia/Macau" , 0x0297A1 }, - { (char*) "Asia/Magadan" , 0x029AC4 }, - { (char*) "Asia/Makassar" , 0x029DCF }, - { (char*) "Asia/Manila" , 0x029EE2 }, - { (char*) "Asia/Muscat" , 0x029FDC }, - { (char*) "Asia/Nicosia" , 0x02A06D }, - { (char*) "Asia/Novokuznetsk" , 0x02A2E1 }, - { (char*) "Asia/Novosibirsk" , 0x02A5D4 }, - { (char*) "Asia/Omsk" , 0x02A8E5 }, - { (char*) "Asia/Oral" , 0x02ABE3 }, - { (char*) "Asia/Phnom_Penh" , 0x02AE6F }, - { (char*) "Asia/Pontianak" , 0x02AF43 }, - { (char*) "Asia/Pyongyang" , 0x02B05C }, - { (char*) "Asia/Qatar" , 0x02B11F }, - { (char*) "Asia/Qostanay" , 0x02B1C3 }, - { (char*) "Asia/Qyzylorda" , 0x02B450 }, - { (char*) "Asia/Rangoon" , 0x02B6E9 }, - { (char*) "Asia/Riyadh" , 0x02B7B0 }, - { (char*) "Asia/Saigon" , 0x02B841 }, - { (char*) "Asia/Sakhalin" , 0x02B939 }, - { (char*) "Asia/Samarkand" , 0x02BC50 }, - { (char*) "Asia/Seoul" , 0x02BDDB }, - { (char*) "Asia/Shanghai" , 0x02BF86 }, - { (char*) "Asia/Singapore" , 0x02C127 }, - { (char*) "Asia/Srednekolymsk" , 0x02C233 }, - { (char*) "Asia/Taipei" , 0x02C547 }, - { (char*) "Asia/Tashkent" , 0x02C752 }, - { (char*) "Asia/Tbilisi" , 0x02C8DD }, - { (char*) "Asia/Tehran" , 0x02CB5E }, - { (char*) "Asia/Tel_Aviv" , 0x02CE96 }, - { (char*) "Asia/Thimbu" , 0x02D2D4 }, - { (char*) "Asia/Thimphu" , 0x02D37A }, - { (char*) "Asia/Tokyo" , 0x02D420 }, - { (char*) "Asia/Tomsk" , 0x02D501 }, - { (char*) "Asia/Ujung_Pandang" , 0x02D80C }, - { (char*) "Asia/Ulaanbaatar" , 0x02D8D6 }, - { (char*) "Asia/Ulan_Bator" , 0x02DB49 }, - { (char*) "Asia/Urumqi" , 0x02DDA7 }, - { (char*) "Asia/Ust-Nera" , 0x02DE45 }, - { (char*) "Asia/Vientiane" , 0x02E168 }, - { (char*) "Asia/Vladivostok" , 0x02E24E }, - { (char*) "Asia/Yakutsk" , 0x02E553 }, - { (char*) "Asia/Yangon" , 0x02E857 }, - { (char*) "Asia/Yekaterinburg" , 0x02E91E }, - { (char*) "Asia/Yerevan" , 0x02EC30 }, - { (char*) "Atlantic/Azores" , 0x02EF00 }, - { (char*) "Atlantic/Bermuda" , 0x02F4BF }, - { (char*) "Atlantic/Canary" , 0x02F8CB }, - { (char*) "Atlantic/Cape_Verde" , 0x02FAC3 }, - { (char*) "Atlantic/Faeroe" , 0x02FB7E }, - { (char*) "Atlantic/Faroe" , 0x02FD43 }, - { (char*) "Atlantic/Jan_Mayen" , 0x02FF08 }, - { (char*) "Atlantic/Madeira" , 0x0301D5 }, - { (char*) "Atlantic/Reykjavik" , 0x03079D }, - { (char*) "Atlantic/South_Georgia" , 0x030A9A }, - { (char*) "Atlantic/St_Helena" , 0x030B2A }, - { (char*) "Atlantic/Stanley" , 0x030BCB }, - { (char*) "Australia/ACT" , 0x030EEC }, - { (char*) "Australia/Adelaide" , 0x031280 }, - { (char*) "Australia/Brisbane" , 0x031634 }, - { (char*) "Australia/Broken_Hill" , 0x031778 }, - { (char*) "Australia/Canberra" , 0x031B4D }, - { (char*) "Australia/Currie" , 0x031EE1 }, - { (char*) "Australia/Darwin" , 0x0322D8 }, - { (char*) "Australia/Eucla" , 0x0323E0 }, - { (char*) "Australia/Hobart" , 0x03253F }, - { (char*) "Australia/LHI" , 0x03293E }, - { (char*) "Australia/Lindeman" , 0x032BFE }, - { (char*) "Australia/Lord_Howe" , 0x032D6E }, - { (char*) "Australia/Melbourne" , 0x03303E }, - { (char*) "Australia/North" , 0x0333DA }, - { (char*) "Australia/NSW" , 0x0334D0 }, - { (char*) "Australia/Perth" , 0x033864 }, - { (char*) "Australia/Queensland" , 0x0339C0 }, - { (char*) "Australia/South" , 0x033AED }, - { (char*) "Australia/Sydney" , 0x033E92 }, - { (char*) "Australia/Tasmania" , 0x034242 }, - { (char*) "Australia/Victoria" , 0x034639 }, - { (char*) "Australia/West" , 0x0349CD }, - { (char*) "Australia/Yancowinna" , 0x034B0B }, - { (char*) "Brazil/Acre" , 0x034EC4 }, - { (char*) "Brazil/DeNoronha" , 0x035072 }, - { (char*) "Brazil/East" , 0x035262 }, - { (char*) "Brazil/West" , 0x035626 }, - { (char*) "Canada/Atlantic" , 0x0357CE }, - { (char*) "Canada/Central" , 0x035E62 }, - { (char*) "Canada/Eastern" , 0x03637C }, - { (char*) "Canada/Mountain" , 0x036A3D }, - { (char*) "Canada/Newfoundland" , 0x036E13 }, - { (char*) "Canada/Pacific" , 0x037575 }, - { (char*) "Canada/Saskatchewan" , 0x037AB3 }, - { (char*) "Canada/Yukon" , 0x037D3D }, - { (char*) "CET" , 0x03814E }, - { (char*) "Chile/Continental" , 0x0383C7 }, - { (char*) "Chile/EasterIsland" , 0x03891D }, - { (char*) "CST6CDT" , 0x038DBF }, - { (char*) "Cuba" , 0x039182 }, - { (char*) "EET" , 0x0395EB }, - { (char*) "Egypt" , 0x0397E8 }, - { (char*) "Eire" , 0x039CF0 }, - { (char*) "EST" , 0x03A2D4 }, - { (char*) "EST5EDT" , 0x03A34F }, - { (char*) "Etc/GMT" , 0x03A712 }, - { (char*) "Etc/GMT+0" , 0x03A78D }, - { (char*) "Etc/GMT+1" , 0x03A808 }, - { (char*) "Etc/GMT+10" , 0x03A885 }, - { (char*) "Etc/GMT+11" , 0x03A903 }, - { (char*) "Etc/GMT+12" , 0x03A981 }, - { (char*) "Etc/GMT+2" , 0x03A9FF }, - { (char*) "Etc/GMT+3" , 0x03AA7C }, - { (char*) "Etc/GMT+4" , 0x03AAF9 }, - { (char*) "Etc/GMT+5" , 0x03AB76 }, - { (char*) "Etc/GMT+6" , 0x03ABF3 }, - { (char*) "Etc/GMT+7" , 0x03AC70 }, - { (char*) "Etc/GMT+8" , 0x03ACED }, - { (char*) "Etc/GMT+9" , 0x03AD6A }, - { (char*) "Etc/GMT-0" , 0x03ADE7 }, - { (char*) "Etc/GMT-1" , 0x03AE62 }, - { (char*) "Etc/GMT-10" , 0x03AEE0 }, - { (char*) "Etc/GMT-11" , 0x03AF5F }, - { (char*) "Etc/GMT-12" , 0x03AFDE }, - { (char*) "Etc/GMT-13" , 0x03B05D }, - { (char*) "Etc/GMT-14" , 0x03B0DC }, - { (char*) "Etc/GMT-2" , 0x03B15B }, - { (char*) "Etc/GMT-3" , 0x03B1D9 }, - { (char*) "Etc/GMT-4" , 0x03B257 }, - { (char*) "Etc/GMT-5" , 0x03B2D5 }, - { (char*) "Etc/GMT-6" , 0x03B353 }, - { (char*) "Etc/GMT-7" , 0x03B3D1 }, - { (char*) "Etc/GMT-8" , 0x03B44F }, - { (char*) "Etc/GMT-9" , 0x03B4CD }, - { (char*) "Etc/GMT0" , 0x03B54B }, - { (char*) "Etc/Greenwich" , 0x03B5C6 }, - { (char*) "Etc/UCT" , 0x03B641 }, - { (char*) "Etc/Universal" , 0x03B6BC }, - { (char*) "Etc/UTC" , 0x03B737 }, - { (char*) "Etc/Zulu" , 0x03B7B2 }, - { (char*) "Europe/Amsterdam" , 0x03B82D }, - { (char*) "Europe/Andorra" , 0x03BC68 }, - { (char*) "Europe/Astrakhan" , 0x03BDF9 }, - { (char*) "Europe/Athens" , 0x03C0ED }, - { (char*) "Europe/Belfast" , 0x03C3A3 }, - { (char*) "Europe/Belgrade" , 0x03C9EE }, - { (char*) "Europe/Berlin" , 0x03CBD8 }, - { (char*) "Europe/Bratislava" , 0x03CEB9 }, - { (char*) "Europe/Brussels" , 0x03D198 }, - { (char*) "Europe/Bucharest" , 0x03D5F3 }, - { (char*) "Europe/Budapest" , 0x03D894 }, - { (char*) "Europe/Busingen" , 0x03DB9E }, - { (char*) "Europe/Chisinau" , 0x03DDA3 }, - { (char*) "Europe/Copenhagen" , 0x03E0A2 }, - { (char*) "Europe/Dublin" , 0x03E31D }, - { (char*) "Europe/Gibraltar" , 0x03E901 }, - { (char*) "Europe/Guernsey" , 0x03EDD1 }, - { (char*) "Europe/Helsinki" , 0x03F428 }, - { (char*) "Europe/Isle_of_Man" , 0x03F615 }, - { (char*) "Europe/Istanbul" , 0x03FC60 }, - { (char*) "Europe/Jersey" , 0x04011C }, - { (char*) "Europe/Kaliningrad" , 0x040773 }, - { (char*) "Europe/Kiev" , 0x040B1B }, - { (char*) "Europe/Kirov" , 0x040D55 }, - { (char*) "Europe/Kyiv" , 0x04103C }, - { (char*) "Europe/Lisbon" , 0x04128A }, - { (char*) "Europe/Ljubljana" , 0x041857 }, - { (char*) "Europe/London" , 0x041A41 }, - { (char*) "Europe/Luxembourg" , 0x04208C }, - { (char*) "Europe/Madrid" , 0x0424D7 }, - { (char*) "Europe/Malta" , 0x042874 }, - { (char*) "Europe/Mariehamn" , 0x042C20 }, - { (char*) "Europe/Minsk" , 0x042E0D }, - { (char*) "Europe/Monaco" , 0x043141 }, - { (char*) "Europe/Moscow" , 0x0435A7 }, - { (char*) "Europe/Nicosia" , 0x043953 }, - { (char*) "Europe/Oslo" , 0x043BB4 }, - { (char*) "Europe/Paris" , 0x043E64 }, - { (char*) "Europe/Podgorica" , 0x0442C1 }, - { (char*) "Europe/Prague" , 0x0444AB }, - { (char*) "Europe/Riga" , 0x04478A }, - { (char*) "Europe/Rome" , 0x044A4C }, - { (char*) "Europe/Samara" , 0x044E0B }, - { (char*) "Europe/San_Marino" , 0x04510C }, - { (char*) "Europe/Sarajevo" , 0x0454CB }, - { (char*) "Europe/Saratov" , 0x0456B5 }, - { (char*) "Europe/Simferopol" , 0x0459A7 }, - { (char*) "Europe/Skopje" , 0x045D1A }, - { (char*) "Europe/Sofia" , 0x045F04 }, - { (char*) "Europe/Stockholm" , 0x046160 }, - { (char*) "Europe/Tallinn" , 0x04635D }, - { (char*) "Europe/Tirane" , 0x04660C }, - { (char*) "Europe/Tiraspol" , 0x046874 }, - { (char*) "Europe/Ulyanovsk" , 0x046B73 }, - { (char*) "Europe/Uzhgorod" , 0x046E89 }, - { (char*) "Europe/Vaduz" , 0x0470C3 }, - { (char*) "Europe/Vatican" , 0x0472AD }, - { (char*) "Europe/Vienna" , 0x04766C }, - { (char*) "Europe/Vilnius" , 0x04790A }, - { (char*) "Europe/Volgograd" , 0x047BBA }, - { (char*) "Europe/Warsaw" , 0x047EB7 }, - { (char*) "Europe/Zagreb" , 0x04825E }, - { (char*) "Europe/Zaporozhye" , 0x048448 }, - { (char*) "Europe/Zurich" , 0x048682 }, - { (char*) "Factory" , 0x04887F }, - { (char*) "GB" , 0x0488FC }, - { (char*) "GB-Eire" , 0x048F47 }, - { (char*) "GMT" , 0x049592 }, - { (char*) "GMT+0" , 0x04960D }, - { (char*) "GMT-0" , 0x049688 }, - { (char*) "GMT0" , 0x049703 }, - { (char*) "Greenwich" , 0x04977E }, - { (char*) "Hongkong" , 0x0497F9 }, - { (char*) "HST" , 0x049B0C }, - { (char*) "Iceland" , 0x049B88 }, - { (char*) "Indian/Antananarivo" , 0x049C16 }, - { (char*) "Indian/Chagos" , 0x049CC2 }, - { (char*) "Indian/Christmas" , 0x049D66 }, - { (char*) "Indian/Cocos" , 0x049DF7 }, - { (char*) "Indian/Comoro" , 0x049E8F }, - { (char*) "Indian/Kerguelen" , 0x049F1E }, - { (char*) "Indian/Mahe" , 0x049FAF }, - { (char*) "Indian/Maldives" , 0x04A040 }, - { (char*) "Indian/Mauritius" , 0x04A0E4 }, - { (char*) "Indian/Mayotte" , 0x04A1A3 }, - { (char*) "Indian/Reunion" , 0x04A232 }, - { (char*) "Iran" , 0x04A2C3 }, - { (char*) "Israel" , 0x04A5FB }, - { (char*) "Jamaica" , 0x04AA39 }, - { (char*) "Japan" , 0x04AB98 }, - { (char*) "Kwajalein" , 0x04AC79 }, - { (char*) "Libya" , 0x04AD60 }, - { (char*) "MET" , 0x04AF1B }, - { (char*) "Mexico/BajaNorte" , 0x04B194 }, - { (char*) "Mexico/BajaSur" , 0x04B5A1 }, - { (char*) "Mexico/General" , 0x04B87B }, - { (char*) "MST" , 0x04BB8C }, - { (char*) "MST7MDT" , 0x04BC07 }, - { (char*) "Navajo" , 0x04BFCA }, - { (char*) "NZ" , 0x04C3E8 }, - { (char*) "NZ-CHAT" , 0x04C807 }, - { (char*) "Pacific/Apia" , 0x04CB3B }, - { (char*) "Pacific/Auckland" , 0x04CCDE }, - { (char*) "Pacific/Bougainville" , 0x04D115 }, - { (char*) "Pacific/Chatham" , 0x04D1F6 }, - { (char*) "Pacific/Chuuk" , 0x04D539 }, - { (char*) "Pacific/Easter" , 0x04D617 }, - { (char*) "Pacific/Efate" , 0x04DAC6 }, - { (char*) "Pacific/Enderbury" , 0x04DC28 }, - { (char*) "Pacific/Fakaofo" , 0x04DCE0 }, - { (char*) "Pacific/Fiji" , 0x04DD85 }, - { (char*) "Pacific/Funafuti" , 0x04DF1D }, - { (char*) "Pacific/Galapagos" , 0x04DFAF }, - { (char*) "Pacific/Gambier" , 0x04E07B }, - { (char*) "Pacific/Guadalcanal" , 0x04E11A }, - { (char*) "Pacific/Guam" , 0x04E1AC }, - { (char*) "Pacific/Honolulu" , 0x04E316 }, - { (char*) "Pacific/Johnston" , 0x04E405 }, - { (char*) "Pacific/Kanton" , 0x04E4EE }, - { (char*) "Pacific/Kiritimati" , 0x04E5B5 }, - { (char*) "Pacific/Kosrae" , 0x04E67B }, - { (char*) "Pacific/Kwajalein" , 0x04E77F }, - { (char*) "Pacific/Majuro" , 0x04E86F }, - { (char*) "Pacific/Marquesas" , 0x04E972 }, - { (char*) "Pacific/Midway" , 0x04EA1A }, - { (char*) "Pacific/Nauru" , 0x04EADD }, - { (char*) "Pacific/Niue" , 0x04EBA0 }, - { (char*) "Pacific/Norfolk" , 0x04EC46 }, - { (char*) "Pacific/Noumea" , 0x04ED49 }, - { (char*) "Pacific/Pago_Pago" , 0x04EE1B }, - { (char*) "Pacific/Palau" , 0x04EEB9 }, - { (char*) "Pacific/Pitcairn" , 0x04EF59 }, - { (char*) "Pacific/Pohnpei" , 0x04EFFE }, - { (char*) "Pacific/Ponape" , 0x04F0EE }, - { (char*) "Pacific/Port_Moresby" , 0x04F180 }, - { (char*) "Pacific/Rarotonga" , 0x04F243 }, - { (char*) "Pacific/Saipan" , 0x04F3E5 }, - { (char*) "Pacific/Samoa" , 0x04F546 }, - { (char*) "Pacific/Tahiti" , 0x04F5E4 }, - { (char*) "Pacific/Tarawa" , 0x04F684 }, - { (char*) "Pacific/Tongatapu" , 0x04F725 }, - { (char*) "Pacific/Truk" , 0x04F81E }, - { (char*) "Pacific/Wake" , 0x04F8C4 }, - { (char*) "Pacific/Wallis" , 0x04F961 }, - { (char*) "Pacific/Yap" , 0x04F9F3 }, - { (char*) "Poland" , 0x04FA99 }, - { (char*) "Portugal" , 0x04FE40 }, - { (char*) "PRC" , 0x0503FA }, - { (char*) "PST8PDT" , 0x05058F }, - { (char*) "ROC" , 0x050952 }, - { (char*) "ROK" , 0x050B5D }, - { (char*) "Singapore" , 0x050D08 }, - { (char*) "Turkey" , 0x050E14 }, - { (char*) "UCT" , 0x0512D0 }, - { (char*) "Universal" , 0x05134B }, - { (char*) "US/Alaska" , 0x0513C6 }, - { (char*) "US/Aleutian" , 0x0517A3 }, - { (char*) "US/Arizona" , 0x051B78 }, - { (char*) "US/Central" , 0x051C74 }, - { (char*) "US/East-Indiana" , 0x05235A }, - { (char*) "US/Eastern" , 0x052579 }, - { (char*) "US/Hawaii" , 0x052C55 }, - { (char*) "US/Indiana-Starke" , 0x052D3E }, - { (char*) "US/Michigan" , 0x053142 }, - { (char*) "US/Mountain" , 0x0534D1 }, - { (char*) "US/Pacific" , 0x0538EF }, - { (char*) "US/Samoa" , 0x053E09 }, - { (char*) "UTC" , 0x053EA7 }, - { (char*) "W-SU" , 0x053F22 }, - { (char*) "WET" , 0x0542BA }, - { (char*) "Zulu" , 0x0544B4 }, + { (char*) "Africa/Casablanca" , 0x0010E2 }, + { (char*) "Africa/Ceuta" , 0x00186D }, + { (char*) "Africa/Conakry" , 0x001AB9 }, + { (char*) "Africa/Dakar" , 0x001B63 }, + { (char*) "Africa/Dar_es_Salaam" , 0x001C04 }, + { (char*) "Africa/Djibouti" , 0x001CB1 }, + { (char*) "Africa/Douala" , 0x001D40 }, + { (char*) "Africa/El_Aaiun" , 0x001DCF }, + { (char*) "Africa/Freetown" , 0x002501 }, + { (char*) "Africa/Gaborone" , 0x002651 }, + { (char*) "Africa/Harare" , 0x002711 }, + { (char*) "Africa/Johannesburg" , 0x0027A0 }, + { (char*) "Africa/Juba" , 0x00286A }, + { (char*) "Africa/Kampala" , 0x002A40 }, + { (char*) "Africa/Khartoum" , 0x002B02 }, + { (char*) "Africa/Kigali" , 0x002CD8 }, + { (char*) "Africa/Kinshasa" , 0x002D67 }, + { (char*) "Africa/Lagos" , 0x002E0F }, + { (char*) "Africa/Libreville" , 0x002ECF }, + { (char*) "Africa/Lome" , 0x002F5E }, + { (char*) "Africa/Luanda" , 0x002FEC }, + { (char*) "Africa/Lubumbashi" , 0x00308A }, + { (char*) "Africa/Lusaka" , 0x003145 }, + { (char*) "Africa/Malabo" , 0x0031D4 }, + { (char*) "Africa/Maputo" , 0x003276 }, + { (char*) "Africa/Maseru" , 0x003305 }, + { (char*) "Africa/Mbabane" , 0x0033AE }, + { (char*) "Africa/Mogadishu" , 0x00343F }, + { (char*) "Africa/Monrovia" , 0x0034EC }, + { (char*) "Africa/Nairobi" , 0x00359C }, + { (char*) "Africa/Ndjamena" , 0x003667 }, + { (char*) "Africa/Niamey" , 0x003713 }, + { (char*) "Africa/Nouakchott" , 0x0037C8 }, + { (char*) "Africa/Ouagadougou" , 0x003872 }, + { (char*) "Africa/Porto-Novo" , 0x003900 }, + { (char*) "Africa/Sao_Tome" , 0x0039A2 }, + { (char*) "Africa/Timbuktu" , 0x003A5B }, + { (char*) "Africa/Tripoli" , 0x003AE9 }, + { (char*) "Africa/Tunis" , 0x003CA4 }, + { (char*) "Africa/Windhoek" , 0x003E71 }, + { (char*) "America/Adak" , 0x0040FB }, + { (char*) "America/Anchorage" , 0x0044EA }, + { (char*) "America/Anguilla" , 0x0048DA }, + { (char*) "America/Antigua" , 0x004968 }, + { (char*) "America/Araguaina" , 0x004A09 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x004C6E }, + { (char*) "America/Argentina/Catamarca" , 0x004F53 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x00523E }, + { (char*) "America/Argentina/Cordoba" , 0x00550E }, + { (char*) "America/Argentina/Jujuy" , 0x005814 }, + { (char*) "America/Argentina/La_Rioja" , 0x005ADC }, + { (char*) "America/Argentina/Mendoza" , 0x005DC2 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x00609E }, + { (char*) "America/Argentina/Salta" , 0x00637D }, + { (char*) "America/Argentina/San_Juan" , 0x006651 }, + { (char*) "America/Argentina/San_Luis" , 0x006937 }, + { (char*) "America/Argentina/Tucuman" , 0x006C1D }, + { (char*) "America/Argentina/Ushuaia" , 0x006F0B }, + { (char*) "America/Aruba" , 0x0071F0 }, + { (char*) "America/Asuncion" , 0x007293 }, + { (char*) "America/Atikokan" , 0x007613 }, + { (char*) "America/Atka" , 0x007720 }, + { (char*) "America/Bahia" , 0x007AF5 }, + { (char*) "America/Bahia_Banderas" , 0x007DB0 }, + { (char*) "America/Barbados" , 0x0080A5 }, + { (char*) "America/Belem" , 0x0081C7 }, + { (char*) "America/Belize" , 0x00836F }, + { (char*) "America/Blanc-Sablon" , 0x008790 }, + { (char*) "America/Boa_Vista" , 0x008885 }, + { (char*) "America/Bogota" , 0x008A46 }, + { (char*) "America/Boise" , 0x008B05 }, + { (char*) "America/Buenos_Aires" , 0x008F18 }, + { (char*) "America/Cambridge_Bay" , 0x0091E8 }, + { (char*) "America/Campo_Grande" , 0x00957B }, + { (char*) "America/Cancun" , 0x009951 }, + { (char*) "America/Caracas" , 0x009B7A }, + { (char*) "America/Catamarca" , 0x009C44 }, + { (char*) "America/Cayenne" , 0x009F14 }, + { (char*) "America/Cayman" , 0x009FB7 }, + { (char*) "America/Chicago" , 0x00A058 }, + { (char*) "America/Chihuahua" , 0x00A752 }, + { (char*) "America/Ciudad_Juarez" , 0x00AA27 }, + { (char*) "America/Coral_Harbour" , 0x00AD1D }, + { (char*) "America/Cordoba" , 0x00ADBE }, + { (char*) "America/Costa_Rica" , 0x00B08E }, + { (char*) "America/Creston" , 0x00B182 }, + { (char*) "America/Cuiaba" , 0x00B23E }, + { (char*) "America/Curacao" , 0x00B5FB }, + { (char*) "America/Danmarkshavn" , 0x00B69E }, + { (char*) "America/Dawson" , 0x00B883 }, + { (char*) "America/Dawson_Creek" , 0x00BCA6 }, + { (char*) "America/Denver" , 0x00BF7D }, + { (char*) "America/Detroit" , 0x00C3B0 }, + { (char*) "America/Dominica" , 0x00C758 }, + { (char*) "America/Edmonton" , 0x00C7E6 }, + { (char*) "America/Eirunepe" , 0x00CBE1 }, + { (char*) "America/El_Salvador" , 0x00CDB0 }, + { (char*) "America/Ensenada" , 0x00CE6C }, + { (char*) "America/Fort_Nelson" , 0x00D279 }, + { (char*) "America/Fort_Wayne" , 0x00D841 }, + { (char*) "America/Fortaleza" , 0x00DA60 }, + { (char*) "America/Glace_Bay" , 0x00DC76 }, + { (char*) "America/Godthab" , 0x00E00D }, + { (char*) "America/Goose_Bay" , 0x00E3DE }, + { (char*) "America/Grand_Turk" , 0x00EA36 }, + { (char*) "America/Grenada" , 0x00ED97 }, + { (char*) "America/Guadeloupe" , 0x00EE25 }, + { (char*) "America/Guatemala" , 0x00EEB3 }, + { (char*) "America/Guayaquil" , 0x00EF93 }, + { (char*) "America/Guyana" , 0x00F064 }, + { (char*) "America/Halifax" , 0x00F125 }, + { (char*) "America/Havana" , 0x00F7D7 }, + { (char*) "America/Hermosillo" , 0x00FC40 }, + { (char*) "America/Indiana/Indianapolis" , 0x00FD70 }, + { (char*) "America/Indiana/Knox" , 0x00FFA8 }, + { (char*) "America/Indiana/Marengo" , 0x0103C1 }, + { (char*) "America/Indiana/Petersburg" , 0x01061B }, + { (char*) "America/Indiana/Tell_City" , 0x0108E5 }, + { (char*) "America/Indiana/Vevay" , 0x010B0F }, + { (char*) "America/Indiana/Vincennes" , 0x010CA6 }, + { (char*) "America/Indiana/Winamac" , 0x010EFC }, + { (char*) "America/Indianapolis" , 0x011182 }, + { (char*) "America/Inuvik" , 0x0113A1 }, + { (char*) "America/Iqaluit" , 0x0116F2 }, + { (char*) "America/Jamaica" , 0x011A6E }, + { (char*) "America/Jujuy" , 0x011BCD }, + { (char*) "America/Juneau" , 0x011E8B }, + { (char*) "America/Kentucky/Louisville" , 0x012271 }, + { (char*) "America/Kentucky/Monticello" , 0x012775 }, + { (char*) "America/Knox_IN" , 0x012B61 }, + { (char*) "America/Kralendijk" , 0x012F65 }, + { (char*) "America/La_Paz" , 0x013022 }, + { (char*) "America/Lima" , 0x0130D8 }, + { (char*) "America/Los_Angeles" , 0x0131FF }, + { (char*) "America/Louisville" , 0x013720 }, + { (char*) "America/Lower_Princes" , 0x013C06 }, + { (char*) "America/Maceio" , 0x013CC3 }, + { (char*) "America/Managua" , 0x013ED5 }, + { (char*) "America/Manaus" , 0x014008 }, + { (char*) "America/Marigot" , 0x0141BF }, + { (char*) "America/Martinique" , 0x01427C }, + { (char*) "America/Matamoros" , 0x01433A }, + { (char*) "America/Mazatlan" , 0x014527 }, + { (char*) "America/Mendoza" , 0x014833 }, + { (char*) "America/Menominee" , 0x014B03 }, + { (char*) "America/Merida" , 0x014EC3 }, + { (char*) "America/Metlakatla" , 0x01516E }, + { (char*) "America/Mexico_City" , 0x0153E4 }, + { (char*) "America/Miquelon" , 0x015703 }, + { (char*) "America/Moncton" , 0x015935 }, + { (char*) "America/Monterrey" , 0x015F2E }, + { (char*) "America/Montevideo" , 0x0161F4 }, + { (char*) "America/Montreal" , 0x0165C9 }, + { (char*) "America/Montserrat" , 0x016C8A }, + { (char*) "America/Nassau" , 0x016D18 }, + { (char*) "America/New_York" , 0x017112 }, + { (char*) "America/Nipigon" , 0x017802 }, + { (char*) "America/Nome" , 0x017EC3 }, + { (char*) "America/Noronha" , 0x0182AB }, + { (char*) "America/North_Dakota/Beulah" , 0x0184AB }, + { (char*) "America/North_Dakota/Center" , 0x0188DF }, + { (char*) "America/North_Dakota/New_Salem" , 0x018CDE }, + { (char*) "America/Nuuk" , 0x0190E3 }, + { (char*) "America/Ojinaga" , 0x0194C5 }, + { (char*) "America/Panama" , 0x0197B2 }, + { (char*) "America/Pangnirtung" , 0x019853 }, + { (char*) "America/Paramaribo" , 0x019BB6 }, + { (char*) "America/Phoenix" , 0x019C7D }, + { (char*) "America/Port-au-Prince" , 0x019D91 }, + { (char*) "America/Port_of_Spain" , 0x019FD2 }, + { (char*) "America/Porto_Acre" , 0x01A060 }, + { (char*) "America/Porto_Velho" , 0x01A20E }, + { (char*) "America/Puerto_Rico" , 0x01A3AC }, + { (char*) "America/Punta_Arenas" , 0x01A469 }, + { (char*) "America/Rainy_River" , 0x01A94B }, + { (char*) "America/Rankin_Inlet" , 0x01AE65 }, + { (char*) "America/Recife" , 0x01B1AE }, + { (char*) "America/Regina" , 0x01B3A8 }, + { (char*) "America/Resolute" , 0x01B647 }, + { (char*) "America/Rio_Branco" , 0x01B991 }, + { (char*) "America/Rosario" , 0x01BB43 }, + { (char*) "America/Santa_Isabel" , 0x01BE13 }, + { (char*) "America/Santarem" , 0x01C220 }, + { (char*) "America/Santiago" , 0x01C3D0 }, + { (char*) "America/Santo_Domingo" , 0x01C933 }, + { (char*) "America/Sao_Paulo" , 0x01CA7C }, + { (char*) "America/Scoresbysund" , 0x01CE76 }, + { (char*) "America/Shiprock" , 0x01D07E }, + { (char*) "America/Sitka" , 0x01D49C }, + { (char*) "America/St_Barthelemy" , 0x01D877 }, + { (char*) "America/St_Johns" , 0x01D934 }, + { (char*) "America/St_Kitts" , 0x01E0B8 }, + { (char*) "America/St_Lucia" , 0x01E146 }, + { (char*) "America/St_Thomas" , 0x01E1E7 }, + { (char*) "America/St_Vincent" , 0x01E275 }, + { (char*) "America/Swift_Current" , 0x01E316 }, + { (char*) "America/Tegucigalpa" , 0x01E4A4 }, + { (char*) "America/Thule" , 0x01E572 }, + { (char*) "America/Thunder_Bay" , 0x01E753 }, + { (char*) "America/Tijuana" , 0x01EE14 }, + { (char*) "America/Toronto" , 0x01F230 }, + { (char*) "America/Tortola" , 0x01F90E }, + { (char*) "America/Vancouver" , 0x01F99C }, + { (char*) "America/Virgin" , 0x01FEF3 }, + { (char*) "America/Whitehorse" , 0x01FFB0 }, + { (char*) "America/Winnipeg" , 0x0203D3 }, + { (char*) "America/Yakutat" , 0x02090A }, + { (char*) "America/Yellowknife" , 0x020CD8 }, + { (char*) "Antarctica/Casey" , 0x0210AE }, + { (char*) "Antarctica/Davis" , 0x0211B2 }, + { (char*) "Antarctica/DumontDUrville" , 0x021288 }, + { (char*) "Antarctica/Macquarie" , 0x02133C }, + { (char*) "Antarctica/Mawson" , 0x021728 }, + { (char*) "Antarctica/McMurdo" , 0x0217D2 }, + { (char*) "Antarctica/Palmer" , 0x021B04 }, + { (char*) "Antarctica/Rothera" , 0x021E8D }, + { (char*) "Antarctica/South_Pole" , 0x021F24 }, + { (char*) "Antarctica/Syowa" , 0x022343 }, + { (char*) "Antarctica/Troll" , 0x0223D9 }, + { (char*) "Antarctica/Vostok" , 0x02249B }, + { (char*) "Arctic/Longyearbyen" , 0x022532 }, + { (char*) "Asia/Aden" , 0x0227FF }, + { (char*) "Asia/Almaty" , 0x022890 }, + { (char*) "Asia/Amman" , 0x022B0F }, + { (char*) "Asia/Anadyr" , 0x022EBB }, + { (char*) "Asia/Aqtau" , 0x0231C1 }, + { (char*) "Asia/Aqtobe" , 0x023440 }, + { (char*) "Asia/Ashgabat" , 0x0236C0 }, + { (char*) "Asia/Ashkhabad" , 0x023843 }, + { (char*) "Asia/Atyrau" , 0x0239C6 }, + { (char*) "Asia/Baghdad" , 0x023C4F }, + { (char*) "Asia/Bahrain" , 0x023ED1 }, + { (char*) "Asia/Baku" , 0x023F8A }, + { (char*) "Asia/Bangkok" , 0x02427E }, + { (char*) "Asia/Barnaul" , 0x024322 }, + { (char*) "Asia/Beirut" , 0x02462D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[345391] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -833,7 +833,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -897,7 +897,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -905,10 +905,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, -0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0xB7, 0x2E, +0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -949,7 +951,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, +0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, @@ -957,7 +959,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, -0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, @@ -965,7 +967,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, +0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, @@ -973,7 +975,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, -0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, @@ -981,7 +983,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, @@ -989,7 +991,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, @@ -997,7 +999,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, @@ -1005,15 +1007,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -1166,7 +1168,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, -0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, @@ -1174,7 +1176,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, +0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, @@ -1182,7 +1184,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, -0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, @@ -1190,7 +1192,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, +0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, @@ -1198,7 +1200,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, -0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, @@ -1206,7 +1208,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, @@ -1214,7 +1216,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, @@ -1222,15 +1224,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, @@ -1839,8 +1841,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, -0x72, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, -0x6C, 0x61, 0x6E, 0x64, 0x73, +0x72, 0x00, 0x00, 0x00, 0x1A, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, +0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4139,9 +4141,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, 0x00, 0x65, -0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, -0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, -0x28, 0x57, 0x29, +0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, +0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x54, 0x20, +0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4486,9 +4488,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -4532,16 +4534,19 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7466,9 +7471,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -7512,18 +7517,20 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, -0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, +0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, +0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7675,9 +7682,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, -0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, -0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, -0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, +0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, +0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, +0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8414,8 +8421,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, -0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, 0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, +0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9556,14 +9563,21 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, -0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, -0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, +0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, 0x91, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, 0xE8, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, 0xCA, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xE7, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xC9, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, +0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, @@ -9599,18 +9613,18 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, -0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, -0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, -0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, -0x4D, 0x44, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, -0x00, 0x64, 0x2C, 0x88, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x4E, 0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, +0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, +0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, +0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, +0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10069,9 +10083,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x08, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, -0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, -0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11065,7 +11078,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11125,7 +11138,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11133,14 +11216,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, -0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, -0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, -0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, -0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, -0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, - +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, +0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, +0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, +0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, +0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11176,7 +11267,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11237,7 +11328,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11245,14 +11406,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, -0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, -0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, -0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, -0x6B, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, +0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, +0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, +0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12150,8 +12319,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, -0x13, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12748,9 +12916,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, 0x36, 0x12, 0x00, 0x00, -0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, -0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x4B, 0x75, 0x72, 0x69, -0x6C, 0x20, 0x49, 0x73, +0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, +0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, + /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13128,9 +13296,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x03, 0x00, 0x00, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, -0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, -0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16316,7 +16483,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -16380,7 +16547,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -16388,10 +16555,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -17288,9 +17457,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x30, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x4D, 0x54, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, -0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, -0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18339,7 +18507,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -18372,15 +18540,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x01, 0x04, 0x01, 0x03, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x03, 0x01, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x03, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, -0x2B, 0x30, 0x34, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, -0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, -0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, +0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, +0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18418,8 +18587,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, -0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, -0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, +0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -20192,7 +20361,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -20226,15 +20395,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x02, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x02, 0x05, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, -0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, -0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, +0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, +0x35, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -21655,9 +21825,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, -0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x18, 0x4E, -0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, -0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x13, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, +0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22096,9 +22266,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, -0xE3, 0x80, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, -0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0xE3, 0x80, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, +0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22270,9 +22439,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, 0x01, 0xF3, -0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, -0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x50, 0x61, +0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -23705,593 +23873,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000E79 }, { (char*) "Africa/Bujumbura" , 0x000F1A }, { (char*) "Africa/Cairo" , 0x000FBB }, - { (char*) "Africa/Casablanca" , 0x00176A }, - { (char*) "Africa/Ceuta" , 0x0020F3 }, - { (char*) "Africa/Conakry" , 0x002911 }, - { (char*) "Africa/Dakar" , 0x0029ED }, - { (char*) "Africa/Dar_es_Salaam" , 0x002AAF }, - { (char*) "Africa/Djibouti" , 0x002B90 }, - { (char*) "Africa/Douala" , 0x002C31 }, - { (char*) "Africa/El_Aaiun" , 0x002CD2 }, - { (char*) "Africa/Freetown" , 0x0035D5 }, - { (char*) "Africa/Gaborone" , 0x0037B1 }, - { (char*) "Africa/Harare" , 0x0038A8 }, - { (char*) "Africa/Johannesburg" , 0x003949 }, - { (char*) "Africa/Juba" , 0x003A4B }, - { (char*) "Africa/Kampala" , 0x003CFE }, - { (char*) "Africa/Khartoum" , 0x003E05 }, - { (char*) "Africa/Kigali" , 0x0040B8 }, - { (char*) "Africa/Kinshasa" , 0x004159 }, - { (char*) "Africa/Lagos" , 0x004213 }, - { (char*) "Africa/Libreville" , 0x00430A }, - { (char*) "Africa/Lome" , 0x0043AB }, - { (char*) "Africa/Luanda" , 0x00444B }, - { (char*) "Africa/Lubumbashi" , 0x004512 }, - { (char*) "Africa/Lusaka" , 0x0045EE }, - { (char*) "Africa/Malabo" , 0x00468F }, - { (char*) "Africa/Maputo" , 0x004752 }, - { (char*) "Africa/Maseru" , 0x0047F3 }, - { (char*) "Africa/Mbabane" , 0x0048BF }, - { (char*) "Africa/Mogadishu" , 0x004963 }, - { (char*) "Africa/Monrovia" , 0x004A44 }, - { (char*) "Africa/Nairobi" , 0x004B20 }, - { (char*) "Africa/Ndjamena" , 0x004C35 }, - { (char*) "Africa/Niamey" , 0x004D08 }, - { (char*) "Africa/Nouakchott" , 0x004DED }, - { (char*) "Africa/Ouagadougou" , 0x004EC9 }, - { (char*) "Africa/Porto-Novo" , 0x004F69 }, - { (char*) "Africa/Sao_Tome" , 0x00502C }, - { (char*) "Africa/Timbuktu" , 0x005136 }, - { (char*) "Africa/Tripoli" , 0x0051D6 }, - { (char*) "Africa/Tunis" , 0x005453 }, - { (char*) "Africa/Windhoek" , 0x005710 }, - { (char*) "America/Adak" , 0x005AD7 }, - { (char*) "America/Anchorage" , 0x006427 }, - { (char*) "America/Anguilla" , 0x006D89 }, - { (char*) "America/Antigua" , 0x006E29 }, - { (char*) "America/Araguaina" , 0x006EEB }, - { (char*) "America/Argentina/Buenos_Aires" , 0x007266 }, - { (char*) "America/Argentina/Catamarca" , 0x0076AD }, - { (char*) "America/Argentina/ComodRivadavia" , 0x007AFA }, - { (char*) "America/Argentina/Cordoba" , 0x007F2C }, - { (char*) "America/Argentina/Jujuy" , 0x008394 }, - { (char*) "America/Argentina/La_Rioja" , 0x0087B4 }, - { (char*) "America/Argentina/Mendoza" , 0x008C01 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x00903F }, - { (char*) "America/Argentina/Salta" , 0x009480 }, - { (char*) "America/Argentina/San_Juan" , 0x0098AC }, - { (char*) "America/Argentina/San_Luis" , 0x009CF9 }, - { (char*) "America/Argentina/Tucuman" , 0x00A152 }, - { (char*) "America/Argentina/Ushuaia" , 0x00A5AC }, - { (char*) "America/Aruba" , 0x00A9F3 }, - { (char*) "America/Asuncion" , 0x00AAB9 }, - { (char*) "America/Atikokan" , 0x00B2B3 }, - { (char*) "America/Atka" , 0x00B430 }, - { (char*) "America/Bahia" , 0x00BD70 }, - { (char*) "America/Bahia_Banderas" , 0x00C173 }, - { (char*) "America/Barbados" , 0x00C610 }, - { (char*) "America/Belem" , 0x00C7D0 }, - { (char*) "America/Belize" , 0x00CA20 }, - { (char*) "America/Blanc-Sablon" , 0x00D07A }, - { (char*) "America/Boa_Vista" , 0x00D1CC }, - { (char*) "America/Bogota" , 0x00D449 }, - { (char*) "America/Boise" , 0x00D53D }, - { (char*) "America/Buenos_Aires" , 0x00DED3 }, - { (char*) "America/Cambridge_Bay" , 0x00E305 }, - { (char*) "America/Campo_Grande" , 0x00EBF3 }, - { (char*) "America/Cancun" , 0x00F1A7 }, - { (char*) "America/Caracas" , 0x00F501 }, - { (char*) "America/Catamarca" , 0x00F607 }, - { (char*) "America/Cayenne" , 0x00FA39 }, - { (char*) "America/Cayman" , 0x00FAFD }, - { (char*) "America/Chicago" , 0x00FBBF }, - { (char*) "America/Chihuahua" , 0x0109E7 }, - { (char*) "America/Ciudad_Juarez" , 0x010E57 }, - { (char*) "America/Coral_Harbour" , 0x011481 }, - { (char*) "America/Cordoba" , 0x011543 }, - { (char*) "America/Costa_Rica" , 0x011975 }, - { (char*) "America/Creston" , 0x011ABD }, - { (char*) "America/Cuiaba" , 0x011BAB }, - { (char*) "America/Curacao" , 0x01213C }, - { (char*) "America/Danmarkshavn" , 0x012202 }, - { (char*) "America/Dawson" , 0x0124E2 }, - { (char*) "America/Dawson_Creek" , 0x012B4E }, - { (char*) "America/Denver" , 0x012F94 }, - { (char*) "America/Detroit" , 0x013951 }, - { (char*) "America/Dominica" , 0x01422C }, - { (char*) "America/Edmonton" , 0x0142CC }, - { (char*) "America/Eirunepe" , 0x014C11 }, - { (char*) "America/El_Salvador" , 0x014EAE }, - { (char*) "America/Ensenada" , 0x014F9A }, - { (char*) "America/Fort_Nelson" , 0x0158EC }, - { (char*) "America/Fort_Wayne" , 0x0161CC }, - { (char*) "America/Fortaleza" , 0x01686A }, - { (char*) "America/Glace_Bay" , 0x016B5A }, - { (char*) "America/Godthab" , 0x017411 }, - { (char*) "America/Goose_Bay" , 0x0179C5 }, - { (char*) "America/Grand_Turk" , 0x01867B }, - { (char*) "America/Grenada" , 0x018DB1 }, - { (char*) "America/Guadeloupe" , 0x018E51 }, - { (char*) "America/Guatemala" , 0x018EF1 }, - { (char*) "America/Guayaquil" , 0x019015 }, - { (char*) "America/Guyana" , 0x01911B }, - { (char*) "America/Halifax" , 0x01921F }, - { (char*) "America/Havana" , 0x019FA9 }, - { (char*) "America/Hermosillo" , 0x01A925 }, - { (char*) "America/Indiana/Indianapolis" , 0x01AAFF }, - { (char*) "America/Indiana/Knox" , 0x01B1B6 }, - { (char*) "America/Indiana/Marengo" , 0x01BB63 }, - { (char*) "America/Indiana/Petersburg" , 0x01C250 }, - { (char*) "America/Indiana/Tell_City" , 0x01C9EF }, - { (char*) "America/Indiana/Vevay" , 0x01D0B3 }, - { (char*) "America/Indiana/Vincennes" , 0x01D66F }, - { (char*) "America/Indiana/Winamac" , 0x01DD45 }, - { (char*) "America/Indianapolis" , 0x01E469 }, - { (char*) "America/Inuvik" , 0x01EB07 }, - { (char*) "America/Iqaluit" , 0x01F341 }, - { (char*) "America/Jamaica" , 0x01FC00 }, - { (char*) "America/Jujuy" , 0x01FDEE }, - { (char*) "America/Juneau" , 0x020204 }, - { (char*) "America/Kentucky/Louisville" , 0x020B55 }, - { (char*) "America/Kentucky/Monticello" , 0x021663 }, - { (char*) "America/Knox_IN" , 0x021FC3 }, - { (char*) "America/Kralendijk" , 0x02295B }, - { (char*) "America/La_Paz" , 0x022A5D }, - { (char*) "America/Lima" , 0x022B43 }, - { (char*) "America/Los_Angeles" , 0x022CD7 }, - { (char*) "America/Louisville" , 0x02380E }, - { (char*) "America/Lower_Princes" , 0x0242FE }, - { (char*) "America/Maceio" , 0x024400 }, - { (char*) "America/Managua" , 0x0246F6 }, - { (char*) "America/Manaus" , 0x0248B0 }, - { (char*) "America/Marigot" , 0x024B19 }, - { (char*) "America/Martinique" , 0x024C1B }, - { (char*) "America/Matamoros" , 0x024D0F }, - { (char*) "America/Mazatlan" , 0x0252D1 }, - { (char*) "America/Mendoza" , 0x025777 }, - { (char*) "America/Menominee" , 0x025BA9 }, - { (char*) "America/Merida" , 0x0264B6 }, - { (char*) "America/Metlakatla" , 0x0268BF }, - { (char*) "America/Mexico_City" , 0x026E71 }, - { (char*) "America/Miquelon" , 0x027351 }, - { (char*) "America/Moncton" , 0x0279D1 }, - { (char*) "America/Monterrey" , 0x028647 }, - { (char*) "America/Montevideo" , 0x028A5D }, - { (char*) "America/Montreal" , 0x029041 }, - { (char*) "America/Montserrat" , 0x029DF3 }, - { (char*) "America/Nassau" , 0x029E93 }, - { (char*) "America/New_York" , 0x02A7F3 }, - { (char*) "America/Nipigon" , 0x02B5F3 }, - { (char*) "America/Nome" , 0x02C3A5 }, - { (char*) "America/Noronha" , 0x02CCFD }, - { (char*) "America/North_Dakota/Beulah" , 0x02CFD7 }, - { (char*) "America/North_Dakota/Center" , 0x02D954 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E2D1 }, - { (char*) "America/Nuuk" , 0x02EC54 }, - { (char*) "America/Ojinaga" , 0x02F21E }, - { (char*) "America/Panama" , 0x02F83A }, - { (char*) "America/Pangnirtung" , 0x02F8FC }, - { (char*) "America/Paramaribo" , 0x0301A2 }, - { (char*) "America/Phoenix" , 0x0302A6 }, - { (char*) "America/Port-au-Prince" , 0x030437 }, - { (char*) "America/Port_of_Spain" , 0x0309DD }, - { (char*) "America/Porto_Acre" , 0x030A7D }, - { (char*) "America/Porto_Velho" , 0x030CEF }, - { (char*) "America/Puerto_Rico" , 0x030F35 }, - { (char*) "America/Punta_Arenas" , 0x031037 }, - { (char*) "America/Rainy_River" , 0x0317C5 }, - { (char*) "America/Rankin_Inlet" , 0x032305 }, - { (char*) "America/Recife" , 0x032B39 }, - { (char*) "America/Regina" , 0x032E0D }, - { (char*) "America/Resolute" , 0x033202 }, - { (char*) "America/Rio_Branco" , 0x033A37 }, - { (char*) "America/Rosario" , 0x033CAD }, - { (char*) "America/Santa_Isabel" , 0x0340DF }, - { (char*) "America/Santarem" , 0x034A31 }, - { (char*) "America/Santiago" , 0x034C94 }, - { (char*) "America/Santo_Domingo" , 0x035685 }, - { (char*) "America/Sao_Paulo" , 0x03585B }, - { (char*) "America/Scoresbysund" , 0x035E33 }, - { (char*) "America/Shiprock" , 0x0365CA }, - { (char*) "America/Sitka" , 0x036F72 }, - { (char*) "America/St_Barthelemy" , 0x0378AA }, - { (char*) "America/St_Johns" , 0x0379AC }, - { (char*) "America/St_Kitts" , 0x038821 }, - { (char*) "America/St_Lucia" , 0x0388C1 }, - { (char*) "America/St_Thomas" , 0x038983 }, - { (char*) "America/St_Vincent" , 0x038A23 }, - { (char*) "America/Swift_Current" , 0x038AE5 }, - { (char*) "America/Tegucigalpa" , 0x038D33 }, - { (char*) "America/Thule" , 0x038E3B }, - { (char*) "America/Thunder_Bay" , 0x039433 }, - { (char*) "America/Tijuana" , 0x03A1E5 }, - { (char*) "America/Toronto" , 0x03AB46 }, - { (char*) "America/Tortola" , 0x03B915 }, - { (char*) "America/Vancouver" , 0x03B9B5 }, - { (char*) "America/Virgin" , 0x03C526 }, - { (char*) "America/Whitehorse" , 0x03C628 }, - { (char*) "America/Winnipeg" , 0x03CC94 }, - { (char*) "America/Yakutat" , 0x03D7F1 }, - { (char*) "America/Yellowknife" , 0x03E10E }, - { (char*) "Antarctica/Casey" , 0x03E989 }, - { (char*) "Antarctica/Davis" , 0x03EB0C }, - { (char*) "Antarctica/DumontDUrville" , 0x03EC38 }, - { (char*) "Antarctica/Macquarie" , 0x03ED08 }, - { (char*) "Antarctica/Mawson" , 0x03F5F8 }, - { (char*) "Antarctica/McMurdo" , 0x03F6C3 }, - { (char*) "Antarctica/Palmer" , 0x03FEBE }, - { (char*) "Antarctica/Rothera" , 0x04044C }, - { (char*) "Antarctica/South_Pole" , 0x0404F5 }, - { (char*) "Antarctica/Syowa" , 0x040E86 }, - { (char*) "Antarctica/Troll" , 0x040F2E }, - { (char*) "Antarctica/Vostok" , 0x0413BB }, - { (char*) "Arctic/Longyearbyen" , 0x041464 }, - { (char*) "Asia/Aden" , 0x041D6A }, - { (char*) "Asia/Almaty" , 0x041E0D }, - { (char*) "Asia/Amman" , 0x042207 }, - { (char*) "Asia/Anadyr" , 0x0427AC }, - { (char*) "Asia/Aqtau" , 0x042C61 }, - { (char*) "Asia/Aqtobe" , 0x04304B }, - { (char*) "Asia/Ashgabat" , 0x043449 }, - { (char*) "Asia/Ashkhabad" , 0x0436B2 }, - { (char*) "Asia/Atyrau" , 0x04391B }, - { (char*) "Asia/Baghdad" , 0x043D0D }, - { (char*) "Asia/Bahrain" , 0x0440E2 }, - { (char*) "Asia/Baku" , 0x0441CD }, - { (char*) "Asia/Bangkok" , 0x044696 }, - { (char*) "Asia/Barnaul" , 0x04475B }, - { (char*) "Asia/Beirut" , 0x044C2C }, - { (char*) "Asia/Bishkek" , 0x0454A2 }, - { (char*) "Asia/Brunei" , 0x045877 }, - { (char*) "Asia/Calcutta" , 0x045940 }, - { (char*) "Asia/Chita" , 0x045A69 }, - { (char*) "Asia/Choibalsan" , 0x045F40 }, - { (char*) "Asia/Chongqing" , 0x046305 }, - { (char*) "Asia/Chungking" , 0x046542 }, - { (char*) "Asia/Colombo" , 0x04677F }, - { (char*) "Asia/Dacca" , 0x0468F1 }, - { (char*) "Asia/Damascus" , 0x046A40 }, - { (char*) "Asia/Dhaka" , 0x04719D }, - { (char*) "Asia/Dili" , 0x0472EC }, - { (char*) "Asia/Dubai" , 0x0473CD }, - { (char*) "Asia/Dushanbe" , 0x047470 }, - { (char*) "Asia/Famagusta" , 0x0476BD }, - { (char*) "Asia/Gaza" , 0x047EC4 }, - { (char*) "Asia/Harbin" , 0x048850 }, - { (char*) "Asia/Hebron" , 0x048A8D }, - { (char*) "Asia/Ho_Chi_Minh" , 0x049434 }, - { (char*) "Asia/Hong_Kong" , 0x049591 }, - { (char*) "Asia/Hovd" , 0x049A6E }, - { (char*) "Asia/Irkutsk" , 0x049E12 }, - { (char*) "Asia/Istanbul" , 0x04A305 }, - { (char*) "Asia/Jakarta" , 0x04AA9E }, - { (char*) "Asia/Jayapura" , 0x04AC36 }, - { (char*) "Asia/Jerusalem" , 0x04AD55 }, - { (char*) "Asia/Kabul" , 0x04B6B5 }, - { (char*) "Asia/Kamchatka" , 0x04B783 }, - { (char*) "Asia/Karachi" , 0x04BC21 }, - { (char*) "Asia/Kashgar" , 0x04BDA8 }, - { (char*) "Asia/Kathmandu" , 0x04BE4B }, - { (char*) "Asia/Katmandu" , 0x04BF1D }, - { (char*) "Asia/Khandyga" , 0x04BFEF }, - { (char*) "Asia/Kolkata" , 0x04C502 }, - { (char*) "Asia/Krasnoyarsk" , 0x04C62B }, - { (char*) "Asia/Kuala_Lumpur" , 0x04CAF9 }, - { (char*) "Asia/Kuching" , 0x04CCAA }, - { (char*) "Asia/Kuwait" , 0x04CE99 }, - { (char*) "Asia/Macao" , 0x04CF3C }, - { (char*) "Asia/Macau" , 0x04D413 }, - { (char*) "Asia/Magadan" , 0x04D8EA }, - { (char*) "Asia/Makassar" , 0x04DDBE }, - { (char*) "Asia/Manila" , 0x04DF11 }, - { (char*) "Asia/Muscat" , 0x04E065 }, - { (char*) "Asia/Nicosia" , 0x04E108 }, - { (char*) "Asia/Novokuznetsk" , 0x04E8F9 }, - { (char*) "Asia/Novosibirsk" , 0x04ED95 }, - { (char*) "Asia/Omsk" , 0x04F26C }, - { (char*) "Asia/Oral" , 0x04F72E }, - { (char*) "Asia/Phnom_Penh" , 0x04FB28 }, - { (char*) "Asia/Pontianak" , 0x04FC4D }, - { (char*) "Asia/Pyongyang" , 0x04FDD0 }, - { (char*) "Asia/Qatar" , 0x04FEC9 }, - { (char*) "Asia/Qostanay" , 0x04FF8E }, - { (char*) "Asia/Qyzylorda" , 0x050399 }, - { (char*) "Asia/Rangoon" , 0x0507B5 }, - { (char*) "Asia/Riyadh" , 0x0508BF }, - { (char*) "Asia/Saigon" , 0x050962 }, - { (char*) "Asia/Sakhalin" , 0x050ABF }, - { (char*) "Asia/Samarkand" , 0x050F87 }, - { (char*) "Asia/Seoul" , 0x0511D7 }, - { (char*) "Asia/Shanghai" , 0x05144C }, - { (char*) "Asia/Singapore" , 0x051695 }, - { (char*) "Asia/Srednekolymsk" , 0x051832 }, - { (char*) "Asia/Taipei" , 0x051D0A }, - { (char*) "Asia/Tashkent" , 0x05200F }, - { (char*) "Asia/Tbilisi" , 0x05226D }, - { (char*) "Asia/Tehran" , 0x052676 }, - { (char*) "Asia/Tel_Aviv" , 0x052B62 }, - { (char*) "Asia/Thimbu" , 0x0534C2 }, - { (char*) "Asia/Thimphu" , 0x05358B }, - { (char*) "Asia/Tokyo" , 0x053654 }, - { (char*) "Asia/Tomsk" , 0x053795 }, - { (char*) "Asia/Ujung_Pandang" , 0x053C66 }, - { (char*) "Asia/Ulaanbaatar" , 0x053D70 }, - { (char*) "Asia/Ulan_Bator" , 0x0540FE }, - { (char*) "Asia/Urumqi" , 0x054477 }, - { (char*) "Asia/Ust-Nera" , 0x054527 }, - { (char*) "Asia/Vientiane" , 0x054A1D }, - { (char*) "Asia/Vladivostok" , 0x054B5E }, - { (char*) "Asia/Yakutsk" , 0x055027 }, - { (char*) "Asia/Yangon" , 0x0554EF }, - { (char*) "Asia/Yekaterinburg" , 0x0555F9 }, - { (char*) "Asia/Yerevan" , 0x055AE0 }, - { (char*) "Atlantic/Azores" , 0x055F5D }, - { (char*) "Atlantic/Bermuda" , 0x056D19 }, - { (char*) "Atlantic/Canary" , 0x057681 }, - { (char*) "Atlantic/Cape_Verde" , 0x057E04 }, - { (char*) "Atlantic/Faeroe" , 0x057F10 }, - { (char*) "Atlantic/Faroe" , 0x058633 }, - { (char*) "Atlantic/Jan_Mayen" , 0x058D56 }, - { (char*) "Atlantic/Madeira" , 0x05965C }, - { (char*) "Atlantic/Reykjavik" , 0x05A426 }, - { (char*) "Atlantic/South_Georgia" , 0x05A8BC }, - { (char*) "Atlantic/St_Helena" , 0x05A95E }, - { (char*) "Atlantic/Stanley" , 0x05AA20 }, - { (char*) "Australia/ACT" , 0x05AEDC }, - { (char*) "Australia/Adelaide" , 0x05B776 }, - { (char*) "Australia/Brisbane" , 0x05C031 }, - { (char*) "Australia/Broken_Hill" , 0x05C1F7 }, - { (char*) "Australia/Canberra" , 0x05CAD4 }, - { (char*) "Australia/Currie" , 0x05D36E }, - { (char*) "Australia/Darwin" , 0x05DCB0 }, - { (char*) "Australia/Eucla" , 0x05DE13 }, - { (char*) "Australia/Hobart" , 0x05E000 }, - { (char*) "Australia/LHI" , 0x05E94A }, - { (char*) "Australia/Lindeman" , 0x05F08C }, - { (char*) "Australia/Lord_Howe" , 0x05F292 }, - { (char*) "Australia/Melbourne" , 0x05F9E4 }, - { (char*) "Australia/North" , 0x060286 }, - { (char*) "Australia/NSW" , 0x0603D7 }, - { (char*) "Australia/Perth" , 0x060C71 }, - { (char*) "Australia/Queensland" , 0x060E59 }, - { (char*) "Australia/South" , 0x061008 }, - { (char*) "Australia/Sydney" , 0x0618B4 }, - { (char*) "Australia/Tasmania" , 0x06216A }, - { (char*) "Australia/Victoria" , 0x062AAC }, - { (char*) "Australia/West" , 0x063346 }, - { (char*) "Australia/Yancowinna" , 0x063510 }, - { (char*) "Brazil/Acre" , 0x063DD1 }, - { (char*) "Brazil/DeNoronha" , 0x064043 }, - { (char*) "Brazil/East" , 0x06430D }, - { (char*) "Brazil/West" , 0x0648AF }, - { (char*) "Canada/Atlantic" , 0x064B09 }, - { (char*) "Canada/Central" , 0x065875 }, - { (char*) "Canada/Eastern" , 0x0663B5 }, - { (char*) "Canada/Mountain" , 0x067167 }, - { (char*) "Canada/Newfoundland" , 0x067A8F }, - { (char*) "Canada/Pacific" , 0x0688E2 }, - { (char*) "Canada/Saskatchewan" , 0x06943A }, - { (char*) "Canada/Yukon" , 0x06981A }, - { (char*) "CET" , 0x069E74 }, - { (char*) "Chile/Continental" , 0x06A6AE }, - { (char*) "Chile/EasterIsland" , 0x06B08D }, - { (char*) "CST6CDT" , 0x06B944 }, - { (char*) "Cuba" , 0x06C256 }, - { (char*) "EET" , 0x06CBD2 }, - { (char*) "Egypt" , 0x06D352 }, - { (char*) "Eire" , 0x06DB01 }, - { (char*) "EST" , 0x06E8B1 }, - { (char*) "EST5EDT" , 0x06E92F }, - { (char*) "Etc/GMT" , 0x06F241 }, - { (char*) "Etc/GMT+0" , 0x06F2BF }, - { (char*) "Etc/GMT+1" , 0x06F33D }, - { (char*) "Etc/GMT+10" , 0x06F3BD }, - { (char*) "Etc/GMT+11" , 0x06F43E }, - { (char*) "Etc/GMT+12" , 0x06F4BF }, - { (char*) "Etc/GMT+2" , 0x06F540 }, - { (char*) "Etc/GMT+3" , 0x06F5C0 }, - { (char*) "Etc/GMT+4" , 0x06F640 }, - { (char*) "Etc/GMT+5" , 0x06F6C0 }, - { (char*) "Etc/GMT+6" , 0x06F740 }, - { (char*) "Etc/GMT+7" , 0x06F7C0 }, - { (char*) "Etc/GMT+8" , 0x06F840 }, - { (char*) "Etc/GMT+9" , 0x06F8C0 }, - { (char*) "Etc/GMT-0" , 0x06F940 }, - { (char*) "Etc/GMT-1" , 0x06F9BE }, - { (char*) "Etc/GMT-10" , 0x06FA3F }, - { (char*) "Etc/GMT-11" , 0x06FAC1 }, - { (char*) "Etc/GMT-12" , 0x06FB43 }, - { (char*) "Etc/GMT-13" , 0x06FBC5 }, - { (char*) "Etc/GMT-14" , 0x06FC47 }, - { (char*) "Etc/GMT-2" , 0x06FCC9 }, - { (char*) "Etc/GMT-3" , 0x06FD4A }, - { (char*) "Etc/GMT-4" , 0x06FDCB }, - { (char*) "Etc/GMT-5" , 0x06FE4C }, - { (char*) "Etc/GMT-6" , 0x06FECD }, - { (char*) "Etc/GMT-7" , 0x06FF4E }, - { (char*) "Etc/GMT-8" , 0x06FFCF }, - { (char*) "Etc/GMT-9" , 0x070050 }, - { (char*) "Etc/GMT0" , 0x0700D1 }, - { (char*) "Etc/Greenwich" , 0x07014F }, - { (char*) "Etc/UCT" , 0x0701CD }, - { (char*) "Etc/Universal" , 0x07024B }, - { (char*) "Etc/UTC" , 0x0702C9 }, - { (char*) "Etc/Zulu" , 0x070347 }, - { (char*) "Europe/Amsterdam" , 0x0703C5 }, - { (char*) "Europe/Andorra" , 0x070F2F }, - { (char*) "Europe/Astrakhan" , 0x071609 }, - { (char*) "Europe/Athens" , 0x071AA6 }, - { (char*) "Europe/Belfast" , 0x072388 }, - { (char*) "Europe/Belgrade" , 0x0731E4 }, - { (char*) "Europe/Berlin" , 0x073970 }, - { (char*) "Europe/Bratislava" , 0x07428A }, - { (char*) "Europe/Brussels" , 0x074B93 }, - { (char*) "Europe/Bucharest" , 0x075714 }, - { (char*) "Europe/Budapest" , 0x075FA8 }, - { (char*) "Europe/Busingen" , 0x0768F4 }, - { (char*) "Europe/Chisinau" , 0x07707D }, - { (char*) "Europe/Copenhagen" , 0x0779DF }, - { (char*) "Europe/Dublin" , 0x078244 }, - { (char*) "Europe/Gibraltar" , 0x078FF4 }, - { (char*) "Europe/Guernsey" , 0x079BFC }, - { (char*) "Europe/Helsinki" , 0x07AA9C }, - { (char*) "Europe/Isle_of_Man" , 0x07B214 }, - { (char*) "Europe/Istanbul" , 0x07C060 }, - { (char*) "Europe/Jersey" , 0x07C7F9 }, - { (char*) "Europe/Kaliningrad" , 0x07D699 }, - { (char*) "Europe/Kiev" , 0x07DC8E }, - { (char*) "Europe/Kirov" , 0x07E4E2 }, - { (char*) "Europe/Kyiv" , 0x07E96F }, - { (char*) "Europe/Lisbon" , 0x07F1D7 }, - { (char*) "Europe/Ljubljana" , 0x07FF9F }, - { (char*) "Europe/London" , 0x08072B }, - { (char*) "Europe/Luxembourg" , 0x081587 }, - { (char*) "Europe/Madrid" , 0x082115 }, - { (char*) "Europe/Malta" , 0x082B67 }, - { (char*) "Europe/Mariehamn" , 0x0835AF }, - { (char*) "Europe/Minsk" , 0x083D27 }, - { (char*) "Europe/Monaco" , 0x08424E }, - { (char*) "Europe/Moscow" , 0x084DDA }, - { (char*) "Europe/Nicosia" , 0x0853F9 }, - { (char*) "Europe/Oslo" , 0x085BD7 }, - { (char*) "Europe/Paris" , 0x086497 }, - { (char*) "Europe/Podgorica" , 0x087035 }, - { (char*) "Europe/Prague" , 0x0877C1 }, - { (char*) "Europe/Riga" , 0x0880CA }, - { (char*) "Europe/Rome" , 0x08896C }, - { (char*) "Europe/Samara" , 0x0893C9 }, - { (char*) "Europe/San_Marino" , 0x08989F }, - { (char*) "Europe/Sarajevo" , 0x08A2FC }, - { (char*) "Europe/Saratov" , 0x08AA88 }, - { (char*) "Europe/Simferopol" , 0x08AF35 }, - { (char*) "Europe/Skopje" , 0x08B504 }, - { (char*) "Europe/Sofia" , 0x08BC90 }, - { (char*) "Europe/Stockholm" , 0x08C4B9 }, - { (char*) "Europe/Tallinn" , 0x08CC3A }, - { (char*) "Europe/Tirane" , 0x08D4AA }, - { (char*) "Europe/Tiraspol" , 0x08DCDA }, - { (char*) "Europe/Ulyanovsk" , 0x08E63C }, - { (char*) "Europe/Uzhgorod" , 0x08EB3F }, - { (char*) "Europe/Vaduz" , 0x08F393 }, - { (char*) "Europe/Vatican" , 0x08FAFF }, - { (char*) "Europe/Vienna" , 0x09055C }, - { (char*) "Europe/Vilnius" , 0x090E00 }, - { (char*) "Europe/Volgograd" , 0x09167E }, - { (char*) "Europe/Warsaw" , 0x091B1B }, - { (char*) "Europe/Zagreb" , 0x092585 }, - { (char*) "Europe/Zaporozhye" , 0x092D11 }, - { (char*) "Europe/Zurich" , 0x093565 }, - { (char*) "Factory" , 0x093CE6 }, - { (char*) "GB" , 0x093D66 }, - { (char*) "GB-Eire" , 0x094BC2 }, - { (char*) "GMT" , 0x095A1E }, - { (char*) "GMT+0" , 0x095A9C }, - { (char*) "GMT-0" , 0x095B1A }, - { (char*) "GMT0" , 0x095B98 }, - { (char*) "Greenwich" , 0x095C16 }, - { (char*) "Hongkong" , 0x095C94 }, - { (char*) "HST" , 0x096171 }, - { (char*) "Iceland" , 0x0961F0 }, - { (char*) "Indian/Antananarivo" , 0x096290 }, - { (char*) "Indian/Chagos" , 0x096377 }, - { (char*) "Indian/Christmas" , 0x09643C }, - { (char*) "Indian/Cocos" , 0x0964DF }, - { (char*) "Indian/Comoro" , 0x09658B }, - { (char*) "Indian/Kerguelen" , 0x09662C }, - { (char*) "Indian/Mahe" , 0x0966CF }, - { (char*) "Indian/Maldives" , 0x096772 }, - { (char*) "Indian/Mauritius" , 0x096837 }, - { (char*) "Indian/Mayotte" , 0x096926 }, - { (char*) "Indian/Reunion" , 0x0969C7 }, - { (char*) "Iran" , 0x096A6A }, - { (char*) "Israel" , 0x096F56 }, - { (char*) "Jamaica" , 0x0978B6 }, - { (char*) "Japan" , 0x097AA4 }, - { (char*) "Kwajalein" , 0x097BE5 }, - { (char*) "Libya" , 0x097D1F }, - { (char*) "MET" , 0x097F9C }, - { (char*) "Mexico/BajaNorte" , 0x0987D6 }, - { (char*) "Mexico/BajaSur" , 0x099128 }, - { (char*) "Mexico/General" , 0x09959C }, - { (char*) "MST" , 0x099A6E }, - { (char*) "MST7MDT" , 0x099AEC }, - { (char*) "Navajo" , 0x09A3FE }, - { (char*) "NZ" , 0x09ADA6 }, - { (char*) "NZ-CHAT" , 0x09B737 }, - { (char*) "Pacific/Apia" , 0x09BF49 }, - { (char*) "Pacific/Auckland" , 0x09C1AB }, - { (char*) "Pacific/Bougainville" , 0x09CB54 }, - { (char*) "Pacific/Chatham" , 0x09CC6A }, - { (char*) "Pacific/Chuuk" , 0x09D48B }, - { (char*) "Pacific/Easter" , 0x09D5A5 }, - { (char*) "Pacific/Efate" , 0x09DE69 }, - { (char*) "Pacific/Enderbury" , 0x09E081 }, - { (char*) "Pacific/Fakaofo" , 0x09E169 }, - { (char*) "Pacific/Fiji" , 0x09E22F }, - { (char*) "Pacific/Funafuti" , 0x09E46F }, - { (char*) "Pacific/Galapagos" , 0x09E513 }, - { (char*) "Pacific/Gambier" , 0x09E610 }, - { (char*) "Pacific/Guadalcanal" , 0x09E6C1 }, - { (char*) "Pacific/Guam" , 0x09E765 }, - { (char*) "Pacific/Honolulu" , 0x09E95F }, - { (char*) "Pacific/Johnston" , 0x09EABA }, - { (char*) "Pacific/Kanton" , 0x09EC0F }, - { (char*) "Pacific/Kiritimati" , 0x09ED06 }, - { (char*) "Pacific/Kosrae" , 0x09EDFE }, - { (char*) "Pacific/Kwajalein" , 0x09EF61 }, - { (char*) "Pacific/Majuro" , 0x09F0A4 }, - { (char*) "Pacific/Marquesas" , 0x09F1F5 }, - { (char*) "Pacific/Midway" , 0x09F2B1 }, - { (char*) "Pacific/Nauru" , 0x09F3A4 }, - { (char*) "Pacific/Niue" , 0x09F49E }, - { (char*) "Pacific/Norfolk" , 0x09F567 }, - { (char*) "Pacific/Noumea" , 0x09F8D5 }, - { (char*) "Pacific/Pago_Pago" , 0x09FA03 }, - { (char*) "Pacific/Palau" , 0x09FABE }, - { (char*) "Pacific/Pitcairn" , 0x09FB70 }, - { (char*) "Pacific/Pohnpei" , 0x09FC38 }, - { (char*) "Pacific/Ponape" , 0x09FD73 }, - { (char*) "Pacific/Port_Moresby" , 0x09FE17 }, - { (char*) "Pacific/Rarotonga" , 0x09FEEC }, - { (char*) "Pacific/Saipan" , 0x0A0145 }, - { (char*) "Pacific/Samoa" , 0x0A0331 }, - { (char*) "Pacific/Tahiti" , 0x0A03EC }, - { (char*) "Pacific/Tarawa" , 0x0A049E }, - { (char*) "Pacific/Tongatapu" , 0x0A0551 }, - { (char*) "Pacific/Truk" , 0x0A06C3 }, - { (char*) "Pacific/Wake" , 0x0A077B }, - { (char*) "Pacific/Wallis" , 0x0A082A }, - { (char*) "Pacific/Yap" , 0x0A08CE }, - { (char*) "Poland" , 0x0A0986 }, - { (char*) "Portugal" , 0x0A13F0 }, - { (char*) "PRC" , 0x0A21A5 }, - { (char*) "PST8PDT" , 0x0A23E2 }, - { (char*) "ROC" , 0x0A2CF4 }, - { (char*) "ROK" , 0x0A2FF9 }, - { (char*) "Singapore" , 0x0A326E }, - { (char*) "Turkey" , 0x0A340B }, - { (char*) "UCT" , 0x0A3BA4 }, - { (char*) "Universal" , 0x0A3C22 }, - { (char*) "US/Alaska" , 0x0A3CA0 }, - { (char*) "US/Aleutian" , 0x0A45EF }, - { (char*) "US/Arizona" , 0x0A4F2F }, - { (char*) "US/Central" , 0x0A50A3 }, - { (char*) "US/East-Indiana" , 0x0A5EB7 }, - { (char*) "US/Eastern" , 0x0A6555 }, - { (char*) "US/Hawaii" , 0x0A7341 }, - { (char*) "US/Indiana-Starke" , 0x0A7496 }, - { (char*) "US/Michigan" , 0x0A7E2E }, - { (char*) "US/Mountain" , 0x0A86F0 }, - { (char*) "US/Pacific" , 0x0A9098 }, - { (char*) "US/Samoa" , 0x0A9BC8 }, - { (char*) "UTC" , 0x0A9C83 }, - { (char*) "W-SU" , 0x0A9D01 }, - { (char*) "WET" , 0x0AA30C }, - { (char*) "Zulu" , 0x0AAA89 }, + { (char*) "Africa/Casablanca" , 0x001926 }, + { (char*) "Africa/Ceuta" , 0x0022AF }, + { (char*) "Africa/Conakry" , 0x002ACD }, + { (char*) "Africa/Dakar" , 0x002BA9 }, + { (char*) "Africa/Dar_es_Salaam" , 0x002C6B }, + { (char*) "Africa/Djibouti" , 0x002D4C }, + { (char*) "Africa/Douala" , 0x002DED }, + { (char*) "Africa/El_Aaiun" , 0x002E8E }, + { (char*) "Africa/Freetown" , 0x003791 }, + { (char*) "Africa/Gaborone" , 0x00396D }, + { (char*) "Africa/Harare" , 0x003A64 }, + { (char*) "Africa/Johannesburg" , 0x003B05 }, + { (char*) "Africa/Juba" , 0x003C07 }, + { (char*) "Africa/Kampala" , 0x003EBA }, + { (char*) "Africa/Khartoum" , 0x003FC1 }, + { (char*) "Africa/Kigali" , 0x004274 }, + { (char*) "Africa/Kinshasa" , 0x004315 }, + { (char*) "Africa/Lagos" , 0x0043CF }, + { (char*) "Africa/Libreville" , 0x0044C6 }, + { (char*) "Africa/Lome" , 0x004567 }, + { (char*) "Africa/Luanda" , 0x004607 }, + { (char*) "Africa/Lubumbashi" , 0x0046CE }, + { (char*) "Africa/Lusaka" , 0x0047AA }, + { (char*) "Africa/Malabo" , 0x00484B }, + { (char*) "Africa/Maputo" , 0x00490E }, + { (char*) "Africa/Maseru" , 0x0049AF }, + { (char*) "Africa/Mbabane" , 0x004A7B }, + { (char*) "Africa/Mogadishu" , 0x004B1F }, + { (char*) "Africa/Monrovia" , 0x004C00 }, + { (char*) "Africa/Nairobi" , 0x004CDC }, + { (char*) "Africa/Ndjamena" , 0x004DF1 }, + { (char*) "Africa/Niamey" , 0x004EC4 }, + { (char*) "Africa/Nouakchott" , 0x004FA9 }, + { (char*) "Africa/Ouagadougou" , 0x005085 }, + { (char*) "Africa/Porto-Novo" , 0x005125 }, + { (char*) "Africa/Sao_Tome" , 0x0051E8 }, + { (char*) "Africa/Timbuktu" , 0x0052F2 }, + { (char*) "Africa/Tripoli" , 0x005392 }, + { (char*) "Africa/Tunis" , 0x00560F }, + { (char*) "Africa/Windhoek" , 0x0058CC }, + { (char*) "America/Adak" , 0x005C93 }, + { (char*) "America/Anchorage" , 0x0065ED }, + { (char*) "America/Anguilla" , 0x006F4F }, + { (char*) "America/Antigua" , 0x006FEF }, + { (char*) "America/Araguaina" , 0x0070B1 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x00742C }, + { (char*) "America/Argentina/Catamarca" , 0x007873 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x007CC0 }, + { (char*) "America/Argentina/Cordoba" , 0x0080F2 }, + { (char*) "America/Argentina/Jujuy" , 0x00855A }, + { (char*) "America/Argentina/La_Rioja" , 0x00897A }, + { (char*) "America/Argentina/Mendoza" , 0x008DC7 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x009205 }, + { (char*) "America/Argentina/Salta" , 0x009646 }, + { (char*) "America/Argentina/San_Juan" , 0x009A72 }, + { (char*) "America/Argentina/San_Luis" , 0x009EBF }, + { (char*) "America/Argentina/Tucuman" , 0x00A318 }, + { (char*) "America/Argentina/Ushuaia" , 0x00A772 }, + { (char*) "America/Aruba" , 0x00ABB9 }, + { (char*) "America/Asuncion" , 0x00AC7F }, + { (char*) "America/Atikokan" , 0x00B479 }, + { (char*) "America/Atka" , 0x00B5F6 }, + { (char*) "America/Bahia" , 0x00BF36 }, + { (char*) "America/Bahia_Banderas" , 0x00C339 }, + { (char*) "America/Barbados" , 0x00C7D6 }, + { (char*) "America/Belem" , 0x00C996 }, + { (char*) "America/Belize" , 0x00CBE6 }, + { (char*) "America/Blanc-Sablon" , 0x00D240 }, + { (char*) "America/Boa_Vista" , 0x00D392 }, + { (char*) "America/Bogota" , 0x00D60F }, + { (char*) "America/Boise" , 0x00D703 }, + { (char*) "America/Buenos_Aires" , 0x00E099 }, + { (char*) "America/Cambridge_Bay" , 0x00E4CB }, + { (char*) "America/Campo_Grande" , 0x00EDB9 }, + { (char*) "America/Cancun" , 0x00F36D }, + { (char*) "America/Caracas" , 0x00F6C7 }, + { (char*) "America/Catamarca" , 0x00F7CD }, + { (char*) "America/Cayenne" , 0x00FBFF }, + { (char*) "America/Cayman" , 0x00FCC3 }, + { (char*) "America/Chicago" , 0x00FD85 }, + { (char*) "America/Chihuahua" , 0x010BAD }, + { (char*) "America/Ciudad_Juarez" , 0x01101D }, + { (char*) "America/Coral_Harbour" , 0x011647 }, + { (char*) "America/Cordoba" , 0x011709 }, + { (char*) "America/Costa_Rica" , 0x011B3B }, + { (char*) "America/Creston" , 0x011C83 }, + { (char*) "America/Cuiaba" , 0x011D71 }, + { (char*) "America/Curacao" , 0x012302 }, + { (char*) "America/Danmarkshavn" , 0x0123C8 }, + { (char*) "America/Dawson" , 0x0126A8 }, + { (char*) "America/Dawson_Creek" , 0x012D14 }, + { (char*) "America/Denver" , 0x01315A }, + { (char*) "America/Detroit" , 0x013B17 }, + { (char*) "America/Dominica" , 0x0143F2 }, + { (char*) "America/Edmonton" , 0x014492 }, + { (char*) "America/Eirunepe" , 0x014DDF }, + { (char*) "America/El_Salvador" , 0x01507C }, + { (char*) "America/Ensenada" , 0x015168 }, + { (char*) "America/Fort_Nelson" , 0x015ABA }, + { (char*) "America/Fort_Wayne" , 0x01639A }, + { (char*) "America/Fortaleza" , 0x016A38 }, + { (char*) "America/Glace_Bay" , 0x016D28 }, + { (char*) "America/Godthab" , 0x0175DF }, + { (char*) "America/Goose_Bay" , 0x017D5A }, + { (char*) "America/Grand_Turk" , 0x018A10 }, + { (char*) "America/Grenada" , 0x019146 }, + { (char*) "America/Guadeloupe" , 0x0191E6 }, + { (char*) "America/Guatemala" , 0x019286 }, + { (char*) "America/Guayaquil" , 0x0193AA }, + { (char*) "America/Guyana" , 0x0194B0 }, + { (char*) "America/Halifax" , 0x0195B4 }, + { (char*) "America/Havana" , 0x01A33E }, + { (char*) "America/Hermosillo" , 0x01ACBA }, + { (char*) "America/Indiana/Indianapolis" , 0x01AE94 }, + { (char*) "America/Indiana/Knox" , 0x01B54B }, + { (char*) "America/Indiana/Marengo" , 0x01BEF8 }, + { (char*) "America/Indiana/Petersburg" , 0x01C5E5 }, + { (char*) "America/Indiana/Tell_City" , 0x01CD84 }, + { (char*) "America/Indiana/Vevay" , 0x01D448 }, + { (char*) "America/Indiana/Vincennes" , 0x01DA04 }, + { (char*) "America/Indiana/Winamac" , 0x01E0DA }, + { (char*) "America/Indianapolis" , 0x01E7FE }, + { (char*) "America/Inuvik" , 0x01EE9C }, + { (char*) "America/Iqaluit" , 0x01F6D6 }, + { (char*) "America/Jamaica" , 0x01FF95 }, + { (char*) "America/Jujuy" , 0x020183 }, + { (char*) "America/Juneau" , 0x020599 }, + { (char*) "America/Kentucky/Louisville" , 0x020EEA }, + { (char*) "America/Kentucky/Monticello" , 0x0219F8 }, + { (char*) "America/Knox_IN" , 0x022358 }, + { (char*) "America/Kralendijk" , 0x022CF0 }, + { (char*) "America/La_Paz" , 0x022DF2 }, + { (char*) "America/Lima" , 0x022ED8 }, + { (char*) "America/Los_Angeles" , 0x02306C }, + { (char*) "America/Louisville" , 0x023BA3 }, + { (char*) "America/Lower_Princes" , 0x024693 }, + { (char*) "America/Maceio" , 0x024795 }, + { (char*) "America/Managua" , 0x024A8B }, + { (char*) "America/Manaus" , 0x024C45 }, + { (char*) "America/Marigot" , 0x024EAE }, + { (char*) "America/Martinique" , 0x024FB0 }, + { (char*) "America/Matamoros" , 0x0250A4 }, + { (char*) "America/Mazatlan" , 0x025666 }, + { (char*) "America/Mendoza" , 0x025B0C }, + { (char*) "America/Menominee" , 0x025F3E }, + { (char*) "America/Merida" , 0x02684B }, + { (char*) "America/Metlakatla" , 0x026C54 }, + { (char*) "America/Mexico_City" , 0x027206 }, + { (char*) "America/Miquelon" , 0x0276E6 }, + { (char*) "America/Moncton" , 0x027D66 }, + { (char*) "America/Monterrey" , 0x0289DC }, + { (char*) "America/Montevideo" , 0x028DF2 }, + { (char*) "America/Montreal" , 0x0293D6 }, + { (char*) "America/Montserrat" , 0x02A188 }, + { (char*) "America/Nassau" , 0x02A228 }, + { (char*) "America/New_York" , 0x02AB88 }, + { (char*) "America/Nipigon" , 0x02B988 }, + { (char*) "America/Nome" , 0x02C73A }, + { (char*) "America/Noronha" , 0x02D092 }, + { (char*) "America/North_Dakota/Beulah" , 0x02D36C }, + { (char*) "America/North_Dakota/Center" , 0x02DCE9 }, + { (char*) "America/North_Dakota/New_Salem" , 0x02E666 }, + { (char*) "America/Nuuk" , 0x02EFE9 }, + { (char*) "America/Ojinaga" , 0x02F775 }, + { (char*) "America/Panama" , 0x02FD91 }, + { (char*) "America/Pangnirtung" , 0x02FE53 }, + { (char*) "America/Paramaribo" , 0x0306F9 }, + { (char*) "America/Phoenix" , 0x0307FD }, + { (char*) "America/Port-au-Prince" , 0x030989 }, + { (char*) "America/Port_of_Spain" , 0x030F2F }, + { (char*) "America/Porto_Acre" , 0x030FCF }, + { (char*) "America/Porto_Velho" , 0x031241 }, + { (char*) "America/Puerto_Rico" , 0x031487 }, + { (char*) "America/Punta_Arenas" , 0x031589 }, + { (char*) "America/Rainy_River" , 0x031D17 }, + { (char*) "America/Rankin_Inlet" , 0x032857 }, + { (char*) "America/Recife" , 0x03308B }, + { (char*) "America/Regina" , 0x03335F }, + { (char*) "America/Resolute" , 0x033754 }, + { (char*) "America/Rio_Branco" , 0x033F89 }, + { (char*) "America/Rosario" , 0x0341FF }, + { (char*) "America/Santa_Isabel" , 0x034631 }, + { (char*) "America/Santarem" , 0x034F83 }, + { (char*) "America/Santiago" , 0x0351E6 }, + { (char*) "America/Santo_Domingo" , 0x035BD2 }, + { (char*) "America/Sao_Paulo" , 0x035DA8 }, + { (char*) "America/Scoresbysund" , 0x036380 }, + { (char*) "America/Shiprock" , 0x036B17 }, + { (char*) "America/Sitka" , 0x0374BF }, + { (char*) "America/St_Barthelemy" , 0x037DF7 }, + { (char*) "America/St_Johns" , 0x037EF9 }, + { (char*) "America/St_Kitts" , 0x038D6E }, + { (char*) "America/St_Lucia" , 0x038E0E }, + { (char*) "America/St_Thomas" , 0x038ED0 }, + { (char*) "America/St_Vincent" , 0x038F70 }, + { (char*) "America/Swift_Current" , 0x039032 }, + { (char*) "America/Tegucigalpa" , 0x039280 }, + { (char*) "America/Thule" , 0x039388 }, + { (char*) "America/Thunder_Bay" , 0x039980 }, + { (char*) "America/Tijuana" , 0x03A732 }, + { (char*) "America/Toronto" , 0x03B093 }, + { (char*) "America/Tortola" , 0x03BE62 }, + { (char*) "America/Vancouver" , 0x03BF02 }, + { (char*) "America/Virgin" , 0x03CA73 }, + { (char*) "America/Whitehorse" , 0x03CB75 }, + { (char*) "America/Winnipeg" , 0x03D1E1 }, + { (char*) "America/Yakutat" , 0x03DD3E }, + { (char*) "America/Yellowknife" , 0x03E65B }, + { (char*) "Antarctica/Casey" , 0x03EF83 }, + { (char*) "Antarctica/Davis" , 0x03F106 }, + { (char*) "Antarctica/DumontDUrville" , 0x03F232 }, + { (char*) "Antarctica/Macquarie" , 0x03F302 }, + { (char*) "Antarctica/Mawson" , 0x03FBF2 }, + { (char*) "Antarctica/McMurdo" , 0x03FCBD }, + { (char*) "Antarctica/Palmer" , 0x0404B8 }, + { (char*) "Antarctica/Rothera" , 0x040A46 }, + { (char*) "Antarctica/South_Pole" , 0x040AEF }, + { (char*) "Antarctica/Syowa" , 0x041480 }, + { (char*) "Antarctica/Troll" , 0x041528 }, + { (char*) "Antarctica/Vostok" , 0x0419B5 }, + { (char*) "Arctic/Longyearbyen" , 0x041A5E }, + { (char*) "Asia/Aden" , 0x042364 }, + { (char*) "Asia/Almaty" , 0x042407 }, + { (char*) "Asia/Amman" , 0x0427FC }, + { (char*) "Asia/Anadyr" , 0x042DA1 }, + { (char*) "Asia/Aqtau" , 0x043256 }, + { (char*) "Asia/Aqtobe" , 0x043640 }, + { (char*) "Asia/Ashgabat" , 0x043A3E }, + { (char*) "Asia/Ashkhabad" , 0x043CA7 }, + { (char*) "Asia/Atyrau" , 0x043F10 }, + { (char*) "Asia/Baghdad" , 0x044302 }, + { (char*) "Asia/Bahrain" , 0x0446D7 }, + { (char*) "Asia/Baku" , 0x0447C2 }, + { (char*) "Asia/Bangkok" , 0x044C8B }, + { (char*) "Asia/Barnaul" , 0x044D50 }, + { (char*) "Asia/Beirut" , 0x045221 }, + { (char*) "Asia/Bishkek" , 0x045A97 }, + { (char*) "Asia/Brunei" , 0x045E6C }, + { (char*) "Asia/Calcutta" , 0x045F35 }, + { (char*) "Asia/Chita" , 0x04605E }, + { (char*) "Asia/Choibalsan" , 0x046535 }, + { (char*) "Asia/Chongqing" , 0x0468FA }, + { (char*) "Asia/Chungking" , 0x046B37 }, + { (char*) "Asia/Colombo" , 0x046D74 }, + { (char*) "Asia/Dacca" , 0x046EE6 }, + { (char*) "Asia/Damascus" , 0x047035 }, + { (char*) "Asia/Dhaka" , 0x047792 }, + { (char*) "Asia/Dili" , 0x0478E1 }, + { (char*) "Asia/Dubai" , 0x0479C2 }, + { (char*) "Asia/Dushanbe" , 0x047A65 }, + { (char*) "Asia/Famagusta" , 0x047CB2 }, + { (char*) "Asia/Gaza" , 0x0484B9 }, + { (char*) "Asia/Harbin" , 0x0493AF }, + { (char*) "Asia/Hebron" , 0x0495EC }, + { (char*) "Asia/Ho_Chi_Minh" , 0x04A4FD }, + { (char*) "Asia/Hong_Kong" , 0x04A65A }, + { (char*) "Asia/Hovd" , 0x04AB37 }, + { (char*) "Asia/Irkutsk" , 0x04AEDB }, + { (char*) "Asia/Istanbul" , 0x04B3CE }, + { (char*) "Asia/Jakarta" , 0x04BB67 }, + { (char*) "Asia/Jayapura" , 0x04BCFF }, + { (char*) "Asia/Jerusalem" , 0x04BE1E }, + { (char*) "Asia/Kabul" , 0x04C77E }, + { (char*) "Asia/Kamchatka" , 0x04C84C }, + { (char*) "Asia/Karachi" , 0x04CCEA }, + { (char*) "Asia/Kashgar" , 0x04CE71 }, + { (char*) "Asia/Kathmandu" , 0x04CF14 }, + { (char*) "Asia/Katmandu" , 0x04CFE6 }, + { (char*) "Asia/Khandyga" , 0x04D0B8 }, + { (char*) "Asia/Kolkata" , 0x04D5CB }, + { (char*) "Asia/Krasnoyarsk" , 0x04D6F4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x04DBC2 }, + { (char*) "Asia/Kuching" , 0x04DD73 }, + { (char*) "Asia/Kuwait" , 0x04DF62 }, + { (char*) "Asia/Macao" , 0x04E005 }, + { (char*) "Asia/Macau" , 0x04E4DC }, + { (char*) "Asia/Magadan" , 0x04E9B3 }, + { (char*) "Asia/Makassar" , 0x04EE87 }, + { (char*) "Asia/Manila" , 0x04EFDA }, + { (char*) "Asia/Muscat" , 0x04F12E }, + { (char*) "Asia/Nicosia" , 0x04F1D1 }, + { (char*) "Asia/Novokuznetsk" , 0x04F9BD }, + { (char*) "Asia/Novosibirsk" , 0x04FE59 }, + { (char*) "Asia/Omsk" , 0x050330 }, + { (char*) "Asia/Oral" , 0x0507F2 }, + { (char*) "Asia/Phnom_Penh" , 0x050BEC }, + { (char*) "Asia/Pontianak" , 0x050D11 }, + { (char*) "Asia/Pyongyang" , 0x050E94 }, + { (char*) "Asia/Qatar" , 0x050F8D }, + { (char*) "Asia/Qostanay" , 0x051052 }, + { (char*) "Asia/Qyzylorda" , 0x05145D }, + { (char*) "Asia/Rangoon" , 0x051879 }, + { (char*) "Asia/Riyadh" , 0x051983 }, + { (char*) "Asia/Saigon" , 0x051A26 }, + { (char*) "Asia/Sakhalin" , 0x051B83 }, + { (char*) "Asia/Samarkand" , 0x05204B }, + { (char*) "Asia/Seoul" , 0x05229B }, + { (char*) "Asia/Shanghai" , 0x052510 }, + { (char*) "Asia/Singapore" , 0x052759 }, + { (char*) "Asia/Srednekolymsk" , 0x0528F6 }, + { (char*) "Asia/Taipei" , 0x052DCA }, + { (char*) "Asia/Tashkent" , 0x0530CF }, + { (char*) "Asia/Tbilisi" , 0x05332D }, + { (char*) "Asia/Tehran" , 0x053736 }, + { (char*) "Asia/Tel_Aviv" , 0x053C22 }, + { (char*) "Asia/Thimbu" , 0x054582 }, + { (char*) "Asia/Thimphu" , 0x05464B }, + { (char*) "Asia/Tokyo" , 0x054714 }, + { (char*) "Asia/Tomsk" , 0x054855 }, + { (char*) "Asia/Ujung_Pandang" , 0x054D26 }, + { (char*) "Asia/Ulaanbaatar" , 0x054E30 }, + { (char*) "Asia/Ulan_Bator" , 0x0551B9 }, + { (char*) "Asia/Urumqi" , 0x055532 }, + { (char*) "Asia/Ust-Nera" , 0x0555E2 }, + { (char*) "Asia/Vientiane" , 0x055AD8 }, + { (char*) "Asia/Vladivostok" , 0x055C19 }, + { (char*) "Asia/Yakutsk" , 0x0560E2 }, + { (char*) "Asia/Yangon" , 0x0565AA }, + { (char*) "Asia/Yekaterinburg" , 0x0566B4 }, + { (char*) "Asia/Yerevan" , 0x056B9B }, + { (char*) "Atlantic/Azores" , 0x057018 }, + { (char*) "Atlantic/Bermuda" , 0x057DD4 }, + { (char*) "Atlantic/Canary" , 0x05873C }, + { (char*) "Atlantic/Cape_Verde" , 0x058EBF }, + { (char*) "Atlantic/Faeroe" , 0x058FCB }, + { (char*) "Atlantic/Faroe" , 0x0596EE }, + { (char*) "Atlantic/Jan_Mayen" , 0x059E11 }, + { (char*) "Atlantic/Madeira" , 0x05A717 }, + { (char*) "Atlantic/Reykjavik" , 0x05B4E1 }, + { (char*) "Atlantic/South_Georgia" , 0x05B977 }, + { (char*) "Atlantic/St_Helena" , 0x05BA19 }, + { (char*) "Atlantic/Stanley" , 0x05BADB }, + { (char*) "Australia/ACT" , 0x05BF97 }, + { (char*) "Australia/Adelaide" , 0x05C831 }, + { (char*) "Australia/Brisbane" , 0x05D0EC }, + { (char*) "Australia/Broken_Hill" , 0x05D2B2 }, + { (char*) "Australia/Canberra" , 0x05DB8F }, + { (char*) "Australia/Currie" , 0x05E429 }, + { (char*) "Australia/Darwin" , 0x05ED6B }, + { (char*) "Australia/Eucla" , 0x05EECE }, + { (char*) "Australia/Hobart" , 0x05F0BB }, + { (char*) "Australia/LHI" , 0x05FA05 }, + { (char*) "Australia/Lindeman" , 0x060147 }, + { (char*) "Australia/Lord_Howe" , 0x06034D }, + { (char*) "Australia/Melbourne" , 0x060A9F }, + { (char*) "Australia/North" , 0x061341 }, + { (char*) "Australia/NSW" , 0x061492 }, + { (char*) "Australia/Perth" , 0x061D2C }, + { (char*) "Australia/Queensland" , 0x061F14 }, + { (char*) "Australia/South" , 0x0620C3 }, + { (char*) "Australia/Sydney" , 0x06296F }, + { (char*) "Australia/Tasmania" , 0x063225 }, + { (char*) "Australia/Victoria" , 0x063B67 }, + { (char*) "Australia/West" , 0x064401 }, + { (char*) "Australia/Yancowinna" , 0x0645CB }, + { (char*) "Brazil/Acre" , 0x064E8C }, + { (char*) "Brazil/DeNoronha" , 0x0650FE }, + { (char*) "Brazil/East" , 0x0653C8 }, + { (char*) "Brazil/West" , 0x06596A }, + { (char*) "Canada/Atlantic" , 0x065BC4 }, + { (char*) "Canada/Central" , 0x066930 }, + { (char*) "Canada/Eastern" , 0x067470 }, + { (char*) "Canada/Mountain" , 0x068222 }, + { (char*) "Canada/Newfoundland" , 0x068B4A }, + { (char*) "Canada/Pacific" , 0x06999D }, + { (char*) "Canada/Saskatchewan" , 0x06A4F5 }, + { (char*) "Canada/Yukon" , 0x06A8D5 }, + { (char*) "CET" , 0x06AF2F }, + { (char*) "Chile/Continental" , 0x06B769 }, + { (char*) "Chile/EasterIsland" , 0x06C148 }, + { (char*) "CST6CDT" , 0x06C9FF }, + { (char*) "Cuba" , 0x06D311 }, + { (char*) "EET" , 0x06DC8D }, + { (char*) "Egypt" , 0x06E40D }, + { (char*) "Eire" , 0x06ED78 }, + { (char*) "EST" , 0x06FB28 }, + { (char*) "EST5EDT" , 0x06FBA6 }, + { (char*) "Etc/GMT" , 0x0704B8 }, + { (char*) "Etc/GMT+0" , 0x070536 }, + { (char*) "Etc/GMT+1" , 0x0705B4 }, + { (char*) "Etc/GMT+10" , 0x070634 }, + { (char*) "Etc/GMT+11" , 0x0706B5 }, + { (char*) "Etc/GMT+12" , 0x070736 }, + { (char*) "Etc/GMT+2" , 0x0707B7 }, + { (char*) "Etc/GMT+3" , 0x070837 }, + { (char*) "Etc/GMT+4" , 0x0708B7 }, + { (char*) "Etc/GMT+5" , 0x070937 }, + { (char*) "Etc/GMT+6" , 0x0709B7 }, + { (char*) "Etc/GMT+7" , 0x070A37 }, + { (char*) "Etc/GMT+8" , 0x070AB7 }, + { (char*) "Etc/GMT+9" , 0x070B37 }, + { (char*) "Etc/GMT-0" , 0x070BB7 }, + { (char*) "Etc/GMT-1" , 0x070C35 }, + { (char*) "Etc/GMT-10" , 0x070CB6 }, + { (char*) "Etc/GMT-11" , 0x070D38 }, + { (char*) "Etc/GMT-12" , 0x070DBA }, + { (char*) "Etc/GMT-13" , 0x070E3C }, + { (char*) "Etc/GMT-14" , 0x070EBE }, + { (char*) "Etc/GMT-2" , 0x070F40 }, + { (char*) "Etc/GMT-3" , 0x070FC1 }, + { (char*) "Etc/GMT-4" , 0x071042 }, + { (char*) "Etc/GMT-5" , 0x0710C3 }, + { (char*) "Etc/GMT-6" , 0x071144 }, + { (char*) "Etc/GMT-7" , 0x0711C5 }, + { (char*) "Etc/GMT-8" , 0x071246 }, + { (char*) "Etc/GMT-9" , 0x0712C7 }, + { (char*) "Etc/GMT0" , 0x071348 }, + { (char*) "Etc/Greenwich" , 0x0713C6 }, + { (char*) "Etc/UCT" , 0x071444 }, + { (char*) "Etc/Universal" , 0x0714C2 }, + { (char*) "Etc/UTC" , 0x071540 }, + { (char*) "Etc/Zulu" , 0x0715BE }, + { (char*) "Europe/Amsterdam" , 0x07163C }, + { (char*) "Europe/Andorra" , 0x0721A6 }, + { (char*) "Europe/Astrakhan" , 0x072880 }, + { (char*) "Europe/Athens" , 0x072D1D }, + { (char*) "Europe/Belfast" , 0x0735FF }, + { (char*) "Europe/Belgrade" , 0x07445B }, + { (char*) "Europe/Berlin" , 0x074BE7 }, + { (char*) "Europe/Bratislava" , 0x0754FC }, + { (char*) "Europe/Brussels" , 0x075E05 }, + { (char*) "Europe/Bucharest" , 0x076986 }, + { (char*) "Europe/Budapest" , 0x07721A }, + { (char*) "Europe/Busingen" , 0x077B66 }, + { (char*) "Europe/Chisinau" , 0x0782EF }, + { (char*) "Europe/Copenhagen" , 0x078C51 }, + { (char*) "Europe/Dublin" , 0x0794B6 }, + { (char*) "Europe/Gibraltar" , 0x07A266 }, + { (char*) "Europe/Guernsey" , 0x07AE6E }, + { (char*) "Europe/Helsinki" , 0x07BD0E }, + { (char*) "Europe/Isle_of_Man" , 0x07C486 }, + { (char*) "Europe/Istanbul" , 0x07D2D2 }, + { (char*) "Europe/Jersey" , 0x07DA6B }, + { (char*) "Europe/Kaliningrad" , 0x07E90B }, + { (char*) "Europe/Kiev" , 0x07EF00 }, + { (char*) "Europe/Kirov" , 0x07F754 }, + { (char*) "Europe/Kyiv" , 0x07FC0F }, + { (char*) "Europe/Lisbon" , 0x080472 }, + { (char*) "Europe/Ljubljana" , 0x08123A }, + { (char*) "Europe/London" , 0x0819C6 }, + { (char*) "Europe/Luxembourg" , 0x082822 }, + { (char*) "Europe/Madrid" , 0x0833B0 }, + { (char*) "Europe/Malta" , 0x083E02 }, + { (char*) "Europe/Mariehamn" , 0x08484A }, + { (char*) "Europe/Minsk" , 0x084FC2 }, + { (char*) "Europe/Monaco" , 0x0854E9 }, + { (char*) "Europe/Moscow" , 0x086075 }, + { (char*) "Europe/Nicosia" , 0x086694 }, + { (char*) "Europe/Oslo" , 0x086E72 }, + { (char*) "Europe/Paris" , 0x087732 }, + { (char*) "Europe/Podgorica" , 0x0882D0 }, + { (char*) "Europe/Prague" , 0x088A5C }, + { (char*) "Europe/Riga" , 0x089365 }, + { (char*) "Europe/Rome" , 0x089C07 }, + { (char*) "Europe/Samara" , 0x08A664 }, + { (char*) "Europe/San_Marino" , 0x08AB3A }, + { (char*) "Europe/Sarajevo" , 0x08B597 }, + { (char*) "Europe/Saratov" , 0x08BD23 }, + { (char*) "Europe/Simferopol" , 0x08C1D0 }, + { (char*) "Europe/Skopje" , 0x08C79F }, + { (char*) "Europe/Sofia" , 0x08CF2B }, + { (char*) "Europe/Stockholm" , 0x08D754 }, + { (char*) "Europe/Tallinn" , 0x08DED5 }, + { (char*) "Europe/Tirane" , 0x08E745 }, + { (char*) "Europe/Tiraspol" , 0x08EF75 }, + { (char*) "Europe/Ulyanovsk" , 0x08F8D7 }, + { (char*) "Europe/Uzhgorod" , 0x08FDDA }, + { (char*) "Europe/Vaduz" , 0x09062E }, + { (char*) "Europe/Vatican" , 0x090D9A }, + { (char*) "Europe/Vienna" , 0x0917F7 }, + { (char*) "Europe/Vilnius" , 0x09209B }, + { (char*) "Europe/Volgograd" , 0x092919 }, + { (char*) "Europe/Warsaw" , 0x092DE0 }, + { (char*) "Europe/Zagreb" , 0x09384A }, + { (char*) "Europe/Zaporozhye" , 0x093FD6 }, + { (char*) "Europe/Zurich" , 0x09482A }, + { (char*) "Factory" , 0x094FAB }, + { (char*) "GB" , 0x09502B }, + { (char*) "GB-Eire" , 0x095E87 }, + { (char*) "GMT" , 0x096CE3 }, + { (char*) "GMT+0" , 0x096D61 }, + { (char*) "GMT-0" , 0x096DDF }, + { (char*) "GMT0" , 0x096E5D }, + { (char*) "Greenwich" , 0x096EDB }, + { (char*) "Hongkong" , 0x096F59 }, + { (char*) "HST" , 0x097436 }, + { (char*) "Iceland" , 0x0974B5 }, + { (char*) "Indian/Antananarivo" , 0x097555 }, + { (char*) "Indian/Chagos" , 0x09763C }, + { (char*) "Indian/Christmas" , 0x097701 }, + { (char*) "Indian/Cocos" , 0x0977A4 }, + { (char*) "Indian/Comoro" , 0x097850 }, + { (char*) "Indian/Kerguelen" , 0x0978F1 }, + { (char*) "Indian/Mahe" , 0x097994 }, + { (char*) "Indian/Maldives" , 0x097A37 }, + { (char*) "Indian/Mauritius" , 0x097AFC }, + { (char*) "Indian/Mayotte" , 0x097BEB }, + { (char*) "Indian/Reunion" , 0x097C8C }, + { (char*) "Iran" , 0x097D2F }, + { (char*) "Israel" , 0x09821B }, + { (char*) "Jamaica" , 0x098B7B }, + { (char*) "Japan" , 0x098D69 }, + { (char*) "Kwajalein" , 0x098EAA }, + { (char*) "Libya" , 0x098FE4 }, + { (char*) "MET" , 0x099261 }, + { (char*) "Mexico/BajaNorte" , 0x099A9B }, + { (char*) "Mexico/BajaSur" , 0x09A3ED }, + { (char*) "Mexico/General" , 0x09A861 }, + { (char*) "MST" , 0x09AD33 }, + { (char*) "MST7MDT" , 0x09ADB1 }, + { (char*) "Navajo" , 0x09B6C3 }, + { (char*) "NZ" , 0x09C06B }, + { (char*) "NZ-CHAT" , 0x09C9FC }, + { (char*) "Pacific/Apia" , 0x09D20E }, + { (char*) "Pacific/Auckland" , 0x09D470 }, + { (char*) "Pacific/Bougainville" , 0x09DE14 }, + { (char*) "Pacific/Chatham" , 0x09DF2A }, + { (char*) "Pacific/Chuuk" , 0x09E74B }, + { (char*) "Pacific/Easter" , 0x09E865 }, + { (char*) "Pacific/Efate" , 0x09F129 }, + { (char*) "Pacific/Enderbury" , 0x09F341 }, + { (char*) "Pacific/Fakaofo" , 0x09F429 }, + { (char*) "Pacific/Fiji" , 0x09F4EF }, + { (char*) "Pacific/Funafuti" , 0x09F72F }, + { (char*) "Pacific/Galapagos" , 0x09F7D3 }, + { (char*) "Pacific/Gambier" , 0x09F8D0 }, + { (char*) "Pacific/Guadalcanal" , 0x09F981 }, + { (char*) "Pacific/Guam" , 0x09FA25 }, + { (char*) "Pacific/Honolulu" , 0x09FC1F }, + { (char*) "Pacific/Johnston" , 0x09FD7A }, + { (char*) "Pacific/Kanton" , 0x09FECF }, + { (char*) "Pacific/Kiritimati" , 0x09FFC6 }, + { (char*) "Pacific/Kosrae" , 0x0A00BE }, + { (char*) "Pacific/Kwajalein" , 0x0A0221 }, + { (char*) "Pacific/Majuro" , 0x0A0364 }, + { (char*) "Pacific/Marquesas" , 0x0A04B0 }, + { (char*) "Pacific/Midway" , 0x0A056C }, + { (char*) "Pacific/Nauru" , 0x0A065F }, + { (char*) "Pacific/Niue" , 0x0A0759 }, + { (char*) "Pacific/Norfolk" , 0x0A0822 }, + { (char*) "Pacific/Noumea" , 0x0A0B90 }, + { (char*) "Pacific/Pago_Pago" , 0x0A0CBE }, + { (char*) "Pacific/Palau" , 0x0A0D79 }, + { (char*) "Pacific/Pitcairn" , 0x0A0E2B }, + { (char*) "Pacific/Pohnpei" , 0x0A0EF3 }, + { (char*) "Pacific/Ponape" , 0x0A102E }, + { (char*) "Pacific/Port_Moresby" , 0x0A10D2 }, + { (char*) "Pacific/Rarotonga" , 0x0A11A2 }, + { (char*) "Pacific/Saipan" , 0x0A13FB }, + { (char*) "Pacific/Samoa" , 0x0A15E7 }, + { (char*) "Pacific/Tahiti" , 0x0A16A2 }, + { (char*) "Pacific/Tarawa" , 0x0A1754 }, + { (char*) "Pacific/Tongatapu" , 0x0A1807 }, + { (char*) "Pacific/Truk" , 0x0A1979 }, + { (char*) "Pacific/Wake" , 0x0A1A31 }, + { (char*) "Pacific/Wallis" , 0x0A1AE0 }, + { (char*) "Pacific/Yap" , 0x0A1B84 }, + { (char*) "Poland" , 0x0A1C3C }, + { (char*) "Portugal" , 0x0A26A6 }, + { (char*) "PRC" , 0x0A345B }, + { (char*) "PST8PDT" , 0x0A3698 }, + { (char*) "ROC" , 0x0A3FAA }, + { (char*) "ROK" , 0x0A42AF }, + { (char*) "Singapore" , 0x0A4524 }, + { (char*) "Turkey" , 0x0A46C1 }, + { (char*) "UCT" , 0x0A4E5A }, + { (char*) "Universal" , 0x0A4ED8 }, + { (char*) "US/Alaska" , 0x0A4F56 }, + { (char*) "US/Aleutian" , 0x0A58A5 }, + { (char*) "US/Arizona" , 0x0A61E5 }, + { (char*) "US/Central" , 0x0A6359 }, + { (char*) "US/East-Indiana" , 0x0A716D }, + { (char*) "US/Eastern" , 0x0A780B }, + { (char*) "US/Hawaii" , 0x0A85F7 }, + { (char*) "US/Indiana-Starke" , 0x0A874C }, + { (char*) "US/Michigan" , 0x0A90E4 }, + { (char*) "US/Mountain" , 0x0A99A6 }, + { (char*) "US/Pacific" , 0x0AA34E }, + { (char*) "US/Samoa" , 0x0AAE7E }, + { (char*) "UTC" , 0x0AAF39 }, + { (char*) "W-SU" , 0x0AAFB7 }, + { (char*) "WET" , 0x0AB5C2 }, + { (char*) "Zulu" , 0x0ABD3F }, }; -const unsigned char timelib_timezone_db_data_builtin[699143] = { +const unsigned char timelib_timezone_db_data_builtin[703933] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24582,7 +24750,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Africa/Cairo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -24614,95 +24782,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24723,11 +24919,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x59, 0x58, 0x53, 0xA0, 0x59, 0xF5, 0x36, 0x20, 0x5A, 0xB7, 0x02, 0xA0, 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, -0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x4D, 0xCB, 0xA0, +0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, -0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xE7, 0x58, 0x20, +0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, @@ -24775,7 +24971,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, +0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, @@ -24783,7 +24979,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, -0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, @@ -24791,7 +24987,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, +0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, @@ -24799,7 +24995,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, -0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, @@ -24807,7 +25003,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, +0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, @@ -24815,7 +25011,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, -0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, @@ -24823,7 +25019,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, @@ -24831,15 +25027,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, -0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -25082,11 +25278,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, -0x64, 0x4D, 0xCB, 0xA0, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, +0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, -0x72, 0xE7, 0x58, 0x20, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, +0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 0x01, 0x03, 0x02, 0x03, @@ -25127,7 +25323,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, -0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, @@ -25135,7 +25331,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, +0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, @@ -25143,7 +25339,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, -0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, @@ -25151,7 +25347,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, +0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, @@ -25159,7 +25355,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, -0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, @@ -25167,7 +25363,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, +0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, @@ -25175,7 +25371,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, -0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, @@ -25183,15 +25379,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, +0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, @@ -26037,9 +26233,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, -0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x10, -0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, - +0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x1A, +0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, +0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -29888,9 +30084,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, -0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, -0x4B, 0x20, 0x28, 0x57, 0x29, +0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, +0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, +0x54, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -30552,8 +30748,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Godthab */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -30575,74 +30771,102 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -36729,8 +36953,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Nuuk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -36752,75 +36976,103 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, -0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, +0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -37121,9 +37373,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, -0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, -0x29, +0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, +0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -38482,9 +38733,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, -0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, -0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, 0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40764,142 +41014,153 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xBE, 0x2A, 0x18, 0x00, -0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0x04, 0x61, 0x19, 0x90, -0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, 0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, -0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, 0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, -0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, -0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, 0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, -0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, 0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, -0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, 0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, -0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, 0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, -0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, 0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, -0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, -0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, -0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, -0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, 0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, -0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, 0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, -0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, 0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, -0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, -0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, -0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, 0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, -0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, 0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, -0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, -0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, 0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, -0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, 0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, -0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, 0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, -0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, -0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, -0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, -0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, 0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, -0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, 0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, -0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, 0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, -0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, -0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, -0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, 0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, -0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, 0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, -0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, -0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, -0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, -0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, -0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, -0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, -0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, -0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, -0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, -0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, -0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, -0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, -0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, -0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, -0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, -0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, -0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, -0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, -0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, -0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, -0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, -0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, -0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, -0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, -0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, -0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, -0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, -0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, -0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, -0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, -0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, -0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, -0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, -0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, -0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, -0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, -0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, 0x00, 0x64, 0x2C, 0x88, -0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, -0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x88, 0xDE, 0xCE, 0xE0, +0x9E, 0xB8, 0xAF, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x98, 0x91, 0x90, 0xA0, 0xD2, 0x85, 0x80, +0xA2, 0x8A, 0xE8, 0x90, 0xA3, 0x84, 0x06, 0x00, 0xA4, 0x6A, 0xCA, 0x90, 0xA5, 0x35, 0xC3, 0x80, +0xA6, 0x53, 0xE7, 0x10, 0xA7, 0x15, 0xA5, 0x80, 0xA8, 0x33, 0xC9, 0x10, 0xA8, 0xFE, 0xC2, 0x00, +0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xD5, 0x55, 0xE3, 0x10, +0xD6, 0x20, 0xDC, 0x00, 0x04, 0x61, 0x19, 0x90, 0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, +0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, 0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, +0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, 0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, +0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, +0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, 0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, +0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, 0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, +0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, 0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, +0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, 0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, +0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, 0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, +0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, +0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, +0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, 0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, +0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, 0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, +0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, 0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, +0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, +0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, +0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, +0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, +0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, +0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, +0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, +0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, +0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, +0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, +0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, +0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, +0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, +0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, +0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, +0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, +0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, +0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, +0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, +0x7F, 0x98, 0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, +0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, +0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, +0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, +0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, +0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, +0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, +0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, +0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, +0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, +0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, +0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, +0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, +0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, +0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, +0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, +0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, +0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, +0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, +0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, +0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, +0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, +0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, +0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, +0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, +0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, +0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, +0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, +0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, +0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, +0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, +0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, +0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, +0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, +0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, +0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, +0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, +0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, +0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, +0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, +0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, +0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, +0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, +0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, +0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, +0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, +0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, +0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, +0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, +0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, +0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, +0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, +0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, +0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, +0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, +0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, +0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, +0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, +0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, +0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, +0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, +0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, +0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, +0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, +0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, +0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, +0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, +0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, +0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, +0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, +0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, +0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, +0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, +0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, +0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, +0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, +0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -41840,8 +42101,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x60, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, 0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, -0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, +0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43430,15 +43691,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0x29, 0x5C, 0x60, 0x56, 0xF5, 0xC2, 0xF0, 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, -0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, -0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, +0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, +0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, -0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, -0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, +0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43456,7 +43717,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, +0x00, 0x01, 0x30, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, @@ -43517,9 +43778,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, -0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, -0x07, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, -0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, +0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, +0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, +0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, @@ -43530,8 +43791,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, -0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, -0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, +0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, +0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, +0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, +0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, +0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, +0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, +0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, +0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, +0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, +0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, +0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, +0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, +0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, +0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, +0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, +0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, +0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, +0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, +0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, +0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, +0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, +0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, +0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, +0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, +0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, +0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, +0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, +0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, +0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, +0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, +0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, +0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, +0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, +0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, +0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, +0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, +0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, +0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, +0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, +0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, +0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, +0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, +0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, +0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, +0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, +0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, +0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, +0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, +0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, +0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, +0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, +0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, +0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, +0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, +0x94, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, +0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, +0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, +0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, +0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, +0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, +0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, +0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, +0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, +0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, +0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, +0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43541,16 +43879,26 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, -0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, -0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, -0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, -0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, -0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, +0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, +0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, +0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, +0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, +0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43624,14 +43972,14 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, 0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, -0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, -0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, +0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, +0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, 0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, -0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, +0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43649,7 +43997,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, +0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, @@ -43711,9 +44059,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, -0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x56, 0x00, 0x00, 0x00, 0x00, -0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, @@ -43725,8 +44073,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, +0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, +0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, +0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, +0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, +0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, +0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, +0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, +0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, +0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, +0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, +0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, +0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, 0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, 0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, 0x94, 0x10, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, 0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, 0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, 0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, +0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43735,17 +44160,27 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, -0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, -0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, -0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, -0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, +0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, +0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, +0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, +0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, +0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45169,9 +45604,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x13, 0x43, 0x79, -0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46050,9 +46484,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x9A, 0xB0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, -0x36, 0x12, 0x00, 0x00, 0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, -0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, -0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, +0x36, 0x12, 0x00, 0x00, 0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, +0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, +0x6C, 0x20, 0x49, 0x73, /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46654,8 +47088,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, 0x38, 0x0A, 0x00, 0xD2, 0x71, -0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, -0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, +0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -53257,7 +53691,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Egypt */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -53289,95 +53723,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -55153,8 +55615,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, -0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, +0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -57798,8 +58260,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Kirov */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0x00, 0x39, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0x00, 0x39, 0x80, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -57819,57 +58281,60 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, -0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, -0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, -0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, -0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, -0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, -0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, -0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, -0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, -0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, -0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, -0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, -0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, -0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, -0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, -0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, -0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, -0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, -0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, -0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, -0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, -0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, -0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, -0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, -0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, -0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, -0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, -0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, -0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, -0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, -0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, -0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, -0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, -0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, +0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, +0x30, 0x34, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, -0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, -0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, -0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, -0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, -0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, +0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, +0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, +0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, +0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x4D, 0x53, +0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -58005,8 +58470,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, -0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, +0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -62776,8 +63241,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Volgograd */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0xF5, 0x46, 0xDC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0xF5, 0x46, 0xDC, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -62797,58 +63262,61 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, -0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, -0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, -0x08, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, -0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, -0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, -0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, -0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, -0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, -0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, -0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, -0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, +0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, +0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x4D, 0x53, 0x44, +0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, +0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, 0x07, 0x00, 0x00, -0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, -0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, -0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, -0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, +0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, +0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, +0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, +0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, +0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -65776,8 +66244,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, -0x18, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, -0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x13, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, +0x6C, 0x61, 0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66446,9 +66914,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, 0xE3, 0x80, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, -0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, 0x72, 0x73, +0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66683,9 +67150,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x90, 0x01, 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, -0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, -0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, +0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, + /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -69532,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2022.7", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 9495406c9eace5b8e1b46bd7b5197ebf67fd0d80 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 23 Mar 2023 10:10:23 +0000 Subject: [PATCH 684/895] Updated to version 2023.1 (2023a) --- ext/date/lib/timezonedb.h | 4337 ++++++++++++++++++++----------------- 1 file changed, 2402 insertions(+), 1935 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 2b4f626f23ec4..4219b12911224 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -19,593 +19,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000A9B }, { (char*) "Africa/Bujumbura" , 0x000B2A }, { (char*) "Africa/Cairo" , 0x000BB9 }, - { (char*) "Africa/Casablanca" , 0x0010C1 }, - { (char*) "Africa/Ceuta" , 0x00184C }, - { (char*) "Africa/Conakry" , 0x001A98 }, - { (char*) "Africa/Dakar" , 0x001B42 }, - { (char*) "Africa/Dar_es_Salaam" , 0x001BE3 }, - { (char*) "Africa/Djibouti" , 0x001C90 }, - { (char*) "Africa/Douala" , 0x001D1F }, - { (char*) "Africa/El_Aaiun" , 0x001DAE }, - { (char*) "Africa/Freetown" , 0x0024E0 }, - { (char*) "Africa/Gaborone" , 0x002630 }, - { (char*) "Africa/Harare" , 0x0026F0 }, - { (char*) "Africa/Johannesburg" , 0x00277F }, - { (char*) "Africa/Juba" , 0x002849 }, - { (char*) "Africa/Kampala" , 0x002A1F }, - { (char*) "Africa/Khartoum" , 0x002AE1 }, - { (char*) "Africa/Kigali" , 0x002CB7 }, - { (char*) "Africa/Kinshasa" , 0x002D46 }, - { (char*) "Africa/Lagos" , 0x002DEE }, - { (char*) "Africa/Libreville" , 0x002EAE }, - { (char*) "Africa/Lome" , 0x002F3D }, - { (char*) "Africa/Luanda" , 0x002FCB }, - { (char*) "Africa/Lubumbashi" , 0x003069 }, - { (char*) "Africa/Lusaka" , 0x003124 }, - { (char*) "Africa/Malabo" , 0x0031B3 }, - { (char*) "Africa/Maputo" , 0x003255 }, - { (char*) "Africa/Maseru" , 0x0032E4 }, - { (char*) "Africa/Mbabane" , 0x00338D }, - { (char*) "Africa/Mogadishu" , 0x00341E }, - { (char*) "Africa/Monrovia" , 0x0034CB }, - { (char*) "Africa/Nairobi" , 0x00357B }, - { (char*) "Africa/Ndjamena" , 0x003646 }, - { (char*) "Africa/Niamey" , 0x0036F2 }, - { (char*) "Africa/Nouakchott" , 0x0037A7 }, - { (char*) "Africa/Ouagadougou" , 0x003851 }, - { (char*) "Africa/Porto-Novo" , 0x0038DF }, - { (char*) "Africa/Sao_Tome" , 0x003981 }, - { (char*) "Africa/Timbuktu" , 0x003A3A }, - { (char*) "Africa/Tripoli" , 0x003AC8 }, - { (char*) "Africa/Tunis" , 0x003C83 }, - { (char*) "Africa/Windhoek" , 0x003E50 }, - { (char*) "America/Adak" , 0x0040DA }, - { (char*) "America/Anchorage" , 0x0044BF }, - { (char*) "America/Anguilla" , 0x0048AF }, - { (char*) "America/Antigua" , 0x00493D }, - { (char*) "America/Araguaina" , 0x0049DE }, - { (char*) "America/Argentina/Buenos_Aires" , 0x004C43 }, - { (char*) "America/Argentina/Catamarca" , 0x004F28 }, - { (char*) "America/Argentina/ComodRivadavia" , 0x005213 }, - { (char*) "America/Argentina/Cordoba" , 0x0054E3 }, - { (char*) "America/Argentina/Jujuy" , 0x0057E9 }, - { (char*) "America/Argentina/La_Rioja" , 0x005AB1 }, - { (char*) "America/Argentina/Mendoza" , 0x005D97 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x006073 }, - { (char*) "America/Argentina/Salta" , 0x006352 }, - { (char*) "America/Argentina/San_Juan" , 0x006626 }, - { (char*) "America/Argentina/San_Luis" , 0x00690C }, - { (char*) "America/Argentina/Tucuman" , 0x006BF2 }, - { (char*) "America/Argentina/Ushuaia" , 0x006EE0 }, - { (char*) "America/Aruba" , 0x0071C5 }, - { (char*) "America/Asuncion" , 0x007268 }, - { (char*) "America/Atikokan" , 0x0075E8 }, - { (char*) "America/Atka" , 0x0076F5 }, - { (char*) "America/Bahia" , 0x007ACA }, - { (char*) "America/Bahia_Banderas" , 0x007D85 }, - { (char*) "America/Barbados" , 0x00807A }, - { (char*) "America/Belem" , 0x00819C }, - { (char*) "America/Belize" , 0x008344 }, - { (char*) "America/Blanc-Sablon" , 0x008765 }, - { (char*) "America/Boa_Vista" , 0x00885A }, - { (char*) "America/Bogota" , 0x008A1B }, - { (char*) "America/Boise" , 0x008ADA }, - { (char*) "America/Buenos_Aires" , 0x008EED }, - { (char*) "America/Cambridge_Bay" , 0x0091BD }, - { (char*) "America/Campo_Grande" , 0x009550 }, - { (char*) "America/Cancun" , 0x009926 }, - { (char*) "America/Caracas" , 0x009B4F }, - { (char*) "America/Catamarca" , 0x009C19 }, - { (char*) "America/Cayenne" , 0x009EE9 }, - { (char*) "America/Cayman" , 0x009F8C }, - { (char*) "America/Chicago" , 0x00A02D }, - { (char*) "America/Chihuahua" , 0x00A727 }, - { (char*) "America/Ciudad_Juarez" , 0x00A9FC }, - { (char*) "America/Coral_Harbour" , 0x00ACF2 }, - { (char*) "America/Cordoba" , 0x00AD93 }, - { (char*) "America/Costa_Rica" , 0x00B063 }, - { (char*) "America/Creston" , 0x00B157 }, - { (char*) "America/Cuiaba" , 0x00B213 }, - { (char*) "America/Curacao" , 0x00B5D0 }, - { (char*) "America/Danmarkshavn" , 0x00B673 }, - { (char*) "America/Dawson" , 0x00B858 }, - { (char*) "America/Dawson_Creek" , 0x00BC7B }, - { (char*) "America/Denver" , 0x00BF52 }, - { (char*) "America/Detroit" , 0x00C385 }, - { (char*) "America/Dominica" , 0x00C72D }, - { (char*) "America/Edmonton" , 0x00C7BB }, - { (char*) "America/Eirunepe" , 0x00CBAE }, - { (char*) "America/El_Salvador" , 0x00CD7D }, - { (char*) "America/Ensenada" , 0x00CE39 }, - { (char*) "America/Fort_Nelson" , 0x00D246 }, - { (char*) "America/Fort_Wayne" , 0x00D80E }, - { (char*) "America/Fortaleza" , 0x00DA2D }, - { (char*) "America/Glace_Bay" , 0x00DC43 }, - { (char*) "America/Godthab" , 0x00DFDA }, - { (char*) "America/Goose_Bay" , 0x00E389 }, - { (char*) "America/Grand_Turk" , 0x00E9E1 }, - { (char*) "America/Grenada" , 0x00ED42 }, - { (char*) "America/Guadeloupe" , 0x00EDD0 }, - { (char*) "America/Guatemala" , 0x00EE5E }, - { (char*) "America/Guayaquil" , 0x00EF3E }, - { (char*) "America/Guyana" , 0x00F00F }, - { (char*) "America/Halifax" , 0x00F0D0 }, - { (char*) "America/Havana" , 0x00F782 }, - { (char*) "America/Hermosillo" , 0x00FBEB }, - { (char*) "America/Indiana/Indianapolis" , 0x00FD1B }, - { (char*) "America/Indiana/Knox" , 0x00FF53 }, - { (char*) "America/Indiana/Marengo" , 0x01036C }, - { (char*) "America/Indiana/Petersburg" , 0x0105C6 }, - { (char*) "America/Indiana/Tell_City" , 0x010890 }, - { (char*) "America/Indiana/Vevay" , 0x010ABA }, - { (char*) "America/Indiana/Vincennes" , 0x010C51 }, - { (char*) "America/Indiana/Winamac" , 0x010EA7 }, - { (char*) "America/Indianapolis" , 0x01112D }, - { (char*) "America/Inuvik" , 0x01134C }, - { (char*) "America/Iqaluit" , 0x01169D }, - { (char*) "America/Jamaica" , 0x011A19 }, - { (char*) "America/Jujuy" , 0x011B78 }, - { (char*) "America/Juneau" , 0x011E36 }, - { (char*) "America/Kentucky/Louisville" , 0x01221C }, - { (char*) "America/Kentucky/Monticello" , 0x012720 }, - { (char*) "America/Knox_IN" , 0x012B0C }, - { (char*) "America/Kralendijk" , 0x012F10 }, - { (char*) "America/La_Paz" , 0x012FCD }, - { (char*) "America/Lima" , 0x013083 }, - { (char*) "America/Los_Angeles" , 0x0131AA }, - { (char*) "America/Louisville" , 0x0136CB }, - { (char*) "America/Lower_Princes" , 0x013BB1 }, - { (char*) "America/Maceio" , 0x013C6E }, - { (char*) "America/Managua" , 0x013E80 }, - { (char*) "America/Manaus" , 0x013FB3 }, - { (char*) "America/Marigot" , 0x01416A }, - { (char*) "America/Martinique" , 0x014227 }, - { (char*) "America/Matamoros" , 0x0142E5 }, - { (char*) "America/Mazatlan" , 0x0144D2 }, - { (char*) "America/Mendoza" , 0x0147DE }, - { (char*) "America/Menominee" , 0x014AAE }, - { (char*) "America/Merida" , 0x014E6E }, - { (char*) "America/Metlakatla" , 0x015119 }, - { (char*) "America/Mexico_City" , 0x01538F }, - { (char*) "America/Miquelon" , 0x0156AE }, - { (char*) "America/Moncton" , 0x0158E0 }, - { (char*) "America/Monterrey" , 0x015ED9 }, - { (char*) "America/Montevideo" , 0x01619F }, - { (char*) "America/Montreal" , 0x016574 }, - { (char*) "America/Montserrat" , 0x016C35 }, - { (char*) "America/Nassau" , 0x016CC3 }, - { (char*) "America/New_York" , 0x0170BD }, - { (char*) "America/Nipigon" , 0x0177AD }, - { (char*) "America/Nome" , 0x017E6E }, - { (char*) "America/Noronha" , 0x018256 }, - { (char*) "America/North_Dakota/Beulah" , 0x018456 }, - { (char*) "America/North_Dakota/Center" , 0x01888A }, - { (char*) "America/North_Dakota/New_Salem" , 0x018C89 }, - { (char*) "America/Nuuk" , 0x01908E }, - { (char*) "America/Ojinaga" , 0x019453 }, - { (char*) "America/Panama" , 0x019740 }, - { (char*) "America/Pangnirtung" , 0x0197E1 }, - { (char*) "America/Paramaribo" , 0x019B44 }, - { (char*) "America/Phoenix" , 0x019C0B }, - { (char*) "America/Port-au-Prince" , 0x019D24 }, - { (char*) "America/Port_of_Spain" , 0x019F65 }, - { (char*) "America/Porto_Acre" , 0x019FF3 }, - { (char*) "America/Porto_Velho" , 0x01A1A1 }, - { (char*) "America/Puerto_Rico" , 0x01A33F }, - { (char*) "America/Punta_Arenas" , 0x01A3FC }, - { (char*) "America/Rainy_River" , 0x01A8DE }, - { (char*) "America/Rankin_Inlet" , 0x01ADF8 }, - { (char*) "America/Recife" , 0x01B141 }, - { (char*) "America/Regina" , 0x01B33B }, - { (char*) "America/Resolute" , 0x01B5DA }, - { (char*) "America/Rio_Branco" , 0x01B924 }, - { (char*) "America/Rosario" , 0x01BAD6 }, - { (char*) "America/Santa_Isabel" , 0x01BDA6 }, - { (char*) "America/Santarem" , 0x01C1B3 }, - { (char*) "America/Santiago" , 0x01C363 }, - { (char*) "America/Santo_Domingo" , 0x01C8CB }, - { (char*) "America/Sao_Paulo" , 0x01CA14 }, - { (char*) "America/Scoresbysund" , 0x01CE0E }, - { (char*) "America/Shiprock" , 0x01D016 }, - { (char*) "America/Sitka" , 0x01D434 }, - { (char*) "America/St_Barthelemy" , 0x01D80F }, - { (char*) "America/St_Johns" , 0x01D8CC }, - { (char*) "America/St_Kitts" , 0x01E050 }, - { (char*) "America/St_Lucia" , 0x01E0DE }, - { (char*) "America/St_Thomas" , 0x01E17F }, - { (char*) "America/St_Vincent" , 0x01E20D }, - { (char*) "America/Swift_Current" , 0x01E2AE }, - { (char*) "America/Tegucigalpa" , 0x01E43C }, - { (char*) "America/Thule" , 0x01E50A }, - { (char*) "America/Thunder_Bay" , 0x01E6EB }, - { (char*) "America/Tijuana" , 0x01EDAC }, - { (char*) "America/Toronto" , 0x01F1C8 }, - { (char*) "America/Tortola" , 0x01F8A6 }, - { (char*) "America/Vancouver" , 0x01F934 }, - { (char*) "America/Virgin" , 0x01FE8B }, - { (char*) "America/Whitehorse" , 0x01FF48 }, - { (char*) "America/Winnipeg" , 0x02036B }, - { (char*) "America/Yakutat" , 0x0208A2 }, - { (char*) "America/Yellowknife" , 0x020C70 }, - { (char*) "Antarctica/Casey" , 0x020FDF }, - { (char*) "Antarctica/Davis" , 0x0210E3 }, - { (char*) "Antarctica/DumontDUrville" , 0x0211B9 }, - { (char*) "Antarctica/Macquarie" , 0x02126D }, - { (char*) "Antarctica/Mawson" , 0x021659 }, - { (char*) "Antarctica/McMurdo" , 0x021703 }, - { (char*) "Antarctica/Palmer" , 0x021A35 }, - { (char*) "Antarctica/Rothera" , 0x021DBE }, - { (char*) "Antarctica/South_Pole" , 0x021E55 }, - { (char*) "Antarctica/Syowa" , 0x022274 }, - { (char*) "Antarctica/Troll" , 0x02230A }, - { (char*) "Antarctica/Vostok" , 0x0223CC }, - { (char*) "Arctic/Longyearbyen" , 0x022463 }, - { (char*) "Asia/Aden" , 0x022730 }, - { (char*) "Asia/Almaty" , 0x0227C1 }, - { (char*) "Asia/Amman" , 0x022A45 }, - { (char*) "Asia/Anadyr" , 0x022DF1 }, - { (char*) "Asia/Aqtau" , 0x0230F7 }, - { (char*) "Asia/Aqtobe" , 0x023376 }, - { (char*) "Asia/Ashgabat" , 0x0235F6 }, - { (char*) "Asia/Ashkhabad" , 0x023779 }, - { (char*) "Asia/Atyrau" , 0x0238FC }, - { (char*) "Asia/Baghdad" , 0x023B85 }, - { (char*) "Asia/Bahrain" , 0x023E07 }, - { (char*) "Asia/Baku" , 0x023EC0 }, - { (char*) "Asia/Bangkok" , 0x0241B4 }, - { (char*) "Asia/Barnaul" , 0x024258 }, - { (char*) "Asia/Beirut" , 0x024563 }, - { (char*) "Asia/Bishkek" , 0x02484B }, - { (char*) "Asia/Brunei" , 0x024AC1 }, - { (char*) "Asia/Calcutta" , 0x024B67 }, - { (char*) "Asia/Chita" , 0x024C4F }, - { (char*) "Asia/Choibalsan" , 0x024F5D }, - { (char*) "Asia/Chongqing" , 0x0251E6 }, - { (char*) "Asia/Chungking" , 0x02537B }, - { (char*) "Asia/Colombo" , 0x025510 }, - { (char*) "Asia/Dacca" , 0x025613 }, - { (char*) "Asia/Damascus" , 0x025706 }, - { (char*) "Asia/Dhaka" , 0x025BE4 }, - { (char*) "Asia/Dili" , 0x025CD7 }, - { (char*) "Asia/Dubai" , 0x025D8D }, - { (char*) "Asia/Dushanbe" , 0x025E1E }, - { (char*) "Asia/Famagusta" , 0x025F98 }, - { (char*) "Asia/Gaza" , 0x02635F }, - { (char*) "Asia/Harbin" , 0x02685F }, - { (char*) "Asia/Hebron" , 0x0269F4 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x026F05 }, - { (char*) "Asia/Hong_Kong" , 0x026FFD }, - { (char*) "Asia/Hovd" , 0x027310 }, - { (char*) "Asia/Irkutsk" , 0x027599 }, - { (char*) "Asia/Istanbul" , 0x0278B7 }, - { (char*) "Asia/Jakarta" , 0x027D73 }, - { (char*) "Asia/Jayapura" , 0x027E84 }, - { (char*) "Asia/Jerusalem" , 0x027F71 }, - { (char*) "Asia/Kabul" , 0x0283AF }, - { (char*) "Asia/Kamchatka" , 0x02845A }, - { (char*) "Asia/Karachi" , 0x02874F }, - { (char*) "Asia/Kashgar" , 0x028865 }, - { (char*) "Asia/Kathmandu" , 0x0288F6 }, - { (char*) "Asia/Katmandu" , 0x0289A3 }, - { (char*) "Asia/Khandyga" , 0x028A50 }, - { (char*) "Asia/Kolkata" , 0x028D81 }, - { (char*) "Asia/Krasnoyarsk" , 0x028E69 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029173 }, - { (char*) "Asia/Kuching" , 0x029293 }, - { (char*) "Asia/Kuwait" , 0x0293ED }, - { (char*) "Asia/Macao" , 0x02947E }, - { (char*) "Asia/Macau" , 0x0297A1 }, - { (char*) "Asia/Magadan" , 0x029AC4 }, - { (char*) "Asia/Makassar" , 0x029DCF }, - { (char*) "Asia/Manila" , 0x029EE2 }, - { (char*) "Asia/Muscat" , 0x029FDC }, - { (char*) "Asia/Nicosia" , 0x02A06D }, - { (char*) "Asia/Novokuznetsk" , 0x02A2E1 }, - { (char*) "Asia/Novosibirsk" , 0x02A5D4 }, - { (char*) "Asia/Omsk" , 0x02A8E5 }, - { (char*) "Asia/Oral" , 0x02ABE3 }, - { (char*) "Asia/Phnom_Penh" , 0x02AE6F }, - { (char*) "Asia/Pontianak" , 0x02AF43 }, - { (char*) "Asia/Pyongyang" , 0x02B05C }, - { (char*) "Asia/Qatar" , 0x02B11F }, - { (char*) "Asia/Qostanay" , 0x02B1C3 }, - { (char*) "Asia/Qyzylorda" , 0x02B450 }, - { (char*) "Asia/Rangoon" , 0x02B6E9 }, - { (char*) "Asia/Riyadh" , 0x02B7B0 }, - { (char*) "Asia/Saigon" , 0x02B841 }, - { (char*) "Asia/Sakhalin" , 0x02B939 }, - { (char*) "Asia/Samarkand" , 0x02BC50 }, - { (char*) "Asia/Seoul" , 0x02BDDB }, - { (char*) "Asia/Shanghai" , 0x02BF86 }, - { (char*) "Asia/Singapore" , 0x02C127 }, - { (char*) "Asia/Srednekolymsk" , 0x02C233 }, - { (char*) "Asia/Taipei" , 0x02C547 }, - { (char*) "Asia/Tashkent" , 0x02C752 }, - { (char*) "Asia/Tbilisi" , 0x02C8DD }, - { (char*) "Asia/Tehran" , 0x02CB5E }, - { (char*) "Asia/Tel_Aviv" , 0x02CE96 }, - { (char*) "Asia/Thimbu" , 0x02D2D4 }, - { (char*) "Asia/Thimphu" , 0x02D37A }, - { (char*) "Asia/Tokyo" , 0x02D420 }, - { (char*) "Asia/Tomsk" , 0x02D501 }, - { (char*) "Asia/Ujung_Pandang" , 0x02D80C }, - { (char*) "Asia/Ulaanbaatar" , 0x02D8D6 }, - { (char*) "Asia/Ulan_Bator" , 0x02DB49 }, - { (char*) "Asia/Urumqi" , 0x02DDA7 }, - { (char*) "Asia/Ust-Nera" , 0x02DE45 }, - { (char*) "Asia/Vientiane" , 0x02E168 }, - { (char*) "Asia/Vladivostok" , 0x02E24E }, - { (char*) "Asia/Yakutsk" , 0x02E553 }, - { (char*) "Asia/Yangon" , 0x02E857 }, - { (char*) "Asia/Yekaterinburg" , 0x02E91E }, - { (char*) "Asia/Yerevan" , 0x02EC30 }, - { (char*) "Atlantic/Azores" , 0x02EF00 }, - { (char*) "Atlantic/Bermuda" , 0x02F4BF }, - { (char*) "Atlantic/Canary" , 0x02F8CB }, - { (char*) "Atlantic/Cape_Verde" , 0x02FAC3 }, - { (char*) "Atlantic/Faeroe" , 0x02FB7E }, - { (char*) "Atlantic/Faroe" , 0x02FD43 }, - { (char*) "Atlantic/Jan_Mayen" , 0x02FF08 }, - { (char*) "Atlantic/Madeira" , 0x0301D5 }, - { (char*) "Atlantic/Reykjavik" , 0x03079D }, - { (char*) "Atlantic/South_Georgia" , 0x030A9A }, - { (char*) "Atlantic/St_Helena" , 0x030B2A }, - { (char*) "Atlantic/Stanley" , 0x030BCB }, - { (char*) "Australia/ACT" , 0x030EEC }, - { (char*) "Australia/Adelaide" , 0x031280 }, - { (char*) "Australia/Brisbane" , 0x031634 }, - { (char*) "Australia/Broken_Hill" , 0x031778 }, - { (char*) "Australia/Canberra" , 0x031B4D }, - { (char*) "Australia/Currie" , 0x031EE1 }, - { (char*) "Australia/Darwin" , 0x0322D8 }, - { (char*) "Australia/Eucla" , 0x0323E0 }, - { (char*) "Australia/Hobart" , 0x03253F }, - { (char*) "Australia/LHI" , 0x03293E }, - { (char*) "Australia/Lindeman" , 0x032BFE }, - { (char*) "Australia/Lord_Howe" , 0x032D6E }, - { (char*) "Australia/Melbourne" , 0x03303E }, - { (char*) "Australia/North" , 0x0333DA }, - { (char*) "Australia/NSW" , 0x0334D0 }, - { (char*) "Australia/Perth" , 0x033864 }, - { (char*) "Australia/Queensland" , 0x0339C0 }, - { (char*) "Australia/South" , 0x033AED }, - { (char*) "Australia/Sydney" , 0x033E92 }, - { (char*) "Australia/Tasmania" , 0x034242 }, - { (char*) "Australia/Victoria" , 0x034639 }, - { (char*) "Australia/West" , 0x0349CD }, - { (char*) "Australia/Yancowinna" , 0x034B0B }, - { (char*) "Brazil/Acre" , 0x034EC4 }, - { (char*) "Brazil/DeNoronha" , 0x035072 }, - { (char*) "Brazil/East" , 0x035262 }, - { (char*) "Brazil/West" , 0x035626 }, - { (char*) "Canada/Atlantic" , 0x0357CE }, - { (char*) "Canada/Central" , 0x035E62 }, - { (char*) "Canada/Eastern" , 0x03637C }, - { (char*) "Canada/Mountain" , 0x036A3D }, - { (char*) "Canada/Newfoundland" , 0x036E13 }, - { (char*) "Canada/Pacific" , 0x037575 }, - { (char*) "Canada/Saskatchewan" , 0x037AB3 }, - { (char*) "Canada/Yukon" , 0x037D3D }, - { (char*) "CET" , 0x03814E }, - { (char*) "Chile/Continental" , 0x0383C7 }, - { (char*) "Chile/EasterIsland" , 0x03891D }, - { (char*) "CST6CDT" , 0x038DBF }, - { (char*) "Cuba" , 0x039182 }, - { (char*) "EET" , 0x0395EB }, - { (char*) "Egypt" , 0x0397E8 }, - { (char*) "Eire" , 0x039CF0 }, - { (char*) "EST" , 0x03A2D4 }, - { (char*) "EST5EDT" , 0x03A34F }, - { (char*) "Etc/GMT" , 0x03A712 }, - { (char*) "Etc/GMT+0" , 0x03A78D }, - { (char*) "Etc/GMT+1" , 0x03A808 }, - { (char*) "Etc/GMT+10" , 0x03A885 }, - { (char*) "Etc/GMT+11" , 0x03A903 }, - { (char*) "Etc/GMT+12" , 0x03A981 }, - { (char*) "Etc/GMT+2" , 0x03A9FF }, - { (char*) "Etc/GMT+3" , 0x03AA7C }, - { (char*) "Etc/GMT+4" , 0x03AAF9 }, - { (char*) "Etc/GMT+5" , 0x03AB76 }, - { (char*) "Etc/GMT+6" , 0x03ABF3 }, - { (char*) "Etc/GMT+7" , 0x03AC70 }, - { (char*) "Etc/GMT+8" , 0x03ACED }, - { (char*) "Etc/GMT+9" , 0x03AD6A }, - { (char*) "Etc/GMT-0" , 0x03ADE7 }, - { (char*) "Etc/GMT-1" , 0x03AE62 }, - { (char*) "Etc/GMT-10" , 0x03AEE0 }, - { (char*) "Etc/GMT-11" , 0x03AF5F }, - { (char*) "Etc/GMT-12" , 0x03AFDE }, - { (char*) "Etc/GMT-13" , 0x03B05D }, - { (char*) "Etc/GMT-14" , 0x03B0DC }, - { (char*) "Etc/GMT-2" , 0x03B15B }, - { (char*) "Etc/GMT-3" , 0x03B1D9 }, - { (char*) "Etc/GMT-4" , 0x03B257 }, - { (char*) "Etc/GMT-5" , 0x03B2D5 }, - { (char*) "Etc/GMT-6" , 0x03B353 }, - { (char*) "Etc/GMT-7" , 0x03B3D1 }, - { (char*) "Etc/GMT-8" , 0x03B44F }, - { (char*) "Etc/GMT-9" , 0x03B4CD }, - { (char*) "Etc/GMT0" , 0x03B54B }, - { (char*) "Etc/Greenwich" , 0x03B5C6 }, - { (char*) "Etc/UCT" , 0x03B641 }, - { (char*) "Etc/Universal" , 0x03B6BC }, - { (char*) "Etc/UTC" , 0x03B737 }, - { (char*) "Etc/Zulu" , 0x03B7B2 }, - { (char*) "Europe/Amsterdam" , 0x03B82D }, - { (char*) "Europe/Andorra" , 0x03BC68 }, - { (char*) "Europe/Astrakhan" , 0x03BDF9 }, - { (char*) "Europe/Athens" , 0x03C0ED }, - { (char*) "Europe/Belfast" , 0x03C3A3 }, - { (char*) "Europe/Belgrade" , 0x03C9EE }, - { (char*) "Europe/Berlin" , 0x03CBD8 }, - { (char*) "Europe/Bratislava" , 0x03CEB9 }, - { (char*) "Europe/Brussels" , 0x03D198 }, - { (char*) "Europe/Bucharest" , 0x03D5F3 }, - { (char*) "Europe/Budapest" , 0x03D894 }, - { (char*) "Europe/Busingen" , 0x03DB9E }, - { (char*) "Europe/Chisinau" , 0x03DDA3 }, - { (char*) "Europe/Copenhagen" , 0x03E0A2 }, - { (char*) "Europe/Dublin" , 0x03E31D }, - { (char*) "Europe/Gibraltar" , 0x03E901 }, - { (char*) "Europe/Guernsey" , 0x03EDD1 }, - { (char*) "Europe/Helsinki" , 0x03F428 }, - { (char*) "Europe/Isle_of_Man" , 0x03F615 }, - { (char*) "Europe/Istanbul" , 0x03FC60 }, - { (char*) "Europe/Jersey" , 0x04011C }, - { (char*) "Europe/Kaliningrad" , 0x040773 }, - { (char*) "Europe/Kiev" , 0x040B1B }, - { (char*) "Europe/Kirov" , 0x040D55 }, - { (char*) "Europe/Kyiv" , 0x04103C }, - { (char*) "Europe/Lisbon" , 0x04128A }, - { (char*) "Europe/Ljubljana" , 0x041857 }, - { (char*) "Europe/London" , 0x041A41 }, - { (char*) "Europe/Luxembourg" , 0x04208C }, - { (char*) "Europe/Madrid" , 0x0424D7 }, - { (char*) "Europe/Malta" , 0x042874 }, - { (char*) "Europe/Mariehamn" , 0x042C20 }, - { (char*) "Europe/Minsk" , 0x042E0D }, - { (char*) "Europe/Monaco" , 0x043141 }, - { (char*) "Europe/Moscow" , 0x0435A7 }, - { (char*) "Europe/Nicosia" , 0x043953 }, - { (char*) "Europe/Oslo" , 0x043BB4 }, - { (char*) "Europe/Paris" , 0x043E64 }, - { (char*) "Europe/Podgorica" , 0x0442C1 }, - { (char*) "Europe/Prague" , 0x0444AB }, - { (char*) "Europe/Riga" , 0x04478A }, - { (char*) "Europe/Rome" , 0x044A4C }, - { (char*) "Europe/Samara" , 0x044E0B }, - { (char*) "Europe/San_Marino" , 0x04510C }, - { (char*) "Europe/Sarajevo" , 0x0454CB }, - { (char*) "Europe/Saratov" , 0x0456B5 }, - { (char*) "Europe/Simferopol" , 0x0459A7 }, - { (char*) "Europe/Skopje" , 0x045D1A }, - { (char*) "Europe/Sofia" , 0x045F04 }, - { (char*) "Europe/Stockholm" , 0x046160 }, - { (char*) "Europe/Tallinn" , 0x04635D }, - { (char*) "Europe/Tirane" , 0x04660C }, - { (char*) "Europe/Tiraspol" , 0x046874 }, - { (char*) "Europe/Ulyanovsk" , 0x046B73 }, - { (char*) "Europe/Uzhgorod" , 0x046E89 }, - { (char*) "Europe/Vaduz" , 0x0470C3 }, - { (char*) "Europe/Vatican" , 0x0472AD }, - { (char*) "Europe/Vienna" , 0x04766C }, - { (char*) "Europe/Vilnius" , 0x04790A }, - { (char*) "Europe/Volgograd" , 0x047BBA }, - { (char*) "Europe/Warsaw" , 0x047EB7 }, - { (char*) "Europe/Zagreb" , 0x04825E }, - { (char*) "Europe/Zaporozhye" , 0x048448 }, - { (char*) "Europe/Zurich" , 0x048682 }, - { (char*) "Factory" , 0x04887F }, - { (char*) "GB" , 0x0488FC }, - { (char*) "GB-Eire" , 0x048F47 }, - { (char*) "GMT" , 0x049592 }, - { (char*) "GMT+0" , 0x04960D }, - { (char*) "GMT-0" , 0x049688 }, - { (char*) "GMT0" , 0x049703 }, - { (char*) "Greenwich" , 0x04977E }, - { (char*) "Hongkong" , 0x0497F9 }, - { (char*) "HST" , 0x049B0C }, - { (char*) "Iceland" , 0x049B88 }, - { (char*) "Indian/Antananarivo" , 0x049C16 }, - { (char*) "Indian/Chagos" , 0x049CC2 }, - { (char*) "Indian/Christmas" , 0x049D66 }, - { (char*) "Indian/Cocos" , 0x049DF7 }, - { (char*) "Indian/Comoro" , 0x049E8F }, - { (char*) "Indian/Kerguelen" , 0x049F1E }, - { (char*) "Indian/Mahe" , 0x049FAF }, - { (char*) "Indian/Maldives" , 0x04A040 }, - { (char*) "Indian/Mauritius" , 0x04A0E4 }, - { (char*) "Indian/Mayotte" , 0x04A1A3 }, - { (char*) "Indian/Reunion" , 0x04A232 }, - { (char*) "Iran" , 0x04A2C3 }, - { (char*) "Israel" , 0x04A5FB }, - { (char*) "Jamaica" , 0x04AA39 }, - { (char*) "Japan" , 0x04AB98 }, - { (char*) "Kwajalein" , 0x04AC79 }, - { (char*) "Libya" , 0x04AD60 }, - { (char*) "MET" , 0x04AF1B }, - { (char*) "Mexico/BajaNorte" , 0x04B194 }, - { (char*) "Mexico/BajaSur" , 0x04B5A1 }, - { (char*) "Mexico/General" , 0x04B87B }, - { (char*) "MST" , 0x04BB8C }, - { (char*) "MST7MDT" , 0x04BC07 }, - { (char*) "Navajo" , 0x04BFCA }, - { (char*) "NZ" , 0x04C3E8 }, - { (char*) "NZ-CHAT" , 0x04C807 }, - { (char*) "Pacific/Apia" , 0x04CB3B }, - { (char*) "Pacific/Auckland" , 0x04CCDE }, - { (char*) "Pacific/Bougainville" , 0x04D115 }, - { (char*) "Pacific/Chatham" , 0x04D1F6 }, - { (char*) "Pacific/Chuuk" , 0x04D539 }, - { (char*) "Pacific/Easter" , 0x04D617 }, - { (char*) "Pacific/Efate" , 0x04DAC6 }, - { (char*) "Pacific/Enderbury" , 0x04DC28 }, - { (char*) "Pacific/Fakaofo" , 0x04DCE0 }, - { (char*) "Pacific/Fiji" , 0x04DD85 }, - { (char*) "Pacific/Funafuti" , 0x04DF1D }, - { (char*) "Pacific/Galapagos" , 0x04DFAF }, - { (char*) "Pacific/Gambier" , 0x04E07B }, - { (char*) "Pacific/Guadalcanal" , 0x04E11A }, - { (char*) "Pacific/Guam" , 0x04E1AC }, - { (char*) "Pacific/Honolulu" , 0x04E316 }, - { (char*) "Pacific/Johnston" , 0x04E405 }, - { (char*) "Pacific/Kanton" , 0x04E4EE }, - { (char*) "Pacific/Kiritimati" , 0x04E5B5 }, - { (char*) "Pacific/Kosrae" , 0x04E67B }, - { (char*) "Pacific/Kwajalein" , 0x04E77F }, - { (char*) "Pacific/Majuro" , 0x04E86F }, - { (char*) "Pacific/Marquesas" , 0x04E972 }, - { (char*) "Pacific/Midway" , 0x04EA1A }, - { (char*) "Pacific/Nauru" , 0x04EADD }, - { (char*) "Pacific/Niue" , 0x04EBA0 }, - { (char*) "Pacific/Norfolk" , 0x04EC46 }, - { (char*) "Pacific/Noumea" , 0x04ED49 }, - { (char*) "Pacific/Pago_Pago" , 0x04EE1B }, - { (char*) "Pacific/Palau" , 0x04EEB9 }, - { (char*) "Pacific/Pitcairn" , 0x04EF59 }, - { (char*) "Pacific/Pohnpei" , 0x04EFFE }, - { (char*) "Pacific/Ponape" , 0x04F0EE }, - { (char*) "Pacific/Port_Moresby" , 0x04F180 }, - { (char*) "Pacific/Rarotonga" , 0x04F243 }, - { (char*) "Pacific/Saipan" , 0x04F3E5 }, - { (char*) "Pacific/Samoa" , 0x04F546 }, - { (char*) "Pacific/Tahiti" , 0x04F5E4 }, - { (char*) "Pacific/Tarawa" , 0x04F684 }, - { (char*) "Pacific/Tongatapu" , 0x04F725 }, - { (char*) "Pacific/Truk" , 0x04F81E }, - { (char*) "Pacific/Wake" , 0x04F8C4 }, - { (char*) "Pacific/Wallis" , 0x04F961 }, - { (char*) "Pacific/Yap" , 0x04F9F3 }, - { (char*) "Poland" , 0x04FA99 }, - { (char*) "Portugal" , 0x04FE40 }, - { (char*) "PRC" , 0x0503FA }, - { (char*) "PST8PDT" , 0x05058F }, - { (char*) "ROC" , 0x050952 }, - { (char*) "ROK" , 0x050B5D }, - { (char*) "Singapore" , 0x050D08 }, - { (char*) "Turkey" , 0x050E14 }, - { (char*) "UCT" , 0x0512D0 }, - { (char*) "Universal" , 0x05134B }, - { (char*) "US/Alaska" , 0x0513C6 }, - { (char*) "US/Aleutian" , 0x0517A3 }, - { (char*) "US/Arizona" , 0x051B78 }, - { (char*) "US/Central" , 0x051C74 }, - { (char*) "US/East-Indiana" , 0x05235A }, - { (char*) "US/Eastern" , 0x052579 }, - { (char*) "US/Hawaii" , 0x052C55 }, - { (char*) "US/Indiana-Starke" , 0x052D3E }, - { (char*) "US/Michigan" , 0x053142 }, - { (char*) "US/Mountain" , 0x0534D1 }, - { (char*) "US/Pacific" , 0x0538EF }, - { (char*) "US/Samoa" , 0x053E09 }, - { (char*) "UTC" , 0x053EA7 }, - { (char*) "W-SU" , 0x053F22 }, - { (char*) "WET" , 0x0542BA }, - { (char*) "Zulu" , 0x0544B4 }, + { (char*) "Africa/Casablanca" , 0x0010E2 }, + { (char*) "Africa/Ceuta" , 0x00186D }, + { (char*) "Africa/Conakry" , 0x001AB9 }, + { (char*) "Africa/Dakar" , 0x001B63 }, + { (char*) "Africa/Dar_es_Salaam" , 0x001C04 }, + { (char*) "Africa/Djibouti" , 0x001CB1 }, + { (char*) "Africa/Douala" , 0x001D40 }, + { (char*) "Africa/El_Aaiun" , 0x001DCF }, + { (char*) "Africa/Freetown" , 0x002501 }, + { (char*) "Africa/Gaborone" , 0x002651 }, + { (char*) "Africa/Harare" , 0x002711 }, + { (char*) "Africa/Johannesburg" , 0x0027A0 }, + { (char*) "Africa/Juba" , 0x00286A }, + { (char*) "Africa/Kampala" , 0x002A40 }, + { (char*) "Africa/Khartoum" , 0x002B02 }, + { (char*) "Africa/Kigali" , 0x002CD8 }, + { (char*) "Africa/Kinshasa" , 0x002D67 }, + { (char*) "Africa/Lagos" , 0x002E0F }, + { (char*) "Africa/Libreville" , 0x002ECF }, + { (char*) "Africa/Lome" , 0x002F5E }, + { (char*) "Africa/Luanda" , 0x002FEC }, + { (char*) "Africa/Lubumbashi" , 0x00308A }, + { (char*) "Africa/Lusaka" , 0x003145 }, + { (char*) "Africa/Malabo" , 0x0031D4 }, + { (char*) "Africa/Maputo" , 0x003276 }, + { (char*) "Africa/Maseru" , 0x003305 }, + { (char*) "Africa/Mbabane" , 0x0033AE }, + { (char*) "Africa/Mogadishu" , 0x00343F }, + { (char*) "Africa/Monrovia" , 0x0034EC }, + { (char*) "Africa/Nairobi" , 0x00359C }, + { (char*) "Africa/Ndjamena" , 0x003667 }, + { (char*) "Africa/Niamey" , 0x003713 }, + { (char*) "Africa/Nouakchott" , 0x0037C8 }, + { (char*) "Africa/Ouagadougou" , 0x003872 }, + { (char*) "Africa/Porto-Novo" , 0x003900 }, + { (char*) "Africa/Sao_Tome" , 0x0039A2 }, + { (char*) "Africa/Timbuktu" , 0x003A5B }, + { (char*) "Africa/Tripoli" , 0x003AE9 }, + { (char*) "Africa/Tunis" , 0x003CA4 }, + { (char*) "Africa/Windhoek" , 0x003E71 }, + { (char*) "America/Adak" , 0x0040FB }, + { (char*) "America/Anchorage" , 0x0044EA }, + { (char*) "America/Anguilla" , 0x0048DA }, + { (char*) "America/Antigua" , 0x004968 }, + { (char*) "America/Araguaina" , 0x004A09 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x004C6E }, + { (char*) "America/Argentina/Catamarca" , 0x004F53 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x00523E }, + { (char*) "America/Argentina/Cordoba" , 0x00550E }, + { (char*) "America/Argentina/Jujuy" , 0x005814 }, + { (char*) "America/Argentina/La_Rioja" , 0x005ADC }, + { (char*) "America/Argentina/Mendoza" , 0x005DC2 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x00609E }, + { (char*) "America/Argentina/Salta" , 0x00637D }, + { (char*) "America/Argentina/San_Juan" , 0x006651 }, + { (char*) "America/Argentina/San_Luis" , 0x006937 }, + { (char*) "America/Argentina/Tucuman" , 0x006C1D }, + { (char*) "America/Argentina/Ushuaia" , 0x006F0B }, + { (char*) "America/Aruba" , 0x0071F0 }, + { (char*) "America/Asuncion" , 0x007293 }, + { (char*) "America/Atikokan" , 0x007613 }, + { (char*) "America/Atka" , 0x007720 }, + { (char*) "America/Bahia" , 0x007AF5 }, + { (char*) "America/Bahia_Banderas" , 0x007DB0 }, + { (char*) "America/Barbados" , 0x0080A5 }, + { (char*) "America/Belem" , 0x0081C7 }, + { (char*) "America/Belize" , 0x00836F }, + { (char*) "America/Blanc-Sablon" , 0x008790 }, + { (char*) "America/Boa_Vista" , 0x008885 }, + { (char*) "America/Bogota" , 0x008A46 }, + { (char*) "America/Boise" , 0x008B05 }, + { (char*) "America/Buenos_Aires" , 0x008F18 }, + { (char*) "America/Cambridge_Bay" , 0x0091E8 }, + { (char*) "America/Campo_Grande" , 0x00957B }, + { (char*) "America/Cancun" , 0x009951 }, + { (char*) "America/Caracas" , 0x009B7A }, + { (char*) "America/Catamarca" , 0x009C44 }, + { (char*) "America/Cayenne" , 0x009F14 }, + { (char*) "America/Cayman" , 0x009FB7 }, + { (char*) "America/Chicago" , 0x00A058 }, + { (char*) "America/Chihuahua" , 0x00A752 }, + { (char*) "America/Ciudad_Juarez" , 0x00AA27 }, + { (char*) "America/Coral_Harbour" , 0x00AD1D }, + { (char*) "America/Cordoba" , 0x00ADBE }, + { (char*) "America/Costa_Rica" , 0x00B08E }, + { (char*) "America/Creston" , 0x00B182 }, + { (char*) "America/Cuiaba" , 0x00B23E }, + { (char*) "America/Curacao" , 0x00B5FB }, + { (char*) "America/Danmarkshavn" , 0x00B69E }, + { (char*) "America/Dawson" , 0x00B883 }, + { (char*) "America/Dawson_Creek" , 0x00BCA6 }, + { (char*) "America/Denver" , 0x00BF7D }, + { (char*) "America/Detroit" , 0x00C3B0 }, + { (char*) "America/Dominica" , 0x00C758 }, + { (char*) "America/Edmonton" , 0x00C7E6 }, + { (char*) "America/Eirunepe" , 0x00CBE1 }, + { (char*) "America/El_Salvador" , 0x00CDB0 }, + { (char*) "America/Ensenada" , 0x00CE6C }, + { (char*) "America/Fort_Nelson" , 0x00D279 }, + { (char*) "America/Fort_Wayne" , 0x00D841 }, + { (char*) "America/Fortaleza" , 0x00DA60 }, + { (char*) "America/Glace_Bay" , 0x00DC76 }, + { (char*) "America/Godthab" , 0x00E00D }, + { (char*) "America/Goose_Bay" , 0x00E3DE }, + { (char*) "America/Grand_Turk" , 0x00EA36 }, + { (char*) "America/Grenada" , 0x00ED97 }, + { (char*) "America/Guadeloupe" , 0x00EE25 }, + { (char*) "America/Guatemala" , 0x00EEB3 }, + { (char*) "America/Guayaquil" , 0x00EF93 }, + { (char*) "America/Guyana" , 0x00F064 }, + { (char*) "America/Halifax" , 0x00F125 }, + { (char*) "America/Havana" , 0x00F7D7 }, + { (char*) "America/Hermosillo" , 0x00FC40 }, + { (char*) "America/Indiana/Indianapolis" , 0x00FD70 }, + { (char*) "America/Indiana/Knox" , 0x00FFA8 }, + { (char*) "America/Indiana/Marengo" , 0x0103C1 }, + { (char*) "America/Indiana/Petersburg" , 0x01061B }, + { (char*) "America/Indiana/Tell_City" , 0x0108E5 }, + { (char*) "America/Indiana/Vevay" , 0x010B0F }, + { (char*) "America/Indiana/Vincennes" , 0x010CA6 }, + { (char*) "America/Indiana/Winamac" , 0x010EFC }, + { (char*) "America/Indianapolis" , 0x011182 }, + { (char*) "America/Inuvik" , 0x0113A1 }, + { (char*) "America/Iqaluit" , 0x0116F2 }, + { (char*) "America/Jamaica" , 0x011A6E }, + { (char*) "America/Jujuy" , 0x011BCD }, + { (char*) "America/Juneau" , 0x011E8B }, + { (char*) "America/Kentucky/Louisville" , 0x012271 }, + { (char*) "America/Kentucky/Monticello" , 0x012775 }, + { (char*) "America/Knox_IN" , 0x012B61 }, + { (char*) "America/Kralendijk" , 0x012F65 }, + { (char*) "America/La_Paz" , 0x013022 }, + { (char*) "America/Lima" , 0x0130D8 }, + { (char*) "America/Los_Angeles" , 0x0131FF }, + { (char*) "America/Louisville" , 0x013720 }, + { (char*) "America/Lower_Princes" , 0x013C06 }, + { (char*) "America/Maceio" , 0x013CC3 }, + { (char*) "America/Managua" , 0x013ED5 }, + { (char*) "America/Manaus" , 0x014008 }, + { (char*) "America/Marigot" , 0x0141BF }, + { (char*) "America/Martinique" , 0x01427C }, + { (char*) "America/Matamoros" , 0x01433A }, + { (char*) "America/Mazatlan" , 0x014527 }, + { (char*) "America/Mendoza" , 0x014833 }, + { (char*) "America/Menominee" , 0x014B03 }, + { (char*) "America/Merida" , 0x014EC3 }, + { (char*) "America/Metlakatla" , 0x01516E }, + { (char*) "America/Mexico_City" , 0x0153E4 }, + { (char*) "America/Miquelon" , 0x015703 }, + { (char*) "America/Moncton" , 0x015935 }, + { (char*) "America/Monterrey" , 0x015F2E }, + { (char*) "America/Montevideo" , 0x0161F4 }, + { (char*) "America/Montreal" , 0x0165C9 }, + { (char*) "America/Montserrat" , 0x016C8A }, + { (char*) "America/Nassau" , 0x016D18 }, + { (char*) "America/New_York" , 0x017112 }, + { (char*) "America/Nipigon" , 0x017802 }, + { (char*) "America/Nome" , 0x017EC3 }, + { (char*) "America/Noronha" , 0x0182AB }, + { (char*) "America/North_Dakota/Beulah" , 0x0184AB }, + { (char*) "America/North_Dakota/Center" , 0x0188DF }, + { (char*) "America/North_Dakota/New_Salem" , 0x018CDE }, + { (char*) "America/Nuuk" , 0x0190E3 }, + { (char*) "America/Ojinaga" , 0x0194C5 }, + { (char*) "America/Panama" , 0x0197B2 }, + { (char*) "America/Pangnirtung" , 0x019853 }, + { (char*) "America/Paramaribo" , 0x019BB6 }, + { (char*) "America/Phoenix" , 0x019C7D }, + { (char*) "America/Port-au-Prince" , 0x019D91 }, + { (char*) "America/Port_of_Spain" , 0x019FD2 }, + { (char*) "America/Porto_Acre" , 0x01A060 }, + { (char*) "America/Porto_Velho" , 0x01A20E }, + { (char*) "America/Puerto_Rico" , 0x01A3AC }, + { (char*) "America/Punta_Arenas" , 0x01A469 }, + { (char*) "America/Rainy_River" , 0x01A94B }, + { (char*) "America/Rankin_Inlet" , 0x01AE65 }, + { (char*) "America/Recife" , 0x01B1AE }, + { (char*) "America/Regina" , 0x01B3A8 }, + { (char*) "America/Resolute" , 0x01B647 }, + { (char*) "America/Rio_Branco" , 0x01B991 }, + { (char*) "America/Rosario" , 0x01BB43 }, + { (char*) "America/Santa_Isabel" , 0x01BE13 }, + { (char*) "America/Santarem" , 0x01C220 }, + { (char*) "America/Santiago" , 0x01C3D0 }, + { (char*) "America/Santo_Domingo" , 0x01C933 }, + { (char*) "America/Sao_Paulo" , 0x01CA7C }, + { (char*) "America/Scoresbysund" , 0x01CE76 }, + { (char*) "America/Shiprock" , 0x01D07E }, + { (char*) "America/Sitka" , 0x01D49C }, + { (char*) "America/St_Barthelemy" , 0x01D877 }, + { (char*) "America/St_Johns" , 0x01D934 }, + { (char*) "America/St_Kitts" , 0x01E0B8 }, + { (char*) "America/St_Lucia" , 0x01E146 }, + { (char*) "America/St_Thomas" , 0x01E1E7 }, + { (char*) "America/St_Vincent" , 0x01E275 }, + { (char*) "America/Swift_Current" , 0x01E316 }, + { (char*) "America/Tegucigalpa" , 0x01E4A4 }, + { (char*) "America/Thule" , 0x01E572 }, + { (char*) "America/Thunder_Bay" , 0x01E753 }, + { (char*) "America/Tijuana" , 0x01EE14 }, + { (char*) "America/Toronto" , 0x01F230 }, + { (char*) "America/Tortola" , 0x01F90E }, + { (char*) "America/Vancouver" , 0x01F99C }, + { (char*) "America/Virgin" , 0x01FEF3 }, + { (char*) "America/Whitehorse" , 0x01FFB0 }, + { (char*) "America/Winnipeg" , 0x0203D3 }, + { (char*) "America/Yakutat" , 0x02090A }, + { (char*) "America/Yellowknife" , 0x020CD8 }, + { (char*) "Antarctica/Casey" , 0x0210AE }, + { (char*) "Antarctica/Davis" , 0x0211B2 }, + { (char*) "Antarctica/DumontDUrville" , 0x021288 }, + { (char*) "Antarctica/Macquarie" , 0x02133C }, + { (char*) "Antarctica/Mawson" , 0x021728 }, + { (char*) "Antarctica/McMurdo" , 0x0217D2 }, + { (char*) "Antarctica/Palmer" , 0x021B04 }, + { (char*) "Antarctica/Rothera" , 0x021E8D }, + { (char*) "Antarctica/South_Pole" , 0x021F24 }, + { (char*) "Antarctica/Syowa" , 0x022343 }, + { (char*) "Antarctica/Troll" , 0x0223D9 }, + { (char*) "Antarctica/Vostok" , 0x02249B }, + { (char*) "Arctic/Longyearbyen" , 0x022532 }, + { (char*) "Asia/Aden" , 0x0227FF }, + { (char*) "Asia/Almaty" , 0x022890 }, + { (char*) "Asia/Amman" , 0x022B0F }, + { (char*) "Asia/Anadyr" , 0x022EBB }, + { (char*) "Asia/Aqtau" , 0x0231C1 }, + { (char*) "Asia/Aqtobe" , 0x023440 }, + { (char*) "Asia/Ashgabat" , 0x0236C0 }, + { (char*) "Asia/Ashkhabad" , 0x023843 }, + { (char*) "Asia/Atyrau" , 0x0239C6 }, + { (char*) "Asia/Baghdad" , 0x023C4F }, + { (char*) "Asia/Bahrain" , 0x023ED1 }, + { (char*) "Asia/Baku" , 0x023F8A }, + { (char*) "Asia/Bangkok" , 0x02427E }, + { (char*) "Asia/Barnaul" , 0x024322 }, + { (char*) "Asia/Beirut" , 0x02462D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[345391] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -833,7 +833,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -897,7 +897,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -905,10 +905,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, -0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0xB7, 0x2E, +0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -949,7 +951,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, +0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, @@ -957,7 +959,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, -0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, @@ -965,7 +967,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, +0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, @@ -973,7 +975,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, -0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, @@ -981,7 +983,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, @@ -989,7 +991,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, @@ -997,7 +999,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, @@ -1005,15 +1007,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, +0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -1166,7 +1168,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, -0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, @@ -1174,7 +1176,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, +0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, @@ -1182,7 +1184,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, -0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, @@ -1190,7 +1192,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, -0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, +0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, @@ -1198,7 +1200,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, -0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, @@ -1206,7 +1208,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, @@ -1214,7 +1216,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, -0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, @@ -1222,15 +1224,15 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, -0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, +0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, -0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, +0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, @@ -1839,8 +1841,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, -0x72, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, -0x6C, 0x61, 0x6E, 0x64, 0x73, +0x72, 0x00, 0x00, 0x00, 0x1A, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, +0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4139,9 +4141,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, 0x00, 0x65, -0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, -0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, -0x28, 0x57, 0x29, +0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, +0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x54, 0x20, +0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4486,9 +4488,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -4532,16 +4534,19 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7466,9 +7471,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, @@ -7512,18 +7517,20 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, -0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, -0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, -0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, +0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, +0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, +0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7675,9 +7682,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, -0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, -0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, -0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, +0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, +0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, +0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8414,8 +8421,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, -0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, 0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, +0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9556,14 +9563,21 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, -0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, -0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, +0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, 0x91, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, 0xE8, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, 0xCA, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xE7, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xC9, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, +0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, +0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, @@ -9599,18 +9613,18 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, -0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, -0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, -0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, -0x4D, 0x44, 0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, -0x00, 0x64, 0x2C, 0x88, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x4E, 0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, +0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, +0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, +0x54, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, +0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10069,9 +10083,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x08, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, -0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, -0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11065,7 +11078,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11125,7 +11138,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11133,14 +11216,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, -0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, -0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, -0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, -0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, -0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, - +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, +0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, +0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, +0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, +0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -11176,7 +11267,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, @@ -11237,7 +11328,77 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, -0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x02, +0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x6F, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x00, +0x00, 0x00, 0x00, 0x71, 0x4F, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x64, 0xA9, 0x70, 0x00, +0x00, 0x00, 0x00, 0x73, 0x2F, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x44, 0x8B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x75, 0x0F, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2D, 0xA7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x76, 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, +0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, +0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, +0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, +0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, +0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, +0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, +0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, +0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, +0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, +0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, +0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, +0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, +0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, +0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, +0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -11245,14 +11406,22 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, -0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, -0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, -0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, -0x6B, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, +0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, +0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, +0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12150,8 +12319,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, -0x13, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, -0x65, 0x61, 0x73, 0x29, +0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12748,9 +12916,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, 0x36, 0x12, 0x00, 0x00, -0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, -0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x4B, 0x75, 0x72, 0x69, -0x6C, 0x20, 0x49, 0x73, +0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, +0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, + /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13128,9 +13296,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x03, 0x00, 0x00, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, -0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, -0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x38, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16316,7 +16483,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, @@ -16380,7 +16547,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, 0xF0, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -16388,10 +16555,12 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, -0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, 0x35, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -17288,9 +17457,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x30, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x4D, 0x54, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, -0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, -0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, +0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18339,7 +18507,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -18372,15 +18540,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x01, 0x04, 0x01, 0x03, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x03, 0x01, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x03, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, -0x2B, 0x30, 0x34, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, -0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, -0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, +0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, +0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18418,8 +18587,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, -0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, -0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, +0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -20192,7 +20361,7 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, @@ -20226,15 +20395,16 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x02, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, -0x04, 0x01, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x02, 0x05, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, -0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, -0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, +0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, +0x35, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -21655,9 +21825,9 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, -0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x18, 0x4E, -0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, -0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x13, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, +0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22096,9 +22266,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, -0xE3, 0x80, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, -0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0xE3, 0x80, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, +0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -22270,9 +22439,8 @@ const unsigned char timelib_timezone_db_data_builtin[345391] = { 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, 0x01, 0xF3, -0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, -0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, -0x61, 0x73, 0x29, +0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x50, 0x61, +0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -23705,593 +23873,593 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Africa/Brazzaville" , 0x000E79 }, { (char*) "Africa/Bujumbura" , 0x000F1A }, { (char*) "Africa/Cairo" , 0x000FBB }, - { (char*) "Africa/Casablanca" , 0x00176A }, - { (char*) "Africa/Ceuta" , 0x0020F3 }, - { (char*) "Africa/Conakry" , 0x002911 }, - { (char*) "Africa/Dakar" , 0x0029ED }, - { (char*) "Africa/Dar_es_Salaam" , 0x002AAF }, - { (char*) "Africa/Djibouti" , 0x002B90 }, - { (char*) "Africa/Douala" , 0x002C31 }, - { (char*) "Africa/El_Aaiun" , 0x002CD2 }, - { (char*) "Africa/Freetown" , 0x0035D5 }, - { (char*) "Africa/Gaborone" , 0x0037B1 }, - { (char*) "Africa/Harare" , 0x0038A8 }, - { (char*) "Africa/Johannesburg" , 0x003949 }, - { (char*) "Africa/Juba" , 0x003A4B }, - { (char*) "Africa/Kampala" , 0x003CFE }, - { (char*) "Africa/Khartoum" , 0x003E05 }, - { (char*) "Africa/Kigali" , 0x0040B8 }, - { (char*) "Africa/Kinshasa" , 0x004159 }, - { (char*) "Africa/Lagos" , 0x004213 }, - { (char*) "Africa/Libreville" , 0x00430A }, - { (char*) "Africa/Lome" , 0x0043AB }, - { (char*) "Africa/Luanda" , 0x00444B }, - { (char*) "Africa/Lubumbashi" , 0x004512 }, - { (char*) "Africa/Lusaka" , 0x0045EE }, - { (char*) "Africa/Malabo" , 0x00468F }, - { (char*) "Africa/Maputo" , 0x004752 }, - { (char*) "Africa/Maseru" , 0x0047F3 }, - { (char*) "Africa/Mbabane" , 0x0048BF }, - { (char*) "Africa/Mogadishu" , 0x004963 }, - { (char*) "Africa/Monrovia" , 0x004A44 }, - { (char*) "Africa/Nairobi" , 0x004B20 }, - { (char*) "Africa/Ndjamena" , 0x004C35 }, - { (char*) "Africa/Niamey" , 0x004D08 }, - { (char*) "Africa/Nouakchott" , 0x004DED }, - { (char*) "Africa/Ouagadougou" , 0x004EC9 }, - { (char*) "Africa/Porto-Novo" , 0x004F69 }, - { (char*) "Africa/Sao_Tome" , 0x00502C }, - { (char*) "Africa/Timbuktu" , 0x005136 }, - { (char*) "Africa/Tripoli" , 0x0051D6 }, - { (char*) "Africa/Tunis" , 0x005453 }, - { (char*) "Africa/Windhoek" , 0x005710 }, - { (char*) "America/Adak" , 0x005AD7 }, - { (char*) "America/Anchorage" , 0x006427 }, - { (char*) "America/Anguilla" , 0x006D89 }, - { (char*) "America/Antigua" , 0x006E29 }, - { (char*) "America/Araguaina" , 0x006EEB }, - { (char*) "America/Argentina/Buenos_Aires" , 0x007266 }, - { (char*) "America/Argentina/Catamarca" , 0x0076AD }, - { (char*) "America/Argentina/ComodRivadavia" , 0x007AFA }, - { (char*) "America/Argentina/Cordoba" , 0x007F2C }, - { (char*) "America/Argentina/Jujuy" , 0x008394 }, - { (char*) "America/Argentina/La_Rioja" , 0x0087B4 }, - { (char*) "America/Argentina/Mendoza" , 0x008C01 }, - { (char*) "America/Argentina/Rio_Gallegos" , 0x00903F }, - { (char*) "America/Argentina/Salta" , 0x009480 }, - { (char*) "America/Argentina/San_Juan" , 0x0098AC }, - { (char*) "America/Argentina/San_Luis" , 0x009CF9 }, - { (char*) "America/Argentina/Tucuman" , 0x00A152 }, - { (char*) "America/Argentina/Ushuaia" , 0x00A5AC }, - { (char*) "America/Aruba" , 0x00A9F3 }, - { (char*) "America/Asuncion" , 0x00AAB9 }, - { (char*) "America/Atikokan" , 0x00B2B3 }, - { (char*) "America/Atka" , 0x00B430 }, - { (char*) "America/Bahia" , 0x00BD70 }, - { (char*) "America/Bahia_Banderas" , 0x00C173 }, - { (char*) "America/Barbados" , 0x00C610 }, - { (char*) "America/Belem" , 0x00C7D0 }, - { (char*) "America/Belize" , 0x00CA20 }, - { (char*) "America/Blanc-Sablon" , 0x00D07A }, - { (char*) "America/Boa_Vista" , 0x00D1CC }, - { (char*) "America/Bogota" , 0x00D449 }, - { (char*) "America/Boise" , 0x00D53D }, - { (char*) "America/Buenos_Aires" , 0x00DED3 }, - { (char*) "America/Cambridge_Bay" , 0x00E305 }, - { (char*) "America/Campo_Grande" , 0x00EBF3 }, - { (char*) "America/Cancun" , 0x00F1A7 }, - { (char*) "America/Caracas" , 0x00F501 }, - { (char*) "America/Catamarca" , 0x00F607 }, - { (char*) "America/Cayenne" , 0x00FA39 }, - { (char*) "America/Cayman" , 0x00FAFD }, - { (char*) "America/Chicago" , 0x00FBBF }, - { (char*) "America/Chihuahua" , 0x0109E7 }, - { (char*) "America/Ciudad_Juarez" , 0x010E57 }, - { (char*) "America/Coral_Harbour" , 0x011481 }, - { (char*) "America/Cordoba" , 0x011543 }, - { (char*) "America/Costa_Rica" , 0x011975 }, - { (char*) "America/Creston" , 0x011ABD }, - { (char*) "America/Cuiaba" , 0x011BAB }, - { (char*) "America/Curacao" , 0x01213C }, - { (char*) "America/Danmarkshavn" , 0x012202 }, - { (char*) "America/Dawson" , 0x0124E2 }, - { (char*) "America/Dawson_Creek" , 0x012B4E }, - { (char*) "America/Denver" , 0x012F94 }, - { (char*) "America/Detroit" , 0x013951 }, - { (char*) "America/Dominica" , 0x01422C }, - { (char*) "America/Edmonton" , 0x0142CC }, - { (char*) "America/Eirunepe" , 0x014C11 }, - { (char*) "America/El_Salvador" , 0x014EAE }, - { (char*) "America/Ensenada" , 0x014F9A }, - { (char*) "America/Fort_Nelson" , 0x0158EC }, - { (char*) "America/Fort_Wayne" , 0x0161CC }, - { (char*) "America/Fortaleza" , 0x01686A }, - { (char*) "America/Glace_Bay" , 0x016B5A }, - { (char*) "America/Godthab" , 0x017411 }, - { (char*) "America/Goose_Bay" , 0x0179C5 }, - { (char*) "America/Grand_Turk" , 0x01867B }, - { (char*) "America/Grenada" , 0x018DB1 }, - { (char*) "America/Guadeloupe" , 0x018E51 }, - { (char*) "America/Guatemala" , 0x018EF1 }, - { (char*) "America/Guayaquil" , 0x019015 }, - { (char*) "America/Guyana" , 0x01911B }, - { (char*) "America/Halifax" , 0x01921F }, - { (char*) "America/Havana" , 0x019FA9 }, - { (char*) "America/Hermosillo" , 0x01A925 }, - { (char*) "America/Indiana/Indianapolis" , 0x01AAFF }, - { (char*) "America/Indiana/Knox" , 0x01B1B6 }, - { (char*) "America/Indiana/Marengo" , 0x01BB63 }, - { (char*) "America/Indiana/Petersburg" , 0x01C250 }, - { (char*) "America/Indiana/Tell_City" , 0x01C9EF }, - { (char*) "America/Indiana/Vevay" , 0x01D0B3 }, - { (char*) "America/Indiana/Vincennes" , 0x01D66F }, - { (char*) "America/Indiana/Winamac" , 0x01DD45 }, - { (char*) "America/Indianapolis" , 0x01E469 }, - { (char*) "America/Inuvik" , 0x01EB07 }, - { (char*) "America/Iqaluit" , 0x01F341 }, - { (char*) "America/Jamaica" , 0x01FC00 }, - { (char*) "America/Jujuy" , 0x01FDEE }, - { (char*) "America/Juneau" , 0x020204 }, - { (char*) "America/Kentucky/Louisville" , 0x020B55 }, - { (char*) "America/Kentucky/Monticello" , 0x021663 }, - { (char*) "America/Knox_IN" , 0x021FC3 }, - { (char*) "America/Kralendijk" , 0x02295B }, - { (char*) "America/La_Paz" , 0x022A5D }, - { (char*) "America/Lima" , 0x022B43 }, - { (char*) "America/Los_Angeles" , 0x022CD7 }, - { (char*) "America/Louisville" , 0x02380E }, - { (char*) "America/Lower_Princes" , 0x0242FE }, - { (char*) "America/Maceio" , 0x024400 }, - { (char*) "America/Managua" , 0x0246F6 }, - { (char*) "America/Manaus" , 0x0248B0 }, - { (char*) "America/Marigot" , 0x024B19 }, - { (char*) "America/Martinique" , 0x024C1B }, - { (char*) "America/Matamoros" , 0x024D0F }, - { (char*) "America/Mazatlan" , 0x0252D1 }, - { (char*) "America/Mendoza" , 0x025777 }, - { (char*) "America/Menominee" , 0x025BA9 }, - { (char*) "America/Merida" , 0x0264B6 }, - { (char*) "America/Metlakatla" , 0x0268BF }, - { (char*) "America/Mexico_City" , 0x026E71 }, - { (char*) "America/Miquelon" , 0x027351 }, - { (char*) "America/Moncton" , 0x0279D1 }, - { (char*) "America/Monterrey" , 0x028647 }, - { (char*) "America/Montevideo" , 0x028A5D }, - { (char*) "America/Montreal" , 0x029041 }, - { (char*) "America/Montserrat" , 0x029DF3 }, - { (char*) "America/Nassau" , 0x029E93 }, - { (char*) "America/New_York" , 0x02A7F3 }, - { (char*) "America/Nipigon" , 0x02B5F3 }, - { (char*) "America/Nome" , 0x02C3A5 }, - { (char*) "America/Noronha" , 0x02CCFD }, - { (char*) "America/North_Dakota/Beulah" , 0x02CFD7 }, - { (char*) "America/North_Dakota/Center" , 0x02D954 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E2D1 }, - { (char*) "America/Nuuk" , 0x02EC54 }, - { (char*) "America/Ojinaga" , 0x02F21E }, - { (char*) "America/Panama" , 0x02F83A }, - { (char*) "America/Pangnirtung" , 0x02F8FC }, - { (char*) "America/Paramaribo" , 0x0301A2 }, - { (char*) "America/Phoenix" , 0x0302A6 }, - { (char*) "America/Port-au-Prince" , 0x030437 }, - { (char*) "America/Port_of_Spain" , 0x0309DD }, - { (char*) "America/Porto_Acre" , 0x030A7D }, - { (char*) "America/Porto_Velho" , 0x030CEF }, - { (char*) "America/Puerto_Rico" , 0x030F35 }, - { (char*) "America/Punta_Arenas" , 0x031037 }, - { (char*) "America/Rainy_River" , 0x0317C5 }, - { (char*) "America/Rankin_Inlet" , 0x032305 }, - { (char*) "America/Recife" , 0x032B39 }, - { (char*) "America/Regina" , 0x032E0D }, - { (char*) "America/Resolute" , 0x033202 }, - { (char*) "America/Rio_Branco" , 0x033A37 }, - { (char*) "America/Rosario" , 0x033CAD }, - { (char*) "America/Santa_Isabel" , 0x0340DF }, - { (char*) "America/Santarem" , 0x034A31 }, - { (char*) "America/Santiago" , 0x034C94 }, - { (char*) "America/Santo_Domingo" , 0x035685 }, - { (char*) "America/Sao_Paulo" , 0x03585B }, - { (char*) "America/Scoresbysund" , 0x035E33 }, - { (char*) "America/Shiprock" , 0x0365CA }, - { (char*) "America/Sitka" , 0x036F72 }, - { (char*) "America/St_Barthelemy" , 0x0378AA }, - { (char*) "America/St_Johns" , 0x0379AC }, - { (char*) "America/St_Kitts" , 0x038821 }, - { (char*) "America/St_Lucia" , 0x0388C1 }, - { (char*) "America/St_Thomas" , 0x038983 }, - { (char*) "America/St_Vincent" , 0x038A23 }, - { (char*) "America/Swift_Current" , 0x038AE5 }, - { (char*) "America/Tegucigalpa" , 0x038D33 }, - { (char*) "America/Thule" , 0x038E3B }, - { (char*) "America/Thunder_Bay" , 0x039433 }, - { (char*) "America/Tijuana" , 0x03A1E5 }, - { (char*) "America/Toronto" , 0x03AB46 }, - { (char*) "America/Tortola" , 0x03B915 }, - { (char*) "America/Vancouver" , 0x03B9B5 }, - { (char*) "America/Virgin" , 0x03C526 }, - { (char*) "America/Whitehorse" , 0x03C628 }, - { (char*) "America/Winnipeg" , 0x03CC94 }, - { (char*) "America/Yakutat" , 0x03D7F1 }, - { (char*) "America/Yellowknife" , 0x03E10E }, - { (char*) "Antarctica/Casey" , 0x03E989 }, - { (char*) "Antarctica/Davis" , 0x03EB0C }, - { (char*) "Antarctica/DumontDUrville" , 0x03EC38 }, - { (char*) "Antarctica/Macquarie" , 0x03ED08 }, - { (char*) "Antarctica/Mawson" , 0x03F5F8 }, - { (char*) "Antarctica/McMurdo" , 0x03F6C3 }, - { (char*) "Antarctica/Palmer" , 0x03FEBE }, - { (char*) "Antarctica/Rothera" , 0x04044C }, - { (char*) "Antarctica/South_Pole" , 0x0404F5 }, - { (char*) "Antarctica/Syowa" , 0x040E86 }, - { (char*) "Antarctica/Troll" , 0x040F2E }, - { (char*) "Antarctica/Vostok" , 0x0413BB }, - { (char*) "Arctic/Longyearbyen" , 0x041464 }, - { (char*) "Asia/Aden" , 0x041D6A }, - { (char*) "Asia/Almaty" , 0x041E0D }, - { (char*) "Asia/Amman" , 0x042207 }, - { (char*) "Asia/Anadyr" , 0x0427AC }, - { (char*) "Asia/Aqtau" , 0x042C61 }, - { (char*) "Asia/Aqtobe" , 0x04304B }, - { (char*) "Asia/Ashgabat" , 0x043449 }, - { (char*) "Asia/Ashkhabad" , 0x0436B2 }, - { (char*) "Asia/Atyrau" , 0x04391B }, - { (char*) "Asia/Baghdad" , 0x043D0D }, - { (char*) "Asia/Bahrain" , 0x0440E2 }, - { (char*) "Asia/Baku" , 0x0441CD }, - { (char*) "Asia/Bangkok" , 0x044696 }, - { (char*) "Asia/Barnaul" , 0x04475B }, - { (char*) "Asia/Beirut" , 0x044C2C }, - { (char*) "Asia/Bishkek" , 0x0454A2 }, - { (char*) "Asia/Brunei" , 0x045877 }, - { (char*) "Asia/Calcutta" , 0x045940 }, - { (char*) "Asia/Chita" , 0x045A69 }, - { (char*) "Asia/Choibalsan" , 0x045F40 }, - { (char*) "Asia/Chongqing" , 0x046305 }, - { (char*) "Asia/Chungking" , 0x046542 }, - { (char*) "Asia/Colombo" , 0x04677F }, - { (char*) "Asia/Dacca" , 0x0468F1 }, - { (char*) "Asia/Damascus" , 0x046A40 }, - { (char*) "Asia/Dhaka" , 0x04719D }, - { (char*) "Asia/Dili" , 0x0472EC }, - { (char*) "Asia/Dubai" , 0x0473CD }, - { (char*) "Asia/Dushanbe" , 0x047470 }, - { (char*) "Asia/Famagusta" , 0x0476BD }, - { (char*) "Asia/Gaza" , 0x047EC4 }, - { (char*) "Asia/Harbin" , 0x048850 }, - { (char*) "Asia/Hebron" , 0x048A8D }, - { (char*) "Asia/Ho_Chi_Minh" , 0x049434 }, - { (char*) "Asia/Hong_Kong" , 0x049591 }, - { (char*) "Asia/Hovd" , 0x049A6E }, - { (char*) "Asia/Irkutsk" , 0x049E12 }, - { (char*) "Asia/Istanbul" , 0x04A305 }, - { (char*) "Asia/Jakarta" , 0x04AA9E }, - { (char*) "Asia/Jayapura" , 0x04AC36 }, - { (char*) "Asia/Jerusalem" , 0x04AD55 }, - { (char*) "Asia/Kabul" , 0x04B6B5 }, - { (char*) "Asia/Kamchatka" , 0x04B783 }, - { (char*) "Asia/Karachi" , 0x04BC21 }, - { (char*) "Asia/Kashgar" , 0x04BDA8 }, - { (char*) "Asia/Kathmandu" , 0x04BE4B }, - { (char*) "Asia/Katmandu" , 0x04BF1D }, - { (char*) "Asia/Khandyga" , 0x04BFEF }, - { (char*) "Asia/Kolkata" , 0x04C502 }, - { (char*) "Asia/Krasnoyarsk" , 0x04C62B }, - { (char*) "Asia/Kuala_Lumpur" , 0x04CAF9 }, - { (char*) "Asia/Kuching" , 0x04CCAA }, - { (char*) "Asia/Kuwait" , 0x04CE99 }, - { (char*) "Asia/Macao" , 0x04CF3C }, - { (char*) "Asia/Macau" , 0x04D413 }, - { (char*) "Asia/Magadan" , 0x04D8EA }, - { (char*) "Asia/Makassar" , 0x04DDBE }, - { (char*) "Asia/Manila" , 0x04DF11 }, - { (char*) "Asia/Muscat" , 0x04E065 }, - { (char*) "Asia/Nicosia" , 0x04E108 }, - { (char*) "Asia/Novokuznetsk" , 0x04E8F9 }, - { (char*) "Asia/Novosibirsk" , 0x04ED95 }, - { (char*) "Asia/Omsk" , 0x04F26C }, - { (char*) "Asia/Oral" , 0x04F72E }, - { (char*) "Asia/Phnom_Penh" , 0x04FB28 }, - { (char*) "Asia/Pontianak" , 0x04FC4D }, - { (char*) "Asia/Pyongyang" , 0x04FDD0 }, - { (char*) "Asia/Qatar" , 0x04FEC9 }, - { (char*) "Asia/Qostanay" , 0x04FF8E }, - { (char*) "Asia/Qyzylorda" , 0x050399 }, - { (char*) "Asia/Rangoon" , 0x0507B5 }, - { (char*) "Asia/Riyadh" , 0x0508BF }, - { (char*) "Asia/Saigon" , 0x050962 }, - { (char*) "Asia/Sakhalin" , 0x050ABF }, - { (char*) "Asia/Samarkand" , 0x050F87 }, - { (char*) "Asia/Seoul" , 0x0511D7 }, - { (char*) "Asia/Shanghai" , 0x05144C }, - { (char*) "Asia/Singapore" , 0x051695 }, - { (char*) "Asia/Srednekolymsk" , 0x051832 }, - { (char*) "Asia/Taipei" , 0x051D0A }, - { (char*) "Asia/Tashkent" , 0x05200F }, - { (char*) "Asia/Tbilisi" , 0x05226D }, - { (char*) "Asia/Tehran" , 0x052676 }, - { (char*) "Asia/Tel_Aviv" , 0x052B62 }, - { (char*) "Asia/Thimbu" , 0x0534C2 }, - { (char*) "Asia/Thimphu" , 0x05358B }, - { (char*) "Asia/Tokyo" , 0x053654 }, - { (char*) "Asia/Tomsk" , 0x053795 }, - { (char*) "Asia/Ujung_Pandang" , 0x053C66 }, - { (char*) "Asia/Ulaanbaatar" , 0x053D70 }, - { (char*) "Asia/Ulan_Bator" , 0x0540FE }, - { (char*) "Asia/Urumqi" , 0x054477 }, - { (char*) "Asia/Ust-Nera" , 0x054527 }, - { (char*) "Asia/Vientiane" , 0x054A1D }, - { (char*) "Asia/Vladivostok" , 0x054B5E }, - { (char*) "Asia/Yakutsk" , 0x055027 }, - { (char*) "Asia/Yangon" , 0x0554EF }, - { (char*) "Asia/Yekaterinburg" , 0x0555F9 }, - { (char*) "Asia/Yerevan" , 0x055AE0 }, - { (char*) "Atlantic/Azores" , 0x055F5D }, - { (char*) "Atlantic/Bermuda" , 0x056D19 }, - { (char*) "Atlantic/Canary" , 0x057681 }, - { (char*) "Atlantic/Cape_Verde" , 0x057E04 }, - { (char*) "Atlantic/Faeroe" , 0x057F10 }, - { (char*) "Atlantic/Faroe" , 0x058633 }, - { (char*) "Atlantic/Jan_Mayen" , 0x058D56 }, - { (char*) "Atlantic/Madeira" , 0x05965C }, - { (char*) "Atlantic/Reykjavik" , 0x05A426 }, - { (char*) "Atlantic/South_Georgia" , 0x05A8BC }, - { (char*) "Atlantic/St_Helena" , 0x05A95E }, - { (char*) "Atlantic/Stanley" , 0x05AA20 }, - { (char*) "Australia/ACT" , 0x05AEDC }, - { (char*) "Australia/Adelaide" , 0x05B776 }, - { (char*) "Australia/Brisbane" , 0x05C031 }, - { (char*) "Australia/Broken_Hill" , 0x05C1F7 }, - { (char*) "Australia/Canberra" , 0x05CAD4 }, - { (char*) "Australia/Currie" , 0x05D36E }, - { (char*) "Australia/Darwin" , 0x05DCB0 }, - { (char*) "Australia/Eucla" , 0x05DE13 }, - { (char*) "Australia/Hobart" , 0x05E000 }, - { (char*) "Australia/LHI" , 0x05E94A }, - { (char*) "Australia/Lindeman" , 0x05F08C }, - { (char*) "Australia/Lord_Howe" , 0x05F292 }, - { (char*) "Australia/Melbourne" , 0x05F9E4 }, - { (char*) "Australia/North" , 0x060286 }, - { (char*) "Australia/NSW" , 0x0603D7 }, - { (char*) "Australia/Perth" , 0x060C71 }, - { (char*) "Australia/Queensland" , 0x060E59 }, - { (char*) "Australia/South" , 0x061008 }, - { (char*) "Australia/Sydney" , 0x0618B4 }, - { (char*) "Australia/Tasmania" , 0x06216A }, - { (char*) "Australia/Victoria" , 0x062AAC }, - { (char*) "Australia/West" , 0x063346 }, - { (char*) "Australia/Yancowinna" , 0x063510 }, - { (char*) "Brazil/Acre" , 0x063DD1 }, - { (char*) "Brazil/DeNoronha" , 0x064043 }, - { (char*) "Brazil/East" , 0x06430D }, - { (char*) "Brazil/West" , 0x0648AF }, - { (char*) "Canada/Atlantic" , 0x064B09 }, - { (char*) "Canada/Central" , 0x065875 }, - { (char*) "Canada/Eastern" , 0x0663B5 }, - { (char*) "Canada/Mountain" , 0x067167 }, - { (char*) "Canada/Newfoundland" , 0x067A8F }, - { (char*) "Canada/Pacific" , 0x0688E2 }, - { (char*) "Canada/Saskatchewan" , 0x06943A }, - { (char*) "Canada/Yukon" , 0x06981A }, - { (char*) "CET" , 0x069E74 }, - { (char*) "Chile/Continental" , 0x06A6AE }, - { (char*) "Chile/EasterIsland" , 0x06B08D }, - { (char*) "CST6CDT" , 0x06B944 }, - { (char*) "Cuba" , 0x06C256 }, - { (char*) "EET" , 0x06CBD2 }, - { (char*) "Egypt" , 0x06D352 }, - { (char*) "Eire" , 0x06DB01 }, - { (char*) "EST" , 0x06E8B1 }, - { (char*) "EST5EDT" , 0x06E92F }, - { (char*) "Etc/GMT" , 0x06F241 }, - { (char*) "Etc/GMT+0" , 0x06F2BF }, - { (char*) "Etc/GMT+1" , 0x06F33D }, - { (char*) "Etc/GMT+10" , 0x06F3BD }, - { (char*) "Etc/GMT+11" , 0x06F43E }, - { (char*) "Etc/GMT+12" , 0x06F4BF }, - { (char*) "Etc/GMT+2" , 0x06F540 }, - { (char*) "Etc/GMT+3" , 0x06F5C0 }, - { (char*) "Etc/GMT+4" , 0x06F640 }, - { (char*) "Etc/GMT+5" , 0x06F6C0 }, - { (char*) "Etc/GMT+6" , 0x06F740 }, - { (char*) "Etc/GMT+7" , 0x06F7C0 }, - { (char*) "Etc/GMT+8" , 0x06F840 }, - { (char*) "Etc/GMT+9" , 0x06F8C0 }, - { (char*) "Etc/GMT-0" , 0x06F940 }, - { (char*) "Etc/GMT-1" , 0x06F9BE }, - { (char*) "Etc/GMT-10" , 0x06FA3F }, - { (char*) "Etc/GMT-11" , 0x06FAC1 }, - { (char*) "Etc/GMT-12" , 0x06FB43 }, - { (char*) "Etc/GMT-13" , 0x06FBC5 }, - { (char*) "Etc/GMT-14" , 0x06FC47 }, - { (char*) "Etc/GMT-2" , 0x06FCC9 }, - { (char*) "Etc/GMT-3" , 0x06FD4A }, - { (char*) "Etc/GMT-4" , 0x06FDCB }, - { (char*) "Etc/GMT-5" , 0x06FE4C }, - { (char*) "Etc/GMT-6" , 0x06FECD }, - { (char*) "Etc/GMT-7" , 0x06FF4E }, - { (char*) "Etc/GMT-8" , 0x06FFCF }, - { (char*) "Etc/GMT-9" , 0x070050 }, - { (char*) "Etc/GMT0" , 0x0700D1 }, - { (char*) "Etc/Greenwich" , 0x07014F }, - { (char*) "Etc/UCT" , 0x0701CD }, - { (char*) "Etc/Universal" , 0x07024B }, - { (char*) "Etc/UTC" , 0x0702C9 }, - { (char*) "Etc/Zulu" , 0x070347 }, - { (char*) "Europe/Amsterdam" , 0x0703C5 }, - { (char*) "Europe/Andorra" , 0x070F2F }, - { (char*) "Europe/Astrakhan" , 0x071609 }, - { (char*) "Europe/Athens" , 0x071AA6 }, - { (char*) "Europe/Belfast" , 0x072388 }, - { (char*) "Europe/Belgrade" , 0x0731E4 }, - { (char*) "Europe/Berlin" , 0x073970 }, - { (char*) "Europe/Bratislava" , 0x07428A }, - { (char*) "Europe/Brussels" , 0x074B93 }, - { (char*) "Europe/Bucharest" , 0x075714 }, - { (char*) "Europe/Budapest" , 0x075FA8 }, - { (char*) "Europe/Busingen" , 0x0768F4 }, - { (char*) "Europe/Chisinau" , 0x07707D }, - { (char*) "Europe/Copenhagen" , 0x0779DF }, - { (char*) "Europe/Dublin" , 0x078244 }, - { (char*) "Europe/Gibraltar" , 0x078FF4 }, - { (char*) "Europe/Guernsey" , 0x079BFC }, - { (char*) "Europe/Helsinki" , 0x07AA9C }, - { (char*) "Europe/Isle_of_Man" , 0x07B214 }, - { (char*) "Europe/Istanbul" , 0x07C060 }, - { (char*) "Europe/Jersey" , 0x07C7F9 }, - { (char*) "Europe/Kaliningrad" , 0x07D699 }, - { (char*) "Europe/Kiev" , 0x07DC8E }, - { (char*) "Europe/Kirov" , 0x07E4E2 }, - { (char*) "Europe/Kyiv" , 0x07E96F }, - { (char*) "Europe/Lisbon" , 0x07F1D7 }, - { (char*) "Europe/Ljubljana" , 0x07FF9F }, - { (char*) "Europe/London" , 0x08072B }, - { (char*) "Europe/Luxembourg" , 0x081587 }, - { (char*) "Europe/Madrid" , 0x082115 }, - { (char*) "Europe/Malta" , 0x082B67 }, - { (char*) "Europe/Mariehamn" , 0x0835AF }, - { (char*) "Europe/Minsk" , 0x083D27 }, - { (char*) "Europe/Monaco" , 0x08424E }, - { (char*) "Europe/Moscow" , 0x084DDA }, - { (char*) "Europe/Nicosia" , 0x0853F9 }, - { (char*) "Europe/Oslo" , 0x085BD7 }, - { (char*) "Europe/Paris" , 0x086497 }, - { (char*) "Europe/Podgorica" , 0x087035 }, - { (char*) "Europe/Prague" , 0x0877C1 }, - { (char*) "Europe/Riga" , 0x0880CA }, - { (char*) "Europe/Rome" , 0x08896C }, - { (char*) "Europe/Samara" , 0x0893C9 }, - { (char*) "Europe/San_Marino" , 0x08989F }, - { (char*) "Europe/Sarajevo" , 0x08A2FC }, - { (char*) "Europe/Saratov" , 0x08AA88 }, - { (char*) "Europe/Simferopol" , 0x08AF35 }, - { (char*) "Europe/Skopje" , 0x08B504 }, - { (char*) "Europe/Sofia" , 0x08BC90 }, - { (char*) "Europe/Stockholm" , 0x08C4B9 }, - { (char*) "Europe/Tallinn" , 0x08CC3A }, - { (char*) "Europe/Tirane" , 0x08D4AA }, - { (char*) "Europe/Tiraspol" , 0x08DCDA }, - { (char*) "Europe/Ulyanovsk" , 0x08E63C }, - { (char*) "Europe/Uzhgorod" , 0x08EB3F }, - { (char*) "Europe/Vaduz" , 0x08F393 }, - { (char*) "Europe/Vatican" , 0x08FAFF }, - { (char*) "Europe/Vienna" , 0x09055C }, - { (char*) "Europe/Vilnius" , 0x090E00 }, - { (char*) "Europe/Volgograd" , 0x09167E }, - { (char*) "Europe/Warsaw" , 0x091B1B }, - { (char*) "Europe/Zagreb" , 0x092585 }, - { (char*) "Europe/Zaporozhye" , 0x092D11 }, - { (char*) "Europe/Zurich" , 0x093565 }, - { (char*) "Factory" , 0x093CE6 }, - { (char*) "GB" , 0x093D66 }, - { (char*) "GB-Eire" , 0x094BC2 }, - { (char*) "GMT" , 0x095A1E }, - { (char*) "GMT+0" , 0x095A9C }, - { (char*) "GMT-0" , 0x095B1A }, - { (char*) "GMT0" , 0x095B98 }, - { (char*) "Greenwich" , 0x095C16 }, - { (char*) "Hongkong" , 0x095C94 }, - { (char*) "HST" , 0x096171 }, - { (char*) "Iceland" , 0x0961F0 }, - { (char*) "Indian/Antananarivo" , 0x096290 }, - { (char*) "Indian/Chagos" , 0x096377 }, - { (char*) "Indian/Christmas" , 0x09643C }, - { (char*) "Indian/Cocos" , 0x0964DF }, - { (char*) "Indian/Comoro" , 0x09658B }, - { (char*) "Indian/Kerguelen" , 0x09662C }, - { (char*) "Indian/Mahe" , 0x0966CF }, - { (char*) "Indian/Maldives" , 0x096772 }, - { (char*) "Indian/Mauritius" , 0x096837 }, - { (char*) "Indian/Mayotte" , 0x096926 }, - { (char*) "Indian/Reunion" , 0x0969C7 }, - { (char*) "Iran" , 0x096A6A }, - { (char*) "Israel" , 0x096F56 }, - { (char*) "Jamaica" , 0x0978B6 }, - { (char*) "Japan" , 0x097AA4 }, - { (char*) "Kwajalein" , 0x097BE5 }, - { (char*) "Libya" , 0x097D1F }, - { (char*) "MET" , 0x097F9C }, - { (char*) "Mexico/BajaNorte" , 0x0987D6 }, - { (char*) "Mexico/BajaSur" , 0x099128 }, - { (char*) "Mexico/General" , 0x09959C }, - { (char*) "MST" , 0x099A6E }, - { (char*) "MST7MDT" , 0x099AEC }, - { (char*) "Navajo" , 0x09A3FE }, - { (char*) "NZ" , 0x09ADA6 }, - { (char*) "NZ-CHAT" , 0x09B737 }, - { (char*) "Pacific/Apia" , 0x09BF49 }, - { (char*) "Pacific/Auckland" , 0x09C1AB }, - { (char*) "Pacific/Bougainville" , 0x09CB54 }, - { (char*) "Pacific/Chatham" , 0x09CC6A }, - { (char*) "Pacific/Chuuk" , 0x09D48B }, - { (char*) "Pacific/Easter" , 0x09D5A5 }, - { (char*) "Pacific/Efate" , 0x09DE69 }, - { (char*) "Pacific/Enderbury" , 0x09E081 }, - { (char*) "Pacific/Fakaofo" , 0x09E169 }, - { (char*) "Pacific/Fiji" , 0x09E22F }, - { (char*) "Pacific/Funafuti" , 0x09E46F }, - { (char*) "Pacific/Galapagos" , 0x09E513 }, - { (char*) "Pacific/Gambier" , 0x09E610 }, - { (char*) "Pacific/Guadalcanal" , 0x09E6C1 }, - { (char*) "Pacific/Guam" , 0x09E765 }, - { (char*) "Pacific/Honolulu" , 0x09E95F }, - { (char*) "Pacific/Johnston" , 0x09EABA }, - { (char*) "Pacific/Kanton" , 0x09EC0F }, - { (char*) "Pacific/Kiritimati" , 0x09ED06 }, - { (char*) "Pacific/Kosrae" , 0x09EDFE }, - { (char*) "Pacific/Kwajalein" , 0x09EF61 }, - { (char*) "Pacific/Majuro" , 0x09F0A4 }, - { (char*) "Pacific/Marquesas" , 0x09F1F5 }, - { (char*) "Pacific/Midway" , 0x09F2B1 }, - { (char*) "Pacific/Nauru" , 0x09F3A4 }, - { (char*) "Pacific/Niue" , 0x09F49E }, - { (char*) "Pacific/Norfolk" , 0x09F567 }, - { (char*) "Pacific/Noumea" , 0x09F8D5 }, - { (char*) "Pacific/Pago_Pago" , 0x09FA03 }, - { (char*) "Pacific/Palau" , 0x09FABE }, - { (char*) "Pacific/Pitcairn" , 0x09FB70 }, - { (char*) "Pacific/Pohnpei" , 0x09FC38 }, - { (char*) "Pacific/Ponape" , 0x09FD73 }, - { (char*) "Pacific/Port_Moresby" , 0x09FE17 }, - { (char*) "Pacific/Rarotonga" , 0x09FEEC }, - { (char*) "Pacific/Saipan" , 0x0A0145 }, - { (char*) "Pacific/Samoa" , 0x0A0331 }, - { (char*) "Pacific/Tahiti" , 0x0A03EC }, - { (char*) "Pacific/Tarawa" , 0x0A049E }, - { (char*) "Pacific/Tongatapu" , 0x0A0551 }, - { (char*) "Pacific/Truk" , 0x0A06C3 }, - { (char*) "Pacific/Wake" , 0x0A077B }, - { (char*) "Pacific/Wallis" , 0x0A082A }, - { (char*) "Pacific/Yap" , 0x0A08CE }, - { (char*) "Poland" , 0x0A0986 }, - { (char*) "Portugal" , 0x0A13F0 }, - { (char*) "PRC" , 0x0A21A5 }, - { (char*) "PST8PDT" , 0x0A23E2 }, - { (char*) "ROC" , 0x0A2CF4 }, - { (char*) "ROK" , 0x0A2FF9 }, - { (char*) "Singapore" , 0x0A326E }, - { (char*) "Turkey" , 0x0A340B }, - { (char*) "UCT" , 0x0A3BA4 }, - { (char*) "Universal" , 0x0A3C22 }, - { (char*) "US/Alaska" , 0x0A3CA0 }, - { (char*) "US/Aleutian" , 0x0A45EF }, - { (char*) "US/Arizona" , 0x0A4F2F }, - { (char*) "US/Central" , 0x0A50A3 }, - { (char*) "US/East-Indiana" , 0x0A5EB7 }, - { (char*) "US/Eastern" , 0x0A6555 }, - { (char*) "US/Hawaii" , 0x0A7341 }, - { (char*) "US/Indiana-Starke" , 0x0A7496 }, - { (char*) "US/Michigan" , 0x0A7E2E }, - { (char*) "US/Mountain" , 0x0A86F0 }, - { (char*) "US/Pacific" , 0x0A9098 }, - { (char*) "US/Samoa" , 0x0A9BC8 }, - { (char*) "UTC" , 0x0A9C83 }, - { (char*) "W-SU" , 0x0A9D01 }, - { (char*) "WET" , 0x0AA30C }, - { (char*) "Zulu" , 0x0AAA89 }, + { (char*) "Africa/Casablanca" , 0x001926 }, + { (char*) "Africa/Ceuta" , 0x0022AF }, + { (char*) "Africa/Conakry" , 0x002ACD }, + { (char*) "Africa/Dakar" , 0x002BA9 }, + { (char*) "Africa/Dar_es_Salaam" , 0x002C6B }, + { (char*) "Africa/Djibouti" , 0x002D4C }, + { (char*) "Africa/Douala" , 0x002DED }, + { (char*) "Africa/El_Aaiun" , 0x002E8E }, + { (char*) "Africa/Freetown" , 0x003791 }, + { (char*) "Africa/Gaborone" , 0x00396D }, + { (char*) "Africa/Harare" , 0x003A64 }, + { (char*) "Africa/Johannesburg" , 0x003B05 }, + { (char*) "Africa/Juba" , 0x003C07 }, + { (char*) "Africa/Kampala" , 0x003EBA }, + { (char*) "Africa/Khartoum" , 0x003FC1 }, + { (char*) "Africa/Kigali" , 0x004274 }, + { (char*) "Africa/Kinshasa" , 0x004315 }, + { (char*) "Africa/Lagos" , 0x0043CF }, + { (char*) "Africa/Libreville" , 0x0044C6 }, + { (char*) "Africa/Lome" , 0x004567 }, + { (char*) "Africa/Luanda" , 0x004607 }, + { (char*) "Africa/Lubumbashi" , 0x0046CE }, + { (char*) "Africa/Lusaka" , 0x0047AA }, + { (char*) "Africa/Malabo" , 0x00484B }, + { (char*) "Africa/Maputo" , 0x00490E }, + { (char*) "Africa/Maseru" , 0x0049AF }, + { (char*) "Africa/Mbabane" , 0x004A7B }, + { (char*) "Africa/Mogadishu" , 0x004B1F }, + { (char*) "Africa/Monrovia" , 0x004C00 }, + { (char*) "Africa/Nairobi" , 0x004CDC }, + { (char*) "Africa/Ndjamena" , 0x004DF1 }, + { (char*) "Africa/Niamey" , 0x004EC4 }, + { (char*) "Africa/Nouakchott" , 0x004FA9 }, + { (char*) "Africa/Ouagadougou" , 0x005085 }, + { (char*) "Africa/Porto-Novo" , 0x005125 }, + { (char*) "Africa/Sao_Tome" , 0x0051E8 }, + { (char*) "Africa/Timbuktu" , 0x0052F2 }, + { (char*) "Africa/Tripoli" , 0x005392 }, + { (char*) "Africa/Tunis" , 0x00560F }, + { (char*) "Africa/Windhoek" , 0x0058CC }, + { (char*) "America/Adak" , 0x005C93 }, + { (char*) "America/Anchorage" , 0x0065ED }, + { (char*) "America/Anguilla" , 0x006F4F }, + { (char*) "America/Antigua" , 0x006FEF }, + { (char*) "America/Araguaina" , 0x0070B1 }, + { (char*) "America/Argentina/Buenos_Aires" , 0x00742C }, + { (char*) "America/Argentina/Catamarca" , 0x007873 }, + { (char*) "America/Argentina/ComodRivadavia" , 0x007CC0 }, + { (char*) "America/Argentina/Cordoba" , 0x0080F2 }, + { (char*) "America/Argentina/Jujuy" , 0x00855A }, + { (char*) "America/Argentina/La_Rioja" , 0x00897A }, + { (char*) "America/Argentina/Mendoza" , 0x008DC7 }, + { (char*) "America/Argentina/Rio_Gallegos" , 0x009205 }, + { (char*) "America/Argentina/Salta" , 0x009646 }, + { (char*) "America/Argentina/San_Juan" , 0x009A72 }, + { (char*) "America/Argentina/San_Luis" , 0x009EBF }, + { (char*) "America/Argentina/Tucuman" , 0x00A318 }, + { (char*) "America/Argentina/Ushuaia" , 0x00A772 }, + { (char*) "America/Aruba" , 0x00ABB9 }, + { (char*) "America/Asuncion" , 0x00AC7F }, + { (char*) "America/Atikokan" , 0x00B479 }, + { (char*) "America/Atka" , 0x00B5F6 }, + { (char*) "America/Bahia" , 0x00BF36 }, + { (char*) "America/Bahia_Banderas" , 0x00C339 }, + { (char*) "America/Barbados" , 0x00C7D6 }, + { (char*) "America/Belem" , 0x00C996 }, + { (char*) "America/Belize" , 0x00CBE6 }, + { (char*) "America/Blanc-Sablon" , 0x00D240 }, + { (char*) "America/Boa_Vista" , 0x00D392 }, + { (char*) "America/Bogota" , 0x00D60F }, + { (char*) "America/Boise" , 0x00D703 }, + { (char*) "America/Buenos_Aires" , 0x00E099 }, + { (char*) "America/Cambridge_Bay" , 0x00E4CB }, + { (char*) "America/Campo_Grande" , 0x00EDB9 }, + { (char*) "America/Cancun" , 0x00F36D }, + { (char*) "America/Caracas" , 0x00F6C7 }, + { (char*) "America/Catamarca" , 0x00F7CD }, + { (char*) "America/Cayenne" , 0x00FBFF }, + { (char*) "America/Cayman" , 0x00FCC3 }, + { (char*) "America/Chicago" , 0x00FD85 }, + { (char*) "America/Chihuahua" , 0x010BAD }, + { (char*) "America/Ciudad_Juarez" , 0x01101D }, + { (char*) "America/Coral_Harbour" , 0x011647 }, + { (char*) "America/Cordoba" , 0x011709 }, + { (char*) "America/Costa_Rica" , 0x011B3B }, + { (char*) "America/Creston" , 0x011C83 }, + { (char*) "America/Cuiaba" , 0x011D71 }, + { (char*) "America/Curacao" , 0x012302 }, + { (char*) "America/Danmarkshavn" , 0x0123C8 }, + { (char*) "America/Dawson" , 0x0126A8 }, + { (char*) "America/Dawson_Creek" , 0x012D14 }, + { (char*) "America/Denver" , 0x01315A }, + { (char*) "America/Detroit" , 0x013B17 }, + { (char*) "America/Dominica" , 0x0143F2 }, + { (char*) "America/Edmonton" , 0x014492 }, + { (char*) "America/Eirunepe" , 0x014DDF }, + { (char*) "America/El_Salvador" , 0x01507C }, + { (char*) "America/Ensenada" , 0x015168 }, + { (char*) "America/Fort_Nelson" , 0x015ABA }, + { (char*) "America/Fort_Wayne" , 0x01639A }, + { (char*) "America/Fortaleza" , 0x016A38 }, + { (char*) "America/Glace_Bay" , 0x016D28 }, + { (char*) "America/Godthab" , 0x0175DF }, + { (char*) "America/Goose_Bay" , 0x017D5A }, + { (char*) "America/Grand_Turk" , 0x018A10 }, + { (char*) "America/Grenada" , 0x019146 }, + { (char*) "America/Guadeloupe" , 0x0191E6 }, + { (char*) "America/Guatemala" , 0x019286 }, + { (char*) "America/Guayaquil" , 0x0193AA }, + { (char*) "America/Guyana" , 0x0194B0 }, + { (char*) "America/Halifax" , 0x0195B4 }, + { (char*) "America/Havana" , 0x01A33E }, + { (char*) "America/Hermosillo" , 0x01ACBA }, + { (char*) "America/Indiana/Indianapolis" , 0x01AE94 }, + { (char*) "America/Indiana/Knox" , 0x01B54B }, + { (char*) "America/Indiana/Marengo" , 0x01BEF8 }, + { (char*) "America/Indiana/Petersburg" , 0x01C5E5 }, + { (char*) "America/Indiana/Tell_City" , 0x01CD84 }, + { (char*) "America/Indiana/Vevay" , 0x01D448 }, + { (char*) "America/Indiana/Vincennes" , 0x01DA04 }, + { (char*) "America/Indiana/Winamac" , 0x01E0DA }, + { (char*) "America/Indianapolis" , 0x01E7FE }, + { (char*) "America/Inuvik" , 0x01EE9C }, + { (char*) "America/Iqaluit" , 0x01F6D6 }, + { (char*) "America/Jamaica" , 0x01FF95 }, + { (char*) "America/Jujuy" , 0x020183 }, + { (char*) "America/Juneau" , 0x020599 }, + { (char*) "America/Kentucky/Louisville" , 0x020EEA }, + { (char*) "America/Kentucky/Monticello" , 0x0219F8 }, + { (char*) "America/Knox_IN" , 0x022358 }, + { (char*) "America/Kralendijk" , 0x022CF0 }, + { (char*) "America/La_Paz" , 0x022DF2 }, + { (char*) "America/Lima" , 0x022ED8 }, + { (char*) "America/Los_Angeles" , 0x02306C }, + { (char*) "America/Louisville" , 0x023BA3 }, + { (char*) "America/Lower_Princes" , 0x024693 }, + { (char*) "America/Maceio" , 0x024795 }, + { (char*) "America/Managua" , 0x024A8B }, + { (char*) "America/Manaus" , 0x024C45 }, + { (char*) "America/Marigot" , 0x024EAE }, + { (char*) "America/Martinique" , 0x024FB0 }, + { (char*) "America/Matamoros" , 0x0250A4 }, + { (char*) "America/Mazatlan" , 0x025666 }, + { (char*) "America/Mendoza" , 0x025B0C }, + { (char*) "America/Menominee" , 0x025F3E }, + { (char*) "America/Merida" , 0x02684B }, + { (char*) "America/Metlakatla" , 0x026C54 }, + { (char*) "America/Mexico_City" , 0x027206 }, + { (char*) "America/Miquelon" , 0x0276E6 }, + { (char*) "America/Moncton" , 0x027D66 }, + { (char*) "America/Monterrey" , 0x0289DC }, + { (char*) "America/Montevideo" , 0x028DF2 }, + { (char*) "America/Montreal" , 0x0293D6 }, + { (char*) "America/Montserrat" , 0x02A188 }, + { (char*) "America/Nassau" , 0x02A228 }, + { (char*) "America/New_York" , 0x02AB88 }, + { (char*) "America/Nipigon" , 0x02B988 }, + { (char*) "America/Nome" , 0x02C73A }, + { (char*) "America/Noronha" , 0x02D092 }, + { (char*) "America/North_Dakota/Beulah" , 0x02D36C }, + { (char*) "America/North_Dakota/Center" , 0x02DCE9 }, + { (char*) "America/North_Dakota/New_Salem" , 0x02E666 }, + { (char*) "America/Nuuk" , 0x02EFE9 }, + { (char*) "America/Ojinaga" , 0x02F775 }, + { (char*) "America/Panama" , 0x02FD91 }, + { (char*) "America/Pangnirtung" , 0x02FE53 }, + { (char*) "America/Paramaribo" , 0x0306F9 }, + { (char*) "America/Phoenix" , 0x0307FD }, + { (char*) "America/Port-au-Prince" , 0x030989 }, + { (char*) "America/Port_of_Spain" , 0x030F2F }, + { (char*) "America/Porto_Acre" , 0x030FCF }, + { (char*) "America/Porto_Velho" , 0x031241 }, + { (char*) "America/Puerto_Rico" , 0x031487 }, + { (char*) "America/Punta_Arenas" , 0x031589 }, + { (char*) "America/Rainy_River" , 0x031D17 }, + { (char*) "America/Rankin_Inlet" , 0x032857 }, + { (char*) "America/Recife" , 0x03308B }, + { (char*) "America/Regina" , 0x03335F }, + { (char*) "America/Resolute" , 0x033754 }, + { (char*) "America/Rio_Branco" , 0x033F89 }, + { (char*) "America/Rosario" , 0x0341FF }, + { (char*) "America/Santa_Isabel" , 0x034631 }, + { (char*) "America/Santarem" , 0x034F83 }, + { (char*) "America/Santiago" , 0x0351E6 }, + { (char*) "America/Santo_Domingo" , 0x035BD2 }, + { (char*) "America/Sao_Paulo" , 0x035DA8 }, + { (char*) "America/Scoresbysund" , 0x036380 }, + { (char*) "America/Shiprock" , 0x036B17 }, + { (char*) "America/Sitka" , 0x0374BF }, + { (char*) "America/St_Barthelemy" , 0x037DF7 }, + { (char*) "America/St_Johns" , 0x037EF9 }, + { (char*) "America/St_Kitts" , 0x038D6E }, + { (char*) "America/St_Lucia" , 0x038E0E }, + { (char*) "America/St_Thomas" , 0x038ED0 }, + { (char*) "America/St_Vincent" , 0x038F70 }, + { (char*) "America/Swift_Current" , 0x039032 }, + { (char*) "America/Tegucigalpa" , 0x039280 }, + { (char*) "America/Thule" , 0x039388 }, + { (char*) "America/Thunder_Bay" , 0x039980 }, + { (char*) "America/Tijuana" , 0x03A732 }, + { (char*) "America/Toronto" , 0x03B093 }, + { (char*) "America/Tortola" , 0x03BE62 }, + { (char*) "America/Vancouver" , 0x03BF02 }, + { (char*) "America/Virgin" , 0x03CA73 }, + { (char*) "America/Whitehorse" , 0x03CB75 }, + { (char*) "America/Winnipeg" , 0x03D1E1 }, + { (char*) "America/Yakutat" , 0x03DD3E }, + { (char*) "America/Yellowknife" , 0x03E65B }, + { (char*) "Antarctica/Casey" , 0x03EF83 }, + { (char*) "Antarctica/Davis" , 0x03F106 }, + { (char*) "Antarctica/DumontDUrville" , 0x03F232 }, + { (char*) "Antarctica/Macquarie" , 0x03F302 }, + { (char*) "Antarctica/Mawson" , 0x03FBF2 }, + { (char*) "Antarctica/McMurdo" , 0x03FCBD }, + { (char*) "Antarctica/Palmer" , 0x0404B8 }, + { (char*) "Antarctica/Rothera" , 0x040A46 }, + { (char*) "Antarctica/South_Pole" , 0x040AEF }, + { (char*) "Antarctica/Syowa" , 0x041480 }, + { (char*) "Antarctica/Troll" , 0x041528 }, + { (char*) "Antarctica/Vostok" , 0x0419B5 }, + { (char*) "Arctic/Longyearbyen" , 0x041A5E }, + { (char*) "Asia/Aden" , 0x042364 }, + { (char*) "Asia/Almaty" , 0x042407 }, + { (char*) "Asia/Amman" , 0x0427FC }, + { (char*) "Asia/Anadyr" , 0x042DA1 }, + { (char*) "Asia/Aqtau" , 0x043256 }, + { (char*) "Asia/Aqtobe" , 0x043640 }, + { (char*) "Asia/Ashgabat" , 0x043A3E }, + { (char*) "Asia/Ashkhabad" , 0x043CA7 }, + { (char*) "Asia/Atyrau" , 0x043F10 }, + { (char*) "Asia/Baghdad" , 0x044302 }, + { (char*) "Asia/Bahrain" , 0x0446D7 }, + { (char*) "Asia/Baku" , 0x0447C2 }, + { (char*) "Asia/Bangkok" , 0x044C8B }, + { (char*) "Asia/Barnaul" , 0x044D50 }, + { (char*) "Asia/Beirut" , 0x045221 }, + { (char*) "Asia/Bishkek" , 0x045A97 }, + { (char*) "Asia/Brunei" , 0x045E6C }, + { (char*) "Asia/Calcutta" , 0x045F35 }, + { (char*) "Asia/Chita" , 0x04605E }, + { (char*) "Asia/Choibalsan" , 0x046535 }, + { (char*) "Asia/Chongqing" , 0x0468FA }, + { (char*) "Asia/Chungking" , 0x046B37 }, + { (char*) "Asia/Colombo" , 0x046D74 }, + { (char*) "Asia/Dacca" , 0x046EE6 }, + { (char*) "Asia/Damascus" , 0x047035 }, + { (char*) "Asia/Dhaka" , 0x047792 }, + { (char*) "Asia/Dili" , 0x0478E1 }, + { (char*) "Asia/Dubai" , 0x0479C2 }, + { (char*) "Asia/Dushanbe" , 0x047A65 }, + { (char*) "Asia/Famagusta" , 0x047CB2 }, + { (char*) "Asia/Gaza" , 0x0484B9 }, + { (char*) "Asia/Harbin" , 0x0493AF }, + { (char*) "Asia/Hebron" , 0x0495EC }, + { (char*) "Asia/Ho_Chi_Minh" , 0x04A4FD }, + { (char*) "Asia/Hong_Kong" , 0x04A65A }, + { (char*) "Asia/Hovd" , 0x04AB37 }, + { (char*) "Asia/Irkutsk" , 0x04AEDB }, + { (char*) "Asia/Istanbul" , 0x04B3CE }, + { (char*) "Asia/Jakarta" , 0x04BB67 }, + { (char*) "Asia/Jayapura" , 0x04BCFF }, + { (char*) "Asia/Jerusalem" , 0x04BE1E }, + { (char*) "Asia/Kabul" , 0x04C77E }, + { (char*) "Asia/Kamchatka" , 0x04C84C }, + { (char*) "Asia/Karachi" , 0x04CCEA }, + { (char*) "Asia/Kashgar" , 0x04CE71 }, + { (char*) "Asia/Kathmandu" , 0x04CF14 }, + { (char*) "Asia/Katmandu" , 0x04CFE6 }, + { (char*) "Asia/Khandyga" , 0x04D0B8 }, + { (char*) "Asia/Kolkata" , 0x04D5CB }, + { (char*) "Asia/Krasnoyarsk" , 0x04D6F4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x04DBC2 }, + { (char*) "Asia/Kuching" , 0x04DD73 }, + { (char*) "Asia/Kuwait" , 0x04DF62 }, + { (char*) "Asia/Macao" , 0x04E005 }, + { (char*) "Asia/Macau" , 0x04E4DC }, + { (char*) "Asia/Magadan" , 0x04E9B3 }, + { (char*) "Asia/Makassar" , 0x04EE87 }, + { (char*) "Asia/Manila" , 0x04EFDA }, + { (char*) "Asia/Muscat" , 0x04F12E }, + { (char*) "Asia/Nicosia" , 0x04F1D1 }, + { (char*) "Asia/Novokuznetsk" , 0x04F9BD }, + { (char*) "Asia/Novosibirsk" , 0x04FE59 }, + { (char*) "Asia/Omsk" , 0x050330 }, + { (char*) "Asia/Oral" , 0x0507F2 }, + { (char*) "Asia/Phnom_Penh" , 0x050BEC }, + { (char*) "Asia/Pontianak" , 0x050D11 }, + { (char*) "Asia/Pyongyang" , 0x050E94 }, + { (char*) "Asia/Qatar" , 0x050F8D }, + { (char*) "Asia/Qostanay" , 0x051052 }, + { (char*) "Asia/Qyzylorda" , 0x05145D }, + { (char*) "Asia/Rangoon" , 0x051879 }, + { (char*) "Asia/Riyadh" , 0x051983 }, + { (char*) "Asia/Saigon" , 0x051A26 }, + { (char*) "Asia/Sakhalin" , 0x051B83 }, + { (char*) "Asia/Samarkand" , 0x05204B }, + { (char*) "Asia/Seoul" , 0x05229B }, + { (char*) "Asia/Shanghai" , 0x052510 }, + { (char*) "Asia/Singapore" , 0x052759 }, + { (char*) "Asia/Srednekolymsk" , 0x0528F6 }, + { (char*) "Asia/Taipei" , 0x052DCA }, + { (char*) "Asia/Tashkent" , 0x0530CF }, + { (char*) "Asia/Tbilisi" , 0x05332D }, + { (char*) "Asia/Tehran" , 0x053736 }, + { (char*) "Asia/Tel_Aviv" , 0x053C22 }, + { (char*) "Asia/Thimbu" , 0x054582 }, + { (char*) "Asia/Thimphu" , 0x05464B }, + { (char*) "Asia/Tokyo" , 0x054714 }, + { (char*) "Asia/Tomsk" , 0x054855 }, + { (char*) "Asia/Ujung_Pandang" , 0x054D26 }, + { (char*) "Asia/Ulaanbaatar" , 0x054E30 }, + { (char*) "Asia/Ulan_Bator" , 0x0551B9 }, + { (char*) "Asia/Urumqi" , 0x055532 }, + { (char*) "Asia/Ust-Nera" , 0x0555E2 }, + { (char*) "Asia/Vientiane" , 0x055AD8 }, + { (char*) "Asia/Vladivostok" , 0x055C19 }, + { (char*) "Asia/Yakutsk" , 0x0560E2 }, + { (char*) "Asia/Yangon" , 0x0565AA }, + { (char*) "Asia/Yekaterinburg" , 0x0566B4 }, + { (char*) "Asia/Yerevan" , 0x056B9B }, + { (char*) "Atlantic/Azores" , 0x057018 }, + { (char*) "Atlantic/Bermuda" , 0x057DD4 }, + { (char*) "Atlantic/Canary" , 0x05873C }, + { (char*) "Atlantic/Cape_Verde" , 0x058EBF }, + { (char*) "Atlantic/Faeroe" , 0x058FCB }, + { (char*) "Atlantic/Faroe" , 0x0596EE }, + { (char*) "Atlantic/Jan_Mayen" , 0x059E11 }, + { (char*) "Atlantic/Madeira" , 0x05A717 }, + { (char*) "Atlantic/Reykjavik" , 0x05B4E1 }, + { (char*) "Atlantic/South_Georgia" , 0x05B977 }, + { (char*) "Atlantic/St_Helena" , 0x05BA19 }, + { (char*) "Atlantic/Stanley" , 0x05BADB }, + { (char*) "Australia/ACT" , 0x05BF97 }, + { (char*) "Australia/Adelaide" , 0x05C831 }, + { (char*) "Australia/Brisbane" , 0x05D0EC }, + { (char*) "Australia/Broken_Hill" , 0x05D2B2 }, + { (char*) "Australia/Canberra" , 0x05DB8F }, + { (char*) "Australia/Currie" , 0x05E429 }, + { (char*) "Australia/Darwin" , 0x05ED6B }, + { (char*) "Australia/Eucla" , 0x05EECE }, + { (char*) "Australia/Hobart" , 0x05F0BB }, + { (char*) "Australia/LHI" , 0x05FA05 }, + { (char*) "Australia/Lindeman" , 0x060147 }, + { (char*) "Australia/Lord_Howe" , 0x06034D }, + { (char*) "Australia/Melbourne" , 0x060A9F }, + { (char*) "Australia/North" , 0x061341 }, + { (char*) "Australia/NSW" , 0x061492 }, + { (char*) "Australia/Perth" , 0x061D2C }, + { (char*) "Australia/Queensland" , 0x061F14 }, + { (char*) "Australia/South" , 0x0620C3 }, + { (char*) "Australia/Sydney" , 0x06296F }, + { (char*) "Australia/Tasmania" , 0x063225 }, + { (char*) "Australia/Victoria" , 0x063B67 }, + { (char*) "Australia/West" , 0x064401 }, + { (char*) "Australia/Yancowinna" , 0x0645CB }, + { (char*) "Brazil/Acre" , 0x064E8C }, + { (char*) "Brazil/DeNoronha" , 0x0650FE }, + { (char*) "Brazil/East" , 0x0653C8 }, + { (char*) "Brazil/West" , 0x06596A }, + { (char*) "Canada/Atlantic" , 0x065BC4 }, + { (char*) "Canada/Central" , 0x066930 }, + { (char*) "Canada/Eastern" , 0x067470 }, + { (char*) "Canada/Mountain" , 0x068222 }, + { (char*) "Canada/Newfoundland" , 0x068B4A }, + { (char*) "Canada/Pacific" , 0x06999D }, + { (char*) "Canada/Saskatchewan" , 0x06A4F5 }, + { (char*) "Canada/Yukon" , 0x06A8D5 }, + { (char*) "CET" , 0x06AF2F }, + { (char*) "Chile/Continental" , 0x06B769 }, + { (char*) "Chile/EasterIsland" , 0x06C148 }, + { (char*) "CST6CDT" , 0x06C9FF }, + { (char*) "Cuba" , 0x06D311 }, + { (char*) "EET" , 0x06DC8D }, + { (char*) "Egypt" , 0x06E40D }, + { (char*) "Eire" , 0x06ED78 }, + { (char*) "EST" , 0x06FB28 }, + { (char*) "EST5EDT" , 0x06FBA6 }, + { (char*) "Etc/GMT" , 0x0704B8 }, + { (char*) "Etc/GMT+0" , 0x070536 }, + { (char*) "Etc/GMT+1" , 0x0705B4 }, + { (char*) "Etc/GMT+10" , 0x070634 }, + { (char*) "Etc/GMT+11" , 0x0706B5 }, + { (char*) "Etc/GMT+12" , 0x070736 }, + { (char*) "Etc/GMT+2" , 0x0707B7 }, + { (char*) "Etc/GMT+3" , 0x070837 }, + { (char*) "Etc/GMT+4" , 0x0708B7 }, + { (char*) "Etc/GMT+5" , 0x070937 }, + { (char*) "Etc/GMT+6" , 0x0709B7 }, + { (char*) "Etc/GMT+7" , 0x070A37 }, + { (char*) "Etc/GMT+8" , 0x070AB7 }, + { (char*) "Etc/GMT+9" , 0x070B37 }, + { (char*) "Etc/GMT-0" , 0x070BB7 }, + { (char*) "Etc/GMT-1" , 0x070C35 }, + { (char*) "Etc/GMT-10" , 0x070CB6 }, + { (char*) "Etc/GMT-11" , 0x070D38 }, + { (char*) "Etc/GMT-12" , 0x070DBA }, + { (char*) "Etc/GMT-13" , 0x070E3C }, + { (char*) "Etc/GMT-14" , 0x070EBE }, + { (char*) "Etc/GMT-2" , 0x070F40 }, + { (char*) "Etc/GMT-3" , 0x070FC1 }, + { (char*) "Etc/GMT-4" , 0x071042 }, + { (char*) "Etc/GMT-5" , 0x0710C3 }, + { (char*) "Etc/GMT-6" , 0x071144 }, + { (char*) "Etc/GMT-7" , 0x0711C5 }, + { (char*) "Etc/GMT-8" , 0x071246 }, + { (char*) "Etc/GMT-9" , 0x0712C7 }, + { (char*) "Etc/GMT0" , 0x071348 }, + { (char*) "Etc/Greenwich" , 0x0713C6 }, + { (char*) "Etc/UCT" , 0x071444 }, + { (char*) "Etc/Universal" , 0x0714C2 }, + { (char*) "Etc/UTC" , 0x071540 }, + { (char*) "Etc/Zulu" , 0x0715BE }, + { (char*) "Europe/Amsterdam" , 0x07163C }, + { (char*) "Europe/Andorra" , 0x0721A6 }, + { (char*) "Europe/Astrakhan" , 0x072880 }, + { (char*) "Europe/Athens" , 0x072D1D }, + { (char*) "Europe/Belfast" , 0x0735FF }, + { (char*) "Europe/Belgrade" , 0x07445B }, + { (char*) "Europe/Berlin" , 0x074BE7 }, + { (char*) "Europe/Bratislava" , 0x0754FC }, + { (char*) "Europe/Brussels" , 0x075E05 }, + { (char*) "Europe/Bucharest" , 0x076986 }, + { (char*) "Europe/Budapest" , 0x07721A }, + { (char*) "Europe/Busingen" , 0x077B66 }, + { (char*) "Europe/Chisinau" , 0x0782EF }, + { (char*) "Europe/Copenhagen" , 0x078C51 }, + { (char*) "Europe/Dublin" , 0x0794B6 }, + { (char*) "Europe/Gibraltar" , 0x07A266 }, + { (char*) "Europe/Guernsey" , 0x07AE6E }, + { (char*) "Europe/Helsinki" , 0x07BD0E }, + { (char*) "Europe/Isle_of_Man" , 0x07C486 }, + { (char*) "Europe/Istanbul" , 0x07D2D2 }, + { (char*) "Europe/Jersey" , 0x07DA6B }, + { (char*) "Europe/Kaliningrad" , 0x07E90B }, + { (char*) "Europe/Kiev" , 0x07EF00 }, + { (char*) "Europe/Kirov" , 0x07F754 }, + { (char*) "Europe/Kyiv" , 0x07FC0F }, + { (char*) "Europe/Lisbon" , 0x080472 }, + { (char*) "Europe/Ljubljana" , 0x08123A }, + { (char*) "Europe/London" , 0x0819C6 }, + { (char*) "Europe/Luxembourg" , 0x082822 }, + { (char*) "Europe/Madrid" , 0x0833B0 }, + { (char*) "Europe/Malta" , 0x083E02 }, + { (char*) "Europe/Mariehamn" , 0x08484A }, + { (char*) "Europe/Minsk" , 0x084FC2 }, + { (char*) "Europe/Monaco" , 0x0854E9 }, + { (char*) "Europe/Moscow" , 0x086075 }, + { (char*) "Europe/Nicosia" , 0x086694 }, + { (char*) "Europe/Oslo" , 0x086E72 }, + { (char*) "Europe/Paris" , 0x087732 }, + { (char*) "Europe/Podgorica" , 0x0882D0 }, + { (char*) "Europe/Prague" , 0x088A5C }, + { (char*) "Europe/Riga" , 0x089365 }, + { (char*) "Europe/Rome" , 0x089C07 }, + { (char*) "Europe/Samara" , 0x08A664 }, + { (char*) "Europe/San_Marino" , 0x08AB3A }, + { (char*) "Europe/Sarajevo" , 0x08B597 }, + { (char*) "Europe/Saratov" , 0x08BD23 }, + { (char*) "Europe/Simferopol" , 0x08C1D0 }, + { (char*) "Europe/Skopje" , 0x08C79F }, + { (char*) "Europe/Sofia" , 0x08CF2B }, + { (char*) "Europe/Stockholm" , 0x08D754 }, + { (char*) "Europe/Tallinn" , 0x08DED5 }, + { (char*) "Europe/Tirane" , 0x08E745 }, + { (char*) "Europe/Tiraspol" , 0x08EF75 }, + { (char*) "Europe/Ulyanovsk" , 0x08F8D7 }, + { (char*) "Europe/Uzhgorod" , 0x08FDDA }, + { (char*) "Europe/Vaduz" , 0x09062E }, + { (char*) "Europe/Vatican" , 0x090D9A }, + { (char*) "Europe/Vienna" , 0x0917F7 }, + { (char*) "Europe/Vilnius" , 0x09209B }, + { (char*) "Europe/Volgograd" , 0x092919 }, + { (char*) "Europe/Warsaw" , 0x092DE0 }, + { (char*) "Europe/Zagreb" , 0x09384A }, + { (char*) "Europe/Zaporozhye" , 0x093FD6 }, + { (char*) "Europe/Zurich" , 0x09482A }, + { (char*) "Factory" , 0x094FAB }, + { (char*) "GB" , 0x09502B }, + { (char*) "GB-Eire" , 0x095E87 }, + { (char*) "GMT" , 0x096CE3 }, + { (char*) "GMT+0" , 0x096D61 }, + { (char*) "GMT-0" , 0x096DDF }, + { (char*) "GMT0" , 0x096E5D }, + { (char*) "Greenwich" , 0x096EDB }, + { (char*) "Hongkong" , 0x096F59 }, + { (char*) "HST" , 0x097436 }, + { (char*) "Iceland" , 0x0974B5 }, + { (char*) "Indian/Antananarivo" , 0x097555 }, + { (char*) "Indian/Chagos" , 0x09763C }, + { (char*) "Indian/Christmas" , 0x097701 }, + { (char*) "Indian/Cocos" , 0x0977A4 }, + { (char*) "Indian/Comoro" , 0x097850 }, + { (char*) "Indian/Kerguelen" , 0x0978F1 }, + { (char*) "Indian/Mahe" , 0x097994 }, + { (char*) "Indian/Maldives" , 0x097A37 }, + { (char*) "Indian/Mauritius" , 0x097AFC }, + { (char*) "Indian/Mayotte" , 0x097BEB }, + { (char*) "Indian/Reunion" , 0x097C8C }, + { (char*) "Iran" , 0x097D2F }, + { (char*) "Israel" , 0x09821B }, + { (char*) "Jamaica" , 0x098B7B }, + { (char*) "Japan" , 0x098D69 }, + { (char*) "Kwajalein" , 0x098EAA }, + { (char*) "Libya" , 0x098FE4 }, + { (char*) "MET" , 0x099261 }, + { (char*) "Mexico/BajaNorte" , 0x099A9B }, + { (char*) "Mexico/BajaSur" , 0x09A3ED }, + { (char*) "Mexico/General" , 0x09A861 }, + { (char*) "MST" , 0x09AD33 }, + { (char*) "MST7MDT" , 0x09ADB1 }, + { (char*) "Navajo" , 0x09B6C3 }, + { (char*) "NZ" , 0x09C06B }, + { (char*) "NZ-CHAT" , 0x09C9FC }, + { (char*) "Pacific/Apia" , 0x09D20E }, + { (char*) "Pacific/Auckland" , 0x09D470 }, + { (char*) "Pacific/Bougainville" , 0x09DE14 }, + { (char*) "Pacific/Chatham" , 0x09DF2A }, + { (char*) "Pacific/Chuuk" , 0x09E74B }, + { (char*) "Pacific/Easter" , 0x09E865 }, + { (char*) "Pacific/Efate" , 0x09F129 }, + { (char*) "Pacific/Enderbury" , 0x09F341 }, + { (char*) "Pacific/Fakaofo" , 0x09F429 }, + { (char*) "Pacific/Fiji" , 0x09F4EF }, + { (char*) "Pacific/Funafuti" , 0x09F72F }, + { (char*) "Pacific/Galapagos" , 0x09F7D3 }, + { (char*) "Pacific/Gambier" , 0x09F8D0 }, + { (char*) "Pacific/Guadalcanal" , 0x09F981 }, + { (char*) "Pacific/Guam" , 0x09FA25 }, + { (char*) "Pacific/Honolulu" , 0x09FC1F }, + { (char*) "Pacific/Johnston" , 0x09FD7A }, + { (char*) "Pacific/Kanton" , 0x09FECF }, + { (char*) "Pacific/Kiritimati" , 0x09FFC6 }, + { (char*) "Pacific/Kosrae" , 0x0A00BE }, + { (char*) "Pacific/Kwajalein" , 0x0A0221 }, + { (char*) "Pacific/Majuro" , 0x0A0364 }, + { (char*) "Pacific/Marquesas" , 0x0A04B0 }, + { (char*) "Pacific/Midway" , 0x0A056C }, + { (char*) "Pacific/Nauru" , 0x0A065F }, + { (char*) "Pacific/Niue" , 0x0A0759 }, + { (char*) "Pacific/Norfolk" , 0x0A0822 }, + { (char*) "Pacific/Noumea" , 0x0A0B90 }, + { (char*) "Pacific/Pago_Pago" , 0x0A0CBE }, + { (char*) "Pacific/Palau" , 0x0A0D79 }, + { (char*) "Pacific/Pitcairn" , 0x0A0E2B }, + { (char*) "Pacific/Pohnpei" , 0x0A0EF3 }, + { (char*) "Pacific/Ponape" , 0x0A102E }, + { (char*) "Pacific/Port_Moresby" , 0x0A10D2 }, + { (char*) "Pacific/Rarotonga" , 0x0A11A2 }, + { (char*) "Pacific/Saipan" , 0x0A13FB }, + { (char*) "Pacific/Samoa" , 0x0A15E7 }, + { (char*) "Pacific/Tahiti" , 0x0A16A2 }, + { (char*) "Pacific/Tarawa" , 0x0A1754 }, + { (char*) "Pacific/Tongatapu" , 0x0A1807 }, + { (char*) "Pacific/Truk" , 0x0A1979 }, + { (char*) "Pacific/Wake" , 0x0A1A31 }, + { (char*) "Pacific/Wallis" , 0x0A1AE0 }, + { (char*) "Pacific/Yap" , 0x0A1B84 }, + { (char*) "Poland" , 0x0A1C3C }, + { (char*) "Portugal" , 0x0A26A6 }, + { (char*) "PRC" , 0x0A345B }, + { (char*) "PST8PDT" , 0x0A3698 }, + { (char*) "ROC" , 0x0A3FAA }, + { (char*) "ROK" , 0x0A42AF }, + { (char*) "Singapore" , 0x0A4524 }, + { (char*) "Turkey" , 0x0A46C1 }, + { (char*) "UCT" , 0x0A4E5A }, + { (char*) "Universal" , 0x0A4ED8 }, + { (char*) "US/Alaska" , 0x0A4F56 }, + { (char*) "US/Aleutian" , 0x0A58A5 }, + { (char*) "US/Arizona" , 0x0A61E5 }, + { (char*) "US/Central" , 0x0A6359 }, + { (char*) "US/East-Indiana" , 0x0A716D }, + { (char*) "US/Eastern" , 0x0A780B }, + { (char*) "US/Hawaii" , 0x0A85F7 }, + { (char*) "US/Indiana-Starke" , 0x0A874C }, + { (char*) "US/Michigan" , 0x0A90E4 }, + { (char*) "US/Mountain" , 0x0A99A6 }, + { (char*) "US/Pacific" , 0x0AA34E }, + { (char*) "US/Samoa" , 0x0AAE7E }, + { (char*) "UTC" , 0x0AAF39 }, + { (char*) "W-SU" , 0x0AAFB7 }, + { (char*) "WET" , 0x0AB5C2 }, + { (char*) "Zulu" , 0x0ABD3F }, }; -const unsigned char timelib_timezone_db_data_builtin[699143] = { +const unsigned char timelib_timezone_db_data_builtin[703933] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24582,7 +24750,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Africa/Cairo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -24614,95 +24782,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00, /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24723,11 +24919,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x59, 0x58, 0x53, 0xA0, 0x59, 0xF5, 0x36, 0x20, 0x5A, 0xB7, 0x02, 0xA0, 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, -0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x4D, 0xCB, 0xA0, +0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, -0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xE7, 0x58, 0x20, +0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, @@ -24775,7 +24971,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x64, 0x4D, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, +0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, @@ -24783,7 +24979,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, -0x00, 0x72, 0xE7, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, @@ -24791,7 +24987,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x81, 0x80, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, +0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, @@ -24799,7 +24995,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, -0x00, 0x90, 0x1A, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, +0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, @@ -24807,7 +25003,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, -0x00, 0x9E, 0xB3, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, +0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, @@ -24815,7 +25011,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, -0x00, 0xAD, 0x4D, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, @@ -24823,7 +25019,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xBB, 0xE7, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, @@ -24831,15 +25027,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, -0x00, 0xCA, 0x80, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD3, 0x9F, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, -0x00, 0xD9, 0x1A, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, +0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, @@ -25082,11 +25278,11 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, -0x64, 0x4D, 0xCB, 0xA0, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, +0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, -0x72, 0xE7, 0x58, 0x20, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, +0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 0x01, 0x03, 0x02, 0x03, @@ -25127,7 +25323,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, -0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4D, 0xCB, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, @@ -25135,7 +25331,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE7, 0x58, 0x20, +0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, @@ -25143,7 +25339,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, -0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x80, 0xE4, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4E, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, @@ -25151,7 +25347,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, -0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1A, 0x71, 0x20, +0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE7, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, @@ -25159,7 +25355,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, -0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB3, 0xFD, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x81, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, @@ -25167,7 +25363,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x4D, 0x8A, 0x20, +0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, @@ -25175,7 +25371,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, -0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xE7, 0x16, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, @@ -25183,15 +25379,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, -0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x80, 0xA3, 0x20, +0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9F, 0x73, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6C, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, -0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x1A, 0x2F, 0xA0, +0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, @@ -26037,9 +26233,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, -0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x10, -0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, - +0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x1A, +0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, +0x20, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61, 0x6E, 0x73, /* America/Anchorage */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -29888,9 +30084,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, -0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, -0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, -0x4B, 0x20, 0x28, 0x57, 0x29, +0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, +0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, +0x54, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29, /* America/Eirunepe */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -30552,8 +30748,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Godthab */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -30575,74 +30771,102 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -36729,8 +36953,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* America/Nuuk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, @@ -36752,75 +36976,103 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, -0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, -0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, -0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, -0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, -0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, -0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, -0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, -0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, -0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, -0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, -0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, -0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, -0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, -0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, -0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, -0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, -0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, -0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, -0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, -0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, -0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, -0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, -0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, -0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, -0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, -0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, -0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, -0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, -0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x01, 0x04, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, -0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, -0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, -0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x0A, 0x3C, 0x2D, 0x30, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, -0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, +0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, +0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, 0x4C, +0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, +0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, +0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, +0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, +0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, +0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, +0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, +0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, +0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, +0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, +0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, +0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, +0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, +0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, +0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, +0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, +0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, +0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, +0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, +0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, +0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, +0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, +0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, +0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, +0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, +0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, +0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, +0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, +0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, +0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, +0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, +0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, +0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, +0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, +0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, +0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, +0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, +0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, +0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, +0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, +0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, +0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, +0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, +0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, +0x90, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, +0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x0C, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x2D, 0x30, 0x31, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x0A, 0x3C, +0x2D, 0x30, 0x32, 0x3E, 0x32, 0x3C, 0x2D, 0x30, 0x31, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, +0x30, 0x2F, 0x2D, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, +0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x11, 0x6D, 0x6F, 0x73, 0x74, 0x20, +0x6F, 0x66, 0x20, 0x47, 0x72, 0x65, 0x65, 0x6E, 0x6C, 0x61, 0x6E, 0x64, /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -37121,9 +37373,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, -0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, -0x29, +0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x54, 0x20, 0x2D, 0x20, 0x41, 0x5A, 0x20, 0x28, 0x65, 0x78, +0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -38482,9 +38733,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x36, 0x2F, -0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, -0x68, 0x69, 0x6C, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x32, 0x34, 0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x0D, 0x6D, +0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x68, 0x69, 0x6C, 0x65, /* America/Santo_Domingo */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40764,142 +41014,153 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x73, 0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74, /* America/Yellowknife */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xBE, 0x2A, 0x18, 0x00, -0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0x04, 0x61, 0x19, 0x90, -0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, 0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, -0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, 0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, -0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, -0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, 0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, -0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, 0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, -0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, 0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, -0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, 0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, -0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, 0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, -0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, -0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, -0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, -0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, 0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, -0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, 0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, -0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, 0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, -0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, -0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, -0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, 0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, -0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, 0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, -0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, -0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, 0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, -0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, 0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, -0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, 0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, -0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, -0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, -0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, -0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, 0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, -0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, 0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, -0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, 0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, -0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, -0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, -0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, 0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, -0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, 0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, -0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, -0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, -0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, -0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, -0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, -0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, -0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, -0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, -0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, -0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, -0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, -0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, -0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, -0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, -0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, -0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, -0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, -0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, -0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, -0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, -0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, -0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, -0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, -0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, -0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, -0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, -0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, -0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, -0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, -0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, -0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, -0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, -0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, -0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, -0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, -0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, -0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, -0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, -0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, -0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, -0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, -0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, -0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, -0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x03, 0x01, 0x02, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, -0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, -0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, -0x01, 0x10, 0x2D, 0x30, 0x30, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, -0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, -0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7, 0x00, 0x64, 0x2C, 0x88, -0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, -0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x29, +0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x88, 0xDE, 0xCE, 0xE0, +0x9E, 0xB8, 0xAF, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x98, 0x91, 0x90, 0xA0, 0xD2, 0x85, 0x80, +0xA2, 0x8A, 0xE8, 0x90, 0xA3, 0x84, 0x06, 0x00, 0xA4, 0x6A, 0xCA, 0x90, 0xA5, 0x35, 0xC3, 0x80, +0xA6, 0x53, 0xE7, 0x10, 0xA7, 0x15, 0xA5, 0x80, 0xA8, 0x33, 0xC9, 0x10, 0xA8, 0xFE, 0xC2, 0x00, +0xCB, 0x89, 0x0C, 0x90, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xD5, 0x55, 0xE3, 0x10, +0xD6, 0x20, 0xDC, 0x00, 0x04, 0x61, 0x19, 0x90, 0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, +0x07, 0x30, 0xDE, 0x80, 0x08, 0x20, 0xDD, 0x90, 0x09, 0x10, 0xC0, 0x80, 0x0A, 0x00, 0xBF, 0x90, +0x0A, 0xF0, 0xA2, 0x80, 0x0B, 0xE0, 0xA1, 0x90, 0x0C, 0xD9, 0xBF, 0x00, 0x0D, 0xC0, 0x83, 0x90, +0x0E, 0xB9, 0xA1, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x10, 0x99, 0x83, 0x00, 0x11, 0x89, 0x82, 0x10, +0x12, 0x79, 0x65, 0x00, 0x13, 0x69, 0x64, 0x10, 0x14, 0x59, 0x47, 0x00, 0x15, 0x49, 0x46, 0x10, +0x16, 0x39, 0x29, 0x00, 0x17, 0x29, 0x28, 0x10, 0x18, 0x22, 0x45, 0x80, 0x19, 0x09, 0x0A, 0x10, +0x1A, 0x02, 0x27, 0x80, 0x1A, 0xF2, 0x26, 0x90, 0x1B, 0xE2, 0x09, 0x80, 0x1C, 0xD2, 0x08, 0x90, +0x1D, 0xC1, 0xEB, 0x80, 0x1E, 0xB1, 0xEA, 0x90, 0x1F, 0xA1, 0xCD, 0x80, 0x20, 0x76, 0x1D, 0x10, +0x21, 0x81, 0xAF, 0x80, 0x22, 0x55, 0xFF, 0x10, 0x23, 0x6A, 0xCC, 0x00, 0x24, 0x35, 0xE1, 0x10, +0x25, 0x4A, 0xAE, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x27, 0x2A, 0x90, 0x00, 0x27, 0xFE, 0xDF, 0x90, +0x29, 0x0A, 0x72, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x2A, 0xEA, 0x54, 0x00, 0x2B, 0xBE, 0xA3, 0x90, +0x2C, 0xD3, 0x70, 0x80, 0x2D, 0x9E, 0x85, 0x90, 0x2E, 0xB3, 0x52, 0x80, 0x2F, 0x7E, 0x67, 0x90, +0x30, 0x93, 0x34, 0x80, 0x31, 0x67, 0x84, 0x10, 0x32, 0x73, 0x16, 0x80, 0x33, 0x47, 0x66, 0x10, +0x34, 0x52, 0xF8, 0x80, 0x35, 0x27, 0x48, 0x10, 0x36, 0x32, 0xDA, 0x80, 0x37, 0x07, 0x2A, 0x10, +0x38, 0x1B, 0xF7, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xEE, 0x10, +0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, +0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, +0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, +0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, +0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, +0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, +0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, +0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, +0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, +0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, +0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, +0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, +0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, +0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, +0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, +0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, +0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, +0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, +0x7F, 0x98, 0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, +0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, +0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, +0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, +0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x98, +0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x8A, +0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, +0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, +0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, +0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, +0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, +0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, +0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, +0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, +0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, +0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, +0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, +0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, +0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, +0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, +0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, +0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, +0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, +0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, +0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, +0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, +0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, +0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, +0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, +0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, +0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, +0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, +0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, +0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, +0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, +0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, +0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, +0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, +0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, +0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, +0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, +0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, +0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, +0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, +0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, +0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, +0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, +0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, +0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, +0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, +0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, +0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, +0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, +0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, +0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, +0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, +0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, +0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, +0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, +0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, +0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, +0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, +0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, +0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, +0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, +0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, +0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, +0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, +0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, +0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, +0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, +0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, +0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, +0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, +0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, +0x1C, 0x80, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, +0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, +0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, +0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, +0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, +0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -41840,8 +42101,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x54, 0x60, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x36, 0x3E, 0x2D, 0x36, 0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, -0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x12, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, +0x68, 0x73, 0x74, 0x61, 0x6E, /* Asia/Amman */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43430,15 +43691,15 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x56, 0x29, 0x5C, 0x60, 0x56, 0xF5, 0xC2, 0xF0, 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, -0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, -0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, +0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, +0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, -0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, -0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, +0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43456,7 +43717,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, +0x00, 0x01, 0x30, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, @@ -43517,9 +43778,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, -0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, -0x07, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, -0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, +0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, +0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, +0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, @@ -43530,8 +43791,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0xEF, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, -0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, -0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, +0x98, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, +0x78, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, +0x58, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, +0x38, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, +0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, +0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, +0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, +0x01, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, +0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, +0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, +0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, +0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, +0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, +0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, +0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, +0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, +0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, +0x60, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, +0x19, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, +0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, +0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, +0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, +0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, +0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, +0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, +0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, +0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, +0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, +0x05, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0x92, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, +0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, +0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, +0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, +0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, +0x24, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, +0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, +0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, +0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, +0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, +0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, +0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, +0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, +0x23, 0x21, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, +0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, +0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, +0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, +0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, +0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, +0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, +0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, +0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, +0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, +0x04, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, +0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, +0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, +0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, +0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, +0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, +0x94, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, +0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, +0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, +0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, +0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, +0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, +0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, +0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, +0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, +0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, +0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, +0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, +0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, +0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, +0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43541,16 +43879,26 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, -0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, -0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, -0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, -0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, -0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, +0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, +0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, +0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, +0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, +0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, +0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43624,14 +43972,14 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x58, 0x13, 0xCA, 0x60, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF3, 0xAC, 0x60, 0x5A, 0xB5, 0x86, 0xF0, 0x5B, 0xD3, 0x8E, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB3, 0x62, 0x50, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x93, 0x52, 0x60, 0x60, 0x5E, 0x59, 0x60, 0x61, 0x7B, 0x1D, 0x60, 0x62, 0x3F, 0x8C, 0xE0, -0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x1E, 0x39, 0x80, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x07, 0x56, 0x00, -0x67, 0x1C, 0x22, 0xF0, 0x67, 0xE7, 0x38, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, +0x63, 0x5C, 0x5E, 0xF0, 0x64, 0x4C, 0x5E, 0x00, 0x65, 0x3C, 0x40, 0xF0, 0x66, 0x19, 0xCB, 0x00, +0x67, 0x1C, 0x22, 0xF0, 0x67, 0xF0, 0x72, 0x80, 0x68, 0xFC, 0x04, 0xF0, 0x69, 0xC7, 0x1A, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x6B, 0xA6, 0xFC, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x6D, 0x86, 0xDE, 0x00, 0x6E, 0xA4, 0xE5, 0x70, 0x6F, 0x66, 0xC0, 0x00, 0x70, 0x84, 0xC7, 0x70, 0x71, 0x4F, 0xDC, 0x80, 0x72, 0x64, 0xA9, 0x70, 0x73, 0x2F, 0xBE, 0x80, 0x74, 0x44, 0x8B, 0x70, 0x75, 0x0F, 0xA0, 0x80, 0x76, 0x2D, 0xA7, 0xF0, 0x76, 0xEF, 0x82, 0x80, 0x78, 0x0D, 0x89, 0xF0, 0x78, 0xCF, 0x64, 0x80, 0x79, 0xED, 0x6B, 0xF0, 0x7A, 0xAF, 0x46, 0x80, 0x7B, 0xCD, 0x4D, 0xF0, 0x7C, 0x98, 0x63, 0x00, -0x7D, 0xAD, 0x2F, 0xF0, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, +0x7D, 0xA3, 0xF5, 0x70, 0x7E, 0x78, 0x45, 0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -43649,7 +43997,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, +0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xCF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0xA6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x38, 0x9C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xEB, 0x80, 0xFF, 0xFF, 0xFF, @@ -43711,9 +44059,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x5D, 0xB3, 0x62, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x93, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1E, 0x39, 0x80, 0x00, 0x00, 0x00, -0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x56, 0x00, 0x00, 0x00, 0x00, -0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE7, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x63, 0x5C, 0x5E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4C, 0x5E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x65, 0x3C, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0xCB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x67, 0x1C, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF0, 0x72, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFC, 0x04, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC7, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDB, 0xE6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC5, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0xDE, 0x00, 0x00, 0x00, 0x00, @@ -43725,8 +44073,85 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x78, 0x0D, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xED, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAF, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x63, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7D, 0xAD, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, -0x00, 0x7F, 0x8D, 0x11, 0xF0, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x00, 0x7D, 0xA3, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x45, 0x00, 0x00, 0x00, 0x00, +0x00, 0x7F, 0x7A, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x58, 0x27, 0x00, 0x00, 0x00, 0x00, +0x00, 0x81, 0x48, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x38, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x1E, 0xB1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x83, 0x4C, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x83, 0x56, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x84, 0x17, 0xEB, 0x00, 0x00, 0x00, 0x00, +0x00, 0x84, 0xEC, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x85, 0x23, 0x8B, 0x80, 0x00, 0x00, 0x00, +0x00, 0x85, 0x35, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x07, 0x80, 0x00, 0x00, 0x00, +0x00, 0x86, 0xC2, 0xC5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x87, 0x15, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x87, 0xE0, 0xE9, 0x80, 0x00, 0x00, 0x00, +0x00, 0x88, 0x99, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x88, 0xF5, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x89, 0xC0, 0xCB, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0x66, 0xDA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9E, 0x47, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8A, 0xD5, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xA0, 0xAD, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0x3D, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6B, 0xB4, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8C, 0xBE, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x80, 0x8F, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x14, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x42, 0x5C, 0x00, 0x00, 0x00, 0x00, +0x00, 0x8E, 0x9E, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x60, 0x71, 0x80, 0x00, 0x00, 0x00, +0x00, 0x8F, 0xE1, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x90, 0x19, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0x90, 0x7E, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0x49, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x91, 0xB8, 0x3D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xE6, 0x70, 0x80, 0x00, 0x00, 0x00, +0x00, 0x92, 0x5E, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0x29, 0x70, 0x00, 0x00, 0x00, 0x00, +0x00, 0x93, 0x85, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBD, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x94, 0x3E, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, +0x00, 0x95, 0x5C, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8A, 0x85, 0x00, 0x00, 0x00, 0x00, +0x00, 0x96, 0x27, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x96, 0xE9, 0x34, 0x00, 0x00, 0x00, 0x00, +0x00, 0x97, 0x32, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x61, 0x2C, 0x80, 0x00, 0x00, 0x00, +0x00, 0x98, 0x07, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0x00, 0x66, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x37, 0xD4, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0xE7, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB2, 0x32, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9A, 0xD7, 0x0E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x05, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9B, 0xC6, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x92, 0x14, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9C, 0xA4, 0x7B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDB, 0xE8, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9D, 0xA6, 0xE1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x71, 0xF6, 0x80, 0x00, 0x00, 0x00, +0x00, 0x9E, 0x7B, 0x22, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x00, 0x9F, 0x86, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x7F, 0xFD, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA1, 0x6F, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x56, 0xA4, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA3, 0x4F, 0xC1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x24, 0x11, 0x80, 0x00, 0x00, 0x00, +0x00, 0xA5, 0x2F, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFA, 0xB9, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA7, 0x0F, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xDA, 0x9B, 0x00, 0x00, 0x00, 0x00, +0x00, 0xA8, 0xEF, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xBA, 0x7D, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAA, 0xD8, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x9A, 0x5F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAC, 0xB8, 0x66, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x7A, 0x41, 0x00, 0x00, 0x00, 0x00, +0x00, 0xAE, 0x98, 0x48, 0x70, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x5A, 0x23, 0x00, 0x00, 0x00, 0x00, +0x00, 0xB0, 0x78, 0x2A, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB1, 0x43, 0x3F, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB2, 0x58, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x23, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB4, 0x37, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB6, 0x21, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xE5, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB8, 0x00, 0xEC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0xC2, 0xC7, 0x80, 0x00, 0x00, 0x00, +0x00, 0xB9, 0xD7, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBA, 0xAB, 0xE4, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBB, 0xAE, 0x3B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x8B, 0xC6, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBD, 0x84, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x6B, 0xA8, 0x00, 0x00, 0x00, 0x00, +0x00, 0xBF, 0x52, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x4B, 0x8A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC1, 0x28, 0xF7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x57, 0x2A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC2, 0xFF, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC4, 0xCD, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x04, 0x79, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC6, 0xA3, 0xB3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD1, 0xE6, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC7, 0x09, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC7, 0xD4, 0x4C, 0x80, 0x00, 0x00, 0x00, +0x00, 0xC8, 0x71, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA8, 0x8E, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC8, 0xE9, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC9, 0xB4, 0x2E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0x47, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x7F, 0x35, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCA, 0xD2, 0x35, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCB, 0x94, 0x10, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0x1E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4C, 0xA2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCC, 0xB2, 0x17, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCD, 0x73, 0xF2, 0x80, 0x00, 0x00, 0x00, +0x00, 0xCD, 0xEB, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x23, 0x4A, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCE, 0x91, 0xF9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0x5D, 0x0F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xCF, 0xC2, 0x84, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF0, 0xB7, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD0, 0x71, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x3C, 0xF1, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD1, 0x99, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC7, 0x5E, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD2, 0x51, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x1C, 0xD3, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD3, 0x66, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x9E, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD4, 0x31, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD4, 0xFC, 0xB5, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD5, 0x3D, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x6B, 0x73, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD6, 0x1A, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD6, 0xDC, 0x97, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD7, 0x0A, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x42, 0x1A, 0x80, 0x00, 0x00, 0x00, +0x00, 0xD7, 0xFA, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xBC, 0x79, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD8, 0xE1, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x18, 0xC2, 0x00, 0x00, 0x00, 0x00, +0x00, 0xD9, 0xDA, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xA5, 0x95, 0x80, 0x00, 0x00, 0x00, +0x00, 0xDA, 0xB7, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE6, 0x2F, 0x00, 0x00, 0x00, 0x00, +0x00, 0xDB, 0xBA, 0x62, 0x70, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, @@ -43735,17 +44160,27 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, -0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, -0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, -0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, -0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, -0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, -0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, -0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, +0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, +0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, +0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, +0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x35, 0x30, 0x0A, 0x00, 0xB9, 0x71, 0xF5, +0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, +0x6B, /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45169,9 +45604,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x13, 0x43, 0x79, -0x70, 0x72, 0x75, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x34, 0x0A, 0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, +0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x79, 0x70, 0x72, 0x75, 0x73, /* Asia/Novokuznetsk */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46050,9 +46484,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x9A, 0xB0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, -0x36, 0x12, 0x00, 0x00, 0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, -0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, -0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73, +0x36, 0x12, 0x00, 0x00, 0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, +0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, +0x6C, 0x20, 0x49, 0x73, /* Asia/Taipei */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -46654,8 +47088,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x38, 0x3E, 0x2D, 0x38, 0x0A, 0x00, 0xD2, 0x71, -0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, -0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, +0x20, 0x4D, 0x6F, 0x6E, 0x67, 0x6F, 0x6C, 0x69, 0x61, /* Asia/Ulan_Bator */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -53257,7 +53691,7 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Egypt */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00, 0xC8, 0x93, 0xB4, 0xE0, 0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60, 0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, @@ -53289,95 +53723,123 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x46, 0x31, 0x20, 0xE0, 0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0, 0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0, 0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAC, 0x89, 0xD0, -0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x53, 0xDA, 0xBC, 0x60, 0x54, 0x24, 0x82, 0x50, 0x64, 0x4A, 0xF0, 0x60, 0x65, 0x3A, 0xD3, 0x50, +0x66, 0x2A, 0xD2, 0x60, 0x67, 0x23, 0xEF, 0xD0, 0x68, 0x0A, 0xB4, 0x60, 0x69, 0x03, 0xD1, 0xD0, +0x69, 0xEA, 0x96, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, 0x6B, 0xD3, 0xB2, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, +0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x93, 0x76, 0xE0, 0x70, 0x83, 0x59, 0xD0, +0x71, 0x73, 0x58, 0xE0, 0x72, 0x6C, 0x76, 0x50, 0x73, 0x53, 0x3A, 0xE0, 0x74, 0x4C, 0x58, 0x50, +0x75, 0x3C, 0x57, 0x60, 0x76, 0x2C, 0x3A, 0x50, 0x77, 0x1C, 0x39, 0x60, 0x78, 0x0C, 0x1C, 0x50, +0x78, 0xFC, 0x1B, 0x60, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xDB, 0xFD, 0x60, 0x7B, 0xCB, 0xE0, 0x50, +0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, 0x7E, 0x9B, 0xC1, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, +0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, +0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, +0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, +0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, +0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, +0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, +0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, +0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, +0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, +0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, +0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, +0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, +0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, +0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, +0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, +0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, +0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, +0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, +0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, +0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, +0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, +0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, +0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, +0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, +0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, +0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, +0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, +0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, +0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, +0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, +0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, +0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, +0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, +0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, +0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, +0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, +0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, +0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, +0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, +0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, +0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, +0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, +0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, +0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, +0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, +0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, +0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, +0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, +0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, +0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, +0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, +0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, +0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, +0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, +0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, +0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, +0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, +0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, +0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, +0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, +0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, +0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, +0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x4A, +0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x2A, +0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x23, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0A, +0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xEA, +0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xD3, +0xB2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xB3, +0x94, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x93, +0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x73, +0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6C, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x73, 0x53, +0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x3C, +0x57, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x77, 0x1C, +0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, +0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xDB, +0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xBB, +0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x9B, +0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, -0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, -0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, -0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, -0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, -0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, -0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, -0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, -0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, -0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, -0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, -0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, -0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, -0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, -0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, -0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, -0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, -0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, -0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, -0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, -0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, -0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, -0x54, 0x24, 0x82, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x45, 0x54, -0x2D, 0x32, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x35, 0x2E, +0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x0A, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Eire */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -55153,8 +55615,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, -0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, -0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x47, 0x65, +0x72, 0x6D, 0x61, 0x6E, 0x79, /* Europe/Bratislava */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -57798,8 +58260,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Kirov */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0x00, 0x39, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0x00, 0x39, 0x80, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -57819,57 +58281,60 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, +0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, -0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, -0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, -0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, -0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, -0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, -0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, -0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, -0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, -0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, -0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, -0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, -0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, -0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, -0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, -0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, -0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, -0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, -0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, -0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, -0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, -0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, -0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, -0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, -0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, -0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, -0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, -0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, -0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, -0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, -0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, -0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, -0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, -0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, -0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, -0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, +0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, +0x30, 0x34, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0x00, 0x39, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, -0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, -0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, -0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, -0x2D, 0x33, 0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, -0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x08, 0x07, 0x00, 0x00, 0x2E, 0x98, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, +0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, +0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, +0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, +0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x4D, 0x53, +0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, +0x0A, 0x00, 0xE2, 0xBE, 0xE0, 0x01, 0x5E, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, +0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x72, 0x6F, 0x76, /* Europe/Kyiv */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -58005,8 +58470,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, -0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61, 0x69, 0x6E, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, -0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x00, 0x00, 0x00, 0x0F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x55, 0x6B, 0x72, 0x61, +0x69, 0x6E, 0x65, /* Europe/Lisbon */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -62776,8 +63241,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { /* Europe/Volgograd */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0xA1, 0xF5, 0x46, 0xDC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xA1, 0xF5, 0x46, 0xDC, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, @@ -62797,58 +63262,61 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, -0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, -0x04, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, -0x08, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, -0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, -0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, -0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, -0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, -0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, -0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, -0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, -0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, -0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, -0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, -0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, -0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, -0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, +0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x4C, 0x4D, 0x54, +0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x4D, 0x53, 0x44, +0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x54, +0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, +0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, +0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, +0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, +0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, +0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, +0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, +0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, +0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, +0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, +0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, +0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, +0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, +0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, +0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, +0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, +0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, +0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, +0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, +0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, +0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, +0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, +0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, +0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, +0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, +0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, +0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, +0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, +0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, +0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, +0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, +0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, +0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, +0xE7, 0xB2, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, +0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, 0x07, 0x00, 0x00, -0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, -0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, -0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, -0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x3C, 0x2B, 0x30, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, -0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, -0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, +0x08, 0x07, 0x04, 0x07, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, +0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, +0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, +0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, +0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B, 0x30, 0x35, 0x00, +0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, +0xC2, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, +0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, /* Europe/Warsaw */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -65776,8 +66244,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, -0x18, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, -0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29, +0x13, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, +0x6C, 0x61, 0x6E, 0x64, /* Pacific/Bougainville */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66446,9 +66914,8 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x8C, 0xA0, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x31, 0x00, 0x2B, 0x30, 0x39, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x2B, 0x31, 0x32, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, 0xE3, 0x80, -0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, -0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, -0x29, +0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, 0x72, 0x73, +0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, /* Pacific/Marquesas */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -66683,9 +67150,9 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { 0x90, 0x01, 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x2B, 0x31, 0x30, 0x00, 0x0A, 0x3C, 0x2B, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50, -0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, -0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, -0x72, 0x65, 0x61, 0x73, 0x29, +0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x18, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6F, 0x66, 0x20, +0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, + /* Pacific/Rarotonga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -69532,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[699143] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2022.7", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From d8544926550433639daff9d0f8f353ddae282453 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 23 Mar 2023 11:23:17 +0100 Subject: [PATCH 685/895] [skip ci] Fix var_dump statement in run-tests.php --- run-tests.php | 1 - 1 file changed, 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index d6436df7e6fad..fec58499f6148 100755 --- a/run-tests.php +++ b/run-tests.php @@ -4141,7 +4141,6 @@ public function getDiff(array $diffs): string } // Found no more differenciating rows, we're done if ($next === count($diffs)) { - var_dump($i, count($diffs)); if (($i - 1) < count($diffs)) { fwrite($buffer, "--\n"); } From cbac68df6b666c761e2f40185408d271173fe9fe Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 23 Mar 2023 11:46:31 +0000 Subject: [PATCH 686/895] Fix GH-10583: DateTime modify with tz pattern should not update linked timezone --- NEWS | 4 ++++ ext/date/php_date.c | 10 ++++++++-- ext/date/tests/gh10583.phpt | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ext/date/tests/gh10583.phpt diff --git a/NEWS b/NEWS index cfc752ccf2119..244c2df19cd33 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,10 @@ PHP NEWS . Fixed bug GH-10810 (Fix NUL byte terminating Exception::__toString()). (ilutov) +- Date: + . Fixed bug GH-10583 (DateTime modify with tz pattern should not update + linked timezone). (Derick) + - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) . Destroy file_handle in fpm_main. (Jakub Zelenka, nielsdos) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index fec7d5d03cd63..a0625c96c9826 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2897,8 +2897,14 @@ static int php_date_modify(zval *object, char *modify, size_t modify_len) /* {{{ dateobj->time->us = tmp_time->us; } - if (tmp_time->have_zone && tmp_time->zone_type == TIMELIB_ZONETYPE_OFFSET) { - timelib_set_timezone_from_offset(dateobj->time, tmp_time->z); + /* Reset timezone to UTC if we detect a "@" modification */ + if ( + tmp_time->y == 1970 && tmp_time->m == 1 && tmp_time->d == 1 && + tmp_time->h == 0 && tmp_time->i == 0 && tmp_time->s == 0 && tmp_time->us == 0 && + tmp_time->have_zone && tmp_time->zone_type == TIMELIB_ZONETYPE_OFFSET && + tmp_time->z == 0 && tmp_time->dst == 0 + ) { + timelib_set_timezone_from_offset(dateobj->time, 0); } timelib_time_dtor(tmp_time); diff --git a/ext/date/tests/gh10583.phpt b/ext/date/tests/gh10583.phpt new file mode 100644 index 0000000000000..a63df36069d5c --- /dev/null +++ b/ext/date/tests/gh10583.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug GH-10583 (DateTime modify with tz pattern should not update linked timezone) +--FILE-- +format('c')); +var_dump($dt->modify('+1 s')->format('c')); + +$dt = new DateTimeImmutable('2015-01-01 00:00:00+00:00'); +var_dump($dt->format('c')); +var_dump($dt->modify('+1 s')->format('c')); +?> +--EXPECT-- +string(25) "2015-01-01T00:00:00+00:00" +string(25) "2015-01-01T00:00:00+00:00" +string(25) "2015-01-01T00:00:00+00:00" +string(25) "2015-01-01T00:00:00+00:00" From 54f92fc333406e4aa2b1ae845b5b24ccc980b314 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Thu, 23 Mar 2023 13:43:58 +0000 Subject: [PATCH 687/895] ext/pdo_sqlite: simplifying sqlite3_exec usage. (#10910) pdo_sqlite_error copy the error message via the php's allocator, while the one from sqlite3_exec is unused. --- ext/pdo_sqlite/sqlite_driver.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index de5170a35a96b..f83ce43a3ce8b 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -203,13 +203,9 @@ static bool sqlite_handle_preparer(pdo_dbh_t *dbh, zend_string *sql, pdo_stmt_t static zend_long sqlite_handle_doer(pdo_dbh_t *dbh, const zend_string *sql) { pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; - char *errmsg = NULL; - if (sqlite3_exec(H->db, ZSTR_VAL(sql), NULL, NULL, &errmsg) != SQLITE_OK) { + if (sqlite3_exec(H->db, ZSTR_VAL(sql), NULL, NULL, NULL) != SQLITE_OK) { pdo_sqlite_error(dbh); - if (errmsg) - sqlite3_free(errmsg); - return -1; } else { return sqlite3_changes(H->db); @@ -241,12 +237,9 @@ static zend_string* sqlite_handle_quoter(pdo_dbh_t *dbh, const zend_string *unqu static bool sqlite_handle_begin(pdo_dbh_t *dbh) { pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; - char *errmsg = NULL; - if (sqlite3_exec(H->db, "BEGIN", NULL, NULL, &errmsg) != SQLITE_OK) { + if (sqlite3_exec(H->db, "BEGIN", NULL, NULL, NULL) != SQLITE_OK) { pdo_sqlite_error(dbh); - if (errmsg) - sqlite3_free(errmsg); return false; } return true; @@ -255,12 +248,9 @@ static bool sqlite_handle_begin(pdo_dbh_t *dbh) static bool sqlite_handle_commit(pdo_dbh_t *dbh) { pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; - char *errmsg = NULL; - if (sqlite3_exec(H->db, "COMMIT", NULL, NULL, &errmsg) != SQLITE_OK) { + if (sqlite3_exec(H->db, "COMMIT", NULL, NULL, NULL) != SQLITE_OK) { pdo_sqlite_error(dbh); - if (errmsg) - sqlite3_free(errmsg); return false; } return true; @@ -269,12 +259,9 @@ static bool sqlite_handle_commit(pdo_dbh_t *dbh) static bool sqlite_handle_rollback(pdo_dbh_t *dbh) { pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; - char *errmsg = NULL; - if (sqlite3_exec(H->db, "ROLLBACK", NULL, NULL, &errmsg) != SQLITE_OK) { + if (sqlite3_exec(H->db, "ROLLBACK", NULL, NULL, NULL) != SQLITE_OK) { pdo_sqlite_error(dbh); - if (errmsg) - sqlite3_free(errmsg); return false; } return true; From c58c2666a1a405b22ac7de22cd912a7ef2d6a6a6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 23 Mar 2023 16:04:17 +0100 Subject: [PATCH 688/895] Fix direct comparison in run-tests.php differ --- run-tests.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests.php b/run-tests.php index fec58499f6148..9a8b03a423908 100755 --- a/run-tests.php +++ b/run-tests.php @@ -3982,11 +3982,11 @@ public function diffToArray(array $from, array $to): array reset($to); foreach ($common as $token) { - while (($fromToken = reset($from)) !== $token) { + while (!($this->isEqual)($fromToken = reset($from), $token)) { $diff[] = [array_shift($from), self::REMOVED, $fromLine++]; } - while (($toToken = reset($to)) !== $token) { + while (!($this->isEqual)($toToken = reset($to), $token)) { $diff[] = [array_shift($to), self::ADDED, $toLine++]; } @@ -4041,7 +4041,7 @@ private function getArrayDiffParted(array &$from, array &$to): array $fromK = key($from); $toK = key($to); - if (null === $fromK || null === $toK || current($from) !== current($to)) { + if (null === $fromK || null === $toK || !($this->isEqual)(current($from), current($to))) { break; } From 90f5b2b4ffc8d1bf97bf6cb58abd95192e16d0bd Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Mar 2023 10:10:17 +0000 Subject: [PATCH 689/895] Updated to version 2023.2 (2023b) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++++------------------ 1 file changed, 390 insertions(+), 362 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 4219b12911224..89c62a6d4926d 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024915 }, - { (char*) "Asia/Brunei" , 0x024B8B }, - { (char*) "Asia/Calcutta" , 0x024C31 }, - { (char*) "Asia/Chita" , 0x024D19 }, - { (char*) "Asia/Choibalsan" , 0x025027 }, - { (char*) "Asia/Chongqing" , 0x0252B0 }, - { (char*) "Asia/Chungking" , 0x025445 }, - { (char*) "Asia/Colombo" , 0x0255DA }, - { (char*) "Asia/Dacca" , 0x0256DD }, - { (char*) "Asia/Damascus" , 0x0257D0 }, - { (char*) "Asia/Dhaka" , 0x025CAE }, - { (char*) "Asia/Dili" , 0x025DA1 }, - { (char*) "Asia/Dubai" , 0x025E57 }, - { (char*) "Asia/Dushanbe" , 0x025EE8 }, - { (char*) "Asia/Famagusta" , 0x026062 }, - { (char*) "Asia/Gaza" , 0x026429 }, - { (char*) "Asia/Harbin" , 0x026E15 }, - { (char*) "Asia/Hebron" , 0x026FAA }, - { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, - { (char*) "Asia/Hong_Kong" , 0x027A9F }, - { (char*) "Asia/Hovd" , 0x027DB2 }, - { (char*) "Asia/Irkutsk" , 0x02803B }, - { (char*) "Asia/Istanbul" , 0x028359 }, - { (char*) "Asia/Jakarta" , 0x028815 }, - { (char*) "Asia/Jayapura" , 0x028926 }, - { (char*) "Asia/Jerusalem" , 0x028A13 }, - { (char*) "Asia/Kabul" , 0x028E51 }, - { (char*) "Asia/Kamchatka" , 0x028EFC }, - { (char*) "Asia/Karachi" , 0x0291F1 }, - { (char*) "Asia/Kashgar" , 0x029307 }, - { (char*) "Asia/Kathmandu" , 0x029398 }, - { (char*) "Asia/Katmandu" , 0x029445 }, - { (char*) "Asia/Khandyga" , 0x0294F2 }, - { (char*) "Asia/Kolkata" , 0x029823 }, - { (char*) "Asia/Krasnoyarsk" , 0x02990B }, - { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, - { (char*) "Asia/Kuching" , 0x029D35 }, - { (char*) "Asia/Kuwait" , 0x029E8F }, - { (char*) "Asia/Macao" , 0x029F20 }, - { (char*) "Asia/Macau" , 0x02A243 }, - { (char*) "Asia/Magadan" , 0x02A566 }, - { (char*) "Asia/Makassar" , 0x02A871 }, - { (char*) "Asia/Manila" , 0x02A984 }, - { (char*) "Asia/Muscat" , 0x02AA7E }, - { (char*) "Asia/Nicosia" , 0x02AB0F }, - { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, - { (char*) "Asia/Novosibirsk" , 0x02B071 }, - { (char*) "Asia/Omsk" , 0x02B382 }, - { (char*) "Asia/Oral" , 0x02B680 }, - { (char*) "Asia/Phnom_Penh" , 0x02B90C }, - { (char*) "Asia/Pontianak" , 0x02B9E0 }, - { (char*) "Asia/Pyongyang" , 0x02BAF9 }, - { (char*) "Asia/Qatar" , 0x02BBBC }, - { (char*) "Asia/Qostanay" , 0x02BC60 }, - { (char*) "Asia/Qyzylorda" , 0x02BEED }, - { (char*) "Asia/Rangoon" , 0x02C186 }, - { (char*) "Asia/Riyadh" , 0x02C24D }, - { (char*) "Asia/Saigon" , 0x02C2DE }, - { (char*) "Asia/Sakhalin" , 0x02C3D6 }, - { (char*) "Asia/Samarkand" , 0x02C6ED }, - { (char*) "Asia/Seoul" , 0x02C878 }, - { (char*) "Asia/Shanghai" , 0x02CA23 }, - { (char*) "Asia/Singapore" , 0x02CBC4 }, - { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, - { (char*) "Asia/Taipei" , 0x02CFE0 }, - { (char*) "Asia/Tashkent" , 0x02D1EB }, - { (char*) "Asia/Tbilisi" , 0x02D376 }, - { (char*) "Asia/Tehran" , 0x02D5F7 }, - { (char*) "Asia/Tel_Aviv" , 0x02D92F }, - { (char*) "Asia/Thimbu" , 0x02DD6D }, - { (char*) "Asia/Thimphu" , 0x02DE13 }, - { (char*) "Asia/Tokyo" , 0x02DEB9 }, - { (char*) "Asia/Tomsk" , 0x02DF9A }, - { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, - { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, - { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, - { (char*) "Asia/Urumqi" , 0x02E83B }, - { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, - { (char*) "Asia/Vientiane" , 0x02EBFC }, - { (char*) "Asia/Vladivostok" , 0x02ECE2 }, - { (char*) "Asia/Yakutsk" , 0x02EFE7 }, - { (char*) "Asia/Yangon" , 0x02F2EB }, - { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, - { (char*) "Asia/Yerevan" , 0x02F6C4 }, - { (char*) "Atlantic/Azores" , 0x02F994 }, - { (char*) "Atlantic/Bermuda" , 0x02FF53 }, - { (char*) "Atlantic/Canary" , 0x03035F }, - { (char*) "Atlantic/Cape_Verde" , 0x030557 }, - { (char*) "Atlantic/Faeroe" , 0x030612 }, - { (char*) "Atlantic/Faroe" , 0x0307D7 }, - { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, - { (char*) "Atlantic/Madeira" , 0x030C69 }, - { (char*) "Atlantic/Reykjavik" , 0x031231 }, - { (char*) "Atlantic/South_Georgia" , 0x03152E }, - { (char*) "Atlantic/St_Helena" , 0x0315BE }, - { (char*) "Atlantic/Stanley" , 0x03165F }, - { (char*) "Australia/ACT" , 0x031980 }, - { (char*) "Australia/Adelaide" , 0x031D14 }, - { (char*) "Australia/Brisbane" , 0x0320C8 }, - { (char*) "Australia/Broken_Hill" , 0x03220C }, - { (char*) "Australia/Canberra" , 0x0325E1 }, - { (char*) "Australia/Currie" , 0x032975 }, - { (char*) "Australia/Darwin" , 0x032D6C }, - { (char*) "Australia/Eucla" , 0x032E74 }, - { (char*) "Australia/Hobart" , 0x032FD3 }, - { (char*) "Australia/LHI" , 0x0333D2 }, - { (char*) "Australia/Lindeman" , 0x033692 }, - { (char*) "Australia/Lord_Howe" , 0x033802 }, - { (char*) "Australia/Melbourne" , 0x033AD2 }, - { (char*) "Australia/North" , 0x033E6E }, - { (char*) "Australia/NSW" , 0x033F64 }, - { (char*) "Australia/Perth" , 0x0342F8 }, - { (char*) "Australia/Queensland" , 0x034454 }, - { (char*) "Australia/South" , 0x034581 }, - { (char*) "Australia/Sydney" , 0x034926 }, - { (char*) "Australia/Tasmania" , 0x034CD6 }, - { (char*) "Australia/Victoria" , 0x0350CD }, - { (char*) "Australia/West" , 0x035461 }, - { (char*) "Australia/Yancowinna" , 0x03559F }, - { (char*) "Brazil/Acre" , 0x035958 }, - { (char*) "Brazil/DeNoronha" , 0x035B06 }, - { (char*) "Brazil/East" , 0x035CF6 }, - { (char*) "Brazil/West" , 0x0360BA }, - { (char*) "Canada/Atlantic" , 0x036262 }, - { (char*) "Canada/Central" , 0x0368F6 }, - { (char*) "Canada/Eastern" , 0x036E10 }, - { (char*) "Canada/Mountain" , 0x0374D1 }, - { (char*) "Canada/Newfoundland" , 0x0378A7 }, - { (char*) "Canada/Pacific" , 0x038009 }, - { (char*) "Canada/Saskatchewan" , 0x038547 }, - { (char*) "Canada/Yukon" , 0x0387D1 }, - { (char*) "CET" , 0x038BE2 }, - { (char*) "Chile/Continental" , 0x038E5B }, - { (char*) "Chile/EasterIsland" , 0x0393B1 }, - { (char*) "CST6CDT" , 0x039853 }, - { (char*) "Cuba" , 0x039C16 }, - { (char*) "EET" , 0x03A07F }, - { (char*) "Egypt" , 0x03A27C }, - { (char*) "Eire" , 0x03A7A5 }, - { (char*) "EST" , 0x03AD89 }, - { (char*) "EST5EDT" , 0x03AE04 }, - { (char*) "Etc/GMT" , 0x03B1C7 }, - { (char*) "Etc/GMT+0" , 0x03B242 }, - { (char*) "Etc/GMT+1" , 0x03B2BD }, - { (char*) "Etc/GMT+10" , 0x03B33A }, - { (char*) "Etc/GMT+11" , 0x03B3B8 }, - { (char*) "Etc/GMT+12" , 0x03B436 }, - { (char*) "Etc/GMT+2" , 0x03B4B4 }, - { (char*) "Etc/GMT+3" , 0x03B531 }, - { (char*) "Etc/GMT+4" , 0x03B5AE }, - { (char*) "Etc/GMT+5" , 0x03B62B }, - { (char*) "Etc/GMT+6" , 0x03B6A8 }, - { (char*) "Etc/GMT+7" , 0x03B725 }, - { (char*) "Etc/GMT+8" , 0x03B7A2 }, - { (char*) "Etc/GMT+9" , 0x03B81F }, - { (char*) "Etc/GMT-0" , 0x03B89C }, - { (char*) "Etc/GMT-1" , 0x03B917 }, - { (char*) "Etc/GMT-10" , 0x03B995 }, - { (char*) "Etc/GMT-11" , 0x03BA14 }, - { (char*) "Etc/GMT-12" , 0x03BA93 }, - { (char*) "Etc/GMT-13" , 0x03BB12 }, - { (char*) "Etc/GMT-14" , 0x03BB91 }, - { (char*) "Etc/GMT-2" , 0x03BC10 }, - { (char*) "Etc/GMT-3" , 0x03BC8E }, - { (char*) "Etc/GMT-4" , 0x03BD0C }, - { (char*) "Etc/GMT-5" , 0x03BD8A }, - { (char*) "Etc/GMT-6" , 0x03BE08 }, - { (char*) "Etc/GMT-7" , 0x03BE86 }, - { (char*) "Etc/GMT-8" , 0x03BF04 }, - { (char*) "Etc/GMT-9" , 0x03BF82 }, - { (char*) "Etc/GMT0" , 0x03C000 }, - { (char*) "Etc/Greenwich" , 0x03C07B }, - { (char*) "Etc/UCT" , 0x03C0F6 }, - { (char*) "Etc/Universal" , 0x03C171 }, - { (char*) "Etc/UTC" , 0x03C1EC }, - { (char*) "Etc/Zulu" , 0x03C267 }, - { (char*) "Europe/Amsterdam" , 0x03C2E2 }, - { (char*) "Europe/Andorra" , 0x03C71D }, - { (char*) "Europe/Astrakhan" , 0x03C8AE }, - { (char*) "Europe/Athens" , 0x03CBA2 }, - { (char*) "Europe/Belfast" , 0x03CE58 }, - { (char*) "Europe/Belgrade" , 0x03D4A3 }, - { (char*) "Europe/Berlin" , 0x03D68D }, - { (char*) "Europe/Bratislava" , 0x03D969 }, - { (char*) "Europe/Brussels" , 0x03DC48 }, - { (char*) "Europe/Bucharest" , 0x03E0A3 }, - { (char*) "Europe/Budapest" , 0x03E344 }, - { (char*) "Europe/Busingen" , 0x03E64E }, - { (char*) "Europe/Chisinau" , 0x03E853 }, - { (char*) "Europe/Copenhagen" , 0x03EB52 }, - { (char*) "Europe/Dublin" , 0x03EDCD }, - { (char*) "Europe/Gibraltar" , 0x03F3B1 }, - { (char*) "Europe/Guernsey" , 0x03F881 }, - { (char*) "Europe/Helsinki" , 0x03FED8 }, - { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, - { (char*) "Europe/Istanbul" , 0x040710 }, - { (char*) "Europe/Jersey" , 0x040BCC }, - { (char*) "Europe/Kaliningrad" , 0x041223 }, - { (char*) "Europe/Kiev" , 0x0415CB }, - { (char*) "Europe/Kirov" , 0x041805 }, - { (char*) "Europe/Kyiv" , 0x041AFE }, - { (char*) "Europe/Lisbon" , 0x041D47 }, - { (char*) "Europe/Ljubljana" , 0x042314 }, - { (char*) "Europe/London" , 0x0424FE }, - { (char*) "Europe/Luxembourg" , 0x042B49 }, - { (char*) "Europe/Madrid" , 0x042F94 }, - { (char*) "Europe/Malta" , 0x043331 }, - { (char*) "Europe/Mariehamn" , 0x0436DD }, - { (char*) "Europe/Minsk" , 0x0438CA }, - { (char*) "Europe/Monaco" , 0x043BFE }, - { (char*) "Europe/Moscow" , 0x044064 }, - { (char*) "Europe/Nicosia" , 0x044410 }, - { (char*) "Europe/Oslo" , 0x044671 }, - { (char*) "Europe/Paris" , 0x044921 }, - { (char*) "Europe/Podgorica" , 0x044D7E }, - { (char*) "Europe/Prague" , 0x044F68 }, - { (char*) "Europe/Riga" , 0x045247 }, - { (char*) "Europe/Rome" , 0x045509 }, - { (char*) "Europe/Samara" , 0x0458C8 }, - { (char*) "Europe/San_Marino" , 0x045BC9 }, - { (char*) "Europe/Sarajevo" , 0x045F88 }, - { (char*) "Europe/Saratov" , 0x046172 }, - { (char*) "Europe/Simferopol" , 0x046464 }, - { (char*) "Europe/Skopje" , 0x0467D7 }, - { (char*) "Europe/Sofia" , 0x0469C1 }, - { (char*) "Europe/Stockholm" , 0x046C1D }, - { (char*) "Europe/Tallinn" , 0x046E1A }, - { (char*) "Europe/Tirane" , 0x0470C9 }, - { (char*) "Europe/Tiraspol" , 0x047331 }, - { (char*) "Europe/Ulyanovsk" , 0x047630 }, - { (char*) "Europe/Uzhgorod" , 0x047946 }, - { (char*) "Europe/Vaduz" , 0x047B80 }, - { (char*) "Europe/Vatican" , 0x047D6A }, - { (char*) "Europe/Vienna" , 0x048129 }, - { (char*) "Europe/Vilnius" , 0x0483C7 }, - { (char*) "Europe/Volgograd" , 0x048677 }, - { (char*) "Europe/Warsaw" , 0x048986 }, - { (char*) "Europe/Zagreb" , 0x048D2D }, - { (char*) "Europe/Zaporozhye" , 0x048F17 }, - { (char*) "Europe/Zurich" , 0x049151 }, - { (char*) "Factory" , 0x04934E }, - { (char*) "GB" , 0x0493CB }, - { (char*) "GB-Eire" , 0x049A16 }, - { (char*) "GMT" , 0x04A061 }, - { (char*) "GMT+0" , 0x04A0DC }, - { (char*) "GMT-0" , 0x04A157 }, - { (char*) "GMT0" , 0x04A1D2 }, - { (char*) "Greenwich" , 0x04A24D }, - { (char*) "Hongkong" , 0x04A2C8 }, - { (char*) "HST" , 0x04A5DB }, - { (char*) "Iceland" , 0x04A657 }, - { (char*) "Indian/Antananarivo" , 0x04A6E5 }, - { (char*) "Indian/Chagos" , 0x04A791 }, - { (char*) "Indian/Christmas" , 0x04A835 }, - { (char*) "Indian/Cocos" , 0x04A8C6 }, - { (char*) "Indian/Comoro" , 0x04A95E }, - { (char*) "Indian/Kerguelen" , 0x04A9ED }, - { (char*) "Indian/Mahe" , 0x04AA7E }, - { (char*) "Indian/Maldives" , 0x04AB0F }, - { (char*) "Indian/Mauritius" , 0x04ABB3 }, - { (char*) "Indian/Mayotte" , 0x04AC72 }, - { (char*) "Indian/Reunion" , 0x04AD01 }, - { (char*) "Iran" , 0x04AD92 }, - { (char*) "Israel" , 0x04B0CA }, - { (char*) "Jamaica" , 0x04B508 }, - { (char*) "Japan" , 0x04B667 }, - { (char*) "Kwajalein" , 0x04B748 }, - { (char*) "Libya" , 0x04B82F }, - { (char*) "MET" , 0x04B9EA }, - { (char*) "Mexico/BajaNorte" , 0x04BC63 }, - { (char*) "Mexico/BajaSur" , 0x04C070 }, - { (char*) "Mexico/General" , 0x04C34A }, - { (char*) "MST" , 0x04C65B }, - { (char*) "MST7MDT" , 0x04C6D6 }, - { (char*) "Navajo" , 0x04CA99 }, - { (char*) "NZ" , 0x04CEB7 }, - { (char*) "NZ-CHAT" , 0x04D2D6 }, - { (char*) "Pacific/Apia" , 0x04D60A }, - { (char*) "Pacific/Auckland" , 0x04D7AD }, - { (char*) "Pacific/Bougainville" , 0x04DBDF }, - { (char*) "Pacific/Chatham" , 0x04DCC0 }, - { (char*) "Pacific/Chuuk" , 0x04E003 }, - { (char*) "Pacific/Easter" , 0x04E0E1 }, - { (char*) "Pacific/Efate" , 0x04E590 }, - { (char*) "Pacific/Enderbury" , 0x04E6F2 }, - { (char*) "Pacific/Fakaofo" , 0x04E7AA }, - { (char*) "Pacific/Fiji" , 0x04E84F }, - { (char*) "Pacific/Funafuti" , 0x04E9E7 }, - { (char*) "Pacific/Galapagos" , 0x04EA79 }, - { (char*) "Pacific/Gambier" , 0x04EB45 }, - { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, - { (char*) "Pacific/Guam" , 0x04EC76 }, - { (char*) "Pacific/Honolulu" , 0x04EDE0 }, - { (char*) "Pacific/Johnston" , 0x04EECF }, - { (char*) "Pacific/Kanton" , 0x04EFB8 }, - { (char*) "Pacific/Kiritimati" , 0x04F07F }, - { (char*) "Pacific/Kosrae" , 0x04F145 }, - { (char*) "Pacific/Kwajalein" , 0x04F249 }, - { (char*) "Pacific/Majuro" , 0x04F339 }, - { (char*) "Pacific/Marquesas" , 0x04F437 }, - { (char*) "Pacific/Midway" , 0x04F4DF }, - { (char*) "Pacific/Nauru" , 0x04F5A2 }, - { (char*) "Pacific/Niue" , 0x04F665 }, - { (char*) "Pacific/Norfolk" , 0x04F70B }, - { (char*) "Pacific/Noumea" , 0x04F80E }, - { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, - { (char*) "Pacific/Palau" , 0x04F97E }, - { (char*) "Pacific/Pitcairn" , 0x04FA1E }, - { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, - { (char*) "Pacific/Ponape" , 0x04FBB3 }, - { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, - { (char*) "Pacific/Rarotonga" , 0x04FD03 }, - { (char*) "Pacific/Saipan" , 0x04FEA5 }, - { (char*) "Pacific/Samoa" , 0x050006 }, - { (char*) "Pacific/Tahiti" , 0x0500A4 }, - { (char*) "Pacific/Tarawa" , 0x050144 }, - { (char*) "Pacific/Tongatapu" , 0x0501E5 }, - { (char*) "Pacific/Truk" , 0x0502DE }, - { (char*) "Pacific/Wake" , 0x050384 }, - { (char*) "Pacific/Wallis" , 0x050421 }, - { (char*) "Pacific/Yap" , 0x0504B3 }, - { (char*) "Poland" , 0x050559 }, - { (char*) "Portugal" , 0x050900 }, - { (char*) "PRC" , 0x050EBA }, - { (char*) "PST8PDT" , 0x05104F }, - { (char*) "ROC" , 0x051412 }, - { (char*) "ROK" , 0x05161D }, - { (char*) "Singapore" , 0x0517C8 }, - { (char*) "Turkey" , 0x0518D4 }, - { (char*) "UCT" , 0x051D90 }, - { (char*) "Universal" , 0x051E0B }, - { (char*) "US/Alaska" , 0x051E86 }, - { (char*) "US/Aleutian" , 0x052263 }, - { (char*) "US/Arizona" , 0x052638 }, - { (char*) "US/Central" , 0x052734 }, - { (char*) "US/East-Indiana" , 0x052E1A }, - { (char*) "US/Eastern" , 0x053039 }, - { (char*) "US/Hawaii" , 0x053715 }, - { (char*) "US/Indiana-Starke" , 0x0537FE }, - { (char*) "US/Michigan" , 0x053C02 }, - { (char*) "US/Mountain" , 0x053F91 }, - { (char*) "US/Pacific" , 0x0543AF }, - { (char*) "US/Samoa" , 0x0548C9 }, - { (char*) "UTC" , 0x054967 }, - { (char*) "W-SU" , 0x0549E2 }, - { (char*) "WET" , 0x054D7A }, - { (char*) "Zulu" , 0x054F74 }, + { (char*) "Asia/Bishkek" , 0x024ACE }, + { (char*) "Asia/Brunei" , 0x024D44 }, + { (char*) "Asia/Calcutta" , 0x024DEA }, + { (char*) "Asia/Chita" , 0x024ED2 }, + { (char*) "Asia/Choibalsan" , 0x0251E0 }, + { (char*) "Asia/Chongqing" , 0x025469 }, + { (char*) "Asia/Chungking" , 0x0255FE }, + { (char*) "Asia/Colombo" , 0x025793 }, + { (char*) "Asia/Dacca" , 0x025896 }, + { (char*) "Asia/Damascus" , 0x025989 }, + { (char*) "Asia/Dhaka" , 0x025E67 }, + { (char*) "Asia/Dili" , 0x025F5A }, + { (char*) "Asia/Dubai" , 0x026010 }, + { (char*) "Asia/Dushanbe" , 0x0260A1 }, + { (char*) "Asia/Famagusta" , 0x02621B }, + { (char*) "Asia/Gaza" , 0x0265E2 }, + { (char*) "Asia/Harbin" , 0x026FCE }, + { (char*) "Asia/Hebron" , 0x027163 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, + { (char*) "Asia/Hong_Kong" , 0x027C58 }, + { (char*) "Asia/Hovd" , 0x027F6B }, + { (char*) "Asia/Irkutsk" , 0x0281F4 }, + { (char*) "Asia/Istanbul" , 0x028512 }, + { (char*) "Asia/Jakarta" , 0x0289CE }, + { (char*) "Asia/Jayapura" , 0x028ADF }, + { (char*) "Asia/Jerusalem" , 0x028BCC }, + { (char*) "Asia/Kabul" , 0x02900A }, + { (char*) "Asia/Kamchatka" , 0x0290B5 }, + { (char*) "Asia/Karachi" , 0x0293AA }, + { (char*) "Asia/Kashgar" , 0x0294C0 }, + { (char*) "Asia/Kathmandu" , 0x029551 }, + { (char*) "Asia/Katmandu" , 0x0295FE }, + { (char*) "Asia/Khandyga" , 0x0296AB }, + { (char*) "Asia/Kolkata" , 0x0299DC }, + { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, + { (char*) "Asia/Kuching" , 0x029EEE }, + { (char*) "Asia/Kuwait" , 0x02A048 }, + { (char*) "Asia/Macao" , 0x02A0D9 }, + { (char*) "Asia/Macau" , 0x02A3FC }, + { (char*) "Asia/Magadan" , 0x02A71F }, + { (char*) "Asia/Makassar" , 0x02AA2A }, + { (char*) "Asia/Manila" , 0x02AB3D }, + { (char*) "Asia/Muscat" , 0x02AC37 }, + { (char*) "Asia/Nicosia" , 0x02ACC8 }, + { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, + { (char*) "Asia/Novosibirsk" , 0x02B22A }, + { (char*) "Asia/Omsk" , 0x02B53B }, + { (char*) "Asia/Oral" , 0x02B839 }, + { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, + { (char*) "Asia/Pontianak" , 0x02BB99 }, + { (char*) "Asia/Pyongyang" , 0x02BCB2 }, + { (char*) "Asia/Qatar" , 0x02BD75 }, + { (char*) "Asia/Qostanay" , 0x02BE19 }, + { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, + { (char*) "Asia/Rangoon" , 0x02C33F }, + { (char*) "Asia/Riyadh" , 0x02C406 }, + { (char*) "Asia/Saigon" , 0x02C497 }, + { (char*) "Asia/Sakhalin" , 0x02C58F }, + { (char*) "Asia/Samarkand" , 0x02C8A6 }, + { (char*) "Asia/Seoul" , 0x02CA31 }, + { (char*) "Asia/Shanghai" , 0x02CBDC }, + { (char*) "Asia/Singapore" , 0x02CD7D }, + { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, + { (char*) "Asia/Taipei" , 0x02D199 }, + { (char*) "Asia/Tashkent" , 0x02D3A4 }, + { (char*) "Asia/Tbilisi" , 0x02D52F }, + { (char*) "Asia/Tehran" , 0x02D7B0 }, + { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, + { (char*) "Asia/Thimbu" , 0x02DF26 }, + { (char*) "Asia/Thimphu" , 0x02DFCC }, + { (char*) "Asia/Tokyo" , 0x02E072 }, + { (char*) "Asia/Tomsk" , 0x02E153 }, + { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, + { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, + { (char*) "Asia/Ulan_Bator" , 0x02E796 }, + { (char*) "Asia/Urumqi" , 0x02E9F4 }, + { (char*) "Asia/Ust-Nera" , 0x02EA92 }, + { (char*) "Asia/Vientiane" , 0x02EDB5 }, + { (char*) "Asia/Vladivostok" , 0x02EE9B }, + { (char*) "Asia/Yakutsk" , 0x02F1A0 }, + { (char*) "Asia/Yangon" , 0x02F4A4 }, + { (char*) "Asia/Yekaterinburg" , 0x02F56B }, + { (char*) "Asia/Yerevan" , 0x02F87D }, + { (char*) "Atlantic/Azores" , 0x02FB4D }, + { (char*) "Atlantic/Bermuda" , 0x03010C }, + { (char*) "Atlantic/Canary" , 0x030518 }, + { (char*) "Atlantic/Cape_Verde" , 0x030710 }, + { (char*) "Atlantic/Faeroe" , 0x0307CB }, + { (char*) "Atlantic/Faroe" , 0x030990 }, + { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, + { (char*) "Atlantic/Madeira" , 0x030E22 }, + { (char*) "Atlantic/Reykjavik" , 0x0313EA }, + { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, + { (char*) "Atlantic/St_Helena" , 0x031777 }, + { (char*) "Atlantic/Stanley" , 0x031818 }, + { (char*) "Australia/ACT" , 0x031B39 }, + { (char*) "Australia/Adelaide" , 0x031ECD }, + { (char*) "Australia/Brisbane" , 0x032281 }, + { (char*) "Australia/Broken_Hill" , 0x0323C5 }, + { (char*) "Australia/Canberra" , 0x03279A }, + { (char*) "Australia/Currie" , 0x032B2E }, + { (char*) "Australia/Darwin" , 0x032F25 }, + { (char*) "Australia/Eucla" , 0x03302D }, + { (char*) "Australia/Hobart" , 0x03318C }, + { (char*) "Australia/LHI" , 0x03358B }, + { (char*) "Australia/Lindeman" , 0x03384B }, + { (char*) "Australia/Lord_Howe" , 0x0339BB }, + { (char*) "Australia/Melbourne" , 0x033C8B }, + { (char*) "Australia/North" , 0x034027 }, + { (char*) "Australia/NSW" , 0x03411D }, + { (char*) "Australia/Perth" , 0x0344B1 }, + { (char*) "Australia/Queensland" , 0x03460D }, + { (char*) "Australia/South" , 0x03473A }, + { (char*) "Australia/Sydney" , 0x034ADF }, + { (char*) "Australia/Tasmania" , 0x034E8F }, + { (char*) "Australia/Victoria" , 0x035286 }, + { (char*) "Australia/West" , 0x03561A }, + { (char*) "Australia/Yancowinna" , 0x035758 }, + { (char*) "Brazil/Acre" , 0x035B11 }, + { (char*) "Brazil/DeNoronha" , 0x035CBF }, + { (char*) "Brazil/East" , 0x035EAF }, + { (char*) "Brazil/West" , 0x036273 }, + { (char*) "Canada/Atlantic" , 0x03641B }, + { (char*) "Canada/Central" , 0x036AAF }, + { (char*) "Canada/Eastern" , 0x036FC9 }, + { (char*) "Canada/Mountain" , 0x03768A }, + { (char*) "Canada/Newfoundland" , 0x037A60 }, + { (char*) "Canada/Pacific" , 0x0381C2 }, + { (char*) "Canada/Saskatchewan" , 0x038700 }, + { (char*) "Canada/Yukon" , 0x03898A }, + { (char*) "CET" , 0x038D9B }, + { (char*) "Chile/Continental" , 0x039014 }, + { (char*) "Chile/EasterIsland" , 0x03956A }, + { (char*) "CST6CDT" , 0x039A0C }, + { (char*) "Cuba" , 0x039DCF }, + { (char*) "EET" , 0x03A238 }, + { (char*) "Egypt" , 0x03A435 }, + { (char*) "Eire" , 0x03A95E }, + { (char*) "EST" , 0x03AF42 }, + { (char*) "EST5EDT" , 0x03AFBD }, + { (char*) "Etc/GMT" , 0x03B380 }, + { (char*) "Etc/GMT+0" , 0x03B3FB }, + { (char*) "Etc/GMT+1" , 0x03B476 }, + { (char*) "Etc/GMT+10" , 0x03B4F3 }, + { (char*) "Etc/GMT+11" , 0x03B571 }, + { (char*) "Etc/GMT+12" , 0x03B5EF }, + { (char*) "Etc/GMT+2" , 0x03B66D }, + { (char*) "Etc/GMT+3" , 0x03B6EA }, + { (char*) "Etc/GMT+4" , 0x03B767 }, + { (char*) "Etc/GMT+5" , 0x03B7E4 }, + { (char*) "Etc/GMT+6" , 0x03B861 }, + { (char*) "Etc/GMT+7" , 0x03B8DE }, + { (char*) "Etc/GMT+8" , 0x03B95B }, + { (char*) "Etc/GMT+9" , 0x03B9D8 }, + { (char*) "Etc/GMT-0" , 0x03BA55 }, + { (char*) "Etc/GMT-1" , 0x03BAD0 }, + { (char*) "Etc/GMT-10" , 0x03BB4E }, + { (char*) "Etc/GMT-11" , 0x03BBCD }, + { (char*) "Etc/GMT-12" , 0x03BC4C }, + { (char*) "Etc/GMT-13" , 0x03BCCB }, + { (char*) "Etc/GMT-14" , 0x03BD4A }, + { (char*) "Etc/GMT-2" , 0x03BDC9 }, + { (char*) "Etc/GMT-3" , 0x03BE47 }, + { (char*) "Etc/GMT-4" , 0x03BEC5 }, + { (char*) "Etc/GMT-5" , 0x03BF43 }, + { (char*) "Etc/GMT-6" , 0x03BFC1 }, + { (char*) "Etc/GMT-7" , 0x03C03F }, + { (char*) "Etc/GMT-8" , 0x03C0BD }, + { (char*) "Etc/GMT-9" , 0x03C13B }, + { (char*) "Etc/GMT0" , 0x03C1B9 }, + { (char*) "Etc/Greenwich" , 0x03C234 }, + { (char*) "Etc/UCT" , 0x03C2AF }, + { (char*) "Etc/Universal" , 0x03C32A }, + { (char*) "Etc/UTC" , 0x03C3A5 }, + { (char*) "Etc/Zulu" , 0x03C420 }, + { (char*) "Europe/Amsterdam" , 0x03C49B }, + { (char*) "Europe/Andorra" , 0x03C8D6 }, + { (char*) "Europe/Astrakhan" , 0x03CA67 }, + { (char*) "Europe/Athens" , 0x03CD5B }, + { (char*) "Europe/Belfast" , 0x03D011 }, + { (char*) "Europe/Belgrade" , 0x03D65C }, + { (char*) "Europe/Berlin" , 0x03D846 }, + { (char*) "Europe/Bratislava" , 0x03DB22 }, + { (char*) "Europe/Brussels" , 0x03DE01 }, + { (char*) "Europe/Bucharest" , 0x03E25C }, + { (char*) "Europe/Budapest" , 0x03E4FD }, + { (char*) "Europe/Busingen" , 0x03E807 }, + { (char*) "Europe/Chisinau" , 0x03EA0C }, + { (char*) "Europe/Copenhagen" , 0x03ED0B }, + { (char*) "Europe/Dublin" , 0x03EF86 }, + { (char*) "Europe/Gibraltar" , 0x03F56A }, + { (char*) "Europe/Guernsey" , 0x03FA3A }, + { (char*) "Europe/Helsinki" , 0x040091 }, + { (char*) "Europe/Isle_of_Man" , 0x04027E }, + { (char*) "Europe/Istanbul" , 0x0408C9 }, + { (char*) "Europe/Jersey" , 0x040D85 }, + { (char*) "Europe/Kaliningrad" , 0x0413DC }, + { (char*) "Europe/Kiev" , 0x041784 }, + { (char*) "Europe/Kirov" , 0x0419BE }, + { (char*) "Europe/Kyiv" , 0x041CB7 }, + { (char*) "Europe/Lisbon" , 0x041F00 }, + { (char*) "Europe/Ljubljana" , 0x0424CD }, + { (char*) "Europe/London" , 0x0426B7 }, + { (char*) "Europe/Luxembourg" , 0x042D02 }, + { (char*) "Europe/Madrid" , 0x04314D }, + { (char*) "Europe/Malta" , 0x0434EA }, + { (char*) "Europe/Mariehamn" , 0x043896 }, + { (char*) "Europe/Minsk" , 0x043A83 }, + { (char*) "Europe/Monaco" , 0x043DB7 }, + { (char*) "Europe/Moscow" , 0x04421D }, + { (char*) "Europe/Nicosia" , 0x0445C9 }, + { (char*) "Europe/Oslo" , 0x04482A }, + { (char*) "Europe/Paris" , 0x044ADA }, + { (char*) "Europe/Podgorica" , 0x044F37 }, + { (char*) "Europe/Prague" , 0x045121 }, + { (char*) "Europe/Riga" , 0x045400 }, + { (char*) "Europe/Rome" , 0x0456C2 }, + { (char*) "Europe/Samara" , 0x045A81 }, + { (char*) "Europe/San_Marino" , 0x045D82 }, + { (char*) "Europe/Sarajevo" , 0x046141 }, + { (char*) "Europe/Saratov" , 0x04632B }, + { (char*) "Europe/Simferopol" , 0x04661D }, + { (char*) "Europe/Skopje" , 0x046990 }, + { (char*) "Europe/Sofia" , 0x046B7A }, + { (char*) "Europe/Stockholm" , 0x046DD6 }, + { (char*) "Europe/Tallinn" , 0x046FD3 }, + { (char*) "Europe/Tirane" , 0x047282 }, + { (char*) "Europe/Tiraspol" , 0x0474EA }, + { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, + { (char*) "Europe/Uzhgorod" , 0x047AFF }, + { (char*) "Europe/Vaduz" , 0x047D39 }, + { (char*) "Europe/Vatican" , 0x047F23 }, + { (char*) "Europe/Vienna" , 0x0482E2 }, + { (char*) "Europe/Vilnius" , 0x048580 }, + { (char*) "Europe/Volgograd" , 0x048830 }, + { (char*) "Europe/Warsaw" , 0x048B3F }, + { (char*) "Europe/Zagreb" , 0x048EE6 }, + { (char*) "Europe/Zaporozhye" , 0x0490D0 }, + { (char*) "Europe/Zurich" , 0x04930A }, + { (char*) "Factory" , 0x049507 }, + { (char*) "GB" , 0x049584 }, + { (char*) "GB-Eire" , 0x049BCF }, + { (char*) "GMT" , 0x04A21A }, + { (char*) "GMT+0" , 0x04A295 }, + { (char*) "GMT-0" , 0x04A310 }, + { (char*) "GMT0" , 0x04A38B }, + { (char*) "Greenwich" , 0x04A406 }, + { (char*) "Hongkong" , 0x04A481 }, + { (char*) "HST" , 0x04A794 }, + { (char*) "Iceland" , 0x04A810 }, + { (char*) "Indian/Antananarivo" , 0x04A89E }, + { (char*) "Indian/Chagos" , 0x04A94A }, + { (char*) "Indian/Christmas" , 0x04A9EE }, + { (char*) "Indian/Cocos" , 0x04AA7F }, + { (char*) "Indian/Comoro" , 0x04AB17 }, + { (char*) "Indian/Kerguelen" , 0x04ABA6 }, + { (char*) "Indian/Mahe" , 0x04AC37 }, + { (char*) "Indian/Maldives" , 0x04ACC8 }, + { (char*) "Indian/Mauritius" , 0x04AD6C }, + { (char*) "Indian/Mayotte" , 0x04AE2B }, + { (char*) "Indian/Reunion" , 0x04AEBA }, + { (char*) "Iran" , 0x04AF4B }, + { (char*) "Israel" , 0x04B283 }, + { (char*) "Jamaica" , 0x04B6C1 }, + { (char*) "Japan" , 0x04B820 }, + { (char*) "Kwajalein" , 0x04B901 }, + { (char*) "Libya" , 0x04B9E8 }, + { (char*) "MET" , 0x04BBA3 }, + { (char*) "Mexico/BajaNorte" , 0x04BE1C }, + { (char*) "Mexico/BajaSur" , 0x04C229 }, + { (char*) "Mexico/General" , 0x04C503 }, + { (char*) "MST" , 0x04C814 }, + { (char*) "MST7MDT" , 0x04C88F }, + { (char*) "Navajo" , 0x04CC52 }, + { (char*) "NZ" , 0x04D070 }, + { (char*) "NZ-CHAT" , 0x04D48F }, + { (char*) "Pacific/Apia" , 0x04D7C3 }, + { (char*) "Pacific/Auckland" , 0x04D966 }, + { (char*) "Pacific/Bougainville" , 0x04DD98 }, + { (char*) "Pacific/Chatham" , 0x04DE79 }, + { (char*) "Pacific/Chuuk" , 0x04E1BC }, + { (char*) "Pacific/Easter" , 0x04E29A }, + { (char*) "Pacific/Efate" , 0x04E749 }, + { (char*) "Pacific/Enderbury" , 0x04E8AB }, + { (char*) "Pacific/Fakaofo" , 0x04E963 }, + { (char*) "Pacific/Fiji" , 0x04EA08 }, + { (char*) "Pacific/Funafuti" , 0x04EBA0 }, + { (char*) "Pacific/Galapagos" , 0x04EC32 }, + { (char*) "Pacific/Gambier" , 0x04ECFE }, + { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, + { (char*) "Pacific/Guam" , 0x04EE2F }, + { (char*) "Pacific/Honolulu" , 0x04EF99 }, + { (char*) "Pacific/Johnston" , 0x04F088 }, + { (char*) "Pacific/Kanton" , 0x04F171 }, + { (char*) "Pacific/Kiritimati" , 0x04F238 }, + { (char*) "Pacific/Kosrae" , 0x04F2FE }, + { (char*) "Pacific/Kwajalein" , 0x04F402 }, + { (char*) "Pacific/Majuro" , 0x04F4F2 }, + { (char*) "Pacific/Marquesas" , 0x04F5F0 }, + { (char*) "Pacific/Midway" , 0x04F698 }, + { (char*) "Pacific/Nauru" , 0x04F75B }, + { (char*) "Pacific/Niue" , 0x04F81E }, + { (char*) "Pacific/Norfolk" , 0x04F8C4 }, + { (char*) "Pacific/Noumea" , 0x04F9C7 }, + { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, + { (char*) "Pacific/Palau" , 0x04FB37 }, + { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, + { (char*) "Pacific/Pohnpei" , 0x04FC7C }, + { (char*) "Pacific/Ponape" , 0x04FD6C }, + { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, + { (char*) "Pacific/Rarotonga" , 0x04FEBC }, + { (char*) "Pacific/Saipan" , 0x05005E }, + { (char*) "Pacific/Samoa" , 0x0501BF }, + { (char*) "Pacific/Tahiti" , 0x05025D }, + { (char*) "Pacific/Tarawa" , 0x0502FD }, + { (char*) "Pacific/Tongatapu" , 0x05039E }, + { (char*) "Pacific/Truk" , 0x050497 }, + { (char*) "Pacific/Wake" , 0x05053D }, + { (char*) "Pacific/Wallis" , 0x0505DA }, + { (char*) "Pacific/Yap" , 0x05066C }, + { (char*) "Poland" , 0x050712 }, + { (char*) "Portugal" , 0x050AB9 }, + { (char*) "PRC" , 0x051073 }, + { (char*) "PST8PDT" , 0x051208 }, + { (char*) "ROC" , 0x0515CB }, + { (char*) "ROK" , 0x0517D6 }, + { (char*) "Singapore" , 0x051981 }, + { (char*) "Turkey" , 0x051A8D }, + { (char*) "UCT" , 0x051F49 }, + { (char*) "Universal" , 0x051FC4 }, + { (char*) "US/Alaska" , 0x05203F }, + { (char*) "US/Aleutian" , 0x05241C }, + { (char*) "US/Arizona" , 0x0527F1 }, + { (char*) "US/Central" , 0x0528ED }, + { (char*) "US/East-Indiana" , 0x052FD3 }, + { (char*) "US/Eastern" , 0x0531F2 }, + { (char*) "US/Hawaii" , 0x0538CE }, + { (char*) "US/Indiana-Starke" , 0x0539B7 }, + { (char*) "US/Michigan" , 0x053DBB }, + { (char*) "US/Mountain" , 0x05414A }, + { (char*) "US/Pacific" , 0x054568 }, + { (char*) "US/Samoa" , 0x054A82 }, + { (char*) "UTC" , 0x054B20 }, + { (char*) "W-SU" , 0x054B9B }, + { (char*) "WET" , 0x054F33 }, + { (char*) "Zulu" , 0x05512D }, }; -const unsigned char timelib_timezone_db_data_builtin[348143] = { +const unsigned char timelib_timezone_db_data_builtin[348584] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,16 +10589,44 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, -0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, -0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, -0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, -0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, +0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, +0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, +0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, +0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, +0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, +0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, +0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, +0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, +0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, +0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, +0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, +0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, +0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, +0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42840,7 +42868,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42917,7 +42945,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -69999,4 +70027,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 8a2586228df519da101c1943c1a750565dd4bd4a Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Mar 2023 10:10:18 +0000 Subject: [PATCH 690/895] Updated to version 2023.2 (2023b) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++++------------------ 1 file changed, 390 insertions(+), 362 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 4219b12911224..89c62a6d4926d 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024915 }, - { (char*) "Asia/Brunei" , 0x024B8B }, - { (char*) "Asia/Calcutta" , 0x024C31 }, - { (char*) "Asia/Chita" , 0x024D19 }, - { (char*) "Asia/Choibalsan" , 0x025027 }, - { (char*) "Asia/Chongqing" , 0x0252B0 }, - { (char*) "Asia/Chungking" , 0x025445 }, - { (char*) "Asia/Colombo" , 0x0255DA }, - { (char*) "Asia/Dacca" , 0x0256DD }, - { (char*) "Asia/Damascus" , 0x0257D0 }, - { (char*) "Asia/Dhaka" , 0x025CAE }, - { (char*) "Asia/Dili" , 0x025DA1 }, - { (char*) "Asia/Dubai" , 0x025E57 }, - { (char*) "Asia/Dushanbe" , 0x025EE8 }, - { (char*) "Asia/Famagusta" , 0x026062 }, - { (char*) "Asia/Gaza" , 0x026429 }, - { (char*) "Asia/Harbin" , 0x026E15 }, - { (char*) "Asia/Hebron" , 0x026FAA }, - { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, - { (char*) "Asia/Hong_Kong" , 0x027A9F }, - { (char*) "Asia/Hovd" , 0x027DB2 }, - { (char*) "Asia/Irkutsk" , 0x02803B }, - { (char*) "Asia/Istanbul" , 0x028359 }, - { (char*) "Asia/Jakarta" , 0x028815 }, - { (char*) "Asia/Jayapura" , 0x028926 }, - { (char*) "Asia/Jerusalem" , 0x028A13 }, - { (char*) "Asia/Kabul" , 0x028E51 }, - { (char*) "Asia/Kamchatka" , 0x028EFC }, - { (char*) "Asia/Karachi" , 0x0291F1 }, - { (char*) "Asia/Kashgar" , 0x029307 }, - { (char*) "Asia/Kathmandu" , 0x029398 }, - { (char*) "Asia/Katmandu" , 0x029445 }, - { (char*) "Asia/Khandyga" , 0x0294F2 }, - { (char*) "Asia/Kolkata" , 0x029823 }, - { (char*) "Asia/Krasnoyarsk" , 0x02990B }, - { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, - { (char*) "Asia/Kuching" , 0x029D35 }, - { (char*) "Asia/Kuwait" , 0x029E8F }, - { (char*) "Asia/Macao" , 0x029F20 }, - { (char*) "Asia/Macau" , 0x02A243 }, - { (char*) "Asia/Magadan" , 0x02A566 }, - { (char*) "Asia/Makassar" , 0x02A871 }, - { (char*) "Asia/Manila" , 0x02A984 }, - { (char*) "Asia/Muscat" , 0x02AA7E }, - { (char*) "Asia/Nicosia" , 0x02AB0F }, - { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, - { (char*) "Asia/Novosibirsk" , 0x02B071 }, - { (char*) "Asia/Omsk" , 0x02B382 }, - { (char*) "Asia/Oral" , 0x02B680 }, - { (char*) "Asia/Phnom_Penh" , 0x02B90C }, - { (char*) "Asia/Pontianak" , 0x02B9E0 }, - { (char*) "Asia/Pyongyang" , 0x02BAF9 }, - { (char*) "Asia/Qatar" , 0x02BBBC }, - { (char*) "Asia/Qostanay" , 0x02BC60 }, - { (char*) "Asia/Qyzylorda" , 0x02BEED }, - { (char*) "Asia/Rangoon" , 0x02C186 }, - { (char*) "Asia/Riyadh" , 0x02C24D }, - { (char*) "Asia/Saigon" , 0x02C2DE }, - { (char*) "Asia/Sakhalin" , 0x02C3D6 }, - { (char*) "Asia/Samarkand" , 0x02C6ED }, - { (char*) "Asia/Seoul" , 0x02C878 }, - { (char*) "Asia/Shanghai" , 0x02CA23 }, - { (char*) "Asia/Singapore" , 0x02CBC4 }, - { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, - { (char*) "Asia/Taipei" , 0x02CFE0 }, - { (char*) "Asia/Tashkent" , 0x02D1EB }, - { (char*) "Asia/Tbilisi" , 0x02D376 }, - { (char*) "Asia/Tehran" , 0x02D5F7 }, - { (char*) "Asia/Tel_Aviv" , 0x02D92F }, - { (char*) "Asia/Thimbu" , 0x02DD6D }, - { (char*) "Asia/Thimphu" , 0x02DE13 }, - { (char*) "Asia/Tokyo" , 0x02DEB9 }, - { (char*) "Asia/Tomsk" , 0x02DF9A }, - { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, - { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, - { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, - { (char*) "Asia/Urumqi" , 0x02E83B }, - { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, - { (char*) "Asia/Vientiane" , 0x02EBFC }, - { (char*) "Asia/Vladivostok" , 0x02ECE2 }, - { (char*) "Asia/Yakutsk" , 0x02EFE7 }, - { (char*) "Asia/Yangon" , 0x02F2EB }, - { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, - { (char*) "Asia/Yerevan" , 0x02F6C4 }, - { (char*) "Atlantic/Azores" , 0x02F994 }, - { (char*) "Atlantic/Bermuda" , 0x02FF53 }, - { (char*) "Atlantic/Canary" , 0x03035F }, - { (char*) "Atlantic/Cape_Verde" , 0x030557 }, - { (char*) "Atlantic/Faeroe" , 0x030612 }, - { (char*) "Atlantic/Faroe" , 0x0307D7 }, - { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, - { (char*) "Atlantic/Madeira" , 0x030C69 }, - { (char*) "Atlantic/Reykjavik" , 0x031231 }, - { (char*) "Atlantic/South_Georgia" , 0x03152E }, - { (char*) "Atlantic/St_Helena" , 0x0315BE }, - { (char*) "Atlantic/Stanley" , 0x03165F }, - { (char*) "Australia/ACT" , 0x031980 }, - { (char*) "Australia/Adelaide" , 0x031D14 }, - { (char*) "Australia/Brisbane" , 0x0320C8 }, - { (char*) "Australia/Broken_Hill" , 0x03220C }, - { (char*) "Australia/Canberra" , 0x0325E1 }, - { (char*) "Australia/Currie" , 0x032975 }, - { (char*) "Australia/Darwin" , 0x032D6C }, - { (char*) "Australia/Eucla" , 0x032E74 }, - { (char*) "Australia/Hobart" , 0x032FD3 }, - { (char*) "Australia/LHI" , 0x0333D2 }, - { (char*) "Australia/Lindeman" , 0x033692 }, - { (char*) "Australia/Lord_Howe" , 0x033802 }, - { (char*) "Australia/Melbourne" , 0x033AD2 }, - { (char*) "Australia/North" , 0x033E6E }, - { (char*) "Australia/NSW" , 0x033F64 }, - { (char*) "Australia/Perth" , 0x0342F8 }, - { (char*) "Australia/Queensland" , 0x034454 }, - { (char*) "Australia/South" , 0x034581 }, - { (char*) "Australia/Sydney" , 0x034926 }, - { (char*) "Australia/Tasmania" , 0x034CD6 }, - { (char*) "Australia/Victoria" , 0x0350CD }, - { (char*) "Australia/West" , 0x035461 }, - { (char*) "Australia/Yancowinna" , 0x03559F }, - { (char*) "Brazil/Acre" , 0x035958 }, - { (char*) "Brazil/DeNoronha" , 0x035B06 }, - { (char*) "Brazil/East" , 0x035CF6 }, - { (char*) "Brazil/West" , 0x0360BA }, - { (char*) "Canada/Atlantic" , 0x036262 }, - { (char*) "Canada/Central" , 0x0368F6 }, - { (char*) "Canada/Eastern" , 0x036E10 }, - { (char*) "Canada/Mountain" , 0x0374D1 }, - { (char*) "Canada/Newfoundland" , 0x0378A7 }, - { (char*) "Canada/Pacific" , 0x038009 }, - { (char*) "Canada/Saskatchewan" , 0x038547 }, - { (char*) "Canada/Yukon" , 0x0387D1 }, - { (char*) "CET" , 0x038BE2 }, - { (char*) "Chile/Continental" , 0x038E5B }, - { (char*) "Chile/EasterIsland" , 0x0393B1 }, - { (char*) "CST6CDT" , 0x039853 }, - { (char*) "Cuba" , 0x039C16 }, - { (char*) "EET" , 0x03A07F }, - { (char*) "Egypt" , 0x03A27C }, - { (char*) "Eire" , 0x03A7A5 }, - { (char*) "EST" , 0x03AD89 }, - { (char*) "EST5EDT" , 0x03AE04 }, - { (char*) "Etc/GMT" , 0x03B1C7 }, - { (char*) "Etc/GMT+0" , 0x03B242 }, - { (char*) "Etc/GMT+1" , 0x03B2BD }, - { (char*) "Etc/GMT+10" , 0x03B33A }, - { (char*) "Etc/GMT+11" , 0x03B3B8 }, - { (char*) "Etc/GMT+12" , 0x03B436 }, - { (char*) "Etc/GMT+2" , 0x03B4B4 }, - { (char*) "Etc/GMT+3" , 0x03B531 }, - { (char*) "Etc/GMT+4" , 0x03B5AE }, - { (char*) "Etc/GMT+5" , 0x03B62B }, - { (char*) "Etc/GMT+6" , 0x03B6A8 }, - { (char*) "Etc/GMT+7" , 0x03B725 }, - { (char*) "Etc/GMT+8" , 0x03B7A2 }, - { (char*) "Etc/GMT+9" , 0x03B81F }, - { (char*) "Etc/GMT-0" , 0x03B89C }, - { (char*) "Etc/GMT-1" , 0x03B917 }, - { (char*) "Etc/GMT-10" , 0x03B995 }, - { (char*) "Etc/GMT-11" , 0x03BA14 }, - { (char*) "Etc/GMT-12" , 0x03BA93 }, - { (char*) "Etc/GMT-13" , 0x03BB12 }, - { (char*) "Etc/GMT-14" , 0x03BB91 }, - { (char*) "Etc/GMT-2" , 0x03BC10 }, - { (char*) "Etc/GMT-3" , 0x03BC8E }, - { (char*) "Etc/GMT-4" , 0x03BD0C }, - { (char*) "Etc/GMT-5" , 0x03BD8A }, - { (char*) "Etc/GMT-6" , 0x03BE08 }, - { (char*) "Etc/GMT-7" , 0x03BE86 }, - { (char*) "Etc/GMT-8" , 0x03BF04 }, - { (char*) "Etc/GMT-9" , 0x03BF82 }, - { (char*) "Etc/GMT0" , 0x03C000 }, - { (char*) "Etc/Greenwich" , 0x03C07B }, - { (char*) "Etc/UCT" , 0x03C0F6 }, - { (char*) "Etc/Universal" , 0x03C171 }, - { (char*) "Etc/UTC" , 0x03C1EC }, - { (char*) "Etc/Zulu" , 0x03C267 }, - { (char*) "Europe/Amsterdam" , 0x03C2E2 }, - { (char*) "Europe/Andorra" , 0x03C71D }, - { (char*) "Europe/Astrakhan" , 0x03C8AE }, - { (char*) "Europe/Athens" , 0x03CBA2 }, - { (char*) "Europe/Belfast" , 0x03CE58 }, - { (char*) "Europe/Belgrade" , 0x03D4A3 }, - { (char*) "Europe/Berlin" , 0x03D68D }, - { (char*) "Europe/Bratislava" , 0x03D969 }, - { (char*) "Europe/Brussels" , 0x03DC48 }, - { (char*) "Europe/Bucharest" , 0x03E0A3 }, - { (char*) "Europe/Budapest" , 0x03E344 }, - { (char*) "Europe/Busingen" , 0x03E64E }, - { (char*) "Europe/Chisinau" , 0x03E853 }, - { (char*) "Europe/Copenhagen" , 0x03EB52 }, - { (char*) "Europe/Dublin" , 0x03EDCD }, - { (char*) "Europe/Gibraltar" , 0x03F3B1 }, - { (char*) "Europe/Guernsey" , 0x03F881 }, - { (char*) "Europe/Helsinki" , 0x03FED8 }, - { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, - { (char*) "Europe/Istanbul" , 0x040710 }, - { (char*) "Europe/Jersey" , 0x040BCC }, - { (char*) "Europe/Kaliningrad" , 0x041223 }, - { (char*) "Europe/Kiev" , 0x0415CB }, - { (char*) "Europe/Kirov" , 0x041805 }, - { (char*) "Europe/Kyiv" , 0x041AFE }, - { (char*) "Europe/Lisbon" , 0x041D47 }, - { (char*) "Europe/Ljubljana" , 0x042314 }, - { (char*) "Europe/London" , 0x0424FE }, - { (char*) "Europe/Luxembourg" , 0x042B49 }, - { (char*) "Europe/Madrid" , 0x042F94 }, - { (char*) "Europe/Malta" , 0x043331 }, - { (char*) "Europe/Mariehamn" , 0x0436DD }, - { (char*) "Europe/Minsk" , 0x0438CA }, - { (char*) "Europe/Monaco" , 0x043BFE }, - { (char*) "Europe/Moscow" , 0x044064 }, - { (char*) "Europe/Nicosia" , 0x044410 }, - { (char*) "Europe/Oslo" , 0x044671 }, - { (char*) "Europe/Paris" , 0x044921 }, - { (char*) "Europe/Podgorica" , 0x044D7E }, - { (char*) "Europe/Prague" , 0x044F68 }, - { (char*) "Europe/Riga" , 0x045247 }, - { (char*) "Europe/Rome" , 0x045509 }, - { (char*) "Europe/Samara" , 0x0458C8 }, - { (char*) "Europe/San_Marino" , 0x045BC9 }, - { (char*) "Europe/Sarajevo" , 0x045F88 }, - { (char*) "Europe/Saratov" , 0x046172 }, - { (char*) "Europe/Simferopol" , 0x046464 }, - { (char*) "Europe/Skopje" , 0x0467D7 }, - { (char*) "Europe/Sofia" , 0x0469C1 }, - { (char*) "Europe/Stockholm" , 0x046C1D }, - { (char*) "Europe/Tallinn" , 0x046E1A }, - { (char*) "Europe/Tirane" , 0x0470C9 }, - { (char*) "Europe/Tiraspol" , 0x047331 }, - { (char*) "Europe/Ulyanovsk" , 0x047630 }, - { (char*) "Europe/Uzhgorod" , 0x047946 }, - { (char*) "Europe/Vaduz" , 0x047B80 }, - { (char*) "Europe/Vatican" , 0x047D6A }, - { (char*) "Europe/Vienna" , 0x048129 }, - { (char*) "Europe/Vilnius" , 0x0483C7 }, - { (char*) "Europe/Volgograd" , 0x048677 }, - { (char*) "Europe/Warsaw" , 0x048986 }, - { (char*) "Europe/Zagreb" , 0x048D2D }, - { (char*) "Europe/Zaporozhye" , 0x048F17 }, - { (char*) "Europe/Zurich" , 0x049151 }, - { (char*) "Factory" , 0x04934E }, - { (char*) "GB" , 0x0493CB }, - { (char*) "GB-Eire" , 0x049A16 }, - { (char*) "GMT" , 0x04A061 }, - { (char*) "GMT+0" , 0x04A0DC }, - { (char*) "GMT-0" , 0x04A157 }, - { (char*) "GMT0" , 0x04A1D2 }, - { (char*) "Greenwich" , 0x04A24D }, - { (char*) "Hongkong" , 0x04A2C8 }, - { (char*) "HST" , 0x04A5DB }, - { (char*) "Iceland" , 0x04A657 }, - { (char*) "Indian/Antananarivo" , 0x04A6E5 }, - { (char*) "Indian/Chagos" , 0x04A791 }, - { (char*) "Indian/Christmas" , 0x04A835 }, - { (char*) "Indian/Cocos" , 0x04A8C6 }, - { (char*) "Indian/Comoro" , 0x04A95E }, - { (char*) "Indian/Kerguelen" , 0x04A9ED }, - { (char*) "Indian/Mahe" , 0x04AA7E }, - { (char*) "Indian/Maldives" , 0x04AB0F }, - { (char*) "Indian/Mauritius" , 0x04ABB3 }, - { (char*) "Indian/Mayotte" , 0x04AC72 }, - { (char*) "Indian/Reunion" , 0x04AD01 }, - { (char*) "Iran" , 0x04AD92 }, - { (char*) "Israel" , 0x04B0CA }, - { (char*) "Jamaica" , 0x04B508 }, - { (char*) "Japan" , 0x04B667 }, - { (char*) "Kwajalein" , 0x04B748 }, - { (char*) "Libya" , 0x04B82F }, - { (char*) "MET" , 0x04B9EA }, - { (char*) "Mexico/BajaNorte" , 0x04BC63 }, - { (char*) "Mexico/BajaSur" , 0x04C070 }, - { (char*) "Mexico/General" , 0x04C34A }, - { (char*) "MST" , 0x04C65B }, - { (char*) "MST7MDT" , 0x04C6D6 }, - { (char*) "Navajo" , 0x04CA99 }, - { (char*) "NZ" , 0x04CEB7 }, - { (char*) "NZ-CHAT" , 0x04D2D6 }, - { (char*) "Pacific/Apia" , 0x04D60A }, - { (char*) "Pacific/Auckland" , 0x04D7AD }, - { (char*) "Pacific/Bougainville" , 0x04DBDF }, - { (char*) "Pacific/Chatham" , 0x04DCC0 }, - { (char*) "Pacific/Chuuk" , 0x04E003 }, - { (char*) "Pacific/Easter" , 0x04E0E1 }, - { (char*) "Pacific/Efate" , 0x04E590 }, - { (char*) "Pacific/Enderbury" , 0x04E6F2 }, - { (char*) "Pacific/Fakaofo" , 0x04E7AA }, - { (char*) "Pacific/Fiji" , 0x04E84F }, - { (char*) "Pacific/Funafuti" , 0x04E9E7 }, - { (char*) "Pacific/Galapagos" , 0x04EA79 }, - { (char*) "Pacific/Gambier" , 0x04EB45 }, - { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, - { (char*) "Pacific/Guam" , 0x04EC76 }, - { (char*) "Pacific/Honolulu" , 0x04EDE0 }, - { (char*) "Pacific/Johnston" , 0x04EECF }, - { (char*) "Pacific/Kanton" , 0x04EFB8 }, - { (char*) "Pacific/Kiritimati" , 0x04F07F }, - { (char*) "Pacific/Kosrae" , 0x04F145 }, - { (char*) "Pacific/Kwajalein" , 0x04F249 }, - { (char*) "Pacific/Majuro" , 0x04F339 }, - { (char*) "Pacific/Marquesas" , 0x04F437 }, - { (char*) "Pacific/Midway" , 0x04F4DF }, - { (char*) "Pacific/Nauru" , 0x04F5A2 }, - { (char*) "Pacific/Niue" , 0x04F665 }, - { (char*) "Pacific/Norfolk" , 0x04F70B }, - { (char*) "Pacific/Noumea" , 0x04F80E }, - { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, - { (char*) "Pacific/Palau" , 0x04F97E }, - { (char*) "Pacific/Pitcairn" , 0x04FA1E }, - { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, - { (char*) "Pacific/Ponape" , 0x04FBB3 }, - { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, - { (char*) "Pacific/Rarotonga" , 0x04FD03 }, - { (char*) "Pacific/Saipan" , 0x04FEA5 }, - { (char*) "Pacific/Samoa" , 0x050006 }, - { (char*) "Pacific/Tahiti" , 0x0500A4 }, - { (char*) "Pacific/Tarawa" , 0x050144 }, - { (char*) "Pacific/Tongatapu" , 0x0501E5 }, - { (char*) "Pacific/Truk" , 0x0502DE }, - { (char*) "Pacific/Wake" , 0x050384 }, - { (char*) "Pacific/Wallis" , 0x050421 }, - { (char*) "Pacific/Yap" , 0x0504B3 }, - { (char*) "Poland" , 0x050559 }, - { (char*) "Portugal" , 0x050900 }, - { (char*) "PRC" , 0x050EBA }, - { (char*) "PST8PDT" , 0x05104F }, - { (char*) "ROC" , 0x051412 }, - { (char*) "ROK" , 0x05161D }, - { (char*) "Singapore" , 0x0517C8 }, - { (char*) "Turkey" , 0x0518D4 }, - { (char*) "UCT" , 0x051D90 }, - { (char*) "Universal" , 0x051E0B }, - { (char*) "US/Alaska" , 0x051E86 }, - { (char*) "US/Aleutian" , 0x052263 }, - { (char*) "US/Arizona" , 0x052638 }, - { (char*) "US/Central" , 0x052734 }, - { (char*) "US/East-Indiana" , 0x052E1A }, - { (char*) "US/Eastern" , 0x053039 }, - { (char*) "US/Hawaii" , 0x053715 }, - { (char*) "US/Indiana-Starke" , 0x0537FE }, - { (char*) "US/Michigan" , 0x053C02 }, - { (char*) "US/Mountain" , 0x053F91 }, - { (char*) "US/Pacific" , 0x0543AF }, - { (char*) "US/Samoa" , 0x0548C9 }, - { (char*) "UTC" , 0x054967 }, - { (char*) "W-SU" , 0x0549E2 }, - { (char*) "WET" , 0x054D7A }, - { (char*) "Zulu" , 0x054F74 }, + { (char*) "Asia/Bishkek" , 0x024ACE }, + { (char*) "Asia/Brunei" , 0x024D44 }, + { (char*) "Asia/Calcutta" , 0x024DEA }, + { (char*) "Asia/Chita" , 0x024ED2 }, + { (char*) "Asia/Choibalsan" , 0x0251E0 }, + { (char*) "Asia/Chongqing" , 0x025469 }, + { (char*) "Asia/Chungking" , 0x0255FE }, + { (char*) "Asia/Colombo" , 0x025793 }, + { (char*) "Asia/Dacca" , 0x025896 }, + { (char*) "Asia/Damascus" , 0x025989 }, + { (char*) "Asia/Dhaka" , 0x025E67 }, + { (char*) "Asia/Dili" , 0x025F5A }, + { (char*) "Asia/Dubai" , 0x026010 }, + { (char*) "Asia/Dushanbe" , 0x0260A1 }, + { (char*) "Asia/Famagusta" , 0x02621B }, + { (char*) "Asia/Gaza" , 0x0265E2 }, + { (char*) "Asia/Harbin" , 0x026FCE }, + { (char*) "Asia/Hebron" , 0x027163 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, + { (char*) "Asia/Hong_Kong" , 0x027C58 }, + { (char*) "Asia/Hovd" , 0x027F6B }, + { (char*) "Asia/Irkutsk" , 0x0281F4 }, + { (char*) "Asia/Istanbul" , 0x028512 }, + { (char*) "Asia/Jakarta" , 0x0289CE }, + { (char*) "Asia/Jayapura" , 0x028ADF }, + { (char*) "Asia/Jerusalem" , 0x028BCC }, + { (char*) "Asia/Kabul" , 0x02900A }, + { (char*) "Asia/Kamchatka" , 0x0290B5 }, + { (char*) "Asia/Karachi" , 0x0293AA }, + { (char*) "Asia/Kashgar" , 0x0294C0 }, + { (char*) "Asia/Kathmandu" , 0x029551 }, + { (char*) "Asia/Katmandu" , 0x0295FE }, + { (char*) "Asia/Khandyga" , 0x0296AB }, + { (char*) "Asia/Kolkata" , 0x0299DC }, + { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, + { (char*) "Asia/Kuching" , 0x029EEE }, + { (char*) "Asia/Kuwait" , 0x02A048 }, + { (char*) "Asia/Macao" , 0x02A0D9 }, + { (char*) "Asia/Macau" , 0x02A3FC }, + { (char*) "Asia/Magadan" , 0x02A71F }, + { (char*) "Asia/Makassar" , 0x02AA2A }, + { (char*) "Asia/Manila" , 0x02AB3D }, + { (char*) "Asia/Muscat" , 0x02AC37 }, + { (char*) "Asia/Nicosia" , 0x02ACC8 }, + { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, + { (char*) "Asia/Novosibirsk" , 0x02B22A }, + { (char*) "Asia/Omsk" , 0x02B53B }, + { (char*) "Asia/Oral" , 0x02B839 }, + { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, + { (char*) "Asia/Pontianak" , 0x02BB99 }, + { (char*) "Asia/Pyongyang" , 0x02BCB2 }, + { (char*) "Asia/Qatar" , 0x02BD75 }, + { (char*) "Asia/Qostanay" , 0x02BE19 }, + { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, + { (char*) "Asia/Rangoon" , 0x02C33F }, + { (char*) "Asia/Riyadh" , 0x02C406 }, + { (char*) "Asia/Saigon" , 0x02C497 }, + { (char*) "Asia/Sakhalin" , 0x02C58F }, + { (char*) "Asia/Samarkand" , 0x02C8A6 }, + { (char*) "Asia/Seoul" , 0x02CA31 }, + { (char*) "Asia/Shanghai" , 0x02CBDC }, + { (char*) "Asia/Singapore" , 0x02CD7D }, + { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, + { (char*) "Asia/Taipei" , 0x02D199 }, + { (char*) "Asia/Tashkent" , 0x02D3A4 }, + { (char*) "Asia/Tbilisi" , 0x02D52F }, + { (char*) "Asia/Tehran" , 0x02D7B0 }, + { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, + { (char*) "Asia/Thimbu" , 0x02DF26 }, + { (char*) "Asia/Thimphu" , 0x02DFCC }, + { (char*) "Asia/Tokyo" , 0x02E072 }, + { (char*) "Asia/Tomsk" , 0x02E153 }, + { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, + { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, + { (char*) "Asia/Ulan_Bator" , 0x02E796 }, + { (char*) "Asia/Urumqi" , 0x02E9F4 }, + { (char*) "Asia/Ust-Nera" , 0x02EA92 }, + { (char*) "Asia/Vientiane" , 0x02EDB5 }, + { (char*) "Asia/Vladivostok" , 0x02EE9B }, + { (char*) "Asia/Yakutsk" , 0x02F1A0 }, + { (char*) "Asia/Yangon" , 0x02F4A4 }, + { (char*) "Asia/Yekaterinburg" , 0x02F56B }, + { (char*) "Asia/Yerevan" , 0x02F87D }, + { (char*) "Atlantic/Azores" , 0x02FB4D }, + { (char*) "Atlantic/Bermuda" , 0x03010C }, + { (char*) "Atlantic/Canary" , 0x030518 }, + { (char*) "Atlantic/Cape_Verde" , 0x030710 }, + { (char*) "Atlantic/Faeroe" , 0x0307CB }, + { (char*) "Atlantic/Faroe" , 0x030990 }, + { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, + { (char*) "Atlantic/Madeira" , 0x030E22 }, + { (char*) "Atlantic/Reykjavik" , 0x0313EA }, + { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, + { (char*) "Atlantic/St_Helena" , 0x031777 }, + { (char*) "Atlantic/Stanley" , 0x031818 }, + { (char*) "Australia/ACT" , 0x031B39 }, + { (char*) "Australia/Adelaide" , 0x031ECD }, + { (char*) "Australia/Brisbane" , 0x032281 }, + { (char*) "Australia/Broken_Hill" , 0x0323C5 }, + { (char*) "Australia/Canberra" , 0x03279A }, + { (char*) "Australia/Currie" , 0x032B2E }, + { (char*) "Australia/Darwin" , 0x032F25 }, + { (char*) "Australia/Eucla" , 0x03302D }, + { (char*) "Australia/Hobart" , 0x03318C }, + { (char*) "Australia/LHI" , 0x03358B }, + { (char*) "Australia/Lindeman" , 0x03384B }, + { (char*) "Australia/Lord_Howe" , 0x0339BB }, + { (char*) "Australia/Melbourne" , 0x033C8B }, + { (char*) "Australia/North" , 0x034027 }, + { (char*) "Australia/NSW" , 0x03411D }, + { (char*) "Australia/Perth" , 0x0344B1 }, + { (char*) "Australia/Queensland" , 0x03460D }, + { (char*) "Australia/South" , 0x03473A }, + { (char*) "Australia/Sydney" , 0x034ADF }, + { (char*) "Australia/Tasmania" , 0x034E8F }, + { (char*) "Australia/Victoria" , 0x035286 }, + { (char*) "Australia/West" , 0x03561A }, + { (char*) "Australia/Yancowinna" , 0x035758 }, + { (char*) "Brazil/Acre" , 0x035B11 }, + { (char*) "Brazil/DeNoronha" , 0x035CBF }, + { (char*) "Brazil/East" , 0x035EAF }, + { (char*) "Brazil/West" , 0x036273 }, + { (char*) "Canada/Atlantic" , 0x03641B }, + { (char*) "Canada/Central" , 0x036AAF }, + { (char*) "Canada/Eastern" , 0x036FC9 }, + { (char*) "Canada/Mountain" , 0x03768A }, + { (char*) "Canada/Newfoundland" , 0x037A60 }, + { (char*) "Canada/Pacific" , 0x0381C2 }, + { (char*) "Canada/Saskatchewan" , 0x038700 }, + { (char*) "Canada/Yukon" , 0x03898A }, + { (char*) "CET" , 0x038D9B }, + { (char*) "Chile/Continental" , 0x039014 }, + { (char*) "Chile/EasterIsland" , 0x03956A }, + { (char*) "CST6CDT" , 0x039A0C }, + { (char*) "Cuba" , 0x039DCF }, + { (char*) "EET" , 0x03A238 }, + { (char*) "Egypt" , 0x03A435 }, + { (char*) "Eire" , 0x03A95E }, + { (char*) "EST" , 0x03AF42 }, + { (char*) "EST5EDT" , 0x03AFBD }, + { (char*) "Etc/GMT" , 0x03B380 }, + { (char*) "Etc/GMT+0" , 0x03B3FB }, + { (char*) "Etc/GMT+1" , 0x03B476 }, + { (char*) "Etc/GMT+10" , 0x03B4F3 }, + { (char*) "Etc/GMT+11" , 0x03B571 }, + { (char*) "Etc/GMT+12" , 0x03B5EF }, + { (char*) "Etc/GMT+2" , 0x03B66D }, + { (char*) "Etc/GMT+3" , 0x03B6EA }, + { (char*) "Etc/GMT+4" , 0x03B767 }, + { (char*) "Etc/GMT+5" , 0x03B7E4 }, + { (char*) "Etc/GMT+6" , 0x03B861 }, + { (char*) "Etc/GMT+7" , 0x03B8DE }, + { (char*) "Etc/GMT+8" , 0x03B95B }, + { (char*) "Etc/GMT+9" , 0x03B9D8 }, + { (char*) "Etc/GMT-0" , 0x03BA55 }, + { (char*) "Etc/GMT-1" , 0x03BAD0 }, + { (char*) "Etc/GMT-10" , 0x03BB4E }, + { (char*) "Etc/GMT-11" , 0x03BBCD }, + { (char*) "Etc/GMT-12" , 0x03BC4C }, + { (char*) "Etc/GMT-13" , 0x03BCCB }, + { (char*) "Etc/GMT-14" , 0x03BD4A }, + { (char*) "Etc/GMT-2" , 0x03BDC9 }, + { (char*) "Etc/GMT-3" , 0x03BE47 }, + { (char*) "Etc/GMT-4" , 0x03BEC5 }, + { (char*) "Etc/GMT-5" , 0x03BF43 }, + { (char*) "Etc/GMT-6" , 0x03BFC1 }, + { (char*) "Etc/GMT-7" , 0x03C03F }, + { (char*) "Etc/GMT-8" , 0x03C0BD }, + { (char*) "Etc/GMT-9" , 0x03C13B }, + { (char*) "Etc/GMT0" , 0x03C1B9 }, + { (char*) "Etc/Greenwich" , 0x03C234 }, + { (char*) "Etc/UCT" , 0x03C2AF }, + { (char*) "Etc/Universal" , 0x03C32A }, + { (char*) "Etc/UTC" , 0x03C3A5 }, + { (char*) "Etc/Zulu" , 0x03C420 }, + { (char*) "Europe/Amsterdam" , 0x03C49B }, + { (char*) "Europe/Andorra" , 0x03C8D6 }, + { (char*) "Europe/Astrakhan" , 0x03CA67 }, + { (char*) "Europe/Athens" , 0x03CD5B }, + { (char*) "Europe/Belfast" , 0x03D011 }, + { (char*) "Europe/Belgrade" , 0x03D65C }, + { (char*) "Europe/Berlin" , 0x03D846 }, + { (char*) "Europe/Bratislava" , 0x03DB22 }, + { (char*) "Europe/Brussels" , 0x03DE01 }, + { (char*) "Europe/Bucharest" , 0x03E25C }, + { (char*) "Europe/Budapest" , 0x03E4FD }, + { (char*) "Europe/Busingen" , 0x03E807 }, + { (char*) "Europe/Chisinau" , 0x03EA0C }, + { (char*) "Europe/Copenhagen" , 0x03ED0B }, + { (char*) "Europe/Dublin" , 0x03EF86 }, + { (char*) "Europe/Gibraltar" , 0x03F56A }, + { (char*) "Europe/Guernsey" , 0x03FA3A }, + { (char*) "Europe/Helsinki" , 0x040091 }, + { (char*) "Europe/Isle_of_Man" , 0x04027E }, + { (char*) "Europe/Istanbul" , 0x0408C9 }, + { (char*) "Europe/Jersey" , 0x040D85 }, + { (char*) "Europe/Kaliningrad" , 0x0413DC }, + { (char*) "Europe/Kiev" , 0x041784 }, + { (char*) "Europe/Kirov" , 0x0419BE }, + { (char*) "Europe/Kyiv" , 0x041CB7 }, + { (char*) "Europe/Lisbon" , 0x041F00 }, + { (char*) "Europe/Ljubljana" , 0x0424CD }, + { (char*) "Europe/London" , 0x0426B7 }, + { (char*) "Europe/Luxembourg" , 0x042D02 }, + { (char*) "Europe/Madrid" , 0x04314D }, + { (char*) "Europe/Malta" , 0x0434EA }, + { (char*) "Europe/Mariehamn" , 0x043896 }, + { (char*) "Europe/Minsk" , 0x043A83 }, + { (char*) "Europe/Monaco" , 0x043DB7 }, + { (char*) "Europe/Moscow" , 0x04421D }, + { (char*) "Europe/Nicosia" , 0x0445C9 }, + { (char*) "Europe/Oslo" , 0x04482A }, + { (char*) "Europe/Paris" , 0x044ADA }, + { (char*) "Europe/Podgorica" , 0x044F37 }, + { (char*) "Europe/Prague" , 0x045121 }, + { (char*) "Europe/Riga" , 0x045400 }, + { (char*) "Europe/Rome" , 0x0456C2 }, + { (char*) "Europe/Samara" , 0x045A81 }, + { (char*) "Europe/San_Marino" , 0x045D82 }, + { (char*) "Europe/Sarajevo" , 0x046141 }, + { (char*) "Europe/Saratov" , 0x04632B }, + { (char*) "Europe/Simferopol" , 0x04661D }, + { (char*) "Europe/Skopje" , 0x046990 }, + { (char*) "Europe/Sofia" , 0x046B7A }, + { (char*) "Europe/Stockholm" , 0x046DD6 }, + { (char*) "Europe/Tallinn" , 0x046FD3 }, + { (char*) "Europe/Tirane" , 0x047282 }, + { (char*) "Europe/Tiraspol" , 0x0474EA }, + { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, + { (char*) "Europe/Uzhgorod" , 0x047AFF }, + { (char*) "Europe/Vaduz" , 0x047D39 }, + { (char*) "Europe/Vatican" , 0x047F23 }, + { (char*) "Europe/Vienna" , 0x0482E2 }, + { (char*) "Europe/Vilnius" , 0x048580 }, + { (char*) "Europe/Volgograd" , 0x048830 }, + { (char*) "Europe/Warsaw" , 0x048B3F }, + { (char*) "Europe/Zagreb" , 0x048EE6 }, + { (char*) "Europe/Zaporozhye" , 0x0490D0 }, + { (char*) "Europe/Zurich" , 0x04930A }, + { (char*) "Factory" , 0x049507 }, + { (char*) "GB" , 0x049584 }, + { (char*) "GB-Eire" , 0x049BCF }, + { (char*) "GMT" , 0x04A21A }, + { (char*) "GMT+0" , 0x04A295 }, + { (char*) "GMT-0" , 0x04A310 }, + { (char*) "GMT0" , 0x04A38B }, + { (char*) "Greenwich" , 0x04A406 }, + { (char*) "Hongkong" , 0x04A481 }, + { (char*) "HST" , 0x04A794 }, + { (char*) "Iceland" , 0x04A810 }, + { (char*) "Indian/Antananarivo" , 0x04A89E }, + { (char*) "Indian/Chagos" , 0x04A94A }, + { (char*) "Indian/Christmas" , 0x04A9EE }, + { (char*) "Indian/Cocos" , 0x04AA7F }, + { (char*) "Indian/Comoro" , 0x04AB17 }, + { (char*) "Indian/Kerguelen" , 0x04ABA6 }, + { (char*) "Indian/Mahe" , 0x04AC37 }, + { (char*) "Indian/Maldives" , 0x04ACC8 }, + { (char*) "Indian/Mauritius" , 0x04AD6C }, + { (char*) "Indian/Mayotte" , 0x04AE2B }, + { (char*) "Indian/Reunion" , 0x04AEBA }, + { (char*) "Iran" , 0x04AF4B }, + { (char*) "Israel" , 0x04B283 }, + { (char*) "Jamaica" , 0x04B6C1 }, + { (char*) "Japan" , 0x04B820 }, + { (char*) "Kwajalein" , 0x04B901 }, + { (char*) "Libya" , 0x04B9E8 }, + { (char*) "MET" , 0x04BBA3 }, + { (char*) "Mexico/BajaNorte" , 0x04BE1C }, + { (char*) "Mexico/BajaSur" , 0x04C229 }, + { (char*) "Mexico/General" , 0x04C503 }, + { (char*) "MST" , 0x04C814 }, + { (char*) "MST7MDT" , 0x04C88F }, + { (char*) "Navajo" , 0x04CC52 }, + { (char*) "NZ" , 0x04D070 }, + { (char*) "NZ-CHAT" , 0x04D48F }, + { (char*) "Pacific/Apia" , 0x04D7C3 }, + { (char*) "Pacific/Auckland" , 0x04D966 }, + { (char*) "Pacific/Bougainville" , 0x04DD98 }, + { (char*) "Pacific/Chatham" , 0x04DE79 }, + { (char*) "Pacific/Chuuk" , 0x04E1BC }, + { (char*) "Pacific/Easter" , 0x04E29A }, + { (char*) "Pacific/Efate" , 0x04E749 }, + { (char*) "Pacific/Enderbury" , 0x04E8AB }, + { (char*) "Pacific/Fakaofo" , 0x04E963 }, + { (char*) "Pacific/Fiji" , 0x04EA08 }, + { (char*) "Pacific/Funafuti" , 0x04EBA0 }, + { (char*) "Pacific/Galapagos" , 0x04EC32 }, + { (char*) "Pacific/Gambier" , 0x04ECFE }, + { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, + { (char*) "Pacific/Guam" , 0x04EE2F }, + { (char*) "Pacific/Honolulu" , 0x04EF99 }, + { (char*) "Pacific/Johnston" , 0x04F088 }, + { (char*) "Pacific/Kanton" , 0x04F171 }, + { (char*) "Pacific/Kiritimati" , 0x04F238 }, + { (char*) "Pacific/Kosrae" , 0x04F2FE }, + { (char*) "Pacific/Kwajalein" , 0x04F402 }, + { (char*) "Pacific/Majuro" , 0x04F4F2 }, + { (char*) "Pacific/Marquesas" , 0x04F5F0 }, + { (char*) "Pacific/Midway" , 0x04F698 }, + { (char*) "Pacific/Nauru" , 0x04F75B }, + { (char*) "Pacific/Niue" , 0x04F81E }, + { (char*) "Pacific/Norfolk" , 0x04F8C4 }, + { (char*) "Pacific/Noumea" , 0x04F9C7 }, + { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, + { (char*) "Pacific/Palau" , 0x04FB37 }, + { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, + { (char*) "Pacific/Pohnpei" , 0x04FC7C }, + { (char*) "Pacific/Ponape" , 0x04FD6C }, + { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, + { (char*) "Pacific/Rarotonga" , 0x04FEBC }, + { (char*) "Pacific/Saipan" , 0x05005E }, + { (char*) "Pacific/Samoa" , 0x0501BF }, + { (char*) "Pacific/Tahiti" , 0x05025D }, + { (char*) "Pacific/Tarawa" , 0x0502FD }, + { (char*) "Pacific/Tongatapu" , 0x05039E }, + { (char*) "Pacific/Truk" , 0x050497 }, + { (char*) "Pacific/Wake" , 0x05053D }, + { (char*) "Pacific/Wallis" , 0x0505DA }, + { (char*) "Pacific/Yap" , 0x05066C }, + { (char*) "Poland" , 0x050712 }, + { (char*) "Portugal" , 0x050AB9 }, + { (char*) "PRC" , 0x051073 }, + { (char*) "PST8PDT" , 0x051208 }, + { (char*) "ROC" , 0x0515CB }, + { (char*) "ROK" , 0x0517D6 }, + { (char*) "Singapore" , 0x051981 }, + { (char*) "Turkey" , 0x051A8D }, + { (char*) "UCT" , 0x051F49 }, + { (char*) "Universal" , 0x051FC4 }, + { (char*) "US/Alaska" , 0x05203F }, + { (char*) "US/Aleutian" , 0x05241C }, + { (char*) "US/Arizona" , 0x0527F1 }, + { (char*) "US/Central" , 0x0528ED }, + { (char*) "US/East-Indiana" , 0x052FD3 }, + { (char*) "US/Eastern" , 0x0531F2 }, + { (char*) "US/Hawaii" , 0x0538CE }, + { (char*) "US/Indiana-Starke" , 0x0539B7 }, + { (char*) "US/Michigan" , 0x053DBB }, + { (char*) "US/Mountain" , 0x05414A }, + { (char*) "US/Pacific" , 0x054568 }, + { (char*) "US/Samoa" , 0x054A82 }, + { (char*) "UTC" , 0x054B20 }, + { (char*) "W-SU" , 0x054B9B }, + { (char*) "WET" , 0x054F33 }, + { (char*) "Zulu" , 0x05512D }, }; -const unsigned char timelib_timezone_db_data_builtin[348143] = { +const unsigned char timelib_timezone_db_data_builtin[348584] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,16 +10589,44 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, -0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, -0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, -0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, -0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, +0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, +0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, +0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, +0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, +0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, +0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, +0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, +0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, +0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, +0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, +0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, +0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, +0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, +0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42840,7 +42868,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42917,7 +42945,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -69999,4 +70027,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 2a553322d800b2b170b5f5d18a720c0cd40c8f1b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Mar 2023 10:10:20 +0000 Subject: [PATCH 691/895] Updated to version 2023.2 (2023b) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++++------------------ 1 file changed, 390 insertions(+), 362 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 4219b12911224..89c62a6d4926d 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024915 }, - { (char*) "Asia/Brunei" , 0x024B8B }, - { (char*) "Asia/Calcutta" , 0x024C31 }, - { (char*) "Asia/Chita" , 0x024D19 }, - { (char*) "Asia/Choibalsan" , 0x025027 }, - { (char*) "Asia/Chongqing" , 0x0252B0 }, - { (char*) "Asia/Chungking" , 0x025445 }, - { (char*) "Asia/Colombo" , 0x0255DA }, - { (char*) "Asia/Dacca" , 0x0256DD }, - { (char*) "Asia/Damascus" , 0x0257D0 }, - { (char*) "Asia/Dhaka" , 0x025CAE }, - { (char*) "Asia/Dili" , 0x025DA1 }, - { (char*) "Asia/Dubai" , 0x025E57 }, - { (char*) "Asia/Dushanbe" , 0x025EE8 }, - { (char*) "Asia/Famagusta" , 0x026062 }, - { (char*) "Asia/Gaza" , 0x026429 }, - { (char*) "Asia/Harbin" , 0x026E15 }, - { (char*) "Asia/Hebron" , 0x026FAA }, - { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, - { (char*) "Asia/Hong_Kong" , 0x027A9F }, - { (char*) "Asia/Hovd" , 0x027DB2 }, - { (char*) "Asia/Irkutsk" , 0x02803B }, - { (char*) "Asia/Istanbul" , 0x028359 }, - { (char*) "Asia/Jakarta" , 0x028815 }, - { (char*) "Asia/Jayapura" , 0x028926 }, - { (char*) "Asia/Jerusalem" , 0x028A13 }, - { (char*) "Asia/Kabul" , 0x028E51 }, - { (char*) "Asia/Kamchatka" , 0x028EFC }, - { (char*) "Asia/Karachi" , 0x0291F1 }, - { (char*) "Asia/Kashgar" , 0x029307 }, - { (char*) "Asia/Kathmandu" , 0x029398 }, - { (char*) "Asia/Katmandu" , 0x029445 }, - { (char*) "Asia/Khandyga" , 0x0294F2 }, - { (char*) "Asia/Kolkata" , 0x029823 }, - { (char*) "Asia/Krasnoyarsk" , 0x02990B }, - { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, - { (char*) "Asia/Kuching" , 0x029D35 }, - { (char*) "Asia/Kuwait" , 0x029E8F }, - { (char*) "Asia/Macao" , 0x029F20 }, - { (char*) "Asia/Macau" , 0x02A243 }, - { (char*) "Asia/Magadan" , 0x02A566 }, - { (char*) "Asia/Makassar" , 0x02A871 }, - { (char*) "Asia/Manila" , 0x02A984 }, - { (char*) "Asia/Muscat" , 0x02AA7E }, - { (char*) "Asia/Nicosia" , 0x02AB0F }, - { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, - { (char*) "Asia/Novosibirsk" , 0x02B071 }, - { (char*) "Asia/Omsk" , 0x02B382 }, - { (char*) "Asia/Oral" , 0x02B680 }, - { (char*) "Asia/Phnom_Penh" , 0x02B90C }, - { (char*) "Asia/Pontianak" , 0x02B9E0 }, - { (char*) "Asia/Pyongyang" , 0x02BAF9 }, - { (char*) "Asia/Qatar" , 0x02BBBC }, - { (char*) "Asia/Qostanay" , 0x02BC60 }, - { (char*) "Asia/Qyzylorda" , 0x02BEED }, - { (char*) "Asia/Rangoon" , 0x02C186 }, - { (char*) "Asia/Riyadh" , 0x02C24D }, - { (char*) "Asia/Saigon" , 0x02C2DE }, - { (char*) "Asia/Sakhalin" , 0x02C3D6 }, - { (char*) "Asia/Samarkand" , 0x02C6ED }, - { (char*) "Asia/Seoul" , 0x02C878 }, - { (char*) "Asia/Shanghai" , 0x02CA23 }, - { (char*) "Asia/Singapore" , 0x02CBC4 }, - { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, - { (char*) "Asia/Taipei" , 0x02CFE0 }, - { (char*) "Asia/Tashkent" , 0x02D1EB }, - { (char*) "Asia/Tbilisi" , 0x02D376 }, - { (char*) "Asia/Tehran" , 0x02D5F7 }, - { (char*) "Asia/Tel_Aviv" , 0x02D92F }, - { (char*) "Asia/Thimbu" , 0x02DD6D }, - { (char*) "Asia/Thimphu" , 0x02DE13 }, - { (char*) "Asia/Tokyo" , 0x02DEB9 }, - { (char*) "Asia/Tomsk" , 0x02DF9A }, - { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, - { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, - { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, - { (char*) "Asia/Urumqi" , 0x02E83B }, - { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, - { (char*) "Asia/Vientiane" , 0x02EBFC }, - { (char*) "Asia/Vladivostok" , 0x02ECE2 }, - { (char*) "Asia/Yakutsk" , 0x02EFE7 }, - { (char*) "Asia/Yangon" , 0x02F2EB }, - { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, - { (char*) "Asia/Yerevan" , 0x02F6C4 }, - { (char*) "Atlantic/Azores" , 0x02F994 }, - { (char*) "Atlantic/Bermuda" , 0x02FF53 }, - { (char*) "Atlantic/Canary" , 0x03035F }, - { (char*) "Atlantic/Cape_Verde" , 0x030557 }, - { (char*) "Atlantic/Faeroe" , 0x030612 }, - { (char*) "Atlantic/Faroe" , 0x0307D7 }, - { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, - { (char*) "Atlantic/Madeira" , 0x030C69 }, - { (char*) "Atlantic/Reykjavik" , 0x031231 }, - { (char*) "Atlantic/South_Georgia" , 0x03152E }, - { (char*) "Atlantic/St_Helena" , 0x0315BE }, - { (char*) "Atlantic/Stanley" , 0x03165F }, - { (char*) "Australia/ACT" , 0x031980 }, - { (char*) "Australia/Adelaide" , 0x031D14 }, - { (char*) "Australia/Brisbane" , 0x0320C8 }, - { (char*) "Australia/Broken_Hill" , 0x03220C }, - { (char*) "Australia/Canberra" , 0x0325E1 }, - { (char*) "Australia/Currie" , 0x032975 }, - { (char*) "Australia/Darwin" , 0x032D6C }, - { (char*) "Australia/Eucla" , 0x032E74 }, - { (char*) "Australia/Hobart" , 0x032FD3 }, - { (char*) "Australia/LHI" , 0x0333D2 }, - { (char*) "Australia/Lindeman" , 0x033692 }, - { (char*) "Australia/Lord_Howe" , 0x033802 }, - { (char*) "Australia/Melbourne" , 0x033AD2 }, - { (char*) "Australia/North" , 0x033E6E }, - { (char*) "Australia/NSW" , 0x033F64 }, - { (char*) "Australia/Perth" , 0x0342F8 }, - { (char*) "Australia/Queensland" , 0x034454 }, - { (char*) "Australia/South" , 0x034581 }, - { (char*) "Australia/Sydney" , 0x034926 }, - { (char*) "Australia/Tasmania" , 0x034CD6 }, - { (char*) "Australia/Victoria" , 0x0350CD }, - { (char*) "Australia/West" , 0x035461 }, - { (char*) "Australia/Yancowinna" , 0x03559F }, - { (char*) "Brazil/Acre" , 0x035958 }, - { (char*) "Brazil/DeNoronha" , 0x035B06 }, - { (char*) "Brazil/East" , 0x035CF6 }, - { (char*) "Brazil/West" , 0x0360BA }, - { (char*) "Canada/Atlantic" , 0x036262 }, - { (char*) "Canada/Central" , 0x0368F6 }, - { (char*) "Canada/Eastern" , 0x036E10 }, - { (char*) "Canada/Mountain" , 0x0374D1 }, - { (char*) "Canada/Newfoundland" , 0x0378A7 }, - { (char*) "Canada/Pacific" , 0x038009 }, - { (char*) "Canada/Saskatchewan" , 0x038547 }, - { (char*) "Canada/Yukon" , 0x0387D1 }, - { (char*) "CET" , 0x038BE2 }, - { (char*) "Chile/Continental" , 0x038E5B }, - { (char*) "Chile/EasterIsland" , 0x0393B1 }, - { (char*) "CST6CDT" , 0x039853 }, - { (char*) "Cuba" , 0x039C16 }, - { (char*) "EET" , 0x03A07F }, - { (char*) "Egypt" , 0x03A27C }, - { (char*) "Eire" , 0x03A7A5 }, - { (char*) "EST" , 0x03AD89 }, - { (char*) "EST5EDT" , 0x03AE04 }, - { (char*) "Etc/GMT" , 0x03B1C7 }, - { (char*) "Etc/GMT+0" , 0x03B242 }, - { (char*) "Etc/GMT+1" , 0x03B2BD }, - { (char*) "Etc/GMT+10" , 0x03B33A }, - { (char*) "Etc/GMT+11" , 0x03B3B8 }, - { (char*) "Etc/GMT+12" , 0x03B436 }, - { (char*) "Etc/GMT+2" , 0x03B4B4 }, - { (char*) "Etc/GMT+3" , 0x03B531 }, - { (char*) "Etc/GMT+4" , 0x03B5AE }, - { (char*) "Etc/GMT+5" , 0x03B62B }, - { (char*) "Etc/GMT+6" , 0x03B6A8 }, - { (char*) "Etc/GMT+7" , 0x03B725 }, - { (char*) "Etc/GMT+8" , 0x03B7A2 }, - { (char*) "Etc/GMT+9" , 0x03B81F }, - { (char*) "Etc/GMT-0" , 0x03B89C }, - { (char*) "Etc/GMT-1" , 0x03B917 }, - { (char*) "Etc/GMT-10" , 0x03B995 }, - { (char*) "Etc/GMT-11" , 0x03BA14 }, - { (char*) "Etc/GMT-12" , 0x03BA93 }, - { (char*) "Etc/GMT-13" , 0x03BB12 }, - { (char*) "Etc/GMT-14" , 0x03BB91 }, - { (char*) "Etc/GMT-2" , 0x03BC10 }, - { (char*) "Etc/GMT-3" , 0x03BC8E }, - { (char*) "Etc/GMT-4" , 0x03BD0C }, - { (char*) "Etc/GMT-5" , 0x03BD8A }, - { (char*) "Etc/GMT-6" , 0x03BE08 }, - { (char*) "Etc/GMT-7" , 0x03BE86 }, - { (char*) "Etc/GMT-8" , 0x03BF04 }, - { (char*) "Etc/GMT-9" , 0x03BF82 }, - { (char*) "Etc/GMT0" , 0x03C000 }, - { (char*) "Etc/Greenwich" , 0x03C07B }, - { (char*) "Etc/UCT" , 0x03C0F6 }, - { (char*) "Etc/Universal" , 0x03C171 }, - { (char*) "Etc/UTC" , 0x03C1EC }, - { (char*) "Etc/Zulu" , 0x03C267 }, - { (char*) "Europe/Amsterdam" , 0x03C2E2 }, - { (char*) "Europe/Andorra" , 0x03C71D }, - { (char*) "Europe/Astrakhan" , 0x03C8AE }, - { (char*) "Europe/Athens" , 0x03CBA2 }, - { (char*) "Europe/Belfast" , 0x03CE58 }, - { (char*) "Europe/Belgrade" , 0x03D4A3 }, - { (char*) "Europe/Berlin" , 0x03D68D }, - { (char*) "Europe/Bratislava" , 0x03D969 }, - { (char*) "Europe/Brussels" , 0x03DC48 }, - { (char*) "Europe/Bucharest" , 0x03E0A3 }, - { (char*) "Europe/Budapest" , 0x03E344 }, - { (char*) "Europe/Busingen" , 0x03E64E }, - { (char*) "Europe/Chisinau" , 0x03E853 }, - { (char*) "Europe/Copenhagen" , 0x03EB52 }, - { (char*) "Europe/Dublin" , 0x03EDCD }, - { (char*) "Europe/Gibraltar" , 0x03F3B1 }, - { (char*) "Europe/Guernsey" , 0x03F881 }, - { (char*) "Europe/Helsinki" , 0x03FED8 }, - { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, - { (char*) "Europe/Istanbul" , 0x040710 }, - { (char*) "Europe/Jersey" , 0x040BCC }, - { (char*) "Europe/Kaliningrad" , 0x041223 }, - { (char*) "Europe/Kiev" , 0x0415CB }, - { (char*) "Europe/Kirov" , 0x041805 }, - { (char*) "Europe/Kyiv" , 0x041AFE }, - { (char*) "Europe/Lisbon" , 0x041D47 }, - { (char*) "Europe/Ljubljana" , 0x042314 }, - { (char*) "Europe/London" , 0x0424FE }, - { (char*) "Europe/Luxembourg" , 0x042B49 }, - { (char*) "Europe/Madrid" , 0x042F94 }, - { (char*) "Europe/Malta" , 0x043331 }, - { (char*) "Europe/Mariehamn" , 0x0436DD }, - { (char*) "Europe/Minsk" , 0x0438CA }, - { (char*) "Europe/Monaco" , 0x043BFE }, - { (char*) "Europe/Moscow" , 0x044064 }, - { (char*) "Europe/Nicosia" , 0x044410 }, - { (char*) "Europe/Oslo" , 0x044671 }, - { (char*) "Europe/Paris" , 0x044921 }, - { (char*) "Europe/Podgorica" , 0x044D7E }, - { (char*) "Europe/Prague" , 0x044F68 }, - { (char*) "Europe/Riga" , 0x045247 }, - { (char*) "Europe/Rome" , 0x045509 }, - { (char*) "Europe/Samara" , 0x0458C8 }, - { (char*) "Europe/San_Marino" , 0x045BC9 }, - { (char*) "Europe/Sarajevo" , 0x045F88 }, - { (char*) "Europe/Saratov" , 0x046172 }, - { (char*) "Europe/Simferopol" , 0x046464 }, - { (char*) "Europe/Skopje" , 0x0467D7 }, - { (char*) "Europe/Sofia" , 0x0469C1 }, - { (char*) "Europe/Stockholm" , 0x046C1D }, - { (char*) "Europe/Tallinn" , 0x046E1A }, - { (char*) "Europe/Tirane" , 0x0470C9 }, - { (char*) "Europe/Tiraspol" , 0x047331 }, - { (char*) "Europe/Ulyanovsk" , 0x047630 }, - { (char*) "Europe/Uzhgorod" , 0x047946 }, - { (char*) "Europe/Vaduz" , 0x047B80 }, - { (char*) "Europe/Vatican" , 0x047D6A }, - { (char*) "Europe/Vienna" , 0x048129 }, - { (char*) "Europe/Vilnius" , 0x0483C7 }, - { (char*) "Europe/Volgograd" , 0x048677 }, - { (char*) "Europe/Warsaw" , 0x048986 }, - { (char*) "Europe/Zagreb" , 0x048D2D }, - { (char*) "Europe/Zaporozhye" , 0x048F17 }, - { (char*) "Europe/Zurich" , 0x049151 }, - { (char*) "Factory" , 0x04934E }, - { (char*) "GB" , 0x0493CB }, - { (char*) "GB-Eire" , 0x049A16 }, - { (char*) "GMT" , 0x04A061 }, - { (char*) "GMT+0" , 0x04A0DC }, - { (char*) "GMT-0" , 0x04A157 }, - { (char*) "GMT0" , 0x04A1D2 }, - { (char*) "Greenwich" , 0x04A24D }, - { (char*) "Hongkong" , 0x04A2C8 }, - { (char*) "HST" , 0x04A5DB }, - { (char*) "Iceland" , 0x04A657 }, - { (char*) "Indian/Antananarivo" , 0x04A6E5 }, - { (char*) "Indian/Chagos" , 0x04A791 }, - { (char*) "Indian/Christmas" , 0x04A835 }, - { (char*) "Indian/Cocos" , 0x04A8C6 }, - { (char*) "Indian/Comoro" , 0x04A95E }, - { (char*) "Indian/Kerguelen" , 0x04A9ED }, - { (char*) "Indian/Mahe" , 0x04AA7E }, - { (char*) "Indian/Maldives" , 0x04AB0F }, - { (char*) "Indian/Mauritius" , 0x04ABB3 }, - { (char*) "Indian/Mayotte" , 0x04AC72 }, - { (char*) "Indian/Reunion" , 0x04AD01 }, - { (char*) "Iran" , 0x04AD92 }, - { (char*) "Israel" , 0x04B0CA }, - { (char*) "Jamaica" , 0x04B508 }, - { (char*) "Japan" , 0x04B667 }, - { (char*) "Kwajalein" , 0x04B748 }, - { (char*) "Libya" , 0x04B82F }, - { (char*) "MET" , 0x04B9EA }, - { (char*) "Mexico/BajaNorte" , 0x04BC63 }, - { (char*) "Mexico/BajaSur" , 0x04C070 }, - { (char*) "Mexico/General" , 0x04C34A }, - { (char*) "MST" , 0x04C65B }, - { (char*) "MST7MDT" , 0x04C6D6 }, - { (char*) "Navajo" , 0x04CA99 }, - { (char*) "NZ" , 0x04CEB7 }, - { (char*) "NZ-CHAT" , 0x04D2D6 }, - { (char*) "Pacific/Apia" , 0x04D60A }, - { (char*) "Pacific/Auckland" , 0x04D7AD }, - { (char*) "Pacific/Bougainville" , 0x04DBDF }, - { (char*) "Pacific/Chatham" , 0x04DCC0 }, - { (char*) "Pacific/Chuuk" , 0x04E003 }, - { (char*) "Pacific/Easter" , 0x04E0E1 }, - { (char*) "Pacific/Efate" , 0x04E590 }, - { (char*) "Pacific/Enderbury" , 0x04E6F2 }, - { (char*) "Pacific/Fakaofo" , 0x04E7AA }, - { (char*) "Pacific/Fiji" , 0x04E84F }, - { (char*) "Pacific/Funafuti" , 0x04E9E7 }, - { (char*) "Pacific/Galapagos" , 0x04EA79 }, - { (char*) "Pacific/Gambier" , 0x04EB45 }, - { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, - { (char*) "Pacific/Guam" , 0x04EC76 }, - { (char*) "Pacific/Honolulu" , 0x04EDE0 }, - { (char*) "Pacific/Johnston" , 0x04EECF }, - { (char*) "Pacific/Kanton" , 0x04EFB8 }, - { (char*) "Pacific/Kiritimati" , 0x04F07F }, - { (char*) "Pacific/Kosrae" , 0x04F145 }, - { (char*) "Pacific/Kwajalein" , 0x04F249 }, - { (char*) "Pacific/Majuro" , 0x04F339 }, - { (char*) "Pacific/Marquesas" , 0x04F437 }, - { (char*) "Pacific/Midway" , 0x04F4DF }, - { (char*) "Pacific/Nauru" , 0x04F5A2 }, - { (char*) "Pacific/Niue" , 0x04F665 }, - { (char*) "Pacific/Norfolk" , 0x04F70B }, - { (char*) "Pacific/Noumea" , 0x04F80E }, - { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, - { (char*) "Pacific/Palau" , 0x04F97E }, - { (char*) "Pacific/Pitcairn" , 0x04FA1E }, - { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, - { (char*) "Pacific/Ponape" , 0x04FBB3 }, - { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, - { (char*) "Pacific/Rarotonga" , 0x04FD03 }, - { (char*) "Pacific/Saipan" , 0x04FEA5 }, - { (char*) "Pacific/Samoa" , 0x050006 }, - { (char*) "Pacific/Tahiti" , 0x0500A4 }, - { (char*) "Pacific/Tarawa" , 0x050144 }, - { (char*) "Pacific/Tongatapu" , 0x0501E5 }, - { (char*) "Pacific/Truk" , 0x0502DE }, - { (char*) "Pacific/Wake" , 0x050384 }, - { (char*) "Pacific/Wallis" , 0x050421 }, - { (char*) "Pacific/Yap" , 0x0504B3 }, - { (char*) "Poland" , 0x050559 }, - { (char*) "Portugal" , 0x050900 }, - { (char*) "PRC" , 0x050EBA }, - { (char*) "PST8PDT" , 0x05104F }, - { (char*) "ROC" , 0x051412 }, - { (char*) "ROK" , 0x05161D }, - { (char*) "Singapore" , 0x0517C8 }, - { (char*) "Turkey" , 0x0518D4 }, - { (char*) "UCT" , 0x051D90 }, - { (char*) "Universal" , 0x051E0B }, - { (char*) "US/Alaska" , 0x051E86 }, - { (char*) "US/Aleutian" , 0x052263 }, - { (char*) "US/Arizona" , 0x052638 }, - { (char*) "US/Central" , 0x052734 }, - { (char*) "US/East-Indiana" , 0x052E1A }, - { (char*) "US/Eastern" , 0x053039 }, - { (char*) "US/Hawaii" , 0x053715 }, - { (char*) "US/Indiana-Starke" , 0x0537FE }, - { (char*) "US/Michigan" , 0x053C02 }, - { (char*) "US/Mountain" , 0x053F91 }, - { (char*) "US/Pacific" , 0x0543AF }, - { (char*) "US/Samoa" , 0x0548C9 }, - { (char*) "UTC" , 0x054967 }, - { (char*) "W-SU" , 0x0549E2 }, - { (char*) "WET" , 0x054D7A }, - { (char*) "Zulu" , 0x054F74 }, + { (char*) "Asia/Bishkek" , 0x024ACE }, + { (char*) "Asia/Brunei" , 0x024D44 }, + { (char*) "Asia/Calcutta" , 0x024DEA }, + { (char*) "Asia/Chita" , 0x024ED2 }, + { (char*) "Asia/Choibalsan" , 0x0251E0 }, + { (char*) "Asia/Chongqing" , 0x025469 }, + { (char*) "Asia/Chungking" , 0x0255FE }, + { (char*) "Asia/Colombo" , 0x025793 }, + { (char*) "Asia/Dacca" , 0x025896 }, + { (char*) "Asia/Damascus" , 0x025989 }, + { (char*) "Asia/Dhaka" , 0x025E67 }, + { (char*) "Asia/Dili" , 0x025F5A }, + { (char*) "Asia/Dubai" , 0x026010 }, + { (char*) "Asia/Dushanbe" , 0x0260A1 }, + { (char*) "Asia/Famagusta" , 0x02621B }, + { (char*) "Asia/Gaza" , 0x0265E2 }, + { (char*) "Asia/Harbin" , 0x026FCE }, + { (char*) "Asia/Hebron" , 0x027163 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, + { (char*) "Asia/Hong_Kong" , 0x027C58 }, + { (char*) "Asia/Hovd" , 0x027F6B }, + { (char*) "Asia/Irkutsk" , 0x0281F4 }, + { (char*) "Asia/Istanbul" , 0x028512 }, + { (char*) "Asia/Jakarta" , 0x0289CE }, + { (char*) "Asia/Jayapura" , 0x028ADF }, + { (char*) "Asia/Jerusalem" , 0x028BCC }, + { (char*) "Asia/Kabul" , 0x02900A }, + { (char*) "Asia/Kamchatka" , 0x0290B5 }, + { (char*) "Asia/Karachi" , 0x0293AA }, + { (char*) "Asia/Kashgar" , 0x0294C0 }, + { (char*) "Asia/Kathmandu" , 0x029551 }, + { (char*) "Asia/Katmandu" , 0x0295FE }, + { (char*) "Asia/Khandyga" , 0x0296AB }, + { (char*) "Asia/Kolkata" , 0x0299DC }, + { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, + { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, + { (char*) "Asia/Kuching" , 0x029EEE }, + { (char*) "Asia/Kuwait" , 0x02A048 }, + { (char*) "Asia/Macao" , 0x02A0D9 }, + { (char*) "Asia/Macau" , 0x02A3FC }, + { (char*) "Asia/Magadan" , 0x02A71F }, + { (char*) "Asia/Makassar" , 0x02AA2A }, + { (char*) "Asia/Manila" , 0x02AB3D }, + { (char*) "Asia/Muscat" , 0x02AC37 }, + { (char*) "Asia/Nicosia" , 0x02ACC8 }, + { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, + { (char*) "Asia/Novosibirsk" , 0x02B22A }, + { (char*) "Asia/Omsk" , 0x02B53B }, + { (char*) "Asia/Oral" , 0x02B839 }, + { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, + { (char*) "Asia/Pontianak" , 0x02BB99 }, + { (char*) "Asia/Pyongyang" , 0x02BCB2 }, + { (char*) "Asia/Qatar" , 0x02BD75 }, + { (char*) "Asia/Qostanay" , 0x02BE19 }, + { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, + { (char*) "Asia/Rangoon" , 0x02C33F }, + { (char*) "Asia/Riyadh" , 0x02C406 }, + { (char*) "Asia/Saigon" , 0x02C497 }, + { (char*) "Asia/Sakhalin" , 0x02C58F }, + { (char*) "Asia/Samarkand" , 0x02C8A6 }, + { (char*) "Asia/Seoul" , 0x02CA31 }, + { (char*) "Asia/Shanghai" , 0x02CBDC }, + { (char*) "Asia/Singapore" , 0x02CD7D }, + { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, + { (char*) "Asia/Taipei" , 0x02D199 }, + { (char*) "Asia/Tashkent" , 0x02D3A4 }, + { (char*) "Asia/Tbilisi" , 0x02D52F }, + { (char*) "Asia/Tehran" , 0x02D7B0 }, + { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, + { (char*) "Asia/Thimbu" , 0x02DF26 }, + { (char*) "Asia/Thimphu" , 0x02DFCC }, + { (char*) "Asia/Tokyo" , 0x02E072 }, + { (char*) "Asia/Tomsk" , 0x02E153 }, + { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, + { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, + { (char*) "Asia/Ulan_Bator" , 0x02E796 }, + { (char*) "Asia/Urumqi" , 0x02E9F4 }, + { (char*) "Asia/Ust-Nera" , 0x02EA92 }, + { (char*) "Asia/Vientiane" , 0x02EDB5 }, + { (char*) "Asia/Vladivostok" , 0x02EE9B }, + { (char*) "Asia/Yakutsk" , 0x02F1A0 }, + { (char*) "Asia/Yangon" , 0x02F4A4 }, + { (char*) "Asia/Yekaterinburg" , 0x02F56B }, + { (char*) "Asia/Yerevan" , 0x02F87D }, + { (char*) "Atlantic/Azores" , 0x02FB4D }, + { (char*) "Atlantic/Bermuda" , 0x03010C }, + { (char*) "Atlantic/Canary" , 0x030518 }, + { (char*) "Atlantic/Cape_Verde" , 0x030710 }, + { (char*) "Atlantic/Faeroe" , 0x0307CB }, + { (char*) "Atlantic/Faroe" , 0x030990 }, + { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, + { (char*) "Atlantic/Madeira" , 0x030E22 }, + { (char*) "Atlantic/Reykjavik" , 0x0313EA }, + { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, + { (char*) "Atlantic/St_Helena" , 0x031777 }, + { (char*) "Atlantic/Stanley" , 0x031818 }, + { (char*) "Australia/ACT" , 0x031B39 }, + { (char*) "Australia/Adelaide" , 0x031ECD }, + { (char*) "Australia/Brisbane" , 0x032281 }, + { (char*) "Australia/Broken_Hill" , 0x0323C5 }, + { (char*) "Australia/Canberra" , 0x03279A }, + { (char*) "Australia/Currie" , 0x032B2E }, + { (char*) "Australia/Darwin" , 0x032F25 }, + { (char*) "Australia/Eucla" , 0x03302D }, + { (char*) "Australia/Hobart" , 0x03318C }, + { (char*) "Australia/LHI" , 0x03358B }, + { (char*) "Australia/Lindeman" , 0x03384B }, + { (char*) "Australia/Lord_Howe" , 0x0339BB }, + { (char*) "Australia/Melbourne" , 0x033C8B }, + { (char*) "Australia/North" , 0x034027 }, + { (char*) "Australia/NSW" , 0x03411D }, + { (char*) "Australia/Perth" , 0x0344B1 }, + { (char*) "Australia/Queensland" , 0x03460D }, + { (char*) "Australia/South" , 0x03473A }, + { (char*) "Australia/Sydney" , 0x034ADF }, + { (char*) "Australia/Tasmania" , 0x034E8F }, + { (char*) "Australia/Victoria" , 0x035286 }, + { (char*) "Australia/West" , 0x03561A }, + { (char*) "Australia/Yancowinna" , 0x035758 }, + { (char*) "Brazil/Acre" , 0x035B11 }, + { (char*) "Brazil/DeNoronha" , 0x035CBF }, + { (char*) "Brazil/East" , 0x035EAF }, + { (char*) "Brazil/West" , 0x036273 }, + { (char*) "Canada/Atlantic" , 0x03641B }, + { (char*) "Canada/Central" , 0x036AAF }, + { (char*) "Canada/Eastern" , 0x036FC9 }, + { (char*) "Canada/Mountain" , 0x03768A }, + { (char*) "Canada/Newfoundland" , 0x037A60 }, + { (char*) "Canada/Pacific" , 0x0381C2 }, + { (char*) "Canada/Saskatchewan" , 0x038700 }, + { (char*) "Canada/Yukon" , 0x03898A }, + { (char*) "CET" , 0x038D9B }, + { (char*) "Chile/Continental" , 0x039014 }, + { (char*) "Chile/EasterIsland" , 0x03956A }, + { (char*) "CST6CDT" , 0x039A0C }, + { (char*) "Cuba" , 0x039DCF }, + { (char*) "EET" , 0x03A238 }, + { (char*) "Egypt" , 0x03A435 }, + { (char*) "Eire" , 0x03A95E }, + { (char*) "EST" , 0x03AF42 }, + { (char*) "EST5EDT" , 0x03AFBD }, + { (char*) "Etc/GMT" , 0x03B380 }, + { (char*) "Etc/GMT+0" , 0x03B3FB }, + { (char*) "Etc/GMT+1" , 0x03B476 }, + { (char*) "Etc/GMT+10" , 0x03B4F3 }, + { (char*) "Etc/GMT+11" , 0x03B571 }, + { (char*) "Etc/GMT+12" , 0x03B5EF }, + { (char*) "Etc/GMT+2" , 0x03B66D }, + { (char*) "Etc/GMT+3" , 0x03B6EA }, + { (char*) "Etc/GMT+4" , 0x03B767 }, + { (char*) "Etc/GMT+5" , 0x03B7E4 }, + { (char*) "Etc/GMT+6" , 0x03B861 }, + { (char*) "Etc/GMT+7" , 0x03B8DE }, + { (char*) "Etc/GMT+8" , 0x03B95B }, + { (char*) "Etc/GMT+9" , 0x03B9D8 }, + { (char*) "Etc/GMT-0" , 0x03BA55 }, + { (char*) "Etc/GMT-1" , 0x03BAD0 }, + { (char*) "Etc/GMT-10" , 0x03BB4E }, + { (char*) "Etc/GMT-11" , 0x03BBCD }, + { (char*) "Etc/GMT-12" , 0x03BC4C }, + { (char*) "Etc/GMT-13" , 0x03BCCB }, + { (char*) "Etc/GMT-14" , 0x03BD4A }, + { (char*) "Etc/GMT-2" , 0x03BDC9 }, + { (char*) "Etc/GMT-3" , 0x03BE47 }, + { (char*) "Etc/GMT-4" , 0x03BEC5 }, + { (char*) "Etc/GMT-5" , 0x03BF43 }, + { (char*) "Etc/GMT-6" , 0x03BFC1 }, + { (char*) "Etc/GMT-7" , 0x03C03F }, + { (char*) "Etc/GMT-8" , 0x03C0BD }, + { (char*) "Etc/GMT-9" , 0x03C13B }, + { (char*) "Etc/GMT0" , 0x03C1B9 }, + { (char*) "Etc/Greenwich" , 0x03C234 }, + { (char*) "Etc/UCT" , 0x03C2AF }, + { (char*) "Etc/Universal" , 0x03C32A }, + { (char*) "Etc/UTC" , 0x03C3A5 }, + { (char*) "Etc/Zulu" , 0x03C420 }, + { (char*) "Europe/Amsterdam" , 0x03C49B }, + { (char*) "Europe/Andorra" , 0x03C8D6 }, + { (char*) "Europe/Astrakhan" , 0x03CA67 }, + { (char*) "Europe/Athens" , 0x03CD5B }, + { (char*) "Europe/Belfast" , 0x03D011 }, + { (char*) "Europe/Belgrade" , 0x03D65C }, + { (char*) "Europe/Berlin" , 0x03D846 }, + { (char*) "Europe/Bratislava" , 0x03DB22 }, + { (char*) "Europe/Brussels" , 0x03DE01 }, + { (char*) "Europe/Bucharest" , 0x03E25C }, + { (char*) "Europe/Budapest" , 0x03E4FD }, + { (char*) "Europe/Busingen" , 0x03E807 }, + { (char*) "Europe/Chisinau" , 0x03EA0C }, + { (char*) "Europe/Copenhagen" , 0x03ED0B }, + { (char*) "Europe/Dublin" , 0x03EF86 }, + { (char*) "Europe/Gibraltar" , 0x03F56A }, + { (char*) "Europe/Guernsey" , 0x03FA3A }, + { (char*) "Europe/Helsinki" , 0x040091 }, + { (char*) "Europe/Isle_of_Man" , 0x04027E }, + { (char*) "Europe/Istanbul" , 0x0408C9 }, + { (char*) "Europe/Jersey" , 0x040D85 }, + { (char*) "Europe/Kaliningrad" , 0x0413DC }, + { (char*) "Europe/Kiev" , 0x041784 }, + { (char*) "Europe/Kirov" , 0x0419BE }, + { (char*) "Europe/Kyiv" , 0x041CB7 }, + { (char*) "Europe/Lisbon" , 0x041F00 }, + { (char*) "Europe/Ljubljana" , 0x0424CD }, + { (char*) "Europe/London" , 0x0426B7 }, + { (char*) "Europe/Luxembourg" , 0x042D02 }, + { (char*) "Europe/Madrid" , 0x04314D }, + { (char*) "Europe/Malta" , 0x0434EA }, + { (char*) "Europe/Mariehamn" , 0x043896 }, + { (char*) "Europe/Minsk" , 0x043A83 }, + { (char*) "Europe/Monaco" , 0x043DB7 }, + { (char*) "Europe/Moscow" , 0x04421D }, + { (char*) "Europe/Nicosia" , 0x0445C9 }, + { (char*) "Europe/Oslo" , 0x04482A }, + { (char*) "Europe/Paris" , 0x044ADA }, + { (char*) "Europe/Podgorica" , 0x044F37 }, + { (char*) "Europe/Prague" , 0x045121 }, + { (char*) "Europe/Riga" , 0x045400 }, + { (char*) "Europe/Rome" , 0x0456C2 }, + { (char*) "Europe/Samara" , 0x045A81 }, + { (char*) "Europe/San_Marino" , 0x045D82 }, + { (char*) "Europe/Sarajevo" , 0x046141 }, + { (char*) "Europe/Saratov" , 0x04632B }, + { (char*) "Europe/Simferopol" , 0x04661D }, + { (char*) "Europe/Skopje" , 0x046990 }, + { (char*) "Europe/Sofia" , 0x046B7A }, + { (char*) "Europe/Stockholm" , 0x046DD6 }, + { (char*) "Europe/Tallinn" , 0x046FD3 }, + { (char*) "Europe/Tirane" , 0x047282 }, + { (char*) "Europe/Tiraspol" , 0x0474EA }, + { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, + { (char*) "Europe/Uzhgorod" , 0x047AFF }, + { (char*) "Europe/Vaduz" , 0x047D39 }, + { (char*) "Europe/Vatican" , 0x047F23 }, + { (char*) "Europe/Vienna" , 0x0482E2 }, + { (char*) "Europe/Vilnius" , 0x048580 }, + { (char*) "Europe/Volgograd" , 0x048830 }, + { (char*) "Europe/Warsaw" , 0x048B3F }, + { (char*) "Europe/Zagreb" , 0x048EE6 }, + { (char*) "Europe/Zaporozhye" , 0x0490D0 }, + { (char*) "Europe/Zurich" , 0x04930A }, + { (char*) "Factory" , 0x049507 }, + { (char*) "GB" , 0x049584 }, + { (char*) "GB-Eire" , 0x049BCF }, + { (char*) "GMT" , 0x04A21A }, + { (char*) "GMT+0" , 0x04A295 }, + { (char*) "GMT-0" , 0x04A310 }, + { (char*) "GMT0" , 0x04A38B }, + { (char*) "Greenwich" , 0x04A406 }, + { (char*) "Hongkong" , 0x04A481 }, + { (char*) "HST" , 0x04A794 }, + { (char*) "Iceland" , 0x04A810 }, + { (char*) "Indian/Antananarivo" , 0x04A89E }, + { (char*) "Indian/Chagos" , 0x04A94A }, + { (char*) "Indian/Christmas" , 0x04A9EE }, + { (char*) "Indian/Cocos" , 0x04AA7F }, + { (char*) "Indian/Comoro" , 0x04AB17 }, + { (char*) "Indian/Kerguelen" , 0x04ABA6 }, + { (char*) "Indian/Mahe" , 0x04AC37 }, + { (char*) "Indian/Maldives" , 0x04ACC8 }, + { (char*) "Indian/Mauritius" , 0x04AD6C }, + { (char*) "Indian/Mayotte" , 0x04AE2B }, + { (char*) "Indian/Reunion" , 0x04AEBA }, + { (char*) "Iran" , 0x04AF4B }, + { (char*) "Israel" , 0x04B283 }, + { (char*) "Jamaica" , 0x04B6C1 }, + { (char*) "Japan" , 0x04B820 }, + { (char*) "Kwajalein" , 0x04B901 }, + { (char*) "Libya" , 0x04B9E8 }, + { (char*) "MET" , 0x04BBA3 }, + { (char*) "Mexico/BajaNorte" , 0x04BE1C }, + { (char*) "Mexico/BajaSur" , 0x04C229 }, + { (char*) "Mexico/General" , 0x04C503 }, + { (char*) "MST" , 0x04C814 }, + { (char*) "MST7MDT" , 0x04C88F }, + { (char*) "Navajo" , 0x04CC52 }, + { (char*) "NZ" , 0x04D070 }, + { (char*) "NZ-CHAT" , 0x04D48F }, + { (char*) "Pacific/Apia" , 0x04D7C3 }, + { (char*) "Pacific/Auckland" , 0x04D966 }, + { (char*) "Pacific/Bougainville" , 0x04DD98 }, + { (char*) "Pacific/Chatham" , 0x04DE79 }, + { (char*) "Pacific/Chuuk" , 0x04E1BC }, + { (char*) "Pacific/Easter" , 0x04E29A }, + { (char*) "Pacific/Efate" , 0x04E749 }, + { (char*) "Pacific/Enderbury" , 0x04E8AB }, + { (char*) "Pacific/Fakaofo" , 0x04E963 }, + { (char*) "Pacific/Fiji" , 0x04EA08 }, + { (char*) "Pacific/Funafuti" , 0x04EBA0 }, + { (char*) "Pacific/Galapagos" , 0x04EC32 }, + { (char*) "Pacific/Gambier" , 0x04ECFE }, + { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, + { (char*) "Pacific/Guam" , 0x04EE2F }, + { (char*) "Pacific/Honolulu" , 0x04EF99 }, + { (char*) "Pacific/Johnston" , 0x04F088 }, + { (char*) "Pacific/Kanton" , 0x04F171 }, + { (char*) "Pacific/Kiritimati" , 0x04F238 }, + { (char*) "Pacific/Kosrae" , 0x04F2FE }, + { (char*) "Pacific/Kwajalein" , 0x04F402 }, + { (char*) "Pacific/Majuro" , 0x04F4F2 }, + { (char*) "Pacific/Marquesas" , 0x04F5F0 }, + { (char*) "Pacific/Midway" , 0x04F698 }, + { (char*) "Pacific/Nauru" , 0x04F75B }, + { (char*) "Pacific/Niue" , 0x04F81E }, + { (char*) "Pacific/Norfolk" , 0x04F8C4 }, + { (char*) "Pacific/Noumea" , 0x04F9C7 }, + { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, + { (char*) "Pacific/Palau" , 0x04FB37 }, + { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, + { (char*) "Pacific/Pohnpei" , 0x04FC7C }, + { (char*) "Pacific/Ponape" , 0x04FD6C }, + { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, + { (char*) "Pacific/Rarotonga" , 0x04FEBC }, + { (char*) "Pacific/Saipan" , 0x05005E }, + { (char*) "Pacific/Samoa" , 0x0501BF }, + { (char*) "Pacific/Tahiti" , 0x05025D }, + { (char*) "Pacific/Tarawa" , 0x0502FD }, + { (char*) "Pacific/Tongatapu" , 0x05039E }, + { (char*) "Pacific/Truk" , 0x050497 }, + { (char*) "Pacific/Wake" , 0x05053D }, + { (char*) "Pacific/Wallis" , 0x0505DA }, + { (char*) "Pacific/Yap" , 0x05066C }, + { (char*) "Poland" , 0x050712 }, + { (char*) "Portugal" , 0x050AB9 }, + { (char*) "PRC" , 0x051073 }, + { (char*) "PST8PDT" , 0x051208 }, + { (char*) "ROC" , 0x0515CB }, + { (char*) "ROK" , 0x0517D6 }, + { (char*) "Singapore" , 0x051981 }, + { (char*) "Turkey" , 0x051A8D }, + { (char*) "UCT" , 0x051F49 }, + { (char*) "Universal" , 0x051FC4 }, + { (char*) "US/Alaska" , 0x05203F }, + { (char*) "US/Aleutian" , 0x05241C }, + { (char*) "US/Arizona" , 0x0527F1 }, + { (char*) "US/Central" , 0x0528ED }, + { (char*) "US/East-Indiana" , 0x052FD3 }, + { (char*) "US/Eastern" , 0x0531F2 }, + { (char*) "US/Hawaii" , 0x0538CE }, + { (char*) "US/Indiana-Starke" , 0x0539B7 }, + { (char*) "US/Michigan" , 0x053DBB }, + { (char*) "US/Mountain" , 0x05414A }, + { (char*) "US/Pacific" , 0x054568 }, + { (char*) "US/Samoa" , 0x054A82 }, + { (char*) "UTC" , 0x054B20 }, + { (char*) "W-SU" , 0x054B9B }, + { (char*) "WET" , 0x054F33 }, + { (char*) "Zulu" , 0x05512D }, }; -const unsigned char timelib_timezone_db_data_builtin[348143] = { +const unsigned char timelib_timezone_db_data_builtin[348584] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,16 +10589,44 @@ const unsigned char timelib_timezone_db_data_builtin[348143] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, -0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, -0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, -0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, -0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, -0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, +0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, +0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, +0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, +0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, +0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, +0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, +0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, +0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, +0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, +0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, +0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, +0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, +0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, +0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, +0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, +0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42840,7 +42868,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42917,7 +42945,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -69999,4 +70027,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From ff183ad92381012aa330e23211d0d02dbfd7c5e8 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 24 Mar 2023 11:16:59 +0000 Subject: [PATCH 692/895] Add me to the CODEOWNERS Added myself to fpm, json, openssl and main. I have contributed or was looking to various parts in main even though I don't know every single file there. Happy to maintain it though. --- CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index f2028f171806b..c7257a7196480 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -17,12 +17,16 @@ /ext/ffi @dstogov /ext/gmp @Girgias /ext/imap @Girgias +/ext/json @bukka /ext/opcache @dstogov @iluuu1994 +/ext/openssl @bukka /ext/pgsql @devnexen /ext/random @TimWolla /ext/session @Girgias /ext/sockets @devnexen /ext/spl @Girgias +/main @bukka +/sapi/fpm @bukka /Zend @iluuu1994 /Zend/Optimizer @dstogov /Zend/zend.* @dstogov From 8930bf8c33251f8a1d8ca8067937f0ed2990a78f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:49:37 +0100 Subject: [PATCH 693/895] Fix GH-8979: Possible Memory Leak with SSL-enabled MySQL connections The stream context inside `mysqlnd_vio::enable_ssl()` is leaking. In particular: when `php_stream_context_set()` get called the refcount of `context` is increased by 1, which means that `context` will now have a refcount of 2. Later on we remove the context from the stream by calling `php_stream_context_set(stream, NULL)` but that leaves our `context` with a refcount of 1, and therefore it's never destroyed. In my test case this yielded a leak of 1456 bytes per connection (but could be more depending on your settings ofc). Annoyingly, Valgrind doesn't find it because the context is still in the `EG(regular_list)` and will thus be destroyed at the end of the request. However, I still think this bug needs to be fixed because as the users in the issue report already mentioned: there can be long-running PHP scripts. Fix it by decreasing the refcount to transfer the ownership. Closes GH-10909. --- NEWS | 4 ++++ ext/mysqlnd/mysqlnd_vio.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 244c2df19cd33..ab24c4401d31a 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,10 @@ PHP NEWS . Fixed bug GH-10521 (ftp_get/ftp_nb_get resumepos offset is maximum 10GB). (nielsdos) +- MySQLnd: + . Fixed bug GH-8979 (Possible Memory Leak with SSL-enabled MySQL + connections). (nielsdos) + - Opcache: . Fixed build for macOS to cater with pkg-config settings. (David Carlier) . Fixed bug GH-8065 (opcache.consistency_checks > 0 causes segfaults in diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index e2194bca136a1..2bd77906a1b9a 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -561,6 +561,10 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) } } php_stream_context_set(net_stream, context); + /* php_stream_context_set() increases the refcount of context, but we just want to transfer ownership + * hence the need to decrease the refcount so the refcount will be equal to 1. */ + ZEND_ASSERT(GC_REFCOUNT(context->res) == 2); + GC_DELREF(context->res); if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 || php_stream_xport_crypto_enable(net_stream, 1) < 0) { From a082696699e28dbd84f2f9aa3129a6b502142bcc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:44:54 +0100 Subject: [PATCH 694/895] Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4 The properties table can also contain numeric entries after a rebuild of the table based on the array. Since the array can only contain numeric entries, and the properties table can contain a mix of both, we'll add the numeric entries from the array and only the string entries from the properties table. To implement this we simply check if the key from the properties table is a string. Closes GH-10921. --- NEWS | 2 + ext/spl/spl_fixedarray.c | 9 ++- ext/spl/tests/gh10907.phpt | 139 +++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 ext/spl/tests/gh10907.phpt diff --git a/NEWS b/NEWS index 271cdede47c72..e5cb7bb60f44f 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,8 @@ PHP NEWS - SPL: . Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman) + . Fixed bug GH-10907 (Unable to serialize processed SplFixedArrays in + PHP 8.2.4). (nielsdos) - Standard: . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index cf304e738a4da..bf9ec4e695fb4 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -611,8 +611,13 @@ PHP_METHOD(SplFixedArray, __serialize) /* members */ if (intern->std.properties) { ZEND_HASH_FOREACH_STR_KEY_VAL(intern->std.properties, key, current) { - zend_hash_add(Z_ARRVAL_P(return_value), key, current); - Z_TRY_ADDREF_P(current); + /* The properties hash table can also contain the array elements if the properties table was already rebuilt. + * In this case we'd have a NULL key. We can't simply use the properties table in all cases because it's + * potentially out of sync (missing elements, or containing removed elements) and might need a rebuild. */ + if (key != NULL) { + zend_hash_add_new(Z_ARRVAL_P(return_value), key, current); + Z_TRY_ADDREF_P(current); + } } ZEND_HASH_FOREACH_END(); } } diff --git a/ext/spl/tests/gh10907.phpt b/ext/spl/tests/gh10907.phpt new file mode 100644 index 0000000000000..034c5f1d5a33c --- /dev/null +++ b/ext/spl/tests/gh10907.phpt @@ -0,0 +1,139 @@ +--TEST-- +GH-10907 (Unable to serialize processed SplFixedArrays in PHP 8.2.4) +--FILE-- +my_dynamic_property = "my_dynamic_property_value"; +$array[0] = "test value 1"; +$array[1] = "test value 2"; +var_dump(serialize($array)); +var_dump(unserialize(serialize($array))); +var_dump($array); +?> +--EXPECT-- +Test without rebuilding properties +string(73) "O:13:"SplFixedArray":2:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";}" +object(SplFixedArray)#2 (2) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" +} +object(SplFixedArray)#1 (2) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" +} +================= +Test with rebuilding properties +object(SplFixedArray)#2 (2) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" +} +string(73) "O:13:"SplFixedArray":2:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";}" +object(SplFixedArray)#1 (2) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" +} +object(SplFixedArray)#2 (2) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" +} +================= +Test with partially rebuilding properties +object(SplFixedArray)#1 (3) { + [0]=> + string(12) "test value 1" + [1]=> + NULL + [2]=> + NULL +} +string(79) "O:13:"SplFixedArray":3:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;}" +object(SplFixedArray)#2 (3) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" + [2]=> + NULL +} +object(SplFixedArray)#1 (3) { + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" + [2]=> + NULL +} +================= +Test with adding members +string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" +object(MySplFixedArray)#1 (5) { + ["my_string"]=> + int(0) + ["my_dynamic_property"]=> + string(25) "my_dynamic_property_value" + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" + [2]=> + NULL +} +object(MySplFixedArray)#2 (5) { + ["my_string"]=> + string(15) "my_string_value" + ["my_dynamic_property"]=> + string(25) "my_dynamic_property_value" + [0]=> + string(12) "test value 1" + [1]=> + string(12) "test value 2" + [2]=> + NULL +} From 01cb6fb65af11204ad65ba2f5e4ebf3641eee7b8 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 24 Mar 2023 19:04:52 +0100 Subject: [PATCH 695/895] Fix test for GH-10907 with output in different order for master branch --- ext/spl/tests/gh10907.phpt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/spl/tests/gh10907.phpt b/ext/spl/tests/gh10907.phpt index 034c5f1d5a33c..b154688ff7c59 100644 --- a/ext/spl/tests/gh10907.phpt +++ b/ext/spl/tests/gh10907.phpt @@ -114,26 +114,26 @@ object(SplFixedArray)#1 (3) { Test with adding members string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" object(MySplFixedArray)#1 (5) { - ["my_string"]=> - int(0) - ["my_dynamic_property"]=> - string(25) "my_dynamic_property_value" [0]=> string(12) "test value 1" [1]=> string(12) "test value 2" [2]=> NULL -} -object(MySplFixedArray)#2 (5) { ["my_string"]=> - string(15) "my_string_value" + int(0) ["my_dynamic_property"]=> string(25) "my_dynamic_property_value" +} +object(MySplFixedArray)#2 (5) { [0]=> string(12) "test value 1" [1]=> string(12) "test value 2" [2]=> NULL + ["my_string"]=> + string(15) "my_string_value" + ["my_dynamic_property"]=> + string(25) "my_dynamic_property_value" } From 6fc8d014dfce03121bb04b0e5ae1eea6c7e1f801 Mon Sep 17 00:00:00 2001 From: pakutoma Date: Wed, 22 Mar 2023 02:09:14 +0900 Subject: [PATCH 696/895] Fix phpGH-10648: add check function pointer into mbfl_encoding Previously, mbstring used the same logic for encoding validation as for encoding conversion. However, there are cases where we want to use different logic for validation and conversion. For example, if a string ends up with missing input required by the encoding, or if a character is input that is invalid as an encoding but can be converted, the conversion should succeed and the validation should fail. To achieve this, a function pointer mb_check_fn has been added to struct mbfl_encoding to implement the logic used for validation. Also, added implementation of validation logic for UTF-7, UTF7-IMAP, ISO-2022-JP and JIS. --- UPGRADING | 10 + ext/mbstring/libmbfl/filters/mbfilter_7bit.c | 3 +- .../libmbfl/filters/mbfilter_base64.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 6 +- .../libmbfl/filters/mbfilter_cp5022x.c | 9 +- .../libmbfl/filters/mbfilter_cp51932.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_cp932.c | 6 +- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 3 +- .../libmbfl/filters/mbfilter_euc_cn.c | 3 +- .../libmbfl/filters/mbfilter_euc_jp.c | 3 +- .../libmbfl/filters/mbfilter_euc_jp_win.c | 3 +- .../libmbfl/filters/mbfilter_euc_kr.c | 3 +- .../libmbfl/filters/mbfilter_euc_tw.c | 3 +- .../libmbfl/filters/mbfilter_gb18030.c | 3 +- .../libmbfl/filters/mbfilter_htmlent.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_hz.c | 3 +- .../libmbfl/filters/mbfilter_iso2022_jp_ms.c | 3 +- .../libmbfl/filters/mbfilter_iso2022_kr.c | 3 +- .../filters/mbfilter_iso2022jp_mobile.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_jis.c | 164 +++++- .../libmbfl/filters/mbfilter_qprint.c | 3 +- .../libmbfl/filters/mbfilter_singlebyte.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 3 +- .../libmbfl/filters/mbfilter_sjis_2004.c | 9 +- .../libmbfl/filters/mbfilter_sjis_mac.c | 3 +- .../libmbfl/filters/mbfilter_sjis_mobile.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_ucs2.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_ucs4.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_utf32.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 158 ++++- .../libmbfl/filters/mbfilter_utf7imap.c | 130 ++++- ext/mbstring/libmbfl/filters/mbfilter_utf8.c | 3 +- .../libmbfl/filters/mbfilter_utf8_mobile.c | 12 +- .../libmbfl/filters/mbfilter_uuencode.c | 3 +- ext/mbstring/libmbfl/filters/utf7_helper.h | 22 + ext/mbstring/libmbfl/mbfl/mbfilter.c | 10 + ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c | 3 +- ext/mbstring/libmbfl/mbfl/mbfilter_pass.c | 1 + ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c | 1 + ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 2 + ext/mbstring/mbstring.c | 4 + ext/mbstring/tests/gh10192_utf7.phpt | 542 ++++++++++++++++++ ext/mbstring/tests/gh10192_utf7imap.phpt | 423 ++++++++++++++ ext/mbstring/tests/gh10648.phpt | 155 +++++ ext/mbstring/tests/iso2022jp_encoding.phpt | 68 +-- ext/mbstring/tests/utf_encodings.phpt | 13 +- 48 files changed, 1745 insertions(+), 114 deletions(-) create mode 100644 ext/mbstring/libmbfl/filters/utf7_helper.h create mode 100644 ext/mbstring/tests/gh10192_utf7.phpt create mode 100644 ext/mbstring/tests/gh10192_utf7imap.phpt create mode 100644 ext/mbstring/tests/gh10648.phpt diff --git a/UPGRADING b/UPGRADING index 744fa57c1c8dc..05b33b231ee34 100644 --- a/UPGRADING +++ b/UPGRADING @@ -218,6 +218,16 @@ PHP 8.2 UPGRADE NOTES dba_fetch(string|array $key, $skip, $dba): string|false is still accepted, but it is recommended to use the new standard variant. +- MBString + . mb_check_encoding() now checks input encoding more strictly. + . mb_detect_encoding() now checks input encoding more strictly + when strict detection is enabled. + . mb_convert_encoding() checks the input encoding more strictly + if multiple encodings are passed to from_encoding + and the mbstring.strict_detection INI directive is set to 1. + This change only affects the encoding selection, + not the result of the conversion. + - Random . random_bytes() and random_int() now throw \Random\RandomException on CSPRNG failure. Previously a plain \Exception was thrown. diff --git a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c index a611a4e09b153..54744aa4b8ed7 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c @@ -64,7 +64,8 @@ const mbfl_encoding mbfl_encoding_7bit = { &vtbl_7bit_wchar, &vtbl_wchar_7bit, mb_7bit_to_wchar, - mb_wchar_to_7bit + mb_wchar_to_7bit, + NULL }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index ede3eef18ce7c..162e9b1bda87d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -44,7 +44,8 @@ const mbfl_encoding mbfl_encoding_base64 = { NULL, NULL, mb_base64_to_wchar, - mb_wchar_to_base64 + mb_wchar_to_base64, + NULL }; const struct mbfl_convert_vtbl vtbl_8bit_b64 = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index 58f89d1b5759e..7618130aac81e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -69,7 +69,8 @@ const mbfl_encoding mbfl_encoding_big5 = { &vtbl_big5_wchar, &vtbl_wchar_big5, mb_big5_to_wchar, - mb_wchar_to_big5 + mb_wchar_to_big5, + NULL }; const mbfl_encoding mbfl_encoding_cp950 = { @@ -82,7 +83,8 @@ const mbfl_encoding mbfl_encoding_cp950 = { &vtbl_cp950_wchar, &vtbl_wchar_cp950, mb_cp950_to_wchar, - mb_wchar_to_cp950 + mb_wchar_to_cp950, + NULL }; const struct mbfl_convert_vtbl vtbl_big5_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index 32a8bdf15f59a..93c33da9543d0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -61,7 +61,8 @@ const mbfl_encoding mbfl_encoding_cp50220 = { &vtbl_cp50220_wchar, &vtbl_wchar_cp50220, mb_cp5022x_to_wchar, - mb_wchar_to_cp50220 + mb_wchar_to_cp50220, + NULL }; const mbfl_encoding mbfl_encoding_cp50221 = { @@ -74,7 +75,8 @@ const mbfl_encoding mbfl_encoding_cp50221 = { &vtbl_cp50221_wchar, &vtbl_wchar_cp50221, mb_cp5022x_to_wchar, - mb_wchar_to_cp50221 + mb_wchar_to_cp50221, + NULL }; const mbfl_encoding mbfl_encoding_cp50222 = { @@ -87,7 +89,8 @@ const mbfl_encoding mbfl_encoding_cp50222 = { &vtbl_cp50222_wchar, &vtbl_wchar_cp50222, mb_cp5022x_to_wchar, - mb_wchar_to_cp50222 + mb_wchar_to_cp50222, + NULL }; const struct mbfl_convert_vtbl vtbl_cp50220_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c index 6311f9b72139a..d3aae8b10f56e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c @@ -69,7 +69,8 @@ const mbfl_encoding mbfl_encoding_cp51932 = { &vtbl_cp51932_wchar, &vtbl_wchar_cp51932, mb_cp51932_to_wchar, - mb_wchar_to_cp51932 + mb_wchar_to_cp51932, + NULL }; const struct mbfl_convert_vtbl vtbl_cp51932_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c index cf8e461e1d9c0..506c24393906d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c @@ -100,7 +100,8 @@ const mbfl_encoding mbfl_encoding_cp932 = { &vtbl_cp932_wchar, &vtbl_wchar_cp932, mb_cp932_to_wchar, - mb_wchar_to_cp932 + mb_wchar_to_cp932, + NULL }; const struct mbfl_convert_vtbl vtbl_cp932_wchar = { @@ -133,7 +134,8 @@ const mbfl_encoding mbfl_encoding_sjiswin = { &vtbl_sjiswin_wchar, &vtbl_wchar_sjiswin, mb_cp932_to_wchar, - mb_wchar_to_sjiswin + mb_wchar_to_sjiswin, + NULL }; const struct mbfl_convert_vtbl vtbl_sjiswin_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 40ae8c86f9119..02e808ce9282c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -68,7 +68,8 @@ const mbfl_encoding mbfl_encoding_cp936 = { &vtbl_cp936_wchar, &vtbl_wchar_cp936, mb_cp936_to_wchar, - mb_wchar_to_cp936 + mb_wchar_to_cp936, + NULL }; const struct mbfl_convert_vtbl vtbl_cp936_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index 50a0368a923f4..cec5f5d41d5e6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -67,7 +67,8 @@ const mbfl_encoding mbfl_encoding_euc_cn = { &vtbl_euccn_wchar, &vtbl_wchar_euccn, mb_euccn_to_wchar, - mb_wchar_to_euccn + mb_wchar_to_euccn, + NULL }; const struct mbfl_convert_vtbl vtbl_euccn_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index 2b0ae77534d56..aa5f323db6f0a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -68,7 +68,8 @@ const mbfl_encoding mbfl_encoding_euc_jp = { &vtbl_eucjp_wchar, &vtbl_wchar_eucjp, mb_eucjp_to_wchar, - mb_wchar_to_eucjp + mb_wchar_to_eucjp, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjp_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index 09287a9d8f634..d35cec9541093 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -69,7 +69,8 @@ const mbfl_encoding mbfl_encoding_eucjp_win = { &vtbl_eucjpwin_wchar, &vtbl_wchar_eucjpwin, mb_eucjpwin_to_wchar, - mb_wchar_to_eucjpwin + mb_wchar_to_eucjpwin, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjpwin_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c index 69e6811922e30..b0cb1954739c9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c @@ -66,7 +66,8 @@ const mbfl_encoding mbfl_encoding_euc_kr = { &vtbl_euckr_wchar, &vtbl_wchar_euckr, mb_euckr_to_wchar, - mb_wchar_to_euckr + mb_wchar_to_euckr, + NULL }; const struct mbfl_convert_vtbl vtbl_euckr_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c index de1deb47705f1..522f5f4a05a5b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c @@ -68,7 +68,8 @@ const mbfl_encoding mbfl_encoding_euc_tw = { &vtbl_euctw_wchar, &vtbl_wchar_euctw, mb_euctw_to_wchar, - mb_wchar_to_euctw + mb_wchar_to_euctw, + NULL }; const struct mbfl_convert_vtbl vtbl_euctw_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index 492df6046244f..d607aafef49e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -49,7 +49,8 @@ const mbfl_encoding mbfl_encoding_gb18030 = { &vtbl_gb18030_wchar, &vtbl_wchar_gb18030, mb_gb18030_to_wchar, - mb_wchar_to_gb18030 + mb_wchar_to_gb18030, + NULL }; const struct mbfl_convert_vtbl vtbl_gb18030_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index afebdfd00811f..a75a9c757cb83 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -66,7 +66,8 @@ const mbfl_encoding mbfl_encoding_html_ent = { &vtbl_html_wchar, &vtbl_wchar_html, mb_htmlent_to_wchar, - mb_wchar_to_htmlent + mb_wchar_to_htmlent, + NULL }; const struct mbfl_convert_vtbl vtbl_wchar_html = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_hz.c b/ext/mbstring/libmbfl/filters/mbfilter_hz.c index 72e5963acfc18..b047bfc8b7b27 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_hz.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_hz.c @@ -47,7 +47,8 @@ const mbfl_encoding mbfl_encoding_hz = { &vtbl_hz_wchar, &vtbl_wchar_hz, mb_hz_to_wchar, - mb_wchar_to_hz + mb_wchar_to_hz, + NULL }; const struct mbfl_convert_vtbl vtbl_hz_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index 65b6d66d2ec2e..e3676d30e2904 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c @@ -51,7 +51,8 @@ const mbfl_encoding mbfl_encoding_2022jpms = { &vtbl_2022jpms_wchar, &vtbl_wchar_2022jpms, mb_iso2022jpms_to_wchar, - mb_wchar_to_iso2022jpms + mb_wchar_to_iso2022jpms, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jpms_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index c4b2bf0b9f1b9..d51fd720e9704 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -54,7 +54,8 @@ const mbfl_encoding mbfl_encoding_2022kr = { &vtbl_2022kr_wchar, &vtbl_wchar_2022kr, mb_iso2022kr_to_wchar, - mb_wchar_to_iso2022kr + mb_wchar_to_iso2022kr, + NULL }; const struct mbfl_convert_vtbl vtbl_wchar_2022kr = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index 6792498b2c858..63d7c7b7f298c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -71,7 +71,8 @@ const mbfl_encoding mbfl_encoding_2022jp_kddi = { &vtbl_2022jp_kddi_wchar, &vtbl_wchar_2022jp_kddi, mb_iso2022jp_kddi_to_wchar, - mb_wchar_to_iso2022jp_kddi + mb_wchar_to_iso2022jp_kddi, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jp_kddi_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_jis.c b/ext/mbstring/libmbfl/filters/mbfilter_jis.c index fc5f18aeb5d1c..80af0e695644c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_jis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_jis.c @@ -37,6 +37,8 @@ static int mbfl_filt_conv_jis_wchar_flush(mbfl_convert_filter *filter); static size_t mb_iso2022jp_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_iso2022jp(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); static void mb_wchar_to_jis(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static bool mb_check_iso2022jp(unsigned char *in, size_t in_len); +static bool mb_check_jis(unsigned char *in, size_t in_len); const mbfl_encoding mbfl_encoding_jis = { mbfl_no_encoding_jis, @@ -49,6 +51,7 @@ const mbfl_encoding mbfl_encoding_jis = { &vtbl_wchar_jis, mb_iso2022jp_to_wchar, mb_wchar_to_jis, + mb_check_jis }; const mbfl_encoding mbfl_encoding_2022jp = { @@ -61,7 +64,8 @@ const mbfl_encoding mbfl_encoding_2022jp = { &vtbl_2022jp_wchar, &vtbl_wchar_2022jp, mb_iso2022jp_to_wchar, - mb_wchar_to_iso2022jp + mb_wchar_to_iso2022jp, + mb_check_iso2022jp }; const struct mbfl_convert_vtbl vtbl_jis_wchar = { @@ -780,3 +784,161 @@ static void mb_wchar_to_jis(uint32_t *in, size_t len, mb_convert_buf *buf, bool MB_CONVERT_BUF_STORE(buf, out, limit); } + +#define JISX_0201_KANA_SO 5 + +static bool mb_check_jis(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + unsigned int state = ASCII; + + while (p < e) { + unsigned char c = *p++; + if (c == 0x1B) { + /* ESC seen; this is an escape sequence */ + if (state == JISX_0201_KANA_SO) { + return false; + } + if ((e - p) < 2) { + return false; + } + unsigned char c2 = *p++; + if (c2 == '$') { + unsigned char c3 = *p++; + if (c3 == '@' || c3 == 'B') { + state = JISX_0208; + } else if (c3 == '(') { + if (p == e) { + return false; + } + unsigned char c4 = *p++; + if (c4 == '@' || c4 == 'B') { + state = JISX_0208; + } else if (c4 == 'D') { + state = JISX_0212; + } else { + return false; + } + } else { + return false; + } + } else if (c2 == '(') { + unsigned char c3 = *p++; + /* ESC ( H is treated as a sequence transitioning to ASCII for historical reasons. + * see https://github.com/php/php-src/pull/10828#issuecomment-1478342432. */ + if (c3 == 'B' || c3 == 'H') { + state = ASCII; + } else if (c3 == 'J') { + state = JISX_0201_LATIN; + } else if (c3 == 'I') { + state = JISX_0201_KANA; + } else { + return false; + } + } else { + return false; + } + } else if (c == 0xE) { + /* "Kana In" marker */ + if (state != ASCII) { + return false; + } + state = JISX_0201_KANA_SO; + } else if (c == 0xF) { + /* "Kana Out" marker */ + if (state != JISX_0201_KANA_SO) { + return false; + } + state = ASCII; + } else if ((state == JISX_0208 || state == JISX_0212) && (c > 0x20 && c < 0x7F)) { + if (p == e) { + return false; + } + unsigned char c2 = *p++; + if (c2 > 0x20 && c2 < 0x7F) { + unsigned int s = (c - 0x21)*94 + c2 - 0x21; + if (state == JISX_0208) { + if (s < jisx0208_ucs_table_size && jisx0208_ucs_table[s]) { + continue; + } + } else { + if (s < jisx0212_ucs_table_size && jisx0212_ucs_table[s]) { + continue; + } + } + return false; + } else { + return false; + } + } else if (c < 0x80) { + continue; + } else if (c >= 0xA1 && c <= 0xDF) { + /* GR-invoked Kana */ + continue; + } else { + return false; + } + } + + return state == ASCII; +} + + +static bool mb_check_iso2022jp(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + unsigned int state = ASCII; + + while (p < e) { + unsigned char c = *p++; + if (c == 0x1B) { + /* ESC seen; this is an escape sequence */ + if ((e - p) < 2) { + return false; + } + unsigned char c2 = *p++; + if (c2 == '$') { + unsigned char c3 = *p++; + if (c3 == '@' || c3 == 'B') { + state = JISX_0208; + } else { + return false; + } + } else if (c2 == '(') { + unsigned char c3 = *p++; + if (c3 == 'B') { + state = ASCII; + } else if (c3 == 'J') { + state = JISX_0201_LATIN; + } else { + return false; + } + } else { + return false; + } + } else if (c == 0xE || c == 0xF) { + /* "Kana In" or "Kana Out" marker; ISO-2022-JP is not accepted. */ + return false; + } else if (state == JISX_0208 && (c > 0x20 && c < 0x7F)) { + if (p == e) { + return false; + } + unsigned char c2 = *p++; + if (c2 > 0x20 && c2 < 0x7F) { + unsigned int s = (c - 0x21)*94 + c2 - 0x21; + if (s < jisx0208_ucs_table_size && jisx0208_ucs_table[s]) { + continue; + } + return false; + } else { + return false; + } + } else if (c < 0x80) { + continue; + } else { + return false; + } + } + + return state == ASCII; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 5fde30ee80935..2bcddedede337 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -46,7 +46,8 @@ const mbfl_encoding mbfl_encoding_qprint = { NULL, NULL, mb_qprint_to_wchar, - mb_wchar_to_qprint + mb_wchar_to_qprint, + NULL }; const struct mbfl_convert_vtbl vtbl_8bit_qprint = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c index 56c9b2dbc85d9..c5872335a8526 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c @@ -86,7 +86,8 @@ static int mbfl_conv_reverselookup_table(int c, mbfl_convert_filter *filter, int &vtbl_##id##_wchar, \ &vtbl_wchar_##id, \ mb_##id##_to_wchar, \ - mb_wchar_to_##id \ + mb_wchar_to_##id, \ + NULL \ } /* For single-byte encodings which use a conversion table */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index f23a8b08aceab..59399bf7217f0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -71,7 +71,8 @@ const mbfl_encoding mbfl_encoding_sjis = { &vtbl_sjis_wchar, &vtbl_wchar_sjis, mb_sjis_to_wchar, - mb_wchar_to_sjis + mb_wchar_to_sjis, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 737871eda8a31..bc4d932187061 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -67,7 +67,8 @@ const mbfl_encoding mbfl_encoding_sjis2004 = { &vtbl_sjis2004_wchar, &vtbl_wchar_sjis2004, mb_sjis2004_to_wchar, - mb_wchar_to_sjis2004 + mb_wchar_to_sjis2004, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis2004_wchar = { @@ -100,7 +101,8 @@ const mbfl_encoding mbfl_encoding_eucjp2004 = { &vtbl_eucjp2004_wchar, &vtbl_wchar_eucjp2004, mb_eucjp2004_to_wchar, - mb_wchar_to_eucjp2004 + mb_wchar_to_eucjp2004, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjp2004_wchar = { @@ -133,7 +135,8 @@ const mbfl_encoding mbfl_encoding_2022jp_2004 = { &vtbl_2022jp_2004_wchar, &vtbl_wchar_2022jp_2004, mb_iso2022jp2004_to_wchar, - mb_wchar_to_iso2022jp2004 + mb_wchar_to_iso2022jp2004, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jp_2004_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c index 0ff2a198d36c8..8fb569b36c483 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c @@ -71,7 +71,8 @@ const mbfl_encoding mbfl_encoding_sjis_mac = { &vtbl_sjis_mac_wchar, &vtbl_wchar_sjis_mac, mb_sjismac_to_wchar, - mb_wchar_to_sjismac + mb_wchar_to_sjismac, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index a13b56e1d1546..f7140a9a6ce9e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -78,7 +78,8 @@ const mbfl_encoding mbfl_encoding_sjis_docomo = { &vtbl_sjis_docomo_wchar, &vtbl_wchar_sjis_docomo, mb_sjis_docomo_to_wchar, - mb_wchar_to_sjis_docomo + mb_wchar_to_sjis_docomo, + NULL }; const mbfl_encoding mbfl_encoding_sjis_kddi = { @@ -91,7 +92,8 @@ const mbfl_encoding mbfl_encoding_sjis_kddi = { &vtbl_sjis_kddi_wchar, &vtbl_wchar_sjis_kddi, mb_sjis_kddi_to_wchar, - mb_wchar_to_sjis_kddi + mb_wchar_to_sjis_kddi, + NULL }; const mbfl_encoding mbfl_encoding_sjis_sb = { @@ -104,7 +106,8 @@ const mbfl_encoding mbfl_encoding_sjis_sb = { &vtbl_sjis_sb_wchar, &vtbl_wchar_sjis_sb, mb_sjis_sb_to_wchar, - mb_wchar_to_sjis_sb + mb_wchar_to_sjis_sb, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c index 3e0d0828cfa62..e6711d82f8a70 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c @@ -56,7 +56,8 @@ const mbfl_encoding mbfl_encoding_ucs2 = { &vtbl_ucs2_wchar, &vtbl_wchar_ucs2, mb_ucs2_to_wchar, - mb_wchar_to_ucs2be + mb_wchar_to_ucs2be, + NULL }; const mbfl_encoding mbfl_encoding_ucs2be = { @@ -69,7 +70,8 @@ const mbfl_encoding mbfl_encoding_ucs2be = { &vtbl_ucs2be_wchar, &vtbl_wchar_ucs2be, mb_ucs2be_to_wchar, - mb_wchar_to_ucs2be + mb_wchar_to_ucs2be, + NULL }; const mbfl_encoding mbfl_encoding_ucs2le = { @@ -82,7 +84,8 @@ const mbfl_encoding mbfl_encoding_ucs2le = { &vtbl_ucs2le_wchar, &vtbl_wchar_ucs2le, mb_ucs2le_to_wchar, - mb_wchar_to_ucs2le + mb_wchar_to_ucs2le, + NULL }; const struct mbfl_convert_vtbl vtbl_ucs2_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c index 90312b8d501d5..410be0ace74f5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c @@ -56,7 +56,8 @@ const mbfl_encoding mbfl_encoding_ucs4 = { &vtbl_ucs4_wchar, &vtbl_wchar_ucs4, mb_ucs4_to_wchar, - mb_wchar_to_ucs4be + mb_wchar_to_ucs4be, + NULL }; const mbfl_encoding mbfl_encoding_ucs4be = { @@ -69,7 +70,8 @@ const mbfl_encoding mbfl_encoding_ucs4be = { &vtbl_ucs4be_wchar, &vtbl_wchar_ucs4be, mb_ucs4be_to_wchar, - mb_wchar_to_ucs4be + mb_wchar_to_ucs4be, + NULL }; const mbfl_encoding mbfl_encoding_ucs4le = { @@ -82,7 +84,8 @@ const mbfl_encoding mbfl_encoding_ucs4le = { &vtbl_ucs4le_wchar, &vtbl_wchar_ucs4le, mb_ucs4le_to_wchar, - mb_wchar_to_ucs4le + mb_wchar_to_ucs4le, + NULL }; const struct mbfl_convert_vtbl vtbl_ucs4_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 2ac351d644cdb..644e0b063d9b9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -71,7 +71,8 @@ const mbfl_encoding mbfl_encoding_uhc = { &vtbl_uhc_wchar, &vtbl_wchar_uhc, mb_uhc_to_wchar, - mb_wchar_to_uhc + mb_wchar_to_uhc, + NULL }; const struct mbfl_convert_vtbl vtbl_uhc_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index eddd56f362756..2a7d98721df79 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -49,7 +49,8 @@ const mbfl_encoding mbfl_encoding_utf16 = { &vtbl_utf16_wchar, &vtbl_wchar_utf16, mb_utf16_to_wchar, - mb_wchar_to_utf16be + mb_wchar_to_utf16be, + NULL }; const mbfl_encoding mbfl_encoding_utf16be = { @@ -62,7 +63,8 @@ const mbfl_encoding mbfl_encoding_utf16be = { &vtbl_utf16be_wchar, &vtbl_wchar_utf16be, mb_utf16be_to_wchar, - mb_wchar_to_utf16be + mb_wchar_to_utf16be, + NULL }; const mbfl_encoding mbfl_encoding_utf16le = { @@ -75,7 +77,8 @@ const mbfl_encoding mbfl_encoding_utf16le = { &vtbl_utf16le_wchar, &vtbl_wchar_utf16le, mb_utf16le_to_wchar, - mb_wchar_to_utf16le + mb_wchar_to_utf16le, + NULL }; const struct mbfl_convert_vtbl vtbl_utf16_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index e8cd4ad454f2e..58551c8b3932d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -49,7 +49,8 @@ const mbfl_encoding mbfl_encoding_utf32 = { &vtbl_utf32_wchar, &vtbl_wchar_utf32, mb_utf32_to_wchar, - mb_wchar_to_utf32be + mb_wchar_to_utf32be, + NULL }; const mbfl_encoding mbfl_encoding_utf32be = { @@ -62,7 +63,8 @@ const mbfl_encoding mbfl_encoding_utf32be = { &vtbl_utf32be_wchar, &vtbl_wchar_utf32be, mb_utf32be_to_wchar, - mb_wchar_to_utf32be + mb_wchar_to_utf32be, + NULL }; const mbfl_encoding mbfl_encoding_utf32le = { @@ -75,7 +77,8 @@ const mbfl_encoding mbfl_encoding_utf32le = { &vtbl_utf32le_wchar, &vtbl_wchar_utf32le, mb_utf32le_to_wchar, - mb_wchar_to_utf32le + mb_wchar_to_utf32le, + NULL }; const struct mbfl_convert_vtbl vtbl_utf32_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index f5fe261f69d00..57641a4bbe41d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -29,10 +29,12 @@ #include "mbfilter.h" #include "mbfilter_utf7.h" +#include "utf7_helper.h" static int mbfl_filt_conv_utf7_wchar_flush(mbfl_convert_filter *filter); static size_t mb_utf7_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_utf7(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static bool mb_check_utf7(unsigned char *in, size_t in_len); static const unsigned char mbfl_base64_table[] = { /* 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', */ @@ -59,7 +61,8 @@ const mbfl_encoding mbfl_encoding_utf7 = { &vtbl_utf7_wchar, &vtbl_wchar_utf7, mb_utf7_to_wchar, - mb_wchar_to_utf7 + mb_wchar_to_utf7, + mb_check_utf7 }; const struct mbfl_convert_vtbl vtbl_utf7_wchar = { @@ -408,16 +411,24 @@ int mbfl_filt_conv_wchar_utf7_flush(mbfl_convert_filter *filter) return 0; } -/* Ways which a Base64-encoded section can end: */ -#define DASH 0xFD -#define ASCII 0xFE -#define ILLEGAL 0xFF - static inline bool is_base64_end(unsigned char c) { return c >= DASH; } +static bool is_optional_direct(unsigned char c) +{ + /* Characters that are allowed to be encoded by Base64 or directly encoded */ + return c == '!' || c == '"' || c == '#' || c == '$' || c == '%' || c == '&' || c == '*' || c == ';' || c == '<' || + c == '=' || c == '>' || c == '@' || c == '[' || c == ']' || c == '^' || c == '_' || c == '`' || c == '{' || + c == '|' || c == '}'; +} + +static bool can_end_base64(uint32_t c) +{ + return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\'' || c == '(' || c == ')' || c == ',' || c == '.' || c == ':' || c == '?'; +} + static unsigned char decode_base64(unsigned char c) { if (c >= 'A' && c <= 'Z') { @@ -432,6 +443,8 @@ static unsigned char decode_base64(unsigned char c) return 63; } else if (c == '-') { return DASH; + } else if (can_end_base64(c) || is_optional_direct(c) || c == '\0') { + return DIRECT; } else if (c <= 0x7F) { return ASCII; } @@ -470,7 +483,7 @@ static uint32_t* handle_base64_end(unsigned char n, unsigned char **p, uint32_t if (n == ILLEGAL) { *out++ = MBFL_BAD_INPUT; - } else if (n == ASCII) { + } else if (n == DIRECT || n == ASCII) { (*p)--; /* Unconsume byte */ } @@ -596,11 +609,6 @@ static size_t mb_utf7_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf return out - buf; } -static bool can_end_base64(uint32_t c) -{ - return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\'' || c == '(' || c == ')' || c == ',' || c == '.' || c == ':' || c == '?'; -} - static bool should_direct_encode(uint32_t c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '\0' || c == '/' || c == '-' || can_end_base64(c); @@ -700,3 +708,129 @@ static void mb_wchar_to_utf7(uint32_t *in, size_t len, mb_convert_buf *buf, bool MB_CONVERT_BUF_STORE(buf, out, limit); } + +static bool is_utf16_cp_valid(uint16_t cp, bool is_surrogate) +{ + if (is_surrogate) { + return cp >= 0xDC00 && cp <= 0xDFFF; + } else { + /* 2nd part of surrogate pair came unexpectedly */ + return !(cp >= 0xDC00 && cp <= 0xDFFF); + } +} + +static bool can_encode_directly(unsigned char c) +{ + return should_direct_encode(c) || is_optional_direct(c) || c == '\0'; +} + +static bool mb_check_utf7(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + bool base64 = false; + bool is_surrogate = false; + + while (p < e) { + if (base64) { + unsigned char n1 = decode_base64(*p++); + if (is_base64_end(n1)) { + if (!is_base64_end_valid(n1, false, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n2 = decode_base64(*p++); + if (is_base64_end(n2) || p == e) { + return false; + } + unsigned char n3 = decode_base64(*p++); + if (is_base64_end(n3)) { + return false; + } + uint16_t cp1 = (n1 << 10) | (n2 << 4) | ((n3 & 0x3C) >> 2); + if (!is_utf16_cp_valid(cp1, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp1, is_surrogate); + if (p == e) { + /* It is an error if trailing padding bits are not zeroes or if we were + * expecting the 2nd part of a surrogate pair when Base64 section ends */ + return !((n3 & 0x3) || is_surrogate); + } + + unsigned char n4 = decode_base64(*p++); + if (is_base64_end(n4)) { + if (!is_base64_end_valid(n4, n3 & 0x3, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n5 = decode_base64(*p++); + if (is_base64_end(n5) || p == e) { + return false; + } + unsigned char n6 = decode_base64(*p++); + if (is_base64_end(n6)) { + return false; + } + uint16_t cp2 = (n3 << 14) | (n4 << 8) | (n5 << 2) | ((n6 & 0x30) >> 4); + if (!is_utf16_cp_valid(cp2, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp2, is_surrogate); + if (p == e) { + return !((n6 & 0xF) || is_surrogate); + } + + unsigned char n7 = decode_base64(*p++); + if (is_base64_end(n7)) { + if (!is_base64_end_valid(n7, n6 & 0xF, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n8 = decode_base64(*p++); + if (is_base64_end(n8)) { + return false; + } + uint16_t cp3 = (n6 << 12) | (n7 << 6) | n8; + if (!is_utf16_cp_valid(cp3, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp3, is_surrogate); + } else { + /* ASCII text section */ + unsigned char c = *p++; + + if (c == '+') { + if (p == e) { + base64 = true; + return !is_surrogate; + } + unsigned char n = decode_base64(*p); + if (n == DASH) { + p++; + } else if (n > DASH) { + /* If a "+" character followed immediately by any character other than base64 or "-" */ + return false; + } else { + base64 = true; + } + } else if (can_encode_directly(c)) { + continue; + } else { + return false; + } + } + } + return !is_surrogate; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 850edfbd63a1e..77b65bbeee8a4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -77,11 +77,13 @@ #include "mbfilter.h" #include "mbfilter_utf7imap.h" +#include "utf7_helper.h" static int mbfl_filt_conv_wchar_utf7imap_flush(mbfl_convert_filter *filter); static int mbfl_filt_conv_utf7imap_wchar_flush(mbfl_convert_filter *filter); static size_t mb_utf7imap_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, unsigned int *state); static void mb_wchar_to_utf7imap(uint32_t *in, size_t len, mb_convert_buf *buf, bool end); +static bool mb_check_utf7imap(unsigned char *in, size_t in_len); static const char *mbfl_encoding_utf7imap_aliases[] = {"mUTF-7", NULL}; @@ -95,7 +97,8 @@ const mbfl_encoding mbfl_encoding_utf7imap = { &vtbl_utf7imap_wchar, &vtbl_wchar_utf7imap, mb_utf7imap_to_wchar, - mb_wchar_to_utf7imap + mb_wchar_to_utf7imap, + mb_check_utf7imap }; const struct mbfl_convert_vtbl vtbl_utf7imap_wchar = { @@ -444,10 +447,6 @@ static int mbfl_filt_conv_wchar_utf7imap_flush(mbfl_convert_filter *filter) return 0; } -/* Ways which a Base64-encoded section can end: */ -#define DASH 0xFE -#define ILLEGAL 0xFF - static inline bool is_base64_end(unsigned char c) { return c >= DASH; @@ -732,3 +731,124 @@ static void mb_wchar_to_utf7imap(uint32_t *in, size_t len, mb_convert_buf *buf, MB_CONVERT_BUF_STORE(buf, out, limit); } + +static bool is_utf16_cp_valid(uint16_t cp, bool is_surrogate) +{ + if (is_surrogate) { + return cp >= 0xDC00 && cp <= 0xDFFF; + } else if (cp >= 0xDC00 && cp <= 0xDFFF) { + /* 2nd part of surrogate pair came unexpectedly */ + return false; + } else if (cp >= 0x20 && cp <= 0x7E && cp != '&') { + return false; + } + return true; +} + +static bool mb_check_utf7imap(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + bool base64 = false; + bool is_surrogate = false; + + while (p < e) { + if (base64) { + /* Base64 section */ + unsigned char n1 = decode_base64(*p++); + if (is_base64_end(n1)) { + if (!is_base64_end_valid(n1, false, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n2 = decode_base64(*p++); + if (is_base64_end(n2) || p == e) { + return false; + } + unsigned char n3 = decode_base64(*p++); + if (is_base64_end(n3)) { + return false; + } + uint16_t cp1 = (n1 << 10) | (n2 << 4) | ((n3 & 0x3C) >> 2); + if (!is_utf16_cp_valid(cp1, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp1, is_surrogate); + if (p == e) { + return false; + } + + unsigned char n4 = decode_base64(*p++); + if (is_base64_end(n4)) { + if (!is_base64_end_valid(n4, n3 & 0x3, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n5 = decode_base64(*p++); + if (is_base64_end(n5) || p == e) { + return false; + } + unsigned char n6 = decode_base64(*p++); + if (is_base64_end(n6)) { + return false; + } + uint16_t cp2 = (n3 << 14) | (n4 << 8) | (n5 << 2) | ((n6 & 0x30) >> 4); + if (!is_utf16_cp_valid(cp2, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp2, is_surrogate); + if (p == e) { + return false; + } + + unsigned char n7 = decode_base64(*p++); + if (is_base64_end(n7)) { + if (!is_base64_end_valid(n7, n6 & 0xF, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n8 = decode_base64(*p++); + if (is_base64_end(n8)) { + return false; + } + uint16_t cp3 = (n6 << 12) | (n7 << 6) | n8; + if (!is_utf16_cp_valid(cp3, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp3, is_surrogate); + } else { + /* ASCII text section */ + unsigned char c = *p++; + + if (c == '&') { + if (p == e) { + return false; + } + unsigned char n = decode_base64(*p); + if (n == DASH) { + p++; + } else if (n == ILLEGAL) { + return false; + } else { + base64 = true; + } + } else if (c >= 0x20 && c <= 0x7E) { + continue; + } else { + return false; + } + } + } + return !base64; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index 6c7bad0e805ac..44df3ab4257cd 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -64,7 +64,8 @@ const mbfl_encoding mbfl_encoding_utf8 = { &vtbl_utf8_wchar, &vtbl_wchar_utf8, mb_utf8_to_wchar, - mb_wchar_to_utf8 + mb_wchar_to_utf8, + NULL }; const struct mbfl_convert_vtbl vtbl_utf8_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c index c573ec70f3bc9..59e2676208b90 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -63,7 +63,8 @@ const mbfl_encoding mbfl_encoding_utf8_docomo = { &vtbl_utf8_docomo_wchar, &vtbl_wchar_utf8_docomo, mb_utf8_docomo_to_wchar, - mb_wchar_to_utf8_docomo + mb_wchar_to_utf8_docomo, + NULL }; const mbfl_encoding mbfl_encoding_utf8_kddi_a = { @@ -76,7 +77,8 @@ const mbfl_encoding mbfl_encoding_utf8_kddi_a = { &vtbl_utf8_kddi_a_wchar, &vtbl_wchar_utf8_kddi_a, mb_utf8_kddi_a_to_wchar, - mb_wchar_to_utf8_kddi_a + mb_wchar_to_utf8_kddi_a, + NULL }; const mbfl_encoding mbfl_encoding_utf8_kddi_b = { @@ -89,7 +91,8 @@ const mbfl_encoding mbfl_encoding_utf8_kddi_b = { &vtbl_utf8_kddi_b_wchar, &vtbl_wchar_utf8_kddi_b, mb_utf8_kddi_b_to_wchar, - mb_wchar_to_utf8_kddi_b + mb_wchar_to_utf8_kddi_b, + NULL }; const mbfl_encoding mbfl_encoding_utf8_sb = { @@ -102,7 +105,8 @@ const mbfl_encoding mbfl_encoding_utf8_sb = { &vtbl_utf8_sb_wchar, &vtbl_wchar_utf8_sb, mb_utf8_sb_to_wchar, - mb_wchar_to_utf8_sb + mb_wchar_to_utf8_sb, + NULL }; const struct mbfl_convert_vtbl vtbl_utf8_docomo_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c index cc90997c2fcae..83a56977d3e0e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c @@ -43,7 +43,8 @@ const mbfl_encoding mbfl_encoding_uuencode = { NULL, NULL, mb_uuencode_to_wchar, - mb_wchar_to_uuencode + mb_wchar_to_uuencode, + NULL }; const struct mbfl_convert_vtbl vtbl_uuencode_8bit = { diff --git a/ext/mbstring/libmbfl/filters/utf7_helper.h b/ext/mbstring/libmbfl/filters/utf7_helper.h new file mode 100644 index 0000000000000..0e71a5a449031 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/utf7_helper.h @@ -0,0 +1,22 @@ +#ifndef MBFL_UTF7_HELPER_H +#define MBFL_UTF7_HELPER_H + +#include "mbfilter.h" + +/* Ways which a Base64-encoded section can end: */ +#define DASH 0xFC +#define DIRECT 0xFD +#define ASCII 0xFE +#define ILLEGAL 0xFF + +static inline bool is_base64_end_valid(unsigned char n, bool gap, bool is_surrogate) +{ + return !(gap || is_surrogate || n == ASCII || n == ILLEGAL); +} + +static inline bool has_surrogate(uint16_t cp, bool is_surrogate) +{ + return !is_surrogate && cp >= 0xD800 && cp <= 0xDBFF; +} + +#endif /* MBFL_UTF7_HELPER_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index e0cfa13e0b4f6..5f5ce07ce6f66 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -312,6 +312,16 @@ int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *str unsigned char *p = string->val; int bad = 0; + if (identd->strict) { + for (int i = 0; i < num; i++) { + mbfl_convert_filter *filter = identd->filter_list[i]; + mbfl_encoding_detector_data *data = &identd->filter_data[i]; + if (filter->from->check != NULL && !(filter->from->check)(p, n)) { + data->num_illegalchars++; + } + } + } + while (n--) { for (int i = 0; i < num; i++) { mbfl_convert_filter *filter = identd->filter_list[i]; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c index 8fe51c9fd4cbb..43db2f7f5b20b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c @@ -51,7 +51,8 @@ const mbfl_encoding mbfl_encoding_8bit = { &vtbl_8bit_wchar, &vtbl_wchar_8bit, mb_8bit_to_wchar, - mb_wchar_to_8bit + mb_wchar_to_8bit, + NULL }; const struct mbfl_convert_vtbl vtbl_8bit_wchar = { diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c index 3fb7e991141cd..b932603e1c5f4 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c @@ -44,6 +44,7 @@ const mbfl_encoding mbfl_encoding_pass = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c index 5472d792a83cb..2bd9cca7b5b2a 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c @@ -42,5 +42,6 @@ const mbfl_encoding mbfl_encoding_wchar = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index e5ae285098ea0..f66e85acd8a81 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -143,6 +143,7 @@ typedef struct { typedef size_t (*mb_to_wchar_fn)(unsigned char **in, size_t *in_len, uint32_t *out, size_t out_len, unsigned int *state); typedef void (*mb_from_wchar_fn)(uint32_t *in, size_t in_len, mb_convert_buf *out, bool end); +typedef bool (*mb_check_fn)(unsigned char *in, size_t in_len); /* When converting encoded text to a buffer of wchars (Unicode codepoints) using `mb_to_wchar_fn`, * the buffer must be at least this size (to work with all supported text encodings) */ @@ -232,6 +233,7 @@ typedef struct { const struct mbfl_convert_vtbl *output_filter; mb_to_wchar_fn to_wchar; mb_from_wchar_fn from_wchar; + mb_check_fn check; } mbfl_encoding; MBFLAPI extern const mbfl_encoding *mbfl_name2encoding(const char *name); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index e7b056d87c81d..5aa25b57f01a2 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4415,6 +4415,10 @@ MBSTRING_API int php_mb_check_encoding(const char *input, size_t length, const m unsigned char *in = (unsigned char*)input; unsigned int state = 0; + if (encoding->check != NULL) { + return encoding->check(in, length); + } + /* If the input string is not encoded in the given encoding, there is a significant chance * that this will be seen in the first bytes. Therefore, rather than converting an entire * buffer of 128 codepoints, convert and check just a few codepoints first */ diff --git a/ext/mbstring/tests/gh10192_utf7.phpt b/ext/mbstring/tests/gh10192_utf7.phpt new file mode 100644 index 0000000000000..2930942c12c5a --- /dev/null +++ b/ext/mbstring/tests/gh10192_utf7.phpt @@ -0,0 +1,542 @@ +--TEST-- +GH-10192 (mb_detect_encoding() results for UTF-7 differ between PHP 8.0 and 8.1) +--EXTENSIONS-- +mbstring +--FILE-- + 'A + B', + 'non-base64 character after -' => 'A - B', + 'base64 character before +' => 'A 1+ B', + 'base64 character before -' => 'A 1- B', + 'base64 character after +' => 'A +1 B', + 'base64 character after -' => 'A -1 B', + 'base64 character before and after +' => 'A 1+1 B', + 'base64 character before and after -' => 'A 1-1 B', + 'string ends with +' => 'A +', + 'string ends with -' => 'A -', + '+ and -' => 'A +- B', + '- and +' => 'A -+ B', + 'valid direct encoding character =' => 'A = B', + 'invalid direct encoding character ~' => 'A ~ B', + 'invalid direct encoding character \\' => 'A \\ B', + 'invalid direct encoding character ESC' => "A \x1b B", + 'valid direct encoding character = after +' => 'A += B', + 'invalid direct encoding character ~ after +' => 'A +~ B', + 'invalid direct encoding character \\ after +' => 'A +\\ B', + 'invalid direct encoding character ESC after +' => "A +\x1b B", + 'valid base64 character between + and -' => 'A +ZeVnLIqe- B', // 日本語 in UTF-16BE + 'invalid base64 character between + and -' => 'A +ZeVnLIq- B', // 日本語 in UTF-16BE without the last character + 'valid base64 character between + and non-base64 character' => 'A +ZeVnLIqe B', + 'invalid base64 character between + and non-base64 character' => 'A +ZeVnLIq B', + 'valid base64 character between + and base64 character' => 'A +ZeVnLIqe1 B', + 'invalid base64 character between + and base64 character' => 'A +ZeVnLIq1 B', + 'valid base64 character between + and end of string' => 'A +ZeVnLIqe', + 'invalid base64 character between + and end of string' => 'A +ZeVnLIq', + 'valid base64 character consisting only of + between + and -' => 'A +++++++++- B', + 'invalid base64 character consisting only of + between + and -' => 'A +++++++++- B', + 'valid base64 character consisting only of + between + and non-base64 character' => 'A +++++++++ B', + 'invalid base64 character consisting only of + between + and non-base64 character' => 'A +++++++++ B', + 'valid base64 character consisting only of + between + and base64 character' => 'A +++++++++1 B', + 'invalid base64 character consisting only of + between + and base64 character' => 'A +++++++++1 B', + 'valid base64 character consisting only of + between + and end of string' => 'A +++++++++', + 'invalid base64 character consisting only of + between + and end of string' => 'A +++++++++', + 'valid base64 character using surrogate pair between + and -' => 'A +2GfePQ- B', // 𩸽 in UTF-16BE + 'first 16 bits of base64 character using surrogate pair between + and -' => 'A +2Gc- B', // first 16 bits of 𩸽 in UTF-16BE + 'valid base64 character using surrogate pair between + and non-base64 character' => 'A +2GfePQ B', + 'first 16 bits of base64 character using surrogate pair between + and non-base64 character' => 'A +2Gc B', + 'valid base64 character using surrogate pair between + and base64 character' => 'A +2GfePQ1 B', + 'first 16 bits of base64 character using surrogate pair between + and base64 character' => 'A +2Gc1 B', + 'valid base64 character using surrogate pair between + and end of string' => 'A +2GfePQ', + 'first 16 bits of base64 character using surrogate pair between + and end of string' => 'A +2Gc', + 'invalid base64 character using surrogate pair in reverse order between + and -' => 'A +3j3YZw- B', // 𩸽 in reverse order in UTF-16BE + 'last 16 bits of base64 character using surrogate pair in reverse order between + and -' => 'A +3j0- B', // last 16 bits of 𩸽 in UTF-16BE + 'invalid base64 character using surrogate pair in reverse order between + and non-base64 character' => 'A +3j3YZw B', + 'last 16 bits of base64 character using surrogate pair in reverse order between + and non-base64 character' => 'A +3j0 B', + 'invalid base64 character using surrogate pair in reverse order between + and base64 character' => 'A +3j3YZw1 B', + 'last 16 bits of base64 character using surrogate pair in reverse order between + and base64 character' => 'A +3j01 B', + 'invalid base64 character using surrogate pair in reverse order between + and end of string' => 'A +3j3YZw', + 'last 16 bits of base64 character using surrogate pair in reverse order between + and end of string' => 'A +3j0' +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + var_dump(mb_detect_encoding($case, 'UTF-8, UTF-7', true)); + var_dump(mb_detect_encoding($case, 'UTF-8, UTF-7', false)); + var_dump(mb_detect_encoding($case, 'UTF-7', true)); + var_dump(mb_detect_encoding($case, 'UTF-7', false)); + var_dump(mb_check_encoding($case, 'UTF-7')); + var_dump(addcslashes(mb_convert_encoding($case, 'UTF-8', 'UTF-7'), "\0..\37\177")); + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} +?> +--EXPECT-- +non-base64 character after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(4) "A B" +int(0) + +non-base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A - B" +int(0) + +base64 character before + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A 1 B" +int(0) + +base64 character before - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A 1- B" +int(0) + +base64 character after + +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(1) + +base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A -1 B" +int(1) + +base64 character before and after + +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A 1? B" +int(2) + +base64 character before and after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(7) "A 1-1 B" +int(2) + +string ends with + +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(2) "A " +int(2) + +string ends with - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(3) "A -" +int(2) + ++ and - +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A + B" +int(2) + +- and + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A - B" +int(2) + +valid direct encoding character = +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A = B" +int(2) + +invalid direct encoding character ~ +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ~ B" +int(2) + +invalid direct encoding character \ +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A \ B" +int(2) + +invalid direct encoding character ESC +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(8) "A \033 B" +int(2) + +valid direct encoding character = after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A = B" +int(2) + +invalid direct encoding character ~ after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ~ B" +int(2) + +invalid direct encoding character \ after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A \ B" +int(2) + +invalid direct encoding character ESC after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(8) "A \033 B" +int(2) + +valid base64 character between + and - +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本語 B" +int(2) + +invalid base64 character between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(11) "A 日本? B" +int(3) + +valid base64 character between + and non-base64 character +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本語 B" +int(3) + +invalid base64 character between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(11) "A 日本? B" +int(4) + +valid base64 character between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A 日本語? B" +int(5) + +invalid base64 character between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本誵 B" +int(5) + +valid base64 character between + and end of string +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A 日本語" +int(5) + +invalid base64 character between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(9) "A 日本?" +int(6) + +valid base64 character consisting only of + between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +invalid base64 character consisting only of + between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +valid base64 character consisting only of + between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +invalid base64 character consisting only of + between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +valid base64 character consisting only of + between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A ﯯ뻻? B" +int(7) + +invalid base64 character consisting only of + between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A ﯯ뻻? B" +int(8) + +valid base64 character consisting only of + between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A ﯯ뻻" +int(8) + +invalid base64 character consisting only of + between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A ﯯ뻻" +int(8) + +valid base64 character using surrogate pair between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(8) "A 𩸽 B" +int(8) + +first 16 bits of base64 character using surrogate pair between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(9) + +valid base64 character using surrogate pair between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(8) "A 𩸽 B" +int(9) + +first 16 bits of base64 character using surrogate pair between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(10) + +valid base64 character using surrogate pair between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(9) "A 𩸽? B" +int(11) + +first 16 bits of base64 character using surrogate pair between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(12) + +valid base64 character using surrogate pair between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A 𩸽" +int(12) + +first 16 bits of base64 character using surrogate pair between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(3) "A ?" +int(13) + +invalid base64 character using surrogate pair in reverse order between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A ?? B" +int(15) + +last 16 bits of base64 character using surrogate pair in reverse order between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(16) + +invalid base64 character using surrogate pair in reverse order between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A ?? B" +int(18) + +last 16 bits of base64 character using surrogate pair in reverse order between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(19) + +invalid base64 character using surrogate pair in reverse order between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A ?? B" +int(21) + +last 16 bits of base64 character using surrogate pair in reverse order between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A ?? B" +int(23) + +invalid base64 character using surrogate pair in reverse order between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(4) "A ??" +int(25) + +last 16 bits of base64 character using surrogate pair in reverse order between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(3) "A ?" +int(26) diff --git a/ext/mbstring/tests/gh10192_utf7imap.phpt b/ext/mbstring/tests/gh10192_utf7imap.phpt new file mode 100644 index 0000000000000..c4f50884f6daf --- /dev/null +++ b/ext/mbstring/tests/gh10192_utf7imap.phpt @@ -0,0 +1,423 @@ +--TEST-- +GH-10192 (mb_detect_encoding() results for UTF-7 differ between PHP 8.0 and 8.1) +--EXTENSIONS-- +mbstring +--FILE-- + 'A & B', + 'non-base64 character after -' => 'A - B', + 'base64 character before &' => 'A 1& B', + 'base64 character before -' => 'A 1- B', + 'base64 character after &' => 'A &1 B', + 'base64 character after -' => 'A -1 B', + 'base64 character before and after &' => 'A 1&1 B', + 'base64 character before and after -' => 'A 1-1 B', + 'string ends with &' => 'A &', + 'string ends with -' => 'A -', + '& and -' => 'A &- B', + '- and &' => 'A -& B', + 'valid direct encoding character ~' => 'A ~ B', + 'invalid direct encoding character ESC' => "A \x1b B", + 'valid direct encoding character ~ after &' => 'A &~ B', + 'invalid direct encoding character ESC after &' => "A &\x1b B", + 'valid base64 character between & and -' => 'A &ZeVnLIqe- B', // 日本語 in UTF-16BE + 'invalid base64 character between & and -' => 'A &ZeVnLIq- B', // 日本語 in UTF-16BE without the last character + 'valid base64 character between & and non-base64 character' => 'A &ZeVnLIqe B', + 'invalid base64 character between & and non-base64 character' => 'A &ZeVnLIq B', + 'valid base64 character between & and base64 character' => 'A &ZeVnLIqe1 B', + 'invalid base64 character between & and base64 character' => 'A &ZeVnLIq1 B', + 'valid base64 character between & and end of string' => 'A &ZeVnLIqe', + 'invalid base64 character between & and end of string' => 'A &ZeVnLIq', + 'valid base64 character using surrogate pair between & and -' => 'A &2GfePQ- B', // 𩸽 in UTF-16BE + 'first 16 bits of base64 character using surrogate pair between & and -' => 'A &2Gc- B', // first 16 bits of 𩸽 in UTF-16BE + 'valid base64 character using surrogate pair between & and non-base64 character' => 'A &2GfePQ B', + 'first 16 bits of base64 character using surrogate pair between & and non-base64 character' => 'A &2Gc B', + 'valid base64 character using surrogate pair between & and base64 character' => 'A &2GfePQ1 B', + 'first 16 bits of base64 character using surrogate pair between & and base64 character' => 'A &2Gc1 B', + 'valid base64 character using surrogate pair between & and end of string' => 'A &2GfePQ', + 'first 16 bits of base64 character using surrogate pair between & and end of string' => 'A &2Gc', + 'invalid base64 character using surrogate pair in reverse order between & and -' => 'A &3j3YZw- B', // 𩸽 in reverse order in UTF-16BE + 'last 16 bits of base64 character using surrogate pair in reverse order between & and -' => 'A &3j0- B', // last 16 bits of 𩸽 in UTF-16BE + 'invalid base64 character using surrogate pair in reverse order between & and non-base64 character' => 'A &3j3YZw B', + 'last 16 bits of base64 character using surrogate pair in reverse order between & and non-base64 character' => 'A &3j0 B', + 'invalid base64 character using surrogate pair in reverse order between & and base64 character' => 'A &3j3YZw1 B', + 'last 16 bits of base64 character using surrogate pair in reverse order between & and base64 character' => 'A &3j01 B', + 'invalid base64 character using surrogate pair in reverse order between & and end of string' => 'A &3j3YZw', + 'last 16 bits of base64 character using surrogate pair in reverse order between & and end of string' => 'A &3j0' +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + var_dump(mb_detect_encoding($case, 'UTF-8, UTF7-IMAP', true)); + var_dump(mb_detect_encoding($case, 'UTF-8, UTF7-IMAP', false)); + var_dump(mb_detect_encoding($case, 'UTF7-IMAP', true)); + var_dump(mb_detect_encoding($case, 'UTF7-IMAP', false)); + var_dump(mb_check_encoding($case, 'UTF7-IMAP')); + var_dump(addcslashes(mb_convert_encoding($case, 'UTF-8', 'UTF7-IMAP'), "\0..\37\177")); + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} + +?> +--EXPECT-- +non-base64 character after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(1) + +non-base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A - B" +int(1) + +base64 character before & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A 1?B" +int(2) + +base64 character before - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(6) "A 1- B" +int(2) + +base64 character after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(3) + +base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(6) "A -1 B" +int(3) + +base64 character before and after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A 1?B" +int(4) + +base64 character before and after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(7) "A 1-1 B" +int(4) + +string ends with & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(3) "A ?" +int(5) + +string ends with - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(3) "A -" +int(5) + +& and - +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A & B" +int(5) + +- and & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A -?B" +int(6) + +valid direct encoding character ~ +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A ~ B" +int(6) + +invalid direct encoding character ESC +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(7) + +valid direct encoding character ~ after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(8) + +invalid direct encoding character ESC after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(9) + +valid base64 character between & and - +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(13) "A 日本語 B" +int(9) + +invalid base64 character between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(11) "A 日本? B" +int(10) + +valid base64 character between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本語?B" +int(11) + +invalid base64 character between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(10) "A 日本?B" +int(12) + +valid base64 character between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本語?B" +int(13) + +invalid base64 character between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本誵?B" +int(14) + +valid base64 character between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(12) "A 日本語?" +int(15) + +invalid base64 character between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(9) "A 日本?" +int(16) + +valid base64 character using surrogate pair between & and - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(8) "A 𩸽 B" +int(16) + +first 16 bits of base64 character using surrogate pair between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(17) + +valid base64 character using surrogate pair between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(8) "A 𩸽?B" +int(18) + +first 16 bits of base64 character using surrogate pair between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(19) + +valid base64 character using surrogate pair between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(8) "A 𩸽?B" +int(20) + +first 16 bits of base64 character using surrogate pair between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(21) + +valid base64 character using surrogate pair between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(7) "A 𩸽?" +int(22) + +first 16 bits of base64 character using surrogate pair between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ??" +int(24) + +invalid base64 character using surrogate pair in reverse order between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(6) "A ?? B" +int(26) + +last 16 bits of base64 character using surrogate pair in reverse order between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(27) + +invalid base64 character using surrogate pair in reverse order between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ??B" +int(29) + +last 16 bits of base64 character using surrogate pair in reverse order between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ??B" +int(31) + +invalid base64 character using surrogate pair in reverse order between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ??B" +int(33) + +last 16 bits of base64 character using surrogate pair in reverse order between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ??B" +int(35) + +invalid base64 character using surrogate pair in reverse order between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ???" +int(38) + +last 16 bits of base64 character using surrogate pair in reverse order between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ??" +int(40) diff --git a/ext/mbstring/tests/gh10648.phpt b/ext/mbstring/tests/gh10648.phpt new file mode 100644 index 0000000000000..9f0b4b4db153a --- /dev/null +++ b/ext/mbstring/tests/gh10648.phpt @@ -0,0 +1,155 @@ +--TEST-- +GH-10648 (mb_check_encoding() returns true for incorrect but interpretable ISO-2022-JP byte sequences) +--EXTENSIONS-- +mbstring +--FILE-- + '1b244224221b2842', // 'あ' in ISO-2022-JP + 'ISO-2022-JP bytes without escape sequence' => '1b24422422', // 'ア' in JIS + 'JIS X 0201 7bit kana with escape sequence' => '1b2849311b2842', // 'ア' in JIS + 'JIS X 0201 7bit kana with SO/SI' => '0e310f', // 'ア' in JIS + 'JIS X 0201 8bit kana' => 'b1', // 'ア' in JIS + 'JIS X 0201 7bit kana with SO and ESC' => '0e311b2842', // 'ア' in JIS + 'JIS X 0201 7bit kana with ESC and SI' => '1b2849310f', // 'ア' in JIS + 'JIS X 0208 character' => '1b244242641b2842', // '鯛' in JIS and ISO-2022-JP, included in JIS X 0208 + 'JIS X 0212 character' => '1b2428446a591b2842', // '鮋' in JIS, included in JIS X 0212 + 'JIS X 0213 character' => '1b2428507d4c1b2842', // '𩸽' in ISO-2022-JP-2004, included in JIS X 0213 + 'JIS C 6220-1969 ESC ( H' => '1b284a1b2848', // an escape sequence transitioning to ASCII + 'SO/SI when not in ASCII mode' => '1b284a0e0f1b2842', // an escape sequence transitioning to ASCII +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + echo 'JIS:' . PHP_EOL; + var_dump(mb_check_encoding(hex2bin($case), 'JIS')); + echo mb_convert_encoding(hex2bin($case), 'UTF-8', 'JIS'). PHP_EOL; + var_dump(mb_get_info('illegal_chars')); + echo 'ISO-2022-JP:' . PHP_EOL; + var_dump(mb_check_encoding(hex2bin($case), 'ISO-2022-JP')); + echo mb_convert_encoding(hex2bin($case), 'UTF-8', 'ISO-2022-JP'). PHP_EOL; + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} +?> +--EXPECT-- +ISO-2022-JP bytes +JIS: +bool(true) +あ +int(0) +ISO-2022-JP: +bool(true) +あ +int(0) + +ISO-2022-JP bytes without escape sequence +JIS: +bool(false) +あ +int(0) +ISO-2022-JP: +bool(false) +あ +int(0) + +JIS X 0201 7bit kana with escape sequence +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with SO/SI +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 8bit kana +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with SO and ESC +JIS: +bool(false) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with ESC and SI +JIS: +bool(false) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0208 character +JIS: +bool(true) +鯛 +int(0) +ISO-2022-JP: +bool(true) +鯛 +int(0) + +JIS X 0212 character +JIS: +bool(true) +鮋 +int(0) +ISO-2022-JP: +bool(false) +鮋 +int(0) + +JIS X 0213 character +JIS: +bool(false) +?$(P}L +int(1) +ISO-2022-JP: +bool(false) +?$(P}L +int(2) + +JIS C 6220-1969 ESC ( H +JIS: +bool(true) + +int(2) +ISO-2022-JP: +bool(false) + +int(2) + +SO/SI when not in ASCII mode +JIS: +bool(false) + +int(2) +ISO-2022-JP: +bool(false) + +int(2) diff --git a/ext/mbstring/tests/iso2022jp_encoding.phpt b/ext/mbstring/tests/iso2022jp_encoding.phpt index 634f0976994c3..5da1899c855b1 100644 --- a/ext/mbstring/tests/iso2022jp_encoding.phpt +++ b/ext/mbstring/tests/iso2022jp_encoding.phpt @@ -50,11 +50,6 @@ function testValid($from, $to, $encoding, $bothWays = true) { /* ESC ( B at the beginning is redundant, since ASCII mode is the default */ if (substr($from, 0, 3) == "\x1B(B") $from = substr($from, 3, strlen($from) - 3); - /* If the string switches to a different charset, it should switch back to - * ASCII at the end */ - if (strpos($from, "\x1B\$B") !== false || strpos($from, "\x1B(J") !== false) - $from .= "\x1B(B"; - convertValidString($to, $from, 'UTF-16BE', $encoding, false); } } @@ -66,11 +61,11 @@ function testInvalid($from, $to, $encoding) { for ($i = 0; $i < 0x80; $i++) { if ($i == 0xE || $i == 0xF || $i == 0x1B) continue; - testValid(chr($i), "\x00" . chr($i), 'JIS'); - testValid("\x0F" . chr($i), "\x00" . chr($i), 'JIS'); /* 0xF is 'Shift Out' code */ - testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'JIS'); - testValid(chr($i), "\x00" . chr($i), 'ISO-2022-JP'); - testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'ISO-2022-JP'); + testValid(chr($i), "\x00" . chr($i), 'JIS'); + convertValidString("\x0F" . chr($i), "\x00" . chr($i), 'JIS', 'UTF-16BE', false); /* 0xF is 'Shift In' code */ + testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'JIS'); + testValid(chr($i), "\x00" . chr($i), 'ISO-2022-JP'); + testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'ISO-2022-JP'); } for ($i = 0x80; $i < 256; $i++) { @@ -92,27 +87,27 @@ echo "ASCII support OK\n"; foreach ($jisx0201Chars as $jisx0201 => $utf16BE) { if (ord($jisx0201) >= 128) { $kana = chr(ord($jisx0201) - 128); - testValid("\x1B(I" . $kana, $utf16BE, 'JIS', false); - testValid("\x0E" . $kana, $utf16BE, 'JIS', false); /* 0xE is 'Shift In' code */ + testValid("\x1B(I" . $kana . "\x1B(B", $utf16BE, 'JIS', false); + testValid("\x0E" . $kana . "\x0F", $utf16BE, 'JIS', false); /* 0xE is 'Shift Out' code */ testValid($jisx0201, $utf16BE, 'JIS', false); } else { - testValid("\x1B(J" . $jisx0201, $utf16BE, 'JIS', $utf16BE > "\x00\x80"); + testValid("\x1B(J" . $jisx0201 . "\x1B(B", $utf16BE, 'JIS', $utf16BE > "\x00\x80"); } } for ($i = 0x80; $i < 256; $i++) { if ($i >= 0xA1 && $i <= 0xDF) continue; - testInvalid("\x1B(I" . chr($i), "\x00%", 'JIS'); - testInvalid("\x1B(J" . chr($i), "\x00%", 'JIS'); + testInvalid("\x1B(I" . chr($i) . "\x1B(B", "\x00%", 'JIS'); + testInvalid("\x1B(J" . chr($i) . "\x1B(B", "\x00%", 'JIS'); } echo "JIS X 0201 support OK\n"; /* All valid JISX0208 characters */ foreach ($jisx0208Chars as $jisx0208 => $utf16BE) { - testValid("\x1B\$B" . $jisx0208, $utf16BE, 'JIS'); - testValid("\x1B\$B" . $jisx0208, $utf16BE, 'ISO-2022-JP'); + testValid("\x1B\$B" . $jisx0208 . "\x1B(B", $utf16BE, 'JIS'); + testValid("\x1B\$B" . $jisx0208 . "\x1B(B", $utf16BE, 'ISO-2022-JP'); } /* All invalid 2-byte JISX0208 characters */ @@ -120,8 +115,8 @@ for ($i = 0x21; $i <= 0x7E; $i++) { for ($j = 0; $j < 256; $j++) { $testString = chr($i) . chr($j); if (!isset($jisx0208Chars[$testString])) { - testInvalid("\x1B\$B" . $testString, "\x00%", 'JIS'); - testInvalid("\x1B\$B" . $testString, "\x00%", 'ISO-2022-JP'); + testInvalid("\x1B\$B" . $testString . "\x1B(B", "\x00%", 'JIS'); + testInvalid("\x1B\$B" . $testString . "\x1B(B", "\x00%", 'ISO-2022-JP'); } } } @@ -142,7 +137,7 @@ echo "JIS X 0208 support OK\n"; /* All valid JISX0212 characters */ foreach ($jisx0212Chars as $jisx0212 => $utf16BE) { - testValid("\x1B\$(D" . $jisx0212, $utf16BE, 'JIS', false); + testValid("\x1B\$(D" . $jisx0212 . "\x1B(B", $utf16BE, 'JIS', false); } /* All invalid 2-byte JISX0212 characters */ @@ -150,14 +145,14 @@ for ($i = 0x21; $i <= 0x7E; $i++) { for ($j = 0; $j < 256; $j++) { $testString = chr($i) . chr($j); if (!isset($jisx0212Chars[$testString])) { - testInvalid("\x1B\$(D" . $testString, "\x00%", 'JIS'); + testInvalid("\x1B\$(D" . $testString . "\x1B(B", "\x00%", 'JIS'); } } } /* Try truncated JISX0212 characters */ for ($i = 0x21; $i <= 0x7E; $i++) { - testInvalid("\x1B\$(D" . chr($i), "\x00%", 'JIS'); + testInvalid("\x1B\$(D" . chr($i) . "\x1B(B", "\x00%\x00%", 'JIS'); } testValidString("\x00\xA1", "\x1B\$(D\x22\x42\x1B(B", "UTF-16BE", "JIS", false); @@ -167,29 +162,36 @@ convertInvalidString("\x00\xA1", "%", "UTF-16BE", "ISO-2022-JP", false); echo "JIS X 0212 support OK\n"; /* All possible escape sequences */ -$validEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B\$(@" => true, "\x1B\$(B" => true, "\x1B\$(D" => true, "\x1B(B" => true, "\x1B(H" => true, "\x1B(J" => true, "\x1B(I" => true]; +$validJisEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B\$(@" => true, "\x1B\$(B" => true, "\x1B\$(D" => true, "\x1B(B" => true, "\x1B(H" => true, "\x1B(J" => true, "\x1B(I" => true]; +$validIso2022jpEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B(B" => true, "\x1B(J" => true]; for ($i = 0; $i <= 0xFF; $i++) { for ($j = 0; $j <= 0xFF; $j++) { $escapeSequence = "\x1B" . chr($i) . chr($j); if ($escapeSequence === "\x1B\$(") continue; - if (isset($validEscapes[$escapeSequence])) { - testValid($escapeSequence, "", 'JIS', false); - testValid($escapeSequence, "", 'ISO-2022-JP', false); + if (isset($validJisEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'JIS', false); + } else { + identifyInvalidString($escapeSequence . "\x1B(B", 'JIS'); + } + if (isset($validIso2022jpEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'ISO-2022-JP', false); } else { - identifyInvalidString($escapeSequence, 'JIS'); - identifyInvalidString($escapeSequence, 'ISO-2022-JP'); + identifyInvalidString($escapeSequence . "\x1B(B", 'ISO-2022-JP'); } } } for ($i = 0; $i <= 0xFF; $i++) { $escapeSequence = "\x1B\$(" . chr($i); - if (isset($validEscapes[$escapeSequence])) { - testValid($escapeSequence, "", 'JIS', false); - testValid($escapeSequence, "", 'ISO-2022-JP', false); + if (isset($validJisEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'JIS', false); + } else { + identifyInvalidString($escapeSequence . "\x1B(B", 'JIS'); + } + if (isset($validIso2022jpEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'ISO-2022-JP', false); } else { - identifyInvalidString($escapeSequence, 'JIS'); - identifyInvalidString($escapeSequence, 'ISO-2022-JP'); + identifyInvalidString($escapeSequence . "\x1B(B", 'ISO-2022-JP'); } } /* Also try a bare ESC */ diff --git a/ext/mbstring/tests/utf_encodings.phpt b/ext/mbstring/tests/utf_encodings.phpt index 2f050c657c2f3..23166142088cc 100644 --- a/ext/mbstring/tests/utf_encodings.phpt +++ b/ext/mbstring/tests/utf_encodings.phpt @@ -1011,17 +1011,8 @@ testValidString('+' . encode('AB', 'ASCII') . '-+' . encode('CD', 'ASCII') . '-' // (Just trying to be exhaustive here) testValidString('+' . encode('AB', 'ASCII') . '-!+' . encode('CD', 'ASCII') . '-', "\x00A\x00B\x00!\x00C\x00D", 'UTF-7', 'UTF-16BE', false); -// + section terminated by a non-Base64 ASCII character which is NOT - -for ($i = 0; $i < 128; $i++) { - if ($i >= ord('A') && $i <= ord('Z')) - continue; - if ($i >= ord('a') && $i <= ord('z')) - continue; - if ($i >= ord('0') && $i <= ord('9')) - continue; - if ($i == ord('+') || $i == ord('/') || $i == ord('-') || $i == ord('\\') || $i == ord('~')) - continue; - $char = chr($i); +// + section terminated by a non-Base64 direct character which is NOT - +foreach (str_split(" \t\r\n'(),.:?!\"#$%&*;<=>@[]^_`{|}\x00") as $char) { testValidString('+' . encode("\x12\x34", 'UTF-16BE') . $char, "\x00\x00\x12\x34\x00\x00\x00" . $char, 'UTF-7', 'UTF-32BE', false); } From bf64342d30bcb21a70297cbb43471fc138358fe2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 16 Mar 2023 04:25:38 +0200 Subject: [PATCH 697/895] Update NEWS and UPGRADING to reflect changes in 0ce755be26 --- NEWS | 4 ++++ UPGRADING | 3 +++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index dca8db6eba10e..9ef2f169182e2 100644 --- a/NEWS +++ b/NEWS @@ -73,6 +73,10 @@ PHP NEWS encoded words as required by RFC 2047; they are converted to spaces. Underscores must be encoded as "=5F" in such MIME encoded words. (Alex Dowad) + . mb_encode_mimeheader no longer drops NUL (zero) bytes when + QPrint-encoding the input string. This previously caused strings in + certain text encodings, especially UTF-16 and UTF-32, to be + corrupted by mb_encode_mimeheader. (Alex Dowad) - mysqli: . mysqli_fetch_object raises a ValueError instead of an Exception. diff --git a/UPGRADING b/UPGRADING index 210215c3fab7e..db2fdaaa50e21 100644 --- a/UPGRADING +++ b/UPGRADING @@ -91,6 +91,9 @@ PHP 8.3 UPGRADE NOTES encoded words as required by RFC 2047; they are converted to spaces. Underscores must be encoded as "=5F" in such MIME encoded words. (Alex Dowad) + . In rare cases, mb_encode_mimeheader will transfer-encode its input + string where it would pass it through as raw ASCII in PHP 8.2. + (Alex Dowad) - mysqli: . mysqli_fetch_object now raises a ValueError instead of an Exception when the constructor_args From 345abce590bf6b7aa2ffd49ba18e2ff479c3b8bd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 24 Mar 2023 22:18:18 +0200 Subject: [PATCH 698/895] Fix compile errors caused by missing initializers in 0779950768 When I built and tested 0779950768 locally, the build was successful and all tests passed. However, in CI, some CI jobs are failing due to compile errors. Fix those. --- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 5d96b2b11c012..6966c8425cb59 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -166,7 +166,8 @@ const mbfl_encoding mbfl_encoding_sjis_mac = { &vtbl_sjis_mac_wchar, &vtbl_wchar_sjis_mac, mb_sjismac_to_wchar, - mb_wchar_to_sjismac + mb_wchar_to_sjismac, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar = { @@ -203,7 +204,8 @@ const mbfl_encoding mbfl_encoding_sjis_docomo = { &vtbl_sjis_docomo_wchar, &vtbl_wchar_sjis_docomo, mb_sjis_docomo_to_wchar, - mb_wchar_to_sjis_docomo + mb_wchar_to_sjis_docomo, + NULL }; const mbfl_encoding mbfl_encoding_sjis_kddi = { @@ -216,7 +218,8 @@ const mbfl_encoding mbfl_encoding_sjis_kddi = { &vtbl_sjis_kddi_wchar, &vtbl_wchar_sjis_kddi, mb_sjis_kddi_to_wchar, - mb_wchar_to_sjis_kddi + mb_wchar_to_sjis_kddi, + NULL }; const mbfl_encoding mbfl_encoding_sjis_sb = { @@ -229,7 +232,8 @@ const mbfl_encoding mbfl_encoding_sjis_sb = { &vtbl_sjis_sb_wchar, &vtbl_wchar_sjis_sb, mb_sjis_sb_to_wchar, - mb_wchar_to_sjis_sb + mb_wchar_to_sjis_sb, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar = { From 57e194e02d2d36f81f0a8d095bc235ad7ad98b97 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 25 Mar 2023 06:02:01 +0200 Subject: [PATCH 699/895] Fix compile error in Windows CI job caused by 0779950768 In 6fc8d014df, pakutoma added some additional validation logic to mb_detect_encoding. Since the implementation of mb_detect_encoding has changed significantly between PHP 8.2 and 8.3, when merging this change down from PHP-8.2 into master, I had to port his code over to the new implementation in master. However, I did this in a wrong way. In merge commit 0779950768, the ported code modifies a function argument (to mb_guess_encoding) which is marked 'const'. In the Windows CI job, MS VC++ rightly flags this as a compile error. Adjust the code to accomplish the same thing, but without destructively modifying 'const' arguments. --- ext/mbstring/mbstring.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 12af4c6c8f3cf..80b1799655113 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3001,18 +3001,6 @@ static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, return *elist; } - /* If any candidate encoding have specialized validation functions, use those first - * to eliminate as many candidates as possible */ - if (strict) { - for (unsigned int i = 0; i < elist_size; i++) { - if (elist[i]->check != NULL && !elist[i]->check(in, in_len)) { - elist_size--; - memmove(&elist[i], &elist[i+1], (elist_size - i) * sizeof(mbfl_encoding*)); - i--; - } - } - } - uint32_t wchar_buf[128]; struct conversion_data { const mbfl_encoding *enc; @@ -3050,6 +3038,19 @@ static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, } } + /* If any candidate encodings have specialized validation functions, use them + * to eliminate as many candidates as possible */ + if (strict) { + for (unsigned int i = 0; i < elist_size; i++) { + const mbfl_encoding *enc = data[i].enc; + if (enc->check != NULL && !enc->check(in, in_len)) { + elist_size--; + memmove(&data[i], &data[i+1], (elist_size - i) * sizeof(struct conversion_data)); + i--; + } + } + } + unsigned int finished = 0; /* For how many candidate encodings have we processed all the input? */ while (elist_size > 1 && finished < elist_size) { unsigned int i = 0; From 25f86edd4b921bf6ebe589c7f8eaa0eae951c655 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 25 Mar 2023 06:10:48 +0200 Subject: [PATCH 700/895] [ci skip] Add myself to CODEOWNERS for mbstring --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index c7257a7196480..46984a4c24580 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -18,6 +18,7 @@ /ext/gmp @Girgias /ext/imap @Girgias /ext/json @bukka +/ext/mbstring @alexdowad /ext/opcache @dstogov @iluuu1994 /ext/openssl @bukka /ext/pgsql @devnexen From b721d0f71eb0feff559f6aa2e16ff3c120b26a90 Mon Sep 17 00:00:00 2001 From: pakutoma Date: Fri, 10 Mar 2023 21:57:53 +0900 Subject: [PATCH 701/895] Fix phpGH-10648: add check function pointer into mbfl_encoding Previously, mbstring used the same logic for encoding validation as for encoding conversion. However, there are cases where we want to use different logic for validation and conversion. For example, if a string ends up with missing input required by the encoding, or if a character is input that is invalid as an encoding but can be converted, the conversion should succeed and the validation should fail. To achieve this, a function pointer mb_check_fn has been added to struct mbfl_encoding to implement the logic used for validation. Also, added implementation of validation logic for UTF-7, UTF7-IMAP, ISO-2022-JP and JIS. (The same change has already been made to PHP 8.2 and 8.3; see 6fc8d014df. This commit is backporting the change to PHP 8.1.) --- UPGRADING | 10 + ext/mbstring/libmbfl/filters/mbfilter_7bit.c | 1 + .../libmbfl/filters/mbfilter_base64.c | 1 + ext/mbstring/libmbfl/filters/mbfilter_big5.c | 6 +- .../libmbfl/filters/mbfilter_cp5022x.c | 9 +- .../libmbfl/filters/mbfilter_cp51932.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_cp932.c | 6 +- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 3 +- .../libmbfl/filters/mbfilter_euc_cn.c | 3 +- .../libmbfl/filters/mbfilter_euc_jp.c | 3 +- .../libmbfl/filters/mbfilter_euc_jp_2004.c | 3 +- .../libmbfl/filters/mbfilter_euc_jp_win.c | 3 +- .../libmbfl/filters/mbfilter_euc_kr.c | 3 +- .../libmbfl/filters/mbfilter_euc_tw.c | 3 +- .../libmbfl/filters/mbfilter_gb18030.c | 3 +- .../libmbfl/filters/mbfilter_htmlent.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_hz.c | 3 +- .../libmbfl/filters/mbfilter_iso2022_jp_ms.c | 3 +- .../libmbfl/filters/mbfilter_iso2022_kr.c | 3 +- .../libmbfl/filters/mbfilter_iso2022jp_2004.c | 3 +- .../filters/mbfilter_iso2022jp_mobile.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_jis.c | 171 ++++++- .../libmbfl/filters/mbfilter_qprint.c | 1 + .../libmbfl/filters/mbfilter_singlebyte.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 3 +- .../libmbfl/filters/mbfilter_sjis_2004.c | 3 +- .../libmbfl/filters/mbfilter_sjis_mac.c | 3 +- .../libmbfl/filters/mbfilter_sjis_mobile.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_ucs2.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_ucs4.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 3 +- ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_utf32.c | 9 +- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 171 ++++++- .../libmbfl/filters/mbfilter_utf7imap.c | 144 +++++- ext/mbstring/libmbfl/filters/mbfilter_utf8.c | 3 +- .../libmbfl/filters/mbfilter_utf8_mobile.c | 12 +- .../libmbfl/filters/mbfilter_uuencode.c | 1 + ext/mbstring/libmbfl/filters/utf7_helper.h | 27 + ext/mbstring/libmbfl/mbfl/mbfilter.c | 10 + ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c | 3 +- ext/mbstring/libmbfl/mbfl/mbfilter_pass.c | 1 + ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c | 1 + ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 4 + ext/mbstring/mbstring.c | 5 + ext/mbstring/tests/gh10192_utf7.phpt | 462 ++++++++++++++++++ ext/mbstring/tests/gh10192_utf7imap.phpt | 343 +++++++++++++ ext/mbstring/tests/gh10648.phpt | 155 ++++++ ext/mbstring/tests/iso2022jp_encoding.phpt | 68 +-- ext/mbstring/tests/utf_encodings.phpt | 13 +- 50 files changed, 1637 insertions(+), 96 deletions(-) create mode 100644 ext/mbstring/libmbfl/filters/utf7_helper.h create mode 100644 ext/mbstring/tests/gh10192_utf7.phpt create mode 100644 ext/mbstring/tests/gh10192_utf7imap.phpt create mode 100644 ext/mbstring/tests/gh10648.phpt diff --git a/UPGRADING b/UPGRADING index d96509c485be1..6a1ad31f21bbb 100644 --- a/UPGRADING +++ b/UPGRADING @@ -489,6 +489,16 @@ PHP 8.1 UPGRADE NOTES . All GMP function now accept octal string with the leading octal prefix ("0o"/"0O") RFC: https://wiki.php.net/rfc/explicit_octal_notation +- MBString + . mb_check_encoding() now checks input encoding more strictly. + . mb_detect_encoding() now checks input encoding more strictly + when strict detection is enabled. + . mb_convert_encoding() checks the input encoding more strictly + if multiple encodings are passed to from_encoding + and the mbstring.strict_detection INI directive is set to 1. + This change only affects the encoding selection, + not the result of the conversion. + - PDO ODBC: . PDO::getAttributes() with PDO::ATTR_SERVER_INFO and PDO::ATTR_SERVER_VERSION now return values instead of throwing PDOException. diff --git a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c index 2885ca1fbd636..4dd513430c368 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c @@ -39,6 +39,7 @@ const mbfl_encoding mbfl_encoding_7bit = { NULL, MBFL_ENCTYPE_SBCS, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index 04161c94ab3bc..427211c8f8cf6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -39,6 +39,7 @@ const mbfl_encoding mbfl_encoding_base64 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index a3c23b0ec890f..8e59343de91ec 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -63,7 +63,8 @@ const mbfl_encoding mbfl_encoding_big5 = { mblen_table_big5, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_big5_wchar, - &vtbl_wchar_big5 + &vtbl_wchar_big5, + NULL }; const mbfl_encoding mbfl_encoding_cp950 = { @@ -74,7 +75,8 @@ const mbfl_encoding mbfl_encoding_cp950 = { mblen_table_big5, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp950_wchar, - &vtbl_wchar_cp950 + &vtbl_wchar_cp950, + NULL }; const struct mbfl_convert_vtbl vtbl_big5_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index ba324eb3016e6..557ee7f446fc5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -54,7 +54,8 @@ const mbfl_encoding mbfl_encoding_cp50220 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp50220_wchar, - &vtbl_wchar_cp50220 + &vtbl_wchar_cp50220, + NULL }; const mbfl_encoding mbfl_encoding_cp50221 = { @@ -65,7 +66,8 @@ const mbfl_encoding mbfl_encoding_cp50221 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp50221_wchar, - &vtbl_wchar_cp50221 + &vtbl_wchar_cp50221, + NULL }; const mbfl_encoding mbfl_encoding_cp50222 = { @@ -76,7 +78,8 @@ const mbfl_encoding mbfl_encoding_cp50222 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp50222_wchar, - &vtbl_wchar_cp50222 + &vtbl_wchar_cp50222, + NULL }; const struct mbfl_convert_vtbl vtbl_cp50220_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c index 475e01e970d67..1741601d23fe8 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c @@ -65,7 +65,8 @@ const mbfl_encoding mbfl_encoding_cp51932 = { mblen_table_eucjp, 0, &vtbl_cp51932_wchar, - &vtbl_wchar_cp51932 + &vtbl_wchar_cp51932, + NULL }; const struct mbfl_convert_vtbl vtbl_cp51932_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c index 9130cea116324..54f93f91fe207 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c @@ -95,7 +95,8 @@ const mbfl_encoding mbfl_encoding_cp932 = { mblen_table_sjis, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp932_wchar, - &vtbl_wchar_cp932 + &vtbl_wchar_cp932, + NULL }; const struct mbfl_convert_vtbl vtbl_cp932_wchar = { @@ -126,7 +127,8 @@ const mbfl_encoding mbfl_encoding_sjiswin = { mblen_table_sjis, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjiswin_wchar, - &vtbl_wchar_sjiswin + &vtbl_wchar_sjiswin, + NULL }; const struct mbfl_convert_vtbl vtbl_sjiswin_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index e51514aad72d8..cd689513e281b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -63,7 +63,8 @@ const mbfl_encoding mbfl_encoding_cp936 = { mblen_table_cp936, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_cp936_wchar, - &vtbl_wchar_cp936 + &vtbl_wchar_cp936, + NULL }; const struct mbfl_convert_vtbl vtbl_cp936_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index a1e51bbd81473..52b2ee863ba34 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -63,7 +63,8 @@ const mbfl_encoding mbfl_encoding_euc_cn = { mblen_table_euccn, 0, &vtbl_euccn_wchar, - &vtbl_wchar_euccn + &vtbl_wchar_euccn, + NULL }; const struct mbfl_convert_vtbl vtbl_euccn_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index b113537b56a48..0e1b8bec2e9f5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -64,7 +64,8 @@ const mbfl_encoding mbfl_encoding_euc_jp = { mblen_table_eucjp, 0, &vtbl_eucjp_wchar, - &vtbl_wchar_eucjp + &vtbl_wchar_eucjp, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjp_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c index 0709a9f12d075..ef2f815408847 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c @@ -43,7 +43,8 @@ const mbfl_encoding mbfl_encoding_eucjp2004 = { mblen_table_eucjp, 0, &vtbl_eucjp2004_wchar, - &vtbl_wchar_eucjp2004 + &vtbl_wchar_eucjp2004, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjp2004_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index b7d0705391efe..76650b5dd53be 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -65,7 +65,8 @@ const mbfl_encoding mbfl_encoding_eucjp_win = { mblen_table_eucjp, 0, &vtbl_eucjpwin_wchar, - &vtbl_wchar_eucjpwin + &vtbl_wchar_eucjpwin, + NULL }; const struct mbfl_convert_vtbl vtbl_eucjpwin_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c index 6bc52b744b727..9a98fc21d43de 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c @@ -62,7 +62,8 @@ const mbfl_encoding mbfl_encoding_euc_kr = { mblen_table_euckr, 0, &vtbl_euckr_wchar, - &vtbl_wchar_euckr + &vtbl_wchar_euckr, + NULL }; const struct mbfl_convert_vtbl vtbl_euckr_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c index 1cc740dd62e05..6075514b3c79e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c @@ -64,7 +64,8 @@ const mbfl_encoding mbfl_encoding_euc_tw = { mblen_table_euctw, 0, &vtbl_euctw_wchar, - &vtbl_wchar_euctw + &vtbl_wchar_euctw, + NULL }; const struct mbfl_convert_vtbl vtbl_euctw_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index 7889ad348af23..c68dc0b557f26 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -45,7 +45,8 @@ const mbfl_encoding mbfl_encoding_gb18030 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_gb18030_wchar, - &vtbl_wchar_gb18030 + &vtbl_wchar_gb18030, + NULL }; const struct mbfl_convert_vtbl vtbl_gb18030_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index 3a7e879ceaab4..eef10fef108be 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -61,7 +61,8 @@ const mbfl_encoding mbfl_encoding_html_ent = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_html_wchar, - &vtbl_wchar_html + &vtbl_wchar_html, + NULL }; const struct mbfl_convert_vtbl vtbl_wchar_html = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_hz.c b/ext/mbstring/libmbfl/filters/mbfilter_hz.c index a9249788aa679..2eb16bd016100 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_hz.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_hz.c @@ -43,7 +43,8 @@ const mbfl_encoding mbfl_encoding_hz = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_hz_wchar, - &vtbl_wchar_hz + &vtbl_wchar_hz, + NULL }; const struct mbfl_convert_vtbl vtbl_hz_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index 87ffc37bc3ca8..c493c8a62536e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c @@ -46,7 +46,8 @@ const mbfl_encoding mbfl_encoding_2022jpms = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_2022jpms_wchar, - &vtbl_wchar_2022jpms + &vtbl_wchar_2022jpms, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jpms_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index e01931e397a9a..8c7b854f46cc1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -47,7 +47,8 @@ const mbfl_encoding mbfl_encoding_2022kr = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_2022kr_wchar, - &vtbl_wchar_2022kr + &vtbl_wchar_2022kr, + NULL }; const struct mbfl_convert_vtbl vtbl_wchar_2022kr = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c index c54941f23dcbb..547177f3dee67 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c @@ -43,7 +43,8 @@ const mbfl_encoding mbfl_encoding_2022jp_2004 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_2022jp_2004_wchar, - &vtbl_wchar_2022jp_2004 + &vtbl_wchar_2022jp_2004, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jp_2004_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index 8308e0e901bd3..c824a5346553e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -48,7 +48,8 @@ const mbfl_encoding mbfl_encoding_2022jp_kddi = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_2022jp_kddi_wchar, - &vtbl_wchar_2022jp_kddi + &vtbl_wchar_2022jp_kddi, + NULL }; const struct mbfl_convert_vtbl vtbl_2022jp_kddi_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_jis.c b/ext/mbstring/libmbfl/filters/mbfilter_jis.c index d63d972042da5..a0a15a23adc1c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_jis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_jis.c @@ -34,6 +34,8 @@ #include "unicode_table_jis.h" static int mbfl_filt_conv_jis_wchar_flush(mbfl_convert_filter *filter); +static bool mb_check_iso2022jp(unsigned char *in, size_t in_len); +static bool mb_check_jis(unsigned char *in, size_t in_len); const mbfl_encoding mbfl_encoding_jis = { mbfl_no_encoding_jis, @@ -43,7 +45,8 @@ const mbfl_encoding mbfl_encoding_jis = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_jis_wchar, - &vtbl_wchar_jis + &vtbl_wchar_jis, + mb_check_jis }; const mbfl_encoding mbfl_encoding_2022jp = { @@ -54,7 +57,8 @@ const mbfl_encoding mbfl_encoding_2022jp = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_2022jp_wchar, - &vtbl_wchar_2022jp + &vtbl_wchar_2022jp, + mb_check_iso2022jp }; const struct mbfl_convert_vtbl vtbl_jis_wchar = { @@ -463,3 +467,166 @@ mbfl_filt_conv_any_jis_flush(mbfl_convert_filter *filter) return 0; } + +#define ASCII 0 +#define JISX_0201_LATIN 1 +#define JISX_0201_KANA 2 +#define JISX_0208 3 +#define JISX_0212 4 +#define JISX_0201_KANA_SO 5 + +static bool mb_check_jis(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + unsigned int state = ASCII; + + while (p < e) { + unsigned char c = *p++; + if (c == 0x1B) { + /* ESC seen; this is an escape sequence */ + if (state == JISX_0201_KANA_SO) { + return false; + } + if ((e - p) < 2) { + return false; + } + unsigned char c2 = *p++; + if (c2 == '$') { + unsigned char c3 = *p++; + if (c3 == '@' || c3 == 'B') { + state = JISX_0208; + } else if (c3 == '(') { + if (p == e) { + return false; + } + unsigned char c4 = *p++; + if (c4 == '@' || c4 == 'B') { + state = JISX_0208; + } else if (c4 == 'D') { + state = JISX_0212; + } else { + return false; + } + } else { + return false; + } + } else if (c2 == '(') { + unsigned char c3 = *p++; + /* ESC ( H is treated as a sequence transitioning to ASCII for historical reasons. + * see https://github.com/php/php-src/pull/10828#issuecomment-1478342432. */ + if (c3 == 'B' || c3 == 'H') { + state = ASCII; + } else if (c3 == 'J') { + state = JISX_0201_LATIN; + } else if (c3 == 'I') { + state = JISX_0201_KANA; + } else { + return false; + } + } else { + return false; + } + } else if (c == 0xE) { + /* "Kana In" marker */ + if (state != ASCII) { + return false; + } + state = JISX_0201_KANA_SO; + } else if (c == 0xF) { + /* "Kana Out" marker */ + if (state != JISX_0201_KANA_SO) { + return false; + } + state = ASCII; + } else if ((state == JISX_0208 || state == JISX_0212) && (c > 0x20 && c < 0x7F)) { + if (p == e) { + return false; + } + unsigned char c2 = *p++; + if (c2 > 0x20 && c2 < 0x7F) { + unsigned int s = (c - 0x21)*94 + c2 - 0x21; + if (state == JISX_0208) { + if (s < jisx0208_ucs_table_size && jisx0208_ucs_table[s]) { + continue; + } + } else { + if (s < jisx0212_ucs_table_size && jisx0212_ucs_table[s]) { + continue; + } + } + return false; + } else { + return false; + } + } else if (c < 0x80) { + continue; + } else if (c >= 0xA1 && c <= 0xDF) { + /* GR-invoked Kana */ + continue; + } else { + return false; + } + } + + return state == ASCII; +} + + +static bool mb_check_iso2022jp(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + unsigned int state = ASCII; + + while (p < e) { + unsigned char c = *p++; + if (c == 0x1B) { + /* ESC seen; this is an escape sequence */ + if ((e - p) < 2) { + return false; + } + unsigned char c2 = *p++; + if (c2 == '$') { + unsigned char c3 = *p++; + if (c3 == '@' || c3 == 'B') { + state = JISX_0208; + } else { + return false; + } + } else if (c2 == '(') { + unsigned char c3 = *p++; + if (c3 == 'B') { + state = ASCII; + } else if (c3 == 'J') { + state = JISX_0201_LATIN; + } else { + return false; + } + } else { + return false; + } + } else if (c == 0xE || c == 0xF) { + /* "Kana In" or "Kana Out" marker; ISO-2022-JP is not accepted. */ + return false; + } else if (state == JISX_0208 && (c > 0x20 && c < 0x7F)) { + if (p == e) { + return false; + } + unsigned char c2 = *p++; + if (c2 > 0x20 && c2 < 0x7F) { + unsigned int s = (c - 0x21)*94 + c2 - 0x21; + if (s < jisx0208_ucs_table_size && jisx0208_ucs_table[s]) { + continue; + } + return false; + } else { + return false; + } + } else if (c < 0x80) { + continue; + } else { + return false; + } + } + + return state == ASCII; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 2c9e82348726d..521d20adf2915 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -41,6 +41,7 @@ const mbfl_encoding mbfl_encoding_qprint = { NULL, MBFL_ENCTYPE_GL_UNSAFE, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c index e9b2b04086562..8a0b920bff86d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c @@ -78,7 +78,8 @@ static int mbfl_conv_reverselookup_table(int c, mbfl_convert_filter *filter, int NULL, \ MBFL_ENCTYPE_SBCS, \ &vtbl_##id##_wchar, \ - &vtbl_wchar_##id \ + &vtbl_wchar_##id, \ + NULL \ } /* For single-byte encodings which use a conversion table */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 3406cc0cf4bfd..c797b6d794bb4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -67,7 +67,8 @@ const mbfl_encoding mbfl_encoding_sjis = { mblen_table_sjis, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_wchar, - &vtbl_wchar_sjis + &vtbl_wchar_sjis, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 6a6fe92f49722..f9964275b2704 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -54,7 +54,8 @@ const mbfl_encoding mbfl_encoding_sjis2004 = { mblen_table_sjis_mobile, /* Leading byte values used for SJIS-2004 are the same as mobile SJIS variants */ MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis2004_wchar, - &vtbl_wchar_sjis2004 + &vtbl_wchar_sjis2004, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis2004_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c index 3f85cb5eecb5a..e2a08351b8e9f 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c @@ -67,7 +67,8 @@ const mbfl_encoding mbfl_encoding_sjis_mac = { mblen_table_sjismac, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_mac_wchar, - &vtbl_wchar_sjis_mac + &vtbl_wchar_sjis_mac, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index cc04335fcc410..aff91b786d723 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -70,7 +70,8 @@ const mbfl_encoding mbfl_encoding_sjis_docomo = { mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_docomo_wchar, - &vtbl_wchar_sjis_docomo + &vtbl_wchar_sjis_docomo, + NULL }; const mbfl_encoding mbfl_encoding_sjis_kddi = { @@ -81,7 +82,8 @@ const mbfl_encoding mbfl_encoding_sjis_kddi = { mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_kddi_wchar, - &vtbl_wchar_sjis_kddi + &vtbl_wchar_sjis_kddi, + NULL }; const mbfl_encoding mbfl_encoding_sjis_sb = { @@ -92,7 +94,8 @@ const mbfl_encoding mbfl_encoding_sjis_sb = { mblen_table_sjis_mobile, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_sjis_sb_wchar, - &vtbl_wchar_sjis_sb + &vtbl_wchar_sjis_sb, + NULL }; const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c index 3301146a1e9e9..fcad8349cae53 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c @@ -49,7 +49,8 @@ const mbfl_encoding mbfl_encoding_ucs2 = { NULL, MBFL_ENCTYPE_WCS2, &vtbl_ucs2_wchar, - &vtbl_wchar_ucs2 + &vtbl_wchar_ucs2, + NULL }; const mbfl_encoding mbfl_encoding_ucs2be = { @@ -60,7 +61,8 @@ const mbfl_encoding mbfl_encoding_ucs2be = { NULL, MBFL_ENCTYPE_WCS2, &vtbl_ucs2be_wchar, - &vtbl_wchar_ucs2be + &vtbl_wchar_ucs2be, + NULL }; const mbfl_encoding mbfl_encoding_ucs2le = { @@ -71,7 +73,8 @@ const mbfl_encoding mbfl_encoding_ucs2le = { NULL, MBFL_ENCTYPE_WCS2, &vtbl_ucs2le_wchar, - &vtbl_wchar_ucs2le + &vtbl_wchar_ucs2le, + NULL }; const struct mbfl_convert_vtbl vtbl_ucs2_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c index f0ac949ffda94..70ee71d52a1e2 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c @@ -48,7 +48,8 @@ const mbfl_encoding mbfl_encoding_ucs4 = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_ucs4_wchar, - &vtbl_wchar_ucs4 + &vtbl_wchar_ucs4, + NULL }; const mbfl_encoding mbfl_encoding_ucs4be = { @@ -59,7 +60,8 @@ const mbfl_encoding mbfl_encoding_ucs4be = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_ucs4be_wchar, - &vtbl_wchar_ucs4be + &vtbl_wchar_ucs4be, + NULL }; const mbfl_encoding mbfl_encoding_ucs4le = { @@ -70,7 +72,8 @@ const mbfl_encoding mbfl_encoding_ucs4le = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_ucs4le_wchar, - &vtbl_wchar_ucs4le + &vtbl_wchar_ucs4le, + NULL }; const struct mbfl_convert_vtbl vtbl_ucs4_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 60fef4d3952f8..62b010cc3b057 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -67,7 +67,8 @@ const mbfl_encoding mbfl_encoding_uhc = { mblen_table_uhc, 0, &vtbl_uhc_wchar, - &vtbl_wchar_uhc + &vtbl_wchar_uhc, + NULL }; const struct mbfl_convert_vtbl vtbl_uhc_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index eb7d9fa2593e1..7470dbda551d1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -42,7 +42,8 @@ const mbfl_encoding mbfl_encoding_utf16 = { NULL, MBFL_ENCTYPE_MWC2, &vtbl_utf16_wchar, - &vtbl_wchar_utf16 + &vtbl_wchar_utf16, + NULL }; const mbfl_encoding mbfl_encoding_utf16be = { @@ -53,7 +54,8 @@ const mbfl_encoding mbfl_encoding_utf16be = { NULL, MBFL_ENCTYPE_MWC2, &vtbl_utf16be_wchar, - &vtbl_wchar_utf16be + &vtbl_wchar_utf16be, + NULL }; const mbfl_encoding mbfl_encoding_utf16le = { @@ -64,7 +66,8 @@ const mbfl_encoding mbfl_encoding_utf16le = { NULL, MBFL_ENCTYPE_MWC2, &vtbl_utf16le_wchar, - &vtbl_wchar_utf16le + &vtbl_wchar_utf16le, + NULL }; const struct mbfl_convert_vtbl vtbl_utf16_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index 1269e51500437..016b4e46a9440 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -42,7 +42,8 @@ const mbfl_encoding mbfl_encoding_utf32 = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_utf32_wchar, - &vtbl_wchar_utf32 + &vtbl_wchar_utf32, + NULL }; const mbfl_encoding mbfl_encoding_utf32be = { @@ -53,7 +54,8 @@ const mbfl_encoding mbfl_encoding_utf32be = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_utf32be_wchar, - &vtbl_wchar_utf32be + &vtbl_wchar_utf32be, + NULL }; const mbfl_encoding mbfl_encoding_utf32le = { @@ -64,7 +66,8 @@ const mbfl_encoding mbfl_encoding_utf32le = { NULL, MBFL_ENCTYPE_WCS4, &vtbl_utf32le_wchar, - &vtbl_wchar_utf32le + &vtbl_wchar_utf32le, + NULL }; const struct mbfl_convert_vtbl vtbl_utf32_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index bc34a394915ad..fc2bc36420be5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -29,8 +29,10 @@ #include "mbfilter.h" #include "mbfilter_utf7.h" +#include "utf7_helper.h" static int mbfl_filt_conv_utf7_wchar_flush(mbfl_convert_filter *filter); +static bool mb_check_utf7(unsigned char *in, size_t in_len); static const unsigned char mbfl_base64_table[] = { /* 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', */ @@ -55,7 +57,8 @@ const mbfl_encoding mbfl_encoding_utf7 = { NULL, MBFL_ENCTYPE_GL_UNSAFE, &vtbl_utf7_wchar, - &vtbl_wchar_utf7 + &vtbl_wchar_utf7, + mb_check_utf7 }; const struct mbfl_convert_vtbl vtbl_utf7_wchar = { @@ -419,3 +422,169 @@ int mbfl_filt_conv_wchar_utf7_flush(mbfl_convert_filter *filter) return 0; } + +static bool is_optional_direct(unsigned char c) +{ + /* Characters that are allowed to be encoded by Base64 or directly encoded */ + return c == '!' || c == '"' || c == '#' || c == '$' || c == '%' || c == '&' || c == '*' || c == ';' || c == '<' || + c == '=' || c == '>' || c == '@' || c == '[' || c == ']' || c == '^' || c == '_' || c == '`' || c == '{' || + c == '|' || c == '}'; +} + +static bool can_end_base64(uint32_t c) +{ + return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\'' || c == '(' || c == ')' || c == ',' || c == '.' || c == ':' || c == '?'; +} + +static unsigned char decode_base64(unsigned char c) +{ + if (c >= 'A' && c <= 'Z') { + return c - 65; + } else if (c >= 'a' && c <= 'z') { + return c - 71; + } else if (c >= '0' && c <= '9') { + return c + 4; + } else if (c == '+') { + return 62; + } else if (c == '/') { + return 63; + } else if (c == '-') { + return DASH; + } else if (can_end_base64(c) || is_optional_direct(c) || c == '\0') { + return DIRECT; + } else if (c <= 0x7F) { + return ASCII; + } + return ILLEGAL; +} + +static bool is_utf16_cp_valid(uint16_t cp, bool is_surrogate) +{ + if (is_surrogate) { + return cp >= 0xDC00 && cp <= 0xDFFF; + } else { + /* 2nd part of surrogate pair came unexpectedly */ + return !(cp >= 0xDC00 && cp <= 0xDFFF); + } +} + +static bool should_direct_encode(uint32_t c) +{ + return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '\0' || c == '/' || c == '-' || can_end_base64(c); +} + +static bool can_encode_directly(unsigned char c) +{ + return should_direct_encode(c) || is_optional_direct(c) || c == '\0'; +} + +static bool mb_check_utf7(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + bool base64 = false; + bool is_surrogate = false; + + while (p < e) { + if (base64) { + unsigned char n1 = decode_base64(*p++); + if (is_base64_end(n1)) { + if (!is_base64_end_valid(n1, false, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n2 = decode_base64(*p++); + if (is_base64_end(n2) || p == e) { + return false; + } + unsigned char n3 = decode_base64(*p++); + if (is_base64_end(n3)) { + return false; + } + uint16_t cp1 = (n1 << 10) | (n2 << 4) | ((n3 & 0x3C) >> 2); + if (!is_utf16_cp_valid(cp1, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp1, is_surrogate); + if (p == e) { + /* It is an error if trailing padding bits are not zeroes or if we were + * expecting the 2nd part of a surrogate pair when Base64 section ends */ + return !((n3 & 0x3) || is_surrogate); + } + + unsigned char n4 = decode_base64(*p++); + if (is_base64_end(n4)) { + if (!is_base64_end_valid(n4, n3 & 0x3, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n5 = decode_base64(*p++); + if (is_base64_end(n5) || p == e) { + return false; + } + unsigned char n6 = decode_base64(*p++); + if (is_base64_end(n6)) { + return false; + } + uint16_t cp2 = (n3 << 14) | (n4 << 8) | (n5 << 2) | ((n6 & 0x30) >> 4); + if (!is_utf16_cp_valid(cp2, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp2, is_surrogate); + if (p == e) { + return !((n6 & 0xF) || is_surrogate); + } + + unsigned char n7 = decode_base64(*p++); + if (is_base64_end(n7)) { + if (!is_base64_end_valid(n7, n6 & 0xF, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n8 = decode_base64(*p++); + if (is_base64_end(n8)) { + return false; + } + uint16_t cp3 = (n6 << 12) | (n7 << 6) | n8; + if (!is_utf16_cp_valid(cp3, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp3, is_surrogate); + } else { + /* ASCII text section */ + unsigned char c = *p++; + + if (c == '+') { + if (p == e) { + base64 = true; + return !is_surrogate; + } + unsigned char n = decode_base64(*p); + if (n == DASH) { + p++; + } else if (n > DASH) { + /* If a "+" character followed immediately by any character other than base64 or "-" */ + return false; + } else { + base64 = true; + } + } else if (can_encode_directly(c)) { + continue; + } else { + return false; + } + } + } + return !is_surrogate; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 821155f1b71e4..012904a287ef7 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -77,9 +77,11 @@ #include "mbfilter.h" #include "mbfilter_utf7imap.h" +#include "utf7_helper.h" static int mbfl_filt_conv_wchar_utf7imap_flush(mbfl_convert_filter *filter); static int mbfl_filt_conv_utf7imap_wchar_flush(mbfl_convert_filter *filter); +static bool mb_check_utf7imap(unsigned char *in, size_t in_len); static const char *mbfl_encoding_utf7imap_aliases[] = {"mUTF-7", NULL}; @@ -91,7 +93,8 @@ const mbfl_encoding mbfl_encoding_utf7imap = { NULL, 0, &vtbl_utf7imap_wchar, - &vtbl_wchar_utf7imap + &vtbl_wchar_utf7imap, + mb_check_utf7imap }; const struct mbfl_convert_vtbl vtbl_utf7imap_wchar = { @@ -437,3 +440,142 @@ static int mbfl_filt_conv_wchar_utf7imap_flush(mbfl_convert_filter *filter) } return 0; } + +static unsigned char decode_base64(unsigned char c) +{ + if (c >= 'A' && c <= 'Z') { + return c - 65; + } else if (c >= 'a' && c <= 'z') { + return c - 71; + } else if (c >= '0' && c <= '9') { + return c + 4; + } else if (c == '+') { + return 62; + } else if (c == ',') { + return 63; + } else if (c == '-') { + return DASH; + } + return ILLEGAL; +} + +static bool is_utf16_cp_valid(uint16_t cp, bool is_surrogate) +{ + if (is_surrogate) { + return cp >= 0xDC00 && cp <= 0xDFFF; + } else if (cp >= 0xDC00 && cp <= 0xDFFF) { + /* 2nd part of surrogate pair came unexpectedly */ + return false; + } else if (cp >= 0x20 && cp <= 0x7E && cp != '&') { + return false; + } + return true; +} + +static bool mb_check_utf7imap(unsigned char *in, size_t in_len) +{ + unsigned char *p = in, *e = p + in_len; + bool base64 = false; + bool is_surrogate = false; + + while (p < e) { + if (base64) { + /* Base64 section */ + unsigned char n1 = decode_base64(*p++); + if (is_base64_end(n1)) { + if (!is_base64_end_valid(n1, false, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n2 = decode_base64(*p++); + if (is_base64_end(n2) || p == e) { + return false; + } + unsigned char n3 = decode_base64(*p++); + if (is_base64_end(n3)) { + return false; + } + uint16_t cp1 = (n1 << 10) | (n2 << 4) | ((n3 & 0x3C) >> 2); + if (!is_utf16_cp_valid(cp1, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp1, is_surrogate); + if (p == e) { + return false; + } + + unsigned char n4 = decode_base64(*p++); + if (is_base64_end(n4)) { + if (!is_base64_end_valid(n4, n3 & 0x3, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n5 = decode_base64(*p++); + if (is_base64_end(n5) || p == e) { + return false; + } + unsigned char n6 = decode_base64(*p++); + if (is_base64_end(n6)) { + return false; + } + uint16_t cp2 = (n3 << 14) | (n4 << 8) | (n5 << 2) | ((n6 & 0x30) >> 4); + if (!is_utf16_cp_valid(cp2, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp2, is_surrogate); + if (p == e) { + return false; + } + + unsigned char n7 = decode_base64(*p++); + if (is_base64_end(n7)) { + if (!is_base64_end_valid(n7, n6 & 0xF, is_surrogate)) { + return false; + } + base64 = false; + continue; + } else if (p == e) { + return false; + } + unsigned char n8 = decode_base64(*p++); + if (is_base64_end(n8)) { + return false; + } + uint16_t cp3 = (n6 << 12) | (n7 << 6) | n8; + if (!is_utf16_cp_valid(cp3, is_surrogate)) { + return false; + } + is_surrogate = has_surrogate(cp3, is_surrogate); + } else { + /* ASCII text section */ + unsigned char c = *p++; + + if (c == '&') { + if (p == e) { + return false; + } + unsigned char n = decode_base64(*p); + if (n == DASH) { + p++; + } else if (n == ILLEGAL) { + return false; + } else { + base64 = true; + } + } else if (c >= 0x20 && c <= 0x7E) { + continue; + } else { + return false; + } + } + } + return !base64; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index 7ab4c5f96b887..2e71888327be8 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -59,7 +59,8 @@ const mbfl_encoding mbfl_encoding_utf8 = { mblen_table_utf8, 0, &vtbl_utf8_wchar, - &vtbl_wchar_utf8 + &vtbl_wchar_utf8, + NULL }; const struct mbfl_convert_vtbl vtbl_utf8_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c index c52459dc3abb6..a3dc2f8249a56 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -49,7 +49,8 @@ const mbfl_encoding mbfl_encoding_utf8_docomo = { mblen_table_utf8, 0, &vtbl_utf8_docomo_wchar, - &vtbl_wchar_utf8_docomo + &vtbl_wchar_utf8_docomo, + NULL }; const mbfl_encoding mbfl_encoding_utf8_kddi_a = { @@ -60,7 +61,8 @@ const mbfl_encoding mbfl_encoding_utf8_kddi_a = { mblen_table_utf8, 0, &vtbl_utf8_kddi_a_wchar, - &vtbl_wchar_utf8_kddi_a + &vtbl_wchar_utf8_kddi_a, + NULL }; const mbfl_encoding mbfl_encoding_utf8_kddi_b = { @@ -71,7 +73,8 @@ const mbfl_encoding mbfl_encoding_utf8_kddi_b = { mblen_table_utf8, 0, &vtbl_utf8_kddi_b_wchar, - &vtbl_wchar_utf8_kddi_b + &vtbl_wchar_utf8_kddi_b, + NULL }; const mbfl_encoding mbfl_encoding_utf8_sb = { @@ -82,7 +85,8 @@ const mbfl_encoding mbfl_encoding_utf8_sb = { mblen_table_utf8, 0, &vtbl_utf8_sb_wchar, - &vtbl_wchar_utf8_sb + &vtbl_wchar_utf8_sb, + NULL }; const struct mbfl_convert_vtbl vtbl_utf8_docomo_wchar = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c index d602274db62cf..51e0e8777c189 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c @@ -38,6 +38,7 @@ const mbfl_encoding mbfl_encoding_uuencode = { NULL, MBFL_ENCTYPE_SBCS, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/filters/utf7_helper.h b/ext/mbstring/libmbfl/filters/utf7_helper.h new file mode 100644 index 0000000000000..4e13bf94da070 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/utf7_helper.h @@ -0,0 +1,27 @@ +#ifndef MBFL_UTF7_HELPER_H +#define MBFL_UTF7_HELPER_H + +#include "mbfilter.h" + +/* Ways which a Base64-encoded section can end: */ +#define DASH 0xFC +#define DIRECT 0xFD +#define ASCII 0xFE +#define ILLEGAL 0xFF + +static inline bool is_base64_end(unsigned char c) +{ + return c >= DASH; +} + +static inline bool is_base64_end_valid(unsigned char n, bool gap, bool is_surrogate) +{ + return !(gap || is_surrogate || n == ASCII || n == ILLEGAL); +} + +static inline bool has_surrogate(uint16_t cp, bool is_surrogate) +{ + return !is_surrogate && cp >= 0xD800 && cp <= 0xDBFF; +} + +#endif /* MBFL_UTF7_HELPER_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 4820f15e214ce..4fffb90f8e70d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -376,6 +376,16 @@ int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *str unsigned char *p = string->val; int bad = 0; + if (identd->strict) { + for (int i = 0; i < num; i++) { + mbfl_convert_filter *filter = identd->filter_list[i]; + mbfl_encoding_detector_data *data = &identd->filter_data[i]; + if (filter->from->check != NULL && !(filter->from->check)(p, n)) { + data->num_illegalchars++; + } + } + } + while (n--) { for (int i = 0; i < num; i++) { mbfl_convert_filter *filter = identd->filter_list[i]; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c index e348ddb69cc57..4745a5848defa 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c @@ -47,7 +47,8 @@ const mbfl_encoding mbfl_encoding_8bit = { NULL, MBFL_ENCTYPE_SBCS, &vtbl_8bit_wchar, - &vtbl_wchar_8bit + &vtbl_wchar_8bit, + NULL }; const struct mbfl_convert_vtbl vtbl_8bit_wchar = { diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c index e43f746ecca45..63525cc49603b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c @@ -42,6 +42,7 @@ const mbfl_encoding mbfl_encoding_pass = { NULL, 0, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c index a2b22c9105acc..3b20e3ffdab0d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c @@ -40,5 +40,6 @@ const mbfl_encoding mbfl_encoding_wchar = { NULL, MBFL_ENCTYPE_WCS4, NULL, + NULL, NULL }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index 09505d7238245..f024e43781471 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -32,6 +32,7 @@ #define MBFL_ENCODING_H #include "mbfl_defs.h" +#include "zend.h" enum mbfl_no_encoding { mbfl_no_encoding_invalid = -1, @@ -132,6 +133,8 @@ struct mbfl_convert_vtbl { void (*filter_copy)(struct _mbfl_convert_filter *src, struct _mbfl_convert_filter *dest); }; +typedef bool (*mb_check_fn)(unsigned char *in, size_t in_len); + /* * encoding */ @@ -144,6 +147,7 @@ typedef struct _mbfl_encoding { unsigned int flag; const struct mbfl_convert_vtbl *input_filter; const struct mbfl_convert_vtbl *output_filter; + mb_check_fn check; } mbfl_encoding; MBFLAPI extern const mbfl_encoding *mbfl_name2encoding(const char *name); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 9e0248e29e89f..238d74e4838bb 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3917,6 +3917,11 @@ MBSTRING_API int php_mb_check_encoding(const char *input, size_t length, const m { mbfl_convert_filter *filter = mbfl_convert_filter_new(encoding, &mbfl_encoding_wchar, mbfl_filt_check_errors, NULL, &filter); + if (encoding->check != NULL) { + mbfl_convert_filter_delete(filter); + return encoding->check((unsigned char*)input, length); + } + while (length--) { unsigned char c = *input++; (filter->filter_function)(c, filter); diff --git a/ext/mbstring/tests/gh10192_utf7.phpt b/ext/mbstring/tests/gh10192_utf7.phpt new file mode 100644 index 0000000000000..eac0c9c00f1d6 --- /dev/null +++ b/ext/mbstring/tests/gh10192_utf7.phpt @@ -0,0 +1,462 @@ +--TEST-- +GH-10192 (mb_detect_encoding() results for UTF-7 differ between PHP 8.0 and 8.1) +--EXTENSIONS-- +mbstring +--FILE-- + 'A + B', + 'non-base64 character after -' => 'A - B', + 'base64 character before +' => 'A 1+ B', + 'base64 character before -' => 'A 1- B', + 'base64 character after +' => 'A +1 B', + 'base64 character after -' => 'A -1 B', + 'base64 character before and after +' => 'A 1+1 B', + 'base64 character before and after -' => 'A 1-1 B', + 'string ends with +' => 'A +', + 'string ends with -' => 'A -', + '+ and -' => 'A +- B', + '- and +' => 'A -+ B', + 'valid direct encoding character =' => 'A = B', + 'invalid direct encoding character ~' => 'A ~ B', + 'invalid direct encoding character \\' => 'A \\ B', + 'invalid direct encoding character ESC' => "A \x1b B", + 'valid direct encoding character = after +' => 'A += B', + 'invalid direct encoding character ~ after +' => 'A +~ B', + 'invalid direct encoding character \\ after +' => 'A +\\ B', + 'invalid direct encoding character ESC after +' => "A +\x1b B", + 'valid base64 character between + and -' => 'A +ZeVnLIqe- B', // 日本語 in UTF-16BE + 'invalid base64 character between + and -' => 'A +ZeVnLIq- B', // 日本語 in UTF-16BE without the last character + 'valid base64 character between + and non-base64 character' => 'A +ZeVnLIqe B', + 'invalid base64 character between + and non-base64 character' => 'A +ZeVnLIq B', + 'valid base64 character between + and base64 character' => 'A +ZeVnLIqe1 B', + 'invalid base64 character between + and base64 character' => 'A +ZeVnLIq1 B', + 'valid base64 character between + and end of string' => 'A +ZeVnLIqe', + 'invalid base64 character between + and end of string' => 'A +ZeVnLIq', + 'valid base64 character consisting only of + between + and -' => 'A +++++++++- B', + 'invalid base64 character consisting only of + between + and -' => 'A +++++++++- B', + 'valid base64 character consisting only of + between + and non-base64 character' => 'A +++++++++ B', + 'invalid base64 character consisting only of + between + and non-base64 character' => 'A +++++++++ B', + 'valid base64 character consisting only of + between + and base64 character' => 'A +++++++++1 B', + 'invalid base64 character consisting only of + between + and base64 character' => 'A +++++++++1 B', + 'valid base64 character consisting only of + between + and end of string' => 'A +++++++++', + 'invalid base64 character consisting only of + between + and end of string' => 'A +++++++++', + 'valid base64 character using surrogate pair between + and -' => 'A +2GfePQ- B', // 𩸽 in UTF-16BE + 'invalid base64 character using surrogate pair between + and -' => 'A +2Gc- B', // first 16 bits of 𩸽 in UTF-16BE + 'valid base64 character using surrogate pair between + and non-base64 character' => 'A +2GfePQ B', + 'invalid base64 character using surrogate pair between + and non-base64 character' => 'A +2Gc B', + 'valid base64 character using surrogate pair between + and base64 character' => 'A +2GfePQ1 B', + 'invalid base64 character using surrogate pair between + and base64 character' => 'A +2Gc1 B', + 'valid base64 character using surrogate pair between + and end of string' => 'A +2GfePQ', + 'invalid base64 character using surrogate pair between + and end of string' => 'A +2Gc' +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + var_dump(mb_detect_encoding($case, 'UTF-8, UTF-7', true)); + var_dump(mb_detect_encoding($case, 'UTF-8, UTF-7', false)); + var_dump(mb_detect_encoding($case, 'UTF-7', true)); + var_dump(mb_detect_encoding($case, 'UTF-7', false)); + var_dump(mb_check_encoding($case, 'UTF-7')); + var_dump(addcslashes(mb_convert_encoding($case, 'UTF-8', 'UTF-7'), "\0..\37\177")); + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} +?> +--EXPECT-- +non-base64 character after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(4) "A B" +int(0) + +non-base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A - B" +int(0) + +base64 character before + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A 1 B" +int(0) + +base64 character before - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A 1- B" +int(0) + +base64 character after + +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(1) + +base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A -1 B" +int(1) + +base64 character before and after + +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(6) "A 1? B" +int(2) + +base64 character before and after - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(7) "A 1-1 B" +int(2) + +string ends with + +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(2) "A " +int(2) + +string ends with - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(3) "A -" +int(2) + ++ and - +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A + B" +int(2) + +- and + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A - B" +int(2) + +valid direct encoding character = +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(5) "A = B" +int(2) + +invalid direct encoding character ~ +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ~ B" +int(2) + +invalid direct encoding character \ +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A \ B" +int(2) + +invalid direct encoding character ESC +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(8) "A \033 B" +int(2) + +valid direct encoding character = after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A = B" +int(2) + +invalid direct encoding character ~ after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ~ B" +int(2) + +invalid direct encoding character \ after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A \ B" +int(2) + +invalid direct encoding character ESC after + +string(5) "UTF-8" +string(5) "UTF-7" +bool(false) +string(5) "UTF-7" +bool(false) +string(8) "A \033 B" +int(2) + +valid base64 character between + and - +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本語 B" +int(2) + +invalid base64 character between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(11) "A 日本? B" +int(3) + +valid base64 character between + and non-base64 character +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本語 B" +int(3) + +invalid base64 character between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(11) "A 日本? B" +int(4) + +valid base64 character between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A 日本語? B" +int(5) + +invalid base64 character between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A 日本誵 B" +int(5) + +valid base64 character between + and end of string +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A 日本語" +int(5) + +invalid base64 character between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(9) "A 日本?" +int(6) + +valid base64 character consisting only of + between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +invalid base64 character consisting only of + between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +valid base64 character consisting only of + between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +invalid base64 character consisting only of + between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(13) "A ﯯ뻻 B" +int(6) + +valid base64 character consisting only of + between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A ﯯ뻻? B" +int(7) + +invalid base64 character consisting only of + between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(14) "A ﯯ뻻? B" +int(8) + +valid base64 character consisting only of + between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A ﯯ뻻" +int(8) + +invalid base64 character consisting only of + between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(11) "A ﯯ뻻" +int(8) + +valid base64 character using surrogate pair between + and - +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(8) "A 𩸽 B" +int(8) + +invalid base64 character using surrogate pair between + and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(9) + +valid base64 character using surrogate pair between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(8) "A 𩸽 B" +int(9) + +invalid base64 character using surrogate pair between + and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(10) + +valid base64 character using surrogate pair between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(9) "A 𩸽? B" +int(11) + +invalid base64 character using surrogate pair between + and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(5) "A ? B" +int(12) + +valid base64 character using surrogate pair between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-7" +string(5) "UTF-7" +bool(true) +string(6) "A 𩸽" +int(12) + +invalid base64 character using surrogate pair between + and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(5) "UTF-7" +bool(false) +string(3) "A ?" +int(13) diff --git a/ext/mbstring/tests/gh10192_utf7imap.phpt b/ext/mbstring/tests/gh10192_utf7imap.phpt new file mode 100644 index 0000000000000..574d994653cce --- /dev/null +++ b/ext/mbstring/tests/gh10192_utf7imap.phpt @@ -0,0 +1,343 @@ +--TEST-- +GH-10192 (mb_detect_encoding() results for UTF-7 differ between PHP 8.0 and 8.1) +--EXTENSIONS-- +mbstring +--FILE-- + 'A & B', + 'non-base64 character after -' => 'A - B', + 'base64 character before &' => 'A 1& B', + 'base64 character before -' => 'A 1- B', + 'base64 character after &' => 'A &1 B', + 'base64 character after -' => 'A -1 B', + 'base64 character before and after &' => 'A 1&1 B', + 'base64 character before and after -' => 'A 1-1 B', + 'string ends with &' => 'A &', + 'string ends with -' => 'A -', + '& and -' => 'A &- B', + '- and &' => 'A -& B', + 'valid direct encoding character ~' => 'A ~ B', + 'invalid direct encoding character ESC' => "A \x1b B", + 'valid direct encoding character ~ after &' => 'A &~ B', + 'invalid direct encoding character ESC after &' => "A &\x1b B", + 'valid base64 character between & and -' => 'A &ZeVnLIqe- B', // 日本語 in UTF-16BE + 'invalid base64 character between & and -' => 'A &ZeVnLIq- B', // 日本語 in UTF-16BE without the last character + 'valid base64 character between & and non-base64 character' => 'A &ZeVnLIqe B', + 'invalid base64 character between & and non-base64 character' => 'A &ZeVnLIq B', + 'valid base64 character between & and base64 character' => 'A &ZeVnLIqe1 B', + 'invalid base64 character between & and base64 character' => 'A &ZeVnLIq1 B', + 'valid base64 character between & and end of string' => 'A &ZeVnLIqe', + 'invalid base64 character between & and end of string' => 'A &ZeVnLIq', + 'valid base64 character using surrogate pair between & and -' => 'A &2GfePQ- B', // 𩸽 in UTF-16BE + 'invalid base64 character using surrogate pair between & and -' => 'A &2Gc- B', // first 16 bits of 𩸽 in UTF-16BE + 'valid base64 character using surrogate pair between & and non-base64 character' => 'A &2GfePQ B', + 'invalid base64 character using surrogate pair between & and non-base64 character' => 'A &2Gc B', + 'valid base64 character using surrogate pair between & and base64 character' => 'A &2GfePQ1 B', + 'invalid base64 character using surrogate pair between & and base64 character' => 'A &2Gc1 B', + 'valid base64 character using surrogate pair between & and end of string' => 'A &2GfePQ', + 'invalid base64 character using surrogate pair between & and end of string' => 'A &2Gc' +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + var_dump(mb_detect_encoding($case, 'UTF-8, UTF7-IMAP', true)); + var_dump(mb_detect_encoding($case, 'UTF-8, UTF7-IMAP', false)); + var_dump(mb_detect_encoding($case, 'UTF7-IMAP', true)); + var_dump(mb_detect_encoding($case, 'UTF7-IMAP', false)); + var_dump(mb_check_encoding($case, 'UTF7-IMAP')); + var_dump(addcslashes(mb_convert_encoding($case, 'UTF-8', 'UTF7-IMAP'), "\0..\37\177")); + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} + +?> +--EXPECT-- +non-base64 character after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(1) + +non-base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A - B" +int(1) + +base64 character before & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A 1?B" +int(2) + +base64 character before - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(6) "A 1- B" +int(2) + +base64 character after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(3) + +base64 character after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(6) "A -1 B" +int(3) + +base64 character before and after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A 1?B" +int(4) + +base64 character before and after - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(7) "A 1-1 B" +int(4) + +string ends with & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(3) "A ?" +int(5) + +string ends with - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(3) "A -" +int(5) + +& and - +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A & B" +int(5) + +- and & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A -?B" +int(6) + +valid direct encoding character ~ +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(5) "A ~ B" +int(6) + +invalid direct encoding character ESC +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(7) + +valid direct encoding character ~ after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(8) + +invalid direct encoding character ESC after & +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(9) + +valid base64 character between & and - +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(13) "A 日本語 B" +int(9) + +invalid base64 character between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(11) "A 日本? B" +int(10) + +valid base64 character between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本語?B" +int(11) + +invalid base64 character between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(10) "A 日本?B" +int(12) + +valid base64 character between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本語?B" +int(13) + +invalid base64 character between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(13) "A 日本誵?B" +int(14) + +valid base64 character between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(12) "A 日本語?" +int(15) + +invalid base64 character between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(9) "A 日本?" +int(16) + +valid base64 character using surrogate pair between & and - +string(5) "UTF-8" +string(5) "UTF-8" +string(9) "UTF7-IMAP" +string(9) "UTF7-IMAP" +bool(true) +string(8) "A 𩸽 B" +int(16) + +invalid base64 character using surrogate pair between & and - +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(5) "A ? B" +int(17) + +valid base64 character using surrogate pair between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(8) "A 𩸽?B" +int(18) + +invalid base64 character using surrogate pair between & and non-base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(19) + +valid base64 character using surrogate pair between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(8) "A 𩸽?B" +int(20) + +invalid base64 character using surrogate pair between & and base64 character +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(4) "A ?B" +int(21) + +valid base64 character using surrogate pair between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(7) "A 𩸽?" +int(22) + +invalid base64 character using surrogate pair between & and end of string +string(5) "UTF-8" +string(5) "UTF-8" +bool(false) +string(9) "UTF7-IMAP" +bool(false) +string(3) "A ?" +int(23) diff --git a/ext/mbstring/tests/gh10648.phpt b/ext/mbstring/tests/gh10648.phpt new file mode 100644 index 0000000000000..9f0b4b4db153a --- /dev/null +++ b/ext/mbstring/tests/gh10648.phpt @@ -0,0 +1,155 @@ +--TEST-- +GH-10648 (mb_check_encoding() returns true for incorrect but interpretable ISO-2022-JP byte sequences) +--EXTENSIONS-- +mbstring +--FILE-- + '1b244224221b2842', // 'あ' in ISO-2022-JP + 'ISO-2022-JP bytes without escape sequence' => '1b24422422', // 'ア' in JIS + 'JIS X 0201 7bit kana with escape sequence' => '1b2849311b2842', // 'ア' in JIS + 'JIS X 0201 7bit kana with SO/SI' => '0e310f', // 'ア' in JIS + 'JIS X 0201 8bit kana' => 'b1', // 'ア' in JIS + 'JIS X 0201 7bit kana with SO and ESC' => '0e311b2842', // 'ア' in JIS + 'JIS X 0201 7bit kana with ESC and SI' => '1b2849310f', // 'ア' in JIS + 'JIS X 0208 character' => '1b244242641b2842', // '鯛' in JIS and ISO-2022-JP, included in JIS X 0208 + 'JIS X 0212 character' => '1b2428446a591b2842', // '鮋' in JIS, included in JIS X 0212 + 'JIS X 0213 character' => '1b2428507d4c1b2842', // '𩸽' in ISO-2022-JP-2004, included in JIS X 0213 + 'JIS C 6220-1969 ESC ( H' => '1b284a1b2848', // an escape sequence transitioning to ASCII + 'SO/SI when not in ASCII mode' => '1b284a0e0f1b2842', // an escape sequence transitioning to ASCII +]; + +foreach ($testcases as $title => $case) { + echo $title . PHP_EOL; + echo 'JIS:' . PHP_EOL; + var_dump(mb_check_encoding(hex2bin($case), 'JIS')); + echo mb_convert_encoding(hex2bin($case), 'UTF-8', 'JIS'). PHP_EOL; + var_dump(mb_get_info('illegal_chars')); + echo 'ISO-2022-JP:' . PHP_EOL; + var_dump(mb_check_encoding(hex2bin($case), 'ISO-2022-JP')); + echo mb_convert_encoding(hex2bin($case), 'UTF-8', 'ISO-2022-JP'). PHP_EOL; + var_dump(mb_get_info('illegal_chars')); + echo PHP_EOL; +} +?> +--EXPECT-- +ISO-2022-JP bytes +JIS: +bool(true) +あ +int(0) +ISO-2022-JP: +bool(true) +あ +int(0) + +ISO-2022-JP bytes without escape sequence +JIS: +bool(false) +あ +int(0) +ISO-2022-JP: +bool(false) +あ +int(0) + +JIS X 0201 7bit kana with escape sequence +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with SO/SI +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 8bit kana +JIS: +bool(true) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with SO and ESC +JIS: +bool(false) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0201 7bit kana with ESC and SI +JIS: +bool(false) +ア +int(0) +ISO-2022-JP: +bool(false) +ア +int(0) + +JIS X 0208 character +JIS: +bool(true) +鯛 +int(0) +ISO-2022-JP: +bool(true) +鯛 +int(0) + +JIS X 0212 character +JIS: +bool(true) +鮋 +int(0) +ISO-2022-JP: +bool(false) +鮋 +int(0) + +JIS X 0213 character +JIS: +bool(false) +?$(P}L +int(1) +ISO-2022-JP: +bool(false) +?$(P}L +int(2) + +JIS C 6220-1969 ESC ( H +JIS: +bool(true) + +int(2) +ISO-2022-JP: +bool(false) + +int(2) + +SO/SI when not in ASCII mode +JIS: +bool(false) + +int(2) +ISO-2022-JP: +bool(false) + +int(2) diff --git a/ext/mbstring/tests/iso2022jp_encoding.phpt b/ext/mbstring/tests/iso2022jp_encoding.phpt index 54653d1bbf789..d47ad1406da32 100644 --- a/ext/mbstring/tests/iso2022jp_encoding.phpt +++ b/ext/mbstring/tests/iso2022jp_encoding.phpt @@ -50,11 +50,6 @@ function testValid($from, $to, $encoding, $bothWays = true) { /* ESC ( B at the beginning is redundant, since ASCII mode is the default */ if (substr($from, 0, 3) == "\x1B(B") $from = substr($from, 3, strlen($from) - 3); - /* If the string switches to a different charset, it should switch back to - * ASCII at the end */ - if (strpos($from, "\x1B\$B") !== false || strpos($from, "\x1B(J") !== false) - $from .= "\x1B(B"; - convertValidString($to, $from, 'UTF-16BE', $encoding, false); } } @@ -66,11 +61,11 @@ function testInvalid($from, $to, $encoding) { for ($i = 0; $i < 0x80; $i++) { if ($i == 0xE || $i == 0xF || $i == 0x1B) continue; - testValid(chr($i), "\x00" . chr($i), 'JIS'); - testValid("\x0F" . chr($i), "\x00" . chr($i), 'JIS'); /* 0xF is 'Shift Out' code */ - testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'JIS'); - testValid(chr($i), "\x00" . chr($i), 'ISO-2022-JP'); - testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'ISO-2022-JP'); + testValid(chr($i), "\x00" . chr($i), 'JIS'); + convertValidString("\x0F" . chr($i), "\x00" . chr($i), 'JIS', 'UTF-16BE', false); /* 0xF is 'Shift In' code */ + testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'JIS'); + testValid(chr($i), "\x00" . chr($i), 'ISO-2022-JP'); + testValid("\x1B(B" . chr($i), "\x00" . chr($i), 'ISO-2022-JP'); } for ($i = 0x80; $i < 256; $i++) { @@ -92,27 +87,27 @@ echo "ASCII support OK\n"; foreach ($jisx0201Chars as $jisx0201 => $utf16BE) { if (ord($jisx0201) >= 128) { $kana = chr(ord($jisx0201) - 128); - testValid("\x1B(I" . $kana, $utf16BE, 'JIS', false); - testValid("\x0E" . $kana, $utf16BE, 'JIS', false); /* 0xE is 'Shift In' code */ + testValid("\x1B(I" . $kana . "\x1B(B", $utf16BE, 'JIS', false); + testValid("\x0E" . $kana . "\x0F", $utf16BE, 'JIS', false); /* 0xE is 'Shift Out' code */ testValid($jisx0201, $utf16BE, 'JIS', false); } else { - testValid("\x1B(J" . $jisx0201, $utf16BE, 'JIS', $utf16BE > "\x00\x80"); + testValid("\x1B(J" . $jisx0201 . "\x1B(B", $utf16BE, 'JIS', $utf16BE > "\x00\x80"); } } for ($i = 0x80; $i < 256; $i++) { if ($i >= 0xA1 && $i <= 0xDF) continue; - testInvalid("\x1B(I" . chr($i), "\x00%", 'JIS'); - testInvalid("\x1B(J" . chr($i), "\x00%", 'JIS'); + testInvalid("\x1B(I" . chr($i) . "\x1B(B", "\x00%", 'JIS'); + testInvalid("\x1B(J" . chr($i) . "\x1B(B", "\x00%", 'JIS'); } echo "JIS X 0201 support OK\n"; /* All valid JISX0208 characters */ foreach ($jisx0208Chars as $jisx0208 => $utf16BE) { - testValid("\x1B\$B" . $jisx0208, $utf16BE, 'JIS'); - testValid("\x1B\$B" . $jisx0208, $utf16BE, 'ISO-2022-JP'); + testValid("\x1B\$B" . $jisx0208 . "\x1B(B", $utf16BE, 'JIS'); + testValid("\x1B\$B" . $jisx0208 . "\x1B(B", $utf16BE, 'ISO-2022-JP'); } /* All invalid 2-byte JISX0208 characters */ @@ -120,8 +115,8 @@ for ($i = 0x21; $i <= 0x7E; $i++) { for ($j = 0; $j < 256; $j++) { $testString = chr($i) . chr($j); if (!isset($jisx0208Chars[$testString])) { - testInvalid("\x1B\$B" . $testString, "\x00%", 'JIS'); - testInvalid("\x1B\$B" . $testString, "\x00%", 'ISO-2022-JP'); + testInvalid("\x1B\$B" . $testString . "\x1B(B", "\x00%", 'JIS'); + testInvalid("\x1B\$B" . $testString . "\x1B(B", "\x00%", 'ISO-2022-JP'); } } } @@ -138,7 +133,7 @@ echo "JIS X 0208 support OK\n"; /* All valid JISX0212 characters */ foreach ($jisx0212Chars as $jisx0212 => $utf16BE) { - testValid("\x1B\$(D" . $jisx0212, $utf16BE, 'JIS', false); + testValid("\x1B\$(D" . $jisx0212 . "\x1B(B", $utf16BE, 'JIS', false); } /* All invalid 2-byte JISX0212 characters */ @@ -146,42 +141,49 @@ for ($i = 0x21; $i <= 0x7E; $i++) { for ($j = 0; $j < 256; $j++) { $testString = chr($i) . chr($j); if (!isset($jisx0212Chars[$testString])) { - testInvalid("\x1B\$(D" . $testString, "\x00%", 'JIS'); + testInvalid("\x1B\$(D" . $testString . "\x1B(B", "\x00%", 'JIS'); } } } /* Try truncated JISX0212 characters */ for ($i = 0x21; $i <= 0x7E; $i++) { - testInvalid("\x1B\$(D" . chr($i), "\x00%", 'JIS'); + testInvalid("\x1B\$(D" . chr($i) . "\x1B(B", "\x00%\x00%", 'JIS'); } echo "JIS X 0212 support OK\n"; /* All possible escape sequences */ -$validEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B\$(@" => true, "\x1B\$(B" => true, "\x1B\$(D" => true, "\x1B(B" => true, "\x1B(H" => true, "\x1B(J" => true, "\x1B(I" => true]; +$validJisEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B\$(@" => true, "\x1B\$(B" => true, "\x1B\$(D" => true, "\x1B(B" => true, "\x1B(H" => true, "\x1B(J" => true, "\x1B(I" => true]; +$validIso2022jpEscapes = ["\x1B\$@" => true, "\x1B\$B" => true, "\x1B(B" => true, "\x1B(J" => true]; for ($i = 0; $i <= 0xFF; $i++) { for ($j = 0; $j <= 0xFF; $j++) { $escapeSequence = "\x1B" . chr($i) . chr($j); if ($escapeSequence === "\x1B\$(") continue; - if (isset($validEscapes[$escapeSequence])) { - testValid($escapeSequence, "", 'JIS', false); - testValid($escapeSequence, "", 'ISO-2022-JP', false); + if (isset($validJisEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'JIS', false); + } else { + identifyInvalidString($escapeSequence . "\x1B(B", 'JIS'); + } + if (isset($validIso2022jpEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'ISO-2022-JP', false); } else { - identifyInvalidString($escapeSequence, 'JIS'); - identifyInvalidString($escapeSequence, 'ISO-2022-JP'); + identifyInvalidString($escapeSequence . "\x1B(B", 'ISO-2022-JP'); } } } for ($i = 0; $i <= 0xFF; $i++) { $escapeSequence = "\x1B\$(" . chr($i); - if (isset($validEscapes[$escapeSequence])) { - testValid($escapeSequence, "", 'JIS', false); - testValid($escapeSequence, "", 'ISO-2022-JP', false); + if (isset($validJisEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'JIS', false); + } else { + identifyInvalidString($escapeSequence . "\x1B(B", 'JIS'); + } + if (isset($validIso2022jpEscapes[$escapeSequence])) { + testValid($escapeSequence . "\x1B(B", "", 'ISO-2022-JP', false); } else { - identifyInvalidString($escapeSequence, 'JIS'); - identifyInvalidString($escapeSequence, 'ISO-2022-JP'); + identifyInvalidString($escapeSequence . "\x1B(B", 'ISO-2022-JP'); } } diff --git a/ext/mbstring/tests/utf_encodings.phpt b/ext/mbstring/tests/utf_encodings.phpt index b0973e527e7ba..c07a27419b08b 100644 --- a/ext/mbstring/tests/utf_encodings.phpt +++ b/ext/mbstring/tests/utf_encodings.phpt @@ -980,17 +980,8 @@ testValidString('+' . encode('AB', 'ASCII') . '-+' . encode('CD', 'ASCII') . '-' // (Just trying to be exhaustive here) testValidString('+' . encode('AB', 'ASCII') . '-!+' . encode('CD', 'ASCII') . '-', "\x00A\x00B\x00!\x00C\x00D", 'UTF-7', 'UTF-16BE', false); -// + section terminated by a non-Base64 ASCII character which is NOT - -for ($i = 0; $i < 128; $i++) { - if ($i >= ord('A') && $i <= ord('Z')) - continue; - if ($i >= ord('a') && $i <= ord('z')) - continue; - if ($i >= ord('0') && $i <= ord('9')) - continue; - if ($i == ord('+') || $i == ord('/') || $i == ord('-') || $i == ord('\\') || $i == ord('~')) - continue; - $char = chr($i); +// + section terminated by a non-Base64 direct character which is NOT - +foreach (str_split(" \t\r\n'(),.:?!\"#$%&*;<=>@[]^_`{|}\x00") as $char) { testValidString('+' . encode("\x12\x34", 'UTF-16BE') . $char, "\x00\x00\x12\x34\x00\x00\x00" . $char, 'UTF-7', 'UTF-32BE', false); } From 87922411bf806f3e165128a931465b0c6c12ed95 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 25 Mar 2023 10:12:34 -0400 Subject: [PATCH 702/895] Use capstone explicitly, drop oprofile (GH 10876) (#10918) * ext/opcache/config.m4: new --with-opcache-capstone flag. Until now, libcapstone has been detected "automagically" and used for JIT disassembly whenever it is available on the system used to compile PHP. This can have some unintended consequences, however: many users have capstone installed for some other purpose, and are surprised to find that PHP breaks when capstone is later uninstalled. To address this, we have introduced a new --with-opcache-capstone flag that is disabled by default, and that makes the user's preference explicit. It is ignored unless the JIT is enabled. * ext/opcache: drop support for the oprofile JIT profiler. Recently we have replaced the "automagic" detection of capstone at build time with a --with-opcache-capstone flag. The detection of oprofile causes similar problems and would likely have the same solution; however, it was suggested that we might remove oprofile altogether. So, this commit removes it: * Remove the detection bits from ext/opcache/config.m4. * Drop HAVE_OPROFILE ifdef blocks. * Delete ext/opcache/jit/zend_jit_oprofile.c. * Undefine the ZEND_JIT_DEBUG_OPROFILE constant. --- ext/opcache/config.m4 | 43 ++++++++----------------- ext/opcache/jit/Makefile.frag | 1 - ext/opcache/jit/Makefile.frag.w32 | 1 - ext/opcache/jit/zend_jit.c | 33 +++---------------- ext/opcache/jit/zend_jit.h | 1 - ext/opcache/jit/zend_jit_oprofile.c | 50 ----------------------------- 6 files changed, 17 insertions(+), 112 deletions(-) delete mode 100644 ext/opcache/jit/zend_jit_oprofile.c diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 444ded9976ac1..fb3324cf82a3d 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -18,6 +18,12 @@ PHP_ARG_ENABLE([opcache-jit], [yes], [no]) +PHP_ARG_WITH([opcache-capstone],, + [AS_HELP_STRING([--with-opcache-capstone], + [support opcache JIT disassembly through capstone])], + [no], + [no]) + if test "$PHP_OPCACHE" != "no"; then dnl Always build as shared extension @@ -68,41 +74,18 @@ if test "$PHP_OPCACHE" != "no"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1" fi - PKG_CHECK_MODULES([CAPSTONE], [capstone >= 3.0.0], - [have_capstone="yes"], [have_capstone="no"]) - if test "$have_capstone" = "yes"; then - AC_DEFINE(HAVE_CAPSTONE, 1, [ ]) + AS_IF([test x"$with_opcache_capstone" = "xyes"],[ + PKG_CHECK_MODULES([CAPSTONE],[capstone >= 3.0.0],[ + AC_DEFINE([HAVE_CAPSTONE], [1], [Capstone is available]) PHP_EVAL_LIBLINE($CAPSTONE_LIBS, OPCACHE_SHARED_LIBADD) PHP_EVAL_INCLINE($CAPSTONE_CFLAGS) - fi - - PHP_SUBST(DASM_FLAGS) - PHP_SUBST(DASM_ARCH) - - AC_MSG_CHECKING(for opagent in default path) - for i in /usr/local /usr; do - if test -r $i/include/opagent.h; then - OPAGENT_DIR=$i - AC_MSG_RESULT(found in $i) - break - fi - done - if test -z "$OPAGENT_DIR"; then - AC_MSG_RESULT(not found) - else - PHP_CHECK_LIBRARY(opagent, op_write_native_code, - [ - AC_DEFINE(HAVE_OPROFILE,1,[ ]) - PHP_ADD_INCLUDE($OPAGENT_DIR/include) - PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD) - PHP_SUBST(OPCACHE_SHARED_LIBADD) - ],[ - AC_MSG_RESULT(not found) ],[ - -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile + AC_MSG_ERROR([capstone >= 3.0 required but not found]) ]) - fi + ]) + PHP_SUBST(DASM_FLAGS) + PHP_SUBST(DASM_ARCH) fi AC_CHECK_FUNCS([mprotect memfd_create]) diff --git a/ext/opcache/jit/Makefile.frag b/ext/opcache/jit/Makefile.frag index 98c5cdaea2494..f9ae2e0cf4b99 100644 --- a/ext/opcache/jit/Makefile.frag +++ b/ext/opcache/jit/Makefile.frag @@ -11,7 +11,6 @@ $(builddir)/jit/zend_jit.lo: \ $(srcdir)/jit/zend_jit_disasm.c \ $(srcdir)/jit/zend_jit_gdb.c \ $(srcdir)/jit/zend_jit_perf_dump.c \ - $(srcdir)/jit/zend_jit_oprofile.c \ $(srcdir)/jit/zend_jit_vtune.c \ $(srcdir)/jit/zend_jit_trace.c \ $(srcdir)/jit/zend_elf.c diff --git a/ext/opcache/jit/Makefile.frag.w32 b/ext/opcache/jit/Makefile.frag.w32 index ed2b4ad4fec89..a9533e98edcea 100644 --- a/ext/opcache/jit/Makefile.frag.w32 +++ b/ext/opcache/jit/Makefile.frag.w32 @@ -12,6 +12,5 @@ $(BUILD_DIR)\ext\opcache\jit\zend_jit.obj: \ ext/opcache/jit/zend_jit_disasm.c \ ext/opcache/jit/zend_jit_gdb.c \ ext/opcache/jit/zend_jit_perf_dump.c \ - ext/opcache/jit/zend_jit_oprofile.c \ ext/opcache/jit/zend_jit_trace.c \ ext/opcache/jit/zend_jit_vtune.c diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index adf48691c3930..231c976d0bab7 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -720,9 +720,6 @@ static int zend_jit_add_veneer(dasm_State *Dst, void *buffer, uint32_t ins, int # include "jit/zend_jit_gdb.h" # include "jit/zend_jit_perf_dump.c" #endif -#ifdef HAVE_OPROFILE -# include "jit/zend_jit_oprofile.c" -#endif #include "Zend/zend_cpuinfo.h" @@ -898,7 +895,7 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, size_t size; int ret; void *entry; -#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_OPROFILE) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) +#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) zend_string *str = NULL; #endif @@ -1009,9 +1006,9 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, } } -#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_OPROFILE) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) +#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) if (!name) { - if (JIT_G(debug) & (ZEND_JIT_DEBUG_ASM|ZEND_JIT_DEBUG_GDB|ZEND_JIT_DEBUG_OPROFILE|ZEND_JIT_DEBUG_PERF|ZEND_JIT_DEBUG_VTUNE|ZEND_JIT_DEBUG_PERF_DUMP)) { + if (JIT_G(debug) & (ZEND_JIT_DEBUG_ASM|ZEND_JIT_DEBUG_GDB|ZEND_JIT_DEBUG_PERF|ZEND_JIT_DEBUG_VTUNE|ZEND_JIT_DEBUG_PERF_DUMP)) { str = zend_jit_func_name(op_array); if (str) { name = ZSTR_VAL(str); @@ -1059,14 +1056,6 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, } #endif -#ifdef HAVE_OPROFILE - if (JIT_G(debug) & ZEND_JIT_DEBUG_OPROFILE) { - zend_jit_oprofile_register( - name, - entry, - size); - } -#endif #ifdef HAVE_PERFTOOLS if (JIT_G(debug) & (ZEND_JIT_DEBUG_PERF|ZEND_JIT_DEBUG_PERF_DUMP)) { @@ -1096,7 +1085,7 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, } #endif -#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_OPROFILE) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) +#if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) if (str) { zend_string_release(str); } @@ -4912,14 +4901,6 @@ ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached) zend_jit_gdb_init(); #endif -#ifdef HAVE_OPROFILE - if (JIT_G(debug) & ZEND_JIT_DEBUG_OPROFILE) { - if (!zend_jit_oprofile_startup()) { - // TODO: error reporting and cleanup ??? - return FAILURE; - } - } -#endif #ifdef HAVE_PTHREAD_JIT_WRITE_PROTECT_NP zend_write_protect = pthread_jit_write_protect_supported_np(); #endif @@ -5034,12 +5015,6 @@ ZEND_EXT_API void zend_jit_shutdown(void) fprintf(stderr, "\nJIT memory usage: %td\n", (ptrdiff_t)((char*)*dasm_ptr - (char*)dasm_buf)); } -#ifdef HAVE_OPROFILE - if (JIT_G(debug) & ZEND_JIT_DEBUG_OPROFILE) { - zend_jit_oprofile_shutdown(); - } -#endif - #ifdef HAVE_GDB if (JIT_G(debug) & ZEND_JIT_DEBUG_GDB) { zend_jit_gdb_unregister(); diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index d22422181af9c..09380f14ebe59 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -58,7 +58,6 @@ #define ZEND_JIT_DEBUG_PERF (1<<4) #define ZEND_JIT_DEBUG_PERF_DUMP (1<<5) -#define ZEND_JIT_DEBUG_OPROFILE (1<<6) #define ZEND_JIT_DEBUG_VTUNE (1<<7) #define ZEND_JIT_DEBUG_GDB (1<<8) diff --git a/ext/opcache/jit/zend_jit_oprofile.c b/ext/opcache/jit/zend_jit_oprofile.c deleted file mode 100644 index 36081064b543e..0000000000000 --- a/ext/opcache/jit/zend_jit_oprofile.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend JIT | - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | https://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Dmitry Stogov | - +----------------------------------------------------------------------+ -*/ - -#define HAVE_OPROFILE 1 - -#include - -static op_agent_t op_agent = NULL; - -static void zend_jit_oprofile_register(const char *name, - const void *start, - size_t size) -{ - if (op_agent) { - op_write_native_code(op_agent, name, (uint64_t)(uintptr_t)start, start, size); - } -} - -static int zend_jit_oprofile_startup(void) -{ - op_agent = op_open_agent(); - if (!op_agent) { - fprintf(stderr, "OpAgent initialization failed [%d]!\n", errno); - return 0; - } - return 1; -} - -static void zend_jit_oprofile_shutdown(void) -{ - if (op_agent) { -//??? sleep(60); - op_close_agent(op_agent); - } -} From 9aaa5cd0934fb7a4140c7b5e0410dea78d1716f6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 17 Mar 2023 16:31:46 +0100 Subject: [PATCH 703/895] By-ref modification of typed and readonly props through ArrayIterator Fixes GH-10844 Closes GH-10872 --- .../typed_properties_113.phpt | 26 ++++++++++++ .../typed_properties_114.phpt | 39 ++++++++++++++++++ .../typed_properties_115.phpt | 30 ++++++++++++++ ext/spl/spl_array.c | 41 ++++++++++++++++--- 4 files changed, 131 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/type_declarations/typed_properties_113.phpt create mode 100644 Zend/tests/type_declarations/typed_properties_114.phpt create mode 100644 Zend/tests/type_declarations/typed_properties_115.phpt diff --git a/Zend/tests/type_declarations/typed_properties_113.phpt b/Zend/tests/type_declarations/typed_properties_113.phpt new file mode 100644 index 0000000000000..cb5c0f9276453 --- /dev/null +++ b/Zend/tests/type_declarations/typed_properties_113.phpt @@ -0,0 +1,26 @@ +--TEST-- +Typed property type coercion through ArrayIterator +--FILE-- + &$v) { + $v = 42; +} + +var_dump($obj); +?> +--EXPECT-- +object(A)#1 (1) { + ["foo"]=> + &string(2) "42" +} diff --git a/Zend/tests/type_declarations/typed_properties_114.phpt b/Zend/tests/type_declarations/typed_properties_114.phpt new file mode 100644 index 0000000000000..e771f4c1c1f84 --- /dev/null +++ b/Zend/tests/type_declarations/typed_properties_114.phpt @@ -0,0 +1,39 @@ +--TEST-- +Typed property type error through ArrayIterator +--FILE-- + &$v) { + try { + $v = []; + } catch (Throwable $e) { + echo $e->getMessage(), "\n"; + } +} +foreach ($obj as $k => &$v) { + try { + $v = []; + } catch (Throwable $e) { + echo $e->getMessage(), "\n"; + } +} + +var_dump($obj); +?> +--EXPECT-- +Cannot assign array to reference held by property A::$foo of type string +Cannot assign array to reference held by property A::$foo of type string +object(A)#1 (1) { + ["foo"]=> + &string(3) "bar" +} diff --git a/Zend/tests/type_declarations/typed_properties_115.phpt b/Zend/tests/type_declarations/typed_properties_115.phpt new file mode 100644 index 0000000000000..eb96b3ee88641 --- /dev/null +++ b/Zend/tests/type_declarations/typed_properties_115.phpt @@ -0,0 +1,30 @@ +--TEST-- +Readonly property modification error through ArrayIterator +--FILE-- + &$v) {} +} catch (Throwable $e) { + echo $e->getMessage(), "\n"; +} + +var_dump($obj); +?> +--EXPECT-- +Cannot acquire reference to readonly property A::$foo +object(A)#1 (1) { + ["foo"]=> + string(3) "bar" +} diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 1d4683e0c9391..75607e80f4365 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -73,6 +73,13 @@ typedef struct _spl_array_object { zend_object std; } spl_array_object; +typedef struct _spl_array_iterator { + zend_object_iterator it; + zend_class_entry *ce; + zval value; + bool by_ref; +} spl_array_iterator; + static inline spl_array_object *spl_array_from_obj(zend_object *obj) /* {{{ */ { return (spl_array_object*)((char*)(obj) - XtOffsetOf(spl_array_object, std)); } @@ -1007,18 +1014,41 @@ static int spl_array_it_valid(zend_object_iterator *iter) /* {{{ */ static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */ { + spl_array_iterator *array_iter = (spl_array_iterator*)iter; spl_array_object *object = Z_SPLARRAY_P(&iter->data); HashTable *aht = spl_array_get_hash_table(object); + zval *data; if (object->ar_flags & SPL_ARRAY_OVERLOADED_CURRENT) { - return zend_user_it_get_current_data(iter); + data = zend_user_it_get_current_data(iter); } else { - zval *data = zend_hash_get_current_data_ex(aht, spl_array_get_pos_ptr(aht, object)); + data = zend_hash_get_current_data_ex(aht, spl_array_get_pos_ptr(aht, object)); if (data && Z_TYPE_P(data) == IS_INDIRECT) { data = Z_INDIRECT_P(data); } - return data; } + // ZEND_FE_FETCH_RW converts the value to a reference but doesn't know the source is a property. + // Typed properties must add a type source to the reference, and readonly properties must fail. + if (array_iter->by_ref + && Z_TYPE_P(data) != IS_REFERENCE + && Z_TYPE(object->array) == IS_OBJECT + && !(object->ar_flags & (SPL_ARRAY_IS_SELF|SPL_ARRAY_USE_OTHER))) { + zend_string *key; + zend_hash_get_current_key_ex(aht, &key, NULL, spl_array_get_pos_ptr(aht, object)); + zend_class_entry *ce = Z_OBJCE(object->array); + zend_property_info *prop_info = zend_get_property_info(ce, key, true); + if (ZEND_TYPE_IS_SET(prop_info->type)) { + if (prop_info->flags & ZEND_ACC_READONLY) { + zend_throw_error(NULL, + "Cannot acquire reference to readonly property %s::$%s", + ZSTR_VAL(prop_info->ce->name), ZSTR_VAL(key)); + return NULL; + } + ZVAL_NEW_REF(data, data); + ZEND_REF_ADD_TYPE_SOURCE(Z_REF_P(data), prop_info); + } + } + return data; } /* }}} */ @@ -1156,7 +1186,7 @@ static const zend_object_iterator_funcs spl_array_it_funcs = { zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { - zend_user_iterator *iterator; + spl_array_iterator *iterator; spl_array_object *array_object = Z_SPLARRAY_P(object); if (by_ref && (array_object->ar_flags & SPL_ARRAY_OVERLOADED_CURRENT)) { @@ -1164,7 +1194,7 @@ zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, return NULL; } - iterator = emalloc(sizeof(zend_user_iterator)); + iterator = emalloc(sizeof(*iterator)); zend_iterator_init(&iterator->it); @@ -1172,6 +1202,7 @@ zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, iterator->it.funcs = &spl_array_it_funcs; iterator->ce = ce; ZVAL_UNDEF(&iterator->value); + iterator->by_ref = by_ref; return &iterator->it; } From c2f3a605f001f6213905be133a9cd08dba885663 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 25 Mar 2023 16:26:18 +0100 Subject: [PATCH 704/895] [skip ci] Add NEWS entry --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index ab24c4401d31a..d54187dadf1b5 100644 --- a/NEWS +++ b/NEWS @@ -58,6 +58,8 @@ PHP NEWS - SPL: . Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman) + . Fixed bug GH-10844 (ArrayIterator allows modification of readonly props). + (ilutov) - Standard: . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) From 57029ce92ec5312752eaf436e4e61742d838a520 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Mar 2023 15:19:58 +0100 Subject: [PATCH 705/895] Fix buffer-overflow in php_fgetcsv() with \0 delimiter and enclosure Fixes oss-fuzz #57392 Closes GH-10923 --- NEWS | 2 ++ ext/standard/file.c | 2 +- ext/standard/tests/oss_fuzz_57392.phpt | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/oss_fuzz_57392.phpt diff --git a/NEWS b/NEWS index d54187dadf1b5..204f3e375d1bc 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,8 @@ PHP NEWS . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) . Fixed bug GH-10052 (Browscap crashes PHP 8.1.12 on request shutdown (apache2)). (nielsdos) + . Fixed oss-fuzz #57392 (Buffer-overflow in php_fgetcsv() with \0 delimiter + and enclosure). (ilutov) 16 Mar 2023, PHP 8.1.17 diff --git a/ext/standard/file.c b/ext/standard/file.c index 4c31ee0eae661..548bcc7a37ca3 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2088,7 +2088,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int while ((*tmp != delimiter) && isspace((int)*(unsigned char *)tmp)) { tmp++; } - if (*tmp == enclosure) { + if (*tmp == enclosure && tmp < limit) { bptr = tmp; } } diff --git a/ext/standard/tests/oss_fuzz_57392.phpt b/ext/standard/tests/oss_fuzz_57392.phpt new file mode 100644 index 0000000000000..5a7e5b28d1caa --- /dev/null +++ b/ext/standard/tests/oss_fuzz_57392.phpt @@ -0,0 +1,17 @@ +--TEST-- +oss-fuzz #57392: Buffer-overflow in php_fgetcsv() with \0 delimiter and enclosure +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(12) "aaaaaaaaaaaa" + [1]=> + string(2) " " +} From 61e98bf35eb939bdd7b27ad7938f8549db2e1551 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 23 Mar 2023 14:35:50 +0100 Subject: [PATCH 706/895] Disallow parent dir components (..) in open_basedir() at runtime Fix GH-10469 Closes GH-10913 --- NEWS | 2 ++ UPGRADING | 4 ++++ Zend/tests/gh10469.phpt | 22 ++++++++++++++++++++++ main/fopen_wrappers.c | 26 ++++++++++++++++++++++---- 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 Zend/tests/gh10469.phpt diff --git a/NEWS b/NEWS index 9ef2f169182e2..1fbe26ea8334b 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,8 @@ PHP NEWS . Fix bug GH-10083 (Allow comments between & and parameter). (ilutov) . Zend Max Execution Timers is now enabled by default for ZTS builds on Linux. (Kévin Dunglas) + . Fix bug GH-10469 (Disallow .. in open_basedir paths set at runtime). + (ilutov) - Date: . Implement More Appropriate Date/Time Exceptions RFC. (Derick) diff --git a/UPGRADING b/UPGRADING index db2fdaaa50e21..f594237e43430 100644 --- a/UPGRADING +++ b/UPGRADING @@ -74,6 +74,10 @@ PHP 8.3 UPGRADE NOTES "buffer_size" => int See GH-9336 . class_alias() now supports creating an alias of an internal class. + . Setting `open_basedir` at runtime using `ini_set('open_basedir', ...);` no + longer accepts paths containing the parent directory (`..`). Previously, + only paths starting with `..` were disallowed. This could easily be + circumvented by prepending `./` to the path. - Dom: . Changed DOMCharacterData::appendData() tentative return type to true. diff --git a/Zend/tests/gh10469.phpt b/Zend/tests/gh10469.phpt new file mode 100644 index 0000000000000..26d13a09b3a61 --- /dev/null +++ b/Zend/tests/gh10469.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10469: Disallow open_basedir() with parent dir components (..) +--FILE-- + +--CLEAN-- + +--EXPECTF-- +string(%d) "%stests" diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index efb110171b148..ef08d8dc73ecb 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -101,11 +101,29 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) *end = '\0'; end++; } - if (ptr[0] == '.' && ptr[1] == '.' && (ptr[2] == '\0' || IS_SLASH(ptr[2]))) { - /* Don't allow paths with a leading .. path component to be set at runtime */ - efree(pathbuf); - return FAILURE; + /* Don't allow paths with a parent dir component (..) to be set at runtime */ + char *substr_pos = ptr; + while (true) { + // Check if we have a .. path component + if (substr_pos[0] == '.' + && substr_pos[1] == '.' + && (substr_pos[2] == '\0' || IS_SLASH(substr_pos[2]))) { + efree(pathbuf); + return FAILURE; + } + // Skip to the next path component + while (true) { + substr_pos++; + if (*substr_pos == '\0' || *substr_pos == DEFAULT_DIR_SEPARATOR) { + goto no_parent_dir_component; + } else if (IS_SLASH(*substr_pos)) { + // Also skip the slash + substr_pos++; + break; + } + } } +no_parent_dir_component: if (php_check_open_basedir_ex(ptr, 0) != 0) { /* At least one portion of this open_basedir is less restrictive than the prior one, FAIL */ efree(pathbuf); From 5eb6905405b5d14ee1533e888be8722c414982a6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 25 Mar 2023 18:10:14 +0100 Subject: [PATCH 707/895] Disable --with-valgrind by default (#10934) Same reasoning as GH-10876 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ce981d1b871b6..4793ffdf5209e 100644 --- a/configure.ac +++ b/configure.ac @@ -781,7 +781,7 @@ PHP_ARG_WITH([valgrind], [whether to enable valgrind support], [AS_HELP_STRING([--with-valgrind], [Enable valgrind support])], - [yes], + [no], [no]) if test "$PHP_VALGRIND" != "no"; then From 8e620b4ecbc856cff2424369ee0ac916bab870fc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:30:02 +0100 Subject: [PATCH 708/895] Fix GH-10928: PHP Build Failed - Test curl_version() basic functionality [ext/curl/tests/curl_version_basic_001.phpt] It's possible that curl was compiled without SSL, and/or without libz support. In the case of the issue reporter it was without libz support. This causes the test to fail because we expect a non-empty string. Fix it by using %S instead of %s to allow empty strings. Closes GH-10930. --- ext/curl/tests/curl_version_basic_001.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/curl/tests/curl_version_basic_001.phpt b/ext/curl/tests/curl_version_basic_001.phpt index 6bc361badef9c..52652822a308f 100644 --- a/ext/curl/tests/curl_version_basic_001.phpt +++ b/ext/curl/tests/curl_version_basic_001.phpt @@ -22,6 +22,6 @@ int(%i) int(%i) string(%i) "%s" string(%i) "%s" -string(%i) "%s" -string(%i) "%s" +string(%i) "%S" +string(%i) "%S" bool(true) From f6989df8cc595dde7e7b07cb35b6f9275b3e0a1d Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 24 Mar 2023 19:13:50 +0000 Subject: [PATCH 709/895] ext/pdo_mysql: mysql_handle_closer nullify some freed data. Close GH-10926 --- ext/pdo_mysql/mysql_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index c814324af9705..adccb5e3d0f00 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -154,9 +154,11 @@ static void mysql_handle_closer(pdo_dbh_t *dbh) if (H) { if (H->server) { mysql_close(H->server); + H->server = NULL; } if (H->einfo.errmsg) { pefree(H->einfo.errmsg, dbh->is_persistent); + H->einfo.errmsg = NULL; } pefree(H, dbh->is_persistent); dbh->driver_data = NULL; From 93e0f6b42477f91adb86d23a3863573085de6d79 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Mar 2023 18:35:11 +0100 Subject: [PATCH 710/895] Fix undefined behaviour in string uppercasing and lowercasing At least on 32-bit, the address computations overflow in running the test on CI with UBSAN enabled. Fix it by reordering the arithmetic. Since a part of the expression is already used in the code above the computation, this should not negatively affect performance. Closes GH-10936. --- Zend/zend_operators.c | 4 ++-- ext/standard/string.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 93df8cea2ea9d..ef5c50c4336d2 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2760,7 +2760,7 @@ ZEND_API zend_string* ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, boo if (_mm_movemask_epi8(mingle)) { zend_string *res = zend_string_alloc(length, persistent); memcpy(ZSTR_VAL(res), ZSTR_VAL(str), p - (unsigned char *) ZSTR_VAL(str)); - unsigned char *q = p + (ZSTR_VAL(res) - ZSTR_VAL(str)); + unsigned char *q = (unsigned char*) ZSTR_VAL(res) + (p - (unsigned char*) ZSTR_VAL(str)); /* Lowercase the chunk we already compared. */ const __m128i delta = _mm_set1_epi8('a' - 'A'); @@ -2783,7 +2783,7 @@ ZEND_API zend_string* ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, boo zend_string *res = zend_string_alloc(length, persistent); memcpy(ZSTR_VAL(res), ZSTR_VAL(str), p - (unsigned char*) ZSTR_VAL(str)); - unsigned char *q = p + (ZSTR_VAL(res) - ZSTR_VAL(str)); + unsigned char *q = (unsigned char*) ZSTR_VAL(res) + (p - (unsigned char*) ZSTR_VAL(str)); while (p < end) { *q++ = zend_tolower_ascii(*p++); } diff --git a/ext/standard/string.c b/ext/standard/string.c index 368f0123870ce..623ce7d365bff 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1373,7 +1373,7 @@ PHPAPI zend_string *php_string_toupper(zend_string *s) if (c != (unsigned char*)ZSTR_VAL(s)) { memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); } - r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); + r = (unsigned char*) ZSTR_VAL(res) + (c - (unsigned char*) ZSTR_VAL(s)); while (c < e) { *r = toupper(*c); r++; @@ -1438,7 +1438,7 @@ PHPAPI zend_string *php_string_tolower(zend_string *s) if (c != (unsigned char*)ZSTR_VAL(s)) { memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); } - r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); + r = (unsigned char*) ZSTR_VAL(res) + (c - (unsigned char*) ZSTR_VAL(s)); while (c < e) { *r = tolower(*c); r++; From a7f91e37dea972d03b91309a760322d9b7cb5b3c Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 26 Mar 2023 10:28:27 +0200 Subject: [PATCH 711/895] Fix buffer-overflow in open_basedir() --- Zend/tests/gh10469.phpt | 1 + main/fopen_wrappers.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/tests/gh10469.phpt b/Zend/tests/gh10469.phpt index 26d13a09b3a61..7a47afacdca98 100644 --- a/Zend/tests/gh10469.phpt +++ b/Zend/tests/gh10469.phpt @@ -10,6 +10,7 @@ $tmpDir = $originalDir . '/gh10469_tmp'; chdir($tmpDir); ini_set('open_basedir', ini_get('open_basedir') . ':./..'); ini_set('open_basedir', ini_get('open_basedir') . ':./../'); +ini_set('open_basedir', ini_get('open_basedir') . ':/a/'); chdir($originalDir); var_dump(ini_get('open_basedir')); diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index ef08d8dc73ecb..848e204a0f43a 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -103,7 +103,7 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) } /* Don't allow paths with a parent dir component (..) to be set at runtime */ char *substr_pos = ptr; - while (true) { + while (*substr_pos) { // Check if we have a .. path component if (substr_pos[0] == '.' && substr_pos[1] == '.' From d7c351ea544ce04fea7b81a05e58146b64a745ec Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 26 Mar 2023 14:18:46 +0100 Subject: [PATCH 712/895] Propagate UTF-8 flag during Rope operations (#10915) --- Zend/zend_vm_def.h | 10 +++++-- Zend/zend_vm_execute.h | 30 +++++++++++++------ ext/opcache/jit/zend_jit_helpers.c | 7 +++-- .../tests/strings_marked_as_utf8.phpt | 9 ++++++ .../tests/strings_not_marked_as_utf8.phpt | 8 +++++ 5 files changed, 50 insertions(+), 14 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 966297a39636d..57d5cf887aca9 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3330,8 +3330,6 @@ ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV, NUM) zend_string **rope; zval *var, *ret; uint32_t i; - size_t len = 0; - char *target; rope = (zend_string**)EX_VAR(opline->op1.var); if (OP2_TYPE == IS_CONST) { @@ -3364,12 +3362,18 @@ ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV, NUM) } } } + + size_t len = 0; + uint32_t flags = ZSTR_COPYABLE_CONCAT_PROPERTIES; for (i = 0; i <= opline->extended_value; i++) { + flags &= ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(rope[i]); len += ZSTR_LEN(rope[i]); } ret = EX_VAR(opline->result.var); ZVAL_STR(ret, zend_string_alloc(len, 0)); - target = Z_STRVAL_P(ret); + GC_ADD_FLAGS(Z_STR_P(ret), flags); + + char *target = Z_STRVAL_P(ret); for (i = 0; i <= opline->extended_value; i++) { memcpy(target, ZSTR_VAL(rope[i]), ZSTR_LEN(rope[i])); target += ZSTR_LEN(rope[i]); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index ef1219ab7d896..95e66b0cac3a7 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -19867,8 +19867,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CONST_HANDLE zend_string **rope; zval *var, *ret; uint32_t i; - size_t len = 0; - char *target; rope = (zend_string**)EX_VAR(opline->op1.var); if (IS_CONST == IS_CONST) { @@ -19901,12 +19899,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CONST_HANDLE } } } + + size_t len = 0; + uint32_t flags = ZSTR_COPYABLE_CONCAT_PROPERTIES; for (i = 0; i <= opline->extended_value; i++) { + flags &= ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(rope[i]); len += ZSTR_LEN(rope[i]); } ret = EX_VAR(opline->result.var); ZVAL_STR(ret, zend_string_alloc(len, 0)); - target = Z_STRVAL_P(ret); + GC_ADD_FLAGS(Z_STR_P(ret), flags); + + char *target = Z_STRVAL_P(ret); for (i = 0; i <= opline->extended_value; i++) { memcpy(target, ZSTR_VAL(rope[i]), ZSTR_LEN(rope[i])); target += ZSTR_LEN(rope[i]); @@ -20344,8 +20348,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDL zend_string **rope; zval *var, *ret; uint32_t i; - size_t len = 0; - char *target; rope = (zend_string**)EX_VAR(opline->op1.var); if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { @@ -20378,12 +20380,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDL } } } + + size_t len = 0; + uint32_t flags = ZSTR_COPYABLE_CONCAT_PROPERTIES; for (i = 0; i <= opline->extended_value; i++) { + flags &= ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(rope[i]); len += ZSTR_LEN(rope[i]); } ret = EX_VAR(opline->result.var); ZVAL_STR(ret, zend_string_alloc(len, 0)); - target = Z_STRVAL_P(ret); + GC_ADD_FLAGS(Z_STR_P(ret), flags); + + char *target = Z_STRVAL_P(ret); for (i = 0; i <= opline->extended_value; i++) { memcpy(target, ZSTR_VAL(rope[i]), ZSTR_LEN(rope[i])); target += ZSTR_LEN(rope[i]); @@ -21205,8 +21213,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CV_HANDLER(Z zend_string **rope; zval *var, *ret; uint32_t i; - size_t len = 0; - char *target; rope = (zend_string**)EX_VAR(opline->op1.var); if (IS_CV == IS_CONST) { @@ -21239,12 +21245,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CV_HANDLER(Z } } } + + size_t len = 0; + uint32_t flags = ZSTR_COPYABLE_CONCAT_PROPERTIES; for (i = 0; i <= opline->extended_value; i++) { + flags &= ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(rope[i]); len += ZSTR_LEN(rope[i]); } ret = EX_VAR(opline->result.var); ZVAL_STR(ret, zend_string_alloc(len, 0)); - target = Z_STRVAL_P(ret); + GC_ADD_FLAGS(Z_STR_P(ret), flags); + + char *target = Z_STRVAL_P(ret); for (i = 0; i <= opline->extended_value; i++) { memcpy(target, ZSTR_VAL(rope[i]), ZSTR_LEN(rope[i])); target += ZSTR_LEN(rope[i]); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 7636c7810531c..7c889a2ade8df 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -3104,13 +3104,16 @@ static zend_string* ZEND_FASTCALL zend_jit_rope_end(zend_string **rope, uint32_t zend_string *ret; uint32_t i; size_t len = 0; - char *target; + uint32_t flags = ZSTR_COPYABLE_CONCAT_PROPERTIES; for (i = 0; i <= count; i++) { + flags &= ZSTR_GET_COPYABLE_CONCAT_PROPERTIES(rope[i]); len += ZSTR_LEN(rope[i]); } ret = zend_string_alloc(len, 0); - target = ZSTR_VAL(ret); + GC_ADD_FLAGS(ret, flags); + + char *target = ZSTR_VAL(ret); for (i = 0; i <= count; i++) { memcpy(target, ZSTR_VAL(rope[i]), ZSTR_LEN(rope[i])); target += ZSTR_LEN(rope[i]); diff --git a/ext/zend_test/tests/strings_marked_as_utf8.phpt b/ext/zend_test/tests/strings_marked_as_utf8.phpt index 9eaa43e63902c..6a32a27a491d1 100644 --- a/ext/zend_test/tests/strings_marked_as_utf8.phpt +++ b/ext/zend_test/tests/strings_marked_as_utf8.phpt @@ -107,6 +107,13 @@ $s = $o . $o; var_dump($s); var_dump(zend_test_is_string_marked_as_valid_utf8($s)); +echo "Rope concat:\n"; +$foo = 'f'; +$bar = 'b'; +$baz = 'a'; +$rope = "$foo$bar$baz"; +var_dump(zend_test_is_string_marked_as_valid_utf8($rope)); + echo "str_repeat:\n"; $string = "a"; $string_concat = str_repeat($string, 100); @@ -183,6 +190,8 @@ bool(true) Concatenation of objects: string(2) "zz" bool(true) +Rope concat: +bool(true) str_repeat: bool(true) bool(false) diff --git a/ext/zend_test/tests/strings_not_marked_as_utf8.phpt b/ext/zend_test/tests/strings_not_marked_as_utf8.phpt index 1a5210d39313f..d9115e8bd987e 100644 --- a/ext/zend_test/tests/strings_not_marked_as_utf8.phpt +++ b/ext/zend_test/tests/strings_not_marked_as_utf8.phpt @@ -102,6 +102,12 @@ $s = $o . $o; $s = $s . $non_utf8; var_dump(zend_test_is_string_marked_as_valid_utf8($s)); +echo "Rope concat:\n"; +$foo = 'f'; +$bar = "\xc3"; +$baz = 'a'; +$rope = "$foo$bar$baz"; +var_dump(zend_test_is_string_marked_as_valid_utf8($rope)); ?> --EXPECT-- Integer cast to string concatenated to invalid UTF-8: @@ -129,3 +135,5 @@ Concatenation in loop (compound assignment): bool(false) Concatenation of objects: bool(false) +Rope concat: +bool(false) From 8317a147b9cb5ab0cd5631d46ba12e6cbdabacc7 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 Mar 2023 15:59:21 +0200 Subject: [PATCH 713/895] Use php_random_bytes_silent() where possible in gmp_init_random() (#10944) See GH-10942. --- ext/gmp/gmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 96536ff3bde39..ff2b37ae09f0b 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1729,7 +1729,11 @@ static void gmp_init_random(void) /* Initialize */ gmp_randinit_mt(GMPG(rand_state)); /* Seed */ - gmp_randseed_ui(GMPG(rand_state), GENERATE_SEED()); + zend_long seed = 0; + if (php_random_bytes_silent(&seed, sizeof(zend_long)) == FAILURE) { + seed = GENERATE_SEED(); + } + gmp_randseed_ui(GMPG(rand_state), seed); GMPG(rand_initialized) = 1; } From 19ddc627786162b553f8cfceff247e2fea68d1ca Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Mar 2023 19:06:07 +0100 Subject: [PATCH 714/895] Fix undefined behaviour when writing 32-bit values in phar/tar.c As shown on the CI runs on my fork (which runs with UBSAN), the pointers can sometimes be unaligned when trying to write. This is UB and on platforms like ARM this *can* result in a bus error. Replace it with memcpy, which at least on x86 and powerpc architectures does result in the same assembly code. Closes GH-10940. --- ext/phar/tar.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 99b6b9812de18..80a17d6931858 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -1244,13 +1244,15 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int return EOF; } #ifdef WORDS_BIGENDIAN -# define PHAR_SET_32(var, buffer) \ - *(uint32_t *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \ - | ((((unsigned char*)&(buffer))[2]) << 16) \ - | ((((unsigned char*)&(buffer))[1]) << 8) \ - | (((unsigned char*)&(buffer))[0])) +# define PHAR_SET_32(destination, source) do { \ + uint32_t swapped = (((((unsigned char*)&(source))[3]) << 24) \ + | ((((unsigned char*)&(source))[2]) << 16) \ + | ((((unsigned char*)&(source))[1]) << 8) \ + | (((unsigned char*)&(source))[0])); \ + memcpy(destination, &swapped, 4); \ + } while (0); #else -# define PHAR_SET_32(var, buffer) *(uint32_t *)(var) = (uint32_t) (buffer) +# define PHAR_SET_32(destination, source) memcpy(destination, &source, 4) #endif PHAR_SET_32(sigbuf, phar->sig_flags); PHAR_SET_32(sigbuf + 4, signature_length); From 6f56c00498c56abebec56cc8db76307cc640387f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:10:27 +0100 Subject: [PATCH 715/895] Fix undefined behaviour in GENERATE_SEED() Signed multiply overflow is undefined behaviour. If you run the CI tests with UBSAN enabled on a 32-bit platform, this is quite easy to hit. On 64-bit it's more difficult to hit though, but not impossible. Closes GH-10942. --- ext/standard/php_rand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index e8018722772f7..ada63d47f5c25 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -61,9 +61,9 @@ (__n) = (__min) + (zend_long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0))) #ifdef PHP_WIN32 -#define GENERATE_SEED() (((zend_long) (time(0) * GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg()))) +#define GENERATE_SEED() (((zend_long) ((zend_ulong) time(NULL) * (zend_ulong) GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg()))) #else -#define GENERATE_SEED() (((zend_long) (time(0) * getpid())) ^ ((zend_long) (1000000.0 * php_combined_lcg()))) +#define GENERATE_SEED() (((zend_long) ((zend_ulong) time(NULL) * (zend_ulong) getpid())) ^ ((zend_long) (1000000.0 * php_combined_lcg()))) #endif PHPAPI void php_srand(zend_long seed); From 6ec69d727a6bc2226d1c2c208d48c7294ea6f521 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:04:42 +0200 Subject: [PATCH 716/895] Improve the warning message for unpack() in case not enough values were provided (#10949) --- NEWS | 2 ++ ext/standard/pack.c | 2 +- ext/standard/tests/strings/bug61038.phpt | 2 +- ext/standard/tests/strings/pack_Z.phpt | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1fbe26ea8334b..e6e51432ee3cb 100644 --- a/NEWS +++ b/NEWS @@ -151,6 +151,8 @@ PHP NEWS . password_hash() will now chain the original RandomException to the ValueError on salt generation failure. (timwolla) . Fix GH-10239 (proc_close after proc_get_status always returns -1). (nielsdos) + . Improve the warning message for unpack() in case not enough values were + provided. (nielsdos) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. diff --git a/ext/standard/pack.c b/ext/standard/pack.c index f61214ca7e5d6..b5ff385e485c3 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -1178,7 +1178,7 @@ PHP_FUNCTION(unpack) /* Reached end of input for '*' repeater */ break; } else { - php_error_docref(NULL, E_WARNING, "Type %c: not enough input, need %d, have " ZEND_LONG_FMT, type, size, inputlen - inputpos); + php_error_docref(NULL, E_WARNING, "Type %c: not enough input values, need %d values but only " ZEND_LONG_FMT " %s provided", type, size, inputlen - inputpos, inputlen - inputpos == 1 ? "was" : "were"); zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } diff --git a/ext/standard/tests/strings/bug61038.phpt b/ext/standard/tests/strings/bug61038.phpt index 3c0831a0cbc14..d33be766346f8 100644 --- a/ext/standard/tests/strings/bug61038.phpt +++ b/ext/standard/tests/strings/bug61038.phpt @@ -17,7 +17,7 @@ array(1) { string(5) "str%c%c" } -Warning: unpack(): Type a: not enough input, need 6, have 5 in %s on line %d +Warning: unpack(): Type a: not enough input values, need 6 values but only 5 were provided in %s on line %d bool(false) array(1) { [1]=> diff --git a/ext/standard/tests/strings/pack_Z.phpt b/ext/standard/tests/strings/pack_Z.phpt index 672077bd89a28..ac0608a9bd084 100644 --- a/ext/standard/tests/strings/pack_Z.phpt +++ b/ext/standard/tests/strings/pack_Z.phpt @@ -18,7 +18,7 @@ var_dump( ); ?> --EXPECTF-- -Warning: unpack(): Type Z: not enough input, need 2, have 1 in %s on line %d +Warning: unpack(): Type Z: not enough input values, need 2 values but only 1 was provided in %s on line %d string(0) "" string(5) "foo%c%c" string(4) "foo%c" From 5f2587eb25765fb364449e8b7e9c2a84313dcef9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 25 Mar 2023 07:35:22 +0200 Subject: [PATCH 717/895] php-fuzz-mbstring also tests text encoding validation functions In 6fc8d014df, pakutoma added specialized validation functions for ISO-2022-JP, JIS, UTF-7, and UTF7-IMAP text. In the future, it is possible we might add such functions for more legacy text encodings. Allowing them to be tested by php-fuzz-mbstring may help to catch bugs, both now and in the future. --- sapi/fuzzer/fuzzer-mbstring.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sapi/fuzzer/fuzzer-mbstring.c b/sapi/fuzzer/fuzzer-mbstring.c index 9b134c5f8c417..e8da3120acf19 100644 --- a/sapi/fuzzer/fuzzer-mbstring.c +++ b/sapi/fuzzer/fuzzer-mbstring.c @@ -103,6 +103,18 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { assert_zend_string_eql(Result1, Result2); ZEND_ASSERT(errors1 == errors2); + /* For some text encodings, we have specialized validation functions. These should always be + * stricter than the conversion functions; if the conversion function receives invalid input + * and emits an error marker (MBFL_BAD_INPUT), then the validation function should always + * return false. However, if the conversion function does not emit any error marker, it may + * still happen in some cases that the validation function returns false. */ + if (FromEncoding->check != NULL) { + bool good = FromEncoding->check((unsigned char*)Data, Size); + if (errors1 > 0) { + ZEND_ASSERT(!good); + } + } + zend_string_release(Result1); zend_string_release(Result2); efree(ToEncodingName); From c4fb049bf630d2748faffa04ad9e74ca5259da2d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 24 Mar 2023 14:57:09 +0200 Subject: [PATCH 718/895] For UTF-7, emit error marker if Base64 section ends abruptly after first half of surrogate pair This (rare) situation was already handled correctly for the 1st and 2nd of every 3 codepoints in a Base64-encoded section of a UTF-7 string. However, it was not handled correctly if it happened on the 3rd, 6th, 9th, etc. codepoint of such a Base64-encoded section. --- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 13 +++++++++++-- ext/mbstring/tests/utf_encodings.phpt | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index 57641a4bbe41d..c3a2aaae0cf10 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -537,8 +537,10 @@ static size_t mb_utf7_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf if (p == e) { /* It is an error if trailing padding bits are not zeroes or if we were * expecting the 2nd part of a surrogate pair when Base64 section ends */ - if ((n3 & 0x3) || surrogate1) + if ((n3 & 0x3) || surrogate1) { *out++ = MBFL_BAD_INPUT; + surrogate1 = 0; + } break; } @@ -562,8 +564,10 @@ static size_t mb_utf7_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf } out = handle_utf16_cp((n3 << 14) | (n4 << 8) | (n5 << 2) | ((n6 & 0x30) >> 4), out, &surrogate1); if (p == e) { - if ((n6 & 0xF) || surrogate1) + if ((n6 & 0xF) || surrogate1) { *out++ = MBFL_BAD_INPUT; + surrogate1 = 0; + } break; } @@ -603,6 +607,11 @@ static size_t mb_utf7_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf } } + if (p == e && surrogate1) { + ZEND_ASSERT(out < limit); + *out++ = MBFL_BAD_INPUT; + } + *state = (surrogate1 << 1) | base64; *in_len = e - p; *in = p; diff --git a/ext/mbstring/tests/utf_encodings.phpt b/ext/mbstring/tests/utf_encodings.phpt index 5c89aa9bade06..06c35b1546521 100644 --- a/ext/mbstring/tests/utf_encodings.phpt +++ b/ext/mbstring/tests/utf_encodings.phpt @@ -1074,6 +1074,9 @@ testInvalidString('+' . rawEncode("\x00.\x00.\xD8\x01\xD9\x02") . '-', "\x00\x00 // First half of surrogate pair appearing at end of string testInvalidString('+' . rawEncode("\xD8\x01") . '-', "\x00\x00\x00%", 'UTF-7', 'UTF-32BE'); testInvalidString('+' . rawEncode("\xD8\x01"), "\x00\x00\x00%", 'UTF-7', 'UTF-32BE'); +testInvalidString("+999999uJ", "\xEF\x9F\x9F\xE7\xB7\xB7%", 'UTF-7', 'UTF-8'); +testInvalidString("+999euJ", "\xEF\x9F\x9F\xE5\xBA\xB8%", "UTF-7", "UTF-8"); +testInvalidString("+euJ", "\xE7\xAB\xA2%", "UTF-7", "UTF-8"); // Truncated string testInvalidString('+' . rawEncode("\x01") . '-', "\x00\x00\x00%", 'UTF-7', 'UTF-32BE'); From b73b70f097cefff44a0aaf8f41bb039035b56f29 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 27 Mar 2023 12:59:27 +0200 Subject: [PATCH 719/895] Rename --with-opcache-capstone to --with-capstone (#10952) --- ext/opcache/config.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index fb3324cf82a3d..9404e3e19d1d8 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -18,8 +18,8 @@ PHP_ARG_ENABLE([opcache-jit], [yes], [no]) -PHP_ARG_WITH([opcache-capstone],, - [AS_HELP_STRING([--with-opcache-capstone], +PHP_ARG_WITH([capstone],, + [AS_HELP_STRING([--with-capstone], [support opcache JIT disassembly through capstone])], [no], [no]) @@ -74,7 +74,7 @@ if test "$PHP_OPCACHE" != "no"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1" fi - AS_IF([test x"$with_opcache_capstone" = "xyes"],[ + AS_IF([test x"$with_capstone" = "xyes"],[ PKG_CHECK_MODULES([CAPSTONE],[capstone >= 3.0.0],[ AC_DEFINE([HAVE_CAPSTONE], [1], [Capstone is available]) PHP_EVAL_LIBLINE($CAPSTONE_LIBS, OPCACHE_SHARED_LIBADD) From e1ec67acd686abb8ddb4afee8b55f13b6a963057 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 27 Mar 2023 12:50:29 +0200 Subject: [PATCH 720/895] Unparallelize IO heavy tests Alternative to GH-10892. This is somewhat unfortunate since these are also the slow tests. I'm also not sure if this actually helps. Closes GH-10953 --- ext/mysqli/tests/mysqli_fetch_array_large.phpt | 2 ++ ext/mysqli/tests/mysqli_stmt_bind_limits.phpt | 2 ++ ext/oci8/tests/CONFLICTS | 3 ++- ext/pdo_oci/tests/CONFLICTS | 3 ++- ext/standard/tests/file/bug81145.phpt | 2 ++ ext/standard/tests/streams/proc_open_bug69900.phpt | 2 ++ ext/tidy/tests/parsing_file_too_large.phpt | 2 ++ sapi/cli/tests/upload_2G.phpt | 2 ++ 8 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/tests/mysqli_fetch_array_large.phpt b/ext/mysqli/tests/mysqli_fetch_array_large.phpt index 43cd0fab3fd92..21b74e8ab7ae6 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_large.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_large.phpt @@ -7,6 +7,8 @@ mysqli if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); require_once('skipifconnectfailure.inc'); ?> +--CONFLICTS-- +all --INI-- memory_limit=-1 --FILE-- diff --git a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt index 58a99c86e7f47..03a980d929c6e 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt @@ -6,6 +6,8 @@ mysqli +--CONFLICTS-- +all --FILE-- +--CONFLICTS-- +all --FILE-- +--CONFLICTS-- +all --INI-- memory_limit="5G" --FILE-- diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt index 7ca9177229191..1cf883cd9d3aa 100644 --- a/sapi/cli/tests/upload_2G.phpt +++ b/sapi/cli/tests/upload_2G.phpt @@ -42,6 +42,8 @@ if (getenv('SKIP_PERF_SENSITIVE')) { die("skip Test may be very slow if PHP is instrumented"); } ?> +--CONFLICTS-- +all --FILE-- Date: Fri, 24 Mar 2023 10:13:25 +0100 Subject: [PATCH 721/895] Suppress snmp lib memory leak, xfail ASAN tests I don't know enough about this library to fix those :( --- .github/lsan-suppressions.txt | 1 + ext/snmp/tests/snmp-object-errno-errstr.phpt | 1 + ext/snmp/tests/snmp-object-error.phpt | 1 + ext/snmp/tests/snmp2_get.phpt | 1 + ext/snmp/tests/snmp2_set-nomib.phpt | 1 + ext/snmp/tests/snmp2_walk.phpt | 1 + ext/snmp/tests/snmp3-error.phpt | 1 + ext/snmp/tests/snmp_getvalue.phpt | 1 + ext/snmp/tests/snmpget.phpt | 1 + ext/snmp/tests/snmpset-nomib.phpt | 1 + ext/snmp/tests/snmpwalk.phpt | 1 + 11 files changed, 11 insertions(+) diff --git a/.github/lsan-suppressions.txt b/.github/lsan-suppressions.txt index 3ce5de80bd6a7..b8f863ce603b0 100644 --- a/.github/lsan-suppressions.txt +++ b/.github/lsan-suppressions.txt @@ -1,2 +1,3 @@ leak:acommon::DictInfoList::elements leak:timer_create +leak:netsnmp_init_mib_internals diff --git a/ext/snmp/tests/snmp-object-errno-errstr.phpt b/ext/snmp/tests/snmp-object-errno-errstr.phpt index 8304c6cb9f921..2f00507104542 100644 --- a/ext/snmp/tests/snmp-object-errno-errstr.phpt +++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- --FILE-- --FILE-- --ENV-- MIBS= diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt index 4cd9b3a85b6fd..6baae774e84ec 100644 --- a/ext/snmp/tests/snmp2_walk.phpt +++ b/ext/snmp/tests/snmp2_walk.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --ENV-- MIBS= diff --git a/ext/snmp/tests/snmpwalk.phpt b/ext/snmp/tests/snmpwalk.phpt index b0e8a8a8afd18..e8f4586e8ed5e 100644 --- a/ext/snmp/tests/snmpwalk.phpt +++ b/ext/snmp/tests/snmpwalk.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- Date: Mon, 27 Mar 2023 17:57:54 +0300 Subject: [PATCH 722/895] Fix incorrect optimization Fixes oss-fuzz #57482 --- Zend/Optimizer/block_pass.c | 2 +- ext/opcache/tests/opt/match_003.phpt | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/opt/match_003.phpt diff --git a/Zend/Optimizer/block_pass.c b/Zend/Optimizer/block_pass.c index b3f2099fb1955..0186dde313144 100644 --- a/Zend/Optimizer/block_pass.c +++ b/Zend/Optimizer/block_pass.c @@ -257,7 +257,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array break; case ZEND_MATCH_ERROR: - if (opline->op1_type == IS_TMP_VAR) { + if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) { src = VAR_SOURCE(opline->op1); VAR_SOURCE(opline->op1) = NULL; } diff --git a/ext/opcache/tests/opt/match_003.phpt b/ext/opcache/tests/opt/match_003.phpt new file mode 100644 index 0000000000000..1d55d01b6213a --- /dev/null +++ b/ext/opcache/tests/opt/match_003.phpt @@ -0,0 +1,15 @@ +--TEST-- +Match 003: SSA integrity verification failed because of incorrect optimization +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Call to undefined function y() in %smatch_003.php:2 +Stack trace: +#0 {main} + thrown in %smatch_003.php on line 2 From b9f8b696c44dfb748c156de6e6e63e80804dfe5b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 27 Mar 2023 17:39:52 +0200 Subject: [PATCH 723/895] Fix one more differ direct comparison (through in_array) --- run-tests.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/run-tests.php b/run-tests.php index 9a8b03a423908..57486b1d073b6 100755 --- a/run-tests.php +++ b/run-tests.php @@ -3982,11 +3982,11 @@ public function diffToArray(array $from, array $to): array reset($to); foreach ($common as $token) { - while (!($this->isEqual)($fromToken = reset($from), $token)) { + while (!($this->isEqual)(reset($from), $token)) { $diff[] = [array_shift($from), self::REMOVED, $fromLine++]; } - while (!($this->isEqual)($toToken = reset($to), $token)) { + while (!($this->isEqual)($token, reset($to))) { $diff[] = [array_shift($to), self::ADDED, $toLine++]; } @@ -4065,8 +4065,10 @@ public function calculateCommonSubsequence(array $from, array $to): array } if ($cFrom === 1) { - if (in_array($from[0], $to, true)) { - return [$from[0]]; + foreach ($to as $toV) { + if (($this->isEqual)($from[0], $toV)) { + return [$from[0]]; + } } return []; From 21e0305f5d0eea9255bfd2205b9e32b53dcdcaaa Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:53:18 +0100 Subject: [PATCH 724/895] Fix GH-10908: Bus error with PDO Firebird on RPI with 64 bit kernel and 32 bit userland The alignment of sqldata is in most cases only the basic alignment, so the code type-puns it to a larger type, it *can* crash due to the misaligned access. This is only an issue for types > 4 bytes because every sensible system requires an alignment of at least 4 bytes for allocated data. Even though this patch uses memcpy, the compiler is smart enough to optimise it to something more efficient, especially on x86. This is just the usual approach to solve these alignment problems. Actually, unaligned memory access is undefined behaviour, so even on x86 platforms, where the bug doesn't cause a crash, this can be problematic. Furthermore, even though the issue talks about a 64-bit kernel and 32-bit userspace, this doesn't necessarily need to be the case to trigger this crash. Test was Co-authored-by: rvk01 Closes GH-10920. --- NEWS | 4 + ext/pdo_firebird/firebird_statement.c | 63 +++++++++-- ext/pdo_firebird/tests/gh10908.phpt | 155 ++++++++++++++++++++++++++ 3 files changed, 211 insertions(+), 11 deletions(-) create mode 100644 ext/pdo_firebird/tests/gh10908.phpt diff --git a/NEWS b/NEWS index 204f3e375d1bc..6d4780d08e3b0 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,10 @@ PHP NEWS - OpenSSL: . Add missing error checks on file writing functions. (nielsdos) +- PDO Firebird: + . Fixed bug GH-10908 (Bus error with PDO Firebird on RPI with 64 bit kernel + and 32 bit userland). (nielsdos) + - PDO ODBC: . Fixed missing and inconsistent error checks on SQLAllocHandle. (nielsdos) diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 04a911c0c76c5..5b2971647fbf4 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -30,6 +30,37 @@ #define RECORD_ERROR(stmt) _firebird_error(NULL, stmt, __FILE__, __LINE__) +#define READ_AND_RETURN_USING_MEMCPY(type, sqldata) do { \ + type ret; \ + memcpy(&ret, sqldata, sizeof(ret)); \ + return ret; \ + } while (0); + +static zend_always_inline ISC_INT64 get_isc_int64_from_sqldata(const ISC_SCHAR *sqldata) +{ + READ_AND_RETURN_USING_MEMCPY(ISC_INT64, sqldata); +} + +static zend_always_inline ISC_LONG get_isc_long_from_sqldata(const ISC_SCHAR *sqldata) +{ + READ_AND_RETURN_USING_MEMCPY(ISC_LONG, sqldata); +} + +static zend_always_inline double get_double_from_sqldata(const ISC_SCHAR *sqldata) +{ + READ_AND_RETURN_USING_MEMCPY(double, sqldata); +} + +static zend_always_inline ISC_TIMESTAMP get_isc_timestamp_from_sqldata(const ISC_SCHAR *sqldata) +{ + READ_AND_RETURN_USING_MEMCPY(ISC_TIMESTAMP, sqldata); +} + +static zend_always_inline ISC_QUAD get_isc_quad_from_sqldata(const ISC_SCHAR *sqldata) +{ + READ_AND_RETURN_USING_MEMCPY(ISC_QUAD, sqldata); +} + /* free the allocated space for passing field values to the db and back */ static void free_sqlda(XSQLDA const *sqlda) /* {{{ */ { @@ -377,10 +408,10 @@ static int firebird_stmt_get_col( n = *(short*)var->sqldata; break; case SQL_LONG: - n = *(ISC_LONG*)var->sqldata; + n = get_isc_long_from_sqldata(var->sqldata); break; case SQL_INT64: - n = *(ISC_INT64*)var->sqldata; + n = get_isc_int64_from_sqldata(var->sqldata); break; case SQL_DOUBLE: break; @@ -388,7 +419,7 @@ static int firebird_stmt_get_col( } if ((var->sqltype & ~1) == SQL_DOUBLE) { - str = zend_strpprintf(0, "%.*F", -var->sqlscale, *(double*)var->sqldata); + str = zend_strpprintf(0, "%.*F", -var->sqlscale, get_double_from_sqldata(var->sqldata)); } else if (n >= 0) { str = zend_strpprintf(0, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -var->sqlscale, n % f); @@ -414,13 +445,13 @@ static int firebird_stmt_get_col( ZVAL_LONG(result, *(short*)var->sqldata); break; case SQL_LONG: - ZVAL_LONG(result, *(ISC_LONG*)var->sqldata); + ZVAL_LONG(result, get_isc_long_from_sqldata(var->sqldata)); break; case SQL_INT64: #if SIZEOF_ZEND_LONG >= 8 - ZVAL_LONG(result, *(ISC_INT64*)var->sqldata); + ZVAL_LONG(result, get_isc_int64_from_sqldata(var->sqldata)); #else - ZVAL_STR(result, zend_strpprintf(0, "%" LL_MASK "d", *(ISC_INT64*)var->sqldata)); + ZVAL_STR(result, zend_strpprintf(0, "%" LL_MASK "d", get_isc_int64_from_sqldata(var->sqldata))); #endif break; case SQL_FLOAT: @@ -429,7 +460,7 @@ static int firebird_stmt_get_col( break; case SQL_DOUBLE: /* TODO: Why is this not returned as the native type? */ - ZVAL_STR(result, zend_strpprintf(0, "%F", *(double*)var->sqldata)); + ZVAL_STR(result, zend_strpprintf(0, "%F", get_double_from_sqldata(var->sqldata))); break; #ifdef SQL_BOOLEAN case SQL_BOOLEAN: @@ -445,7 +476,10 @@ static int firebird_stmt_get_col( fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; } else if (0) { case SQL_TIMESTAMP: - isc_decode_timestamp((ISC_TIMESTAMP*)var->sqldata, &t); + { + ISC_TIMESTAMP timestamp = get_isc_timestamp_from_sqldata(var->sqldata); + isc_decode_timestamp(×tamp, &t); + } fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; } /* convert the timestamp into a string */ @@ -453,8 +487,10 @@ static int firebird_stmt_get_col( size_t len = strftime(buf, sizeof(buf), fmt, &t); ZVAL_STRINGL(result, buf, len); break; - case SQL_BLOB: - return firebird_fetch_blob(stmt, colno, result, (ISC_QUAD*)var->sqldata); + case SQL_BLOB: { + ISC_QUAD quad = get_isc_quad_from_sqldata(var->sqldata); + return firebird_fetch_blob(stmt, colno, result, &quad); + } } } } @@ -607,7 +643,12 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat *var->sqlind = -1; return 1; } - return firebird_bind_blob(stmt, (ISC_QUAD*)var->sqldata, parameter); + ISC_QUAD quad = get_isc_quad_from_sqldata(var->sqldata); + if (firebird_bind_blob(stmt, &quad, parameter) != 0) { + memcpy(var->sqldata, &quad, sizeof(quad)); + return 1; + } + return 0; } } diff --git a/ext/pdo_firebird/tests/gh10908.phpt b/ext/pdo_firebird/tests/gh10908.phpt new file mode 100644 index 0000000000000..f64bb7c3f71c1 --- /dev/null +++ b/ext/pdo_firebird/tests/gh10908.phpt @@ -0,0 +1,155 @@ +--TEST-- +GH-10908 (Bus error with PDO Firebird on RPI with 64 bit kernel and 32 bit userland) +--EXTENSIONS-- +pdo_firebird +--SKIPIF-- + +--ENV-- +LSAN_OPTIONS=detect_leaks=0 +--FILE-- +exec($sql); +$dbh->exec("INSERT INTO gh10908 VALUES(1, 'ABC', 12.34, 1.0, 2.0, '2023-03-24 17:39', '2023-03-24', '17:39', 'abcdefg', 'ab', 'a', 32767, 200000, 'azertyuiop', 'ab', false);"); + +function query_and_dump($dbh, $sql) { + foreach ($dbh->query($sql) as $row) { + print_r($row); + print("\n"); + } +} + +query_and_dump($dbh, "SELECT CODE FROM gh10908"); // works fine +query_and_dump($dbh, "SELECT ID FROM gh10908"); // Used to "bus error" +query_and_dump($dbh, "SELECT NUM FROM gh10908"); // Used to "bus error" +query_and_dump($dbh, "SELECT DBL FROM gh10908"); // Used to "bus error" +query_and_dump($dbh, "SELECT TS FROM gh10908"); // Used to "bus error" +query_and_dump($dbh, "SELECT MYBLOB FROM gh10908"); // Used to "bus error" +query_and_dump($dbh, "SELECT * FROM gh10908"); // Used to "bus error" + +query_and_dump($dbh, "SELECT CAST(NUM AS NUMERIC(9, 3)) FROM gh10908"); // works fine +query_and_dump($dbh, "SELECT CAST(ID AS INTEGER) FROM gh10908"); // works fine +query_and_dump($dbh, "SELECT CAST(ID AS BIGINT) FROM gh10908"); // Used to "bus error" + +echo "Did not crash\n"; + +?> +--CLEAN-- +exec("DROP TABLE gh10908"); +?> +--EXPECT-- +Array +( + [CODE] => ABC + [0] => ABC +) + +Array +( + [ID] => 1 + [0] => 1 +) + +Array +( + [NUM] => 12.340 + [0] => 12.340 +) + +Array +( + [DBL] => 1.000000 + [0] => 1.000000 +) + +Array +( + [TS] => 2023-03-24 17:39:00 + [0] => 2023-03-24 17:39:00 +) + +Array +( + [MYBLOB] => abcdefg + [0] => abcdefg +) + +Array +( + [ID] => 1 + [0] => 1 + [CODE] => ABC + [1] => ABC + [NUM] => 12.340 + [2] => 12.340 + [DBL] => 1.000000 + [3] => 1.000000 + [FLT] => 2.000000 + [4] => 2.000000 + [TS] => 2023-03-24 17:39:00 + [5] => 2023-03-24 17:39:00 + [MYDATE] => 2023-03-24 + [6] => 2023-03-24 + [MYTIME] => 17:39:00 + [7] => 17:39:00 + [MYBLOB] => abcdefg + [8] => abcdefg + [MYBINARY] => ab + [9] => ab + [MYVARBINARY] => a + [10] => a + [MYSMALLINT] => 32767 + [11] => 32767 + [MYINT] => 200000 + [12] => 200000 + [MYCHAR] => azertyuiop + [13] => azertyuiop + [MYVARCHAR] => ab + [14] => ab + [MYBOOL] => + [15] => +) + +Array +( + [CAST] => 12.340 + [0] => 12.340 +) + +Array +( + [CAST] => 1 + [0] => 1 +) + +Array +( + [CAST] => 1 + [0] => 1 +) + +Did not crash From e6989382296250b1983422c0b8730cd773f26ea7 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 24 Mar 2023 19:18:28 +0100 Subject: [PATCH 725/895] Handle indirect zvals in SplFixedArray::__serialize Closes GH-10925. --- NEWS | 2 ++ ext/spl/spl_fixedarray.c | 2 +- ext/spl/tests/gh10907.phpt | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 4c8f00d13a19e..8d8bb73e016dd 100644 --- a/NEWS +++ b/NEWS @@ -66,6 +66,8 @@ PHP NEWS PHP 8.2.4). (nielsdos) . Fixed bug GH-10844 (ArrayIterator allows modification of readonly props). (ilutov) + . Fixed bug GH-10925 (Handle indirect zvals in SplFixedArray::__serialize). + (nielsdos) - Standard: . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index bf9ec4e695fb4..4f7138cdc7572 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -610,7 +610,7 @@ PHP_METHOD(SplFixedArray, __serialize) /* members */ if (intern->std.properties) { - ZEND_HASH_FOREACH_STR_KEY_VAL(intern->std.properties, key, current) { + ZEND_HASH_FOREACH_STR_KEY_VAL_IND(intern->std.properties, key, current) { /* The properties hash table can also contain the array elements if the properties table was already rebuilt. * In this case we'd have a NULL key. We can't simply use the properties table in all cases because it's * potentially out of sync (missing elements, or containing removed elements) and might need a rebuild. */ diff --git a/ext/spl/tests/gh10907.phpt b/ext/spl/tests/gh10907.phpt index 034c5f1d5a33c..49d98ae5ef360 100644 --- a/ext/spl/tests/gh10907.phpt +++ b/ext/spl/tests/gh10907.phpt @@ -112,10 +112,10 @@ object(SplFixedArray)#1 (3) { } ================= Test with adding members -string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" +string(180) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";s:15:"my_string_value";s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" object(MySplFixedArray)#1 (5) { ["my_string"]=> - int(0) + string(15) "my_string_value" ["my_dynamic_property"]=> string(25) "my_dynamic_property_value" [0]=> From 0d524eda94731160b35fead3adbc44aa1c0fa330 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:46:39 +0200 Subject: [PATCH 726/895] Revert "Handle indirect zvals in SplFixedArray::__serialize" This reverts commit e6989382296250b1983422c0b8730cd773f26ea7. --- NEWS | 2 -- ext/spl/spl_fixedarray.c | 2 +- ext/spl/tests/gh10907.phpt | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 58e19738a3534..f802b6de852dc 100644 --- a/NEWS +++ b/NEWS @@ -70,8 +70,6 @@ PHP NEWS PHP 8.2.4). (nielsdos) . Fixed bug GH-10844 (ArrayIterator allows modification of readonly props). (ilutov) - . Fixed bug GH-10925 (Handle indirect zvals in SplFixedArray::__serialize). - (nielsdos) - Standard: . Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 4f7138cdc7572..bf9ec4e695fb4 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -610,7 +610,7 @@ PHP_METHOD(SplFixedArray, __serialize) /* members */ if (intern->std.properties) { - ZEND_HASH_FOREACH_STR_KEY_VAL_IND(intern->std.properties, key, current) { + ZEND_HASH_FOREACH_STR_KEY_VAL(intern->std.properties, key, current) { /* The properties hash table can also contain the array elements if the properties table was already rebuilt. * In this case we'd have a NULL key. We can't simply use the properties table in all cases because it's * potentially out of sync (missing elements, or containing removed elements) and might need a rebuild. */ diff --git a/ext/spl/tests/gh10907.phpt b/ext/spl/tests/gh10907.phpt index 49d98ae5ef360..034c5f1d5a33c 100644 --- a/ext/spl/tests/gh10907.phpt +++ b/ext/spl/tests/gh10907.phpt @@ -112,10 +112,10 @@ object(SplFixedArray)#1 (3) { } ================= Test with adding members -string(180) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";s:15:"my_string_value";s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" +string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" object(MySplFixedArray)#1 (5) { ["my_string"]=> - string(15) "my_string_value" + int(0) ["my_dynamic_property"]=> string(25) "my_dynamic_property_value" [0]=> From 4e0bd036813ef9ffa738fea87a7ad04982f520f6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 23 Mar 2023 20:30:56 +0100 Subject: [PATCH 727/895] Reset EG(trampoline).op_array.last_var that FFI may modify Closes GH-10916 --- NEWS | 1 + Zend/zend_object_handlers.c | 6 ++++ ext/ffi/tests/trampoline_reset.phpt | 43 +++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 ext/ffi/tests/trampoline_reset.phpt diff --git a/NEWS b/NEWS index 6d4780d08e3b0..730e0d5d087a6 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS (nielsdos) . Fixed bug GH-10810 (Fix NUL byte terminating Exception::__toString()). (ilutov) + . Fix potential memory corruption when mixing __callStatic() and FFI. (ilutov) - Date: . Fixed bug GH-10583 (DateTime modify with tz pattern should not update diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index e4ae4450b534f..60d27b7c91145 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1253,6 +1253,12 @@ ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend ZEND_MAP_PTR_INIT(func->run_time_cache, (void***)&dummy); func->scope = fbc->common.scope; /* reserve space for arguments, local and temporary variables */ + /* EG(trampoline) is reused from other places, like FFI (e.g. zend_ffi_cdata_get_closure()) where + * it is used as an internal function. It may set fields that don't belong to common, thus + * modifying zend_op_array specific data, most significantly last_var. We need to reset this + * value so that it doesn't contain garbage when the engine allocates space for the next stack + * frame. This didn't cause any issues until now due to "lucky" structure layout. */ + func->last_var = 0; func->T = (fbc->type == ZEND_USER_FUNCTION)? MAX(fbc->op_array.last_var + fbc->op_array.T, 2) : 2; func->filename = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.filename : ZSTR_EMPTY_ALLOC(); func->line_start = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.line_start : 0; diff --git a/ext/ffi/tests/trampoline_reset.phpt b/ext/ffi/tests/trampoline_reset.phpt new file mode 100644 index 0000000000000..3a87ec99d2ae5 --- /dev/null +++ b/ext/ffi/tests/trampoline_reset.phpt @@ -0,0 +1,43 @@ +--TEST-- +Memory corruption when mixing __callStatic() and FFI +--EXTENSIONS-- +ffi +--SKIPIF-- + +--INI-- +ffi.enable=1 +--FILE-- +fprintf($ffi->stdout, "FFI\n"); +$ffi->fflush($ffi->stdout); +Test::baz(); +?> +--EXPECT-- +foo called +bar called +FFI +baz called From 2b354318d935ba4565e096d19c8f13d4adda99ac Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Thu, 23 Mar 2023 19:46:17 +0000 Subject: [PATCH 728/895] ext/posix: proposing posix_eaccess. unlike access, it is not standard but available in enough platforms ; on linux it's euidaccess in reality eaccess being 'just' an alias. key difference is eaccess checks the effective user id instead. Close GH-10917 --- NEWS | 1 + ext/posix/config.m4 | 2 +- ext/posix/posix.c | 38 ++++++++++++++++++++++++++++++ ext/posix/posix.stub.php | 4 ++++ ext/posix/posix_arginfo.h | 15 +++++++++++- ext/posix/tests/posix_eaccess.phpt | 20 ++++++++++++++++ 6 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 ext/posix/tests/posix_eaccess.phpt diff --git a/NEWS b/NEWS index e6e51432ee3cb..1c365e0c0cb7e 100644 --- a/NEWS +++ b/NEWS @@ -112,6 +112,7 @@ PHP NEWS . Added posix_pathconf. (David Carlier) . Added posix_fpathconf. (David Carlier) . Fixed zend_parse_arg_long's bool pointer argument assignment. (Cristian Rodriguez) + . Added posix_eaccess. (David Carlier) - Random: . Added Randomizer::getBytesFromString(). (Joshua Rüsweg) diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index f4335e50a9564..6b056c43740c9 100644 --- a/ext/posix/config.m4 +++ b/ext/posix/config.m4 @@ -10,7 +10,7 @@ if test "$PHP_POSIX" = "yes"; then AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h]) - AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r posix_pathconf) + AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r posix_pathconf eaccess) AC_MSG_CHECKING([for working ttyname_r() implementation]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 35a99af923ec6..da727cad15d18 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -713,6 +713,44 @@ PHP_FUNCTION(posix_access) RETURN_TRUE; } + +#ifdef HAVE_EACCESS +PHP_FUNCTION(posix_eaccess) +{ + zend_long mode = 0; + size_t filename_len, ret; + char *filename, *path; + + ZEND_PARSE_PARAMETERS_START(1, 2) + Z_PARAM_PATH(filename, filename_len) + Z_PARAM_OPTIONAL + Z_PARAM_LONG(mode) + ZEND_PARSE_PARAMETERS_END(); + + path = expand_filepath(filename, NULL); + if (!path) { + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); + } + + if (php_check_open_basedir_ex(path, 0)) { + efree(path); + POSIX_G(last_error) = EPERM; + RETURN_FALSE; + } + + ret = eaccess(path, mode); + efree(path); + + if (ret) { + POSIX_G(last_error) = errno; + RETURN_FALSE; + } + + RETURN_TRUE; +} +#endif + /* }}} */ /* diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index fffce3085f6da..4e5adc2eef92b 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -379,6 +379,10 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = function posix_access(string $filename, int $flags = 0): bool {} +#ifdef HAVE_EACCESS +function posix_eaccess(string $filename, int $flags = 0): bool {} +#endif + /** * @return array|false * @refcount 1 diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index 8320c64951e8a..2953e93fcdd4d 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5359511a464e0d35c7d5c4ea3320c70210b2b9a7 */ + * Stub hash: 5a4a863892761475f2d34d9463e0660b0a8ede5d */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) @@ -115,6 +115,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_access, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() +#if defined(HAVE_EACCESS) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_eaccess, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") +ZEND_END_ARG_INFO() +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -226,6 +233,9 @@ ZEND_FUNCTION(posix_mkfifo); ZEND_FUNCTION(posix_mknod); #endif ZEND_FUNCTION(posix_access); +#if defined(HAVE_EACCESS) +ZEND_FUNCTION(posix_eaccess); +#endif ZEND_FUNCTION(posix_getgrnam); ZEND_FUNCTION(posix_getgrgid); ZEND_FUNCTION(posix_getpwnam); @@ -298,6 +308,9 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(posix_mknod, arginfo_posix_mknod) #endif ZEND_FE(posix_access, arginfo_posix_access) +#if defined(HAVE_EACCESS) + ZEND_FE(posix_eaccess, arginfo_posix_eaccess) +#endif ZEND_FE(posix_getgrnam, arginfo_posix_getgrnam) ZEND_FE(posix_getgrgid, arginfo_posix_getgrgid) ZEND_FE(posix_getpwnam, arginfo_posix_getpwnam) diff --git a/ext/posix/tests/posix_eaccess.phpt b/ext/posix/tests/posix_eaccess.phpt new file mode 100644 index 0000000000000..4211e6ef13e72 --- /dev/null +++ b/ext/posix/tests/posix_eaccess.phpt @@ -0,0 +1,20 @@ +--TEST-- +posix_eaccess() with bogus paths +--EXTENSIONS-- +posix +--SKIPIF-- + +--FILE-- +getMessage() . PHP_EOL; +} + +?> +--EXPECT-- +posix_eaccess(): Argument #1 ($filename) must not be empty From 1357d1eb418bb865c8c0749fcfa4f1ef8a216371 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:11:17 +0200 Subject: [PATCH 729/895] Fix test for GH-10908 It turns out that the version of Firebird influences the test in terms of supported data types. On Windows on 8.2 we seem to be using a different version than on 8.1. Fix it by amending the test. The core issue is still tested in the test, it's just that not all datatypes are tested anymore (which isn't strictly necessary anyway). --- ext/pdo_firebird/tests/gh10908.phpt | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ext/pdo_firebird/tests/gh10908.phpt b/ext/pdo_firebird/tests/gh10908.phpt index f64bb7c3f71c1..a1e8271ffd19b 100644 --- a/ext/pdo_firebird/tests/gh10908.phpt +++ b/ext/pdo_firebird/tests/gh10908.phpt @@ -22,17 +22,14 @@ CREATE TABLE gh10908( MYDATE DATE, MYTIME TIME, MYBLOB BLOB, - MYBINARY BINARY(2), - MYVARBINARY VARBINARY(2), MYSMALLINT SMALLINT, MYINT INT, MYCHAR CHAR(10), - MYVARCHAR VARCHAR(5), MYBOOL BOOLEAN ); EOT; $dbh->exec($sql); -$dbh->exec("INSERT INTO gh10908 VALUES(1, 'ABC', 12.34, 1.0, 2.0, '2023-03-24 17:39', '2023-03-24', '17:39', 'abcdefg', 'ab', 'a', 32767, 200000, 'azertyuiop', 'ab', false);"); +$dbh->exec("INSERT INTO gh10908 VALUES(1, 'ABC', 12.34, 1.0, 2.0, '2023-03-24 17:39', '2023-03-24', '17:39', 'abcdefg', 32767, 200000, 'azertyuiop', false);"); function query_and_dump($dbh, $sql) { foreach ($dbh->query($sql) as $row) { @@ -118,20 +115,14 @@ Array [7] => 17:39:00 [MYBLOB] => abcdefg [8] => abcdefg - [MYBINARY] => ab - [9] => ab - [MYVARBINARY] => a - [10] => a [MYSMALLINT] => 32767 - [11] => 32767 + [9] => 32767 [MYINT] => 200000 - [12] => 200000 + [10] => 200000 [MYCHAR] => azertyuiop - [13] => azertyuiop - [MYVARCHAR] => ab - [14] => ab + [11] => azertyuiop [MYBOOL] => - [15] => + [12] => ) Array From 7623bf0b06e191d8c9d98fae4f9e7a25e2ad1145 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 9 Mar 2023 23:28:11 +0000 Subject: [PATCH 730/895] ext/intl: breakiterator::setText returns false on failure. Close GH-10820 --- NEWS | 1 + UPGRADING | 4 +++- ext/intl/breakiterator/breakiterator.stub.php | 2 +- ext/intl/breakiterator/breakiterator_arginfo.h | 4 ++-- ext/intl/breakiterator/breakiterator_methods.cpp | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 1c365e0c0cb7e..9759ea828c14a 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,7 @@ PHP NEWS the Spoofchecker's class. (David Carlier) . Updated datefmt_set_timezone/IntlDateformatter::setTimezone returns type. (David Carlier). + . Updated IntlBreakInterator::setText return type. (David Carlier) - JSON: . Added json_validate(). (Juan Morales) diff --git a/UPGRADING b/UPGRADING index f594237e43430..ef117348d5d4d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -84,7 +84,9 @@ PHP 8.3 UPGRADE NOTES - Intl: . datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone) - now returns true on sucess, previously null was returned. + now returns true on success, previously null was returned. + . IntlBreakiterator::setText() now returns false on failure, previously + null was returned. - MBString: . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional diff --git a/ext/intl/breakiterator/breakiterator.stub.php b/ext/intl/breakiterator/breakiterator.stub.php index 2b1b79512b70d..bb35d3c5c7f8a 100644 --- a/ext/intl/breakiterator/breakiterator.stub.php +++ b/ext/intl/breakiterator/breakiterator.stub.php @@ -164,7 +164,7 @@ public function preceding(int $offset): int {} public function previous(): int {} /** @tentative-return-type */ - public function setText(string $text): ?bool {} // TODO return false instead of null in case of failure + public function setText(string $text): bool {} public function getIterator(): Iterator {} } diff --git a/ext/intl/breakiterator/breakiterator_arginfo.h b/ext/intl/breakiterator/breakiterator_arginfo.h index f63bfeb6a08b2..b9a72741a2789 100644 --- a/ext/intl/breakiterator/breakiterator_arginfo.h +++ b/ext/intl/breakiterator/breakiterator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 14c5fdc760bfed136f4fc5fd398e76b873d8a919 */ + * Stub hash: cbf308f532d4a28da8a9cde94b726faba9d8c7a4 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, IntlBreakIterator, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") @@ -58,7 +58,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlBreakIterator_previous arginfo_class_IntlBreakIterator_current -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlBreakIterator_setText, 0, 1, _IS_BOOL, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlBreakIterator_setText, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index 596438bef8533..bba9f4d610284 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -153,11 +153,11 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, setText) BREAKITER_METHOD_FETCH_OBJECT; ut = utext_openUTF8(ut, ZSTR_VAL(text), ZSTR_LEN(text), BREAKITER_ERROR_CODE_P(bio)); - INTL_METHOD_CHECK_STATUS_OR_NULL(bio, "breakiter_set_text: error opening UText"); + INTL_METHOD_CHECK_STATUS(bio, "breakiter_set_text: error opening UText"); bio->biter->setText(ut, BREAKITER_ERROR_CODE(bio)); utext_close(ut); /* ICU shallow clones the UText */ - INTL_METHOD_CHECK_STATUS_OR_NULL(bio, "breakiter_set_text: error calling " + INTL_METHOD_CHECK_STATUS(bio, "breakiter_set_text: error calling " "BreakIterator::setText()"); /* When ICU clones the UText, it does not copy the buffer, so we have to From 180f7854048f24c91973d45f0070142a98fb5782 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Tue, 28 Mar 2023 11:14:21 -0300 Subject: [PATCH 731/895] Note where a session was already started (#10736) * Note where a session was already started Duplicated session starts can be annoying to debug. The error that occurs when a session is already active doesn't tell you where it was initialized, so figuring out the callsite involves manual debugging to find it out. This keeps track of the call site of session_start as a request global, and frees at the end of the request. It should make it easier to find these instances for PHP users. The resulting message can look like: Notice: session_start(): Ignoring session_start() because a session is already active (started from /home/calvin/src/php-src/inc.php on line 4) in /home/calvin/src/php-src/index.php on line 9 Fixes GH-10721 * Convert to using zend_string for session start location * Fix leak with session start callsite filename If this was already initialized, we'd forget it. Have shared free between session_start and RSHUTDOWN. * For sessions that are automatically started, note that Easy to forget that you have this set, in which case, session start is done at RINIT outside of user code. Because this config option can't change at runtime, we can check for it and make the error more specific if that's the case. --- ext/session/php_session.h | 2 + ext/session/session.c | 40 ++++++++++++++++++- .../tests/session_start_variation1.phpt | 8 ++-- .../tests/session_start_variation9.phpt | 2 +- 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 8a52e61564eba..341aac5716ac2 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -154,6 +154,8 @@ typedef struct _php_ps_globals { const ps_module *default_mod; void *mod_data; php_session_status session_status; + zend_string *session_started_filename; + uint32_t session_started_lineno; zend_long gc_probability; zend_long gc_divisor; zend_long gc_maxlifetime; diff --git a/ext/session/session.c b/ext/session/session.c index 66fbe7adaa330..a2945b7a31c2b 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -121,6 +121,16 @@ static inline void php_rinit_session_globals(void) /* {{{ */ } /* }}} */ +static inline void php_session_cleanup_filename(void) /* {{{ */ +{ + if (PS(session_started_filename)) { + zend_string_release(PS(session_started_filename)); + PS(session_started_filename) = NULL; + PS(session_started_lineno) = 0; + } +} +/* }}} */ + /* Dispatched by RSHUTDOWN and by php_session_destroy */ static inline void php_rshutdown_session_globals(void) /* {{{ */ { @@ -149,6 +159,8 @@ static inline void php_rshutdown_session_globals(void) /* {{{ */ PS(mod_user_class_name) = NULL; } + php_session_cleanup_filename(); + /* User save handlers may end up directly here by misuse, bugs in user script, etc. */ /* Set session status to prevent error while restoring save handler INI value. */ PS(session_status) = php_session_none; @@ -465,6 +477,13 @@ static zend_result php_session_initialize(void) /* {{{ */ php_session_decode(val); zend_string_release_ex(val, 0); } + + php_session_cleanup_filename(); + zend_string *session_started_filename = zend_get_executed_filename_ex(); + if (session_started_filename != NULL) { + PS(session_started_filename) = zend_string_copy(session_started_filename); + PS(session_started_lineno) = zend_get_executed_lineno(); + } return SUCCESS; } /* }}} */ @@ -1490,7 +1509,14 @@ PHPAPI zend_result php_session_start(void) /* {{{ */ switch (PS(session_status)) { case php_session_active: - php_error(E_NOTICE, "Ignoring session_start() because a session has already been started"); + if (PS(session_started_filename)) { + php_error(E_NOTICE, "Ignoring session_start() because a session has already been started (started from %s on line %"PRIu32")", ZSTR_VAL(PS(session_started_filename)), PS(session_started_lineno)); + } else if (PS(auto_start)) { + /* This option can't be changed at runtime, so we can assume it's because of this */ + php_error(E_NOTICE, "Ignoring session_start() because a session has already been started automatically"); + } else { + php_error(E_NOTICE, "Ignoring session_start() because a session has already been started"); + } return FAILURE; break; @@ -1600,6 +1626,7 @@ PHPAPI zend_result php_session_start(void) /* {{{ */ } return FAILURE; } + return SUCCESS; } /* }}} */ @@ -2513,7 +2540,14 @@ PHP_FUNCTION(session_start) } if (PS(session_status) == php_session_active) { - php_error_docref(NULL, E_NOTICE, "Ignoring session_start() because a session is already active"); + if (PS(session_started_filename)) { + php_error_docref(NULL, E_NOTICE, "Ignoring session_start() because a session is already active (started from %s on line %"PRIu32")", ZSTR_VAL(PS(session_started_filename)), PS(session_started_lineno)); + } else if (PS(auto_start)) { + /* This option can't be changed at runtime, so we can assume it's because of this */ + php_error_docref(NULL, E_NOTICE, "Ignoring session_start() because a session is already automatically active"); + } else { + php_error_docref(NULL, E_NOTICE, "Ignoring session_start() because a session is already active"); + } RETURN_TRUE; } @@ -2846,6 +2880,8 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */ PS(module_number) = module_number; PS(session_status) = php_session_none; + PS(session_started_filename) = NULL; + PS(session_started_lineno) = 0; REGISTER_INI_ENTRIES(); #ifdef HAVE_LIBMM diff --git a/ext/session/tests/session_start_variation1.phpt b/ext/session/tests/session_start_variation1.phpt index 66520639de09e..0d6a866bf08f9 100644 --- a/ext/session/tests/session_start_variation1.phpt +++ b/ext/session/tests/session_start_variation1.phpt @@ -25,15 +25,15 @@ ob_end_flush(); *** Testing session_start() : variation *** bool(true) -Notice: session_start(): Ignoring session_start() because a session is already active in %s on line %d +Notice: session_start(): Ignoring session_start() because a session is already active (started from %s on line %d) in %s on line %d bool(true) -Notice: session_start(): Ignoring session_start() because a session is already active in %s on line %d +Notice: session_start(): Ignoring session_start() because a session is already active (started from %s on line %d) in %s on line %d bool(true) -Notice: session_start(): Ignoring session_start() because a session is already active in %s on line %d +Notice: session_start(): Ignoring session_start() because a session is already active (started from %s on line %d) in %s on line %d bool(true) -Notice: session_start(): Ignoring session_start() because a session is already active in %s on line %d +Notice: session_start(): Ignoring session_start() because a session is already active (started from %s on line %d) in %s on line %d bool(true) Done diff --git a/ext/session/tests/session_start_variation9.phpt b/ext/session/tests/session_start_variation9.phpt index e4c6e573810ed..3fdcdcffbb9ff 100644 --- a/ext/session/tests/session_start_variation9.phpt +++ b/ext/session/tests/session_start_variation9.phpt @@ -26,7 +26,7 @@ ob_end_flush(); *** Testing session_start() : variation *** string(%d) "%s" -Notice: session_start(): Ignoring session_start() because a session is already active in %s on line %d +Notice: session_start(): Ignoring session_start() because a session is already automatically active in %s on line %d bool(true) string(%d) "%s" bool(true) From f9cbeaa0338520f6c4a4b17555f558634b0dd955 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 26 Mar 2023 10:30:57 -0400 Subject: [PATCH 732/895] ext/imap/config.m4: -Werror=implicit-function-declaration compatibility. The recent clang-16 throws errors for implicitly defined functions by default. In many ./configure tests, an undefined function (which is "implicitly defined" when you try to call it) is undefined because it really does not exist. But in one case, utf8_to_mutf7() is undefined because we forgot to include the header that defines it. This commit updates the test for utf8_to_mutf7: * We now include the header (c-client.h) that defines it. * A "checking... yes/no" message was added to the test. * The test was switched from PHP_IMAP_TEST_BUILD to AC_COMPILE_IFELSE. This was the easiest way to avoid a return-type mismatch that runs afoul of -Werror=implicit-int. * CPPFLAGS is temporarily amended with the -I flag needed to find c-client.h. Fixes GH-10947. Closes GH-10948 Signed-off-by: George Peter Banyard --- NEWS | 3 +++ ext/imap/config.m4 | 38 +++++++++++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 730e0d5d087a6..262f77d143e2b 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,9 @@ PHP NEWS . Fixed bug GH-10521 (ftp_get/ftp_nb_get resumepos offset is maximum 10GB). (nielsdos) +- IMAP: + . Fix build failure with Clang 16. (orlitzky) + - MySQLnd: . Fixed bug GH-8979 (Possible Memory Leak with SSL-enabled MySQL connections). (nielsdos) diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 5086a312d093b..3c4782cd552fb 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -17,6 +17,18 @@ AC_DEFUN([IMAP_LIB_CHK],[ ]) dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok, extra-libs, extra-source) +dnl +dnl The UW-IMAP c-client library was not originally designed to be a +dnl shared library. The mm_foo functions are callbacks, and are required +dnl to be implemented by the program that is linking to c-client. This +dnl macro does the work of defining them all to no-ops for you. Note +dnl that PHP_TEST_BUILD is a link test; the undefined symbols will only +dnl cause problems if you actually try to link with c-client. For +dnl example, if your test is trivial enough to be optimized out, and if +dnl you link with --as-needed, the test/library may be omitted entirely +dnl from the final executable. In that case linking will of course +dnl succeed, but your luck won't necessarily apply at lower optimization +dnl levels or systems where --as-needed is not used. AC_DEFUN([PHP_IMAP_TEST_BUILD], [ PHP_TEST_BUILD([$1], [$2], [$3], [$4], [$5] [ @@ -229,15 +241,23 @@ if test "$PHP_IMAP" != "no"; then AC_DEFINE(HAVE_IMAP_AUTH_GSS, 1, [ ]) ], [], $TST_LIBS) - dnl Check if utf8_to_mutf7 exists. We need to do some gymnastics because - dnl utf8_to_mutf7 takes an argument and will segfault without it. We - dnl therefore test another function utf8_to_mutf7_php() which calls - dnl the utf8_to_mutf7() function with the empty string as an argument. - PHP_IMAP_TEST_BUILD(utf8_to_mutf7_php, [ - AC_DEFINE(HAVE_IMAP_MUTF7, 1, [ ]) - ], [], $TST_LIBS, [ - char utf8_to_mutf7_php(){ return utf8_to_mutf7(""); } - ]) + dnl Check if utf8_to_mutf7 exists. + old_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} -I${IMAP_INC_DIR}" + AC_LANG_PUSH(C) + AC_CACHE_CHECK(for utf8_to_mutf7, ac_cv_utf8_to_mutf7, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ + unsigned char c = '\0'; + utf8_to_mutf7(&c); + ]])],[ + AC_DEFINE(HAVE_IMAP_MUTF7, 1, [ ]) + ac_cv_utf8_to_mutf7=yes + ],[ + ac_cv_utf8_to_mutf7=no + ]) + ) + AC_LANG_POP + AC_MSG_CHECKING(whether rfc822_output_address_list function present) PHP_TEST_BUILD(foobar, [ From 2da299703ab54ec9c4ed62b784e7cd6ccb96a2e1 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Tue, 21 Mar 2023 20:40:53 +0000 Subject: [PATCH 733/895] ext/intl IntlChar::enumCharNames changes the signature to void. Close GH-10904 --- NEWS | 1 + UPGRADING | 3 +++ ext/intl/uchar/uchar.c | 3 ++- ext/intl/uchar/uchar.stub.php | 2 +- ext/intl/uchar/uchar_arginfo.h | 4 ++-- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9759ea828c14a..f0e2a91b81d35 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,7 @@ PHP NEWS . Updated datefmt_set_timezone/IntlDateformatter::setTimezone returns type. (David Carlier). . Updated IntlBreakInterator::setText return type. (David Carlier) + . Updated IntlChar::enumCharNames return type. (David Carlier) - JSON: . Added json_validate(). (Juan Morales) diff --git a/UPGRADING b/UPGRADING index ef117348d5d4d..8bd2a3d9d681d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -87,6 +87,9 @@ PHP 8.3 UPGRADE NOTES now returns true on success, previously null was returned. . IntlBreakiterator::setText() now returns false on failure, previously null was returned. + now returns true on sucess, previously null was returned. + . IntlChar::enumCharNames is now returning a boolean. + Previously it returned null on success and false on failure. - MBString: . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 771805925827f..c85bcb3fcffd4 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -309,11 +309,12 @@ IC_METHOD(enumCharNames) { ZEND_PARSE_PARAMETERS_END(); if (convert_cp(&start, string_start, int_start) == FAILURE || convert_cp(&limit, string_limit, int_limit) == FAILURE) { - RETURN_NULL(); + RETURN_FALSE; } u_enumCharNames(start, limit, (UEnumCharNamesFn*)enumCharNames_callback, &context, nameChoice, &error); INTL_CHECK_STATUS(error, NULL); + RETURN_TRUE; } /* }}} */ diff --git a/ext/intl/uchar/uchar.stub.php b/ext/intl/uchar/uchar.stub.php index d789684fc8f95..58e8434b2eed6 100644 --- a/ext/intl/uchar/uchar.stub.php +++ b/ext/intl/uchar/uchar.stub.php @@ -3411,7 +3411,7 @@ public static function chr(int|string $codepoint): ?string {} public static function digit(int|string $codepoint, int $base = 10): int|false|null {} /** @tentative-return-type */ - public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): ?bool {} // TODO return values just don't make sense + public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): bool {} /** @tentative-return-type */ public static function enumCharTypes(callable $callback): void {} diff --git a/ext/intl/uchar/uchar_arginfo.h b/ext/intl/uchar/uchar_arginfo.h index a052ae927cd0b..8b29463cf0ed6 100644 --- a/ext/intl/uchar/uchar_arginfo.h +++ b/ext/intl/uchar/uchar_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e8d6cf16660b6389922160f8a2c9c07ca2d58404 */ + * Stub hash: 59e9bd9f059c27835f78c5b95372731d265a228a */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 2, _IS_BOOL, 1) ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL) @@ -41,7 +41,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_IntlChar_digit, ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "10") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 3, _IS_BOOL, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_MASK(0, start, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, end, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) From 87862835e248ba4599d76513c86fdb0fb4b47514 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:56:17 +0100 Subject: [PATCH 734/895] Fix undefined behaviour in unpack() atoi()'s return value is actually undefined when an underflow or overflow occurs. For example on 32-bit on my system the overflow test which inputs "h2147483648" results in repetitions==2147483647 and on 64-bit this gives repetitions==-2147483648. The reason the test works on 32-bit is because there's a second undefined behaviour problem: in case 'h' when repetitions==2147483647, we add 1 and divide by 2. This is signed-wrap undefined behaviour and accidentally triggers the overflow check like we wanted to. Avoid all this trouble and use strtol with explicit error checking. This also fixes a semantic bug where repetitions==INT_MAX would result in the overflow check to trigger, even though there is no overflow. Closes GH-10943. --- NEWS | 1 + ext/standard/pack.c | 19 +++++++++++-------- ext/standard/tests/strings/gh10940.phpt | 9 +++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 ext/standard/tests/strings/gh10940.phpt diff --git a/NEWS b/NEWS index 262f77d143e2b..fb5882a513443 100644 --- a/NEWS +++ b/NEWS @@ -75,6 +75,7 @@ PHP NEWS (apache2)). (nielsdos) . Fixed oss-fuzz #57392 (Buffer-overflow in php_fgetcsv() with \0 delimiter and enclosure). (ilutov) + . Fixed undefined behaviour in unpack(). (nielsdos) 16 Mar 2023, PHP 8.1.17 diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 8736d291fb246..60a4a112f76c5 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -750,7 +750,16 @@ PHP_FUNCTION(unpack) c = *format; if (c >= '0' && c <= '9') { - repetitions = atoi(format); + errno = 0; + long tmp = strtol(format, NULL, 10); + /* There is not strtoi. We have to check the range ourselves. + * With 32-bit long the INT_{MIN,MAX} are useless because long == int, but with 64-bit they do limit us to 32-bit. */ + if (errno || tmp < INT_MIN || tmp > INT_MAX) { + php_error_docref(NULL, E_WARNING, "Type %c: integer overflow", type); + zend_array_destroy(Z_ARR_P(return_value)); + RETURN_FALSE; + } + repetitions = tmp; while (formatlen > 0 && *format >= '0' && *format <= '9') { format++; @@ -800,7 +809,7 @@ PHP_FUNCTION(unpack) case 'h': case 'H': - size = (repetitions > 0) ? (repetitions + (repetitions % 2)) / 2 : repetitions; + size = (repetitions > 0) ? ((unsigned int) repetitions + 1) / 2 : repetitions; repetitions = 1; break; @@ -865,12 +874,6 @@ PHP_FUNCTION(unpack) RETURN_THROWS(); } - if (size != 0 && size != -1 && size < 0) { - php_error_docref(NULL, E_WARNING, "Type %c: integer overflow", type); - zend_array_destroy(Z_ARR_P(return_value)); - RETURN_FALSE; - } - /* Do actual unpacking */ for (i = 0; i != repetitions; i++ ) { diff --git a/ext/standard/tests/strings/gh10940.phpt b/ext/standard/tests/strings/gh10940.phpt new file mode 100644 index 0000000000000..54ba8545f3866 --- /dev/null +++ b/ext/standard/tests/strings/gh10940.phpt @@ -0,0 +1,9 @@ +--TEST-- +Test unpacking at the 32-bit integer limit +--FILE-- + +--EXPECTF-- +Warning: unpack(): Type h: not enough input, need 1073741824, have 12 in %s on line %d From f7c692a940b07fcc25a831ad28f2e1ff2560fc6f Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 28 Mar 2023 17:27:17 -0400 Subject: [PATCH 735/895] PHP-8.2 is now for PHP 8.2.6-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 7587628e026cb..4cdf09ba407c9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.2.5 +?? ??? ????, PHP 8.2.6 + + +30 Mar 2023, PHP 8.2.5 - Core: . Added optional support for max_execution_time in ZTS/Linux builds diff --git a/Zend/zend.h b/Zend/zend.h index 379ee9c919f22..f5ea5dc911603 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.2.5-dev" +#define ZEND_VERSION "4.2.6-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index c7ad8e66aa28a..899ead28d3dbf 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.2.5-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.2.6-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 585a10d847e33..1ce7c926d8697 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 5 +#define PHP_RELEASE_VERSION 6 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.2.5-dev" -#define PHP_VERSION_ID 80205 +#define PHP_VERSION "8.2.6-dev" +#define PHP_VERSION_ID 80206 From bb7dd51f7a9b5ea96cbe703dc407dbca6e207d3b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 29 Mar 2023 10:06:00 +0100 Subject: [PATCH 736/895] Updated to version 2023.3 (2023c) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++-------------------- 1 file changed, 362 insertions(+), 390 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 89c62a6d4926d..94397084d7bb2 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024ACE }, - { (char*) "Asia/Brunei" , 0x024D44 }, - { (char*) "Asia/Calcutta" , 0x024DEA }, - { (char*) "Asia/Chita" , 0x024ED2 }, - { (char*) "Asia/Choibalsan" , 0x0251E0 }, - { (char*) "Asia/Chongqing" , 0x025469 }, - { (char*) "Asia/Chungking" , 0x0255FE }, - { (char*) "Asia/Colombo" , 0x025793 }, - { (char*) "Asia/Dacca" , 0x025896 }, - { (char*) "Asia/Damascus" , 0x025989 }, - { (char*) "Asia/Dhaka" , 0x025E67 }, - { (char*) "Asia/Dili" , 0x025F5A }, - { (char*) "Asia/Dubai" , 0x026010 }, - { (char*) "Asia/Dushanbe" , 0x0260A1 }, - { (char*) "Asia/Famagusta" , 0x02621B }, - { (char*) "Asia/Gaza" , 0x0265E2 }, - { (char*) "Asia/Harbin" , 0x026FCE }, - { (char*) "Asia/Hebron" , 0x027163 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, - { (char*) "Asia/Hong_Kong" , 0x027C58 }, - { (char*) "Asia/Hovd" , 0x027F6B }, - { (char*) "Asia/Irkutsk" , 0x0281F4 }, - { (char*) "Asia/Istanbul" , 0x028512 }, - { (char*) "Asia/Jakarta" , 0x0289CE }, - { (char*) "Asia/Jayapura" , 0x028ADF }, - { (char*) "Asia/Jerusalem" , 0x028BCC }, - { (char*) "Asia/Kabul" , 0x02900A }, - { (char*) "Asia/Kamchatka" , 0x0290B5 }, - { (char*) "Asia/Karachi" , 0x0293AA }, - { (char*) "Asia/Kashgar" , 0x0294C0 }, - { (char*) "Asia/Kathmandu" , 0x029551 }, - { (char*) "Asia/Katmandu" , 0x0295FE }, - { (char*) "Asia/Khandyga" , 0x0296AB }, - { (char*) "Asia/Kolkata" , 0x0299DC }, - { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, - { (char*) "Asia/Kuching" , 0x029EEE }, - { (char*) "Asia/Kuwait" , 0x02A048 }, - { (char*) "Asia/Macao" , 0x02A0D9 }, - { (char*) "Asia/Macau" , 0x02A3FC }, - { (char*) "Asia/Magadan" , 0x02A71F }, - { (char*) "Asia/Makassar" , 0x02AA2A }, - { (char*) "Asia/Manila" , 0x02AB3D }, - { (char*) "Asia/Muscat" , 0x02AC37 }, - { (char*) "Asia/Nicosia" , 0x02ACC8 }, - { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, - { (char*) "Asia/Novosibirsk" , 0x02B22A }, - { (char*) "Asia/Omsk" , 0x02B53B }, - { (char*) "Asia/Oral" , 0x02B839 }, - { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, - { (char*) "Asia/Pontianak" , 0x02BB99 }, - { (char*) "Asia/Pyongyang" , 0x02BCB2 }, - { (char*) "Asia/Qatar" , 0x02BD75 }, - { (char*) "Asia/Qostanay" , 0x02BE19 }, - { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, - { (char*) "Asia/Rangoon" , 0x02C33F }, - { (char*) "Asia/Riyadh" , 0x02C406 }, - { (char*) "Asia/Saigon" , 0x02C497 }, - { (char*) "Asia/Sakhalin" , 0x02C58F }, - { (char*) "Asia/Samarkand" , 0x02C8A6 }, - { (char*) "Asia/Seoul" , 0x02CA31 }, - { (char*) "Asia/Shanghai" , 0x02CBDC }, - { (char*) "Asia/Singapore" , 0x02CD7D }, - { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, - { (char*) "Asia/Taipei" , 0x02D199 }, - { (char*) "Asia/Tashkent" , 0x02D3A4 }, - { (char*) "Asia/Tbilisi" , 0x02D52F }, - { (char*) "Asia/Tehran" , 0x02D7B0 }, - { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, - { (char*) "Asia/Thimbu" , 0x02DF26 }, - { (char*) "Asia/Thimphu" , 0x02DFCC }, - { (char*) "Asia/Tokyo" , 0x02E072 }, - { (char*) "Asia/Tomsk" , 0x02E153 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, - { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, - { (char*) "Asia/Ulan_Bator" , 0x02E796 }, - { (char*) "Asia/Urumqi" , 0x02E9F4 }, - { (char*) "Asia/Ust-Nera" , 0x02EA92 }, - { (char*) "Asia/Vientiane" , 0x02EDB5 }, - { (char*) "Asia/Vladivostok" , 0x02EE9B }, - { (char*) "Asia/Yakutsk" , 0x02F1A0 }, - { (char*) "Asia/Yangon" , 0x02F4A4 }, - { (char*) "Asia/Yekaterinburg" , 0x02F56B }, - { (char*) "Asia/Yerevan" , 0x02F87D }, - { (char*) "Atlantic/Azores" , 0x02FB4D }, - { (char*) "Atlantic/Bermuda" , 0x03010C }, - { (char*) "Atlantic/Canary" , 0x030518 }, - { (char*) "Atlantic/Cape_Verde" , 0x030710 }, - { (char*) "Atlantic/Faeroe" , 0x0307CB }, - { (char*) "Atlantic/Faroe" , 0x030990 }, - { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, - { (char*) "Atlantic/Madeira" , 0x030E22 }, - { (char*) "Atlantic/Reykjavik" , 0x0313EA }, - { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, - { (char*) "Atlantic/St_Helena" , 0x031777 }, - { (char*) "Atlantic/Stanley" , 0x031818 }, - { (char*) "Australia/ACT" , 0x031B39 }, - { (char*) "Australia/Adelaide" , 0x031ECD }, - { (char*) "Australia/Brisbane" , 0x032281 }, - { (char*) "Australia/Broken_Hill" , 0x0323C5 }, - { (char*) "Australia/Canberra" , 0x03279A }, - { (char*) "Australia/Currie" , 0x032B2E }, - { (char*) "Australia/Darwin" , 0x032F25 }, - { (char*) "Australia/Eucla" , 0x03302D }, - { (char*) "Australia/Hobart" , 0x03318C }, - { (char*) "Australia/LHI" , 0x03358B }, - { (char*) "Australia/Lindeman" , 0x03384B }, - { (char*) "Australia/Lord_Howe" , 0x0339BB }, - { (char*) "Australia/Melbourne" , 0x033C8B }, - { (char*) "Australia/North" , 0x034027 }, - { (char*) "Australia/NSW" , 0x03411D }, - { (char*) "Australia/Perth" , 0x0344B1 }, - { (char*) "Australia/Queensland" , 0x03460D }, - { (char*) "Australia/South" , 0x03473A }, - { (char*) "Australia/Sydney" , 0x034ADF }, - { (char*) "Australia/Tasmania" , 0x034E8F }, - { (char*) "Australia/Victoria" , 0x035286 }, - { (char*) "Australia/West" , 0x03561A }, - { (char*) "Australia/Yancowinna" , 0x035758 }, - { (char*) "Brazil/Acre" , 0x035B11 }, - { (char*) "Brazil/DeNoronha" , 0x035CBF }, - { (char*) "Brazil/East" , 0x035EAF }, - { (char*) "Brazil/West" , 0x036273 }, - { (char*) "Canada/Atlantic" , 0x03641B }, - { (char*) "Canada/Central" , 0x036AAF }, - { (char*) "Canada/Eastern" , 0x036FC9 }, - { (char*) "Canada/Mountain" , 0x03768A }, - { (char*) "Canada/Newfoundland" , 0x037A60 }, - { (char*) "Canada/Pacific" , 0x0381C2 }, - { (char*) "Canada/Saskatchewan" , 0x038700 }, - { (char*) "Canada/Yukon" , 0x03898A }, - { (char*) "CET" , 0x038D9B }, - { (char*) "Chile/Continental" , 0x039014 }, - { (char*) "Chile/EasterIsland" , 0x03956A }, - { (char*) "CST6CDT" , 0x039A0C }, - { (char*) "Cuba" , 0x039DCF }, - { (char*) "EET" , 0x03A238 }, - { (char*) "Egypt" , 0x03A435 }, - { (char*) "Eire" , 0x03A95E }, - { (char*) "EST" , 0x03AF42 }, - { (char*) "EST5EDT" , 0x03AFBD }, - { (char*) "Etc/GMT" , 0x03B380 }, - { (char*) "Etc/GMT+0" , 0x03B3FB }, - { (char*) "Etc/GMT+1" , 0x03B476 }, - { (char*) "Etc/GMT+10" , 0x03B4F3 }, - { (char*) "Etc/GMT+11" , 0x03B571 }, - { (char*) "Etc/GMT+12" , 0x03B5EF }, - { (char*) "Etc/GMT+2" , 0x03B66D }, - { (char*) "Etc/GMT+3" , 0x03B6EA }, - { (char*) "Etc/GMT+4" , 0x03B767 }, - { (char*) "Etc/GMT+5" , 0x03B7E4 }, - { (char*) "Etc/GMT+6" , 0x03B861 }, - { (char*) "Etc/GMT+7" , 0x03B8DE }, - { (char*) "Etc/GMT+8" , 0x03B95B }, - { (char*) "Etc/GMT+9" , 0x03B9D8 }, - { (char*) "Etc/GMT-0" , 0x03BA55 }, - { (char*) "Etc/GMT-1" , 0x03BAD0 }, - { (char*) "Etc/GMT-10" , 0x03BB4E }, - { (char*) "Etc/GMT-11" , 0x03BBCD }, - { (char*) "Etc/GMT-12" , 0x03BC4C }, - { (char*) "Etc/GMT-13" , 0x03BCCB }, - { (char*) "Etc/GMT-14" , 0x03BD4A }, - { (char*) "Etc/GMT-2" , 0x03BDC9 }, - { (char*) "Etc/GMT-3" , 0x03BE47 }, - { (char*) "Etc/GMT-4" , 0x03BEC5 }, - { (char*) "Etc/GMT-5" , 0x03BF43 }, - { (char*) "Etc/GMT-6" , 0x03BFC1 }, - { (char*) "Etc/GMT-7" , 0x03C03F }, - { (char*) "Etc/GMT-8" , 0x03C0BD }, - { (char*) "Etc/GMT-9" , 0x03C13B }, - { (char*) "Etc/GMT0" , 0x03C1B9 }, - { (char*) "Etc/Greenwich" , 0x03C234 }, - { (char*) "Etc/UCT" , 0x03C2AF }, - { (char*) "Etc/Universal" , 0x03C32A }, - { (char*) "Etc/UTC" , 0x03C3A5 }, - { (char*) "Etc/Zulu" , 0x03C420 }, - { (char*) "Europe/Amsterdam" , 0x03C49B }, - { (char*) "Europe/Andorra" , 0x03C8D6 }, - { (char*) "Europe/Astrakhan" , 0x03CA67 }, - { (char*) "Europe/Athens" , 0x03CD5B }, - { (char*) "Europe/Belfast" , 0x03D011 }, - { (char*) "Europe/Belgrade" , 0x03D65C }, - { (char*) "Europe/Berlin" , 0x03D846 }, - { (char*) "Europe/Bratislava" , 0x03DB22 }, - { (char*) "Europe/Brussels" , 0x03DE01 }, - { (char*) "Europe/Bucharest" , 0x03E25C }, - { (char*) "Europe/Budapest" , 0x03E4FD }, - { (char*) "Europe/Busingen" , 0x03E807 }, - { (char*) "Europe/Chisinau" , 0x03EA0C }, - { (char*) "Europe/Copenhagen" , 0x03ED0B }, - { (char*) "Europe/Dublin" , 0x03EF86 }, - { (char*) "Europe/Gibraltar" , 0x03F56A }, - { (char*) "Europe/Guernsey" , 0x03FA3A }, - { (char*) "Europe/Helsinki" , 0x040091 }, - { (char*) "Europe/Isle_of_Man" , 0x04027E }, - { (char*) "Europe/Istanbul" , 0x0408C9 }, - { (char*) "Europe/Jersey" , 0x040D85 }, - { (char*) "Europe/Kaliningrad" , 0x0413DC }, - { (char*) "Europe/Kiev" , 0x041784 }, - { (char*) "Europe/Kirov" , 0x0419BE }, - { (char*) "Europe/Kyiv" , 0x041CB7 }, - { (char*) "Europe/Lisbon" , 0x041F00 }, - { (char*) "Europe/Ljubljana" , 0x0424CD }, - { (char*) "Europe/London" , 0x0426B7 }, - { (char*) "Europe/Luxembourg" , 0x042D02 }, - { (char*) "Europe/Madrid" , 0x04314D }, - { (char*) "Europe/Malta" , 0x0434EA }, - { (char*) "Europe/Mariehamn" , 0x043896 }, - { (char*) "Europe/Minsk" , 0x043A83 }, - { (char*) "Europe/Monaco" , 0x043DB7 }, - { (char*) "Europe/Moscow" , 0x04421D }, - { (char*) "Europe/Nicosia" , 0x0445C9 }, - { (char*) "Europe/Oslo" , 0x04482A }, - { (char*) "Europe/Paris" , 0x044ADA }, - { (char*) "Europe/Podgorica" , 0x044F37 }, - { (char*) "Europe/Prague" , 0x045121 }, - { (char*) "Europe/Riga" , 0x045400 }, - { (char*) "Europe/Rome" , 0x0456C2 }, - { (char*) "Europe/Samara" , 0x045A81 }, - { (char*) "Europe/San_Marino" , 0x045D82 }, - { (char*) "Europe/Sarajevo" , 0x046141 }, - { (char*) "Europe/Saratov" , 0x04632B }, - { (char*) "Europe/Simferopol" , 0x04661D }, - { (char*) "Europe/Skopje" , 0x046990 }, - { (char*) "Europe/Sofia" , 0x046B7A }, - { (char*) "Europe/Stockholm" , 0x046DD6 }, - { (char*) "Europe/Tallinn" , 0x046FD3 }, - { (char*) "Europe/Tirane" , 0x047282 }, - { (char*) "Europe/Tiraspol" , 0x0474EA }, - { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, - { (char*) "Europe/Uzhgorod" , 0x047AFF }, - { (char*) "Europe/Vaduz" , 0x047D39 }, - { (char*) "Europe/Vatican" , 0x047F23 }, - { (char*) "Europe/Vienna" , 0x0482E2 }, - { (char*) "Europe/Vilnius" , 0x048580 }, - { (char*) "Europe/Volgograd" , 0x048830 }, - { (char*) "Europe/Warsaw" , 0x048B3F }, - { (char*) "Europe/Zagreb" , 0x048EE6 }, - { (char*) "Europe/Zaporozhye" , 0x0490D0 }, - { (char*) "Europe/Zurich" , 0x04930A }, - { (char*) "Factory" , 0x049507 }, - { (char*) "GB" , 0x049584 }, - { (char*) "GB-Eire" , 0x049BCF }, - { (char*) "GMT" , 0x04A21A }, - { (char*) "GMT+0" , 0x04A295 }, - { (char*) "GMT-0" , 0x04A310 }, - { (char*) "GMT0" , 0x04A38B }, - { (char*) "Greenwich" , 0x04A406 }, - { (char*) "Hongkong" , 0x04A481 }, - { (char*) "HST" , 0x04A794 }, - { (char*) "Iceland" , 0x04A810 }, - { (char*) "Indian/Antananarivo" , 0x04A89E }, - { (char*) "Indian/Chagos" , 0x04A94A }, - { (char*) "Indian/Christmas" , 0x04A9EE }, - { (char*) "Indian/Cocos" , 0x04AA7F }, - { (char*) "Indian/Comoro" , 0x04AB17 }, - { (char*) "Indian/Kerguelen" , 0x04ABA6 }, - { (char*) "Indian/Mahe" , 0x04AC37 }, - { (char*) "Indian/Maldives" , 0x04ACC8 }, - { (char*) "Indian/Mauritius" , 0x04AD6C }, - { (char*) "Indian/Mayotte" , 0x04AE2B }, - { (char*) "Indian/Reunion" , 0x04AEBA }, - { (char*) "Iran" , 0x04AF4B }, - { (char*) "Israel" , 0x04B283 }, - { (char*) "Jamaica" , 0x04B6C1 }, - { (char*) "Japan" , 0x04B820 }, - { (char*) "Kwajalein" , 0x04B901 }, - { (char*) "Libya" , 0x04B9E8 }, - { (char*) "MET" , 0x04BBA3 }, - { (char*) "Mexico/BajaNorte" , 0x04BE1C }, - { (char*) "Mexico/BajaSur" , 0x04C229 }, - { (char*) "Mexico/General" , 0x04C503 }, - { (char*) "MST" , 0x04C814 }, - { (char*) "MST7MDT" , 0x04C88F }, - { (char*) "Navajo" , 0x04CC52 }, - { (char*) "NZ" , 0x04D070 }, - { (char*) "NZ-CHAT" , 0x04D48F }, - { (char*) "Pacific/Apia" , 0x04D7C3 }, - { (char*) "Pacific/Auckland" , 0x04D966 }, - { (char*) "Pacific/Bougainville" , 0x04DD98 }, - { (char*) "Pacific/Chatham" , 0x04DE79 }, - { (char*) "Pacific/Chuuk" , 0x04E1BC }, - { (char*) "Pacific/Easter" , 0x04E29A }, - { (char*) "Pacific/Efate" , 0x04E749 }, - { (char*) "Pacific/Enderbury" , 0x04E8AB }, - { (char*) "Pacific/Fakaofo" , 0x04E963 }, - { (char*) "Pacific/Fiji" , 0x04EA08 }, - { (char*) "Pacific/Funafuti" , 0x04EBA0 }, - { (char*) "Pacific/Galapagos" , 0x04EC32 }, - { (char*) "Pacific/Gambier" , 0x04ECFE }, - { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, - { (char*) "Pacific/Guam" , 0x04EE2F }, - { (char*) "Pacific/Honolulu" , 0x04EF99 }, - { (char*) "Pacific/Johnston" , 0x04F088 }, - { (char*) "Pacific/Kanton" , 0x04F171 }, - { (char*) "Pacific/Kiritimati" , 0x04F238 }, - { (char*) "Pacific/Kosrae" , 0x04F2FE }, - { (char*) "Pacific/Kwajalein" , 0x04F402 }, - { (char*) "Pacific/Majuro" , 0x04F4F2 }, - { (char*) "Pacific/Marquesas" , 0x04F5F0 }, - { (char*) "Pacific/Midway" , 0x04F698 }, - { (char*) "Pacific/Nauru" , 0x04F75B }, - { (char*) "Pacific/Niue" , 0x04F81E }, - { (char*) "Pacific/Norfolk" , 0x04F8C4 }, - { (char*) "Pacific/Noumea" , 0x04F9C7 }, - { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, - { (char*) "Pacific/Palau" , 0x04FB37 }, - { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, - { (char*) "Pacific/Pohnpei" , 0x04FC7C }, - { (char*) "Pacific/Ponape" , 0x04FD6C }, - { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, - { (char*) "Pacific/Rarotonga" , 0x04FEBC }, - { (char*) "Pacific/Saipan" , 0x05005E }, - { (char*) "Pacific/Samoa" , 0x0501BF }, - { (char*) "Pacific/Tahiti" , 0x05025D }, - { (char*) "Pacific/Tarawa" , 0x0502FD }, - { (char*) "Pacific/Tongatapu" , 0x05039E }, - { (char*) "Pacific/Truk" , 0x050497 }, - { (char*) "Pacific/Wake" , 0x05053D }, - { (char*) "Pacific/Wallis" , 0x0505DA }, - { (char*) "Pacific/Yap" , 0x05066C }, - { (char*) "Poland" , 0x050712 }, - { (char*) "Portugal" , 0x050AB9 }, - { (char*) "PRC" , 0x051073 }, - { (char*) "PST8PDT" , 0x051208 }, - { (char*) "ROC" , 0x0515CB }, - { (char*) "ROK" , 0x0517D6 }, - { (char*) "Singapore" , 0x051981 }, - { (char*) "Turkey" , 0x051A8D }, - { (char*) "UCT" , 0x051F49 }, - { (char*) "Universal" , 0x051FC4 }, - { (char*) "US/Alaska" , 0x05203F }, - { (char*) "US/Aleutian" , 0x05241C }, - { (char*) "US/Arizona" , 0x0527F1 }, - { (char*) "US/Central" , 0x0528ED }, - { (char*) "US/East-Indiana" , 0x052FD3 }, - { (char*) "US/Eastern" , 0x0531F2 }, - { (char*) "US/Hawaii" , 0x0538CE }, - { (char*) "US/Indiana-Starke" , 0x0539B7 }, - { (char*) "US/Michigan" , 0x053DBB }, - { (char*) "US/Mountain" , 0x05414A }, - { (char*) "US/Pacific" , 0x054568 }, - { (char*) "US/Samoa" , 0x054A82 }, - { (char*) "UTC" , 0x054B20 }, - { (char*) "W-SU" , 0x054B9B }, - { (char*) "WET" , 0x054F33 }, - { (char*) "Zulu" , 0x05512D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[348584] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,44 +10589,16 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, -0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, -0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, -0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, -0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, -0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, -0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, -0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, -0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, -0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, -0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, -0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, -0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, -0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, -0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, +0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42868,7 +42840,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42945,7 +42917,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -70027,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.3", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 3ec02202fd88a81c7e222a4bffec23ea7547e275 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 29 Mar 2023 10:06:01 +0100 Subject: [PATCH 737/895] Updated to version 2023.3 (2023c) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++-------------------- 1 file changed, 362 insertions(+), 390 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 89c62a6d4926d..94397084d7bb2 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024ACE }, - { (char*) "Asia/Brunei" , 0x024D44 }, - { (char*) "Asia/Calcutta" , 0x024DEA }, - { (char*) "Asia/Chita" , 0x024ED2 }, - { (char*) "Asia/Choibalsan" , 0x0251E0 }, - { (char*) "Asia/Chongqing" , 0x025469 }, - { (char*) "Asia/Chungking" , 0x0255FE }, - { (char*) "Asia/Colombo" , 0x025793 }, - { (char*) "Asia/Dacca" , 0x025896 }, - { (char*) "Asia/Damascus" , 0x025989 }, - { (char*) "Asia/Dhaka" , 0x025E67 }, - { (char*) "Asia/Dili" , 0x025F5A }, - { (char*) "Asia/Dubai" , 0x026010 }, - { (char*) "Asia/Dushanbe" , 0x0260A1 }, - { (char*) "Asia/Famagusta" , 0x02621B }, - { (char*) "Asia/Gaza" , 0x0265E2 }, - { (char*) "Asia/Harbin" , 0x026FCE }, - { (char*) "Asia/Hebron" , 0x027163 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, - { (char*) "Asia/Hong_Kong" , 0x027C58 }, - { (char*) "Asia/Hovd" , 0x027F6B }, - { (char*) "Asia/Irkutsk" , 0x0281F4 }, - { (char*) "Asia/Istanbul" , 0x028512 }, - { (char*) "Asia/Jakarta" , 0x0289CE }, - { (char*) "Asia/Jayapura" , 0x028ADF }, - { (char*) "Asia/Jerusalem" , 0x028BCC }, - { (char*) "Asia/Kabul" , 0x02900A }, - { (char*) "Asia/Kamchatka" , 0x0290B5 }, - { (char*) "Asia/Karachi" , 0x0293AA }, - { (char*) "Asia/Kashgar" , 0x0294C0 }, - { (char*) "Asia/Kathmandu" , 0x029551 }, - { (char*) "Asia/Katmandu" , 0x0295FE }, - { (char*) "Asia/Khandyga" , 0x0296AB }, - { (char*) "Asia/Kolkata" , 0x0299DC }, - { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, - { (char*) "Asia/Kuching" , 0x029EEE }, - { (char*) "Asia/Kuwait" , 0x02A048 }, - { (char*) "Asia/Macao" , 0x02A0D9 }, - { (char*) "Asia/Macau" , 0x02A3FC }, - { (char*) "Asia/Magadan" , 0x02A71F }, - { (char*) "Asia/Makassar" , 0x02AA2A }, - { (char*) "Asia/Manila" , 0x02AB3D }, - { (char*) "Asia/Muscat" , 0x02AC37 }, - { (char*) "Asia/Nicosia" , 0x02ACC8 }, - { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, - { (char*) "Asia/Novosibirsk" , 0x02B22A }, - { (char*) "Asia/Omsk" , 0x02B53B }, - { (char*) "Asia/Oral" , 0x02B839 }, - { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, - { (char*) "Asia/Pontianak" , 0x02BB99 }, - { (char*) "Asia/Pyongyang" , 0x02BCB2 }, - { (char*) "Asia/Qatar" , 0x02BD75 }, - { (char*) "Asia/Qostanay" , 0x02BE19 }, - { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, - { (char*) "Asia/Rangoon" , 0x02C33F }, - { (char*) "Asia/Riyadh" , 0x02C406 }, - { (char*) "Asia/Saigon" , 0x02C497 }, - { (char*) "Asia/Sakhalin" , 0x02C58F }, - { (char*) "Asia/Samarkand" , 0x02C8A6 }, - { (char*) "Asia/Seoul" , 0x02CA31 }, - { (char*) "Asia/Shanghai" , 0x02CBDC }, - { (char*) "Asia/Singapore" , 0x02CD7D }, - { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, - { (char*) "Asia/Taipei" , 0x02D199 }, - { (char*) "Asia/Tashkent" , 0x02D3A4 }, - { (char*) "Asia/Tbilisi" , 0x02D52F }, - { (char*) "Asia/Tehran" , 0x02D7B0 }, - { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, - { (char*) "Asia/Thimbu" , 0x02DF26 }, - { (char*) "Asia/Thimphu" , 0x02DFCC }, - { (char*) "Asia/Tokyo" , 0x02E072 }, - { (char*) "Asia/Tomsk" , 0x02E153 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, - { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, - { (char*) "Asia/Ulan_Bator" , 0x02E796 }, - { (char*) "Asia/Urumqi" , 0x02E9F4 }, - { (char*) "Asia/Ust-Nera" , 0x02EA92 }, - { (char*) "Asia/Vientiane" , 0x02EDB5 }, - { (char*) "Asia/Vladivostok" , 0x02EE9B }, - { (char*) "Asia/Yakutsk" , 0x02F1A0 }, - { (char*) "Asia/Yangon" , 0x02F4A4 }, - { (char*) "Asia/Yekaterinburg" , 0x02F56B }, - { (char*) "Asia/Yerevan" , 0x02F87D }, - { (char*) "Atlantic/Azores" , 0x02FB4D }, - { (char*) "Atlantic/Bermuda" , 0x03010C }, - { (char*) "Atlantic/Canary" , 0x030518 }, - { (char*) "Atlantic/Cape_Verde" , 0x030710 }, - { (char*) "Atlantic/Faeroe" , 0x0307CB }, - { (char*) "Atlantic/Faroe" , 0x030990 }, - { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, - { (char*) "Atlantic/Madeira" , 0x030E22 }, - { (char*) "Atlantic/Reykjavik" , 0x0313EA }, - { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, - { (char*) "Atlantic/St_Helena" , 0x031777 }, - { (char*) "Atlantic/Stanley" , 0x031818 }, - { (char*) "Australia/ACT" , 0x031B39 }, - { (char*) "Australia/Adelaide" , 0x031ECD }, - { (char*) "Australia/Brisbane" , 0x032281 }, - { (char*) "Australia/Broken_Hill" , 0x0323C5 }, - { (char*) "Australia/Canberra" , 0x03279A }, - { (char*) "Australia/Currie" , 0x032B2E }, - { (char*) "Australia/Darwin" , 0x032F25 }, - { (char*) "Australia/Eucla" , 0x03302D }, - { (char*) "Australia/Hobart" , 0x03318C }, - { (char*) "Australia/LHI" , 0x03358B }, - { (char*) "Australia/Lindeman" , 0x03384B }, - { (char*) "Australia/Lord_Howe" , 0x0339BB }, - { (char*) "Australia/Melbourne" , 0x033C8B }, - { (char*) "Australia/North" , 0x034027 }, - { (char*) "Australia/NSW" , 0x03411D }, - { (char*) "Australia/Perth" , 0x0344B1 }, - { (char*) "Australia/Queensland" , 0x03460D }, - { (char*) "Australia/South" , 0x03473A }, - { (char*) "Australia/Sydney" , 0x034ADF }, - { (char*) "Australia/Tasmania" , 0x034E8F }, - { (char*) "Australia/Victoria" , 0x035286 }, - { (char*) "Australia/West" , 0x03561A }, - { (char*) "Australia/Yancowinna" , 0x035758 }, - { (char*) "Brazil/Acre" , 0x035B11 }, - { (char*) "Brazil/DeNoronha" , 0x035CBF }, - { (char*) "Brazil/East" , 0x035EAF }, - { (char*) "Brazil/West" , 0x036273 }, - { (char*) "Canada/Atlantic" , 0x03641B }, - { (char*) "Canada/Central" , 0x036AAF }, - { (char*) "Canada/Eastern" , 0x036FC9 }, - { (char*) "Canada/Mountain" , 0x03768A }, - { (char*) "Canada/Newfoundland" , 0x037A60 }, - { (char*) "Canada/Pacific" , 0x0381C2 }, - { (char*) "Canada/Saskatchewan" , 0x038700 }, - { (char*) "Canada/Yukon" , 0x03898A }, - { (char*) "CET" , 0x038D9B }, - { (char*) "Chile/Continental" , 0x039014 }, - { (char*) "Chile/EasterIsland" , 0x03956A }, - { (char*) "CST6CDT" , 0x039A0C }, - { (char*) "Cuba" , 0x039DCF }, - { (char*) "EET" , 0x03A238 }, - { (char*) "Egypt" , 0x03A435 }, - { (char*) "Eire" , 0x03A95E }, - { (char*) "EST" , 0x03AF42 }, - { (char*) "EST5EDT" , 0x03AFBD }, - { (char*) "Etc/GMT" , 0x03B380 }, - { (char*) "Etc/GMT+0" , 0x03B3FB }, - { (char*) "Etc/GMT+1" , 0x03B476 }, - { (char*) "Etc/GMT+10" , 0x03B4F3 }, - { (char*) "Etc/GMT+11" , 0x03B571 }, - { (char*) "Etc/GMT+12" , 0x03B5EF }, - { (char*) "Etc/GMT+2" , 0x03B66D }, - { (char*) "Etc/GMT+3" , 0x03B6EA }, - { (char*) "Etc/GMT+4" , 0x03B767 }, - { (char*) "Etc/GMT+5" , 0x03B7E4 }, - { (char*) "Etc/GMT+6" , 0x03B861 }, - { (char*) "Etc/GMT+7" , 0x03B8DE }, - { (char*) "Etc/GMT+8" , 0x03B95B }, - { (char*) "Etc/GMT+9" , 0x03B9D8 }, - { (char*) "Etc/GMT-0" , 0x03BA55 }, - { (char*) "Etc/GMT-1" , 0x03BAD0 }, - { (char*) "Etc/GMT-10" , 0x03BB4E }, - { (char*) "Etc/GMT-11" , 0x03BBCD }, - { (char*) "Etc/GMT-12" , 0x03BC4C }, - { (char*) "Etc/GMT-13" , 0x03BCCB }, - { (char*) "Etc/GMT-14" , 0x03BD4A }, - { (char*) "Etc/GMT-2" , 0x03BDC9 }, - { (char*) "Etc/GMT-3" , 0x03BE47 }, - { (char*) "Etc/GMT-4" , 0x03BEC5 }, - { (char*) "Etc/GMT-5" , 0x03BF43 }, - { (char*) "Etc/GMT-6" , 0x03BFC1 }, - { (char*) "Etc/GMT-7" , 0x03C03F }, - { (char*) "Etc/GMT-8" , 0x03C0BD }, - { (char*) "Etc/GMT-9" , 0x03C13B }, - { (char*) "Etc/GMT0" , 0x03C1B9 }, - { (char*) "Etc/Greenwich" , 0x03C234 }, - { (char*) "Etc/UCT" , 0x03C2AF }, - { (char*) "Etc/Universal" , 0x03C32A }, - { (char*) "Etc/UTC" , 0x03C3A5 }, - { (char*) "Etc/Zulu" , 0x03C420 }, - { (char*) "Europe/Amsterdam" , 0x03C49B }, - { (char*) "Europe/Andorra" , 0x03C8D6 }, - { (char*) "Europe/Astrakhan" , 0x03CA67 }, - { (char*) "Europe/Athens" , 0x03CD5B }, - { (char*) "Europe/Belfast" , 0x03D011 }, - { (char*) "Europe/Belgrade" , 0x03D65C }, - { (char*) "Europe/Berlin" , 0x03D846 }, - { (char*) "Europe/Bratislava" , 0x03DB22 }, - { (char*) "Europe/Brussels" , 0x03DE01 }, - { (char*) "Europe/Bucharest" , 0x03E25C }, - { (char*) "Europe/Budapest" , 0x03E4FD }, - { (char*) "Europe/Busingen" , 0x03E807 }, - { (char*) "Europe/Chisinau" , 0x03EA0C }, - { (char*) "Europe/Copenhagen" , 0x03ED0B }, - { (char*) "Europe/Dublin" , 0x03EF86 }, - { (char*) "Europe/Gibraltar" , 0x03F56A }, - { (char*) "Europe/Guernsey" , 0x03FA3A }, - { (char*) "Europe/Helsinki" , 0x040091 }, - { (char*) "Europe/Isle_of_Man" , 0x04027E }, - { (char*) "Europe/Istanbul" , 0x0408C9 }, - { (char*) "Europe/Jersey" , 0x040D85 }, - { (char*) "Europe/Kaliningrad" , 0x0413DC }, - { (char*) "Europe/Kiev" , 0x041784 }, - { (char*) "Europe/Kirov" , 0x0419BE }, - { (char*) "Europe/Kyiv" , 0x041CB7 }, - { (char*) "Europe/Lisbon" , 0x041F00 }, - { (char*) "Europe/Ljubljana" , 0x0424CD }, - { (char*) "Europe/London" , 0x0426B7 }, - { (char*) "Europe/Luxembourg" , 0x042D02 }, - { (char*) "Europe/Madrid" , 0x04314D }, - { (char*) "Europe/Malta" , 0x0434EA }, - { (char*) "Europe/Mariehamn" , 0x043896 }, - { (char*) "Europe/Minsk" , 0x043A83 }, - { (char*) "Europe/Monaco" , 0x043DB7 }, - { (char*) "Europe/Moscow" , 0x04421D }, - { (char*) "Europe/Nicosia" , 0x0445C9 }, - { (char*) "Europe/Oslo" , 0x04482A }, - { (char*) "Europe/Paris" , 0x044ADA }, - { (char*) "Europe/Podgorica" , 0x044F37 }, - { (char*) "Europe/Prague" , 0x045121 }, - { (char*) "Europe/Riga" , 0x045400 }, - { (char*) "Europe/Rome" , 0x0456C2 }, - { (char*) "Europe/Samara" , 0x045A81 }, - { (char*) "Europe/San_Marino" , 0x045D82 }, - { (char*) "Europe/Sarajevo" , 0x046141 }, - { (char*) "Europe/Saratov" , 0x04632B }, - { (char*) "Europe/Simferopol" , 0x04661D }, - { (char*) "Europe/Skopje" , 0x046990 }, - { (char*) "Europe/Sofia" , 0x046B7A }, - { (char*) "Europe/Stockholm" , 0x046DD6 }, - { (char*) "Europe/Tallinn" , 0x046FD3 }, - { (char*) "Europe/Tirane" , 0x047282 }, - { (char*) "Europe/Tiraspol" , 0x0474EA }, - { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, - { (char*) "Europe/Uzhgorod" , 0x047AFF }, - { (char*) "Europe/Vaduz" , 0x047D39 }, - { (char*) "Europe/Vatican" , 0x047F23 }, - { (char*) "Europe/Vienna" , 0x0482E2 }, - { (char*) "Europe/Vilnius" , 0x048580 }, - { (char*) "Europe/Volgograd" , 0x048830 }, - { (char*) "Europe/Warsaw" , 0x048B3F }, - { (char*) "Europe/Zagreb" , 0x048EE6 }, - { (char*) "Europe/Zaporozhye" , 0x0490D0 }, - { (char*) "Europe/Zurich" , 0x04930A }, - { (char*) "Factory" , 0x049507 }, - { (char*) "GB" , 0x049584 }, - { (char*) "GB-Eire" , 0x049BCF }, - { (char*) "GMT" , 0x04A21A }, - { (char*) "GMT+0" , 0x04A295 }, - { (char*) "GMT-0" , 0x04A310 }, - { (char*) "GMT0" , 0x04A38B }, - { (char*) "Greenwich" , 0x04A406 }, - { (char*) "Hongkong" , 0x04A481 }, - { (char*) "HST" , 0x04A794 }, - { (char*) "Iceland" , 0x04A810 }, - { (char*) "Indian/Antananarivo" , 0x04A89E }, - { (char*) "Indian/Chagos" , 0x04A94A }, - { (char*) "Indian/Christmas" , 0x04A9EE }, - { (char*) "Indian/Cocos" , 0x04AA7F }, - { (char*) "Indian/Comoro" , 0x04AB17 }, - { (char*) "Indian/Kerguelen" , 0x04ABA6 }, - { (char*) "Indian/Mahe" , 0x04AC37 }, - { (char*) "Indian/Maldives" , 0x04ACC8 }, - { (char*) "Indian/Mauritius" , 0x04AD6C }, - { (char*) "Indian/Mayotte" , 0x04AE2B }, - { (char*) "Indian/Reunion" , 0x04AEBA }, - { (char*) "Iran" , 0x04AF4B }, - { (char*) "Israel" , 0x04B283 }, - { (char*) "Jamaica" , 0x04B6C1 }, - { (char*) "Japan" , 0x04B820 }, - { (char*) "Kwajalein" , 0x04B901 }, - { (char*) "Libya" , 0x04B9E8 }, - { (char*) "MET" , 0x04BBA3 }, - { (char*) "Mexico/BajaNorte" , 0x04BE1C }, - { (char*) "Mexico/BajaSur" , 0x04C229 }, - { (char*) "Mexico/General" , 0x04C503 }, - { (char*) "MST" , 0x04C814 }, - { (char*) "MST7MDT" , 0x04C88F }, - { (char*) "Navajo" , 0x04CC52 }, - { (char*) "NZ" , 0x04D070 }, - { (char*) "NZ-CHAT" , 0x04D48F }, - { (char*) "Pacific/Apia" , 0x04D7C3 }, - { (char*) "Pacific/Auckland" , 0x04D966 }, - { (char*) "Pacific/Bougainville" , 0x04DD98 }, - { (char*) "Pacific/Chatham" , 0x04DE79 }, - { (char*) "Pacific/Chuuk" , 0x04E1BC }, - { (char*) "Pacific/Easter" , 0x04E29A }, - { (char*) "Pacific/Efate" , 0x04E749 }, - { (char*) "Pacific/Enderbury" , 0x04E8AB }, - { (char*) "Pacific/Fakaofo" , 0x04E963 }, - { (char*) "Pacific/Fiji" , 0x04EA08 }, - { (char*) "Pacific/Funafuti" , 0x04EBA0 }, - { (char*) "Pacific/Galapagos" , 0x04EC32 }, - { (char*) "Pacific/Gambier" , 0x04ECFE }, - { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, - { (char*) "Pacific/Guam" , 0x04EE2F }, - { (char*) "Pacific/Honolulu" , 0x04EF99 }, - { (char*) "Pacific/Johnston" , 0x04F088 }, - { (char*) "Pacific/Kanton" , 0x04F171 }, - { (char*) "Pacific/Kiritimati" , 0x04F238 }, - { (char*) "Pacific/Kosrae" , 0x04F2FE }, - { (char*) "Pacific/Kwajalein" , 0x04F402 }, - { (char*) "Pacific/Majuro" , 0x04F4F2 }, - { (char*) "Pacific/Marquesas" , 0x04F5F0 }, - { (char*) "Pacific/Midway" , 0x04F698 }, - { (char*) "Pacific/Nauru" , 0x04F75B }, - { (char*) "Pacific/Niue" , 0x04F81E }, - { (char*) "Pacific/Norfolk" , 0x04F8C4 }, - { (char*) "Pacific/Noumea" , 0x04F9C7 }, - { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, - { (char*) "Pacific/Palau" , 0x04FB37 }, - { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, - { (char*) "Pacific/Pohnpei" , 0x04FC7C }, - { (char*) "Pacific/Ponape" , 0x04FD6C }, - { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, - { (char*) "Pacific/Rarotonga" , 0x04FEBC }, - { (char*) "Pacific/Saipan" , 0x05005E }, - { (char*) "Pacific/Samoa" , 0x0501BF }, - { (char*) "Pacific/Tahiti" , 0x05025D }, - { (char*) "Pacific/Tarawa" , 0x0502FD }, - { (char*) "Pacific/Tongatapu" , 0x05039E }, - { (char*) "Pacific/Truk" , 0x050497 }, - { (char*) "Pacific/Wake" , 0x05053D }, - { (char*) "Pacific/Wallis" , 0x0505DA }, - { (char*) "Pacific/Yap" , 0x05066C }, - { (char*) "Poland" , 0x050712 }, - { (char*) "Portugal" , 0x050AB9 }, - { (char*) "PRC" , 0x051073 }, - { (char*) "PST8PDT" , 0x051208 }, - { (char*) "ROC" , 0x0515CB }, - { (char*) "ROK" , 0x0517D6 }, - { (char*) "Singapore" , 0x051981 }, - { (char*) "Turkey" , 0x051A8D }, - { (char*) "UCT" , 0x051F49 }, - { (char*) "Universal" , 0x051FC4 }, - { (char*) "US/Alaska" , 0x05203F }, - { (char*) "US/Aleutian" , 0x05241C }, - { (char*) "US/Arizona" , 0x0527F1 }, - { (char*) "US/Central" , 0x0528ED }, - { (char*) "US/East-Indiana" , 0x052FD3 }, - { (char*) "US/Eastern" , 0x0531F2 }, - { (char*) "US/Hawaii" , 0x0538CE }, - { (char*) "US/Indiana-Starke" , 0x0539B7 }, - { (char*) "US/Michigan" , 0x053DBB }, - { (char*) "US/Mountain" , 0x05414A }, - { (char*) "US/Pacific" , 0x054568 }, - { (char*) "US/Samoa" , 0x054A82 }, - { (char*) "UTC" , 0x054B20 }, - { (char*) "W-SU" , 0x054B9B }, - { (char*) "WET" , 0x054F33 }, - { (char*) "Zulu" , 0x05512D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[348584] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,44 +10589,16 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, -0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, -0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, -0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, -0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, -0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, -0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, -0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, -0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, -0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, -0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, -0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, -0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, -0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, -0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, +0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42868,7 +42840,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42945,7 +42917,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -70027,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.3", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 2f309dee8ed452804ac98827680146abfb5d6ad6 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 29 Mar 2023 10:06:02 +0100 Subject: [PATCH 738/895] Updated to version 2023.3 (2023c) --- ext/date/lib/timezonedb.h | 752 ++++++++++++++++++-------------------- 1 file changed, 362 insertions(+), 390 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 89c62a6d4926d..94397084d7bb2 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -255,357 +255,357 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "Asia/Bangkok" , 0x02427E }, { (char*) "Asia/Barnaul" , 0x024322 }, { (char*) "Asia/Beirut" , 0x02462D }, - { (char*) "Asia/Bishkek" , 0x024ACE }, - { (char*) "Asia/Brunei" , 0x024D44 }, - { (char*) "Asia/Calcutta" , 0x024DEA }, - { (char*) "Asia/Chita" , 0x024ED2 }, - { (char*) "Asia/Choibalsan" , 0x0251E0 }, - { (char*) "Asia/Chongqing" , 0x025469 }, - { (char*) "Asia/Chungking" , 0x0255FE }, - { (char*) "Asia/Colombo" , 0x025793 }, - { (char*) "Asia/Dacca" , 0x025896 }, - { (char*) "Asia/Damascus" , 0x025989 }, - { (char*) "Asia/Dhaka" , 0x025E67 }, - { (char*) "Asia/Dili" , 0x025F5A }, - { (char*) "Asia/Dubai" , 0x026010 }, - { (char*) "Asia/Dushanbe" , 0x0260A1 }, - { (char*) "Asia/Famagusta" , 0x02621B }, - { (char*) "Asia/Gaza" , 0x0265E2 }, - { (char*) "Asia/Harbin" , 0x026FCE }, - { (char*) "Asia/Hebron" , 0x027163 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x027B60 }, - { (char*) "Asia/Hong_Kong" , 0x027C58 }, - { (char*) "Asia/Hovd" , 0x027F6B }, - { (char*) "Asia/Irkutsk" , 0x0281F4 }, - { (char*) "Asia/Istanbul" , 0x028512 }, - { (char*) "Asia/Jakarta" , 0x0289CE }, - { (char*) "Asia/Jayapura" , 0x028ADF }, - { (char*) "Asia/Jerusalem" , 0x028BCC }, - { (char*) "Asia/Kabul" , 0x02900A }, - { (char*) "Asia/Kamchatka" , 0x0290B5 }, - { (char*) "Asia/Karachi" , 0x0293AA }, - { (char*) "Asia/Kashgar" , 0x0294C0 }, - { (char*) "Asia/Kathmandu" , 0x029551 }, - { (char*) "Asia/Katmandu" , 0x0295FE }, - { (char*) "Asia/Khandyga" , 0x0296AB }, - { (char*) "Asia/Kolkata" , 0x0299DC }, - { (char*) "Asia/Krasnoyarsk" , 0x029AC4 }, - { (char*) "Asia/Kuala_Lumpur" , 0x029DCE }, - { (char*) "Asia/Kuching" , 0x029EEE }, - { (char*) "Asia/Kuwait" , 0x02A048 }, - { (char*) "Asia/Macao" , 0x02A0D9 }, - { (char*) "Asia/Macau" , 0x02A3FC }, - { (char*) "Asia/Magadan" , 0x02A71F }, - { (char*) "Asia/Makassar" , 0x02AA2A }, - { (char*) "Asia/Manila" , 0x02AB3D }, - { (char*) "Asia/Muscat" , 0x02AC37 }, - { (char*) "Asia/Nicosia" , 0x02ACC8 }, - { (char*) "Asia/Novokuznetsk" , 0x02AF37 }, - { (char*) "Asia/Novosibirsk" , 0x02B22A }, - { (char*) "Asia/Omsk" , 0x02B53B }, - { (char*) "Asia/Oral" , 0x02B839 }, - { (char*) "Asia/Phnom_Penh" , 0x02BAC5 }, - { (char*) "Asia/Pontianak" , 0x02BB99 }, - { (char*) "Asia/Pyongyang" , 0x02BCB2 }, - { (char*) "Asia/Qatar" , 0x02BD75 }, - { (char*) "Asia/Qostanay" , 0x02BE19 }, - { (char*) "Asia/Qyzylorda" , 0x02C0A6 }, - { (char*) "Asia/Rangoon" , 0x02C33F }, - { (char*) "Asia/Riyadh" , 0x02C406 }, - { (char*) "Asia/Saigon" , 0x02C497 }, - { (char*) "Asia/Sakhalin" , 0x02C58F }, - { (char*) "Asia/Samarkand" , 0x02C8A6 }, - { (char*) "Asia/Seoul" , 0x02CA31 }, - { (char*) "Asia/Shanghai" , 0x02CBDC }, - { (char*) "Asia/Singapore" , 0x02CD7D }, - { (char*) "Asia/Srednekolymsk" , 0x02CE89 }, - { (char*) "Asia/Taipei" , 0x02D199 }, - { (char*) "Asia/Tashkent" , 0x02D3A4 }, - { (char*) "Asia/Tbilisi" , 0x02D52F }, - { (char*) "Asia/Tehran" , 0x02D7B0 }, - { (char*) "Asia/Tel_Aviv" , 0x02DAE8 }, - { (char*) "Asia/Thimbu" , 0x02DF26 }, - { (char*) "Asia/Thimphu" , 0x02DFCC }, - { (char*) "Asia/Tokyo" , 0x02E072 }, - { (char*) "Asia/Tomsk" , 0x02E153 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E45E }, - { (char*) "Asia/Ulaanbaatar" , 0x02E528 }, - { (char*) "Asia/Ulan_Bator" , 0x02E796 }, - { (char*) "Asia/Urumqi" , 0x02E9F4 }, - { (char*) "Asia/Ust-Nera" , 0x02EA92 }, - { (char*) "Asia/Vientiane" , 0x02EDB5 }, - { (char*) "Asia/Vladivostok" , 0x02EE9B }, - { (char*) "Asia/Yakutsk" , 0x02F1A0 }, - { (char*) "Asia/Yangon" , 0x02F4A4 }, - { (char*) "Asia/Yekaterinburg" , 0x02F56B }, - { (char*) "Asia/Yerevan" , 0x02F87D }, - { (char*) "Atlantic/Azores" , 0x02FB4D }, - { (char*) "Atlantic/Bermuda" , 0x03010C }, - { (char*) "Atlantic/Canary" , 0x030518 }, - { (char*) "Atlantic/Cape_Verde" , 0x030710 }, - { (char*) "Atlantic/Faeroe" , 0x0307CB }, - { (char*) "Atlantic/Faroe" , 0x030990 }, - { (char*) "Atlantic/Jan_Mayen" , 0x030B55 }, - { (char*) "Atlantic/Madeira" , 0x030E22 }, - { (char*) "Atlantic/Reykjavik" , 0x0313EA }, - { (char*) "Atlantic/South_Georgia" , 0x0316E7 }, - { (char*) "Atlantic/St_Helena" , 0x031777 }, - { (char*) "Atlantic/Stanley" , 0x031818 }, - { (char*) "Australia/ACT" , 0x031B39 }, - { (char*) "Australia/Adelaide" , 0x031ECD }, - { (char*) "Australia/Brisbane" , 0x032281 }, - { (char*) "Australia/Broken_Hill" , 0x0323C5 }, - { (char*) "Australia/Canberra" , 0x03279A }, - { (char*) "Australia/Currie" , 0x032B2E }, - { (char*) "Australia/Darwin" , 0x032F25 }, - { (char*) "Australia/Eucla" , 0x03302D }, - { (char*) "Australia/Hobart" , 0x03318C }, - { (char*) "Australia/LHI" , 0x03358B }, - { (char*) "Australia/Lindeman" , 0x03384B }, - { (char*) "Australia/Lord_Howe" , 0x0339BB }, - { (char*) "Australia/Melbourne" , 0x033C8B }, - { (char*) "Australia/North" , 0x034027 }, - { (char*) "Australia/NSW" , 0x03411D }, - { (char*) "Australia/Perth" , 0x0344B1 }, - { (char*) "Australia/Queensland" , 0x03460D }, - { (char*) "Australia/South" , 0x03473A }, - { (char*) "Australia/Sydney" , 0x034ADF }, - { (char*) "Australia/Tasmania" , 0x034E8F }, - { (char*) "Australia/Victoria" , 0x035286 }, - { (char*) "Australia/West" , 0x03561A }, - { (char*) "Australia/Yancowinna" , 0x035758 }, - { (char*) "Brazil/Acre" , 0x035B11 }, - { (char*) "Brazil/DeNoronha" , 0x035CBF }, - { (char*) "Brazil/East" , 0x035EAF }, - { (char*) "Brazil/West" , 0x036273 }, - { (char*) "Canada/Atlantic" , 0x03641B }, - { (char*) "Canada/Central" , 0x036AAF }, - { (char*) "Canada/Eastern" , 0x036FC9 }, - { (char*) "Canada/Mountain" , 0x03768A }, - { (char*) "Canada/Newfoundland" , 0x037A60 }, - { (char*) "Canada/Pacific" , 0x0381C2 }, - { (char*) "Canada/Saskatchewan" , 0x038700 }, - { (char*) "Canada/Yukon" , 0x03898A }, - { (char*) "CET" , 0x038D9B }, - { (char*) "Chile/Continental" , 0x039014 }, - { (char*) "Chile/EasterIsland" , 0x03956A }, - { (char*) "CST6CDT" , 0x039A0C }, - { (char*) "Cuba" , 0x039DCF }, - { (char*) "EET" , 0x03A238 }, - { (char*) "Egypt" , 0x03A435 }, - { (char*) "Eire" , 0x03A95E }, - { (char*) "EST" , 0x03AF42 }, - { (char*) "EST5EDT" , 0x03AFBD }, - { (char*) "Etc/GMT" , 0x03B380 }, - { (char*) "Etc/GMT+0" , 0x03B3FB }, - { (char*) "Etc/GMT+1" , 0x03B476 }, - { (char*) "Etc/GMT+10" , 0x03B4F3 }, - { (char*) "Etc/GMT+11" , 0x03B571 }, - { (char*) "Etc/GMT+12" , 0x03B5EF }, - { (char*) "Etc/GMT+2" , 0x03B66D }, - { (char*) "Etc/GMT+3" , 0x03B6EA }, - { (char*) "Etc/GMT+4" , 0x03B767 }, - { (char*) "Etc/GMT+5" , 0x03B7E4 }, - { (char*) "Etc/GMT+6" , 0x03B861 }, - { (char*) "Etc/GMT+7" , 0x03B8DE }, - { (char*) "Etc/GMT+8" , 0x03B95B }, - { (char*) "Etc/GMT+9" , 0x03B9D8 }, - { (char*) "Etc/GMT-0" , 0x03BA55 }, - { (char*) "Etc/GMT-1" , 0x03BAD0 }, - { (char*) "Etc/GMT-10" , 0x03BB4E }, - { (char*) "Etc/GMT-11" , 0x03BBCD }, - { (char*) "Etc/GMT-12" , 0x03BC4C }, - { (char*) "Etc/GMT-13" , 0x03BCCB }, - { (char*) "Etc/GMT-14" , 0x03BD4A }, - { (char*) "Etc/GMT-2" , 0x03BDC9 }, - { (char*) "Etc/GMT-3" , 0x03BE47 }, - { (char*) "Etc/GMT-4" , 0x03BEC5 }, - { (char*) "Etc/GMT-5" , 0x03BF43 }, - { (char*) "Etc/GMT-6" , 0x03BFC1 }, - { (char*) "Etc/GMT-7" , 0x03C03F }, - { (char*) "Etc/GMT-8" , 0x03C0BD }, - { (char*) "Etc/GMT-9" , 0x03C13B }, - { (char*) "Etc/GMT0" , 0x03C1B9 }, - { (char*) "Etc/Greenwich" , 0x03C234 }, - { (char*) "Etc/UCT" , 0x03C2AF }, - { (char*) "Etc/Universal" , 0x03C32A }, - { (char*) "Etc/UTC" , 0x03C3A5 }, - { (char*) "Etc/Zulu" , 0x03C420 }, - { (char*) "Europe/Amsterdam" , 0x03C49B }, - { (char*) "Europe/Andorra" , 0x03C8D6 }, - { (char*) "Europe/Astrakhan" , 0x03CA67 }, - { (char*) "Europe/Athens" , 0x03CD5B }, - { (char*) "Europe/Belfast" , 0x03D011 }, - { (char*) "Europe/Belgrade" , 0x03D65C }, - { (char*) "Europe/Berlin" , 0x03D846 }, - { (char*) "Europe/Bratislava" , 0x03DB22 }, - { (char*) "Europe/Brussels" , 0x03DE01 }, - { (char*) "Europe/Bucharest" , 0x03E25C }, - { (char*) "Europe/Budapest" , 0x03E4FD }, - { (char*) "Europe/Busingen" , 0x03E807 }, - { (char*) "Europe/Chisinau" , 0x03EA0C }, - { (char*) "Europe/Copenhagen" , 0x03ED0B }, - { (char*) "Europe/Dublin" , 0x03EF86 }, - { (char*) "Europe/Gibraltar" , 0x03F56A }, - { (char*) "Europe/Guernsey" , 0x03FA3A }, - { (char*) "Europe/Helsinki" , 0x040091 }, - { (char*) "Europe/Isle_of_Man" , 0x04027E }, - { (char*) "Europe/Istanbul" , 0x0408C9 }, - { (char*) "Europe/Jersey" , 0x040D85 }, - { (char*) "Europe/Kaliningrad" , 0x0413DC }, - { (char*) "Europe/Kiev" , 0x041784 }, - { (char*) "Europe/Kirov" , 0x0419BE }, - { (char*) "Europe/Kyiv" , 0x041CB7 }, - { (char*) "Europe/Lisbon" , 0x041F00 }, - { (char*) "Europe/Ljubljana" , 0x0424CD }, - { (char*) "Europe/London" , 0x0426B7 }, - { (char*) "Europe/Luxembourg" , 0x042D02 }, - { (char*) "Europe/Madrid" , 0x04314D }, - { (char*) "Europe/Malta" , 0x0434EA }, - { (char*) "Europe/Mariehamn" , 0x043896 }, - { (char*) "Europe/Minsk" , 0x043A83 }, - { (char*) "Europe/Monaco" , 0x043DB7 }, - { (char*) "Europe/Moscow" , 0x04421D }, - { (char*) "Europe/Nicosia" , 0x0445C9 }, - { (char*) "Europe/Oslo" , 0x04482A }, - { (char*) "Europe/Paris" , 0x044ADA }, - { (char*) "Europe/Podgorica" , 0x044F37 }, - { (char*) "Europe/Prague" , 0x045121 }, - { (char*) "Europe/Riga" , 0x045400 }, - { (char*) "Europe/Rome" , 0x0456C2 }, - { (char*) "Europe/Samara" , 0x045A81 }, - { (char*) "Europe/San_Marino" , 0x045D82 }, - { (char*) "Europe/Sarajevo" , 0x046141 }, - { (char*) "Europe/Saratov" , 0x04632B }, - { (char*) "Europe/Simferopol" , 0x04661D }, - { (char*) "Europe/Skopje" , 0x046990 }, - { (char*) "Europe/Sofia" , 0x046B7A }, - { (char*) "Europe/Stockholm" , 0x046DD6 }, - { (char*) "Europe/Tallinn" , 0x046FD3 }, - { (char*) "Europe/Tirane" , 0x047282 }, - { (char*) "Europe/Tiraspol" , 0x0474EA }, - { (char*) "Europe/Ulyanovsk" , 0x0477E9 }, - { (char*) "Europe/Uzhgorod" , 0x047AFF }, - { (char*) "Europe/Vaduz" , 0x047D39 }, - { (char*) "Europe/Vatican" , 0x047F23 }, - { (char*) "Europe/Vienna" , 0x0482E2 }, - { (char*) "Europe/Vilnius" , 0x048580 }, - { (char*) "Europe/Volgograd" , 0x048830 }, - { (char*) "Europe/Warsaw" , 0x048B3F }, - { (char*) "Europe/Zagreb" , 0x048EE6 }, - { (char*) "Europe/Zaporozhye" , 0x0490D0 }, - { (char*) "Europe/Zurich" , 0x04930A }, - { (char*) "Factory" , 0x049507 }, - { (char*) "GB" , 0x049584 }, - { (char*) "GB-Eire" , 0x049BCF }, - { (char*) "GMT" , 0x04A21A }, - { (char*) "GMT+0" , 0x04A295 }, - { (char*) "GMT-0" , 0x04A310 }, - { (char*) "GMT0" , 0x04A38B }, - { (char*) "Greenwich" , 0x04A406 }, - { (char*) "Hongkong" , 0x04A481 }, - { (char*) "HST" , 0x04A794 }, - { (char*) "Iceland" , 0x04A810 }, - { (char*) "Indian/Antananarivo" , 0x04A89E }, - { (char*) "Indian/Chagos" , 0x04A94A }, - { (char*) "Indian/Christmas" , 0x04A9EE }, - { (char*) "Indian/Cocos" , 0x04AA7F }, - { (char*) "Indian/Comoro" , 0x04AB17 }, - { (char*) "Indian/Kerguelen" , 0x04ABA6 }, - { (char*) "Indian/Mahe" , 0x04AC37 }, - { (char*) "Indian/Maldives" , 0x04ACC8 }, - { (char*) "Indian/Mauritius" , 0x04AD6C }, - { (char*) "Indian/Mayotte" , 0x04AE2B }, - { (char*) "Indian/Reunion" , 0x04AEBA }, - { (char*) "Iran" , 0x04AF4B }, - { (char*) "Israel" , 0x04B283 }, - { (char*) "Jamaica" , 0x04B6C1 }, - { (char*) "Japan" , 0x04B820 }, - { (char*) "Kwajalein" , 0x04B901 }, - { (char*) "Libya" , 0x04B9E8 }, - { (char*) "MET" , 0x04BBA3 }, - { (char*) "Mexico/BajaNorte" , 0x04BE1C }, - { (char*) "Mexico/BajaSur" , 0x04C229 }, - { (char*) "Mexico/General" , 0x04C503 }, - { (char*) "MST" , 0x04C814 }, - { (char*) "MST7MDT" , 0x04C88F }, - { (char*) "Navajo" , 0x04CC52 }, - { (char*) "NZ" , 0x04D070 }, - { (char*) "NZ-CHAT" , 0x04D48F }, - { (char*) "Pacific/Apia" , 0x04D7C3 }, - { (char*) "Pacific/Auckland" , 0x04D966 }, - { (char*) "Pacific/Bougainville" , 0x04DD98 }, - { (char*) "Pacific/Chatham" , 0x04DE79 }, - { (char*) "Pacific/Chuuk" , 0x04E1BC }, - { (char*) "Pacific/Easter" , 0x04E29A }, - { (char*) "Pacific/Efate" , 0x04E749 }, - { (char*) "Pacific/Enderbury" , 0x04E8AB }, - { (char*) "Pacific/Fakaofo" , 0x04E963 }, - { (char*) "Pacific/Fiji" , 0x04EA08 }, - { (char*) "Pacific/Funafuti" , 0x04EBA0 }, - { (char*) "Pacific/Galapagos" , 0x04EC32 }, - { (char*) "Pacific/Gambier" , 0x04ECFE }, - { (char*) "Pacific/Guadalcanal" , 0x04ED9D }, - { (char*) "Pacific/Guam" , 0x04EE2F }, - { (char*) "Pacific/Honolulu" , 0x04EF99 }, - { (char*) "Pacific/Johnston" , 0x04F088 }, - { (char*) "Pacific/Kanton" , 0x04F171 }, - { (char*) "Pacific/Kiritimati" , 0x04F238 }, - { (char*) "Pacific/Kosrae" , 0x04F2FE }, - { (char*) "Pacific/Kwajalein" , 0x04F402 }, - { (char*) "Pacific/Majuro" , 0x04F4F2 }, - { (char*) "Pacific/Marquesas" , 0x04F5F0 }, - { (char*) "Pacific/Midway" , 0x04F698 }, - { (char*) "Pacific/Nauru" , 0x04F75B }, - { (char*) "Pacific/Niue" , 0x04F81E }, - { (char*) "Pacific/Norfolk" , 0x04F8C4 }, - { (char*) "Pacific/Noumea" , 0x04F9C7 }, - { (char*) "Pacific/Pago_Pago" , 0x04FA99 }, - { (char*) "Pacific/Palau" , 0x04FB37 }, - { (char*) "Pacific/Pitcairn" , 0x04FBD7 }, - { (char*) "Pacific/Pohnpei" , 0x04FC7C }, - { (char*) "Pacific/Ponape" , 0x04FD6C }, - { (char*) "Pacific/Port_Moresby" , 0x04FDFE }, - { (char*) "Pacific/Rarotonga" , 0x04FEBC }, - { (char*) "Pacific/Saipan" , 0x05005E }, - { (char*) "Pacific/Samoa" , 0x0501BF }, - { (char*) "Pacific/Tahiti" , 0x05025D }, - { (char*) "Pacific/Tarawa" , 0x0502FD }, - { (char*) "Pacific/Tongatapu" , 0x05039E }, - { (char*) "Pacific/Truk" , 0x050497 }, - { (char*) "Pacific/Wake" , 0x05053D }, - { (char*) "Pacific/Wallis" , 0x0505DA }, - { (char*) "Pacific/Yap" , 0x05066C }, - { (char*) "Poland" , 0x050712 }, - { (char*) "Portugal" , 0x050AB9 }, - { (char*) "PRC" , 0x051073 }, - { (char*) "PST8PDT" , 0x051208 }, - { (char*) "ROC" , 0x0515CB }, - { (char*) "ROK" , 0x0517D6 }, - { (char*) "Singapore" , 0x051981 }, - { (char*) "Turkey" , 0x051A8D }, - { (char*) "UCT" , 0x051F49 }, - { (char*) "Universal" , 0x051FC4 }, - { (char*) "US/Alaska" , 0x05203F }, - { (char*) "US/Aleutian" , 0x05241C }, - { (char*) "US/Arizona" , 0x0527F1 }, - { (char*) "US/Central" , 0x0528ED }, - { (char*) "US/East-Indiana" , 0x052FD3 }, - { (char*) "US/Eastern" , 0x0531F2 }, - { (char*) "US/Hawaii" , 0x0538CE }, - { (char*) "US/Indiana-Starke" , 0x0539B7 }, - { (char*) "US/Michigan" , 0x053DBB }, - { (char*) "US/Mountain" , 0x05414A }, - { (char*) "US/Pacific" , 0x054568 }, - { (char*) "US/Samoa" , 0x054A82 }, - { (char*) "UTC" , 0x054B20 }, - { (char*) "W-SU" , 0x054B9B }, - { (char*) "WET" , 0x054F33 }, - { (char*) "Zulu" , 0x05512D }, + { (char*) "Asia/Bishkek" , 0x024915 }, + { (char*) "Asia/Brunei" , 0x024B8B }, + { (char*) "Asia/Calcutta" , 0x024C31 }, + { (char*) "Asia/Chita" , 0x024D19 }, + { (char*) "Asia/Choibalsan" , 0x025027 }, + { (char*) "Asia/Chongqing" , 0x0252B0 }, + { (char*) "Asia/Chungking" , 0x025445 }, + { (char*) "Asia/Colombo" , 0x0255DA }, + { (char*) "Asia/Dacca" , 0x0256DD }, + { (char*) "Asia/Damascus" , 0x0257D0 }, + { (char*) "Asia/Dhaka" , 0x025CAE }, + { (char*) "Asia/Dili" , 0x025DA1 }, + { (char*) "Asia/Dubai" , 0x025E57 }, + { (char*) "Asia/Dushanbe" , 0x025EE8 }, + { (char*) "Asia/Famagusta" , 0x026062 }, + { (char*) "Asia/Gaza" , 0x026429 }, + { (char*) "Asia/Harbin" , 0x026E15 }, + { (char*) "Asia/Hebron" , 0x026FAA }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0279A7 }, + { (char*) "Asia/Hong_Kong" , 0x027A9F }, + { (char*) "Asia/Hovd" , 0x027DB2 }, + { (char*) "Asia/Irkutsk" , 0x02803B }, + { (char*) "Asia/Istanbul" , 0x028359 }, + { (char*) "Asia/Jakarta" , 0x028815 }, + { (char*) "Asia/Jayapura" , 0x028926 }, + { (char*) "Asia/Jerusalem" , 0x028A13 }, + { (char*) "Asia/Kabul" , 0x028E51 }, + { (char*) "Asia/Kamchatka" , 0x028EFC }, + { (char*) "Asia/Karachi" , 0x0291F1 }, + { (char*) "Asia/Kashgar" , 0x029307 }, + { (char*) "Asia/Kathmandu" , 0x029398 }, + { (char*) "Asia/Katmandu" , 0x029445 }, + { (char*) "Asia/Khandyga" , 0x0294F2 }, + { (char*) "Asia/Kolkata" , 0x029823 }, + { (char*) "Asia/Krasnoyarsk" , 0x02990B }, + { (char*) "Asia/Kuala_Lumpur" , 0x029C15 }, + { (char*) "Asia/Kuching" , 0x029D35 }, + { (char*) "Asia/Kuwait" , 0x029E8F }, + { (char*) "Asia/Macao" , 0x029F20 }, + { (char*) "Asia/Macau" , 0x02A243 }, + { (char*) "Asia/Magadan" , 0x02A566 }, + { (char*) "Asia/Makassar" , 0x02A871 }, + { (char*) "Asia/Manila" , 0x02A984 }, + { (char*) "Asia/Muscat" , 0x02AA7E }, + { (char*) "Asia/Nicosia" , 0x02AB0F }, + { (char*) "Asia/Novokuznetsk" , 0x02AD7E }, + { (char*) "Asia/Novosibirsk" , 0x02B071 }, + { (char*) "Asia/Omsk" , 0x02B382 }, + { (char*) "Asia/Oral" , 0x02B680 }, + { (char*) "Asia/Phnom_Penh" , 0x02B90C }, + { (char*) "Asia/Pontianak" , 0x02B9E0 }, + { (char*) "Asia/Pyongyang" , 0x02BAF9 }, + { (char*) "Asia/Qatar" , 0x02BBBC }, + { (char*) "Asia/Qostanay" , 0x02BC60 }, + { (char*) "Asia/Qyzylorda" , 0x02BEED }, + { (char*) "Asia/Rangoon" , 0x02C186 }, + { (char*) "Asia/Riyadh" , 0x02C24D }, + { (char*) "Asia/Saigon" , 0x02C2DE }, + { (char*) "Asia/Sakhalin" , 0x02C3D6 }, + { (char*) "Asia/Samarkand" , 0x02C6ED }, + { (char*) "Asia/Seoul" , 0x02C878 }, + { (char*) "Asia/Shanghai" , 0x02CA23 }, + { (char*) "Asia/Singapore" , 0x02CBC4 }, + { (char*) "Asia/Srednekolymsk" , 0x02CCD0 }, + { (char*) "Asia/Taipei" , 0x02CFE0 }, + { (char*) "Asia/Tashkent" , 0x02D1EB }, + { (char*) "Asia/Tbilisi" , 0x02D376 }, + { (char*) "Asia/Tehran" , 0x02D5F7 }, + { (char*) "Asia/Tel_Aviv" , 0x02D92F }, + { (char*) "Asia/Thimbu" , 0x02DD6D }, + { (char*) "Asia/Thimphu" , 0x02DE13 }, + { (char*) "Asia/Tokyo" , 0x02DEB9 }, + { (char*) "Asia/Tomsk" , 0x02DF9A }, + { (char*) "Asia/Ujung_Pandang" , 0x02E2A5 }, + { (char*) "Asia/Ulaanbaatar" , 0x02E36F }, + { (char*) "Asia/Ulan_Bator" , 0x02E5DD }, + { (char*) "Asia/Urumqi" , 0x02E83B }, + { (char*) "Asia/Ust-Nera" , 0x02E8D9 }, + { (char*) "Asia/Vientiane" , 0x02EBFC }, + { (char*) "Asia/Vladivostok" , 0x02ECE2 }, + { (char*) "Asia/Yakutsk" , 0x02EFE7 }, + { (char*) "Asia/Yangon" , 0x02F2EB }, + { (char*) "Asia/Yekaterinburg" , 0x02F3B2 }, + { (char*) "Asia/Yerevan" , 0x02F6C4 }, + { (char*) "Atlantic/Azores" , 0x02F994 }, + { (char*) "Atlantic/Bermuda" , 0x02FF53 }, + { (char*) "Atlantic/Canary" , 0x03035F }, + { (char*) "Atlantic/Cape_Verde" , 0x030557 }, + { (char*) "Atlantic/Faeroe" , 0x030612 }, + { (char*) "Atlantic/Faroe" , 0x0307D7 }, + { (char*) "Atlantic/Jan_Mayen" , 0x03099C }, + { (char*) "Atlantic/Madeira" , 0x030C69 }, + { (char*) "Atlantic/Reykjavik" , 0x031231 }, + { (char*) "Atlantic/South_Georgia" , 0x03152E }, + { (char*) "Atlantic/St_Helena" , 0x0315BE }, + { (char*) "Atlantic/Stanley" , 0x03165F }, + { (char*) "Australia/ACT" , 0x031980 }, + { (char*) "Australia/Adelaide" , 0x031D14 }, + { (char*) "Australia/Brisbane" , 0x0320C8 }, + { (char*) "Australia/Broken_Hill" , 0x03220C }, + { (char*) "Australia/Canberra" , 0x0325E1 }, + { (char*) "Australia/Currie" , 0x032975 }, + { (char*) "Australia/Darwin" , 0x032D6C }, + { (char*) "Australia/Eucla" , 0x032E74 }, + { (char*) "Australia/Hobart" , 0x032FD3 }, + { (char*) "Australia/LHI" , 0x0333D2 }, + { (char*) "Australia/Lindeman" , 0x033692 }, + { (char*) "Australia/Lord_Howe" , 0x033802 }, + { (char*) "Australia/Melbourne" , 0x033AD2 }, + { (char*) "Australia/North" , 0x033E6E }, + { (char*) "Australia/NSW" , 0x033F64 }, + { (char*) "Australia/Perth" , 0x0342F8 }, + { (char*) "Australia/Queensland" , 0x034454 }, + { (char*) "Australia/South" , 0x034581 }, + { (char*) "Australia/Sydney" , 0x034926 }, + { (char*) "Australia/Tasmania" , 0x034CD6 }, + { (char*) "Australia/Victoria" , 0x0350CD }, + { (char*) "Australia/West" , 0x035461 }, + { (char*) "Australia/Yancowinna" , 0x03559F }, + { (char*) "Brazil/Acre" , 0x035958 }, + { (char*) "Brazil/DeNoronha" , 0x035B06 }, + { (char*) "Brazil/East" , 0x035CF6 }, + { (char*) "Brazil/West" , 0x0360BA }, + { (char*) "Canada/Atlantic" , 0x036262 }, + { (char*) "Canada/Central" , 0x0368F6 }, + { (char*) "Canada/Eastern" , 0x036E10 }, + { (char*) "Canada/Mountain" , 0x0374D1 }, + { (char*) "Canada/Newfoundland" , 0x0378A7 }, + { (char*) "Canada/Pacific" , 0x038009 }, + { (char*) "Canada/Saskatchewan" , 0x038547 }, + { (char*) "Canada/Yukon" , 0x0387D1 }, + { (char*) "CET" , 0x038BE2 }, + { (char*) "Chile/Continental" , 0x038E5B }, + { (char*) "Chile/EasterIsland" , 0x0393B1 }, + { (char*) "CST6CDT" , 0x039853 }, + { (char*) "Cuba" , 0x039C16 }, + { (char*) "EET" , 0x03A07F }, + { (char*) "Egypt" , 0x03A27C }, + { (char*) "Eire" , 0x03A7A5 }, + { (char*) "EST" , 0x03AD89 }, + { (char*) "EST5EDT" , 0x03AE04 }, + { (char*) "Etc/GMT" , 0x03B1C7 }, + { (char*) "Etc/GMT+0" , 0x03B242 }, + { (char*) "Etc/GMT+1" , 0x03B2BD }, + { (char*) "Etc/GMT+10" , 0x03B33A }, + { (char*) "Etc/GMT+11" , 0x03B3B8 }, + { (char*) "Etc/GMT+12" , 0x03B436 }, + { (char*) "Etc/GMT+2" , 0x03B4B4 }, + { (char*) "Etc/GMT+3" , 0x03B531 }, + { (char*) "Etc/GMT+4" , 0x03B5AE }, + { (char*) "Etc/GMT+5" , 0x03B62B }, + { (char*) "Etc/GMT+6" , 0x03B6A8 }, + { (char*) "Etc/GMT+7" , 0x03B725 }, + { (char*) "Etc/GMT+8" , 0x03B7A2 }, + { (char*) "Etc/GMT+9" , 0x03B81F }, + { (char*) "Etc/GMT-0" , 0x03B89C }, + { (char*) "Etc/GMT-1" , 0x03B917 }, + { (char*) "Etc/GMT-10" , 0x03B995 }, + { (char*) "Etc/GMT-11" , 0x03BA14 }, + { (char*) "Etc/GMT-12" , 0x03BA93 }, + { (char*) "Etc/GMT-13" , 0x03BB12 }, + { (char*) "Etc/GMT-14" , 0x03BB91 }, + { (char*) "Etc/GMT-2" , 0x03BC10 }, + { (char*) "Etc/GMT-3" , 0x03BC8E }, + { (char*) "Etc/GMT-4" , 0x03BD0C }, + { (char*) "Etc/GMT-5" , 0x03BD8A }, + { (char*) "Etc/GMT-6" , 0x03BE08 }, + { (char*) "Etc/GMT-7" , 0x03BE86 }, + { (char*) "Etc/GMT-8" , 0x03BF04 }, + { (char*) "Etc/GMT-9" , 0x03BF82 }, + { (char*) "Etc/GMT0" , 0x03C000 }, + { (char*) "Etc/Greenwich" , 0x03C07B }, + { (char*) "Etc/UCT" , 0x03C0F6 }, + { (char*) "Etc/Universal" , 0x03C171 }, + { (char*) "Etc/UTC" , 0x03C1EC }, + { (char*) "Etc/Zulu" , 0x03C267 }, + { (char*) "Europe/Amsterdam" , 0x03C2E2 }, + { (char*) "Europe/Andorra" , 0x03C71D }, + { (char*) "Europe/Astrakhan" , 0x03C8AE }, + { (char*) "Europe/Athens" , 0x03CBA2 }, + { (char*) "Europe/Belfast" , 0x03CE58 }, + { (char*) "Europe/Belgrade" , 0x03D4A3 }, + { (char*) "Europe/Berlin" , 0x03D68D }, + { (char*) "Europe/Bratislava" , 0x03D969 }, + { (char*) "Europe/Brussels" , 0x03DC48 }, + { (char*) "Europe/Bucharest" , 0x03E0A3 }, + { (char*) "Europe/Budapest" , 0x03E344 }, + { (char*) "Europe/Busingen" , 0x03E64E }, + { (char*) "Europe/Chisinau" , 0x03E853 }, + { (char*) "Europe/Copenhagen" , 0x03EB52 }, + { (char*) "Europe/Dublin" , 0x03EDCD }, + { (char*) "Europe/Gibraltar" , 0x03F3B1 }, + { (char*) "Europe/Guernsey" , 0x03F881 }, + { (char*) "Europe/Helsinki" , 0x03FED8 }, + { (char*) "Europe/Isle_of_Man" , 0x0400C5 }, + { (char*) "Europe/Istanbul" , 0x040710 }, + { (char*) "Europe/Jersey" , 0x040BCC }, + { (char*) "Europe/Kaliningrad" , 0x041223 }, + { (char*) "Europe/Kiev" , 0x0415CB }, + { (char*) "Europe/Kirov" , 0x041805 }, + { (char*) "Europe/Kyiv" , 0x041AFE }, + { (char*) "Europe/Lisbon" , 0x041D47 }, + { (char*) "Europe/Ljubljana" , 0x042314 }, + { (char*) "Europe/London" , 0x0424FE }, + { (char*) "Europe/Luxembourg" , 0x042B49 }, + { (char*) "Europe/Madrid" , 0x042F94 }, + { (char*) "Europe/Malta" , 0x043331 }, + { (char*) "Europe/Mariehamn" , 0x0436DD }, + { (char*) "Europe/Minsk" , 0x0438CA }, + { (char*) "Europe/Monaco" , 0x043BFE }, + { (char*) "Europe/Moscow" , 0x044064 }, + { (char*) "Europe/Nicosia" , 0x044410 }, + { (char*) "Europe/Oslo" , 0x044671 }, + { (char*) "Europe/Paris" , 0x044921 }, + { (char*) "Europe/Podgorica" , 0x044D7E }, + { (char*) "Europe/Prague" , 0x044F68 }, + { (char*) "Europe/Riga" , 0x045247 }, + { (char*) "Europe/Rome" , 0x045509 }, + { (char*) "Europe/Samara" , 0x0458C8 }, + { (char*) "Europe/San_Marino" , 0x045BC9 }, + { (char*) "Europe/Sarajevo" , 0x045F88 }, + { (char*) "Europe/Saratov" , 0x046172 }, + { (char*) "Europe/Simferopol" , 0x046464 }, + { (char*) "Europe/Skopje" , 0x0467D7 }, + { (char*) "Europe/Sofia" , 0x0469C1 }, + { (char*) "Europe/Stockholm" , 0x046C1D }, + { (char*) "Europe/Tallinn" , 0x046E1A }, + { (char*) "Europe/Tirane" , 0x0470C9 }, + { (char*) "Europe/Tiraspol" , 0x047331 }, + { (char*) "Europe/Ulyanovsk" , 0x047630 }, + { (char*) "Europe/Uzhgorod" , 0x047946 }, + { (char*) "Europe/Vaduz" , 0x047B80 }, + { (char*) "Europe/Vatican" , 0x047D6A }, + { (char*) "Europe/Vienna" , 0x048129 }, + { (char*) "Europe/Vilnius" , 0x0483C7 }, + { (char*) "Europe/Volgograd" , 0x048677 }, + { (char*) "Europe/Warsaw" , 0x048986 }, + { (char*) "Europe/Zagreb" , 0x048D2D }, + { (char*) "Europe/Zaporozhye" , 0x048F17 }, + { (char*) "Europe/Zurich" , 0x049151 }, + { (char*) "Factory" , 0x04934E }, + { (char*) "GB" , 0x0493CB }, + { (char*) "GB-Eire" , 0x049A16 }, + { (char*) "GMT" , 0x04A061 }, + { (char*) "GMT+0" , 0x04A0DC }, + { (char*) "GMT-0" , 0x04A157 }, + { (char*) "GMT0" , 0x04A1D2 }, + { (char*) "Greenwich" , 0x04A24D }, + { (char*) "Hongkong" , 0x04A2C8 }, + { (char*) "HST" , 0x04A5DB }, + { (char*) "Iceland" , 0x04A657 }, + { (char*) "Indian/Antananarivo" , 0x04A6E5 }, + { (char*) "Indian/Chagos" , 0x04A791 }, + { (char*) "Indian/Christmas" , 0x04A835 }, + { (char*) "Indian/Cocos" , 0x04A8C6 }, + { (char*) "Indian/Comoro" , 0x04A95E }, + { (char*) "Indian/Kerguelen" , 0x04A9ED }, + { (char*) "Indian/Mahe" , 0x04AA7E }, + { (char*) "Indian/Maldives" , 0x04AB0F }, + { (char*) "Indian/Mauritius" , 0x04ABB3 }, + { (char*) "Indian/Mayotte" , 0x04AC72 }, + { (char*) "Indian/Reunion" , 0x04AD01 }, + { (char*) "Iran" , 0x04AD92 }, + { (char*) "Israel" , 0x04B0CA }, + { (char*) "Jamaica" , 0x04B508 }, + { (char*) "Japan" , 0x04B667 }, + { (char*) "Kwajalein" , 0x04B748 }, + { (char*) "Libya" , 0x04B82F }, + { (char*) "MET" , 0x04B9EA }, + { (char*) "Mexico/BajaNorte" , 0x04BC63 }, + { (char*) "Mexico/BajaSur" , 0x04C070 }, + { (char*) "Mexico/General" , 0x04C34A }, + { (char*) "MST" , 0x04C65B }, + { (char*) "MST7MDT" , 0x04C6D6 }, + { (char*) "Navajo" , 0x04CA99 }, + { (char*) "NZ" , 0x04CEB7 }, + { (char*) "NZ-CHAT" , 0x04D2D6 }, + { (char*) "Pacific/Apia" , 0x04D60A }, + { (char*) "Pacific/Auckland" , 0x04D7AD }, + { (char*) "Pacific/Bougainville" , 0x04DBDF }, + { (char*) "Pacific/Chatham" , 0x04DCC0 }, + { (char*) "Pacific/Chuuk" , 0x04E003 }, + { (char*) "Pacific/Easter" , 0x04E0E1 }, + { (char*) "Pacific/Efate" , 0x04E590 }, + { (char*) "Pacific/Enderbury" , 0x04E6F2 }, + { (char*) "Pacific/Fakaofo" , 0x04E7AA }, + { (char*) "Pacific/Fiji" , 0x04E84F }, + { (char*) "Pacific/Funafuti" , 0x04E9E7 }, + { (char*) "Pacific/Galapagos" , 0x04EA79 }, + { (char*) "Pacific/Gambier" , 0x04EB45 }, + { (char*) "Pacific/Guadalcanal" , 0x04EBE4 }, + { (char*) "Pacific/Guam" , 0x04EC76 }, + { (char*) "Pacific/Honolulu" , 0x04EDE0 }, + { (char*) "Pacific/Johnston" , 0x04EECF }, + { (char*) "Pacific/Kanton" , 0x04EFB8 }, + { (char*) "Pacific/Kiritimati" , 0x04F07F }, + { (char*) "Pacific/Kosrae" , 0x04F145 }, + { (char*) "Pacific/Kwajalein" , 0x04F249 }, + { (char*) "Pacific/Majuro" , 0x04F339 }, + { (char*) "Pacific/Marquesas" , 0x04F437 }, + { (char*) "Pacific/Midway" , 0x04F4DF }, + { (char*) "Pacific/Nauru" , 0x04F5A2 }, + { (char*) "Pacific/Niue" , 0x04F665 }, + { (char*) "Pacific/Norfolk" , 0x04F70B }, + { (char*) "Pacific/Noumea" , 0x04F80E }, + { (char*) "Pacific/Pago_Pago" , 0x04F8E0 }, + { (char*) "Pacific/Palau" , 0x04F97E }, + { (char*) "Pacific/Pitcairn" , 0x04FA1E }, + { (char*) "Pacific/Pohnpei" , 0x04FAC3 }, + { (char*) "Pacific/Ponape" , 0x04FBB3 }, + { (char*) "Pacific/Port_Moresby" , 0x04FC45 }, + { (char*) "Pacific/Rarotonga" , 0x04FD03 }, + { (char*) "Pacific/Saipan" , 0x04FEA5 }, + { (char*) "Pacific/Samoa" , 0x050006 }, + { (char*) "Pacific/Tahiti" , 0x0500A4 }, + { (char*) "Pacific/Tarawa" , 0x050144 }, + { (char*) "Pacific/Tongatapu" , 0x0501E5 }, + { (char*) "Pacific/Truk" , 0x0502DE }, + { (char*) "Pacific/Wake" , 0x050384 }, + { (char*) "Pacific/Wallis" , 0x050421 }, + { (char*) "Pacific/Yap" , 0x0504B3 }, + { (char*) "Poland" , 0x050559 }, + { (char*) "Portugal" , 0x050900 }, + { (char*) "PRC" , 0x050EBA }, + { (char*) "PST8PDT" , 0x05104F }, + { (char*) "ROC" , 0x051412 }, + { (char*) "ROK" , 0x05161D }, + { (char*) "Singapore" , 0x0517C8 }, + { (char*) "Turkey" , 0x0518D4 }, + { (char*) "UCT" , 0x051D90 }, + { (char*) "Universal" , 0x051E0B }, + { (char*) "US/Alaska" , 0x051E86 }, + { (char*) "US/Aleutian" , 0x052263 }, + { (char*) "US/Arizona" , 0x052638 }, + { (char*) "US/Central" , 0x052734 }, + { (char*) "US/East-Indiana" , 0x052E1A }, + { (char*) "US/Eastern" , 0x053039 }, + { (char*) "US/Hawaii" , 0x053715 }, + { (char*) "US/Indiana-Starke" , 0x0537FE }, + { (char*) "US/Michigan" , 0x053C02 }, + { (char*) "US/Mountain" , 0x053F91 }, + { (char*) "US/Pacific" , 0x0543AF }, + { (char*) "US/Samoa" , 0x0548C9 }, + { (char*) "UTC" , 0x054967 }, + { (char*) "W-SU" , 0x0549E2 }, + { (char*) "WET" , 0x054D7A }, + { (char*) "Zulu" , 0x054F74 }, }; -const unsigned char timelib_timezone_db_data_builtin[348584] = { +const unsigned char timelib_timezone_db_data_builtin[348143] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10557,7 +10557,7 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, @@ -10589,44 +10589,16 @@ const unsigned char timelib_timezone_db_data_builtin[348584] = { 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, -0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, -0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, -0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, -0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, -0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, -0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, -0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, -0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, -0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, -0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, -0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, -0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, -0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, -0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, -0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, -0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, -0x00, +0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, +0x00, 0x21, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, +0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x0A, 0x45, +0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, +0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0xBD, 0x07, 0xED, +0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, /* Asia/Bishkek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -42868,7 +42840,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x0D, 0xD0, 0x58, 0xD6, 0xE8, 0x60, 0x59, 0xF4, 0xEF, 0xD0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xD1, 0xD0, 0x5C, 0x9F, 0xE6, 0xE0, 0x5D, 0xB4, 0xB3, 0xD0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0x95, 0xD0, 0x60, 0x5F, 0xAA, 0xE0, 0x61, 0x7D, 0xB2, 0x50, -0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x3D, 0x76, 0x50, +0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0x94, 0x50, 0x64, 0x1F, 0x6E, 0xE0, 0x65, 0x3D, 0x76, 0x50, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x58, 0x50, 0x67, 0xE8, 0x6D, 0x60, 0x68, 0xFD, 0x3A, 0x50, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x1C, 0x50, 0x6B, 0xA8, 0x31, 0x60, 0x6C, 0xC6, 0x38, 0xD0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x1A, 0xD0, 0x6F, 0x67, 0xF5, 0x60, 0x70, 0x85, 0xFC, 0xD0, @@ -42945,7 +42917,7 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, -0x00, 0x00, 0x00, 0x00, 0x64, 0x41, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, +0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, @@ -70027,4 +69999,4 @@ const unsigned char timelib_timezone_db_data_builtin[703933] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2023.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2023.3", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From b8755a75592bad3978d33d55d2fa48f52310c09e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 28 Mar 2023 23:37:40 +0200 Subject: [PATCH 739/895] Fix uninitialized variable accesses in sockets/conversions This was first pointed out in GH-10959. The from_zval_... functions don't always write to the pointer, in particular it is necessary to check for an error before using the value. Otherwise we can access an uninitialized value and that's UB (and dangerous). Note: this does *NOT* get rid of the compiler warning. Even though there is error checking now, the compiler isn't smart enough to figure out that the values can not be used uninitialized. Closes GH-10966. --- ext/sockets/conversions.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index 90a79b83985c5..a6de55106f30f 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -720,6 +720,10 @@ static void from_zval_write_sockaddr_aux(const zval *container, zend_llist_add_element(&ctx->keys, &node); from_zval_write_int(elem, (char*)&family, ctx); zend_llist_remove_tail(&ctx->keys); + + if (UNEXPECTED(ctx->err.has_error)) { + return; + } } else { family = ctx->sock->type; } @@ -1115,7 +1119,10 @@ static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_con * this least common denominator */ from_zval_write_uint32(elem, (char*)&len, ctx); - if (!ctx->err.has_error && len == 0) { + if (ctx->err.has_error) { + return; + } + if (len == 0) { do_from_zval_err(ctx, "controllen cannot be 0"); return; } From 717f460fa4f98a59c8f8d6a5058cb56bcfdd3726 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 29 Mar 2023 20:08:42 +0100 Subject: [PATCH 740/895] ext/posix: posix_eaccess little update and forgotten UPGRADING entry. (#10965) --- UPGRADING | 1 + ext/posix/posix.c | 2 +- ext/posix/tests/posix_eaccess.phpt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index 8bd2a3d9d681d..0585146329c76 100644 --- a/UPGRADING +++ b/UPGRADING @@ -142,6 +142,7 @@ PHP 8.3 UPGRADE NOTES . Added posix_sysconf call to get runtime informations. . Added posix_pathconf call to get configuration value from a directory/file. . Added posix_fpathconf call to get configuration value from a file descriptor. + . Added posix_eaccess call to check the effective user id's permission for a path. - Random: . Added Randomizer::getBytesFromString(). diff --git a/ext/posix/posix.c b/ext/posix/posix.c index da727cad15d18..bfb542bad7539 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -729,7 +729,7 @@ PHP_FUNCTION(posix_eaccess) path = expand_filepath(filename, NULL); if (!path) { - zend_argument_value_error(1, "must not be empty"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } diff --git a/ext/posix/tests/posix_eaccess.phpt b/ext/posix/tests/posix_eaccess.phpt index 4211e6ef13e72..ab47a1a0e8e36 100644 --- a/ext/posix/tests/posix_eaccess.phpt +++ b/ext/posix/tests/posix_eaccess.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECT-- -posix_eaccess(): Argument #1 ($filename) must not be empty +posix_eaccess(): Argument #1 ($filename) cannot be empty From b606e44abc9158a219af75cb5cb33ff39753f19d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 29 Mar 2023 22:18:29 +0200 Subject: [PATCH 741/895] Silence compiler warnings in ext/sockets/conversions.c (#10974) These values will be initialised, but the compiler can't see it. Write a dummy value to silence this. Closes GH-10959. --- ext/sockets/conversions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index 30c47d42c2fc6..4059758f44719 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -726,6 +726,7 @@ static void from_zval_write_sockaddr_aux(const zval *container, && Z_TYPE_P(elem) != IS_NULL) { const char *node = "family"; zend_llist_add_element(&ctx->keys, &node); + family = 0; /* Silence compiler warning */ from_zval_write_int(elem, (char*)&family, ctx); zend_llist_remove_tail(&ctx->keys); @@ -1121,7 +1122,7 @@ static void from_zval_write_iov_array(const zval *arr, char *msghdr_c, ser_conte static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_context *ctx) { struct msghdr *msghdr = (struct msghdr *)msghdr_c; - uint32_t len; + uint32_t len = 0; /* Silence compiler warning */ /* controllen should be an unsigned with at least 32-bit. Let's assume * this least common denominator From d9df750b2247bb8501eae802e1e4e912e40f9218 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Wed, 29 Mar 2023 19:51:20 -0500 Subject: [PATCH 742/895] PHP-8.1 is now for PHP 8.1.19-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index fb5882a513443..c7294f9dacad1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.1.18 +?? ??? ????, PHP 8.1.19 + + +13 Apr 2023, PHP 8.1.18 - Core: . Added optional support for max_execution_time in ZTS/Linux builds diff --git a/Zend/zend.h b/Zend/zend.h index 5633f935628f3..863d06499c9c8 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.1.18-dev" +#define ZEND_VERSION "4.1.19-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index f4ffc8b00ee32..235a0bb304d97 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.18-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.19-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 30f096bb8cc64..d42ff869a27b1 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 18 +#define PHP_RELEASE_VERSION 19 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.18-dev" -#define PHP_VERSION_ID 80118 +#define PHP_VERSION "8.1.19-dev" +#define PHP_VERSION_ID 80119 From e80073d3d2c54b195fff0bb9f3e62bb6b5f381db Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sat, 18 Mar 2023 19:38:01 +0000 Subject: [PATCH 743/895] Fix GH-10406: feof() behavior change for UNIX based socket resources This change restores the old behaviour for the server socket streams that don't support IO. This is now stored in the stream flags so it can be later used to do some other decisions and possibly introduce some better error reporting. Closes GH-10877 --- NEWS | 3 +++ ext/openssl/xp_ssl.c | 11 +++++++++-- ext/standard/tests/streams/gh10406.phpt | 20 ++++++++++++++++++++ main/php_streams.h | 2 ++ main/streams/transports.c | 3 +++ main/streams/xp_socket.c | 9 ++++++++- 6 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 ext/standard/tests/streams/gh10406.phpt diff --git a/NEWS b/NEWS index 4cdf09ba407c9..26f20f23e6bae 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.6 +- Streams: + . Fixed bug GH-10406 (feof() behavior change for UNIX based socket + resources). (Jakub Zelenka) 30 Mar 2023, PHP 8.2.5 diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 2ec25bee09117..79dd0b4f9c78d 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2429,8 +2429,15 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val if (sslsock->s.socket == -1) { alive = 0; - } else if ((!sslsock->ssl_active && value == 0 && ((MSG_DONTWAIT != 0) || !sslsock->s.is_blocked)) || - php_pollfd_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) { + } else if ( + ( + !sslsock->ssl_active && + value == 0 && + !(stream->flags & PHP_STREAM_FLAG_NO_IO) && + ((MSG_DONTWAIT != 0) || !sslsock->s.is_blocked) + ) || + php_pollfd_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0 + ) { /* the poll() call was skipped if the socket is non-blocking (or MSG_DONTWAIT is available) and if the timeout is zero */ /* additionally, we don't use this optimization if SSL is active because in that case, we're not using MSG_DONTWAIT */ if (sslsock->ssl_active) { diff --git a/ext/standard/tests/streams/gh10406.phpt b/ext/standard/tests/streams/gh10406.phpt new file mode 100644 index 0000000000000..0721dfbe9ed01 --- /dev/null +++ b/ext/standard/tests/streams/gh10406.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10406: feof() behavior change for UNIX based socket resources +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false) diff --git a/main/php_streams.h b/main/php_streams.h index 71ef26c970189..e7cbc7369ed45 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -188,6 +188,8 @@ struct _php_stream_wrapper { /* Do not close handle except it is explicitly closed by user (e.g. fclose) */ #define PHP_STREAM_FLAG_NO_RSCR_DTOR_CLOSE 0x200 +#define PHP_STREAM_FLAG_NO_IO 0x400 + #define PHP_STREAM_FLAG_WAS_WRITTEN 0x80000000 struct _php_stream { diff --git a/main/streams/transports.c b/main/streams/transports.c index 35ac4ae27ade5..6fc2848be6e67 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -169,6 +169,9 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in failed = true; } } + if (!failed) { + stream->flags |= PHP_STREAM_FLAG_NO_IO; + } } } } zend_catch { diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index be41d3dde786d..3ba79df634915 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -337,7 +337,14 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void if (sock->socket == -1) { alive = 0; - } else if ((value == 0 && ((MSG_DONTWAIT != 0) || !sock->is_blocked)) || php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) { + } else if ( + ( + value == 0 && + !(stream->flags & PHP_STREAM_FLAG_NO_IO) && + ((MSG_DONTWAIT != 0) || !sock->is_blocked) + ) || + php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0 + ) { /* the poll() call was skipped if the socket is non-blocking (or MSG_DONTWAIT is available) and if the timeout is zero */ #ifdef PHP_WIN32 int ret; From 2d6decc14c977159b90e9dcfa0c562c01794c12a Mon Sep 17 00:00:00 2001 From: NathanFreeman <1056159381@qq.com> Date: Thu, 23 Feb 2023 22:29:27 +0800 Subject: [PATCH 744/895] Fix bug #80602: Segfault when using DOMChildNode::before() This furthermore fixes the logic error explained in https://github.com/php/php-src/pull/8729#issuecomment-1161737132 Closes GH-10682. --- NEWS | 4 + ext/dom/parentnode.c | 90 +++++++++++++++-- ext/dom/tests/bug80602.phpt | 178 ++++++++++++++++++++++++++++++++++ ext/dom/tests/bug80602_2.phpt | 178 ++++++++++++++++++++++++++++++++++ 4 files changed, 441 insertions(+), 9 deletions(-) create mode 100644 ext/dom/tests/bug80602.phpt create mode 100644 ext/dom/tests/bug80602_2.phpt diff --git a/NEWS b/NEWS index c7294f9dacad1..3fc2f4ff07081 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,10 @@ PHP NEWS . Fixed bug GH-10583 (DateTime modify with tz pattern should not update linked timezone). (Derick) +- DOM: + . Fixed bug #80602 (Segfault when using DOMChildNode::before()). + (Nathan Freeman) + - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) . Destroy file_handle in fpm_main. (Jakub Zelenka, nielsdos) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 3d7e5e44a4b2c..29880a54ada66 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -181,8 +181,20 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod return NULL; } + /* + * xmlNewDocText function will always returns same address to the second parameter if the parameters are greater than or equal to three. + * If it's text, that's fine, but if it's an object, it can cause invalid pointer because many new nodes point to the same memory address. + * So we must copy the new node to avoid this situation. + */ + if (nodesc > 1) { + newNode = xmlCopyNode(newNode, 1); + } + if (!xmlAddChild(fragment, newNode)) { xmlFree(fragment); + if (nodesc > 1) { + xmlFreeNode(newNode); + } php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); return NULL; @@ -302,7 +314,9 @@ void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) { xmlNode *prevsib = dom_object_get_node(context); xmlNodePtr newchild, parentNode; - xmlNode *fragment; + xmlNode *fragment, *nextsib; + xmlDoc *doc; + bool afterlastchild; int stricterror = dom_get_strict_error(context->document); @@ -311,7 +325,10 @@ void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) return; } + doc = prevsib->doc; parentNode = prevsib->parent; + nextsib = prevsib->next; + afterlastchild = (nextsib == NULL); fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (fragment == NULL) { @@ -321,13 +338,42 @@ void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) newchild = fragment->children; if (newchild) { - fragment->last->next = prevsib->next; - prevsib->next = newchild; + /* first node and last node are both both parameters to DOMElement::after() method so nextsib and prevsib are null. */ + if (!parentNode->children) { + prevsib = nextsib = NULL; + } else if (afterlastchild) { + /* + * The new node will be inserted after last node, prevsib is last node. + * The first node is the parameter to DOMElement::after() if parentNode->children == prevsib is true + * and prevsib does not change, otherwise prevsib is parentNode->last (first node). + */ + prevsib = parentNode->children == prevsib ? prevsib : parentNode->last; + } else { + /* + * The new node will be inserted after first node, prevsib is first node. + * The first node is not the parameter to DOMElement::after() if parentNode->children == prevsib is true + * and prevsib does not change otherwise prevsib is null to mean that parentNode->children is the new node. + */ + prevsib = parentNode->children == prevsib ? prevsib : NULL; + } - newchild->prev = prevsib; + if (prevsib) { + fragment->last->next = prevsib->next; + if (prevsib->next) { + prevsib->next->prev = fragment->last; + } + prevsib->next = newchild; + } else { + parentNode->children = newchild; + if (nextsib) { + fragment->last->next = nextsib; + nextsib->prev = fragment->last; + } + } + newchild->prev = prevsib; dom_fragment_assign_parent_node(parentNode, fragment); - dom_reconcile_ns(prevsib->doc, newchild); + dom_reconcile_ns(doc, newchild); } xmlFree(fragment); @@ -337,10 +383,15 @@ void dom_parent_node_before(dom_object *context, zval *nodes, int nodesc) { xmlNode *nextsib = dom_object_get_node(context); xmlNodePtr newchild, prevsib, parentNode; - xmlNode *fragment; + xmlNode *fragment, *afternextsib; + xmlDoc *doc; + bool beforefirstchild; + doc = nextsib->doc; prevsib = nextsib->prev; + afternextsib = nextsib->next; parentNode = nextsib->parent; + beforefirstchild = !prevsib; fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (fragment == NULL) { @@ -350,19 +401,40 @@ void dom_parent_node_before(dom_object *context, zval *nodes, int nodesc) newchild = fragment->children; if (newchild) { + /* first node and last node are both both parameters to DOMElement::before() method so nextsib is null. */ + if (!parentNode->children) { + nextsib = NULL; + } else if (beforefirstchild) { + /* + * The new node will be inserted before first node, nextsib is first node and afternextsib is last node. + * The first node is not the parameter to DOMElement::before() if parentNode->children == nextsib is true + * and nextsib does not change, otherwise nextsib is the last node. + */ + nextsib = parentNode->children == nextsib ? nextsib : afternextsib; + } else { + /* + * The new node will be inserted before last node, prevsib is first node and nestsib is last node. + * The first node is not the parameter to DOMElement::before() if parentNode->children == prevsib is true + * but last node may be, so use prevsib->next to determine the value of nextsib, otherwise nextsib does not change. + */ + nextsib = parentNode->children == prevsib ? prevsib->next : nextsib; + } + if (parentNode->children == nextsib) { parentNode->children = newchild; } else { prevsib->next = newchild; } + fragment->last->next = nextsib; - nextsib->prev = fragment->last; + if (nextsib) { + nextsib->prev = fragment->last; + } newchild->prev = prevsib; dom_fragment_assign_parent_node(parentNode, fragment); - - dom_reconcile_ns(nextsib->doc, newchild); + dom_reconcile_ns(doc, newchild); } xmlFree(fragment); diff --git a/ext/dom/tests/bug80602.phpt b/ext/dom/tests/bug80602.phpt new file mode 100644 index 0000000000000..9f041f686f516 --- /dev/null +++ b/ext/dom/tests/bug80602.phpt @@ -0,0 +1,178 @@ +--TEST-- +Bug #80602 (Segfault when using DOMChildNode::before()) +--FILE-- +loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($doc->documentElement->firstChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($target, $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($doc->documentElement->lastChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($target, $doc->documentElement->firstChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($doc->documentElement->firstChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before('bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before('bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($target, 'bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before('bar', $target, 'baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before('bar', 'baz', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($target, 'bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before('bar', $target, 'baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before('bar', 'baz', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before('bar', $target, $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($target, 'bar', $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->before($target, $doc->documentElement->lastChild, 'bar'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before('bar', $doc->documentElement->firstChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($doc->documentElement->firstChild, 'bar', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->before($doc->documentElement->firstChild, $target, 'bar'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +?> +--EXPECTF-- +foo +foo +foo +foo +foo +foo +foo +foo +barbazfoo +foobarbaz +foobarbaz +barfoobaz +barbazfoo +foobarbaz +foobarbaz +foobarbaz +barfoo +foobar +foobar +barfoo +foobar +foobar diff --git a/ext/dom/tests/bug80602_2.phpt b/ext/dom/tests/bug80602_2.phpt new file mode 100644 index 0000000000000..1151417c0f845 --- /dev/null +++ b/ext/dom/tests/bug80602_2.phpt @@ -0,0 +1,178 @@ +--TEST-- +Bug #80602 (Segfault when using DOMChildNode::after()) +--FILE-- +loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($doc->documentElement->firstChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($target, $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($doc->documentElement->lastChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($target, $doc->documentElement->firstChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($doc->documentElement->firstChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after('bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after('bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($target, 'bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after('bar', $target, 'baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after('bar', 'baz', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($target, 'bar','baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after('bar', $target, 'baz'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after('bar', 'baz', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after('bar', $target, $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($target, 'bar', $doc->documentElement->lastChild); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->firstChild; +$target->after($target, $doc->documentElement->lastChild, 'bar'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after('bar', $doc->documentElement->firstChild, $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($doc->documentElement->firstChild, 'bar', $target); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + + +$doc = new \DOMDocument(); +$doc->loadXML('foo'); +$target = $doc->documentElement->lastChild; +$target->after($doc->documentElement->firstChild, $target, 'bar'); +echo $doc->saveXML($doc->documentElement).PHP_EOL; + +?> +--EXPECTF-- +foo +foo +foo +foo +foo +foo +foo +foo +foobarbaz +foobarbaz +foobarbaz +barfoobaz +barbazfoo +foobarbaz +foobarbaz +foobarbaz +barfoo +foobar +foobar +barfoo +foobar +foobar From 5e76c6d2641aae5939c5f98d52ad8cc28d9eb753 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:41:11 +0200 Subject: [PATCH 745/895] [ci skip] NEWS --- NEWS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 3fc2f4ff07081..2e3c6b290e34a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.19 +- DOM: + . Fixed bug #80602 (Segfault when using DOMChildNode::before()). + (Nathan Freeman) 13 Apr 2023, PHP 8.1.18 @@ -24,10 +27,6 @@ PHP NEWS . Fixed bug GH-10583 (DateTime modify with tz pattern should not update linked timezone). (Derick) -- DOM: - . Fixed bug #80602 (Segfault when using DOMChildNode::before()). - (Nathan Freeman) - - FPM: . Fixed bug GH-10611 (fpm_env_init_main leaks environ). (nielsdos) . Destroy file_handle in fpm_main. (Jakub Zelenka, nielsdos) From 47b3fe4710bc5320c021a0c26a27190d740a1c73 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 24 Mar 2023 19:18:28 +0100 Subject: [PATCH 746/895] Handle indirect zvals and use up-to-date properties in SplFixedArray::__serialize Closes GH-10925. --- NEWS | 4 +++ ext/spl/spl_fixedarray.c | 24 ++++++------- ext/spl/tests/gh10907.phpt | 4 +-- ext/spl/tests/gh10925.phpt | 69 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 ext/spl/tests/gh10925.phpt diff --git a/NEWS b/NEWS index 0a1bcba85efe4..8e82b4aa03b1d 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #80602 (Segfault when using DOMChildNode::before()). (Nathan Freeman) +- SPL: + . Handle indirect zvals and use up-to-date properties in + SplFixedArray::__serialize. (nielsdos) + - Streams: . Fixed bug GH-10406 (feof() behavior change for UNIX based socket resources). (Jakub Zelenka) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index bf9ec4e695fb4..c333c6d621843 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -597,8 +597,8 @@ PHP_METHOD(SplFixedArray, __serialize) RETURN_THROWS(); } - uint32_t num_properties = - intern->std.properties ? zend_hash_num_elements(intern->std.properties) : 0; + HashTable *ht = zend_std_get_properties(&intern->std); + uint32_t num_properties = zend_hash_num_elements(ht); array_init_size(return_value, intern->array.size + num_properties); /* elements */ @@ -609,17 +609,15 @@ PHP_METHOD(SplFixedArray, __serialize) } /* members */ - if (intern->std.properties) { - ZEND_HASH_FOREACH_STR_KEY_VAL(intern->std.properties, key, current) { - /* The properties hash table can also contain the array elements if the properties table was already rebuilt. - * In this case we'd have a NULL key. We can't simply use the properties table in all cases because it's - * potentially out of sync (missing elements, or containing removed elements) and might need a rebuild. */ - if (key != NULL) { - zend_hash_add_new(Z_ARRVAL_P(return_value), key, current); - Z_TRY_ADDREF_P(current); - } - } ZEND_HASH_FOREACH_END(); - } + ZEND_HASH_FOREACH_STR_KEY_VAL_IND(ht, key, current) { + /* If the properties table was already rebuild, it will also contain the + * array elements. The array elements are already added in the above loop. + * We can detect array elements by the fact that their key == NULL. */ + if (key != NULL) { + zend_hash_add_new(Z_ARRVAL_P(return_value), key, current); + Z_TRY_ADDREF_P(current); + } + } ZEND_HASH_FOREACH_END(); } PHP_METHOD(SplFixedArray, __unserialize) diff --git a/ext/spl/tests/gh10907.phpt b/ext/spl/tests/gh10907.phpt index 034c5f1d5a33c..49d98ae5ef360 100644 --- a/ext/spl/tests/gh10907.phpt +++ b/ext/spl/tests/gh10907.phpt @@ -112,10 +112,10 @@ object(SplFixedArray)#1 (3) { } ================= Test with adding members -string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" +string(180) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";s:15:"my_string_value";s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}" object(MySplFixedArray)#1 (5) { ["my_string"]=> - int(0) + string(15) "my_string_value" ["my_dynamic_property"]=> string(25) "my_dynamic_property_value" [0]=> diff --git a/ext/spl/tests/gh10925.phpt b/ext/spl/tests/gh10925.phpt new file mode 100644 index 0000000000000..5e6cc0347b46d --- /dev/null +++ b/ext/spl/tests/gh10925.phpt @@ -0,0 +1,69 @@ +--TEST-- +Properties serialization for SplFixedArray should have updated properties +--FILE-- +y); +$x->y = 2; +var_dump($x->y); +$serialized = serialize($x); +var_dump($serialized); +var_dump(unserialize($serialized)); + +$x->dynamic_property = "dynamic_property_value"; +$serialized = serialize($x); +var_dump($serialized); +var_dump(unserialize($serialized)); + +$x->dynamic_property = "dynamic_property_value2"; +$x->y = 4; +$serialized = serialize($x); +var_dump($serialized); +var_dump(unserialize($serialized)); +?> +--EXPECT-- +int(3) +int(2) +string(61) "O:15:"MySplFixedArray":4:{i:0;N;i:1;N;s:1:"x";N;s:1:"y";i:2;}" +object(MySplFixedArray)#2 (4) { + ["x"]=> + NULL + ["y"]=> + int(2) + [0]=> + NULL + [1]=> + NULL +} +string(115) "O:15:"MySplFixedArray":5:{i:0;N;i:1;N;s:1:"x";N;s:1:"y";i:2;s:16:"dynamic_property";s:22:"dynamic_property_value";}" +object(MySplFixedArray)#2 (5) { + ["x"]=> + NULL + ["y"]=> + int(2) + ["dynamic_property"]=> + string(22) "dynamic_property_value" + [0]=> + NULL + [1]=> + NULL +} +string(116) "O:15:"MySplFixedArray":5:{i:0;N;i:1;N;s:1:"x";N;s:1:"y";i:4;s:16:"dynamic_property";s:23:"dynamic_property_value2";}" +object(MySplFixedArray)#2 (5) { + ["x"]=> + NULL + ["y"]=> + int(4) + ["dynamic_property"]=> + string(23) "dynamic_property_value2" + [0]=> + NULL + [1]=> + NULL +} From 213248a0b91ef1a77aa91e4c91e7927328dcc839 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Thu, 30 Mar 2023 17:45:34 -0600 Subject: [PATCH 747/895] Document zend_get_op_array_extension_handle This very sharp edge should have been documented long ago. --- Zend/zend_extensions.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index ffcd32aa08fdc..c0c6dc8196298 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -264,6 +264,27 @@ ZEND_API int zend_get_resource_handle(const char *module_name) } } +/** + * The handle returned by this function can be used with + * `ZEND_OP_ARRAY_EXTENSION(op_array, handle)`. + * + * The extension slot has been available since PHP 7.4 on user functions and + * has been available since PHP 8.2 on internal functions. + * + * # Safety + * The extension slot made available by calling this function is initialized on + * the first call made to the function in that request. If you need to + * initialize it before this point, call `zend_init_func_run_time_cache`. + * + * The function cache slots are not available if the function is a trampoline, + * which can be checked with something like: + * + * if (fbc->type == ZEND_USER_FUNCTION + * && !(fbc->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) + * ) { + * // Use ZEND_OP_ARRAY_EXTENSION somehow + * } + */ ZEND_API int zend_get_op_array_extension_handle(const char *module_name) { int handle = zend_op_array_extension_handles++; @@ -271,6 +292,7 @@ ZEND_API int zend_get_op_array_extension_handle(const char *module_name) return handle; } +/** See zend_get_op_array_extension_handle for important usage information. */ ZEND_API int zend_get_op_array_extension_handles(const char *module_name, int handles) { int handle = zend_op_array_extension_handles; From 960f07104ca4e45d4d2812cfe4b3306fcbcf1294 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Thu, 30 Mar 2023 23:29:56 -0400 Subject: [PATCH 748/895] [skip ci] Fix PHP 8.2.5 release date in NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8e82b4aa03b1d..f355b98c61d6a 100644 --- a/NEWS +++ b/NEWS @@ -14,7 +14,7 @@ PHP NEWS . Fixed bug GH-10406 (feof() behavior change for UNIX based socket resources). (Jakub Zelenka) -30 Mar 2023, PHP 8.2.5 +13 Apr 2023, PHP 8.2.5 - Core: . Added optional support for max_execution_time in ZTS/Linux builds From 41bbb116dd6e16d975fe6e7ab82f18adb8a193fd Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 30 Mar 2023 13:22:52 +0200 Subject: [PATCH 749/895] Unary minus const expression consistency - of 0.0 should result in -0.0 Closes GH-10978 --- NEWS | 3 +++ .../unary_minus_const_expr_consistency.phpt | 16 ++++++++++++++++ Zend/zend_ast.c | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/unary_minus_const_expr_consistency.phpt diff --git a/NEWS b/NEWS index 2e3c6b290e34a..99ef4c45288ce 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.19 +- Core: + . Fix inconsistent float negation in constant expressions. (ilutov) + - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). (Nathan Freeman) diff --git a/Zend/tests/unary_minus_const_expr_consistency.phpt b/Zend/tests/unary_minus_const_expr_consistency.phpt new file mode 100644 index 0000000000000..c8175df8bed3a --- /dev/null +++ b/Zend/tests/unary_minus_const_expr_consistency.phpt @@ -0,0 +1,16 @@ +--TEST-- +Unary minus constant expression consistency +--FILE-- + +--EXPECT-- +float(-0) +float(-0) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 0e5e5ebac1688..409993c89edfa 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -662,8 +662,8 @@ ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate(zval *result, zend_ast *ast if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[0], scope) != SUCCESS)) { ret = FAILURE; } else { - ZVAL_LONG(&op1, 0); - ret = sub_function(result, &op1, &op2); + ZVAL_LONG(&op1, -1); + ret = mul_function(result, &op1, &op2); zval_ptr_dtor_nogc(&op2); } break; From 66ce20571836659dab569d6b81973d78ca3b1b00 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 29 Mar 2023 14:37:52 +0200 Subject: [PATCH 750/895] Fix incorrect zval type_flags in preg_replace_callback_array() for immutable arrays The ZVAL_ARR macro always set the zval type_info to IS_ARRAY_EX, even if the hash table is immutable. Since in preg_replace_callback_array() we can return the passed array directly, and that passed array can be immutable, we need to reset the type_flags to keep the VM from performing ref-counting on the array. Fixes GH-10968 Closes GH-10970 --- NEWS | 3 +++ ext/pcre/php_pcre.c | 7 ++++++- ext/pcre/tests/gh10968.phpt | 11 +++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ext/pcre/tests/gh10968.phpt diff --git a/NEWS b/NEWS index 99ef4c45288ce..ec9ae488a2ad3 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug #80602 (Segfault when using DOMChildNode::before()). (Nathan Freeman) +- PCRE: + . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) + 13 Apr 2023, PHP 8.1.18 - Core: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index a8d3559ef5beb..6249a80797076 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2479,7 +2479,12 @@ PHP_FUNCTION(preg_replace_callback_array) } if (subject_ht) { - RETURN_ARR(subject_ht); + RETVAL_ARR(subject_ht); + // Unset the type_flags of immutable arrays to prevent the VM from performing refcounting + if (GC_FLAGS(subject_ht) & IS_ARRAY_IMMUTABLE) { + Z_TYPE_FLAGS_P(return_value) = 0; + } + return; } else { RETURN_STR(subject_str); } diff --git a/ext/pcre/tests/gh10968.phpt b/ext/pcre/tests/gh10968.phpt new file mode 100644 index 0000000000000..873d17e79da86 --- /dev/null +++ b/ext/pcre/tests/gh10968.phpt @@ -0,0 +1,11 @@ +--TEST-- +GH-10968: preg_replace_callback_array() segmentation fault +--FILE-- + +--EXPECT-- +array(0) { +} +string(0) "" From ed0b773cb9d2f91d93e2e085b7ffaa81c502df50 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 1 Apr 2023 15:44:46 +0200 Subject: [PATCH 751/895] [skip ci] Avoid infinite loop in differ TBH I don't understand why this can happen here but not in sebastian/diff. I'll have to take a closer look. --- run-tests.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-tests.php b/run-tests.php index 57486b1d073b6..0b7d88877db0c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -3982,11 +3982,11 @@ public function diffToArray(array $from, array $to): array reset($to); foreach ($common as $token) { - while (!($this->isEqual)(reset($from), $token)) { + while (!empty($from) && !($this->isEqual)(reset($from), $token)) { $diff[] = [array_shift($from), self::REMOVED, $fromLine++]; } - while (!($this->isEqual)($token, reset($to))) { + while (!empty($to) && !($this->isEqual)($token, reset($to))) { $diff[] = [array_shift($to), self::ADDED, $toLine++]; } From cf9b030a5785fb2358d24de93cf0b342da824c49 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 1 Apr 2023 14:25:38 +0200 Subject: [PATCH 752/895] Fix GH-8841: php-cli core dump calling a badly formed function It's actually not php-cli specific, nor SAPI specific. We should delay the registration of the function into the function table until after the compilation was successful, otherwise the function is mistakingly registered and a NULL dereference will happen when trying to call it. I based my test of Nikita's test, so credits to him for the test: https://github.com/php/php-src/pull/8933#issuecomment-1259881008 Closes GH-10989. --- NEWS | 2 ++ Zend/tests/gh8841.phpt | 30 ++++++++++++++++++++++++++++++ Zend/zend_compile.c | 28 +++++++++++++++------------- 3 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 Zend/tests/gh8841.phpt diff --git a/NEWS b/NEWS index ec9ae488a2ad3..1dcf1768f0fc9 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ PHP NEWS - Core: . Fix inconsistent float negation in constant expressions. (ilutov) + . Fixed bug GH-8841 (php-cli core dump calling a badly formed function). + (nielsdos) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/Zend/tests/gh8841.phpt b/Zend/tests/gh8841.phpt new file mode 100644 index 0000000000000..d99ca62c28773 --- /dev/null +++ b/Zend/tests/gh8841.phpt @@ -0,0 +1,30 @@ +--TEST-- +GH-8841 (php-cli core dump calling a badly formed function) +--FILE-- + +--EXPECTF-- +Fatal error: A void function must not return a value in %s on line %d +Before calling g() +After calling g() +Before calling f() + +Fatal error: Uncaught Error: Call to undefined function f() in %s:%d +Stack trace: +#0 [internal function]: {closure}() +#1 {main} + thrown in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 0774fb6d19a25..14888722e13cc 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7126,7 +7126,7 @@ static uint32_t zend_add_dynamic_func_def(zend_op_array *def) { return def_offset; } -static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl, bool toplevel) /* {{{ */ +static zend_string *zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl, bool toplevel) /* {{{ */ { zend_string *unqualified_name, *name, *lcname; zend_op *opline; @@ -7157,11 +7157,7 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as zend_register_seen_symbol(lcname, ZEND_SYMBOL_FUNCTION); if (toplevel) { - if (UNEXPECTED(zend_hash_add_ptr(CG(function_table), lcname, op_array) == NULL)) { - do_bind_function_error(lcname, op_array, 1); - } - zend_string_release_ex(lcname, 0); - return; + return lcname; } uint32_t func_ref = zend_add_dynamic_func_def(op_array); @@ -7175,7 +7171,8 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as LITERAL_STR(opline->op1, zend_string_copy(lcname)); opline->op2.num = func_ref; } - zend_string_release_ex(lcname, 0); + + return lcname; } /* }}} */ @@ -7187,7 +7184,7 @@ static void zend_compile_func_decl(znode *result, zend_ast *ast, bool toplevel) zend_ast *stmt_ast = decl->child[2]; zend_ast *return_type_ast = decl->child[3]; bool is_method = decl->kind == ZEND_AST_METHOD; - zend_string *method_lcname = NULL; + zend_string *lcname; zend_class_entry *orig_class_entry = CG(active_class_entry); zend_op_array *orig_op_array = CG(active_op_array); @@ -7219,9 +7216,9 @@ static void zend_compile_func_decl(znode *result, zend_ast *ast, bool toplevel) if (is_method) { bool has_body = stmt_ast != NULL; - method_lcname = zend_begin_method_decl(op_array, decl->name, has_body); + lcname = zend_begin_method_decl(op_array, decl->name, has_body); } else { - zend_begin_func_decl(result, op_array, decl, toplevel); + lcname = zend_begin_func_decl(result, op_array, decl, toplevel); if (decl->kind == ZEND_AST_ARROW_FUNC) { find_implicit_binds(&info, params_ast, stmt_ast); compile_implicit_lexical_binds(&info, result, op_array); @@ -7264,7 +7261,7 @@ static void zend_compile_func_decl(znode *result, zend_ast *ast, bool toplevel) } zend_compile_params(params_ast, return_type_ast, - is_method && zend_string_equals_literal(method_lcname, ZEND_TOSTRING_FUNC_NAME) ? IS_STRING : 0); + is_method && zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME) ? IS_STRING : 0); if (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { zend_mark_function_as_generator(); zend_emit_op(NULL, ZEND_GENERATOR_CREATE, NULL, NULL); @@ -7280,9 +7277,14 @@ static void zend_compile_func_decl(znode *result, zend_ast *ast, bool toplevel) if (is_method) { CG(zend_lineno) = decl->start_lineno; zend_check_magic_method_implementation( - CG(active_class_entry), (zend_function *) op_array, method_lcname, E_COMPILE_ERROR); - zend_string_release_ex(method_lcname, 0); + CG(active_class_entry), (zend_function *) op_array, lcname, E_COMPILE_ERROR); + } else if (toplevel) { + /* Only register the function after a successful compile */ + if (UNEXPECTED(zend_hash_add_ptr(CG(function_table), lcname, op_array) == NULL)) { + do_bind_function_error(lcname, op_array, true); + } } + zend_string_release_ex(lcname, 0); /* put the implicit return on the really last line */ CG(zend_lineno) = decl->end_lineno; From 79c5b32d15922f3e6792a1ef6ec8402859acd3ca Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 1 Apr 2023 15:02:30 +0200 Subject: [PATCH 753/895] Fix GH-10990: mail() throws TypeError after iterating over $additional_headers array by reference We should dereference the values, otherwise references don't work. Closes GH-10991. --- NEWS | 4 ++++ ext/standard/mail.c | 2 ++ ext/standard/tests/mail/gh10990.phpt | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 ext/standard/tests/mail/gh10990.phpt diff --git a/NEWS b/NEWS index 1dcf1768f0fc9..18696f340e82b 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) +- Standard: + . Fixed bug GH-10990 (mail() throws TypeError after iterating over + $additional_headers array by reference). (nielsdos) + 13 Apr 2023, PHP 8.1.18 - Core: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 003fad3ea18c5..4299c10bc2e8e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -136,6 +136,7 @@ static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *v zend_type_error("Header \"%s\" must only contain numeric keys, \"%s\" found", ZSTR_VAL(key), ZSTR_VAL(tmp_key)); break; } + ZVAL_DEREF(tmp_val); if (Z_TYPE_P(tmp_val) != IS_STRING) { zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), zend_zval_type_name(tmp_val)); break; @@ -157,6 +158,7 @@ PHPAPI zend_string *php_mail_build_headers(HashTable *headers) zend_type_error("Header name cannot be numeric, " ZEND_LONG_FMT " given", idx); break; } + ZVAL_DEREF(val); /* https://tools.ietf.org/html/rfc2822#section-3.6 */ if (zend_string_equals_literal_ci(key, "orig-date")) { PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); diff --git a/ext/standard/tests/mail/gh10990.phpt b/ext/standard/tests/mail/gh10990.phpt new file mode 100644 index 0000000000000..4f74c17c22bda --- /dev/null +++ b/ext/standard/tests/mail/gh10990.phpt @@ -0,0 +1,17 @@ +--TEST-- +GH-10990 (mail() throws TypeError after iterating over $additional_headers array by reference) +--INI-- +sendmail_path=rubbish 2>/dev/null +--SKIPIF-- + +--FILE-- + &$from]; +var_dump(mail('test@example.com', 'Test', 'Test', $headers)); +?> +--EXPECT-- +bool(false) From dd29b66dfae343906595ebf0a89e7ec20c2852c2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 31 Mar 2023 00:27:30 +0200 Subject: [PATCH 754/895] Fix GH-10983: State-dependant segfault in ReflectionObject::getProperties This is a variant of GH-10200, but in a different place. Basically, simplexml may create a properties table that's packed instead of associative. But the macro that was used to loop over the properties table assumed that it was always associative. Replace it by the macro that figures it out automatically which one of the two it is. For test: Co-authored-by: jnvsor Closes GH-10984. --- NEWS | 4 ++++ ext/reflection/php_reflection.c | 2 +- ext/simplexml/tests/gh10983.phpt | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ext/simplexml/tests/gh10983.phpt diff --git a/NEWS b/NEWS index f6be31bc60240..2bad4ec55e0e9 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) +- Reflection: + . Fixed bug GH-10983 (State-dependant segfault in + ReflectionObject::getProperties). (nielsdos) + - SPL: . Handle indirect zvals and use up-to-date properties in SplFixedArray::__serialize. (nielsdos) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 38d86c32ab6b8..668ad768b384a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4686,7 +4686,7 @@ ZEND_METHOD(ReflectionClass, getProperties) if (Z_TYPE(intern->obj) != IS_UNDEF && (filter & ZEND_ACC_PUBLIC) != 0) { HashTable *properties = Z_OBJ_HT(intern->obj)->get_properties(Z_OBJ(intern->obj)); zval *prop; - ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(properties, key, prop) { + ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) { _adddynproperty(prop, key, ce, return_value); } ZEND_HASH_FOREACH_END(); } diff --git a/ext/simplexml/tests/gh10983.phpt b/ext/simplexml/tests/gh10983.phpt new file mode 100644 index 0000000000000..ae6da92d7de2f --- /dev/null +++ b/ext/simplexml/tests/gh10983.phpt @@ -0,0 +1,23 @@ +--TEST-- +GH-10983 (State-dependant segfault in ReflectionObject::getProperties) +--EXTENSIONS-- +simplexml +--FILE-- + +XML; + +$simplexml = simplexml_load_string($xml); + +var_dump($simplexml['name']); +$reflector = new ReflectionObject($simplexml['name']); +$rprops = $reflector->getProperties(); + +?> +--EXPECT-- +object(SimpleXMLElement)#2 (1) { + [0]=> + string(4) "test" +} From c211e67b4ec2c9a8da396627526b53cd431e3e36 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 29 Mar 2023 17:58:33 +0200 Subject: [PATCH 755/895] Remove XFAIL from test cases for mb_strcut when used with JIS or ISO-2022-JP encoding The documentation for mb_strcut states: mb_strcut( string $string, int $start, ?int $length = null, ?string $encoding = null ): string mb_strcut() extracts a substring from a string similarly to mb_substr(), but operates on bytes instead of characters. If the cut position happens to be between two bytes of a multi-byte character, the cut is performed starting from the first byte of that character. My understanding of the $length parameter for mb_strcut is that it specified the range of bytes to extract from $string, and that all characters encoded by those bytes should be included in the returned string, even if that means the returned string would be longer than $length bytes. This can happen either if 1) there is more than one way to encode the same character in $encoding, and one way requires more bytes than the other, or 2) $encoding uses escape sequences. However, discussion with users of mb_strcut indicates that many of them interpret $length as the maximum length of the *returned* string. This is also the historical behavior of the function. Hence, there is no need to modify the behavior of mb_strcut and then remove XFAIL from these test cases afterwards. We can keep the current behavior. --- ext/mbstring/tests/gh9535b.phpt | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ext/mbstring/tests/gh9535b.phpt b/ext/mbstring/tests/gh9535b.phpt index 8e68e6becdbc1..7562c3a45ff4d 100644 --- a/ext/mbstring/tests/gh9535b.phpt +++ b/ext/mbstring/tests/gh9535b.phpt @@ -1,16 +1,9 @@ --TEST-- -Output of mb_strcut covers requested range of bytes even when output contains ending escape sequences +Test output of mb_strcut for text encodings which use escape sequences --EXTENSIONS-- mbstring --FILE-- ---XFAIL-- -Discussion: https://github.com/php/php-src/pull/9562 --EXPECTF-- -JIS: 宛如繁星般 -ISO-2022-JP: 宛如繁星般 +JIS: 宛如繁星 +ISO-2022-JP: 宛如繁星 ISO-2022-JP-2004: 宛如繁星 JIS: 星のように月の ISO-2022-JP: 星のように月の -ISO-2022-JP-2004: 星のように月の +ISO-2022-JP-2004: 星のように月 JIS: あa ISO-2022-JP: あa From 50f58c8923c526a27c0898e8c69504beb1c005fd Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 2 Apr 2023 21:39:00 +0200 Subject: [PATCH 756/895] Add ASAN XLEAK support Only disable LSAN instead of skipping the test. This way we can still detect memory issues which is arguably more important anyway. Closes GH-10996 --- ext/enchant/tests/dict_quick_check.phpt | 2 +- ext/ffi/tests/bug79576.phpt | 2 +- ext/imap/tests/imap_getsubscribed_basic.phpt | 2 +- ext/imap/tests/imap_lsub_basic.phpt | 2 +- ext/imap/tests/imap_open_error.phpt | 2 +- ext/oci8/tests/privileged_connect1.phpt | 2 +- ext/opcache/tests/gh9259_003.phpt | 2 +- ext/opcache/tests/log_verbosity_bug.phpt | 2 +- ext/opcache/tests/preload_006.phpt | 2 +- ext/opcache/tests/preload_parse_error.phpt | 2 +- ext/pdo_oci/tests/pecl_bug_6364.phpt | 2 +- ext/posix/tests/posix_getgrgid_error.phpt | 2 +- ext/posix/tests/posix_getpwuid_error.phpt | 2 +- ext/pspell/tests/005.phpt | 2 +- .../general_functions/get_cfg_var_variation8.phpt | 2 +- ext/standard/tests/streams/bug46024.phpt | 2 +- run-tests.php | 13 +++++++++++-- 17 files changed, 27 insertions(+), 18 deletions(-) diff --git a/ext/enchant/tests/dict_quick_check.phpt b/ext/enchant/tests/dict_quick_check.phpt index 3cc45079f245a..b14a009af4cf4 100644 --- a/ext/enchant/tests/dict_quick_check.phpt +++ b/ext/enchant/tests/dict_quick_check.phpt @@ -6,7 +6,7 @@ marcosptf - enchant --SKIPIF-- --FILE-- --CONFLICTS-- defaultmailbox diff --git a/ext/imap/tests/imap_lsub_basic.phpt b/ext/imap/tests/imap_lsub_basic.phpt index e88aa6a8de4b8..bff521624e700 100644 --- a/ext/imap/tests/imap_lsub_basic.phpt +++ b/ext/imap/tests/imap_lsub_basic.phpt @@ -7,7 +7,7 @@ imap --SKIPIF-- --CONFLICTS-- defaultmailbox diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index 02ba0006e8c44..18f0f2ef0fa2d 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -8,7 +8,7 @@ imap --SKIPIF-- --FILE-- --INI-- oci8.privileged_connect=1 diff --git a/ext/opcache/tests/gh9259_003.phpt b/ext/opcache/tests/gh9259_003.phpt index 1666f93257ecf..04dc46b1906bb 100644 --- a/ext/opcache/tests/gh9259_003.phpt +++ b/ext/opcache/tests/gh9259_003.phpt @@ -4,7 +4,7 @@ Bug GH-9259 003 (Setting opcache.interned_strings_buffer to a very high value le opcache --SKIPIF-- --INI-- opcache.interned_strings_buffer=500 diff --git a/ext/opcache/tests/log_verbosity_bug.phpt b/ext/opcache/tests/log_verbosity_bug.phpt index 6b7e04e2b8c87..8467e4b3b8e67 100644 --- a/ext/opcache/tests/log_verbosity_bug.phpt +++ b/ext/opcache/tests/log_verbosity_bug.phpt @@ -14,7 +14,7 @@ opcache.log_verbosity_level=-1 opcache --SKIPIF-- --FILE-- --FILE-- --FILE-- OK diff --git a/ext/pdo_oci/tests/pecl_bug_6364.phpt b/ext/pdo_oci/tests/pecl_bug_6364.phpt index 9a97496fd0fb2..afd3685a5b613 100644 --- a/ext/pdo_oci/tests/pecl_bug_6364.phpt +++ b/ext/pdo_oci/tests/pecl_bug_6364.phpt @@ -5,7 +5,7 @@ pdo pdo_oci --SKIPIF-- diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt index 952a3894ef8c3..f0d49a7860f8a 100644 --- a/ext/posix/tests/posix_getgrgid_error.phpt +++ b/ext/posix/tests/posix_getgrgid_error.phpt @@ -4,7 +4,7 @@ Test posix_getgrgid() function : error conditions posix --SKIPIF-- --FILE-- --FILE-- --FILE-- + --FILE-- --FILE-- setSection('XFAIL', ltrim(substr($output, 5))); + } elseif (!strncasecmp('xleak', $output, 5)) { + // Pretend we have an XLEAK section + $test->setSection('XLEAK', ltrim(substr($output, 5))); } elseif ($output !== '') { show_result("BORK", $output, $tested_file, 'reason: invalid output from SKIPIF', $temp_filenames); $PHP_FAILED_TESTS['BORKED'][] = [ @@ -2461,6 +2464,10 @@ function run_test(string $php, $file, array $env): string $cmd = $valgrind->wrapCommand($cmd, $memcheck_filename, strpos($test_file, "pcre") !== false); } + if ($test->hasSection('XLEAK') && isset($env['SKIP_ASAN'])) { + $env['LSAN_OPTIONS'] = 'detect_leaks=0'; + } + if ($DETAILED) { echo " CONTENT_LENGTH = " . $env['CONTENT_LENGTH'] . " @@ -2657,7 +2664,8 @@ function run_test(string $php, $file, array $env): string if ($test->hasSection('XFAIL')) { $warn = true; $info = " (warn: XFAIL section but test passes)"; - } elseif ($test->hasSection('XLEAK')) { + } elseif ($test->hasSection('XLEAK') && !isset($env['SKIP_ASAN'])) { + // XLEAK with ASAN completely disables LSAN so the test is expected to pass $warn = true; $info = " (warn: XLEAK section but test passes)"; } else { @@ -2694,7 +2702,8 @@ function run_test(string $php, $file, array $env): string if ($test->hasSection('XFAIL')) { $restype[] = 'XFAIL'; $info = ' XFAIL REASON: ' . rtrim($test->getSection('XFAIL')); - } elseif ($test->hasSection('XLEAK')) { + } elseif ($test->hasSection('XLEAK') && !isset($env['SKIP_ASAN'])) { + // XLEAK with ASAN completely disables LSAN so the test is expected to pass $restype[] = 'XLEAK'; $info = ' XLEAK REASON: ' . rtrim($test->getSection('XLEAK')); } else { From 84b4020eb4a8ebc45cb80164d4589cbf818f47f2 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 29 Mar 2023 20:51:14 +0200 Subject: [PATCH 757/895] Fix add_function_array() assertion when op2 contains op1 Fixes GH-10085 Closes GH-10975 Co-authored-by: Dmitry Stogov --- NEWS | 2 ++ Zend/tests/gh10085_1.phpt | 22 ++++++++++++++++++++++ Zend/tests/gh10085_2.phpt | 25 +++++++++++++++++++++++++ Zend/zend_operators.c | 18 ++++++++++++------ 4 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 Zend/tests/gh10085_1.phpt create mode 100644 Zend/tests/gh10085_2.phpt diff --git a/NEWS b/NEWS index 18696f340e82b..8752a5009000e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Fix inconsistent float negation in constant expressions. (ilutov) . Fixed bug GH-8841 (php-cli core dump calling a badly formed function). (nielsdos) + . Fixed bug GH-10085 (Assertion when adding two arrays with += where the first + array is contained in the second). (ilutov) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/Zend/tests/gh10085_1.phpt b/Zend/tests/gh10085_1.phpt new file mode 100644 index 0000000000000..cc11c96a09d32 --- /dev/null +++ b/Zend/tests/gh10085_1.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10085: Assertion in add_function_array() +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + array(2) { + [0]=> + array(0) { + } + [1]=> + int(0) + } + [1]=> + int(0) +} diff --git a/Zend/tests/gh10085_2.phpt b/Zend/tests/gh10085_2.phpt new file mode 100644 index 0000000000000..7895999f2cd05 --- /dev/null +++ b/Zend/tests/gh10085_2.phpt @@ -0,0 +1,25 @@ +--TEST-- +GH-10085: Assertion in add_function_array() +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + array(2) { + [0]=> + array(0) { + } + [1]=> + int(0) + } + [1]=> + int(0) +} diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index ef5c50c4336d2..387cc8baa7450 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -965,16 +965,22 @@ static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error(const cha static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) /* {{{ */ { - if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { - /* $a += $a */ - return; - } if (result != op1) { ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); + zend_hash_merge(Z_ARRVAL_P(result), Z_ARRVAL_P(op2), zval_add_ref, 0); + } else if (Z_ARR_P(op1) == Z_ARR_P(op2)) { + /* $a += $a */ } else { - SEPARATE_ARRAY(result); + /* We have to duplicate op1 (even with refcount == 1) because it may be an element of op2 + * and therefore its reference counter may be increased by zend_hash_merge(). That leads to + * an assertion in _zend_hash_add_or_update_i() that only allows adding elements to hash + * tables with RC1. See GH-10085 and Zend/tests/gh10085*.phpt */ + zval tmp; + ZVAL_ARR(&tmp, zend_array_dup(Z_ARR_P(op1))); + zend_hash_merge(Z_ARRVAL(tmp), Z_ARRVAL_P(op2), zval_add_ref, 0); + zval_ptr_dtor(result); + ZVAL_COPY_VALUE(result, &tmp); } - zend_hash_merge(Z_ARRVAL_P(result), Z_ARRVAL_P(op2), zval_add_ref, 0); } /* }}} */ From fc88f155be396c7a7092049436d39d96773ede4d Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 3 Apr 2023 11:37:27 +0200 Subject: [PATCH 758/895] Add zend_alloc XLEAK support In the future we may want to use a different exit code to warn for tests that didn't leak. Closes GH-10999 --- Zend/zend_alloc.c | 5 ++++- ext/pcntl/tests/bug81577_3.phpt | 2 +- run-tests.php | 11 +++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 4cb9386eed17b..7335baf849d5e 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2290,7 +2290,10 @@ void zend_mm_shutdown(zend_mm_heap *heap, bool full, bool silent) #if ZEND_DEBUG if (!silent) { - zend_mm_check_leaks(heap); + char *tmp = getenv("ZEND_ALLOC_PRINT_LEAKS"); + if (!tmp || ZEND_ATOL(tmp)) { + zend_mm_check_leaks(heap); + } } #endif diff --git a/ext/pcntl/tests/bug81577_3.phpt b/ext/pcntl/tests/bug81577_3.phpt index cd77324aebd0f..1a30deaebaaba 100644 --- a/ext/pcntl/tests/bug81577_3.phpt +++ b/ext/pcntl/tests/bug81577_3.phpt @@ -3,7 +3,7 @@ Bug #81577: (Exceptions in interrupt handlers: cleanup_live_vars) --EXTENSIONS-- pcntl posix ---XFAIL-- +--XLEAK-- leaks are not fixed yet --FILE-- wrapCommand($cmd, $memcheck_filename, strpos($test_file, "pcre") !== false); } - if ($test->hasSection('XLEAK') && isset($env['SKIP_ASAN'])) { - $env['LSAN_OPTIONS'] = 'detect_leaks=0'; + if ($test->hasSection('XLEAK')) { + $env['ZEND_ALLOC_PRINT_LEAKS'] = '0'; + if (isset($env['SKIP_ASAN'])) { + $env['LSAN_OPTIONS'] = 'detect_leaks=0'; + } } if ($DETAILED) { @@ -2664,7 +2667,7 @@ function run_test(string $php, $file, array $env): string if ($test->hasSection('XFAIL')) { $warn = true; $info = " (warn: XFAIL section but test passes)"; - } elseif ($test->hasSection('XLEAK') && !isset($env['SKIP_ASAN'])) { + } elseif ($test->hasSection('XLEAK') && $valgrind) { // XLEAK with ASAN completely disables LSAN so the test is expected to pass $warn = true; $info = " (warn: XLEAK section but test passes)"; @@ -2702,7 +2705,7 @@ function run_test(string $php, $file, array $env): string if ($test->hasSection('XFAIL')) { $restype[] = 'XFAIL'; $info = ' XFAIL REASON: ' . rtrim($test->getSection('XFAIL')); - } elseif ($test->hasSection('XLEAK') && !isset($env['SKIP_ASAN'])) { + } elseif ($test->hasSection('XLEAK') && $valgrind) { // XLEAK with ASAN completely disables LSAN so the test is expected to pass $restype[] = 'XLEAK'; $info = ' XLEAK REASON: ' . rtrim($test->getSection('XLEAK')); From 8a749c79d02b373e8bae6999ab7a7ad621b57e6a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 3 Apr 2023 18:15:41 +0300 Subject: [PATCH 759/895] Tracing JIT: Fixed incorrect code generation fofr SEND-ing of result of ASSIGN to typed reference --- ext/opcache/jit/zend_jit_trace.c | 8 ++++++++ ext/opcache/tests/jit/assign_056.phpt | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ext/opcache/tests/jit/assign_056.phpt diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index eac9719a98c2c..c0dc07d684645 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -4979,6 +4979,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par res_addr = 0; } else { res_addr = RES_REG_ADDR(); + if (Z_MODE(res_addr) != IS_REG + && zend_jit_trace_next_is_send_result(opline, p, frame)) { + send_result = 1; + res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_RX, (opline+1)->result.var); + if (!zend_jit_reuse_ip(&dasm_state)) { + goto jit_failure; + } + } } if (!zend_jit_assign_to_typed_ref(&dasm_state, opline, opline->op2_type, op2_addr, res_addr, 1)) { goto jit_failure; diff --git a/ext/opcache/tests/jit/assign_056.phpt b/ext/opcache/tests/jit/assign_056.phpt new file mode 100644 index 0000000000000..5ad56213c305e --- /dev/null +++ b/ext/opcache/tests/jit/assign_056.phpt @@ -0,0 +1,21 @@ +--TEST-- +JIT ASSIGN: ASSING+SEND and typed reference +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +opcache.protect_memory=1 +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} From 3a21a8744389fcbf2f40d87d5a3a7e02d56bfce8 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 3 Apr 2023 16:55:12 +0200 Subject: [PATCH 760/895] [skip ci] Notify Slack on nightly failure --- .github/actions/notify-slack/action.yml | 15 +++++++++ .github/workflows/nightly.yml | 45 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/actions/notify-slack/action.yml diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml new file mode 100644 index 0000000000000..f447894a21d7a --- /dev/null +++ b/.github/actions/notify-slack/action.yml @@ -0,0 +1,15 @@ +name: Notify Slack +inputs: + token: + required: true +runs: + using: composite + steps: + - name: Notify Slack + if: always() + uses: ravsamhq/notify-slack-action@v1 + with: + status: ${{ job.status }} + notify_when: 'failure' + env: + SLACK_WEBHOOK_URL: ${{ inputs.token }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 22dbe8d061b9b..ac6473ac74862 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -30,6 +30,11 @@ jobs: - name: Generate Matrix id: set-matrix run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} LINUX_X64: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -104,6 +109,11 @@ jobs: -d opcache.jit=1205 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} LINUX_X32: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -175,6 +185,11 @@ jobs: -d opcache.enable_cli=1 -d opcache.jit_buffer_size=16M -d opcache.jit=1205 + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} MACOS: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -233,6 +248,11 @@ jobs: -d opcache.jit=1205 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} COVERAGE_DEBUG_NTS: if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-20.04 @@ -267,6 +287,11 @@ jobs: - name: Upload Test Coverage to Codecov.io if: always() run: bash <(curl -s https://codecov.io/bash) + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} COMMUNITY: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -382,6 +407,11 @@ jobs: if [ $EXIT_CODE -gt 128 ]; then exit 1 fi + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} OPCACHE_VARIATION: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -453,6 +483,11 @@ jobs: -d opcache.file_cache_only=1 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} MSAN: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -545,6 +580,11 @@ jobs: -d opcache.enable_cli=1 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} LIBMYSQLCLIENT: needs: GENERATE_MATRIX if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} @@ -600,3 +640,8 @@ jobs: withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }} - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Notify Slack + if: always() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} From 0579beb84228242466143c685d4034dc4152c3a3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:28:09 +0200 Subject: [PATCH 761/895] Fix incorrect error handling in dom_zvals_to_fragment() Discovered this pre-existing problem while testing GH-10682. Note: this problem existed *before* that PR. * Not all paths throw a hierarchy request error * xmlFreeNode must be used instead of xmlFree for the fragment to also free its children. * Free up nodes that couldn't be added when xmlAddChild fails. I unified the error handling code that's exactly the same with a goto to prevent at least some of such problems in the future. Closes GH-10981. --- NEWS | 1 + ext/dom/parentnode.c | 33 +++++++++++++-------------------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index 8752a5009000e..7de39a848302c 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP NEWS - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). (Nathan Freeman) + . Fixed incorrect error handling in dom_zvals_to_fragment(). (nielsdos) - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 29880a54ada66..cf823057d22ae 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -162,9 +162,8 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod newNode = dom_object_get_node(newNodeObj); if (newNode->doc != documentNode) { - xmlFree(fragment); php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); - return NULL; + goto err; } if (newNode->parent != NULL) { @@ -175,10 +174,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod xmlSetTreeDoc(newNode, documentNode); if (newNode->type == XML_ATTRIBUTE_NODE) { - xmlFree(fragment); - - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); - return NULL; + goto hierarchy_request_err; } /* @@ -191,21 +187,16 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod } if (!xmlAddChild(fragment, newNode)) { - xmlFree(fragment); if (nodesc > 1) { xmlFreeNode(newNode); } - - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); - return NULL; + goto hierarchy_request_err; } continue; } else { - xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); - return NULL; + goto err; } } else if (Z_TYPE(nodes[i]) == IS_STRING) { newNode = xmlNewDocText(documentNode, (xmlChar *) Z_STRVAL(nodes[i])); @@ -213,20 +204,22 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod xmlSetTreeDoc(newNode, documentNode); if (!xmlAddChild(fragment, newNode)) { - xmlFree(fragment); - - return NULL; + xmlFreeNode(newNode); + goto hierarchy_request_err; } } else { - xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); - - return NULL; + goto err; } } return fragment; + +hierarchy_request_err: + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); +err: + xmlFreeNode(fragment); + return NULL; } static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment) From 0a169cbd5bd6880651748137e819f67b0c1cc194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 3 Apr 2023 22:07:36 +0200 Subject: [PATCH 762/895] Add forgotten upgrading note for the Readonly amendments RFC --- UPGRADING | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UPGRADING b/UPGRADING index 0585146329c76..eff0b3d7016c6 100644 --- a/UPGRADING +++ b/UPGRADING @@ -46,6 +46,8 @@ PHP 8.3 UPGRADE NOTES - Core . Anonymous classes may now be marked as readonly. + . Readonly properties can now be reinitialized during cloning. + RFC: https://wiki.php.net/rfc/readonly_amendments - Posix . posix_getrlimit() now takes an optional $res parameter to allow fetching a From f42992f580343931434dff2e4b2042ff945b48a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 3 Apr 2023 22:13:47 +0200 Subject: [PATCH 763/895] Remove name field from the zend_constant struct (#10954) As global constant names are case-sensitive now, we don't have to store them separately above the constant table. --- UPGRADING.INTERNALS | 4 +++ Zend/zend_builtin_functions.c | 22 +++++--------- Zend/zend_constants.c | 44 ++++++++++++--------------- Zend/zend_constants.h | 4 +-- Zend/zend_execute.c | 2 +- Zend/zend_execute_API.c | 3 -- Zend/zend_vm_def.h | 3 +- Zend/zend_vm_execute.h | 3 +- ext/com_dotnet/com_typeinfo.c | 9 +++--- ext/opcache/ZendAccelerator.c | 3 -- ext/opcache/jit/zend_jit_vm_helpers.c | 2 +- ext/reflection/php_reflection.c | 11 ++++--- sapi/cli/php_cli.c | 9 ++---- sapi/phpdbg/phpdbg.c | 21 +++++++------ sapi/phpdbg/phpdbg_info.c | 9 +++--- 15 files changed, 68 insertions(+), 81 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 4ec7cc5271191..775119ba6ada4 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -42,6 +42,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES * The order of members of zend_op_array, zend_ssa_var, zend_ssa_var_info, zend_executor_globals and php_core_globals have changed to improve struct packing which reduces their size. +* The name field have been removed from the zend_constant struct. Now, + constant names are only stored as keys of the global constants table. + That's why the `zend_register_constant()` function now expects the + constant name as its first parameter. ======================== 2. Build system changes diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index c332f5a3220eb..b8cd96c480282 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -511,8 +511,7 @@ ZEND_FUNCTION(define) register_constant: /* non persistent */ ZEND_CONSTANT_SET_FLAGS(&c, 0, PHP_USER_CONSTANT); - c.name = zend_string_copy(name); - if (zend_register_constant(&c) == SUCCESS) { + if (zend_register_constant(name, &c) == SUCCESS) { RETURN_TRUE; } else { RETURN_FALSE; @@ -1480,6 +1479,7 @@ ZEND_FUNCTION(get_defined_constants) zend_constant *val; int module_number; zval *modules, const_val; + zend_string *const_name; char **module_names; zend_module_entry *module; int i = 1; @@ -1494,12 +1494,7 @@ ZEND_FUNCTION(get_defined_constants) } ZEND_HASH_FOREACH_END(); module_names[i] = "user"; - ZEND_HASH_MAP_FOREACH_PTR(EG(zend_constants), val) { - if (!val->name) { - /* skip special constants */ - continue; - } - + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(EG(zend_constants), const_name, val) { if (ZEND_CONSTANT_MODULE_NUMBER(val) == PHP_USER_CONSTANT) { module_number = i; } else if (ZEND_CONSTANT_MODULE_NUMBER(val) > i) { @@ -1515,22 +1510,19 @@ ZEND_FUNCTION(get_defined_constants) } ZVAL_COPY_OR_DUP(&const_val, &val->value); - zend_hash_add_new(Z_ARRVAL(modules[module_number]), val->name, &const_val); + zend_hash_add_new(Z_ARRVAL(modules[module_number]), const_name, &const_val); } ZEND_HASH_FOREACH_END(); efree(module_names); efree(modules); } else { zend_constant *constant; + zend_string *const_name; zval const_val; - ZEND_HASH_MAP_FOREACH_PTR(EG(zend_constants), constant) { - if (!constant->name) { - /* skip special constants */ - continue; - } + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(EG(zend_constants), const_name, constant) { ZVAL_COPY_OR_DUP(&const_val, &constant->value); - zend_hash_add_new(Z_ARRVAL_P(return_value), constant->name, &const_val); + zend_hash_add_new(Z_ARRVAL_P(return_value), const_name, &const_val); } ZEND_HASH_FOREACH_END(); } } diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index f002e321d8b2b..f4ed521605968 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -43,15 +43,9 @@ void free_zend_constant(zval *zv) if (!(ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT)) { zval_ptr_dtor_nogc(&c->value); - if (c->name) { - zend_string_release_ex(c->name, 0); - } efree(c); } else { zval_internal_ptr_dtor(&c->value); - if (c->name) { - zend_string_release_ex(c->name, 1); - } free(c); } } @@ -67,7 +61,6 @@ static void copy_zend_constant(zval *zv) memcpy(Z_PTR_P(zv), c, sizeof(zend_constant)); c = Z_PTR_P(zv); - c->name = zend_string_copy(c->name); if (Z_TYPE(c->value) == IS_STRING) { Z_STR(c->value) = zend_string_dup(Z_STR(c->value), 1); } @@ -129,8 +122,7 @@ ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int ZVAL_NULL(&c.value); ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number); - c.name = zend_string_init_interned(name, name_len, flags & CONST_PERSISTENT); - zend_register_constant(&c); + zend_register_internal_constant(name, name_len, &c); } ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number) @@ -139,8 +131,7 @@ ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, boo ZVAL_BOOL(&c.value, bval); ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number); - c.name = zend_string_init_interned(name, name_len, flags & CONST_PERSISTENT); - zend_register_constant(&c); + zend_register_internal_constant(name, name_len, &c); } ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zend_long lval, int flags, int module_number) @@ -149,8 +140,7 @@ ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zen ZVAL_LONG(&c.value, lval); ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number); - c.name = zend_string_init_interned(name, name_len, flags & CONST_PERSISTENT); - zend_register_constant(&c); + zend_register_internal_constant(name, name_len, &c); } @@ -160,8 +150,7 @@ ZEND_API void zend_register_double_constant(const char *name, size_t name_len, d ZVAL_DOUBLE(&c.value, dval); ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number); - c.name = zend_string_init_interned(name, name_len, flags & CONST_PERSISTENT); - zend_register_constant(&c); + zend_register_internal_constant(name, name_len, &c); } @@ -171,8 +160,7 @@ ZEND_API void zend_register_stringl_constant(const char *name, size_t name_len, ZVAL_STR(&c.value, zend_string_init_interned(strval, strlen, flags & CONST_PERSISTENT)); ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number); - c.name = zend_string_init_interned(name, name_len, flags & CONST_PERSISTENT); - zend_register_constant(&c); + zend_register_internal_constant(name, name_len, &c); } @@ -545,10 +533,9 @@ static void* zend_hash_add_constant(HashTable *ht, zend_string *key, zend_consta return ret; } -ZEND_API zend_result zend_register_constant(zend_constant *c) +ZEND_API zend_result zend_register_constant(zend_string *name, zend_constant *c) { zend_string *lowercase_name = NULL; - zend_string *name; zend_result ret = SUCCESS; bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0; @@ -556,14 +543,12 @@ ZEND_API zend_result zend_register_constant(zend_constant *c) printf("Registering constant for module %d\n", c->module_number); #endif - const char *slash = strrchr(ZSTR_VAL(c->name), '\\'); + const char *slash = strrchr(ZSTR_VAL(name), '\\'); if (slash) { - lowercase_name = zend_string_init(ZSTR_VAL(c->name), ZSTR_LEN(c->name), persistent); - zend_str_tolower(ZSTR_VAL(lowercase_name), slash - ZSTR_VAL(c->name)); + lowercase_name = zend_string_init(ZSTR_VAL(name), ZSTR_LEN(name), persistent); + zend_str_tolower(ZSTR_VAL(lowercase_name), slash - ZSTR_VAL(name)); lowercase_name = zend_new_interned_string(lowercase_name); name = lowercase_name; - } else { - name = c->name; } /* Check if the user is trying to define any special constant */ @@ -572,7 +557,6 @@ ZEND_API zend_result zend_register_constant(zend_constant *c) || zend_hash_add_constant(EG(zend_constants), name, c) == NULL ) { zend_error(E_WARNING, "Constant %s already defined", ZSTR_VAL(name)); - zend_string_release(c->name); if (!persistent) { zval_ptr_dtor_nogc(&c->value); } @@ -583,3 +567,13 @@ ZEND_API zend_result zend_register_constant(zend_constant *c) } return ret; } + +ZEND_API zend_result zend_register_internal_constant(const char *name, size_t name_len, zend_constant *c) { + zend_string *name_str = zend_string_init_interned(name, name_len, ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT); + + zend_result result = zend_register_constant(name_str, c); + + zend_string_release(name_str); + + return result; +} diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 736dbb0091085..d0ad242143fb4 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -32,7 +32,6 @@ typedef struct _zend_constant { zval value; - zend_string *name; } zend_constant; #define ZEND_CONSTANT_FLAGS(c) \ @@ -84,7 +83,8 @@ ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zen ZEND_API void zend_register_double_constant(const char *name, size_t name_len, double dval, int flags, int module_number); ZEND_API void zend_register_string_constant(const char *name, size_t name_len, const char *strval, int flags, int module_number); ZEND_API void zend_register_stringl_constant(const char *name, size_t name_len, const char *strval, size_t strlen, int flags, int module_number); -ZEND_API zend_result zend_register_constant(zend_constant *c); +ZEND_API zend_result zend_register_internal_constant(const char *name, size_t name_len, zend_constant *c); +ZEND_API zend_result zend_register_constant(zend_string *name, zend_constant *c); #ifdef ZTS void zend_copy_constants(HashTable *target, HashTable *source); #endif diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index abe3b8042c96e..d7894289c0d72 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4961,7 +4961,7 @@ static zend_always_inline zend_result _zend_quick_get_constant( if (!check_defined_only) { ZVAL_COPY_OR_DUP(EX_VAR(opline->result.var), &c->value); if (ZEND_CONSTANT_FLAGS(c) & CONST_DEPRECATED) { - zend_error(E_DEPRECATED, "Constant %s is deprecated", ZSTR_VAL(c->name)); + zend_error(E_DEPRECATED, "Constant %s is deprecated", ZSTR_VAL(Z_STR_P(key))); return SUCCESS; } } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 9efe205abe037..c1a5e31f7e6d9 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -294,9 +294,6 @@ ZEND_API void zend_shutdown_executor_values(bool fast_shutdown) break; } zval_ptr_dtor_nogc(&c->value); - if (c->name) { - zend_string_release_ex(c->name, 0); - } efree(c); zend_string_release_ex(key, 0); } ZEND_HASH_MAP_FOREACH_END_DEL(); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 57d5cf887aca9..5dd6e20b53111 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8096,9 +8096,8 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST) } /* non persistent, case sensitive */ ZEND_CONSTANT_SET_FLAGS(&c, 0, PHP_USER_CONSTANT); - c.name = zend_string_copy(Z_STR_P(name)); - if (zend_register_constant(&c) == FAILURE) { + if (zend_register_constant(Z_STR_P(name), &c) == FAILURE) { } FREE_OP1(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 95e66b0cac3a7..79e0f5ba606bd 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7585,9 +7585,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST } /* non persistent, case sensitive */ ZEND_CONSTANT_SET_FLAGS(&c, 0, PHP_USER_CONSTANT); - c.name = zend_string_copy(Z_STR_P(name)); - if (zend_register_constant(&c) == FAILURE) { + if (zend_register_constant(Z_STR_P(name), &c) == FAILURE) { } diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index ccdcc3ff7e8c8..bebbe2e2ad024 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -197,7 +197,7 @@ PHP_COM_DOTNET_API zend_result php_com_import_typelib(ITypeLib *TL, int mode, in if (pTKind == TKIND_ENUM) { ITypeLib_GetTypeInfo(TL, i, &TypeInfo); for (j = 0; ; j++) { - zend_string *const_name; + zend_string *const_name, *name; if (FAILED(ITypeInfo_GetVarDesc(TypeInfo, j, &pVarDesc))) { break; @@ -228,12 +228,13 @@ PHP_COM_DOTNET_API zend_result php_com_import_typelib(ITypeLib *TL, int mode, in ZVAL_LONG(&c.value, Z_LVAL(value)); if (mode & CONST_PERSISTENT) { /* duplicate string in a persistent manner */ - c.name = zend_string_dup(const_name, /* persistent */ true); + name = zend_string_dup(const_name, /* persistent */ true); zend_string_release_ex(const_name, /* persistent */ false); } else { - c.name = const_name; + name = const_name; } - zend_register_constant(&c); + zend_register_constant(name, &c); + zend_string_release(name); } ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); } diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9f5992831d1e9..9b64eb382c68c 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -731,9 +731,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int p->key = new_interned_string(p->key); } c = (zend_constant*)Z_PTR(p->val); - if (c->name) { - c->name = new_interned_string(c->name); - } if (Z_TYPE(c->value) == IS_STRING) { ZVAL_STR(&c->value, new_interned_string(Z_STR(c->value))); } diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 8e02fbbbfeac2..ea23b4b2ed815 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -282,7 +282,7 @@ static zend_always_inline zend_constant* _zend_quick_get_constant( if (!check_defined_only) { if (ZEND_CONSTANT_FLAGS(c) & CONST_DEPRECATED) { - zend_error(E_DEPRECATED, "Constant %s is deprecated", ZSTR_VAL(c->name)); + zend_error(E_DEPRECATED, "Constant %s is deprecated", ZSTR_VAL(Z_STR_P(key))); if (EG(exception)) { return NULL; } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 1905a6080f315..467da74a9b976 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1040,11 +1040,13 @@ static void _extension_string(smart_str *str, zend_module_entry *module, char *i { smart_str str_constants = {0}; zend_constant *constant; + zend_string *name; int num_constants = 0; - ZEND_HASH_MAP_FOREACH_PTR(EG(zend_constants), constant) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(EG(zend_constants), name, constant) { + if (ZEND_CONSTANT_MODULE_NUMBER(constant) == module->module_number) { - _const_string(&str_constants, ZSTR_VAL(constant->name), &constant->value, indent); + _const_string(&str_constants, ZSTR_VAL(name), &constant->value, indent); num_constants++; } } ZEND_HASH_FOREACH_END(); @@ -5992,6 +5994,7 @@ ZEND_METHOD(ReflectionExtension, getConstants) reflection_object *intern; zend_module_entry *module; zend_constant *constant; + zend_string *name; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -5999,11 +6002,11 @@ ZEND_METHOD(ReflectionExtension, getConstants) GET_REFLECTION_OBJECT_PTR(module); array_init(return_value); - ZEND_HASH_MAP_FOREACH_PTR(EG(zend_constants), constant) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(EG(zend_constants), name, constant) { if (module->module_number == ZEND_CONSTANT_MODULE_NUMBER(constant)) { zval const_val; ZVAL_COPY_OR_DUP(&const_val, &constant->value); - zend_hash_update(Z_ARRVAL_P(return_value), constant->name, &const_val); + zend_hash_update(Z_ARRVAL_P(return_value), name, &const_val); } } ZEND_HASH_FOREACH_END(); } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 4766fac2537cd..2f936a39b714f 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -558,16 +558,13 @@ static void cli_register_file_handles(void) php_stream_to_zval(s_err, &ec.value); Z_CONSTANT_FLAGS(ic.value) = 0; - ic.name = zend_string_init_interned("STDIN", sizeof("STDIN")-1, 0); - zend_register_constant(&ic); + zend_register_internal_constant("STDIN", sizeof("STDIN")-1, &ic); Z_CONSTANT_FLAGS(oc.value) = 0; - oc.name = zend_string_init_interned("STDOUT", sizeof("STDOUT")-1, 0); - zend_register_constant(&oc); + zend_register_internal_constant("STDOUT", sizeof("STDOUT")-1, &oc); Z_CONSTANT_FLAGS(ec.value) = 0; - ec.name = zend_string_init_interned("STDERR", sizeof("STDERR")-1, 0); - zend_register_constant(&ec); + zend_register_internal_constant("STDERR", sizeof("STDERR")-1, &ec); } static const char *param_mode_conflict = "Either execute direct code, process stdin or use a file.\n"; diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index de9a73ea45412..ba70244c143f0 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -912,21 +912,24 @@ void phpdbg_register_file_handles(void) /* {{{ */ ic.value = zin; Z_CONSTANT_FLAGS(ic.value) = 0; - ic.name = zend_string_init(ZEND_STRL("STDIN"), 0); - zend_hash_del(EG(zend_constants), ic.name); - zend_register_constant(&ic); + zend_string *stdin_name = zend_string_init(ZEND_STRL("STDIN"), 0); + zend_hash_del(EG(zend_constants), stdin_name); + zend_register_constant(stdin_name, &ic); + zend_string_release(stdin_name); oc.value = zout; Z_CONSTANT_FLAGS(oc.value) = 0; - oc.name = zend_string_init(ZEND_STRL("STDOUT"), 0); - zend_hash_del(EG(zend_constants), oc.name); - zend_register_constant(&oc); + zend_string *stdout_name = zend_string_init(ZEND_STRL("STDOUT"), 0); + zend_hash_del(EG(zend_constants), stdout_name); + zend_register_constant(stdout_name, &oc); + zend_string_release(stdout_name); ec.value = zerr; Z_CONSTANT_FLAGS(ec.value) = 0; - ec.name = zend_string_init(ZEND_STRL("STDERR"), 0); - zend_hash_del(EG(zend_constants), ec.name); - zend_register_constant(&ec); + zend_string *stderr_name = zend_string_init(ZEND_STRL("STDERR"), 0); + zend_hash_del(EG(zend_constants), stderr_name); + zend_register_constant(stderr_name, &ec); + zend_string_release(stderr_name); } /* }}} */ diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c index 0a1e7570a493c..d6457ef805cf7 100644 --- a/sapi/phpdbg/phpdbg_info.c +++ b/sapi/phpdbg/phpdbg_info.c @@ -100,14 +100,15 @@ PHPDBG_INFO(constants) /* {{{ */ { HashTable consts; zend_constant *data; + zend_string *name; zend_hash_init(&consts, 8, NULL, NULL, 0); if (EG(zend_constants)) { phpdbg_try_access { - ZEND_HASH_MAP_FOREACH_PTR(EG(zend_constants), data) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(EG(zend_constants), name, data) { if (ZEND_CONSTANT_MODULE_NUMBER(data) == PHP_USER_CONSTANT) { - zend_hash_update_ptr(&consts, data->name, data); + zend_hash_update_ptr(&consts, name, data); } } ZEND_HASH_FOREACH_END(); } phpdbg_catch_access { @@ -119,14 +120,14 @@ PHPDBG_INFO(constants) /* {{{ */ if (zend_hash_num_elements(&consts)) { phpdbg_out("Address Refs Type Constant\n"); - ZEND_HASH_MAP_FOREACH_PTR(&consts, data) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&consts, name, data) { #define VARIABLEINFO(msg, ...) \ phpdbg_writeln( \ "%-18p %-7d %-9s %.*s" msg, &data->value, \ Z_REFCOUNTED(data->value) ? Z_REFCOUNT(data->value) : 1, \ zend_get_type_by_const(Z_TYPE(data->value)), \ - (int) ZSTR_LEN(data->name), ZSTR_VAL(data->name), ##__VA_ARGS__) + (int) ZSTR_LEN(name), ZSTR_VAL(name), ##__VA_ARGS__) switch (Z_TYPE(data->value)) { case IS_STRING: From 44b161937017eb6a8279f87ee4de910da25219cb Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:04:59 +0200 Subject: [PATCH 764/895] Cleanup pubkey checks in ext/phar (#11009) These checks are always true because we bail out early if pubkey is NULL or empty. But by having these checks, it makes the code more confusing because it implies pubkey can be false, while it can in fact not. --- ext/phar/util.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ext/phar/util.c b/ext/phar/util.c index 2c98b89b6a45e..e2c6d9f331896 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1539,10 +1539,8 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, #ifndef PHAR_HAVE_OPENSSL tempsig = sig_len; - if (FAILURE == phar_call_openssl_signverify(0, fp, end_of_phar, pubkey ? ZSTR_VAL(pubkey) : NULL, pubkey ? ZSTR_LEN(pubkey) : 0, &sig, &tempsig, sig_type)) { - if (pubkey) { - zend_string_release_ex(pubkey, 0); - } + if (FAILURE == phar_call_openssl_signverify(0, fp, end_of_phar, ZSTR_VAL(pubkey), ZSTR_LEN(pubkey), &sig, &tempsig, sig_type)) { + zend_string_release_ex(pubkey, 0); if (error) { spprintf(error, 0, "openssl signature could not be verified"); @@ -1551,13 +1549,11 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, return FAILURE; } - if (pubkey) { - zend_string_release_ex(pubkey, 0); - } + zend_string_release_ex(pubkey, 0); sig_len = tempsig; #else - in = BIO_new_mem_buf(pubkey ? ZSTR_VAL(pubkey) : NULL, pubkey ? ZSTR_LEN(pubkey) : 0); + in = BIO_new_mem_buf(ZSTR_VAL(pubkey), ZSTR_LEN(pubkey)); if (NULL == in) { zend_string_release_ex(pubkey, 0); From bf123da562c8bd71083138ba329bb044c3006c75 Mon Sep 17 00:00:00 2001 From: Tony Su Date: Tue, 4 Apr 2023 18:09:38 +0800 Subject: [PATCH 765/895] [Zend]: Fix unnecessary alignment in ZEND_CALL_FRAME_SLOT macro (#10988) Alignment is not necessary while calculating slots reserved for zend_execute_data and _zend_vm_stack. ZEND_STATIC_ASSERT ensures the correct alignment while code compilation. Credit is to Ilija Tovilo. PR: https://github.com/php/php-src/pull/10988 Signed-off-by: Tony Su Reviewed-by : Ilija Tovilo Reviewed-by : Dmitry Stogov Reviewed-by : Niels Dossche --- Zend/zend_compile.h | 6 +++++- Zend/zend_execute.h | 6 +++++- Zend/zend_portability.h | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 31ed95f675188..9a2129d908d6c 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -606,8 +606,12 @@ struct _zend_execute_data { #define ZEND_CALL_NUM_ARGS(call) \ (call)->This.u2.num_args +/* Ensure the correct alignment before slots calculation */ +ZEND_STATIC_ASSERT(ZEND_MM_ALIGNED_SIZE(sizeof(zval)) == sizeof(zval), + "zval must be aligned by ZEND_MM_ALIGNMENT"); +/* A number of call frame slots (zvals) reserved for zend_execute_data. */ #define ZEND_CALL_FRAME_SLOT \ - ((int)((ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval)) - 1) / ZEND_MM_ALIGNED_SIZE(sizeof(zval)))) + ((int)((sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval))) #define ZEND_CALL_VAR(call, n) \ ((zval*)(((char*)(call)) + ((int)(n)))) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 323b6269ee55e..6e868d75a0d77 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -195,8 +195,12 @@ struct _zend_vm_stack { zend_vm_stack prev; }; +/* Ensure the correct alignment before slots calculation */ +ZEND_STATIC_ASSERT(ZEND_MM_ALIGNED_SIZE(sizeof(zval)) == sizeof(zval), + "zval must be aligned by ZEND_MM_ALIGNMENT"); +/* A number of call frame slots (zvals) reserved for _zend_vm_stack. */ #define ZEND_VM_STACK_HEADER_SLOTS \ - ((ZEND_MM_ALIGNED_SIZE(sizeof(struct _zend_vm_stack)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval)) - 1) / ZEND_MM_ALIGNED_SIZE(sizeof(zval))) + ((sizeof(struct _zend_vm_stack) + sizeof(zval) - 1) / sizeof(zval)) #define ZEND_VM_STACK_ELEMENTS(stack) \ (((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 48e648ce4ba6e..c098d29d51842 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -750,4 +750,10 @@ extern "C++" { # define ZEND_CGG_DIAGNOSTIC_IGNORED_END #endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ +# define ZEND_STATIC_ASSERT(c, m) _Static_assert((c), m) +#else +# define ZEND_STATIC_ASSERT(c, m) +#endif + #endif /* ZEND_PORTABILITY_H */ From 9e8614233c7e4a594c137ab803f909cc1af01703 Mon Sep 17 00:00:00 2001 From: Joan Miquel Date: Tue, 4 Apr 2023 16:58:59 +0200 Subject: [PATCH 766/895] Add ngx-php to opcache supported sapis (#11013) This SAPI embed PHP in Nginx server. https://github.com/rryqszq4/ngx-php And in the Techempower benchmarks, it's the fastest PHP SAPI. https://www.techempower.com/benchmarks/#section=data-r20 --- ext/opcache/ZendAccelerator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9b64eb382c68c..35aa00516b35c 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2828,6 +2828,7 @@ static inline zend_result accel_find_sapi(void) "uwsgi", "fuzzer", "frankenphp", + "ngx-php", NULL }; const char **sapi_name; From 915b2837f7d521e22dce5f0fbce2b94102a841ec Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 16 Feb 2023 22:33:37 +0100 Subject: [PATCH 767/895] Delay freeing of overwritten values in assignments Fixes GH-10168 --- Zend/zend_execute.c | 40 +- Zend/zend_execute.h | 22 + Zend/zend_gc.h | 8 + Zend/zend_vm_def.h | 82 ++- Zend/zend_vm_execute.h | 1175 ++++++++++++++++++++++++++++++++++------ 5 files changed, 1123 insertions(+), 204 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index d7894289c0d72..39787a43ec61a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -546,7 +546,7 @@ static inline ZEND_ATTRIBUTE_UNUSED zval *_get_obj_zval_ptr_ptr(int op_type, zno return get_zval_ptr_ptr(op_type, node, type); } -static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *value_ptr) +static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *value_ptr, zend_refcounted **garbage_ptr) { zend_reference *ref; @@ -559,20 +559,12 @@ static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *v ref = Z_REF_P(value_ptr); GC_ADDREF(ref); if (Z_REFCOUNTED_P(variable_ptr)) { - zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); - - if (GC_DELREF(garbage) == 0) { - ZVAL_REF(variable_ptr, ref); - rc_dtor_func(garbage); - return; - } else { - gc_check_possible_root(garbage); - } + *garbage_ptr = Z_COUNTED_P(variable_ptr); } ZVAL_REF(variable_ptr, ref); } -static zend_never_inline zval* zend_assign_to_typed_property_reference(zend_property_info *prop_info, zval *prop, zval *value_ptr EXECUTE_DATA_DC) +static zend_never_inline zval* zend_assign_to_typed_property_reference(zend_property_info *prop_info, zval *prop, zval *value_ptr, zend_refcounted **garbage_ptr EXECUTE_DATA_DC) { if (!zend_verify_prop_assignable_by_ref(prop_info, value_ptr, EX_USES_STRICT_TYPES())) { return &EG(uninitialized_zval); @@ -580,12 +572,12 @@ static zend_never_inline zval* zend_assign_to_typed_property_reference(zend_prop if (Z_ISREF_P(prop)) { ZEND_REF_DEL_TYPE_SOURCE(Z_REF_P(prop), prop_info); } - zend_assign_to_variable_reference(prop, value_ptr); + zend_assign_to_variable_reference(prop, value_ptr, garbage_ptr); ZEND_REF_ADD_TYPE_SOURCE(Z_REF_P(prop), prop_info); return prop; } -static zend_never_inline ZEND_COLD zval *zend_wrong_assign_to_variable_reference(zval *variable_ptr, zval *value_ptr OPLINE_DC EXECUTE_DATA_DC) +static zend_never_inline ZEND_COLD zval *zend_wrong_assign_to_variable_reference(zval *variable_ptr, zval *value_ptr, zend_refcounted **garbage_ptr OPLINE_DC EXECUTE_DATA_DC) { zend_error(E_NOTICE, "Only variables should be assigned by reference"); if (UNEXPECTED(EG(exception) != NULL)) { @@ -594,7 +586,7 @@ static zend_never_inline ZEND_COLD zval *zend_wrong_assign_to_variable_reference /* Use IS_TMP_VAR instead of IS_VAR to avoid ISREF check */ Z_TRY_ADDREF_P(value_ptr); - return zend_assign_to_variable(variable_ptr, value_ptr, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + return zend_assign_to_variable_ex(variable_ptr, value_ptr, IS_TMP_VAR, EX_USES_STRICT_TYPES(), garbage_ptr); } ZEND_API ZEND_COLD void ZEND_FASTCALL zend_cannot_pass_by_reference(uint32_t arg_num) @@ -957,7 +949,7 @@ static bool zend_check_and_resolve_property_class_type( if (zend_check_intersection_for_property_class_type( ZEND_TYPE_LIST(*list_type), info, object_ce)) { return true; - } + } continue; } ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type)); @@ -1005,7 +997,7 @@ ZEND_API bool zend_never_inline zend_verify_property_type(const zend_property_in return i_zend_verify_property_type(info, property, strict); } -static zend_never_inline zval* zend_assign_to_typed_prop(zend_property_info *info, zval *property_val, zval *value EXECUTE_DATA_DC) +static zend_never_inline zval* zend_assign_to_typed_prop(zend_property_info *info, zval *property_val, zval *value, zend_refcounted **garbage_ptr EXECUTE_DATA_DC) { zval tmp; @@ -1024,7 +1016,7 @@ static zend_never_inline zval* zend_assign_to_typed_prop(zend_property_info *inf Z_PROP_FLAG_P(property_val) &= ~IS_PROP_REINITABLE; - return zend_assign_to_variable(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + return zend_assign_to_variable_ex(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES(), garbage_ptr); } static zend_always_inline bool zend_value_instanceof_static(zval *zv) { @@ -3248,6 +3240,7 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container { zval variable, *variable_ptr = &variable; void **cache_addr = (prop_op_type == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_RETURNS_FUNCTION) : NULL; + zend_refcounted *garbage = NULL; zend_fetch_property_address(variable_ptr, container, container_op_type, prop_ptr, prop_op_type, cache_addr, BP_VAR_W, 0, 0 OPLINE_CC EXECUTE_DATA_CC); @@ -3259,7 +3252,7 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { zend_property_info *prop_info = NULL; @@ -3271,9 +3264,9 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container } if (UNEXPECTED(prop_info)) { - variable_ptr = zend_assign_to_typed_property_reference(prop_info, variable_ptr, value_ptr EXECUTE_DATA_CC); + variable_ptr = zend_assign_to_typed_property_reference(prop_info, variable_ptr, value_ptr, &garbage EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } } } else if (Z_ISERROR_P(variable_ptr)) { @@ -3287,6 +3280,13 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } } static zend_never_inline void zend_assign_to_property_reference_this_const(zval *container, zval *prop_ptr, zval *value_ptr OPLINE_DC EXECUTE_DATA_DC) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 6e868d75a0d77..d2e0d6f466180 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -184,6 +184,28 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval return variable_ptr; } +static zend_always_inline zval* zend_assign_to_variable_ex(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict, zend_refcounted **garbage_ptr) +{ + do { + if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { + if (Z_ISREF_P(variable_ptr)) { + if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { + return zend_assign_to_typed_ref(variable_ptr, value, value_type, strict); + } + + variable_ptr = Z_REFVAL_P(variable_ptr); + if (EXPECTED(!Z_REFCOUNTED_P(variable_ptr))) { + break; + } + } + *garbage_ptr = Z_COUNTED_P(variable_ptr); + } + } while (0); + + zend_copy_to_variable(variable_ptr, value, value_type); + return variable_ptr; +} + ZEND_API zend_result ZEND_FASTCALL zval_update_constant(zval *pp); ZEND_API zend_result ZEND_FASTCALL zval_update_constant_ex(zval *pp, zend_class_entry *scope); ZEND_API zend_result ZEND_FASTCALL zval_update_constant_with_ctx(zval *pp, zend_class_entry *scope, zend_ast_evaluate_ctx *ctx); diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index 762f3180637e3..f4095e43bb69e 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -89,6 +89,14 @@ static zend_always_inline void gc_check_possible_root(zend_refcounted *ref) } } +static zend_always_inline void gc_check_possible_root_no_ref(zend_refcounted *ref) +{ + ZEND_ASSERT(GC_TYPE_INFO(ref) != GC_REFERENCE); + if (UNEXPECTED(GC_MAY_LEAK(ref))) { + gc_possible_root(ref); + } +} + /* These APIs can be used to simplify object get_gc implementations * over heterogeneous structures. See zend_generator_get_gc() for * a usage example. */ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 5dd6e20b53111..972937a1062b4 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2381,6 +2381,7 @@ ZEND_VM_HANDLER(24, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); @@ -2410,11 +2411,11 @@ ZEND_VM_C_LABEL(assign_object): zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); ZEND_VM_C_GOTO(free_and_exit_assign_obj); } else { ZEND_VM_C_LABEL(fast_assign_obj): - value = zend_assign_to_variable(property_val, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -2498,6 +2499,13 @@ ZEND_VM_C_LABEL(free_and_exit_assign_obj): } FREE_OP_DATA(); ZEND_VM_C_LABEL(exit_assign_obj): + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } FREE_OP2(); FREE_OP1(); /* assign_obj has two opcodes! */ @@ -2510,6 +2518,7 @@ ZEND_VM_HANDLER(25, ZEND_ASSIGN_STATIC_PROP, ANY, ANY, CACHE_SLOT, SPEC(OP_DATA= USE_OPLINE zval *prop, *value; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -2522,16 +2531,24 @@ ZEND_VM_HANDLER(25, ZEND_ASSIGN_STATIC_PROP, ANY, ANY, CACHE_SLOT, SPEC(OP_DATA= value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R); if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - value = zend_assign_to_typed_prop(prop_info, prop, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, prop, value, &garbage EXECUTE_DATA_CC); FREE_OP_DATA(); } else { - value = zend_assign_to_variable(prop, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(prop, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + /* assign_static_prop has two opcodes! */ ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -2543,6 +2560,7 @@ ZEND_VM_HANDLER(23, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, SPEC(O zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); @@ -2598,11 +2616,18 @@ ZEND_VM_C_LABEL(try_assign_dim_array): ZEND_VM_C_GOTO(assign_dim_error); } value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R); - value = zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -2695,9 +2720,22 @@ ZEND_VM_HANDLER(22, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL)) value = GET_OP2_ZVAL_PTR(BP_VAR_R); variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); - value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (!ZEND_VM_SPEC || UNEXPECTED(RETURN_VALUE_USED(opline))) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); } FREE_OP1(); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -2710,6 +2748,7 @@ ZEND_VM_HANDLER(30, ZEND_ASSIGN_REF, VAR|CV, VAR|CV, SRC) USE_OPLINE zval *variable_ptr; zval *value_ptr; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); value_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W); @@ -2725,15 +2764,23 @@ ZEND_VM_HANDLER(30, ZEND_ASSIGN_REF, VAR|CV, VAR|CV, SRC) UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + FREE_OP2(); FREE_OP1(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -2781,6 +2828,7 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_STATIC_PROP_REF, ANY, ANY, CACHE_SLOT|SRC) USE_OPLINE zval *prop, *value_ptr; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -2793,19 +2841,27 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_STATIC_PROP_REF, ANY, ANY, CACHE_SLOT|SRC) value_ptr = GET_OP_DATA_ZVAL_PTR_PTR(BP_VAR_W); if (OP_DATA_TYPE == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) { - if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) { + if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC))) { prop = &EG(uninitialized_zval); } } else if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - prop = zend_assign_to_typed_property_reference(prop_info, prop, value_ptr EXECUTE_DATA_CC); + prop = zend_assign_to_typed_property_reference(prop_info, prop, value_ptr, &garbage EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(prop, value_ptr); + zend_assign_to_variable_reference(prop, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), prop); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + FREE_OP_DATA(); ZEND_VM_NEXT_OPCODE_EX(1, 2); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 79e0f5ba606bd..214a445c28752 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -927,6 +927,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT USE_OPLINE zval *prop, *value; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -939,16 +940,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT value = RT_CONSTANT((opline+1), (opline+1)->op1); if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - value = zend_assign_to_typed_prop(prop_info, prop, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, prop, value, &garbage EXECUTE_DATA_CC); } else { - value = zend_assign_to_variable(prop, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(prop, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + /* assign_static_prop has two opcodes! */ ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -958,6 +967,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT USE_OPLINE zval *prop, *value; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -970,16 +980,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - value = zend_assign_to_typed_prop(prop_info, prop, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, prop, value, &garbage EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); } else { - value = zend_assign_to_variable(prop, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(prop, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + /* assign_static_prop has two opcodes! */ ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -989,6 +1007,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT USE_OPLINE zval *prop, *value; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -1001,16 +1020,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - value = zend_assign_to_typed_prop(prop_info, prop, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, prop, value, &garbage EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); } else { - value = zend_assign_to_variable(prop, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(prop, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + /* assign_static_prop has two opcodes! */ ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -1020,6 +1047,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT USE_OPLINE zval *prop, *value; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -1032,16 +1060,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - value = zend_assign_to_typed_prop(prop_info, prop, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, prop, value, &garbage EXECUTE_DATA_CC); } else { - value = zend_assign_to_variable(prop, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(prop, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + /* assign_static_prop has two opcodes! */ ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -1051,6 +1087,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_REF_SPEC_HA USE_OPLINE zval *prop, *value_ptr; zend_property_info *prop_info; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); @@ -1063,19 +1100,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_REF_SPEC_HA value_ptr = get_zval_ptr_ptr((opline+1)->op1_type, (opline+1)->op1, BP_VAR_W); if ((opline+1)->op1_type == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) { - if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) { + if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC))) { prop = &EG(uninitialized_zval); } } else if (UNEXPECTED(ZEND_TYPE_IS_SET(prop_info->type))) { - prop = zend_assign_to_typed_property_reference(prop_info, prop, value_ptr EXECUTE_DATA_CC); + prop = zend_assign_to_typed_property_reference(prop_info, prop, value_ptr, &garbage EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(prop, value_ptr); + zend_assign_to_variable_reference(prop, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), prop); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + FREE_OP((opline+1)->op1_type, (opline+1)->op1.var); ZEND_VM_NEXT_OPCODE_EX(1, 2); } @@ -23270,6 +23315,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23299,11 +23345,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -23387,6 +23433,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -23400,6 +23453,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23429,11 +23483,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -23517,6 +23571,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -23530,6 +23591,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23559,11 +23621,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -23647,6 +23709,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -23660,6 +23729,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23689,11 +23759,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -23777,6 +23847,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -23791,6 +23868,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23846,11 +23924,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -23939,6 +24024,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -23994,11 +24080,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -24088,6 +24181,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -24143,11 +24237,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -24237,6 +24338,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -24292,11 +24394,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -24388,9 +24497,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -24408,9 +24530,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U value = RT_CONSTANT(opline, opline->op2); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -26126,6 +26261,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26155,11 +26291,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -26243,6 +26379,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -26256,6 +26399,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26285,11 +26429,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -26373,6 +26517,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -26386,6 +26537,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26415,11 +26567,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -26503,6 +26655,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -26516,6 +26675,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26545,11 +26705,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -26633,6 +26793,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -26647,6 +26814,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26702,11 +26870,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -26795,6 +26970,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26850,11 +27026,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -26944,6 +27127,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -26999,11 +27183,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -27093,6 +27284,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -27148,11 +27340,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -27874,9 +28073,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNU value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -27894,9 +28106,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USE value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -27958,9 +28183,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNU value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -27978,9 +28216,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USE value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -27993,6 +28244,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE USE_OPLINE zval *variable_ptr; zval *value_ptr; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC); @@ -28008,15 +28260,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -28178,6 +28438,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -28233,11 +28494,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -28326,6 +28594,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -28381,11 +28650,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -28475,6 +28751,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -28530,11 +28807,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -28624,6 +28908,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -28679,11 +28964,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -30329,6 +30621,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -30358,11 +30651,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -30446,6 +30739,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -30459,6 +30759,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -30488,11 +30789,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -30576,6 +30877,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -30589,6 +30897,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -30618,11 +30927,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -30706,6 +31015,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -30719,6 +31035,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -30748,11 +31065,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -30836,6 +31153,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* assign_obj has two opcodes! */ @@ -30850,6 +31174,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -30905,11 +31230,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -30998,6 +31330,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -31053,11 +31386,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -31147,6 +31487,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -31202,11 +31543,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -31296,6 +31644,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -31351,11 +31700,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -31447,9 +31803,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUS value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -31467,9 +31836,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -31482,6 +31864,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER USE_OPLINE zval *variable_ptr; zval *value_ptr; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC); @@ -31497,15 +31880,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -32907,6 +33298,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -32936,11 +33328,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -33024,6 +33416,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -33037,6 +33436,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -33066,11 +33466,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -33154,6 +33554,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -33167,6 +33574,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -33196,11 +33604,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -33284,6 +33692,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -33297,6 +33712,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -33326,11 +33742,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -33414,6 +33830,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -34925,6 +35348,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -34954,11 +35378,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -35042,6 +35466,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -35055,6 +35486,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -35084,11 +35516,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -35172,6 +35604,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -35185,6 +35624,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -35214,11 +35654,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -35302,6 +35742,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -35315,6 +35762,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -35344,11 +35792,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -35432,6 +35880,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -37399,6 +37854,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -37428,11 +37884,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -37516,6 +37972,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -37529,6 +37992,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -37558,11 +38022,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -37646,6 +38110,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -37659,6 +38130,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -37688,11 +38160,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -37776,6 +38248,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -37789,6 +38268,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = &EX(This); @@ -37818,11 +38298,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -37906,6 +38386,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -41576,6 +42063,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -41605,11 +42093,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -41693,6 +42181,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -41706,6 +42201,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -41735,11 +42231,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -41823,6 +42319,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -41836,6 +42339,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -41865,11 +42369,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -41953,6 +42457,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -41966,6 +42477,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -41995,11 +42507,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -42083,6 +42595,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -42097,6 +42616,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -42152,11 +42672,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -42245,6 +42772,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -42300,11 +42828,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -42394,6 +42929,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -42449,11 +42985,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -42543,6 +43086,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -42598,11 +43142,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -42694,9 +43245,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UN value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -42714,9 +43278,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_US value = RT_CONSTANT(opline, opline->op2); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -45365,6 +45942,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -45394,11 +45972,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -45482,6 +46060,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -45495,6 +46080,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -45524,11 +46110,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -45612,6 +46198,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -45625,6 +46218,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -45654,11 +46248,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -45742,6 +46336,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -45755,6 +46356,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -45784,11 +46386,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -45872,6 +46474,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); /* assign_obj has two opcodes! */ @@ -45886,6 +46495,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -45941,11 +46551,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -46034,6 +46651,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -46089,11 +46707,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -46183,6 +46808,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -46238,11 +46864,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -46332,6 +46965,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -46387,11 +47021,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -47406,9 +48047,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUS value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -47426,9 +48080,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -47476,9 +48143,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUS value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -47496,9 +48176,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -47511,6 +48204,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER USE_OPLINE zval *variable_ptr; zval *value_ptr; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC); @@ -47526,15 +48220,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -47869,6 +48571,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -47924,11 +48627,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -48017,6 +48727,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -48072,11 +48783,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -48166,6 +48884,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -48221,11 +48940,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -48315,6 +49041,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -48370,11 +49097,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -50693,6 +51427,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -50722,11 +51457,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -50810,6 +51545,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -50823,6 +51565,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -50852,11 +51595,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -50940,6 +51683,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -50953,6 +51703,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -50982,11 +51733,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -51070,6 +51821,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -51083,6 +51841,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval *object, *value, tmp; zend_object *zobj; zend_string *name, *tmp_name; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -51112,11 +51871,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zend_property_info *prop_info = (zend_property_info*) CACHED_PTR_EX(cache_slot + 2); if (UNEXPECTED(prop_info != NULL)) { - value = zend_assign_to_typed_prop(prop_info, property_val, value EXECUTE_DATA_CC); + value = zend_assign_to_typed_prop(prop_info, property_val, value, &garbage EXECUTE_DATA_CC); goto free_and_exit_assign_obj; } else { fast_assign_obj: - value = zend_assign_to_variable(property_val, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } @@ -51200,6 +51959,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } exit_assign_obj: + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } /* assign_obj has two opcodes! */ @@ -51214,6 +51980,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -51269,11 +52036,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = RT_CONSTANT((opline+1), (opline+1)->op1); - value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -51362,6 +52136,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -51417,11 +52192,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_tmp((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -51511,6 +52293,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -51566,11 +52349,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -51660,6 +52450,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ zval *value; zval *variable_ptr; zval *dim; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); orig_object_ptr = object_ptr = EX_VAR(opline->op1.var); @@ -51715,11 +52506,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ goto assign_dim_error; } value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { object_ptr = Z_REFVAL_P(object_ptr); @@ -51811,9 +52609,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSE value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(0)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(0)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(0)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -51831,9 +52642,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_ value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); variable_ptr = EX_VAR(opline->op1.var); - value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); - if (UNEXPECTED(1)) { - ZVAL_COPY(EX_VAR(opline->result.var), value); + if (0 || UNEXPECTED(1)) { + zend_refcounted *garbage = NULL; + + value = zend_assign_to_variable_ex(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES(), &garbage); + if (UNEXPECTED(1)) { + ZVAL_COPY(EX_VAR(opline->result.var), value); + } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + } else { + value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); } /* zend_assign_to_variable() always takes care of op2, never free it! */ @@ -51846,6 +52670,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER( USE_OPLINE zval *variable_ptr; zval *value_ptr; + zend_refcounted *garbage = NULL; SAVE_OPLINE(); value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC); @@ -51861,15 +52686,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER( UNEXPECTED(!Z_ISREF_P(value_ptr))) { variable_ptr = zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC); + variable_ptr, value_ptr, &garbage OPLINE_CC EXECUTE_DATA_CC); } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); + zend_assign_to_variable_reference(variable_ptr, value_ptr, &garbage); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root(garbage); + } + } + ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } From f43fa59171116ff512dbca4ba7157234bb50cf6b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 16 Feb 2023 21:09:39 +0100 Subject: [PATCH 768/895] Add various tests for GH-10168 --- Zend/tests/gh10168/assign.phpt | 18 ++++++++++ Zend/tests/gh10168/assign_dim.phpt | 18 ++++++++++ Zend/tests/gh10168/assign_dim_ref.phpt | 19 ++++++++++ .../gh10168/assign_dim_ref_with_prop_ref.phpt | 22 ++++++++++++ .../gh10168/assign_dim_with_prop_ref.phpt | 21 +++++++++++ Zend/tests/gh10168/assign_prop.phpt | 33 +++++++++++++++++ Zend/tests/gh10168/assign_prop_ref.phpt | 33 +++++++++++++++++ .../assign_prop_ref_with_prop_ref.phpt | 36 +++++++++++++++++++ .../gh10168/assign_prop_with_prop_ref.phpt | 36 +++++++++++++++++++ Zend/tests/gh10168/assign_ref.phpt | 18 ++++++++++ .../gh10168/assign_ref_with_prop_ref.phpt | 20 +++++++++++ Zend/tests/gh10168/assign_static_prop.phpt | 20 +++++++++++ .../tests/gh10168/assign_static_prop_ref.phpt | 20 +++++++++++ .../assign_static_prop_ref_with_prop_ref.phpt | 23 ++++++++++++ .../assign_static_prop_with_prop_ref.phpt | 22 ++++++++++++ .../gh10168/assign_static_untyped_prop.phpt | 20 +++++++++++ .../assign_static_untyped_prop_ref.phpt | 20 +++++++++++ ...static_untyped_prop_ref_with_prop_ref.phpt | 23 ++++++++++++ ...ign_static_untyped_prop_with_prop_ref.phpt | 22 ++++++++++++ Zend/tests/gh10168/assign_untyped_prop.phpt | 33 +++++++++++++++++ .../gh10168/assign_untyped_prop_ref.phpt | 33 +++++++++++++++++ ...assign_untyped_prop_ref_with_prop_ref.phpt | 36 +++++++++++++++++++ .../assign_untyped_prop_with_prop_ref.phpt | 36 +++++++++++++++++++ Zend/tests/gh10168/assign_with_prop_ref.phpt | 21 +++++++++++ .../gh10168/wrong_assign_to_variable.phpt | 21 +++++++++++ 25 files changed, 624 insertions(+) create mode 100644 Zend/tests/gh10168/assign.phpt create mode 100644 Zend/tests/gh10168/assign_dim.phpt create mode 100644 Zend/tests/gh10168/assign_dim_ref.phpt create mode 100644 Zend/tests/gh10168/assign_dim_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_dim_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_prop.phpt create mode 100644 Zend/tests/gh10168/assign_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_prop_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_prop_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_ref.phpt create mode 100644 Zend/tests/gh10168/assign_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_prop.phpt create mode 100644 Zend/tests/gh10168/assign_static_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_prop_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_prop_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_untyped_prop.phpt create mode 100644 Zend/tests/gh10168/assign_static_untyped_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_untyped_prop_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_static_untyped_prop_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_untyped_prop.phpt create mode 100644 Zend/tests/gh10168/assign_untyped_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_untyped_prop_ref_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_untyped_prop_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/assign_with_prop_ref.phpt create mode 100644 Zend/tests/gh10168/wrong_assign_to_variable.phpt diff --git a/Zend/tests/gh10168/assign.phpt b/Zend/tests/gh10168/assign.phpt new file mode 100644 index 0000000000000..3c6740165d4a4 --- /dev/null +++ b/Zend/tests/gh10168/assign.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-10168: Assign +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_dim.phpt b/Zend/tests/gh10168/assign_dim.phpt new file mode 100644 index 0000000000000..1a31cfdde3b7d --- /dev/null +++ b/Zend/tests/gh10168/assign_dim.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-10168: Assign dim +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_dim_ref.phpt b/Zend/tests/gh10168/assign_dim_ref.phpt new file mode 100644 index 0000000000000..40ae4485d2cfb --- /dev/null +++ b/Zend/tests/gh10168/assign_dim_ref.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-10168: Assign dim ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_dim_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_dim_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..8415df433686a --- /dev/null +++ b/Zend/tests/gh10168/assign_dim_ref_with_prop_ref.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10168: Assign dim ref with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_dim_with_prop_ref.phpt b/Zend/tests/gh10168/assign_dim_with_prop_ref.phpt new file mode 100644 index 0000000000000..764d10d34658b --- /dev/null +++ b/Zend/tests/gh10168/assign_dim_with_prop_ref.phpt @@ -0,0 +1,21 @@ +--TEST-- +GH-10168: Assign dim with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_prop.phpt b/Zend/tests/gh10168/assign_prop.phpt new file mode 100644 index 0000000000000..73aaab89755ea --- /dev/null +++ b/Zend/tests/gh10168/assign_prop.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-10168: Assign prop +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + var_dump($box->value = new Test); +} + +$box = new Box(); +$box->value = new Test; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +object(Test)#3 (0) { +} diff --git a/Zend/tests/gh10168/assign_prop_ref.phpt b/Zend/tests/gh10168/assign_prop_ref.phpt new file mode 100644 index 0000000000000..e7bbe6f9eea74 --- /dev/null +++ b/Zend/tests/gh10168/assign_prop_ref.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-10168: Assign prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + $tmp = new Test; + var_dump($box->value = &$tmp); +} + +$box = new Box(); +$box->value = new Test; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +NULL +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_prop_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_prop_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..b56eedd701d05 --- /dev/null +++ b/Zend/tests/gh10168/assign_prop_ref_with_prop_ref.phpt @@ -0,0 +1,36 @@ +--TEST-- +GH-10168: Assign prop ref with prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + $tmp = new Test; + var_dump($box->value = &$tmp); +} + +$box = new Box(); +$box->value = new Test; +Test::$test = &$box->value; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +NULL diff --git a/Zend/tests/gh10168/assign_prop_with_prop_ref.phpt b/Zend/tests/gh10168/assign_prop_with_prop_ref.phpt new file mode 100644 index 0000000000000..1ba3e31b49cc8 --- /dev/null +++ b/Zend/tests/gh10168/assign_prop_with_prop_ref.phpt @@ -0,0 +1,36 @@ +--TEST-- +GH-10168: Assign prop with prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + var_dump($box->value = new Test); +} + +$box = new Box(); +$box->value = new Test; +Test::$test = &$box->value; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +object(Test)#3 (0) { +} diff --git a/Zend/tests/gh10168/assign_ref.phpt b/Zend/tests/gh10168/assign_ref.phpt new file mode 100644 index 0000000000000..9f3be5619d1ae --- /dev/null +++ b/Zend/tests/gh10168/assign_ref.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-10168: Assign ref +--FILE-- + +--EXPECT-- +NULL diff --git a/Zend/tests/gh10168/assign_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..42ce94b3f83e1 --- /dev/null +++ b/Zend/tests/gh10168/assign_ref_with_prop_ref.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10168: Assign ref with prop ref +--FILE-- + +--EXPECT-- +NULL diff --git a/Zend/tests/gh10168/assign_static_prop.phpt b/Zend/tests/gh10168/assign_static_prop.phpt new file mode 100644 index 0000000000000..900a69ae40aa5 --- /dev/null +++ b/Zend/tests/gh10168/assign_static_prop.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10168: Assign static prop +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_static_prop_ref.phpt b/Zend/tests/gh10168/assign_static_prop_ref.phpt new file mode 100644 index 0000000000000..2e90be884dedd --- /dev/null +++ b/Zend/tests/gh10168/assign_static_prop_ref.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10168: Assign static prop ref +--FILE-- + +--EXPECT-- +NULL diff --git a/Zend/tests/gh10168/assign_static_prop_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_static_prop_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..df11b17e27819 --- /dev/null +++ b/Zend/tests/gh10168/assign_static_prop_ref_with_prop_ref.phpt @@ -0,0 +1,23 @@ +--TEST-- +GH-10168: Assign static prop ref with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_static_prop_with_prop_ref.phpt b/Zend/tests/gh10168/assign_static_prop_with_prop_ref.phpt new file mode 100644 index 0000000000000..c98233589c41f --- /dev/null +++ b/Zend/tests/gh10168/assign_static_prop_with_prop_ref.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10168: Assign static prop with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_static_untyped_prop.phpt b/Zend/tests/gh10168/assign_static_untyped_prop.phpt new file mode 100644 index 0000000000000..cf1736b6c58df --- /dev/null +++ b/Zend/tests/gh10168/assign_static_untyped_prop.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10168: Assign static prop +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_static_untyped_prop_ref.phpt b/Zend/tests/gh10168/assign_static_untyped_prop_ref.phpt new file mode 100644 index 0000000000000..dfef8ead26f6e --- /dev/null +++ b/Zend/tests/gh10168/assign_static_untyped_prop_ref.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-10168: Assign static prop ref +--FILE-- + +--EXPECT-- +NULL diff --git a/Zend/tests/gh10168/assign_static_untyped_prop_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_static_untyped_prop_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..337c9a8f1475f --- /dev/null +++ b/Zend/tests/gh10168/assign_static_untyped_prop_ref_with_prop_ref.phpt @@ -0,0 +1,23 @@ +--TEST-- +GH-10168: Assign static prop ref with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_static_untyped_prop_with_prop_ref.phpt b/Zend/tests/gh10168/assign_static_untyped_prop_with_prop_ref.phpt new file mode 100644 index 0000000000000..1b46cafaa0407 --- /dev/null +++ b/Zend/tests/gh10168/assign_static_untyped_prop_with_prop_ref.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-10168: Assign static prop with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_untyped_prop.phpt b/Zend/tests/gh10168/assign_untyped_prop.phpt new file mode 100644 index 0000000000000..898173283ca6e --- /dev/null +++ b/Zend/tests/gh10168/assign_untyped_prop.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-10168: Assign prop +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + var_dump($box->value = new Test); +} + +$box = new Box(); +$box->value = new Test; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +object(Test)#3 (0) { +} diff --git a/Zend/tests/gh10168/assign_untyped_prop_ref.phpt b/Zend/tests/gh10168/assign_untyped_prop_ref.phpt new file mode 100644 index 0000000000000..c35e7a0663eee --- /dev/null +++ b/Zend/tests/gh10168/assign_untyped_prop_ref.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-10168: Assign prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + $tmp = new Test; + var_dump($box->value = &$tmp); +} + +$box = new Box(); +$box->value = new Test; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +NULL +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/assign_untyped_prop_ref_with_prop_ref.phpt b/Zend/tests/gh10168/assign_untyped_prop_ref_with_prop_ref.phpt new file mode 100644 index 0000000000000..b48a0911e499f --- /dev/null +++ b/Zend/tests/gh10168/assign_untyped_prop_ref_with_prop_ref.phpt @@ -0,0 +1,36 @@ +--TEST-- +GH-10168: Assign prop ref with prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + $tmp = new Test; + var_dump($box->value = &$tmp); +} + +$box = new Box(); +$box->value = new Test; +Test::$test = &$box->value; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +NULL diff --git a/Zend/tests/gh10168/assign_untyped_prop_with_prop_ref.phpt b/Zend/tests/gh10168/assign_untyped_prop_with_prop_ref.phpt new file mode 100644 index 0000000000000..12acc1203c22d --- /dev/null +++ b/Zend/tests/gh10168/assign_untyped_prop_with_prop_ref.phpt @@ -0,0 +1,36 @@ +--TEST-- +GH-10168: Assign prop with prop ref +--XFAIL-- +--FILE-- +value = null; + } +} + +function test($box) { + var_dump($box->value = new Test); +} + +$box = new Box(); +$box->value = new Test; +Test::$test = &$box->value; +test($box); +// Second call tests the cache slot path +test($box); + +?> +--EXPECT-- +object(Test)#3 (0) { +} +object(Test)#3 (0) { +} diff --git a/Zend/tests/gh10168/assign_with_prop_ref.phpt b/Zend/tests/gh10168/assign_with_prop_ref.phpt new file mode 100644 index 0000000000000..f3e8756514502 --- /dev/null +++ b/Zend/tests/gh10168/assign_with_prop_ref.phpt @@ -0,0 +1,21 @@ +--TEST-- +GH-10168: Assign with prop ref +--FILE-- + +--EXPECT-- +object(Test)#2 (0) { +} diff --git a/Zend/tests/gh10168/wrong_assign_to_variable.phpt b/Zend/tests/gh10168/wrong_assign_to_variable.phpt new file mode 100644 index 0000000000000..36fdecdfefcd5 --- /dev/null +++ b/Zend/tests/gh10168/wrong_assign_to_variable.phpt @@ -0,0 +1,21 @@ +--TEST-- +GH-10168: Wrong assign to variable +--FILE-- + +--EXPECTF-- +Notice: Only variables should be assigned by reference in %s on line %d +int(42) From b39107c7741e734c25df8b23e1af4215b07a0568 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 16 Feb 2023 21:10:14 +0100 Subject: [PATCH 769/895] Delay destructor for zend_assign_to_typed_ref --- Zend/zend_execute.c | 20 ++++++++++++++++++-- Zend/zend_execute.h | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 39787a43ec61a..2b4e6e2ec46f8 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3589,7 +3589,7 @@ static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) { } } -ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, uint8_t value_type, bool strict) +ZEND_API zval* zend_assign_to_typed_ref_ex(zval *variable_ptr, zval *orig_value, uint8_t value_type, bool strict, zend_refcounted **garbage_ptr) { bool ret; zval value; @@ -3604,7 +3604,9 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ui ret = zend_verify_ref_assignable_zval(Z_REF_P(variable_ptr), &value, strict); variable_ptr = Z_REFVAL_P(variable_ptr); if (EXPECTED(ret)) { - i_zval_ptr_dtor_noref(variable_ptr); + if (Z_REFCOUNTED_P(variable_ptr)) { + *garbage_ptr = Z_COUNTED_P(variable_ptr); + } ZVAL_COPY_VALUE(variable_ptr, &value); } else { zval_ptr_dtor_nogc(&value); @@ -3622,6 +3624,20 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ui return variable_ptr; } +ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, uint8_t value_type, bool strict) +{ + zend_refcounted *garbage = NULL; + zval *result = zend_assign_to_typed_ref_ex(variable_ptr, orig_value, value_type, strict, &garbage); + if (garbage) { + if (GC_DELREF(garbage) == 0) { + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } + return result; +} + ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(const zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context) { zval *val = orig_val; if (Z_ISREF_P(val) && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(val))) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index d2e0d6f466180..35ccf91a9fe01 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -122,6 +122,7 @@ ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_l ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, const zend_property_info *prop); ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, uint8_t value_type, bool strict); +ZEND_API zval* zend_assign_to_typed_ref_ex(zval *variable_ptr, zval *value, uint8_t value_type, bool strict, zend_refcounted **garbage_ptr); static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *value, uint8_t value_type) { @@ -190,7 +191,7 @@ static zend_always_inline zval* zend_assign_to_variable_ex(zval *variable_ptr, z if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { if (Z_ISREF_P(variable_ptr)) { if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { - return zend_assign_to_typed_ref(variable_ptr, value, value_type, strict); + return zend_assign_to_typed_ref_ex(variable_ptr, value, value_type, strict, garbage_ptr); } variable_ptr = Z_REFVAL_P(variable_ptr); From 24acb4f134bfa011604b2f78fdc6b69c810729ea Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 3 Mar 2023 00:02:42 +0100 Subject: [PATCH 770/895] Delay destructor for zend_std_write_property --- Zend/tests/gh10168/assign_prop.phpt | 1 - Zend/tests/gh10168/assign_prop_ref.phpt | 1 - .../assign_prop_ref_with_prop_ref.phpt | 1 - .../gh10168/assign_prop_with_prop_ref.phpt | 1 - Zend/tests/gh10168/assign_untyped_prop.phpt | 1 - .../gh10168/assign_untyped_prop_ref.phpt | 1 - ...assign_untyped_prop_ref_with_prop_ref.phpt | 1 - .../assign_untyped_prop_with_prop_ref.phpt | 1 - Zend/zend_object_handlers.c | 27 ++++++- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 72 +++++++++---------- ext/opcache/jit/zend_jit_helpers.c | 2 +- 12 files changed, 62 insertions(+), 49 deletions(-) diff --git a/Zend/tests/gh10168/assign_prop.phpt b/Zend/tests/gh10168/assign_prop.phpt index 73aaab89755ea..ad7bb762f555b 100644 --- a/Zend/tests/gh10168/assign_prop.phpt +++ b/Zend/tests/gh10168/assign_prop.phpt @@ -1,6 +1,5 @@ --TEST-- GH-10168: Assign prop ---XFAIL-- --FILE-- common.type) + && EX(opline) + && EX(opline)->opcode == ZEND_ASSIGN_OBJ + && EX(opline)->result_type) { + ZVAL_COPY_DEREF(EX_VAR(EX(opline)->result.var), variable_ptr); + variable_ptr = NULL; + } + rc_dtor_func(garbage); + } else { + gc_check_possible_root_no_ref(garbage); + } + } goto exit; } if (Z_PROP_FLAG_P(variable_ptr) & IS_PROP_UNINIT) { diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 972937a1062b4..479b3880e5425 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2494,7 +2494,7 @@ ZEND_VM_C_LABEL(fast_assign_obj): } ZEND_VM_C_LABEL(free_and_exit_assign_obj): - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } FREE_OP_DATA(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 214a445c28752..090b3dc228eca 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -23428,7 +23428,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -23566,7 +23566,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -23704,7 +23704,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -23842,7 +23842,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -26374,7 +26374,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -26512,7 +26512,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -26650,7 +26650,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -26788,7 +26788,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -30734,7 +30734,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -30872,7 +30872,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -31010,7 +31010,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -31148,7 +31148,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -33411,7 +33411,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -33549,7 +33549,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -33687,7 +33687,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -33825,7 +33825,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -35461,7 +35461,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -35599,7 +35599,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -35737,7 +35737,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -35875,7 +35875,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -37967,7 +37967,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -38105,7 +38105,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -38243,7 +38243,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -38381,7 +38381,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -42176,7 +42176,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -42314,7 +42314,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -42452,7 +42452,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -42590,7 +42590,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -46055,7 +46055,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -46193,7 +46193,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -46331,7 +46331,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -46469,7 +46469,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -51540,7 +51540,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } @@ -51678,7 +51678,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -51816,7 +51816,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); @@ -51954,7 +51954,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } free_and_exit_assign_obj: - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + if (UNEXPECTED(RETURN_VALUE_USED(opline)) && value) { ZVAL_COPY_DEREF(EX_VAR(opline->result.var), value); } diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 7c889a2ade8df..4da73d770f1c2 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -2496,7 +2496,7 @@ static void ZEND_FASTCALL zend_jit_assign_obj_helper(zend_object *zobj, zend_str ZVAL_DEREF(value); value = zobj->handlers->write_property(zobj, name, value, cache_slot); - if (result) { + if (result && value) { ZVAL_COPY_DEREF(result, value); } } From fdbea4f39eb53429067e0d1f534ab069ba5a1c24 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 3 Mar 2023 12:13:27 +0100 Subject: [PATCH 771/895] Add GC_DTOR/GC_DTOR_NO_REF macros --- Zend/zend_execute.c | 18 +- Zend/zend_execute.h | 9 +- Zend/zend_refcounted.h | 18 ++ Zend/zend_vm_def.h | 42 +-- Zend/zend_vm_execute.h | 564 +++++++---------------------------------- 5 files changed, 123 insertions(+), 528 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 2b4e6e2ec46f8..939f45554e394 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3281,11 +3281,7 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } } @@ -3581,11 +3577,7 @@ static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) { if (Z_REFCOUNTED_P(zval_ptr)) { zend_refcounted *ref = Z_COUNTED_P(zval_ptr); ZEND_ASSERT(Z_TYPE_P(zval_ptr) != IS_REFERENCE); - if (!GC_DELREF(ref)) { - rc_dtor_func(ref); - } else if (UNEXPECTED(GC_MAY_LEAK(ref))) { - gc_possible_root(ref); - } + GC_DTOR_NO_REF(ref); } } @@ -3629,11 +3621,7 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ui zend_refcounted *garbage = NULL; zval *result = zend_assign_to_typed_ref_ex(variable_ptr, orig_value, value_type, strict, &garbage); if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } return result; } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 35ccf91a9fe01..2512e66dc6d44 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -169,14 +169,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval } garbage = Z_COUNTED_P(variable_ptr); zend_copy_to_variable(variable_ptr, value, value_type); - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { /* we need to split */ - /* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */ - if (UNEXPECTED(GC_MAY_LEAK(garbage))) { - gc_possible_root(garbage); - } - } + GC_DTOR_NO_REF(garbage); return variable_ptr; } } while (0); diff --git a/Zend/zend_refcounted.h b/Zend/zend_refcounted.h index e4ffc99568530..b98e5a59604c7 100644 --- a/Zend/zend_refcounted.h +++ b/Zend/zend_refcounted.h @@ -56,6 +56,24 @@ #define GC_DELREF_EX(p, rc) zend_gc_delref_ex(&(p)->gc, rc) #define GC_TRY_ADDREF(p) zend_gc_try_addref(&(p)->gc) #define GC_TRY_DELREF(p) zend_gc_try_delref(&(p)->gc) +#define GC_DTOR(p) \ + do { \ + zend_refcounted_h *_p = &(p)->gc; \ + if (zend_gc_delref(_p) == 0) { \ + rc_dtor_func((zend_refcounted *)_p); \ + } else { \ + gc_check_possible_root((zend_refcounted *)_p); \ + } \ + } while (0) +#define GC_DTOR_NO_REF(p) \ + do { \ + zend_refcounted_h *_p = &(p)->gc; \ + if (zend_gc_delref(_p) == 0) { \ + rc_dtor_func((zend_refcounted *)_p); \ + } else { \ + gc_check_possible_root_no_ref((zend_refcounted *)_p); \ + } \ + } while (0) #define GC_NULL (IS_NULL | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) #define GC_STRING (IS_STRING | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 479b3880e5425..7ef8cf1922d1e 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2500,11 +2500,7 @@ ZEND_VM_C_LABEL(free_and_exit_assign_obj): FREE_OP_DATA(); ZEND_VM_C_LABEL(exit_assign_obj): if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } FREE_OP2(); FREE_OP1(); @@ -2542,11 +2538,7 @@ ZEND_VM_HANDLER(25, ZEND_ASSIGN_STATIC_PROP, ANY, ANY, CACHE_SLOT, SPEC(OP_DATA= } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } /* assign_static_prop has two opcodes! */ @@ -2622,11 +2614,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array): ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -2728,11 +2716,7 @@ ZEND_VM_HANDLER(22, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL)) ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES()); @@ -2774,11 +2758,7 @@ ZEND_VM_HANDLER(30, ZEND_ASSIGN_REF, VAR|CV, VAR|CV, SRC) } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } FREE_OP2(); @@ -2855,11 +2835,7 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_STATIC_PROP_REF, ANY, ANY, CACHE_SLOT|SRC) } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } FREE_OP_DATA(); @@ -6479,11 +6455,7 @@ ZEND_VM_HANDLER(153, ZEND_UNSET_CV, CV, UNUSED) ZVAL_UNDEF(var); SAVE_OPLINE(); - if (!GC_DELREF(garbage)) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { ZVAL_UNDEF(var); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 090b3dc228eca..19149c8c18e87 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -951,11 +951,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } /* assign_static_prop has two opcodes! */ @@ -991,11 +987,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } /* assign_static_prop has two opcodes! */ @@ -1031,11 +1023,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } /* assign_static_prop has two opcodes! */ @@ -1071,11 +1059,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_SPEC_OP_DAT } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } /* assign_static_prop has two opcodes! */ @@ -1114,11 +1098,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_REF_SPEC_HA } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } FREE_OP((opline+1)->op1_type, (opline+1)->op1.var); @@ -23434,11 +23414,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -23572,11 +23548,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -23710,11 +23682,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -23848,11 +23816,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -23930,11 +23894,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24086,11 +24046,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24243,11 +24199,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24400,11 +24352,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -24505,11 +24453,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); @@ -24538,11 +24482,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); @@ -26380,11 +26320,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -26518,11 +26454,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -26656,11 +26588,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -26794,11 +26722,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -26876,11 +26800,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27032,11 +26952,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27189,11 +27105,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -27346,11 +27258,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28081,11 +27989,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNU ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); @@ -28114,11 +28018,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USE ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); @@ -28191,11 +28091,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNU ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); @@ -28224,11 +28120,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USE ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); @@ -28270,11 +28162,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -28500,11 +28388,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28656,11 +28540,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28813,11 +28693,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -28970,11 +28846,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -30740,11 +30612,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -30878,11 +30746,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -31016,11 +30880,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -31154,11 +31014,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -31236,11 +31092,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -31392,11 +31244,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -31549,11 +31397,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -31706,11 +31550,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -31811,11 +31651,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUS ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); @@ -31844,11 +31680,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); @@ -31890,11 +31722,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -33417,11 +33245,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -33555,11 +33379,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -33693,11 +33513,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -33831,11 +33647,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -35467,11 +35279,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -35605,11 +35413,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -35743,11 +35547,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -35881,11 +35681,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -37973,11 +37769,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -38111,11 +37903,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -38249,11 +38037,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -38387,11 +38171,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -42182,11 +41962,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -42320,11 +42096,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -42458,11 +42230,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -42596,11 +42364,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -42678,11 +42442,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -42834,11 +42594,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -42991,11 +42747,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -43148,11 +42900,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -43253,11 +43001,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UN ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); @@ -43286,11 +43030,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_US ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES()); @@ -46061,11 +45801,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -46199,11 +45935,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -46337,11 +46069,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -46475,11 +46203,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -46557,11 +46281,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -46713,11 +46433,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -46870,11 +46586,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -47027,11 +46739,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -48055,11 +47763,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUS ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); @@ -48088,11 +47792,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES()); @@ -48151,11 +47851,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUS ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); @@ -48184,11 +47880,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES()); @@ -48230,11 +47922,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); @@ -48633,11 +48321,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -48789,11 +48473,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -48946,11 +48626,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -49103,11 +48779,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -49591,11 +49263,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_CV_SPEC_CV_UNUSED_HANDLE ZVAL_UNDEF(var); SAVE_OPLINE(); - if (!GC_DELREF(garbage)) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { ZVAL_UNDEF(var); @@ -51546,11 +51214,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -51684,11 +51348,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -51822,11 +51482,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -51960,11 +51616,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ exit_assign_obj: if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } @@ -52042,11 +51694,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -52198,11 +51846,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -52355,11 +51999,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -52512,11 +52152,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { if (EXPECTED(Z_ISREF_P(object_ptr))) { @@ -52617,11 +52253,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSE ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); @@ -52650,11 +52282,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_ ZVAL_COPY(EX_VAR(opline->result.var), value); } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root_no_ref(garbage); - } + GC_DTOR_NO_REF(garbage); } } else { value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES()); @@ -52696,11 +52324,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER( } if (garbage) { - if (GC_DELREF(garbage) == 0) { - rc_dtor_func(garbage); - } else { - gc_check_possible_root(garbage); - } + GC_DTOR(garbage); } From e1c6fb76c091f2574b6d6602027bfd260cde48dc Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 3 Apr 2023 22:46:35 +0300 Subject: [PATCH 772/895] JIT support for delayed destructor for zend_assign_to_typed_ref/prop --- ext/opcache/jit/zend_jit_arm64.dasc | 39 +++++++++++++--------- ext/opcache/jit/zend_jit_disasm.c | 4 +++ ext/opcache/jit/zend_jit_helpers.c | 51 ++++++++++++++++++++++++++++- ext/opcache/jit/zend_jit_x86.dasc | 47 +++++++++++++++++--------- 4 files changed, 110 insertions(+), 31 deletions(-) diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index 088ab25d5dcfc..99c7a53a44b4d 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -5743,22 +5743,31 @@ static int zend_jit_assign_to_typed_ref(dasm_State **Dst, if (opline) { | SET_EX_OPLINE opline, REG0 } - if (val_type == IS_CONST) { - | EXT_CALL zend_jit_assign_const_to_typed_ref, REG0 - } else if (val_type == IS_TMP_VAR) { - | EXT_CALL zend_jit_assign_tmp_to_typed_ref, REG0 - } else if (val_type == IS_VAR) { - | EXT_CALL zend_jit_assign_var_to_typed_ref, REG0 - } else if (val_type == IS_CV) { - | EXT_CALL zend_jit_assign_cv_to_typed_ref, REG0 + if (!res_addr) { + if (val_type == IS_CONST) { + | EXT_CALL zend_jit_assign_const_to_typed_ref, REG0 + } else if (val_type == IS_TMP_VAR) { + | EXT_CALL zend_jit_assign_tmp_to_typed_ref, REG0 + } else if (val_type == IS_VAR) { + | EXT_CALL zend_jit_assign_var_to_typed_ref, REG0 + } else if (val_type == IS_CV) { + | EXT_CALL zend_jit_assign_cv_to_typed_ref, REG0 + } else { + ZEND_UNREACHABLE(); + } } else { - ZEND_UNREACHABLE(); - } - if (res_addr) { - zend_jit_addr ret_addr = ZEND_ADDR_MEM_ZVAL(ZREG_X0, 0); // RETVAL - - | ZVAL_COPY_VALUE res_addr, -1, ret_addr, -1, ZREG_REG1, ZREG_REG2, ZREG_TMP1, ZREG_TMP2, ZREG_FPR0 - | TRY_ADDREF -1, REG1w, REG2, TMP1w + | LOAD_ZVAL_ADDR CARG3, res_addr + if (val_type == IS_CONST) { + | EXT_CALL zend_jit_assign_const_to_typed_ref2, REG0 + } else if (val_type == IS_TMP_VAR) { + | EXT_CALL zend_jit_assign_tmp_to_typed_ref2, REG0 + } else if (val_type == IS_VAR) { + | EXT_CALL zend_jit_assign_var_to_typed_ref2, REG0 + } else if (val_type == IS_CV) { + | EXT_CALL zend_jit_assign_cv_to_typed_ref2, REG0 + } else { + ZEND_UNREACHABLE(); + } } if (check_exception) { | // if (UNEXPECTED(EG(exception) != NULL)) { diff --git a/ext/opcache/jit/zend_jit_disasm.c b/ext/opcache/jit/zend_jit_disasm.c index cae05356f3115..41b75979c515d 100644 --- a/ext/opcache/jit/zend_jit_disasm.c +++ b/ext/opcache/jit/zend_jit_disasm.c @@ -659,6 +659,10 @@ static int zend_jit_disasm_init(void) REGISTER_HELPER(zend_jit_assign_tmp_to_typed_ref); REGISTER_HELPER(zend_jit_assign_var_to_typed_ref); REGISTER_HELPER(zend_jit_assign_cv_to_typed_ref); + REGISTER_HELPER(zend_jit_assign_const_to_typed_ref2); + REGISTER_HELPER(zend_jit_assign_tmp_to_typed_ref2); + REGISTER_HELPER(zend_jit_assign_var_to_typed_ref2); + REGISTER_HELPER(zend_jit_assign_cv_to_typed_ref2); REGISTER_HELPER(zend_jit_pre_inc_typed_ref); REGISTER_HELPER(zend_jit_pre_dec_typed_ref); REGISTER_HELPER(zend_jit_post_inc_typed_ref); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 4da73d770f1c2..41c7e14a804cb 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -2186,6 +2186,51 @@ static zval* ZEND_FASTCALL zend_jit_assign_cv_to_typed_ref(zend_reference *ref, return zend_jit_assign_to_typed_ref_helper(ref, value, IS_CV); } +static zend_always_inline zval* zend_jit_assign_to_typed_ref2_helper(zend_reference *ref, zval *value, zval *result, uint8_t value_type) +{ + zval variable, *ret; + zend_refcounted *garbage = NULL; + + ZVAL_REF(&variable, ref); + ret = zend_assign_to_variable_ex(&variable, value, value_type, ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)), &garbage); + ZVAL_COPY(result, ret); + if (garbage) { + GC_DTOR(garbage); + } + return ret; +} + +static zval* ZEND_FASTCALL zend_jit_assign_const_to_typed_ref2(zend_reference *ref, zval *value, zval *result) +{ + return zend_jit_assign_to_typed_ref2_helper(ref, value, result, IS_CONST); +} + +static zval* ZEND_FASTCALL zend_jit_assign_tmp_to_typed_ref2(zend_reference *ref, zval *value, zval *result) +{ + return zend_jit_assign_to_typed_ref2_helper(ref, value, result, IS_TMP_VAR); +} + +static zval* ZEND_FASTCALL zend_jit_assign_var_to_typed_ref2(zend_reference *ref, zval *value, zval *result) +{ + return zend_jit_assign_to_typed_ref2_helper(ref, value, result, IS_VAR); +} + +static zval* ZEND_FASTCALL zend_jit_assign_cv_to_typed_ref2(zend_reference *ref, zval *value, zval *result) +{ + if (UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) { + const zend_op *opline = EG(current_execute_data)->opline; + uint32_t var; + if (opline->opcode == ZEND_ASSIGN) { + var = opline->op2.var; + } else { + ZEND_ASSERT((opline + 1)->opcode == ZEND_OP_DATA); + var = (opline + 1)->op1.var; + } + zend_jit_undefined_op_helper(var); + value = &EG(uninitialized_zval); + } + return zend_jit_assign_to_typed_ref2_helper(ref, value, result, IS_CV); +} static zend_property_info *zend_jit_get_prop_not_accepting_double(zend_reference *ref) { @@ -2504,6 +2549,7 @@ static void ZEND_FASTCALL zend_jit_assign_obj_helper(zend_object *zobj, zend_str static void ZEND_FASTCALL zend_jit_assign_to_typed_prop(zval *property_val, zend_property_info *info, zval *value, zval *result) { zend_execute_data *execute_data = EG(current_execute_data); + zend_refcounted *garbage = NULL; zval tmp; if (UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) { @@ -2534,10 +2580,13 @@ static void ZEND_FASTCALL zend_jit_assign_to_typed_prop(zval *property_val, zend Z_PROP_FLAG_P(property_val) &= ~IS_PROP_REINITABLE; - value = zend_assign_to_variable(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES()); + value = zend_assign_to_variable_ex(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES(), &garbage); if (result) { ZVAL_COPY_DEREF(result, value); } + if (garbage) { + GC_DTOR(garbage); + } } static zend_never_inline void _zend_jit_assign_op_overloaded_property(zend_object *object, zend_string *name, void **cache_slot, zval *value, binary_op_type binary_op) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 74a38929e2a8b..6846456973fdd 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -6285,22 +6285,39 @@ static int zend_jit_assign_to_typed_ref(dasm_State **Dst, if (opline) { | SET_EX_OPLINE opline, r0 } - if (val_type == IS_CONST) { - | EXT_CALL zend_jit_assign_const_to_typed_ref, r0 - } else if (val_type == IS_TMP_VAR) { - | EXT_CALL zend_jit_assign_tmp_to_typed_ref, r0 - } else if (val_type == IS_VAR) { - | EXT_CALL zend_jit_assign_var_to_typed_ref, r0 - } else if (val_type == IS_CV) { - | EXT_CALL zend_jit_assign_cv_to_typed_ref, r0 + if (!res_addr) { + if (val_type == IS_CONST) { + | EXT_CALL zend_jit_assign_const_to_typed_ref, r0 + } else if (val_type == IS_TMP_VAR) { + | EXT_CALL zend_jit_assign_tmp_to_typed_ref, r0 + } else if (val_type == IS_VAR) { + | EXT_CALL zend_jit_assign_var_to_typed_ref, r0 + } else if (val_type == IS_CV) { + | EXT_CALL zend_jit_assign_cv_to_typed_ref, r0 + } else { + ZEND_UNREACHABLE(); + } } else { - ZEND_UNREACHABLE(); - } - if (res_addr) { - zend_jit_addr ret_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0); - - | ZVAL_COPY_VALUE res_addr, -1, ret_addr, -1, ZREG_R1, ZREG_R2 - | TRY_ADDREF -1, ch, r2 + |.if X64 + | LOAD_ZVAL_ADDR CARG3, res_addr + |.else + | sub r4, 12 + | PUSH_ZVAL_ADDR res_addr, r0 + |.endif + if (val_type == IS_CONST) { + | EXT_CALL zend_jit_assign_const_to_typed_ref2, r0 + } else if (val_type == IS_TMP_VAR) { + | EXT_CALL zend_jit_assign_tmp_to_typed_ref2, r0 + } else if (val_type == IS_VAR) { + | EXT_CALL zend_jit_assign_var_to_typed_ref2, r0 + } else if (val_type == IS_CV) { + | EXT_CALL zend_jit_assign_cv_to_typed_ref2, r0 + } else { + ZEND_UNREACHABLE(); + } + |.if not(X64) + | add r4, 12 + |.endif } if (check_exception) { | // if (UNEXPECTED(EG(exception) != NULL)) { From 3528ca8930f0ee0ae68f415ed84ffa40edc0caa9 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 4 Apr 2023 18:57:28 +0200 Subject: [PATCH 773/895] Add note for GH-10168 to UPGRADING.INTERNALS --- UPGRADING.INTERNALS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 775119ba6ada4..eecbf26747a74 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -46,6 +46,11 @@ PHP 8.3 INTERNALS UPGRADE NOTES constant names are only stored as keys of the global constants table. That's why the `zend_register_constant()` function now expects the constant name as its first parameter. +* Many calls to zend_assign_to_variable have been replaced with + zend_assign_to_variable_ex which allows delaying the releasing of the old + variable value. This avoids side-effects through destructors between the + assignment of the variable and the assignment to the result zval in the VM + (i.e. it may free the new value). See GH-10168 for details. ======================== 2. Build system changes From ac3abe4579962ba0816bf7765153e665aca0aa3a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:58:56 +0300 Subject: [PATCH 774/895] Revert "Zend/zend_types.h: move `zend_string` to `zend_string.h`" This reverts commit 02690fe3c0c35655bc40844780eba0c283a37a2f. --- Zend/zend_alloc.h | 2 +- Zend/zend_string.c | 1 - Zend/zend_string.h | 20 +------------------- Zend/zend_types.h | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 30fea71e2efaf..95581cf2814c1 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,12 +21,12 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H -#include "zend_portability.h" #include "zend_result.h" #include #include "../TSRM/TSRM.h" +#include "zend.h" #ifndef ZEND_MM_ALIGNMENT # error "ZEND_MM_ALIGNMENT was not defined during configure" diff --git a/Zend/zend_string.c b/Zend/zend_string.c index a0f379556d05e..ddb8ff1bb84fe 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_string.h" #include "zend.h" #include "zend_globals.h" #include "zend_rc_debug.h" diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 2247c58fd86a7..d53f351b11005 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -19,26 +19,8 @@ #ifndef ZEND_STRING_H #define ZEND_STRING_H -#include "zend_alloc.h" +#include "zend.h" #include "zend_char.h" -#include "zend_portability.h" -#include "zend_refcounted.h" - -/* string flags (zval.value->gc.u.flags) */ -#define IS_STR_CLASS_NAME_MAP_PTR GC_PROTECTED /* refcount is a map_ptr offset of class_entry */ -#define IS_STR_INTERNED GC_IMMUTABLE /* interned string */ -#define IS_STR_PERSISTENT GC_PERSISTENT /* allocated using malloc */ -#define IS_STR_PERMANENT (1<<8) /* relives request boundary */ -#define IS_STR_VALID_UTF8 (1<<9) /* valid UTF-8 according to PCRE */ - -typedef struct _zend_string zend_string; - -struct _zend_string { - zend_refcounted_h gc; - zend_ulong h; /* hash value */ - size_t len; - char val[1]; -}; BEGIN_EXTERN_C() diff --git a/Zend/zend_types.h b/Zend/zend_types.h index faed815401948..48854039d41ab 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -331,6 +331,13 @@ struct _zval_struct { } u2; }; +struct _zend_string { + zend_refcounted_h gc; + zend_ulong h; /* hash value */ + size_t len; + char val[1]; +}; + typedef struct _Bucket { zval val; zend_ulong h; /* hash value (or numeric index) */ @@ -620,6 +627,13 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) { #define IS_CONSTANT_AST_EX (IS_CONSTANT_AST | (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT)) +/* string flags (zval.value->gc.u.flags) */ +#define IS_STR_CLASS_NAME_MAP_PTR GC_PROTECTED /* refcount is a map_ptr offset of class_entry */ +#define IS_STR_INTERNED GC_IMMUTABLE /* interned string */ +#define IS_STR_PERSISTENT GC_PERSISTENT /* allocated using malloc */ +#define IS_STR_PERMANENT (1<<8) /* relives request boundary */ +#define IS_STR_VALID_UTF8 (1<<9) /* valid UTF-8 according to PCRE */ + /* array flags */ #define IS_ARRAY_IMMUTABLE GC_IMMUTABLE #define IS_ARRAY_PERSISTENT GC_PERSISTENT From 61b19ba3f00ec57e97d39fd86eccfcfd09c56039 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:59:00 +0300 Subject: [PATCH 775/895] Revert "Zend/zend_types.h: move `zend_uchar.h` to `zend_char.h`" This reverts commit 42577c6b6b7577c57c161ee4a74cb193382bf1e0. --- Zend/zend_API.h | 1 - Zend/zend_char.h | 22 ---------------------- Zend/zend_string.h | 1 - Zend/zend_types.h | 2 ++ 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 Zend/zend_char.h diff --git a/Zend/zend_API.h b/Zend/zend_API.h index db6ad3fbde1a9..9407fe1c1b582 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -22,7 +22,6 @@ #ifndef ZEND_API_H #define ZEND_API_H -#include "zend_char.h" #include "zend_modules.h" #include "zend_list.h" #include "zend_operators.h" diff --git a/Zend/zend_char.h b/Zend/zend_char.h deleted file mode 100644 index 0a4af72baa1ff..0000000000000 --- a/Zend/zend_char.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#ifndef ZEND_CHAR_H -#define ZEND_CHAR_H - -typedef unsigned char zend_uchar; - -#endif /* ZEND_CHAR_H */ diff --git a/Zend/zend_string.h b/Zend/zend_string.h index d53f351b11005..ae394dbdb7b41 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -20,7 +20,6 @@ #define ZEND_STRING_H #include "zend.h" -#include "zend_char.h" BEGIN_EXTERN_C() diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 48854039d41ab..62744548ad03d 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -53,6 +53,8 @@ # define ZEND_ENDIAN_LOHI_C_4(a, b, c, d) a, b, c, d #endif +typedef unsigned char zend_uchar; + #ifdef ZEND_ENABLE_ZVAL_LONG64 # ifdef ZEND_WIN32 # define ZEND_SIZE_MAX _UI64_MAX From e2f0ce9e066f5602385719fe28311bb3387e7ed6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:59:03 +0300 Subject: [PATCH 776/895] Revert "Zend/zend_types.h: move `zend_refcounted` to `zend_refcounted.h`" This reverts commit eb34c28fed24d0e4711dd4a04c19d0f95dabc5e9. --- Zend/zend_refcounted.h | 155 ----------------------------------------- Zend/zend_types.h | 95 ++++++++++++++++++++++++- 2 files changed, 94 insertions(+), 156 deletions(-) delete mode 100644 Zend/zend_refcounted.h diff --git a/Zend/zend_refcounted.h b/Zend/zend_refcounted.h deleted file mode 100644 index b98e5a59604c7..0000000000000 --- a/Zend/zend_refcounted.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#ifndef ZEND_REFCOUNTED_H -#define ZEND_REFCOUNTED_H - -#include "zend_portability.h" -#include "zend_rc_debug.h" -#include "zend_type_code.h" - -#include - -#define GC_TYPE_MASK 0x0000000f -#define GC_FLAGS_MASK 0x000003f0 -#define GC_INFO_MASK 0xfffffc00 -#define GC_FLAGS_SHIFT 0 -#define GC_INFO_SHIFT 10 - -/* zval_gc_flags(zval.value->gc.u.type_info) (common flags) */ -#define GC_NOT_COLLECTABLE (1<<4) -#define GC_PROTECTED (1<<5) /* used for recursion detection */ -#define GC_IMMUTABLE (1<<6) /* can't be changed in place */ -#define GC_PERSISTENT (1<<7) /* allocated using malloc */ -#define GC_PERSISTENT_LOCAL (1<<8) /* persistent, but thread-local */ - -#define GC_TYPE_INFO(p) (p)->gc.u.type_info -#define GC_TYPE(p) zval_gc_type(GC_TYPE_INFO(p)) -#define GC_FLAGS(p) zval_gc_flags(GC_TYPE_INFO(p)) -#define GC_INFO(p) zval_gc_info(GC_TYPE_INFO(p)) - -#define GC_ADD_FLAGS(p, flags) do { \ - GC_TYPE_INFO(p) |= (flags) << GC_FLAGS_SHIFT; \ - } while (0) -#define GC_DEL_FLAGS(p, flags) do { \ - GC_TYPE_INFO(p) &= ~((flags) << GC_FLAGS_SHIFT); \ - } while (0) - -#define GC_REFCOUNT(p) zend_gc_refcount(&(p)->gc) -#define GC_SET_REFCOUNT(p, rc) zend_gc_set_refcount(&(p)->gc, rc) -#define GC_ADDREF(p) zend_gc_addref(&(p)->gc) -#define GC_DELREF(p) zend_gc_delref(&(p)->gc) -#define GC_ADDREF_EX(p, rc) zend_gc_addref_ex(&(p)->gc, rc) -#define GC_DELREF_EX(p, rc) zend_gc_delref_ex(&(p)->gc, rc) -#define GC_TRY_ADDREF(p) zend_gc_try_addref(&(p)->gc) -#define GC_TRY_DELREF(p) zend_gc_try_delref(&(p)->gc) -#define GC_DTOR(p) \ - do { \ - zend_refcounted_h *_p = &(p)->gc; \ - if (zend_gc_delref(_p) == 0) { \ - rc_dtor_func((zend_refcounted *)_p); \ - } else { \ - gc_check_possible_root((zend_refcounted *)_p); \ - } \ - } while (0) -#define GC_DTOR_NO_REF(p) \ - do { \ - zend_refcounted_h *_p = &(p)->gc; \ - if (zend_gc_delref(_p) == 0) { \ - rc_dtor_func((zend_refcounted *)_p); \ - } else { \ - gc_check_possible_root_no_ref((zend_refcounted *)_p); \ - } \ - } while (0) - -#define GC_NULL (IS_NULL | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) -#define GC_STRING (IS_STRING | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) -#define GC_ARRAY IS_ARRAY -#define GC_OBJECT IS_OBJECT -#define GC_RESOURCE (IS_RESOURCE | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) -#define GC_REFERENCE (IS_REFERENCE | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) -#define GC_CONSTANT_AST (IS_CONSTANT_AST | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) - -typedef struct _zend_refcounted_h { - uint32_t refcount; /* reference counter 32-bit */ - union { - uint32_t type_info; - } u; -} zend_refcounted_h; - -typedef struct _zend_refcounted { - zend_refcounted_h gc; -} zend_refcounted; - -static zend_always_inline uint8_t zval_gc_type(uint32_t gc_type_info) { - return (gc_type_info & GC_TYPE_MASK); -} - -static zend_always_inline uint32_t zval_gc_flags(uint32_t gc_type_info) { - return (gc_type_info >> GC_FLAGS_SHIFT) & (GC_FLAGS_MASK >> GC_FLAGS_SHIFT); -} - -static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) { - return (gc_type_info >> GC_INFO_SHIFT); -} - -static zend_always_inline uint32_t zend_gc_refcount(const zend_refcounted_h *p) { - return p->refcount; -} - -static zend_always_inline uint32_t zend_gc_set_refcount(zend_refcounted_h *p, uint32_t rc) { - p->refcount = rc; - return p->refcount; -} - -static zend_always_inline uint32_t zend_gc_addref(zend_refcounted_h *p) { - ZEND_RC_MOD_CHECK(p); - return ++(p->refcount); -} - -static zend_always_inline void zend_gc_try_addref(zend_refcounted_h *p) { - if (!(p->u.type_info & GC_IMMUTABLE)) { - ZEND_RC_MOD_CHECK(p); - ++p->refcount; - } -} - -static zend_always_inline void zend_gc_try_delref(zend_refcounted_h *p) { - if (!(p->u.type_info & GC_IMMUTABLE)) { - ZEND_RC_MOD_CHECK(p); - --p->refcount; - } -} - -static zend_always_inline uint32_t zend_gc_delref(zend_refcounted_h *p) { - ZEND_ASSERT(p->refcount > 0); - ZEND_RC_MOD_CHECK(p); - return --(p->refcount); -} - -static zend_always_inline uint32_t zend_gc_addref_ex(zend_refcounted_h *p, uint32_t rc) { - ZEND_RC_MOD_CHECK(p); - p->refcount += rc; - return p->refcount; -} - -static zend_always_inline uint32_t zend_gc_delref_ex(zend_refcounted_h *p, uint32_t rc) { - ZEND_RC_MOD_CHECK(p); - p->refcount -= rc; - return p->refcount; -} - -#endif /* ZEND_REFCOUNTED_H */ diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 62744548ad03d..882f789acbb85 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -25,7 +25,6 @@ #include "zend_portability.h" #include "zend_long.h" #include "zend_rc_debug.h" -#include "zend_refcounted.h" #include "zend_result.h" #include "zend_type_code.h" @@ -84,6 +83,7 @@ typedef struct _zend_execute_data zend_execute_data; typedef struct _zval_struct zval; +typedef struct _zend_refcounted zend_refcounted; typedef struct _zend_string zend_string; typedef struct _zend_array zend_array; typedef struct _zend_object zend_object; @@ -333,6 +333,17 @@ struct _zval_struct { } u2; }; +typedef struct _zend_refcounted_h { + uint32_t refcount; /* reference counter 32-bit */ + union { + uint32_t type_info; + } u; +} zend_refcounted_h; + +struct _zend_refcounted { + zend_refcounted_h gc; +}; + struct _zend_string { zend_refcounted_h gc; zend_ulong h; /* hash value */ @@ -577,12 +588,33 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) { #define Z_TYPE_FLAGS_SHIFT 8 +#define GC_REFCOUNT(p) zend_gc_refcount(&(p)->gc) +#define GC_SET_REFCOUNT(p, rc) zend_gc_set_refcount(&(p)->gc, rc) +#define GC_ADDREF(p) zend_gc_addref(&(p)->gc) +#define GC_DELREF(p) zend_gc_delref(&(p)->gc) +#define GC_ADDREF_EX(p, rc) zend_gc_addref_ex(&(p)->gc, rc) +#define GC_DELREF_EX(p, rc) zend_gc_delref_ex(&(p)->gc, rc) +#define GC_TRY_ADDREF(p) zend_gc_try_addref(&(p)->gc) +#define GC_TRY_DELREF(p) zend_gc_try_delref(&(p)->gc) + #define GC_TYPE_MASK 0x0000000f #define GC_FLAGS_MASK 0x000003f0 #define GC_INFO_MASK 0xfffffc00 #define GC_FLAGS_SHIFT 0 #define GC_INFO_SHIFT 10 +static zend_always_inline uint8_t zval_gc_type(uint32_t gc_type_info) { + return (gc_type_info & GC_TYPE_MASK); +} + +static zend_always_inline uint32_t zval_gc_flags(uint32_t gc_type_info) { + return (gc_type_info >> GC_FLAGS_SHIFT) & (GC_FLAGS_MASK >> GC_FLAGS_SHIFT); +} + +static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) { + return (gc_type_info >> GC_INFO_SHIFT); +} + #define GC_TYPE_INFO(p) (p)->gc.u.type_info #define GC_TYPE(p) zval_gc_type(GC_TYPE_INFO(p)) #define GC_FLAGS(p) zval_gc_flags(GC_TYPE_INFO(p)) @@ -606,6 +638,21 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) { #define Z_GC_TYPE_INFO(zval) GC_TYPE_INFO(Z_COUNTED(zval)) #define Z_GC_TYPE_INFO_P(zval_p) Z_GC_TYPE_INFO(*(zval_p)) +/* zval_gc_flags(zval.value->gc.u.type_info) (common flags) */ +#define GC_NOT_COLLECTABLE (1<<4) +#define GC_PROTECTED (1<<5) /* used for recursion detection */ +#define GC_IMMUTABLE (1<<6) /* can't be changed in place */ +#define GC_PERSISTENT (1<<7) /* allocated using malloc */ +#define GC_PERSISTENT_LOCAL (1<<8) /* persistent, but thread-local */ + +#define GC_NULL (IS_NULL | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) +#define GC_STRING (IS_STRING | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) +#define GC_ARRAY IS_ARRAY +#define GC_OBJECT IS_OBJECT +#define GC_RESOURCE (IS_RESOURCE | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) +#define GC_REFERENCE (IS_REFERENCE | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) +#define GC_CONSTANT_AST (IS_CONSTANT_AST | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT)) + /* zval.u1.v.type_flags */ #define IS_TYPE_REFCOUNTED (1<<0) #define IS_TYPE_COLLECTABLE (1<<1) @@ -1087,6 +1134,52 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) { do { } while (0) #endif +static zend_always_inline uint32_t zend_gc_refcount(const zend_refcounted_h *p) { + return p->refcount; +} + +static zend_always_inline uint32_t zend_gc_set_refcount(zend_refcounted_h *p, uint32_t rc) { + p->refcount = rc; + return p->refcount; +} + +static zend_always_inline uint32_t zend_gc_addref(zend_refcounted_h *p) { + ZEND_RC_MOD_CHECK(p); + return ++(p->refcount); +} + +static zend_always_inline void zend_gc_try_addref(zend_refcounted_h *p) { + if (!(p->u.type_info & GC_IMMUTABLE)) { + ZEND_RC_MOD_CHECK(p); + ++p->refcount; + } +} + +static zend_always_inline void zend_gc_try_delref(zend_refcounted_h *p) { + if (!(p->u.type_info & GC_IMMUTABLE)) { + ZEND_RC_MOD_CHECK(p); + --p->refcount; + } +} + +static zend_always_inline uint32_t zend_gc_delref(zend_refcounted_h *p) { + ZEND_ASSERT(p->refcount > 0); + ZEND_RC_MOD_CHECK(p); + return --(p->refcount); +} + +static zend_always_inline uint32_t zend_gc_addref_ex(zend_refcounted_h *p, uint32_t rc) { + ZEND_RC_MOD_CHECK(p); + p->refcount += rc; + return p->refcount; +} + +static zend_always_inline uint32_t zend_gc_delref_ex(zend_refcounted_h *p, uint32_t rc) { + ZEND_RC_MOD_CHECK(p); + p->refcount -= rc; + return p->refcount; +} + static zend_always_inline uint32_t zval_refcount_p(const zval* pz) { #if ZEND_DEBUG ZEND_ASSERT(Z_REFCOUNTED_P(pz) || Z_TYPE_P(pz) == IS_ARRAY); From 4f724accf84eecfd2d446ba08729d862cfb45272 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:59:05 +0300 Subject: [PATCH 777/895] Revert "Zend/zend_type_code.h: convert to `enum`" This reverts commit b98f18e7c3838cf587a1b6d0f033b89e9909c79d. --- Zend/zend_type_code.h | 60 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/Zend/zend_type_code.h b/Zend/zend_type_code.h index 6ed86ab76313b..d0a14fc821bab 100644 --- a/Zend/zend_type_code.h +++ b/Zend/zend_type_code.h @@ -17,40 +17,38 @@ #ifndef ZEND_TYPE_CODE_H #define ZEND_TYPE_CODE_H -enum { - /* Regular data types: Must be in sync with zend_variables.c. */ - IS_UNDEF = 0, - IS_NULL = 1, - IS_FALSE = 2, - IS_TRUE = 3, - IS_LONG = 4, - IS_DOUBLE = 5, - IS_STRING = 6, - IS_ARRAY = 7, - IS_OBJECT = 8, - IS_RESOURCE = 9, - IS_REFERENCE = 10, - IS_CONSTANT_AST = 11, /* Constant expressions */ +/* Regular data types: Must be in sync with zend_variables.c. */ +#define IS_UNDEF 0 +#define IS_NULL 1 +#define IS_FALSE 2 +#define IS_TRUE 3 +#define IS_LONG 4 +#define IS_DOUBLE 5 +#define IS_STRING 6 +#define IS_ARRAY 7 +#define IS_OBJECT 8 +#define IS_RESOURCE 9 +#define IS_REFERENCE 10 +#define IS_CONSTANT_AST 11 /* Constant expressions */ - /* Fake types used only for type hinting. - * These are allowed to overlap with the types below. */ - IS_CALLABLE = 12, - IS_ITERABLE = 13, - IS_VOID = 14, - IS_STATIC = 15, - IS_MIXED = 16, - IS_NEVER = 17, +/* Fake types used only for type hinting. + * These are allowed to overlap with the types below. */ +#define IS_CALLABLE 12 +#define IS_ITERABLE 13 +#define IS_VOID 14 +#define IS_STATIC 15 +#define IS_MIXED 16 +#define IS_NEVER 17 - /* internal types */ - IS_INDIRECT = 12, - IS_PTR = 13, - IS_ALIAS_PTR = 14, - _IS_ERROR = 15, +/* internal types */ +#define IS_INDIRECT 12 +#define IS_PTR 13 +#define IS_ALIAS_PTR 14 +#define _IS_ERROR 15 - /* used for casts */ - _IS_BOOL = 18, - _IS_NUMBER = 19, -}; +/* used for casts */ +#define _IS_BOOL 18 +#define _IS_NUMBER 19 #define ZEND_SAME_FAKE_TYPE(faketype, realtype) ( \ (faketype) == (realtype) \ From 0e70693701359a7be303c4c3ed9e5c64ed9792d4 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:59:42 +0300 Subject: [PATCH 778/895] Revert "Zend/zend_types.h: move `IS_*` to `zend_type_code.h`" This reverts commit 0270a1e54c0285fa3c89ee2b0120073ef57ab5fa. --- Zend/zend.h | 1 - Zend/zend_API.h | 2 +- Zend/zend_execute.h | 1 - Zend/zend_hash.h | 1 - Zend/zend_type_code.h | 58 ------------------------------------------- Zend/zend_types.h | 39 ++++++++++++++++++++++++++++- 6 files changed, 39 insertions(+), 63 deletions(-) delete mode 100644 Zend/zend_type_code.h diff --git a/Zend/zend.h b/Zend/zend.h index 6e550843ea26c..fd21cbfeb93cf 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -39,7 +39,6 @@ #include "zend_smart_str_public.h" #include "zend_smart_string_public.h" #include "zend_signal.h" -#include "zend_type_code.h" #include "zend_max_execution_timer.h" #define zend_sprintf sprintf diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 9407fe1c1b582..92daf6570aea6 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -28,7 +28,7 @@ #include "zend_variables.h" #include "zend_execute.h" #include "zend_type_info.h" -#include "zend_type_code.h" + BEGIN_EXTERN_C() diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 2512e66dc6d44..caeaa2a3b9f5f 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -24,7 +24,6 @@ #include "zend_compile.h" #include "zend_hash.h" #include "zend_operators.h" -#include "zend_type_code.h" #include "zend_variables.h" #include diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index dfcf9c0c8b508..d9210d073182f 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -23,7 +23,6 @@ #include "zend.h" #include "zend_sort.h" -#include "zend_type_code.h" #define HASH_KEY_IS_STRING 1 #define HASH_KEY_IS_LONG 2 diff --git a/Zend/zend_type_code.h b/Zend/zend_type_code.h deleted file mode 100644 index d0a14fc821bab..0000000000000 --- a/Zend/zend_type_code.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#ifndef ZEND_TYPE_CODE_H -#define ZEND_TYPE_CODE_H - -/* Regular data types: Must be in sync with zend_variables.c. */ -#define IS_UNDEF 0 -#define IS_NULL 1 -#define IS_FALSE 2 -#define IS_TRUE 3 -#define IS_LONG 4 -#define IS_DOUBLE 5 -#define IS_STRING 6 -#define IS_ARRAY 7 -#define IS_OBJECT 8 -#define IS_RESOURCE 9 -#define IS_REFERENCE 10 -#define IS_CONSTANT_AST 11 /* Constant expressions */ - -/* Fake types used only for type hinting. - * These are allowed to overlap with the types below. */ -#define IS_CALLABLE 12 -#define IS_ITERABLE 13 -#define IS_VOID 14 -#define IS_STATIC 15 -#define IS_MIXED 16 -#define IS_NEVER 17 - -/* internal types */ -#define IS_INDIRECT 12 -#define IS_PTR 13 -#define IS_ALIAS_PTR 14 -#define _IS_ERROR 15 - -/* used for casts */ -#define _IS_BOOL 18 -#define _IS_NUMBER 19 - -#define ZEND_SAME_FAKE_TYPE(faketype, realtype) ( \ - (faketype) == (realtype) \ - || ((faketype) == _IS_BOOL && ((realtype) == IS_TRUE || (realtype) == IS_FALSE)) \ -) - -#endif /* ZEND_TYPE_CODE_H */ diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 882f789acbb85..b9ac3b04cf12f 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -26,7 +26,6 @@ #include "zend_long.h" #include "zend_rc_debug.h" #include "zend_result.h" -#include "zend_type_code.h" #include #include @@ -539,10 +538,48 @@ struct _zend_ast_ref { /*zend_ast ast; zend_ast follows the zend_ast_ref structure */ }; +/* Regular data types: Must be in sync with zend_variables.c. */ +#define IS_UNDEF 0 +#define IS_NULL 1 +#define IS_FALSE 2 +#define IS_TRUE 3 +#define IS_LONG 4 +#define IS_DOUBLE 5 +#define IS_STRING 6 +#define IS_ARRAY 7 +#define IS_OBJECT 8 +#define IS_RESOURCE 9 +#define IS_REFERENCE 10 +#define IS_CONSTANT_AST 11 /* Constant expressions */ + +/* Fake types used only for type hinting. + * These are allowed to overlap with the types below. */ +#define IS_CALLABLE 12 +#define IS_ITERABLE 13 +#define IS_VOID 14 +#define IS_STATIC 15 +#define IS_MIXED 16 +#define IS_NEVER 17 + +/* internal types */ +#define IS_INDIRECT 12 +#define IS_PTR 13 +#define IS_ALIAS_PTR 14 +#define _IS_ERROR 15 + +/* used for casts */ +#define _IS_BOOL 18 +#define _IS_NUMBER 19 + static zend_always_inline uint8_t zval_get_type(const zval* pz) { return pz->u1.v.type; } +#define ZEND_SAME_FAKE_TYPE(faketype, realtype) ( \ + (faketype) == (realtype) \ + || ((faketype) == _IS_BOOL && ((realtype) == IS_TRUE || (realtype) == IS_FALSE)) \ +) + /* we should never set just Z_TYPE, we should set Z_TYPE_INFO */ #define Z_TYPE(zval) zval_get_type(&(zval)) #define Z_TYPE_P(zval_p) Z_TYPE(*(zval_p)) From 59905d8fc56cce740d8896b3bda8f89691cd822c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 09:59:44 +0300 Subject: [PATCH 779/895] Revert "Zend/zend_rc_debug: convert `ZEND_RC_MOD_CHECK()` to function" This reverts commit e509a66a9c0b33273c0e4875e2489794b62b0607. --- Zend/zend_rc_debug.c | 21 --------------------- Zend/zend_rc_debug.h | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/Zend/zend_rc_debug.c b/Zend/zend_rc_debug.c index 3efd60c0f665d..190fcde74c216 100644 --- a/Zend/zend_rc_debug.c +++ b/Zend/zend_rc_debug.c @@ -17,26 +17,5 @@ #include "zend_rc_debug.h" #if ZEND_RC_DEBUG - -#include "zend_types.h" - ZEND_API bool zend_rc_debug = false; - -ZEND_API void ZEND_RC_MOD_CHECK(const zend_refcounted_h *p) -{ - if (!zend_rc_debug) { - return; - } - - uint8_t type = zval_gc_type(p->u.type_info); - - /* Skip checks for OBJECT/NULL type to avoid interpreting the flag incorrectly. */ - if (type != IS_OBJECT && type != IS_NULL) { - ZEND_ASSERT(!(zval_gc_flags(p->u.type_info) & GC_IMMUTABLE)); - - /* The GC_PERSISTENT flag is reused for IS_OBJ_WEAKLY_REFERENCED on objects. */ - ZEND_ASSERT((zval_gc_flags(p->u.type_info) & (GC_PERSISTENT|GC_PERSISTENT_LOCAL)) != GC_PERSISTENT); - } -} - #endif diff --git a/Zend/zend_rc_debug.h b/Zend/zend_rc_debug.h index 345b67b1f9380..df033d36fa84f 100644 --- a/Zend/zend_rc_debug.h +++ b/Zend/zend_rc_debug.h @@ -32,18 +32,19 @@ #include #include -#include "zend_portability.h" - -typedef struct _zend_refcounted_h zend_refcounted_h; - extern ZEND_API bool zend_rc_debug; -BEGIN_EXTERN_C() - -ZEND_API void ZEND_RC_MOD_CHECK(const zend_refcounted_h *p); - -END_EXTERN_C() - +/* The GC_PERSISTENT flag is reused for IS_OBJ_WEAKLY_REFERENCED on objects. + * Skip checks for OBJECT/NULL type to avoid interpreting the flag incorrectly. */ +# define ZEND_RC_MOD_CHECK(p) do { \ + if (zend_rc_debug) { \ + uint8_t type = zval_gc_type((p)->u.type_info); \ + if (type != IS_OBJECT && type != IS_NULL) { \ + ZEND_ASSERT(!(zval_gc_flags((p)->u.type_info) & GC_IMMUTABLE)); \ + ZEND_ASSERT((zval_gc_flags((p)->u.type_info) & (GC_PERSISTENT|GC_PERSISTENT_LOCAL)) != GC_PERSISTENT); \ + } \ + } \ + } while (0) #else # define ZEND_RC_MOD_CHECK(p) \ do { } while (0) From c9d728cbd695feed7700753d5c2ad343aa02bbd7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 10:00:14 +0300 Subject: [PATCH 780/895] Revert "Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`" This reverts commit d6e95041e291f1f41e1da43e616c6354705464d3. --- Zend/zend.c | 4 ++++ Zend/zend_API.c | 1 - Zend/zend_rc_debug.c | 21 ---------------- Zend/zend_rc_debug.h | 53 ----------------------------------------- Zend/zend_string.c | 1 - Zend/zend_types.h | 19 ++++++++++++++- configure.ac | 2 +- main/main.c | 1 - main/php.h | 1 - main/php_ini.c | 1 - sapi/fpm/fpm/fpm_main.c | 1 - 11 files changed, 23 insertions(+), 82 deletions(-) delete mode 100644 Zend/zend_rc_debug.c delete mode 100644 Zend/zend_rc_debug.h diff --git a/Zend/zend.c b/Zend/zend.c index 7f5257c570c4e..141d9bb4ad419 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -95,6 +95,10 @@ void (*zend_on_timeout)(int seconds); static void (*zend_message_dispatcher_p)(zend_long message, const void *data); static zval *(*zend_get_configuration_directive_p)(zend_string *name); +#if ZEND_RC_DEBUG +ZEND_API bool zend_rc_debug = 0; +#endif + static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */ { if (!new_value) { diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c199190888fba..1beb76dff4dc0 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -32,7 +32,6 @@ #include "zend_ini.h" #include "zend_enum.h" #include "zend_observer.h" -#include "zend_rc_debug.h" #include diff --git a/Zend/zend_rc_debug.c b/Zend/zend_rc_debug.c deleted file mode 100644 index 190fcde74c216..0000000000000 --- a/Zend/zend_rc_debug.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#include "zend_rc_debug.h" - -#if ZEND_RC_DEBUG -ZEND_API bool zend_rc_debug = false; -#endif diff --git a/Zend/zend_rc_debug.h b/Zend/zend_rc_debug.h deleted file mode 100644 index df033d36fa84f..0000000000000 --- a/Zend/zend_rc_debug.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#ifndef ZEND_RC_DEBUG_H -#define ZEND_RC_DEBUG_H - -#ifndef ZEND_RC_DEBUG -# define ZEND_RC_DEBUG 0 -#endif - -#if ZEND_RC_DEBUG - -#ifdef PHP_WIN32 -# include "zend_config.w32.h" -#else -# include "zend_config.h" -#endif - -#include -#include - -extern ZEND_API bool zend_rc_debug; - -/* The GC_PERSISTENT flag is reused for IS_OBJ_WEAKLY_REFERENCED on objects. - * Skip checks for OBJECT/NULL type to avoid interpreting the flag incorrectly. */ -# define ZEND_RC_MOD_CHECK(p) do { \ - if (zend_rc_debug) { \ - uint8_t type = zval_gc_type((p)->u.type_info); \ - if (type != IS_OBJECT && type != IS_NULL) { \ - ZEND_ASSERT(!(zval_gc_flags((p)->u.type_info) & GC_IMMUTABLE)); \ - ZEND_ASSERT((zval_gc_flags((p)->u.type_info) & (GC_PERSISTENT|GC_PERSISTENT_LOCAL)) != GC_PERSISTENT); \ - } \ - } \ - } while (0) -#else -# define ZEND_RC_MOD_CHECK(p) \ - do { } while (0) -#endif - -#endif /* ZEND_RC_DEBUG_H */ diff --git a/Zend/zend_string.c b/Zend/zend_string.c index ddb8ff1bb84fe..d65101e778c14 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -18,7 +18,6 @@ #include "zend.h" #include "zend_globals.h" -#include "zend_rc_debug.h" #ifdef HAVE_VALGRIND # include "valgrind/callgrind.h" diff --git a/Zend/zend_types.h b/Zend/zend_types.h index b9ac3b04cf12f..c7437122de22a 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -24,7 +24,6 @@ #include "zend_portability.h" #include "zend_long.h" -#include "zend_rc_debug.h" #include "zend_result.h" #include @@ -1162,11 +1161,29 @@ static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) { #define Z_TRY_ADDREF(z) Z_TRY_ADDREF_P(&(z)) #define Z_TRY_DELREF(z) Z_TRY_DELREF_P(&(z)) +#ifndef ZEND_RC_DEBUG +# define ZEND_RC_DEBUG 0 +#endif + #if ZEND_RC_DEBUG +extern ZEND_API bool zend_rc_debug; +/* The GC_PERSISTENT flag is reused for IS_OBJ_WEAKLY_REFERENCED on objects. + * Skip checks for OBJECT/NULL type to avoid interpreting the flag incorrectly. */ +# define ZEND_RC_MOD_CHECK(p) do { \ + if (zend_rc_debug) { \ + uint8_t type = zval_gc_type((p)->u.type_info); \ + if (type != IS_OBJECT && type != IS_NULL) { \ + ZEND_ASSERT(!(zval_gc_flags((p)->u.type_info) & GC_IMMUTABLE)); \ + ZEND_ASSERT((zval_gc_flags((p)->u.type_info) & (GC_PERSISTENT|GC_PERSISTENT_LOCAL)) != GC_PERSISTENT); \ + } \ + } \ + } while (0) # define GC_MAKE_PERSISTENT_LOCAL(p) do { \ GC_ADD_FLAGS(p, GC_PERSISTENT_LOCAL); \ } while (0) #else +# define ZEND_RC_MOD_CHECK(p) \ + do { } while (0) # define GC_MAKE_PERSISTENT_LOCAL(p) \ do { } while (0) #endif diff --git a/configure.ac b/configure.ac index 4793ffdf5209e..fcb629723817b 100644 --- a/configure.ac +++ b/configure.ac @@ -1723,7 +1723,7 @@ PHP_ADD_SOURCES(Zend, \ zend_virtual_cwd.c zend_ast.c zend_objects.c zend_object_handlers.c zend_objects_API.c \ zend_default_classes.c zend_inheritance.c zend_smart_str.c zend_cpuinfo.c zend_gdb.c \ zend_observer.c zend_system_id.c zend_enum.c zend_fibers.c zend_atomic.c \ - zend_rc_debug.c zend_max_execution_timer.c \ + zend_max_execution_timer.c \ Optimizer/zend_optimizer.c \ Optimizer/pass1.c \ Optimizer/pass3.c \ diff --git a/main/main.c b/main/main.c index 022f26bd5f435..95d1ad6050b7b 100644 --- a/main/main.c +++ b/main/main.c @@ -71,7 +71,6 @@ #include "zend_ini.h" #include "zend_dtrace.h" #include "zend_observer.h" -#include "zend_rc_debug.h" #include "zend_system_id.h" #include "php_content_types.h" diff --git a/main/php.h b/main/php.h index c3d139059c48f..3385fb799927e 100644 --- a/main/php.h +++ b/main/php.h @@ -29,7 +29,6 @@ #include "php_version.h" #include "zend.h" -#include "zend_rc_debug.h" #include "zend_sort.h" #include "php_compat.h" diff --git a/main/php_ini.c b/main/php_ini.c index 68304f42c5da4..82420fd0bc600 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -22,7 +22,6 @@ #include "ext/standard/dl.h" #include "zend_extensions.h" #include "zend_highlight.h" -#include "zend_rc_debug.h" #include "SAPI.h" #include "php_main.h" #include "php_scandir.h" diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 783cb200c1e13..7ef0372c08ef1 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -27,7 +27,6 @@ #include "php.h" #include "zend_ini_scanner.h" #include "zend_globals.h" -#include "zend_rc_debug.h" #include "zend_stream.h" #include "SAPI.h" From 706a9b2a399f6f1cd89923582f95ba5a4088ba9d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 10:00:18 +0300 Subject: [PATCH 781/895] Revert "Zend/zend_types.h: move `zend_result` to separate header (#10609)" This reverts commit 3bce11606937de8227dac6512d2abf163dc0e8fa. --- Zend/Optimizer/zend_ssa.h | 1 - Zend/zend_alloc.h | 2 -- Zend/zend_builtin_functions.h | 2 -- Zend/zend_exceptions.h | 2 -- Zend/zend_extensions.h | 1 - Zend/zend_highlight.h | 2 -- Zend/zend_ini.h | 2 -- Zend/zend_modules.h | 1 - Zend/zend_multibyte.h | 2 -- Zend/zend_operators.h | 2 -- Zend/zend_result.h | 27 --------------------------- Zend/zend_stream.h | 2 -- Zend/zend_system_id.h | 2 -- Zend/zend_types.h | 9 +++++++-- 14 files changed, 7 insertions(+), 50 deletions(-) delete mode 100644 Zend/zend_result.h diff --git a/Zend/Optimizer/zend_ssa.h b/Zend/Optimizer/zend_ssa.h index 1867653184858..5a6fce38d2f81 100644 --- a/Zend/Optimizer/zend_ssa.h +++ b/Zend/Optimizer/zend_ssa.h @@ -21,7 +21,6 @@ #include "zend_optimizer.h" #include "zend_cfg.h" -#include "zend_result.h" typedef struct _zend_ssa_range { zend_long min; diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 95581cf2814c1..578d4c78cc5c5 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,8 +21,6 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H -#include "zend_result.h" - #include #include "../TSRM/TSRM.h" diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h index b037891299e14..a49dab1b46838 100644 --- a/Zend/zend_builtin_functions.h +++ b/Zend/zend_builtin_functions.h @@ -20,8 +20,6 @@ #ifndef ZEND_BUILTIN_FUNCTIONS_H #define ZEND_BUILTIN_FUNCTIONS_H -#include "zend_result.h" - zend_result zend_startup_builtin_functions(void); BEGIN_EXTERN_C() diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index 0c701c3326ca0..f61b5ecb304e2 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -22,8 +22,6 @@ #ifndef ZEND_EXCEPTIONS_H #define ZEND_EXCEPTIONS_H -#include "zend_result.h" - BEGIN_EXTERN_C() extern ZEND_API zend_class_entry *zend_ce_throwable; diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 50ac657bb803e..14ba9054d9b6a 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -22,7 +22,6 @@ #include "zend_compile.h" #include "zend_build.h" -#include "zend_result.h" /* The constants below are derived from ext/opcache/ZendAccelerator.h diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h index dd48ae1f39782..e54a339ec4bc3 100644 --- a/Zend/zend_highlight.h +++ b/Zend/zend_highlight.h @@ -20,8 +20,6 @@ #ifndef ZEND_HIGHLIGHT_H #define ZEND_HIGHLIGHT_H -#include "zend_result.h" - #define HL_COMMENT_COLOR "#FF8000" /* orange */ #define HL_DEFAULT_COLOR "#0000BB" /* blue */ #define HL_HTML_COLOR "#000000" /* black */ diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index deb61dae370ac..1618953835339 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -19,8 +19,6 @@ #ifndef ZEND_INI_H #define ZEND_INI_H -#include "zend_result.h" - #define ZEND_INI_USER (1<<0) #define ZEND_INI_PERDIR (1<<1) #define ZEND_INI_SYSTEM (1<<2) diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index e32fab935bfb5..e1db8fdb59791 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -23,7 +23,6 @@ #include "zend.h" #include "zend_compile.h" #include "zend_build.h" -#include "zend_result.h" #define INIT_FUNC_ARGS int type, int module_number #define INIT_FUNC_ARGS_PASSTHRU type, module_number diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 521780129ba10..5466840cd900a 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -20,8 +20,6 @@ #ifndef ZEND_MULTIBYTE_H #define ZEND_MULTIBYTE_H -#include "zend_result.h" - typedef struct _zend_encoding zend_encoding; typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index c90cca8a648fe..40974da03249f 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -21,8 +21,6 @@ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H -#include "zend_result.h" - #include #include #include diff --git a/Zend/zend_result.h b/Zend/zend_result.h deleted file mode 100644 index 8e60fc68b6f68..0000000000000 --- a/Zend/zend_result.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ -*/ - -#ifndef ZEND_RESULT_H -#define ZEND_RESULT_H - -typedef enum { - SUCCESS = 0, - FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */ -} ZEND_RESULT_CODE; - -typedef ZEND_RESULT_CODE zend_result; - -#endif /* ZEND_RESULT_H */ diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 1c6ee0a556267..c1f8ddfb85ca8 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -22,8 +22,6 @@ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H -#include "zend_result.h" - #include #include diff --git a/Zend/zend_system_id.h b/Zend/zend_system_id.h index 3089d0f6eabec..60514e15a0976 100644 --- a/Zend/zend_system_id.h +++ b/Zend/zend_system_id.h @@ -17,8 +17,6 @@ #ifndef ZEND_SYSTEM_ID_H #define ZEND_SYSTEM_ID_H -#include "zend_result.h" - BEGIN_EXTERN_C() /* True global; Write-only during MINIT/startup */ extern ZEND_API char zend_system_id[32]; diff --git a/Zend/zend_types.h b/Zend/zend_types.h index c7437122de22a..eeb53d5feef31 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -24,8 +24,6 @@ #include "zend_portability.h" #include "zend_long.h" -#include "zend_result.h" - #include #include @@ -52,6 +50,13 @@ typedef unsigned char zend_uchar; +typedef enum { + SUCCESS = 0, + FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */ +} ZEND_RESULT_CODE; + +typedef ZEND_RESULT_CODE zend_result; + #ifdef ZEND_ENABLE_ZVAL_LONG64 # ifdef ZEND_WIN32 # define ZEND_SIZE_MAX _UI64_MAX From d5484bf11515b8a23c83333ec5e6a5352e644396 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 10:01:23 +0300 Subject: [PATCH 782/895] Remove includes --- ext/random/csprng.c | 1 - ext/random/php_random.h | 1 - 2 files changed, 2 deletions(-) diff --git a/ext/random/csprng.c b/ext/random/csprng.c index f34124ca63871..106ec91affa26 100644 --- a/ext/random/csprng.c +++ b/ext/random/csprng.c @@ -25,7 +25,6 @@ #include "php.h" -#include "zend_result.h" #include "Zend/zend_exceptions.h" #include "php_random.h" diff --git a/ext/random/php_random.h b/ext/random/php_random.h index f991cc2d79de4..c970148912586 100644 --- a/ext/random/php_random.h +++ b/ext/random/php_random.h @@ -32,7 +32,6 @@ # define PHP_RANDOM_H # include "php.h" -# include "zend_result.h" PHPAPI double php_combined_lcg(void); From c796ce5713f21a3de77e710f4028c62f45bc0fff Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Apr 2023 22:50:50 +0300 Subject: [PATCH 783/895] Re-add GC_DTOR and GC_DTOR_NO_REF --- Zend/zend_types.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Zend/zend_types.h b/Zend/zend_types.h index eeb53d5feef31..0372a523f6de3 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -638,6 +638,26 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) { #define GC_TRY_ADDREF(p) zend_gc_try_addref(&(p)->gc) #define GC_TRY_DELREF(p) zend_gc_try_delref(&(p)->gc) +#define GC_DTOR(p) \ + do { \ + zend_refcounted_h *_p = &(p)->gc; \ + if (zend_gc_delref(_p) == 0) { \ + rc_dtor_func((zend_refcounted *)_p); \ + } else { \ + gc_check_possible_root((zend_refcounted *)_p); \ + } \ + } while (0) + +#define GC_DTOR_NO_REF(p) \ + do { \ + zend_refcounted_h *_p = &(p)->gc; \ + if (zend_gc_delref(_p) == 0) { \ + rc_dtor_func((zend_refcounted *)_p); \ + } else { \ + gc_check_possible_root_no_ref((zend_refcounted *)_p); \ + } \ + } while (0) + #define GC_TYPE_MASK 0x0000000f #define GC_FLAGS_MASK 0x000003f0 #define GC_INFO_MASK 0xfffffc00 From b2c5acbb010f4bbc7ea9b53ba9bc81d672dd0f34 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 5 Apr 2023 11:24:06 +0200 Subject: [PATCH 784/895] [skip ci] Add NEWS entry for GH-10168 and GH-10582 --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index f0e2a91b81d35..d4723eb480e69 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ PHP NEWS Linux. (Kévin Dunglas) . Fix bug GH-10469 (Disallow .. in open_basedir paths set at runtime). (ilutov) + . Fix bug GH-10168, GH-10582 (Various segfaults with destructors and VM return + values). (dstogov, nielsdos, ilutov) - Date: . Implement More Appropriate Date/Time Exceptions RFC. (Derick) From b81ce297a1334267baf9e86f3fbb11ee0057a1cc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 29 Jan 2023 23:32:52 +0100 Subject: [PATCH 785/895] Fix GH-9397: exif read : warnings and errors : Potentially invalid endianess, Illegal IFD size and Undefined index Don't misinterpret DJI info maker note as DJI maker note. The DJI and DJI info maker note both share the "DJI" make string. This caused the current code to try to interpret the DJI info maker note as a DJI maker note. However, the DJI info maker note requires custom parsing. Therefore, the misinterpretation actually caused the current code to believe that there was an unrecoverable error in the IFD for the maker note by returning false in the maker note parser. This in turn caused the inability to parse other EXIF metadata. This patch adds the identification of the DJI info maker note so that it cannot be misinterpreted. Since we don't implement custom parsing, it achieves this by setting the tag list to a special marker value (in this case the NULL pointer). When this marker value is detected, the function will just skip parsing the maker note and return true. Therefore, the other code will believe that the IFD is not corrupt. This approach is similar to handing an unrecognised maker note type (see the loop on top of exif_process_IFD_in_MAKERNOTE() which also returns true and treats it as a string). The end result of this patch is that the DJI info maker note is considered as unknown to the caller of exif_process_IFD_in_MAKERNOTE(), and therefore that the other EXIF metadata can be parsed successfully. Also fix debug output typos in exif. Closes GH-10470. --- NEWS | 4 ++++ ext/exif/exif.c | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7de39a848302c..e05bdac1e3d23 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS (Nathan Freeman) . Fixed incorrect error handling in dom_zvals_to_fragment(). (nielsdos) +- Exif: + . Fixed bug GH-9397 (exif read : warnings and errors : Potentially invalid + endianess, Illegal IFD size and Undefined index). (nielsdos) + - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 74dba4bf6985f..273149ccbb845 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1277,6 +1277,9 @@ typedef struct { mn_offset_mode_t offset_mode; } maker_note_type; +/* Some maker notes (e.g. DJI info tag) require custom parsing */ +#define REQUIRES_CUSTOM_PARSING NULL + /* Remember to update PHP_MINFO if updated */ static const maker_note_type maker_note_array[] = { { tag_table_VND_CANON, "Canon", NULL, 0, 0, MN_ORDER_INTEL, MN_OFFSET_NORMAL}, @@ -1287,6 +1290,7 @@ static const maker_note_type maker_note_array[] = { { tag_table_VND_OLYMPUS, "OLYMPUS OPTICAL CO.,LTD", "OLYMP\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_SAMSUNG, "SAMSUNG", NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_PANASONIC, "Panasonic", "Panasonic\x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, + { REQUIRES_CUSTOM_PARSING, "DJI", "[ae_dbg_info:", 13, 13, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL}, { tag_table_VND_DJI, "DJI", NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_SONY, "SONY", "SONY DSC \x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_SONY, "SONY", NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, @@ -3168,10 +3172,16 @@ static bool exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * val return true; } + if (UNEXPECTED(maker_note->tag_table == REQUIRES_CUSTOM_PARSING)) { + /* Custom parsing required, which is not implemented at this point + * Return true so that other metadata can still be parsed. */ + return true; + } + dir_start = value_ptr + maker_note->offset; #ifdef EXIF_DEBUG - exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process %s @x%04X + 0x%04X=%d: %s", exif_get_sectionname(section_index), (intptr_t)dir_start-(intptr_t)info->offset_base+maker_note->offset+displacement, value_len, value_len, exif_char_dump(value_ptr, value_len, (intptr_t)dir_start-(intptr_t)info->offset_base+maker_note->offset+displacement)); + exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process %s @0x%04X + 0x%04X=%d: %s", exif_get_sectionname(section_index), (intptr_t)dir_start-(intptr_t)info->offset_base+maker_note->offset+displacement, value_len, value_len, exif_char_dump(value_ptr, value_len, (intptr_t)dir_start-(intptr_t)info->offset_base+maker_note->offset+displacement)); #endif ImageInfo->sections_found |= FOUND_MAKERNOTE; @@ -3330,7 +3340,7 @@ static bool exif_process_IFD_TAG_impl(image_info_type *ImageInfo, char *dir_entr #ifdef EXIF_DEBUG dump_data = exif_dump_data(&dump_free, format, components, ImageInfo->motorola_intel, value_ptr); exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, - "Process tag(x%04X=%s,@x%04X + x%04X(=%d)): %s%s %s", + "Process tag(x%04X=%s,@0x%04X + x%04X(=%d)): %s%s %s", tag, exif_get_tagname_debug(tag, tag_table), offset_val+displacement, byte_count, byte_count, (components>1)&&format!=TAG_FMT_UNDEFINED&&format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(format), dump_data); if (dump_free) { efree(dump_data); @@ -4173,7 +4183,7 @@ static bool exif_process_IFD_in_TIFF_impl(image_info_type *ImageInfo, size_t dir } entry_offset = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel); #ifdef EXIF_DEBUG - exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Next IFD: %s @x%04X", exif_get_sectionname(sub_section_index), entry_offset); + exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Next IFD: %s @0x%04X", exif_get_sectionname(sub_section_index), entry_offset); #endif exif_process_IFD_in_TIFF(ImageInfo, entry_offset, sub_section_index); if (section_index!=SECTION_THUMBNAIL && entry_tag==TAG_SUB_IFD) { From 9a250cc9d640865200c380b7881823716e062404 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 25 Mar 2023 18:34:06 +0100 Subject: [PATCH 786/895] Add separate static property through trait if parent already declares it Fixes GH-10935 Closes GH-10937 --- NEWS | 2 + UPGRADING | 4 ++ Zend/tests/gh10935.phpt | 83 ++++++++++++++++++++++++++++++++++++++ Zend/zend_inheritance.c | 4 +- ext/opcache/zend_persist.c | 10 ++++- 5 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/gh10935.phpt diff --git a/NEWS b/NEWS index d4723eb480e69..e24c308c860b6 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,8 @@ PHP NEWS (ilutov) . Fix bug GH-10168, GH-10582 (Various segfaults with destructors and VM return values). (dstogov, nielsdos, ilutov) + . Fix bug GH-10935 (Use of trait doesn't redeclare static property if class + has inherited it from its parent). (ilutov) - Date: . Implement More Appropriate Date/Time Exceptions RFC. (Derick) diff --git a/UPGRADING b/UPGRADING index eff0b3d7016c6..5c74afb66743b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -35,6 +35,10 @@ PHP 8.3 UPGRADE NOTES proc_get_status() to check whether the result was cached. . Zend Max Execution Timers is now enabled by default for ZTS builds on Linux. + . Uses of traits with static properties will now redeclare static properties + inherited from the parent class. This will create a separate static property + storage for the current class. This is analogous to adding the static + property to the class directly without traits. - FFI: . C functions that have a return type of void now return null instead of diff --git a/Zend/tests/gh10935.phpt b/Zend/tests/gh10935.phpt new file mode 100644 index 0000000000000..e84a9e5fdd26f --- /dev/null +++ b/Zend/tests/gh10935.phpt @@ -0,0 +1,83 @@ +--TEST-- +GH-1093: Add separate static property through trait if parent already declares it +--FILE-- + +--EXPECT-- +A::$test: A +A::getASelf(): A +A::getAStatic(): A +A::getFooSelf(): A +A::getFooStatic(): A +B::$test: B +B::getASelf(): A +B::getAStatic(): B +B::getBSelf(): B +B::getBStatic(): B +B::getFooSelf(): B +B::getFooStatic(): B +B::getBarSelf(): A +B::getBarStatic(): B diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 028bdebbfb8f7..5a689408263ab 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2377,7 +2377,9 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent ZSTR_VAL(prop_name), ZSTR_VAL(ce->name)); } - continue; + if (!(flags & ZEND_ACC_STATIC)) { + continue; + } } } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index cca90bb41e998..d7c2d63339107 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -1082,7 +1082,15 @@ void zend_update_parent_ce(zend_class_entry *ce) end = parent->parent ? parent->parent->default_static_members_count : 0; for (; i >= end; i--) { zval *p = &ce->default_static_members_table[i]; - ZVAL_INDIRECT(p, &parent->default_static_members_table[i]); + /* The static property may have been overridden by a trait + * during inheritance. In that case, the property default + * value is replaced by zend_declare_typed_property() at the + * property index of the parent property. Make sure we only + * point to the parent property value if the child value was + * already indirect. */ + if (Z_TYPE_P(p) == IS_INDIRECT) { + ZVAL_INDIRECT(p, &parent->default_static_members_table[i]); + } } parent = parent->parent; From 1c276aacaeb11cf7207251bcf7a370642a2de76d Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 6 Apr 2023 14:49:29 +0100 Subject: [PATCH 787/895] Use zend_call_known_instance_method() instead of building FCI/FCC in serializer subroutine (#9955) Co-authored-by: Tyson Andre --- ext/standard/var.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/ext/standard/var.c b/ext/standard/var.c index e8145ab227141..5a4cec3e0e153 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -764,28 +764,13 @@ static inline bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* static HashTable* php_var_serialize_call_sleep(zend_object *obj, zend_function *fn) /* {{{ */ { - zend_result res; - zend_fcall_info fci; - zend_fcall_info_cache fci_cache; zval retval; - fci.size = sizeof(fci); - fci.object = obj; - fci.retval = &retval; - fci.param_count = 0; - fci.params = NULL; - fci.named_params = NULL; - ZVAL_UNDEF(&fci.function_name); - - fci_cache.function_handler = fn; - fci_cache.object = obj; - fci_cache.called_scope = obj->ce; - BG(serialize_lock)++; - res = zend_call_function(&fci, &fci_cache); + zend_call_known_instance_method(fn, obj, &retval, /* param_count */ 0, /* params */ NULL); BG(serialize_lock)--; - if (res == FAILURE || Z_ISUNDEF(retval)) { + if (Z_ISUNDEF(retval) || EG(exception)) { zval_ptr_dtor(&retval); return NULL; } From 3fb63f7fa2ab7b7e2b364cef06e362352f9a177c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Apr 2023 13:42:38 +0100 Subject: [PATCH 788/895] Extract common code for phar IO intercept functions Also convert filename to a zend_string*. This in preparation for refactoring phar_find_in_include_path() to use a zend_string* --- ext/phar/func_interceptors.c | 343 ++++++++++++----------------------- 1 file changed, 114 insertions(+), 229 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 6e545a1ff4398..3789bdb6c67a3 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -89,10 +89,71 @@ PHAR_FUNC(phar_opendir) /* {{{ */ } /* }}} */ +static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool using_include_path) +{ + char *arch, *entry, *fname; + size_t arch_len, entry_len, fname_len; + + fname = (char*)zend_get_executed_filename(); + if (strncasecmp(fname, "phar://", 7)) { + return NULL; + } + fname_len = strlen(fname); + if (FAILURE == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + return NULL; + } + + efree(entry); + entry = NULL; + entry_len = 0; + /* fopen within phar, if :// is not in the url, then prepend phar:/// */ + /* retrieving a file defaults to within the current directory, so use this if possible */ + phar_archive_data *phar; + if (FAILURE == phar_get_archive(&phar, arch, arch_len, NULL, 0, NULL)) { + efree(arch); + return NULL; + } + + zend_string *name = NULL; + if (using_include_path) { + if (!(name = phar_find_in_include_path(ZSTR_VAL(filename), ZSTR_LEN(filename), NULL))) { + /* this file is not in the phar, use the original path */ + efree(arch); + return NULL; + } + } else { + entry_len = ZSTR_LEN(filename); + entry = phar_fix_filepath(estrndup(ZSTR_VAL(filename), ZSTR_LEN(filename)), &entry_len, 1); + if (entry[0] == '/') { + if (!zend_hash_str_exists(&(phar->manifest), entry + 1, entry_len - 1)) { + /* this file is not in the phar, use the original path */ +notfound: + efree(entry); + efree(arch); + return NULL; + } + } else { + if (!zend_hash_str_exists(&(phar->manifest), entry, entry_len)) { + goto notfound; + } + } + // TODO Known sizes use string concat helper + /* auto-convert to phar:// */ + if (entry[0] == '/') { + name = strpprintf(4096, "phar://%s%s", arch, entry); + } else { + name = strpprintf(4096, "phar://%s/%s", arch, entry); + } + efree(entry); + } + + efree(arch); + return name; +} + PHAR_FUNC(phar_file_get_contents) /* {{{ */ { - char *filename; - size_t filename_len; + zend_string *filename; zend_string *contents; bool use_include_path = 0; php_stream *stream; @@ -111,117 +172,54 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ } /* Parse arguments */ - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p|br!ll!", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen, &maxlen_is_null) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "P|br!ll!", &filename, &use_include_path, &zcontext, &offset, &maxlen, &maxlen_is_null) == FAILURE) { goto skip_phar; } if (maxlen_is_null) { maxlen = (ssize_t) PHP_STREAM_COPY_ALL; + } else if (maxlen < 0) { + zend_argument_value_error(5, "must be greater than or equal to 0"); + RETURN_THROWS(); } - if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) { - char *arch, *entry, *fname; - zend_string *entry_str = NULL; - size_t arch_len, entry_len, fname_len; - php_stream_context *context = NULL; - - fname = (char*)zend_get_executed_filename(); - - if (strncasecmp(fname, "phar://", 7)) { + if (use_include_path || (!IS_ABSOLUTE_PATH(ZSTR_VAL(filename), ZSTR_LEN(filename)) && !strstr(ZSTR_VAL(filename), "://"))) { + zend_string *name = phar_get_name_for_relative_paths(filename, use_include_path); + if (!name) { goto skip_phar; } - fname_len = strlen(fname); - if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { - char *name; - phar_archive_data *phar; - - efree(entry); - entry = filename; - /* fopen within phar, if :// is not in the url, then prepend phar:/// */ - entry_len = filename_len; - if (!maxlen_is_null && maxlen < 0) { - efree(arch); - zend_argument_value_error(5, "must be greater than or equal to 0"); - RETURN_THROWS(); - } - - /* retrieving a file defaults to within the current directory, so use this if possible */ - if (FAILURE == phar_get_archive(&phar, arch, arch_len, NULL, 0, NULL)) { - efree(arch); - goto skip_phar; - } - if (use_include_path) { - if ((entry_str = phar_find_in_include_path(entry, entry_len, NULL))) { - name = ZSTR_VAL(entry_str); - goto phar_it; - } else { - /* this file is not in the phar, use the original path */ - efree(arch); - goto skip_phar; - } - } else { - entry = phar_fix_filepath(estrndup(entry, entry_len), &entry_len, 1); - if (entry[0] == '/') { - if (!zend_hash_str_exists(&(phar->manifest), entry + 1, entry_len - 1)) { - /* this file is not in the phar, use the original path */ -notfound: - efree(arch); - efree(entry); - goto skip_phar; - } - } else { - if (!zend_hash_str_exists(&(phar->manifest), entry, entry_len)) { - goto notfound; - } - } - /* auto-convert to phar:// */ - if (entry[0] == '/') { - spprintf(&name, 4096, "phar://%s%s", arch, entry); - } else { - spprintf(&name, 4096, "phar://%s/%s", arch, entry); - } - if (entry != filename) { - efree(entry); - } - } - -phar_it: - efree(arch); - if (zcontext) { - context = php_stream_context_from_zval(zcontext, 0); - } - stream = php_stream_open_wrapper_ex(name, "rb", 0 | REPORT_ERRORS, NULL, context); - if (entry_str) { - zend_string_release_ex(entry_str, 0); - } else { - efree(name); - } - - if (!stream) { - RETURN_FALSE; - } + php_stream_context *context = NULL; + if (zcontext) { + context = php_stream_context_from_zval(zcontext, 0); + } + stream = php_stream_open_wrapper_ex(ZSTR_VAL(name), "rb", 0 | REPORT_ERRORS, NULL, context); - if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { - php_error_docref(NULL, E_WARNING, "Failed to seek to position " ZEND_LONG_FMT " in the stream", offset); - php_stream_close(stream); - RETURN_FALSE; - } + zend_string_release_ex(name, false); - /* uses mmap if possible */ - contents = php_stream_copy_to_mem(stream, maxlen, 0); - if (contents && ZSTR_LEN(contents) > 0) { - RETVAL_STR(contents); - } else if (contents) { - zend_string_release_ex(contents, 0); - RETVAL_EMPTY_STRING(); - } else { - RETVAL_FALSE; - } + if (!stream) { + RETURN_FALSE; + } + if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { + php_error_docref(NULL, E_WARNING, "Failed to seek to position " ZEND_LONG_FMT " in the stream", offset); php_stream_close(stream); - return; + RETURN_FALSE; + } + + /* uses mmap if possible */ + contents = php_stream_copy_to_mem(stream, maxlen, 0); + if (contents && ZSTR_LEN(contents) > 0) { + RETVAL_STR(contents); + } else if (contents) { + zend_string_release_ex(contents, 0); + RETVAL_EMPTY_STRING(); + } else { + RETVAL_FALSE; } + + php_stream_close(stream); + return; } skip_phar: PHAR_G(orig_file_get_contents)(INTERNAL_FUNCTION_PARAM_PASSTHRU); @@ -231,8 +229,7 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ PHAR_FUNC(phar_readfile) /* {{{ */ { - char *filename; - size_t filename_len; + zend_string *filename; int size = 0; bool use_include_path = 0; zval *zcontext = NULL; @@ -246,75 +243,19 @@ PHAR_FUNC(phar_readfile) /* {{{ */ && !HT_IS_INITIALIZED(&cached_phars)) { goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p|br!", &filename, &filename_len, &use_include_path, &zcontext) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "P|br!", &filename, &use_include_path, &zcontext) == FAILURE) { goto skip_phar; } - if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) { - char *arch, *entry, *fname; - zend_string *entry_str = NULL; - size_t arch_len, entry_len, fname_len; - php_stream_context *context = NULL; - char *name; - phar_archive_data *phar; - fname = (char*)zend_get_executed_filename(); - - if (strncasecmp(fname, "phar://", 7)) { - goto skip_phar; - } - fname_len = strlen(fname); - if (FAILURE == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + if (use_include_path || (!IS_ABSOLUTE_PATH(ZSTR_VAL(filename), ZSTR_LEN(filename)) && !strstr(ZSTR_VAL(filename), "://"))) { + zend_string *name = phar_get_name_for_relative_paths(filename, use_include_path); + if (!name) { goto skip_phar; } - efree(entry); - entry = filename; - /* fopen within phar, if :// is not in the url, then prepend phar:/// */ - entry_len = filename_len; - /* retrieving a file defaults to within the current directory, so use this if possible */ - if (FAILURE == phar_get_archive(&phar, arch, arch_len, NULL, 0, NULL)) { - efree(arch); - goto skip_phar; - } - if (use_include_path) { - if (!(entry_str = phar_find_in_include_path(entry, entry_len, NULL))) { - /* this file is not in the phar, use the original path */ - efree(arch); - goto skip_phar; - } else { - name = ZSTR_VAL(entry_str); - } - } else { - entry = phar_fix_filepath(estrndup(entry, entry_len), &entry_len, 1); - if (entry[0] == '/') { - if (!zend_hash_str_exists(&(phar->manifest), entry + 1, entry_len - 1)) { - /* this file is not in the phar, use the original path */ -notfound: - efree(entry); - efree(arch); - goto skip_phar; - } - } else { - if (!zend_hash_str_exists(&(phar->manifest), entry, entry_len)) { - goto notfound; - } - } - /* auto-convert to phar:// */ - if (entry[0] == '/') { - spprintf(&name, 4096, "phar://%s%s", arch, entry); - } else { - spprintf(&name, 4096, "phar://%s/%s", arch, entry); - } - efree(entry); - } + php_stream_context *context = php_stream_context_from_zval(zcontext, 0);; + stream = php_stream_open_wrapper_ex(ZSTR_VAL(name), "rb", 0 | REPORT_ERRORS, NULL, context); - efree(arch); - context = php_stream_context_from_zval(zcontext, 0); - stream = php_stream_open_wrapper_ex(name, "rb", 0 | REPORT_ERRORS, NULL, context); - if (entry_str) { - zend_string_release_ex(entry_str, 0); - } else { - efree(name); - } + zend_string_release_ex(name, false); if (stream == NULL) { RETURN_FALSE; } @@ -332,8 +273,9 @@ PHAR_FUNC(phar_readfile) /* {{{ */ PHAR_FUNC(phar_fopen) /* {{{ */ { - char *filename, *mode; - size_t filename_len, mode_len; + zend_string *filename; + char *mode; + size_t mode_len; bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; @@ -347,76 +289,19 @@ PHAR_FUNC(phar_fopen) /* {{{ */ /* no need to check, include_path not even specified in fopen/ no active phars */ goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "ps|br!", &filename, &filename_len, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "Ps|br!", &filename, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) { goto skip_phar; } - if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) { - char *arch, *entry, *fname; - zend_string *entry_str = NULL; - size_t arch_len, entry_len, fname_len; - php_stream_context *context = NULL; - char *name; - phar_archive_data *phar; - fname = (char*)zend_get_executed_filename(); - - if (strncasecmp(fname, "phar://", 7)) { - goto skip_phar; - } - fname_len = strlen(fname); - if (FAILURE == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + if (use_include_path || (!IS_ABSOLUTE_PATH(ZSTR_VAL(filename), ZSTR_LEN(filename)) && !strstr(ZSTR_VAL(filename), "://"))) { + zend_string *name = phar_get_name_for_relative_paths(filename, use_include_path); + if (!name) { goto skip_phar; } - efree(entry); - entry = filename; - /* fopen within phar, if :// is not in the url, then prepend phar:/// */ - entry_len = filename_len; - /* retrieving a file defaults to within the current directory, so use this if possible */ - if (FAILURE == phar_get_archive(&phar, arch, arch_len, NULL, 0, NULL)) { - efree(arch); - goto skip_phar; - } - if (use_include_path) { - if (!(entry_str = phar_find_in_include_path(entry, entry_len, NULL))) { - /* this file is not in the phar, use the original path */ - efree(arch); - goto skip_phar; - } else { - name = ZSTR_VAL(entry_str); - } - } else { - entry = phar_fix_filepath(estrndup(entry, entry_len), &entry_len, 1); - if (entry[0] == '/') { - if (!zend_hash_str_exists(&(phar->manifest), entry + 1, entry_len - 1)) { - /* this file is not in the phar, use the original path */ -notfound: - efree(entry); - efree(arch); - goto skip_phar; - } - } else { - if (!zend_hash_str_exists(&(phar->manifest), entry, entry_len)) { - /* this file is not in the phar, use the original path */ - goto notfound; - } - } - /* auto-convert to phar:// */ - if (entry[0] == '/') { - spprintf(&name, 4096, "phar://%s%s", arch, entry); - } else { - spprintf(&name, 4096, "phar://%s/%s", arch, entry); - } - efree(entry); - } + php_stream_context *context = php_stream_context_from_zval(zcontext, 0); + stream = php_stream_open_wrapper_ex(ZSTR_VAL(name), mode, 0 | REPORT_ERRORS, NULL, context); - efree(arch); - context = php_stream_context_from_zval(zcontext, 0); - stream = php_stream_open_wrapper_ex(name, mode, 0 | REPORT_ERRORS, NULL, context); - if (entry_str) { - zend_string_release_ex(entry_str, 0); - } else { - efree(name); - } + zend_string_release_ex(name, false); if (stream == NULL) { RETURN_FALSE; } From 96ffdd492c5aeda848b80865d62cd95ce335edd7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Apr 2023 13:49:30 +0100 Subject: [PATCH 789/895] size variable is only used once, move closer to usage Also change type to ssize_t as this is what the function returns --- ext/phar/func_interceptors.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 3789bdb6c67a3..09968a5cf35cf 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -230,7 +230,6 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ PHAR_FUNC(phar_readfile) /* {{{ */ { zend_string *filename; - int size = 0; bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; @@ -259,7 +258,7 @@ PHAR_FUNC(phar_readfile) /* {{{ */ if (stream == NULL) { RETURN_FALSE; } - size = php_stream_passthru(stream); + ssize_t size = php_stream_passthru(stream); php_stream_close(stream); RETURN_LONG(size); } From 06896d1c4536c4b1157da754516df3085994ecec Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Apr 2023 14:19:36 +0100 Subject: [PATCH 790/895] Improve locality of stream variable --- ext/phar/func_interceptors.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 09968a5cf35cf..2cfab248c28f4 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -156,7 +156,6 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ zend_string *filename; zend_string *contents; bool use_include_path = 0; - php_stream *stream; zend_long offset = -1; zend_long maxlen; bool maxlen_is_null = 1; @@ -190,6 +189,8 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ } php_stream_context *context = NULL; + php_stream *stream; + if (zcontext) { context = php_stream_context_from_zval(zcontext, 0); } @@ -232,7 +233,6 @@ PHAR_FUNC(phar_readfile) /* {{{ */ zend_string *filename; bool use_include_path = 0; zval *zcontext = NULL; - php_stream *stream; if (!PHAR_G(intercepted)) { goto skip_phar; @@ -251,7 +251,9 @@ PHAR_FUNC(phar_readfile) /* {{{ */ goto skip_phar; } - php_stream_context *context = php_stream_context_from_zval(zcontext, 0);; + php_stream *stream; + php_stream_context *context = php_stream_context_from_zval(zcontext, 0); + stream = php_stream_open_wrapper_ex(ZSTR_VAL(name), "rb", 0 | REPORT_ERRORS, NULL, context); zend_string_release_ex(name, false); @@ -277,7 +279,6 @@ PHAR_FUNC(phar_fopen) /* {{{ */ size_t mode_len; bool use_include_path = 0; zval *zcontext = NULL; - php_stream *stream; if (!PHAR_G(intercepted)) { goto skip_phar; @@ -297,7 +298,9 @@ PHAR_FUNC(phar_fopen) /* {{{ */ goto skip_phar; } + php_stream *stream; php_stream_context *context = php_stream_context_from_zval(zcontext, 0); + stream = php_stream_open_wrapper_ex(ZSTR_VAL(name), mode, 0 | REPORT_ERRORS, NULL, context); zend_string_release_ex(name, false); From 8e51cfe0ae40769917e3b288b39ed4b6ab02d474 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Apr 2023 14:28:13 +0100 Subject: [PATCH 791/895] Use zend_string_concat helper instead of strpprintf --- ext/phar/func_interceptors.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 2cfab248c28f4..c23da0011e7c1 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -137,10 +137,14 @@ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool goto notfound; } } - // TODO Known sizes use string concat helper /* auto-convert to phar:// */ if (entry[0] == '/') { - name = strpprintf(4096, "phar://%s%s", arch, entry); + ZEND_ASSERT(strlen("phar://") + arch_len + entry_len < 4096); + name = zend_string_concat3( + "phar://", strlen("phar://"), + arch, arch_len, + entry, entry_len + ); } else { name = strpprintf(4096, "phar://%s/%s", arch, entry); } From 7d93ef067f2ae1ca0bc748b84b4faf4d2374eb08 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Apr 2023 14:35:22 +0100 Subject: [PATCH 792/895] Convert char* + size_t parameters to zend_string* in phar_find_in_include_path() --- ext/phar/func_interceptors.c | 2 +- ext/phar/phar.c | 2 +- ext/phar/phar_internal.h | 2 +- ext/phar/util.c | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index c23da0011e7c1..d208a4c9f9cd5 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -116,7 +116,7 @@ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool zend_string *name = NULL; if (using_include_path) { - if (!(name = phar_find_in_include_path(ZSTR_VAL(filename), ZSTR_LEN(filename), NULL))) { + if (!(name = phar_find_in_include_path(filename, NULL))) { /* this file is not in the phar, use the original path */ efree(arch); return NULL; diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 8fc921ac6d273..03263e2df53d1 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -3288,7 +3288,7 @@ zend_op_array *(*phar_orig_compile_file)(zend_file_handle *file_handle, int type static zend_string *phar_resolve_path(zend_string *filename) { - zend_string *ret = phar_find_in_include_path(ZSTR_VAL(filename), ZSTR_LEN(filename), NULL); + zend_string *ret = phar_find_in_include_path(filename, NULL); if (!ret) { ret = phar_save_resolve_path(filename); } diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index 30b408a8c4462..9f8a46b65ec60 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -547,7 +547,7 @@ char *phar_compress_filter(phar_entry_info * entry, int return_unknown); /* void phar_remove_virtual_dirs(phar_archive_data *phar, char *filename, size_t filename_len); */ void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, size_t filename_len); int phar_mount_entry(phar_archive_data *phar, char *filename, size_t filename_len, char *path, size_t path_len); -zend_string *phar_find_in_include_path(char *file, size_t file_len, phar_archive_data **pphar); +zend_string *phar_find_in_include_path(zend_string *file, phar_archive_data **pphar); char *phar_fix_filepath(char *path, size_t *new_len, int use_cwd); phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, char **error); void phar_parse_metadata_lazy(const char *buffer, phar_metadata_tracker *tracker, uint32_t zip_metadata_len, int persistent); diff --git a/ext/phar/util.c b/ext/phar/util.c index e2c6d9f331896..24f3ce55cd968 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -239,7 +239,7 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, size_t filename_le } /* }}} */ -zend_string *phar_find_in_include_path(char *filename, size_t filename_len, phar_archive_data **pphar) /* {{{ */ +zend_string *phar_find_in_include_path(zend_string *filename, phar_archive_data **pphar) /* {{{ */ { zend_string *ret; char *path, *fname, *arch, *entry, *test; @@ -272,7 +272,7 @@ zend_string *phar_find_in_include_path(char *filename, size_t filename_len, phar efree(entry); - if (*filename == '.') { + if (*ZSTR_VAL(filename) == '.') { size_t try_len; if (FAILURE == phar_get_archive(&phar, arch, arch_len, NULL, 0, NULL)) { @@ -284,8 +284,8 @@ zend_string *phar_find_in_include_path(char *filename, size_t filename_len, phar *pphar = phar; } - try_len = filename_len; - test = phar_fix_filepath(estrndup(filename, filename_len), &try_len, 1); + try_len = ZSTR_LEN(filename); + test = phar_fix_filepath(estrndup(ZSTR_VAL(filename), ZSTR_LEN(filename)), &try_len, 1); if (*test == '/') { if (zend_hash_str_exists(&(phar->manifest), test + 1, try_len - 1)) { @@ -307,7 +307,7 @@ zend_string *phar_find_in_include_path(char *filename, size_t filename_len, phar spprintf(&path, MAXPATHLEN + 1 + strlen(PG(include_path)), "phar://%s/%s%c%s", arch, PHAR_G(cwd), DEFAULT_DIR_SEPARATOR, PG(include_path)); efree(arch); - ret = php_resolve_path(filename, filename_len, path); + ret = php_resolve_path(ZSTR_VAL(filename), ZSTR_LEN(filename), path); efree(path); if (ret && ZSTR_LEN(ret) > 8 && !strncmp(ZSTR_VAL(ret), "phar://", 7)) { From 15802dfc62c2c5ee371032dd34110abdad6f367e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 6 Apr 2023 15:59:34 +0100 Subject: [PATCH 793/895] Add FPM FastCGI env var test for Apache without path info fix --- ...pif-apache-handler-with-pi-with-pt-pd.phpt | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sapi/fpm/tests/fcgi-env-nopif-apache-handler-with-pi-with-pt-pd.phpt diff --git a/sapi/fpm/tests/fcgi-env-nopif-apache-handler-with-pi-with-pt-pd.phpt b/sapi/fpm/tests/fcgi-env-nopif-apache-handler-with-pi-with-pt-pd.phpt new file mode 100644 index 0000000000000..a2aa4164fc3bc --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-nopif-apache-handler-with-pi-with-pt-pd.phpt @@ -0,0 +1,58 @@ +--TEST-- +FPM: FastCGI env var without path info fix for Apache handler with PATH_INFO, PATH_TRANSLATED and path discard +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + headers: [ + 'PATH_INFO' => '/pinfo', + 'PATH_TRANSLATED' => __DIR__ . '/pinfo', + ], + uri: $scriptName . '/pinfo', + scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, '/pinfo', '/pinfo']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + From 2ef1930ad35ea989f8eea7b8f398bd6c02c2364a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:54:59 +0200 Subject: [PATCH 794/895] Fix number of elements after packed hash filling (#11022) After a hash filling routine the number of elements are set to the fill index. However, if the fill index is larger than the number of elements, the number of elements are no longer correct. This is observable at least via count() and var_dump(). E.g. the attached test case would incorrectly show int(17) instead of int(11). Solve this by only increasing the number of elements by the actual number that got added. Instead of adding a variable that increments per iteration, I wanted to save some cycles in the iteration and simply compute the number of added elements at the end. I discovered this behaviour while fixing GH-11016, where this filling routine is easily exposed to userland via a specialised VM path [1]. Since this seems to be more a general problem with the macros, and may be triggered outside of the VM handlers, I fixed it in the macros instead of modifying the VM to fixup the number of elements. [1] https://github.com/php/php-src/blob/b2c5acbb010f4bbc7ea9b53ba9bc81d672dd0f34/Zend/zend_vm_def.h#L6132-L6141 --- Zend/zend_hash.h | 4 +- ext/zend_test/test.c | 23 ++++++++++ ext/zend_test/test.stub.php | 2 + ext/zend_test/test_arginfo.h | 8 +++- .../tests/hash_fill_packed_nr_elements.phpt | 44 +++++++++++++++++++ 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 ext/zend_test/tests/hash_fill_packed_nr_elements.phpt diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index d9210d073182f..5726c8a919f43 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -1517,8 +1517,8 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, #define ZEND_HASH_FILL_GROW() do { \ if (UNEXPECTED(__fill_idx >= __fill_ht->nTableSize)) { \ + __fill_ht->nNumOfElements += __fill_idx - __fill_ht->nNumUsed; \ __fill_ht->nNumUsed = __fill_idx; \ - __fill_ht->nNumOfElements = __fill_idx; \ __fill_ht->nNextFreeElement = __fill_idx; \ zend_hash_packed_grow(__fill_ht); \ __fill_val = __fill_ht->arPacked + __fill_idx; \ @@ -1557,8 +1557,8 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, } while (0) #define ZEND_HASH_FILL_FINISH() do { \ + __fill_ht->nNumOfElements += __fill_idx - __fill_ht->nNumUsed; \ __fill_ht->nNumUsed = __fill_idx; \ - __fill_ht->nNumOfElements = __fill_idx; \ __fill_ht->nNextFreeElement = __fill_idx; \ __fill_ht->nInternalPointer = 0; \ } while (0) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 123984a5acfd4..0bf458b7be7d7 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -533,6 +533,29 @@ static ZEND_FUNCTION(zend_get_map_ptr_last) RETURN_LONG(CG(map_ptr_last)); } +static ZEND_FUNCTION(zend_test_fill_packed_array) +{ + HashTable *parameter; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_ARRAY_HT_EX(parameter, 0, 1) + ZEND_PARSE_PARAMETERS_END(); + + if (!HT_IS_PACKED(parameter)) { + zend_argument_value_error(1, "must be a packed array"); + RETURN_THROWS(); + } + + zend_hash_extend(parameter, parameter->nNumUsed + 10, true); + ZEND_HASH_FILL_PACKED(parameter) { + for (int i = 0; i < 10; i++) { + zval value; + ZVAL_LONG(&value, i); + ZEND_HASH_FILL_ADD(&value); + } + } ZEND_HASH_FILL_END(); +} + static zend_object *zend_test_class_new(zend_class_entry *class_type) { zend_object *obj = zend_objects_new(class_type); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 31bb04b7deedf..27f5c01d6fd66 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -192,6 +192,8 @@ function zend_test_zend_call_stack_use_all(): int {} function zend_test_is_string_marked_as_valid_utf8(string $string): bool {} function zend_get_map_ptr_last(): int {} + + function zend_test_fill_packed_array(array &$array): void {} } namespace ZendTestNS { diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index dca3a62f74ef4..c4ffe80c631d9 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4c35a5a9f3910247c8297c21185ea3969312f518 */ + * Stub hash: ebb806c4a8442233be572a304295f47570f12102 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -114,6 +114,10 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_map_ptr_last, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_fill_packed_array, 0, 1, IS_VOID, 0) + ZEND_ARG_TYPE_INFO(1, array, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -217,6 +221,7 @@ static ZEND_FUNCTION(zend_test_zend_call_stack_use_all); #endif static ZEND_FUNCTION(zend_test_is_string_marked_as_valid_utf8); static ZEND_FUNCTION(zend_get_map_ptr_last); +static ZEND_FUNCTION(zend_test_fill_packed_array); static ZEND_FUNCTION(ZendTestNS2_namespaced_func); static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func); static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func); @@ -277,6 +282,7 @@ static const zend_function_entry ext_functions[] = { #endif ZEND_FE(zend_test_is_string_marked_as_valid_utf8, arginfo_zend_test_is_string_marked_as_valid_utf8) ZEND_FE(zend_get_map_ptr_last, arginfo_zend_get_map_ptr_last) + ZEND_FE(zend_test_fill_packed_array, arginfo_zend_test_fill_packed_array) ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func) ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func) ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func) diff --git a/ext/zend_test/tests/hash_fill_packed_nr_elements.phpt b/ext/zend_test/tests/hash_fill_packed_nr_elements.phpt new file mode 100644 index 0000000000000..77f22b2d9cd15 --- /dev/null +++ b/ext/zend_test/tests/hash_fill_packed_nr_elements.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test hash packed fill number of elements +--EXTENSIONS-- +zend_test +--FILE-- + 0]; +zend_test_fill_packed_array($my_array); + +var_dump($my_array); +var_dump(count($my_array)); + +?> +--EXPECT-- +array(11) { + [6]=> + int(0) + [7]=> + int(0) + [8]=> + int(1) + [9]=> + int(2) + [10]=> + int(3) + [11]=> + int(4) + [12]=> + int(5) + [13]=> + int(6) + [14]=> + int(7) + [15]=> + int(8) + [16]=> + int(9) +} +int(11) From ede8adb2e2013eafe67edb64fc8d5fa62f40cb7d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:55:11 +0200 Subject: [PATCH 795/895] Fix GH-11016: Heap buffer overflow in ZEND_ADD_ARRAY_UNPACK_SPEC_HANDLER (#11021) Not enough space was reserved for the packed resulting array because of some confusion in the meaning of nr of used slots vs nr of elements. Co-authored-by: Ilija Tovilo --- Zend/tests/gh11016.phpt | 20 ++++++++++++++++++++ Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/gh11016.phpt diff --git a/Zend/tests/gh11016.phpt b/Zend/tests/gh11016.phpt new file mode 100644 index 0000000000000..7946166b176d3 --- /dev/null +++ b/Zend/tests/gh11016.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-11016 (Heap buffer overflow in ZEND_ADD_ARRAY_UNPACK_SPEC_HANDLER) +--FILE-- + 0, ...[1, 1, 1]]; +print_r($x); +?> +--EXPECT-- +Array +( + [6] => 0 + [7] => 1 + [8] => 1 + [9] => 1 +) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 7ef8cf1922d1e..88b46a641d079 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6128,7 +6128,7 @@ ZEND_VM_C_LABEL(add_unpack_again): zval *val; if (HT_IS_PACKED(ht) && (zend_hash_num_elements(result_ht) == 0 || HT_IS_PACKED(result_ht))) { - zend_hash_extend(result_ht, zend_hash_num_elements(result_ht) + zend_hash_num_elements(ht), 1); + zend_hash_extend(result_ht, result_ht->nNumUsed + zend_hash_num_elements(ht), 1); ZEND_HASH_FILL_PACKED(result_ht) { ZEND_HASH_PACKED_FOREACH_VAL(ht, val) { if (UNEXPECTED(Z_ISREF_P(val)) && diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 19149c8c18e87..d44be7760c43a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2652,7 +2652,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_UNPACK_SPEC_HANDLER( zval *val; if (HT_IS_PACKED(ht) && (zend_hash_num_elements(result_ht) == 0 || HT_IS_PACKED(result_ht))) { - zend_hash_extend(result_ht, zend_hash_num_elements(result_ht) + zend_hash_num_elements(ht), 1); + zend_hash_extend(result_ht, result_ht->nNumUsed + zend_hash_num_elements(ht), 1); ZEND_HASH_FILL_PACKED(result_ht) { ZEND_HASH_PACKED_FOREACH_VAL(ht, val) { if (UNEXPECTED(Z_ISREF_P(val)) && From ebb3213f7930e57b8a199e17d69f13c5f4d9d2a9 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 7 Apr 2023 12:28:42 +0100 Subject: [PATCH 796/895] Add FPM FCGI env Apache handler UDS test --- .../fcgi-env-pif-apache-handler-uds.phpt | 53 +++++++++++++++++++ ... fcgi-env-pif-apache-handler-with-pi.phpt} | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt rename sapi/fpm/tests/{fcgi-env-pif-apache-handler-basic.phpt => fcgi-env-pif-apache-handler-with-pi.phpt} (94%) diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt new file mode 100644 index 0000000000000..b80fdef3ffdf6 --- /dev/null +++ b/sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt @@ -0,0 +1,53 @@ +--TEST-- +FPM: FastCGI env var path info fix for Apache handler using Unix Domain Socket +--SKIPIF-- + +--FILE-- +createSourceFileAndScriptName(); +$tester->start(); +$tester->expectLogStartNotices(); +$tester + ->request( + uri: $scriptName, + address: '{{ADDR:UDS}}', + scriptFilename: "proxy:fcgi://localhost" . $sourceFilePath, + scriptName: $scriptName, + ) + ->expectBody([$scriptName, $sourceFilePath, $scriptName]); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt b/sapi/fpm/tests/fcgi-env-pif-apache-handler-with-pi.phpt similarity index 94% rename from sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt rename to sapi/fpm/tests/fcgi-env-pif-apache-handler-with-pi.phpt index a99f373cf3321..2d8433123cb2d 100644 --- a/sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt +++ b/sapi/fpm/tests/fcgi-env-pif-apache-handler-with-pi.phpt @@ -1,5 +1,5 @@ --TEST-- -FPM: FastCGI env var path info fix for Apache handler basic +FPM: FastCGI env var path info fix for Apache handler with PATH_INFO set --SKIPIF-- --FILE-- From e67bb14ab42232eefe301e699a755333492b403b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 7 Apr 2023 16:52:39 +0100 Subject: [PATCH 797/895] Fixed tests and remove the XFAIL 'Various bugs exist'. They did, but they were in the tests --- .../tests/DateTime_add-fall-type2-type3.phpt | 42 +++++++++---------- .../tests/DateTime_add-fall-type3-type2.phpt | 6 +-- .../tests/DateTime_add-fall-type3-type3.phpt | 6 +-- .../DateTime_add-spring-type2-type3.phpt | 22 +++++----- .../DateTime_add-spring-type3-type2.phpt | 8 ++-- .../DateTime_add-spring-type3-type3.phpt | 8 ++-- .../tests/DateTime_diff-fall-type2-type3.phpt | 6 +-- .../tests/DateTime_diff-fall-type3-type2.phpt | 6 +-- .../tests/DateTime_diff-fall-type3-type3.phpt | 4 +- .../DateTime_diff-spring-type2-type3.phpt | 10 ++--- .../DateTime_diff-spring-type3-type2.phpt | 10 ++--- .../DateTime_diff-spring-type3-type3.phpt | 10 ++--- .../tests/DateTime_sub-fall-type2-type3.phpt | 6 +-- .../tests/DateTime_sub-fall-type3-type2.phpt | 40 +++++++++--------- .../tests/DateTime_sub-fall-type3-type3.phpt | 6 +-- .../DateTime_sub-spring-type2-type3.phpt | 8 ++-- .../DateTime_sub-spring-type3-type2.phpt | 22 +++++----- .../DateTime_sub-spring-type3-type3.phpt | 8 ++-- ext/date/tests/examine_diff.inc | 1 - ...ime_and_daylight_saving_time-type3-fa.phpt | 7 ++++ 20 files changed, 104 insertions(+), 132 deletions(-) diff --git a/ext/date/tests/DateTime_add-fall-type2-type3.phpt b/ext/date/tests/DateTime_add-fall-type2-type3.phpt index 077dd565d1dba..10e4ed36e7c5e 100644 --- a/ext/date/tests/DateTime_add-fall-type2-type3.phpt +++ b/ext/date/tests/DateTime_add-fall-type2-type3.phpt @@ -2,8 +2,6 @@ DateTime::add() -- fall type2 type3 --CREDITS-- Daniel Convissor ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- ---XFAIL-- -Various bugs exist --FILE-- add($expect_interval); $result_end_date = $start->format('Y-m-d H:i:s T'); echo "ADD: $start_date + $expect_spec = **$result_end_date**\n"; - // echo "ADD: $start_date + $expect_spec = **$end_date**\n"; } if (PHPT_DATETIME_SHOW == PHPT_DATETIME_SHOW_SUB) { $end->sub($expect_interval); diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fa.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fa.phpt index df67b5a89db75..45d0d13ce921a 100644 --- a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fa.phpt +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fa.phpt @@ -25,6 +25,12 @@ $interval = new DateInterval($interval_spec); echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = " . $start->add($interval)->format($date_format) . "\n"; +$start = new DateTime('2010-03-13 04:30:00'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'fa2.5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + $start = new DateTime('2010-03-13 04:30:00'); $interval_spec = 'PT22H'; $interval = new DateInterval($interval_spec); @@ -52,6 +58,7 @@ echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = " --EXPECT-- fa1 2010-03-14 01:59:59 EST America/New_York + PT1S = 2010-03-14 03:00:00 EDT America/New_York fa2 2010-03-13 04:30:00 EST America/New_York + P1D = 2010-03-14 04:30:00 EDT America/New_York +fa2.5 2010-03-13 04:30:00 EST America/New_York + PT23H = 2010-03-14 04:30:00 EDT America/New_York fa3 2010-03-13 04:30:00 EST America/New_York + PT22H = 2010-03-14 03:30:00 EDT America/New_York fa4 2010-03-13 04:30:00 EST America/New_York + PT21H = 2010-03-14 01:30:00 EST America/New_York fa5 2010-03-13 01:30:00 EST America/New_York + P1D = 2010-03-14 01:30:00 EST America/New_York From 51faf04dbdf70bb91e436c5658fd8ca56ccc62ef Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 15 Mar 2023 21:18:37 +0100 Subject: [PATCH 798/895] Fix GH-10737: PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c The TSRM keeps a hashtable mapping the thread IDs to the thread resource pointers. It's possible that the thread disappears without us knowing, and then another thread gets spawned some time later with the same ID as the disappeared thread. Note that since it's a new thread the TSRM key pointer and cached pointer will be NULL. The Apache request handler `php_handler()` will try to fetch some fields from the SAPI globals. It uses a lazy thread resource allocation by calling `ts_resource(0);`. This allocates a thread resource and sets up the TSRM pointers if they haven't been set up yet. At least, that's what's supposed to happen. But since we are in a situation where the thread ID still has the resources of the *old* thread associated in the hashtable, the loop in `ts_resource_ex` will find that thread resource and assume the thread has been setup already. But this is not the case since this thread is actually a new thread, just reusing the ID of the old one, without any relation whatsoever to the old thread. Because of this assumption, the TSRM pointers will not be setup, leading to a NULL pointer dereference when trying to access the SAPI globals. We can easily detect this scenario: if we're in the fallback path, and the pointer is NULL, and we're looking for our own thread resource, we know we're actually reusing a thread ID. In that case, we'll free up the old thread resources gracefully (gracefully because there might still be resources open like database connection which need to be shut down cleanly). After freeing the resources, we'll create the new resources for this thread as if the stale resources never existed in the first place. From that point forward, it is as if that situation never occurred. The fact that this situation happens isn't that bad because a child process containing threads will eventually be respawned anyway by the SAPI, so the stale thread resources won't remain forever. Note that we can't simply assign our own TSRM pointers to the existing thread resource for our ID, since it was actually from a different thread (just with the same ID!). Furthermore, the dynamically loaded extensions have their own pointer, which is only set when their constructor is called, so we'd have to call their constructor anyway... I also tried to call the dtor and then the ctor again for those resources on the pre-existing thread resource to reuse storage, but that didn't work properly because other code doesn't expect something like that to happen, which breaks assumptions, and this in turn caused Valgrind to (rightfully) complain about memory bugs. Note 2: I also had to fix a bug in the core globals destruction because it always assumed that the thread destroying them was the owning thread, which on TSRM shutdown isn't always the case. A similar bug was fixed recently with the JIT globals. Closes GH-10863. --- NEWS | 2 + TSRM/TSRM.c | 114 +++++++++++++++++++++++++++++------------------ main/main.c | 2 +- main/php_ticks.c | 4 +- main/php_ticks.h | 2 +- 5 files changed, 76 insertions(+), 48 deletions(-) diff --git a/NEWS b/NEWS index e05bdac1e3d23..41acc3f4d15b3 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ PHP NEWS (nielsdos) . Fixed bug GH-10085 (Assertion when adding two arrays with += where the first array is contained in the second). (ilutov) + . Fixed bug GH-10737 (PHP 8.1.16 segfaults on line 597 of + sapi/apache2handler/sapi_apache2.c). (nielsdos) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 7cd924318ed4c..62be0a4214815 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -161,6 +161,23 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu return 1; }/*}}}*/ +static void ts_free_resources(tsrm_tls_entry *thread_resources) +{ + /* Need to destroy in reverse order to respect dependencies. */ + for (int i = thread_resources->count - 1; i >= 0; i--) { + if (!resource_types_table[i].done) { + if (resource_types_table[i].dtor) { + resource_types_table[i].dtor(thread_resources->storage[i]); + } + + if (!resource_types_table[i].fast_offset) { + free(thread_resources->storage[i]); + } + } + } + + free(thread_resources->storage); +} /* Shutdown TSRM (call once for the entire process) */ TSRM_API void tsrm_shutdown(void) @@ -183,25 +200,13 @@ TSRM_API void tsrm_shutdown(void) tsrm_tls_entry *p = tsrm_tls_table[i], *next_p; while (p) { - int j; - next_p = p->next; - for (j=0; jcount; j++) { - if (p->storage[j]) { - if (resource_types_table) { - if (!resource_types_table[j].done) { - if (resource_types_table[j].dtor) { - resource_types_table[j].dtor(p->storage[j]); - } - - if (!resource_types_table[j].fast_offset) { - free(p->storage[j]); - } - } - } - } + if (resource_types_table) { + /* This call will already free p->storage for us */ + ts_free_resources(p); + } else { + free(p->storage); } - free(p->storage); free(p); p = next_p; } @@ -367,7 +372,13 @@ TSRM_API ts_rsrc_id ts_allocate_fast_id(ts_rsrc_id *rsrc_id, size_t *offset, siz return *rsrc_id; }/*}}}*/ +static void set_thread_local_storage_resource_to(tsrm_tls_entry *thread_resource) +{ + tsrm_tls_set(thread_resource); + TSRMLS_CACHE = thread_resource; +} +/* Must be called with tsmm_mutex held */ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id) {/*{{{*/ int i; @@ -383,8 +394,7 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_ (*thread_resources_ptr)->next = NULL; /* Set thread local storage to this new thread resources structure */ - tsrm_tls_set(*thread_resources_ptr); - TSRMLS_CACHE = *thread_resources_ptr; + set_thread_local_storage_resource_to(*thread_resources_ptr); if (tsrm_new_thread_begin_handler) { tsrm_new_thread_begin_handler(thread_id); @@ -407,17 +417,14 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_ if (tsrm_new_thread_end_handler) { tsrm_new_thread_end_handler(thread_id); } - - tsrm_mutex_unlock(tsmm_mutex); }/*}}}*/ - /* fetches the requested resource for the current thread */ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) {/*{{{*/ THREAD_T thread_id; int hash_value; - tsrm_tls_entry *thread_resources; + tsrm_tls_entry *thread_resources, **last_thread_resources; if (!th_id) { /* Fast path for looking up the resources for the current @@ -448,25 +455,55 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) if (!thread_resources) { allocate_new_resource(&tsrm_tls_table[hash_value], thread_id); + tsrm_mutex_unlock(tsmm_mutex); return ts_resource_ex(id, &thread_id); } else { - do { - if (thread_resources->thread_id == thread_id) { - break; - } + last_thread_resources = &tsrm_tls_table[hash_value]; + while (thread_resources->thread_id != thread_id) { + last_thread_resources = &thread_resources->next; if (thread_resources->next) { thread_resources = thread_resources->next; } else { allocate_new_resource(&thread_resources->next, thread_id); + tsrm_mutex_unlock(tsmm_mutex); return ts_resource_ex(id, &thread_id); - /* - * thread_resources = thread_resources->next; - * break; - */ } - } while (thread_resources); + } + } + + /* It's possible that the current thread resources are requested, and that we get here. + * This means that the TSRM key pointer and cached pointer are NULL, but there is still + * a thread resource associated with this ID in the hashtable. This can occur if a thread + * goes away, but its resources are never cleaned up, and then that thread ID is reused. + * Since we don't always have a way to know when a thread goes away, we can't clean up + * the thread's resources before the new thread spawns. + * To solve this issue, we'll free up the old thread resources gracefully (gracefully + * because there might still be resources open like database connection which need to + * be shut down cleanly). After freeing up, we'll create the new resources for this thread + * as if the stale resources never existed in the first place. From that point forward, + * it is as if that situation never occurred. + * The fact that this situation happens isn't that bad because a child process containing + * threads will eventually be respawned anyway by the SAPI, so the stale threads won't last + * forever. */ + TSRM_ASSERT(thread_resources->thread_id == thread_id); + if (thread_id == tsrm_thread_id() && !tsrm_tls_get()) { + tsrm_tls_entry *next = thread_resources->next; + /* In case that extensions don't use the pointer passed from the dtor, but incorrectly + * use the global pointer, we need to setup the global pointer temporarily here. */ + set_thread_local_storage_resource_to(thread_resources); + /* Free up the old resource from the old thread instance */ + ts_free_resources(thread_resources); + free(thread_resources); + /* Allocate a new resource at the same point in the linked list, and relink the next pointer */ + allocate_new_resource(last_thread_resources, thread_id); + thread_resources = *last_thread_resources; + thread_resources->next = next; + /* We don't have to tail-call ts_resource_ex, we can take the fast path to the return + * because we already have the correct pointer. */ } + tsrm_mutex_unlock(tsmm_mutex); + /* Read a specific resource from the thread's resources. * This is called outside of a mutex, so have to be aware about external * changes to the structure as we read it. @@ -479,7 +516,6 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) void ts_free_thread(void) {/*{{{*/ tsrm_tls_entry *thread_resources; - int i; THREAD_T thread_id = tsrm_thread_id(); int hash_value; tsrm_tls_entry *last=NULL; @@ -492,17 +528,7 @@ void ts_free_thread(void) while (thread_resources) { if (thread_resources->thread_id == thread_id) { - for (i=0; icount; i++) { - if (resource_types_table[i].dtor) { - resource_types_table[i].dtor(thread_resources->storage[i]); - } - } - for (i=0; icount; i++) { - if (!resource_types_table[i].fast_offset) { - free(thread_resources->storage[i]); - } - } - free(thread_resources->storage); + ts_free_resources(thread_resources); if (last) { last->next = thread_resources->next; } else { diff --git a/main/main.c b/main/main.c index 3d7ca29138387..4868d2df40039 100644 --- a/main/main.c +++ b/main/main.c @@ -1936,7 +1936,7 @@ static void core_globals_dtor(php_core_globals *core_globals) free(core_globals->php_binary); } - php_shutdown_ticks(); + php_shutdown_ticks(core_globals); } /* }}} */ diff --git a/main/php_ticks.c b/main/php_ticks.c index 004314583bdb0..70201ddecd08d 100644 --- a/main/php_ticks.c +++ b/main/php_ticks.c @@ -34,9 +34,9 @@ void php_deactivate_ticks(void) zend_llist_clean(&PG(tick_functions)); } -void php_shutdown_ticks(void) +void php_shutdown_ticks(php_core_globals *core_globals) { - zend_llist_destroy(&PG(tick_functions)); + zend_llist_destroy(&core_globals->tick_functions); } static int php_compare_tick_functions(void *elem1, void *elem2) diff --git a/main/php_ticks.h b/main/php_ticks.h index 5edf7a483bbac..270ea5348fd2a 100644 --- a/main/php_ticks.h +++ b/main/php_ticks.h @@ -19,7 +19,7 @@ int php_startup_ticks(void); void php_deactivate_ticks(void); -void php_shutdown_ticks(void); +void php_shutdown_ticks(php_core_globals *core_globals); void php_run_ticks(int count); BEGIN_EXTERN_C() From 421c56dda20f406a27414839be6d0157f486d961 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sat, 8 Apr 2023 17:03:28 +0100 Subject: [PATCH 799/895] Use zend_string for DBA path (#10698) --- ext/dba/dba.c | 43 +++++++++++++++++++++++++++++++------------ ext/dba/dba_cdb.c | 2 +- ext/dba/dba_db1.c | 2 +- ext/dba/dba_db2.c | 4 ++-- ext/dba/dba_db3.c | 6 +++--- ext/dba/dba_db4.c | 6 +++--- ext/dba/dba_dbm.c | 4 ++-- ext/dba/dba_gdbm.c | 2 +- ext/dba/dba_lmdb.c | 2 +- ext/dba/dba_ndbm.c | 2 +- ext/dba/dba_qdbm.c | 8 ++++---- ext/dba/dba_tcadb.c | 8 ++++---- ext/dba/php_dba.h | 2 +- 13 files changed, 55 insertions(+), 36 deletions(-) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 86b99ad4bb6f0..107541bd2efa3 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -262,9 +262,10 @@ static void dba_close(dba_info *info) if (info->hnd) { info->hnd->close(info); } - if (info->path) { - pefree(info->path, info->flags&DBA_PERSISTENT); - } + ZEND_ASSERT(info->path); + zend_string_release_ex(info->path, info->flags&DBA_PERSISTENT); + info->path = NULL; + if (info->fp && info->fp != info->lock.fp) { if (info->flags & DBA_PERSISTENT) { php_stream_pclose(info->fp); @@ -431,7 +432,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode) /* }}} */ /* {{{ php_find_dbm */ -static dba_info *php_dba_find(const char* path) +static dba_info *php_dba_find(const zend_string *path) { zend_resource *le; dba_info *info; @@ -444,7 +445,7 @@ static dba_info *php_dba_find(const char* path) } if (le->type == le_db || le->type == le_pdb) { info = (dba_info *)(le->ptr); - if (!strcmp(info->path, path)) { + if (zend_string_equals(path, info->path)) { return (dba_info *)(le->ptr); } } @@ -454,6 +455,20 @@ static dba_info *php_dba_find(const char* path) } /* }}} */ +static zend_always_inline zend_string *php_dba_zend_string_dup_safe(zend_string *s, bool persistent) +{ + if (ZSTR_IS_INTERNED(s) && !persistent) { + return s; + } else { + zend_string *duplicated_str = zend_string_init(ZSTR_VAL(s), ZSTR_LEN(s), persistent); + if (persistent) { + GC_MAKE_PERSISTENT_LOCAL(duplicated_str); + } + return duplicated_str; + } +} + + #define FREE_PERSISTENT_RESOURCE_KEY() if (persistent_resource_key) {zend_string_release_ex(persistent_resource_key, false);} /* {{{ php_dba_open */ @@ -467,7 +482,6 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) const char *file_mode; const char *lock_file_mode = NULL; int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0; - zend_string *opened_path = NULL; char *lock_name; #ifdef PHP_WIN32 bool restarted = 0; @@ -724,7 +738,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) info = pemalloc(sizeof(dba_info), persistent); memset(info, 0, sizeof(dba_info)); - info->path = pestrdup(ZSTR_VAL(path), persistent); + info->path = php_dba_zend_string_dup_safe(path, persistent); info->mode = modenr; info->file_permission = permission; info->map_size = map_size; @@ -753,8 +767,9 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) if (is_db_lock) { lock_name = ZSTR_VAL(path); } else { - spprintf(&lock_name, 0, "%s.lck", info->path); + spprintf(&lock_name, 0, "%s.lck", ZSTR_VAL(info->path)); if (!strcmp(file_mode, "r")) { + zend_string *opened_path = NULL; /* when in read only mode try to use existing .lck file first */ /* do not log errors for .lck file while in read only mode on .lck file */ lock_file_mode = "rb"; @@ -769,13 +784,17 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) } } if (!info->lock.fp) { + zend_string *opened_path = NULL; info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|persistent_flag, &opened_path); if (info->lock.fp) { if (is_db_lock) { + ZEND_ASSERT(opened_path); /* replace the path info with the real path of the opened file */ - pefree(info->path, persistent); - info->path = pestrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path), persistent); + zend_string_release(info->path); + info->path = php_dba_zend_string_dup_safe(opened_path, persistent); } + } + if (opened_path) { zend_string_release_ex(opened_path, 0); } } @@ -801,7 +820,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) if (info->lock.fp && is_db_lock) { info->fp = info->lock.fp; /* use the same stream for locking and database access */ } else { - info->fp = php_stream_open_wrapper(info->path, file_mode, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|persistent_flag, NULL); + info->fp = php_stream_open_wrapper(ZSTR_VAL(info->path), file_mode, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|persistent_flag, NULL); } if (!info->fp) { dba_close(info); @@ -1207,7 +1226,7 @@ PHP_FUNCTION(dba_list) } if (le->type == le_db || le->type == le_pdb) { info = (dba_info *)(le->ptr); - add_index_string(return_value, i, info->path); + add_index_str(return_value, i, zend_string_copy(info->path)); } } } diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index 5af9121b565a6..d5af1b8cce249 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -73,7 +73,7 @@ DBA_OPEN_FUNC(cdb) make = 0; file = info->fp; #else - file = VCWD_OPEN(info->path, O_RDONLY); + file = VCWD_OPEN(ZSTR_VAL(info->path), O_RDONLY); if (file < 0) { *error = "Unable to open file"; return FAILURE; diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index 3a95cea460c14..57dfab38f13b7 100644 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -61,7 +61,7 @@ DBA_OPEN_FUNC(db1) return FAILURE; /* not possible */ } - db = dbopen((char *)info->path, gmode, filemode, DB_HASH, NULL); + db = dbopen((char *)ZSTR_VAL(info->path), gmode, filemode, DB_HASH, NULL); if (db == NULL) { return FAILURE; diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index 8f6d47a9239c9..86306bd59a2b8 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -41,7 +41,7 @@ DBA_OPEN_FUNC(db2) int gmode = 0; int filemode = info->file_permission; struct stat check_stat; - int s = VCWD_STAT(info->path, &check_stat); + int s = VCWD_STAT(ZSTR_VAL(info->path), &check_stat); if (!s && !check_stat.st_size) { info->mode = DBA_TRUNC; /* force truncate */ @@ -61,7 +61,7 @@ DBA_OPEN_FUNC(db2) return FAILURE;/* not possible */ } - if (db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) { + if (db_open(ZSTR_VAL(info->path), type, gmode, filemode, NULL, NULL, &dbp)) { return FAILURE; } diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index d9e948a623f50..5d36d86e00808 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -53,7 +53,7 @@ DBA_OPEN_FUNC(db3) int gmode = 0, err; int filemode = info->file_permission; struct stat check_stat; - int s = VCWD_STAT(info->path, &check_stat); + int s = VCWD_STAT(ZSTR_VAL(info->path), &check_stat); if (!s && !check_stat.st_size) { info->mode = DBA_TRUNC; /* force truncate */ @@ -81,9 +81,9 @@ DBA_OPEN_FUNC(db3) dbp->set_errcall(dbp, php_dba_db3_errcall_fcn); if( #if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) - (err=dbp->open(dbp, 0, info->path, NULL, type, gmode, filemode)) == 0) { + (err=dbp->open(dbp, 0, ZSTR_VAL(info->path), NULL, type, gmode, filemode)) == 0) { #else - (err=dbp->open(dbp, info->path, NULL, type, gmode, filemode)) == 0) { + (err=dbp->open(dbp, ZSTR_VAL(info->path), NULL, type, gmode, filemode)) == 0) { #endif dba_db3_data *data; diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 3de66a4274432..a2dbd5dafa1e2 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -67,7 +67,7 @@ DBA_OPEN_FUNC(db4) int gmode = 0, err; int filemode = info->file_permission; struct stat check_stat; - int s = VCWD_STAT(info->path, &check_stat); + int s = VCWD_STAT(ZSTR_VAL(info->path), &check_stat); #if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 7) /* Bug 51086 */ if (!s && !check_stat.st_size) { @@ -110,9 +110,9 @@ DBA_OPEN_FUNC(db4) dbp->set_errcall(dbp, php_dba_db4_errcall_fcn); if ( #if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) - (err=dbp->open(dbp, 0, info->path, NULL, type, gmode, filemode)) == 0) { + (err=dbp->open(dbp, 0, ZSTR_VAL(info->path), NULL, type, gmode, filemode)) == 0) { #else - (err=dbp->open(dbp, info->path, NULL, type, gmode, filemode)) == 0) { + (err=dbp->open(dbp, ZSTR_VAL(info->path), NULL, type, gmode, filemode)) == 0) { #endif dba_db4_data *data; diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index afa645cb2fe70..88a8959082709 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -36,7 +36,7 @@ #include #define TRUNC_IT(extension, mode) \ - snprintf(buf, MAXPATHLEN, "%s" extension, info->path); \ + snprintf(buf, MAXPATHLEN, "%s" extension, ZSTR_VAL(info->path)); \ buf[MAXPATHLEN-1] = '\0'; \ if((fd = VCWD_OPEN_MODE(buf, O_CREAT | mode | O_WRONLY, filemode)) == -1) \ return FAILURE; \ @@ -67,7 +67,7 @@ DBA_OPEN_FUNC(dbm) TRUNC_IT(".dir", 0); } - if(dbminit((char *) info->path) == -1) { + if(dbminit((char *) ZSTR_VAL(info->path)) == -1) { return FAILURE; } diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index c3fbb5bf21e18..0781e1fb1a76f 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -46,7 +46,7 @@ DBA_OPEN_FUNC(gdbm) if(gmode == -1) return FAILURE; /* not possible */ - dbf = gdbm_open(info->path, /* int block_size */ 0, gmode, filemode, NULL); + dbf = gdbm_open(ZSTR_VAL(info->path), /* int block_size */ 0, gmode, filemode, NULL); if(dbf) { info->dbf = pemalloc(sizeof(dba_gdbm_data), info->flags&DBA_PERSISTENT); diff --git a/ext/dba/dba_lmdb.c b/ext/dba/dba_lmdb.c index 1645453324525..f147f4c810dee 100644 --- a/ext/dba/dba_lmdb.c +++ b/ext/dba/dba_lmdb.c @@ -81,7 +81,7 @@ DBA_OPEN_FUNC(lmdb) } } - rc = mdb_env_open(env, info->path, flags, mode); + rc = mdb_env_open(env, ZSTR_VAL(info->path), flags, mode); if (rc) { /* If this function [mdb_env_open()] fails, mdb_env_close() must be called to discard the MDB_env handle. * http://www.lmdb.tech/doc/group__mdb.html#ga32a193c6bf4d7d5c5d579e71f22e9340 */ diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index d872add48e6ab..758fcd1e77172 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -52,7 +52,7 @@ DBA_OPEN_FUNC(ndbm) return FAILURE; /* not possible */ } - dbf = dbm_open(info->path, gmode, filemode); + dbf = dbm_open(ZSTR_VAL(info->path), gmode, filemode); pinfo->dbf = dbf; return SUCCESS; diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c index d06af20659909..d70885754bedd 100644 --- a/ext/dba/dba_qdbm.c +++ b/ext/dba/dba_qdbm.c @@ -37,16 +37,16 @@ DBA_OPEN_FUNC(qdbm) switch(info->mode) { case DBA_READER: - dbf = dpopen(info->path, DP_OREADER, 0); + dbf = dpopen(ZSTR_VAL(info->path), DP_OREADER, 0); break; case DBA_WRITER: - dbf = dpopen(info->path, DP_OWRITER, 0); + dbf = dpopen(ZSTR_VAL(info->path), DP_OWRITER, 0); break; case DBA_CREAT: - dbf = dpopen(info->path, DP_OWRITER | DP_OCREAT, 0); + dbf = dpopen(ZSTR_VAL(info->path), DP_OWRITER | DP_OCREAT, 0); break; case DBA_TRUNC: - dbf = dpopen(info->path, DP_OWRITER | DP_OCREAT | DP_OTRUNC, 0); + dbf = dpopen(ZSTR_VAL(info->path), DP_OWRITER | DP_OCREAT | DP_OTRUNC, 0); break; default: return FAILURE; diff --git a/ext/dba/dba_tcadb.c b/ext/dba/dba_tcadb.c index 23c9e2d1d363d..b085558a71133 100644 --- a/ext/dba/dba_tcadb.c +++ b/ext/dba/dba_tcadb.c @@ -39,16 +39,16 @@ DBA_OPEN_FUNC(tcadb) if (tcadb) { switch(info->mode) { case DBA_READER: - spprintf(&path_string, 0, "%s#mode=r", info->path); + spprintf(&path_string, 0, "%s#mode=r", ZSTR_VAL(info->path)); break; case DBA_WRITER: - spprintf(&path_string, 0, "%s#mode=w", info->path); + spprintf(&path_string, 0, "%s#mode=w", ZSTR_VAL(info->path)); break; case DBA_CREAT: - spprintf(&path_string, 0, "%s#mode=wc", info->path); + spprintf(&path_string, 0, "%s#mode=wc", ZSTR_VAL(info->path)); break; case DBA_TRUNC: - spprintf(&path_string, 0, "%s#mode=wct", info->path); + spprintf(&path_string, 0, "%s#mode=wct", ZSTR_VAL(info->path)); break; default: tcadbdel(tcadb); diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index d6a86f76b271d..30742661c3bba 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -38,7 +38,7 @@ typedef struct dba_lock { typedef struct dba_info { /* public */ void *dbf; /* ptr to private data or whatever */ - char *path; + zend_string *path; dba_mode_t mode; php_stream *fp; /* this is the database stream for builtin handlers */ int fd; From 6c532df7055c605d9d948ab57d50f19822d8b5f9 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 8 Apr 2023 08:50:40 +0100 Subject: [PATCH 800/895] ext/sockets adding FreeBSD's SO_REUSEPORT_LB constant. SO_REUSEPORT_LB is, in fact, closer to the classical Linux's SO_REUSEPORT. Close GH-11038 --- NEWS | 1 + UPGRADING | 1 + ext/sockets/sockets.stub.php | 7 +++++++ ext/sockets/sockets_arginfo.h | 5 ++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e24c308c860b6..eb7a0c50dbc55 100644 --- a/NEWS +++ b/NEWS @@ -149,6 +149,7 @@ PHP NEWS . Added SO_RERROR, SO_ZEROIZE and SO_SPLICE netbsd and openbsd constants. (David Carlier) . Added TCP_REPAIR for quietly close a connection. (David Carlier) + . Added SO_REUSEPORT_LB freebsd constant. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index 5c74afb66743b..c82352394e6c2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -214,6 +214,7 @@ PHP 8.3 UPGRADE NOTES . SO_ZEROIZE (OpenBSD only). . SO_SPLICE (OpenBSD only). . TCP_REPAIR (Linux only). + . SO_REUSEPORT_LB (FreeBSD only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 55596dc83ce7c..c0007a8f938cd 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -173,6 +173,13 @@ */ const SO_REUSEPORT = UNKNOWN; #endif +#ifdef SO_REUSEPORT_LB +/** + * @var int + * @cvalue SO_REUSEPORT_LB + */ +const SO_REUSEPORT_LB = UNKNOWN; +#endif /** * @var int * @cvalue SO_KEEPALIVE diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index b936985b57ed6..dbc88406d8f8a 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e636fc791c75cffe089fdcba26d38c9dedb89b57 */ + * Stub hash: b8ca31ff65d450afac0d7e555311f57193b003c4 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -391,6 +391,9 @@ static void register_sockets_symbols(int module_number) REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_PERSISTENT); #if defined(SO_REUSEPORT) REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_PERSISTENT); +#endif +#if defined(SO_REUSEPORT_LB) + REGISTER_LONG_CONSTANT("SO_REUSEPORT_LB", SO_REUSEPORT_LB, CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_PERSISTENT); From b9af98092cf1e78e46308c40ac6efaf117786cac Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 10 Apr 2023 12:35:52 +0100 Subject: [PATCH 801/895] Add case insensitive versions of the zend_string_starts_with_* APIs (#11032) --- Zend/zend_string.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Zend/zend_string.h b/Zend/zend_string.h index ae394dbdb7b41..1513a19c36070 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -411,6 +411,19 @@ static zend_always_inline bool zend_string_starts_with(const zend_string *str, c #define zend_string_starts_with_literal(str, prefix) \ zend_string_starts_with_cstr(str, prefix, strlen(prefix)) +static zend_always_inline bool zend_string_starts_with_cstr_ci(const zend_string *str, const char *prefix, size_t prefix_length) +{ + return ZSTR_LEN(str) >= prefix_length && !strncasecmp(ZSTR_VAL(str), prefix, prefix_length); +} + +static zend_always_inline bool zend_string_starts_with_ci(const zend_string *str, const zend_string *prefix) +{ + return zend_string_starts_with_cstr_ci(str, ZSTR_VAL(prefix), ZSTR_LEN(prefix)); +} + +#define zend_string_starts_with_literal_ci(str, prefix) \ + zend_string_starts_with_cstr(str, prefix, strlen(prefix)) + /* * DJBX33A (Daniel J. Bernstein, Times 33 with Addition) * From a72778b45d64c622364b9e998f3bccfab764b091 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 10 Apr 2023 13:23:08 +0100 Subject: [PATCH 802/895] ext/phar: Prevent unnecessary known string length computation Closes GH-11033 --- ext/phar/func_interceptors.c | 69 ++++++++++++++++++------------------ ext/phar/phar.c | 26 ++++++-------- ext/phar/phar_object.c | 40 ++++++++++++--------- ext/phar/util.c | 20 +++++++---- 4 files changed, 81 insertions(+), 74 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index d208a4c9f9cd5..7ab3a646b4e09 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -41,18 +41,17 @@ PHAR_FUNC(phar_opendir) /* {{{ */ } if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) { - char *arch, *entry, *fname; - size_t arch_len, entry_len, fname_len; - fname = (char*)zend_get_executed_filename(); + char *arch, *entry; + size_t arch_len, entry_len; + zend_string *fname = zend_get_executed_filename_ex(); /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - - if (strncasecmp(fname, "phar://", 7)) { + if (!zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } - fname_len = strlen(fname); - if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + + if (SUCCESS == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0)) { php_stream_context *context = NULL; php_stream *stream; char *name; @@ -91,15 +90,17 @@ PHAR_FUNC(phar_opendir) /* {{{ */ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool using_include_path) { - char *arch, *entry, *fname; - size_t arch_len, entry_len, fname_len; + char *arch, *entry; + size_t arch_len, entry_len; + zend_string *fname = zend_get_executed_filename_ex(); - fname = (char*)zend_get_executed_filename(); - if (strncasecmp(fname, "phar://", 7)) { + /* we are checking for existence of a file within the relative path. Chances are good that this is + retrieving something from within the phar archive */ + if (!zend_string_starts_with_literal_ci(fname, "phar://")) { return NULL; } - fname_len = strlen(fname); - if (FAILURE == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + + if (FAILURE == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0)) { return NULL; } @@ -485,22 +486,22 @@ static void phar_file_stat(const char *filename, size_t filename_length, int typ } if (!IS_ABSOLUTE_PATH(filename, filename_length) && !strstr(filename, "://")) { - char *arch, *entry, *fname; - size_t arch_len, entry_len, fname_len; + char *arch, *entry; + size_t arch_len, entry_len; + zend_string *fname; zend_stat_t sb = {0}; phar_entry_info *data = NULL; phar_archive_data *phar; - fname = (char*)zend_get_executed_filename(); + fname = zend_get_executed_filename_ex(); /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - - if (strncasecmp(fname, "phar://", 7)) { + if (!zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } - fname_len = strlen(fname); - if (PHAR_G(last_phar) && fname_len - 7 >= PHAR_G(last_phar_name_len) && !memcmp(fname + 7, PHAR_G(last_phar_name), PHAR_G(last_phar_name_len))) { + + if (PHAR_G(last_phar) && ZSTR_LEN(fname) - 7 >= PHAR_G(last_phar_name_len) && !memcmp(ZSTR_VAL(fname) + 7, PHAR_G(last_phar_name), PHAR_G(last_phar_name_len))) { arch = estrndup(PHAR_G(last_phar_name), PHAR_G(last_phar_name_len)); arch_len = PHAR_G(last_phar_name_len); entry = estrndup(filename, filename_length); @@ -509,7 +510,7 @@ static void phar_file_stat(const char *filename, size_t filename_length, int typ phar = PHAR_G(last_phar); goto splitted; } - if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + if (SUCCESS == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0)) { efree(entry); entry = estrndup(filename, filename_length); @@ -741,18 +742,17 @@ PHAR_FUNC(phar_is_file) /* {{{ */ goto skip_phar; } if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) { - char *arch, *entry, *fname; - size_t arch_len, entry_len, fname_len; - fname = (char*)zend_get_executed_filename(); + char *arch, *entry; + size_t arch_len, entry_len; + zend_string *fname = zend_get_executed_filename_ex(); /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - - if (strncasecmp(fname, "phar://", 7)) { + if (!zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } - fname_len = strlen(fname); - if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + + if (SUCCESS == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0)) { phar_archive_data *phar; efree(entry); @@ -808,18 +808,17 @@ PHAR_FUNC(phar_is_link) /* {{{ */ goto skip_phar; } if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) { - char *arch, *entry, *fname; - size_t arch_len, entry_len, fname_len; - fname = (char*)zend_get_executed_filename(); + char *arch, *entry; + size_t arch_len, entry_len; + zend_string *fname = zend_get_executed_filename_ex(); /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - - if (strncasecmp(fname, "phar://", 7)) { + if (!zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } - fname_len = strlen(fname); - if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + + if (SUCCESS == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0)) { phar_archive_data *phar; efree(entry); diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 03263e2df53d1..dafe73dded717 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2318,24 +2318,17 @@ int phar_split_fname(const char *filename, size_t filename_len, char **arch, siz */ int phar_open_executed_filename(char *alias, size_t alias_len, char **error) /* {{{ */ { - char *fname; - php_stream *fp; - size_t fname_len; - zend_string *actual = NULL; - int ret; - if (error) { *error = NULL; } - fname = (char*)zend_get_executed_filename(); - fname_len = strlen(fname); + zend_string *fname = zend_get_executed_filename_ex(); - if (phar_open_parsed_phar(fname, fname_len, alias, alias_len, 0, REPORT_ERRORS, NULL, 0) == SUCCESS) { + if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, alias_len, 0, REPORT_ERRORS, NULL, 0) == SUCCESS) { return SUCCESS; } - if (!strcmp(fname, "[no active file]")) { + if (zend_string_equals_literal(fname, "[no active file]")) { if (error) { spprintf(error, 0, "cannot initialize a phar outside of PHP execution"); } @@ -2349,15 +2342,17 @@ int phar_open_executed_filename(char *alias, size_t alias_len, char **error) /* return FAILURE; } - if (php_check_open_basedir(fname)) { + if (php_check_open_basedir(ZSTR_VAL(fname))) { return FAILURE; } - fp = php_stream_open_wrapper(fname, "rb", IGNORE_URL|STREAM_MUST_SEEK|REPORT_ERRORS, &actual); + zend_string *actual = NULL; + php_stream *fp; + fp = php_stream_open_wrapper(ZSTR_VAL(fname), "rb", IGNORE_URL|STREAM_MUST_SEEK|REPORT_ERRORS, &actual); if (!fp) { if (error) { - spprintf(error, 0, "unable to open phar for reading \"%s\"", fname); + spprintf(error, 0, "unable to open phar for reading \"%s\"", ZSTR_VAL(fname)); } if (actual) { zend_string_release_ex(actual, 0); @@ -2366,11 +2361,10 @@ int phar_open_executed_filename(char *alias, size_t alias_len, char **error) /* } if (actual) { - fname = ZSTR_VAL(actual); - fname_len = ZSTR_LEN(actual); + fname = actual; } - ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, 0, error); + int ret = phar_open_from_fp(fp, ZSTR_VAL(fname), ZSTR_LEN(fname), alias, alias_len, REPORT_ERRORS, NULL, 0, error); if (actual) { zend_string_release_ex(actual, 0); diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 7791ddb10a070..7f9568f6f8324 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -392,21 +392,24 @@ static void phar_postprocess_ru_web(char *fname, size_t fname_len, char **entry, */ PHP_METHOD(Phar, running) { - char *fname, *arch, *entry; - size_t fname_len, arch_len, entry_len; + zend_string *fname; + char *arch, *entry; + size_t arch_len, entry_len; bool retphar = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &retphar) == FAILURE) { RETURN_THROWS(); } - fname = (char*)zend_get_executed_filename(); - fname_len = strlen(fname); + fname = zend_get_executed_filename_ex(); - if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { + if ( + zend_string_starts_with_literal_ci(fname, "phar://") + && SUCCESS == phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 2, 0) + ) { efree(entry); if (retphar) { - RETVAL_STRINGL(fname, arch_len + 7); + RETVAL_STRINGL(ZSTR_VAL(fname), arch_len + 7); efree(arch); return; } else { @@ -441,8 +444,9 @@ PHP_METHOD(Phar, mount) RETURN_THROWS(); } - fname = (char*)zend_get_executed_filename(); - fname_len = strlen(fname); + zend_string *zend_file_name = zend_get_executed_filename_ex(); + fname = ZSTR_VAL(zend_file_name); + fname_len = ZSTR_LEN(zend_file_name); #ifdef PHP_WIN32 save_fname = fname; @@ -556,8 +560,6 @@ PHP_METHOD(Phar, webPhar) } phar_request_initialize(); - fname = (char*)zend_get_executed_filename(); - fname_len = strlen(fname); if (phar_open_executed_filename(alias, alias_len, &error) != SUCCESS) { if (error) { @@ -583,6 +585,10 @@ PHP_METHOD(Phar, webPhar) return; } + zend_string *zend_file_name = zend_get_executed_filename_ex(); + fname = ZSTR_VAL(zend_file_name); + fname_len = ZSTR_LEN(zend_file_name); + #ifdef PHP_WIN32 if (memchr(fname, '\\', fname_len)) { fname = estrndup(fname, fname_len); @@ -1274,9 +1280,9 @@ PHP_METHOD(Phar, getSupportedCompression) /* {{{ Completely remove a phar archive from memory and disk */ PHP_METHOD(Phar, unlinkArchive) { - char *fname, *error, *zname, *arch, *entry; + char *fname, *error, *arch, *entry; size_t fname_len; - size_t zname_len, arch_len, entry_len; + size_t arch_len, entry_len; phar_archive_data *phar; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { @@ -1298,11 +1304,13 @@ PHP_METHOD(Phar, unlinkArchive) RETURN_THROWS(); } - zname = (char*)zend_get_executed_filename(); - zname_len = strlen(zname); + zend_string *zend_file_name = zend_get_executed_filename_ex(); - if (zname_len > 7 && !memcmp(zname, "phar://", 7) && SUCCESS == phar_split_fname(zname, zname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) { - if ((size_t)arch_len == fname_len && !memcmp(arch, fname, arch_len)) { + if ( + zend_string_starts_with_literal_ci(zend_file_name, "phar://") + && SUCCESS == phar_split_fname(ZSTR_VAL(zend_file_name), ZSTR_LEN(zend_file_name), &arch, &arch_len, &entry, &entry_len, 2, 0) + ) { + if (arch_len == fname_len && !memcmp(arch, fname, arch_len)) { zend_throw_exception_ex(phar_ce_PharException, 0, "phar archive \"%s\" cannot be unlinked from within itself", fname); efree(arch); efree(entry); diff --git a/ext/phar/util.c b/ext/phar/util.c index 24f3ce55cd968..8b82ed6ecbad8 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -242,8 +242,8 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, size_t filename_le zend_string *phar_find_in_include_path(zend_string *filename, phar_archive_data **pphar) /* {{{ */ { zend_string *ret; - char *path, *fname, *arch, *entry, *test; - size_t arch_len, entry_len, fname_len; + char *path, *arch, *entry, *test; + size_t arch_len, entry_len; phar_archive_data *phar; if (pphar) { @@ -256,17 +256,23 @@ zend_string *phar_find_in_include_path(zend_string *filename, phar_archive_data return NULL; } - fname = (char*)zend_get_executed_filename(); - fname_len = strlen(fname); + zend_string *fname = zend_get_executed_filename_ex(); + bool is_file_a_phar_wrapper = zend_string_starts_with_literal_ci(fname, "phar://"); + size_t length_phar_protocol = strlen("phar://"); - if (PHAR_G(last_phar) && !memcmp(fname, "phar://", 7) && fname_len - 7 >= PHAR_G(last_phar_name_len) && !memcmp(fname + 7, PHAR_G(last_phar_name), PHAR_G(last_phar_name_len))) { + if ( + PHAR_G(last_phar) + && is_file_a_phar_wrapper + && ZSTR_LEN(fname) - length_phar_protocol >= PHAR_G(last_phar_name_len) + && !memcmp(ZSTR_VAL(fname) + length_phar_protocol, PHAR_G(last_phar_name), PHAR_G(last_phar_name_len)) + ) { arch = estrndup(PHAR_G(last_phar_name), PHAR_G(last_phar_name_len)); arch_len = PHAR_G(last_phar_name_len); phar = PHAR_G(last_phar); goto splitted; } - if (fname_len < 7 || memcmp(fname, "phar://", 7) || SUCCESS != phar_split_fname(fname, strlen(fname), &arch, &arch_len, &entry, &entry_len, 1, 0)) { + if (!is_file_a_phar_wrapper || SUCCESS != phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), &arch, &arch_len, &entry, &entry_len, 1, 0)) { return NULL; } @@ -310,7 +316,7 @@ zend_string *phar_find_in_include_path(zend_string *filename, phar_archive_data ret = php_resolve_path(ZSTR_VAL(filename), ZSTR_LEN(filename), path); efree(path); - if (ret && ZSTR_LEN(ret) > 8 && !strncmp(ZSTR_VAL(ret), "phar://", 7)) { + if (ret && zend_string_starts_with_literal_ci(ret, "phar://")) { /* found phar:// */ if (SUCCESS != phar_split_fname(ZSTR_VAL(ret), ZSTR_LEN(ret), &arch, &arch_len, &entry, &entry_len, 1, 0)) { return ret; From 4082d425a902ea01efcae8968bc956820c9d2a98 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 10 Apr 2023 13:23:08 +0100 Subject: [PATCH 803/895] ext/phar: Remove duplicate cleaning-up code --- ext/phar/phar_object.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 7f9568f6f8324..ca581d5631495 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -486,15 +486,6 @@ PHP_METHOD(Phar, mount) carry_on: if (SUCCESS != phar_mount_entry(pphar, actual, actual_len, path, path_len)) { zend_throw_exception_ex(phar_ce_PharException, 0, "Mounting of %s to %s within phar %s failed", path, actual, arch); - if (path && path == entry) { - efree(entry); - } - - if (arch) { - efree(arch); - } - - goto finish; } if (entry && path && path == entry) { From c4a1100f190efce41eab728e84788d2491cc4c71 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 10 Apr 2023 16:41:43 +0200 Subject: [PATCH 804/895] Fix unevaluated rhs of class constant fetch in constant expression (#11047) Fixes oss-fuzz #57821 --- Zend/tests/oss_fuzz_57821.phpt | 12 ++++++++++++ Zend/zend_compile.c | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/oss_fuzz_57821.phpt diff --git a/Zend/tests/oss_fuzz_57821.phpt b/Zend/tests/oss_fuzz_57821.phpt new file mode 100644 index 0000000000000..5c6e9fab9a8e9 --- /dev/null +++ b/Zend/tests/oss_fuzz_57821.phpt @@ -0,0 +1,12 @@ +--TEST-- +oss-fuzz #57821: Unevaluated rhs of class constant fetch in constant expression +--FILE-- + +--EXPECT-- +string(3) "foo" diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 11df76fbf7d78..6aa5bd15a990b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -10761,14 +10761,14 @@ static void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ zend_ast *name_ast; zend_string *resolved_name; + zend_eval_const_expr(&ast->child[0]); + zend_eval_const_expr(&ast->child[1]); + if (UNEXPECTED(ast->child[1]->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(ast->child[1])) != IS_STRING)) { return; } - zend_eval_const_expr(&ast->child[0]); - zend_eval_const_expr(&ast->child[1]); - class_ast = ast->child[0]; name_ast = ast->child[1]; From d64c7184d420dfd36ffb534c2607887edb3f6052 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 10 Apr 2023 19:35:34 +0200 Subject: [PATCH 805/895] Remove unneeded occurrences of my name in UPGRADING In NEWS, each 'news item' is suffixed with the name of the developer who implemented the change. When adding entries to UPGRADING, I used the same format as NEWS, without thinking about it much. However, it has come to my attention that the standard format for entries in UPGRADING does not include the developer's name. --- UPGRADING | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index c82352394e6c2..b83010ae7833c 100644 --- a/UPGRADING +++ b/UPGRADING @@ -101,14 +101,12 @@ PHP 8.3 UPGRADE NOTES . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional casing rules for the Greek letter sigma. For mb_convert_case, conditional casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to - MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. (Alex Dowad) + MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. . mb_decode_mimeheader interprets underscores in QPrint-encoded MIME encoded words as required by RFC 2047; they are converted to spaces. Underscores must be encoded as "=5F" in such MIME encoded words. - (Alex Dowad) . In rare cases, mb_encode_mimeheader will transfer-encode its input string where it would pass it through as raw ASCII in PHP 8.2. - (Alex Dowad) - mysqli: . mysqli_fetch_object now raises a ValueError instead of an Exception when the constructor_args From aa51871adcf0ab8c891467a4f4814a5979b64807 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 10 Apr 2023 19:43:05 +0200 Subject: [PATCH 806/895] Add more details to NEWS on mb_detect_encoding; also include in UPGRADING --- NEWS | 13 +++++++++++-- UPGRADING | 12 ++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index eb7a0c50dbc55..5da63a489dcdc 100644 --- a/NEWS +++ b/NEWS @@ -69,8 +69,17 @@ PHP NEWS . mb_detect_encoding is better able to identify the correct encoding for Turkish text. (Alex Dowad) . mb_detect_encoding's "non-strict" mode now behaves as described in the - documentation. Previously, it would return false if the very first byte - of the input string was invalid in all candidate encodings. (Alex Dowad) + documentation. Previously, it would return false if the same byte + (for example, the first byte) of the input string was invalid in all + candidate encodings. More generally, it would eliminate candidate + encodings from consideration when an invalid byte was seen, and if the + same input byte eliminated all remaining encodings still under + consideration, it would return false. On the other hand, if all candidate + encodings but one were eliminated from consideration, it would return the + last remaining one without regard for how many encoding errors might be + encountered later in the string. This is different from the behavior + described in the documentation, which says: "If strict is set to false, + the closest matching encoding will be returned." (Alex Dowad) . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional casing rules for the Greek letter sigma. For mb_convert_case, conditional casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to diff --git a/UPGRADING b/UPGRADING index b83010ae7833c..f6de32839a449 100644 --- a/UPGRADING +++ b/UPGRADING @@ -107,6 +107,18 @@ PHP 8.3 UPGRADE NOTES Underscores must be encoded as "=5F" in such MIME encoded words. . In rare cases, mb_encode_mimeheader will transfer-encode its input string where it would pass it through as raw ASCII in PHP 8.2. + . mb_detect_encoding's "non-strict" mode now behaves as described in the + documentation. Previously, it would return false if the same byte + (for example, the first byte) of the input string was invalid in all + candidate encodings. More generally, it would eliminate candidate + encodings from consideration when an invalid byte was seen, and if the + same input byte eliminated all remaining encodings still under + consideration, it would return false. On the other hand, if all candidate + encodings but one were eliminated from consideration, it would return the + last remaining one without regard for how many encoding errors might be + encountered later in the string. This is different from the behavior + described in the documentation, which says: "If strict is set to false, + the closest matching encoding will be returned." - mysqli: . mysqli_fetch_object now raises a ValueError instead of an Exception when the constructor_args From a62d192ede5d65d7d9047b47da67a5787066b945 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 10 Apr 2023 19:43:40 +0200 Subject: [PATCH 807/895] Add additional note on mb_encode_mimeheader in UPGRADING --- UPGRADING | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPGRADING b/UPGRADING index f6de32839a449..b55d018f30953 100644 --- a/UPGRADING +++ b/UPGRADING @@ -107,6 +107,10 @@ PHP 8.3 UPGRADE NOTES Underscores must be encoded as "=5F" in such MIME encoded words. . In rare cases, mb_encode_mimeheader will transfer-encode its input string where it would pass it through as raw ASCII in PHP 8.2. + . mb_encode_mimeheader no longer drops NUL (zero) bytes when + QPrint-encoding the input string. This previously caused strings in + certain text encodings, especially UTF-16 and UTF-32, to be + corrupted by mb_encode_mimeheader. . mb_detect_encoding's "non-strict" mode now behaves as described in the documentation. Previously, it would return false if the same byte (for example, the first byte) of the input string was invalid in all From 7cef7cb0ee02993fa97bbc0d00ec25470bdb2ed2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 10 Apr 2023 19:47:03 +0200 Subject: [PATCH 808/895] Add more details in UPGRADING on mb_check_encoding changes --- UPGRADING | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index 05b33b231ee34..b025364400f4b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -219,7 +219,8 @@ PHP 8.2 UPGRADE NOTES is still accepted, but it is recommended to use the new standard variant. - MBString - . mb_check_encoding() now checks input encoding more strictly. + . mb_check_encoding() now checks input encoding more strictly for + certain text encodings, including ISO-2022-JP and UTF-7. . mb_detect_encoding() now checks input encoding more strictly when strict detection is enabled. . mb_convert_encoding() checks the input encoding more strictly From 0c65b396d6fe4263af80a9ecdf637104a3c41084 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 10 Apr 2023 23:19:17 +0300 Subject: [PATCH 809/895] Allow FETCH_OBJ_W and FETCH_STATIC_PROP_W to return INDIRECT/UNDEF zval for uninitialized typed properties (#11048) --- Zend/Optimizer/zend_inference.c | 6 +++ Zend/zend_execute.c | 7 +-- Zend/zend_object_handlers.c | 2 + Zend/zend_vm_def.h | 6 +-- Zend/zend_vm_execute.h | 54 +++++++++---------- ext/opcache/jit/zend_jit_trace.c | 6 +-- .../tests/jit/fetch_static_prop_001.phpt | 20 +++++++ 7 files changed, 63 insertions(+), 38 deletions(-) create mode 100644 ext/opcache/tests/jit/fetch_static_prop_001.phpt diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index f85a1adea701e..ba7c302582f64 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -3436,6 +3436,9 @@ static zend_always_inline int _zend_update_type_info( tmp |= zend_fetch_prop_type(script, prop_info, &ce); if (opline->result_type == IS_VAR) { tmp |= MAY_BE_REF | MAY_BE_INDIRECT; + if ((opline->extended_value & ZEND_FETCH_OBJ_FLAGS) == ZEND_FETCH_DIM_WRITE) { + tmp |= MAY_BE_UNDEF; + } } else if (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || !(t1 & MAY_BE_RC1)) { zend_class_entry *ce = NULL; @@ -3473,6 +3476,9 @@ static zend_always_inline int _zend_update_type_info( zend_fetch_static_prop_info(script, op_array, ssa, opline), &ce); if (opline->result_type == IS_VAR) { tmp |= MAY_BE_REF | MAY_BE_INDIRECT; + if ((opline->extended_value & ZEND_FETCH_OBJ_FLAGS) == ZEND_FETCH_DIM_WRITE) { + tmp |= MAY_BE_UNDEF; + } } else { if (!result_may_be_separated(ssa, ssa_op)) { tmp &= ~MAY_BE_RC1; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a46a93ad96fcc..ad4396e5d9e07 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3087,7 +3087,7 @@ static zend_never_inline bool zend_handle_fetch_obj_flags( return 1; } -static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type, uint32_t flags, bool init_undef OPLINE_DC EXECUTE_DATA_DC) +static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type, uint32_t flags OPLINE_DC EXECUTE_DATA_DC) { zval *ptr; zend_object *zobj; @@ -3203,9 +3203,6 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c } } } - if (init_undef && UNEXPECTED(Z_TYPE_P(ptr) == IS_UNDEF)) { - ZVAL_NULL(ptr); - } end: if (prop_op_type != IS_CONST) { @@ -3219,7 +3216,7 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container void **cache_addr = (prop_op_type == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_RETURNS_FUNCTION) : NULL; zend_fetch_property_address(variable_ptr, container, container_op_type, prop_ptr, prop_op_type, - cache_addr, BP_VAR_W, 0, 0 OPLINE_CC EXECUTE_DATA_CC); + cache_addr, BP_VAR_W, 0 OPLINE_CC EXECUTE_DATA_CC); if (EXPECTED(Z_TYPE_P(variable_ptr) == IS_INDIRECT)) { variable_ptr = Z_INDIRECT_P(variable_ptr); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 60d27b7c91145..8f75aa0bd6903 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1037,6 +1037,8 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam } else if (prop_info && UNEXPECTED(prop_info->flags & ZEND_ACC_READONLY)) { /* Readonly property, delegate to read_property + write_property. */ retval = NULL; + } else if (!prop_info || !ZEND_TYPE_IS_SET(prop_info->type)) { + ZVAL_NULL(retval); } } else { /* we do have getter - fail and let it try again with usual get/set */ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index e6ace6ce3a9ae..a2db0e30da7ac 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2157,7 +2157,7 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, FETCH zend_fetch_property_address( result, container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); FREE_OP2(); if (OP1_TYPE == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -2174,7 +2174,7 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACH container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); property = GET_OP2_ZVAL_PTR(BP_VAR_R); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); FREE_OP2(); if (OP1_TYPE == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -2321,7 +2321,7 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, C container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_UNSET); property = GET_OP2_ZVAL_PTR(BP_VAR_R); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); FREE_OP2(); if (OP1_TYPE == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 61921b608aaf3..388d19e3d692b 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -22808,7 +22808,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HAN zend_fetch_property_address( result, container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -22825,7 +22825,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HA container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -22859,7 +22859,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -25506,7 +25506,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HA zend_fetch_property_address( result, container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -25523,7 +25523,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_H container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -25557,7 +25557,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVA container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -29714,7 +29714,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLE zend_fetch_property_address( result, container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -29731,7 +29731,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDL container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -29765,7 +29765,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HA container = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -32151,7 +32151,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_ zend_fetch_property_address( result, container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -32168,7 +32168,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST container = &EX(This); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -32315,7 +32315,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CO container = &EX(This); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -34004,7 +34004,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR zend_fetch_property_address( result, container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -34021,7 +34021,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVA container = &EX(This); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -34168,7 +34168,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TM container = &EX(This); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -36474,7 +36474,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HAN zend_fetch_property_address( result, container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -36491,7 +36491,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HA container = &EX(This); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -36638,7 +36638,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV container = &EX(This); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_UNUSED == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -40674,7 +40674,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HAND zend_fetch_property_address( result, container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -40691,7 +40691,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HAN container = EX_VAR(opline->op1.var); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -40838,7 +40838,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_ container = EX_VAR(opline->op1.var); property = RT_CONSTANT(opline, opline->op2); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -44452,7 +44452,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HAN zend_fetch_property_address( result, container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -44469,7 +44469,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HA container = EX_VAR(opline->op1.var); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -44616,7 +44616,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR container = EX_VAR(opline->op1.var); property = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -49767,7 +49767,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER zend_fetch_property_address( result, container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) : NULL), - BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS, 1 OPLINE_CC EXECUTE_DATA_CC); + BP_VAR_W, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -49784,7 +49784,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLE container = EX_VAR(opline->op1.var); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); @@ -49931,7 +49931,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HAN container = EX_VAR(opline->op1.var); property = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); result = EX_VAR(opline->result.var); - zend_fetch_property_address(result, container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0, 1 OPLINE_CC EXECUTE_DATA_CC); + zend_fetch_property_address(result, container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL), BP_VAR_UNSET, 0 OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { FREE_VAR_PTR_AND_EXTRACT_RESULT_IF_NECESSARY(opline->op1.var); diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index c0dc07d684645..d2e3e1e1c3185 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -7305,7 +7305,7 @@ static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa fprintf(stderr, " op1(%sobject of class %s)", ref, ZSTR_VAL(p->ce->name)); } else { - const char *type = (op1_type == 0) ? "undef" : zend_get_type_by_const(op1_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT|IS_TRACE_PACKED)); + const char *type = ((op1_type & ~IS_TRACE_INDIRECT) == 0) ? "undef" : zend_get_type_by_const(op1_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT|IS_TRACE_PACKED)); fprintf(stderr, " op1(%s%s%s)", ref, (op1_type & IS_TRACE_PACKED) ? "packed " : "", type); } } @@ -7318,7 +7318,7 @@ static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa fprintf(stderr, " op2(%sobject of class %s)", ref, ZSTR_VAL(p->ce->name)); } else { - const char *type = (op2_type == 0) ? "undef" : zend_get_type_by_const(op2_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT)); + const char *type = ((op2_type & ~IS_TRACE_INDIRECT) == 0) ? "undef" : zend_get_type_by_const(op2_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT)); fprintf(stderr, " op2(%s%s)", ref, type); } } @@ -7326,7 +7326,7 @@ static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa const char *ref = (op3_type & IS_TRACE_INDIRECT) ? ((op3_type & IS_TRACE_REFERENCE) ? "*&" : "*") : ((op3_type & IS_TRACE_REFERENCE) ? "&" : ""); - const char *type = (op3_type == 0) ? "undef" : zend_get_type_by_const(op3_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT)); + const char *type = ((op3_type & ~IS_TRACE_INDIRECT) == 0) ? "undef" : zend_get_type_by_const(op3_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT)); fprintf(stderr, " op3(%s%s)", ref, type); } } diff --git a/ext/opcache/tests/jit/fetch_static_prop_001.phpt b/ext/opcache/tests/jit/fetch_static_prop_001.phpt new file mode 100644 index 0000000000000..db781ac993cea --- /dev/null +++ b/ext/opcache/tests/jit/fetch_static_prop_001.phpt @@ -0,0 +1,20 @@ +--TEST-- +FETCH_STATIC_PROP_W should not return UNDEF +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- + +--EXPECT-- +array(1) { + [0]=> + int(2) +} From ad997987ddc7e47744d8cae86bd41a9e51736deb Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 11 Apr 2023 11:45:05 +0100 Subject: [PATCH 810/895] ext/curl: Protocol should be a case insensitive check (#11052) Minor drive-by refactoring to use the new API --- ext/curl/interface.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 0b108cc7507e1..3aeae5c575f82 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -105,7 +105,7 @@ static ZEND_ATTRIBUTE_UNUSED unsigned long php_curl_ssl_id(void) static zend_result php_curl_option_str(php_curl *ch, zend_long option, const char *str, const size_t len) { - if (strlen(str) != len) { + if (zend_char_has_nul_byte(str, len)) { zend_value_error("%s(): cURL option must not contain any null bytes", get_active_function_name()); return FAILURE; } @@ -116,7 +116,7 @@ static zend_result php_curl_option_str(php_curl *ch, zend_long option, const cha return error == CURLE_OK ? SUCCESS : FAILURE; } -static zend_result php_curl_option_url(php_curl *ch, const char *url, const size_t len) /* {{{ */ +static zend_result php_curl_option_url(php_curl *ch, const zend_string *url) /* {{{ */ { /* Disable file:// if open_basedir are used */ if (PG(open_basedir) && *PG(open_basedir)) { @@ -124,17 +124,21 @@ static zend_result php_curl_option_url(php_curl *ch, const char *url, const size } #if LIBCURL_VERSION_NUM > 0x073800 && defined(PHP_WIN32) - if (len > sizeof("file://") - 1 && '/' != url[sizeof("file://") - 1] && !strncmp("file://", url, sizeof("file://") - 1) && len < MAXPATHLEN - 2) { + if ( + zend_string_starts_with_literal_ci(url, "file://") + && '/' != ZSTR_VAL(url)[sizeof("file://") - 1] + && ZSTR_LEN(url) < MAXPATHLEN - 2 + ) { char _tmp[MAXPATHLEN] = {0}; memmove(_tmp, "file:///", sizeof("file:///") - 1); - memmove(_tmp + sizeof("file:///") - 1, url + sizeof("file://") - 1, len - sizeof("file://") + 1); + memmove(_tmp + sizeof("file:///") - 1, ZSTR_VAL(url) + sizeof("file://") - 1, ZSTR_LEN(url) - sizeof("file://") + 1); - return php_curl_option_str(ch, CURLOPT_URL, _tmp, len + 1); + return php_curl_option_str(ch, CURLOPT_URL, _tmp, ZSTR_LEN(url) + 1); } #endif - return php_curl_option_str(ch, CURLOPT_URL, url, len); + return php_curl_option_str(ch, CURLOPT_URL, ZSTR_VAL(url), ZSTR_LEN(url)); } /* }}} */ @@ -1143,7 +1147,7 @@ PHP_FUNCTION(curl_init) _php_curl_set_default_options(ch); if (url) { - if (php_curl_option_url(ch, ZSTR_VAL(url), ZSTR_LEN(url)) == FAILURE) { + if (php_curl_option_url(ch, url) == FAILURE) { zval_ptr_dtor(return_value); RETURN_FALSE; } @@ -1952,7 +1956,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue { zend_string *tmp_str; zend_string *str = zval_get_tmp_string(zvalue, &tmp_str); - zend_result ret = php_curl_option_url(ch, ZSTR_VAL(str), ZSTR_LEN(str)); + zend_result ret = php_curl_option_url(ch, str); zend_tmp_string_release(tmp_str); return ret; } From 4be6435c9f9d9aa6140abadc8862939d29fec139 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 11 Apr 2023 11:58:11 +0100 Subject: [PATCH 811/895] Use curl from brew on MacOS CI This fixes issue in curl ext SSL client cert setting test. Closes GH-11056 --- .github/actions/brew/action.yml | 1 + .github/actions/configure-macos/action.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/brew/action.yml b/.github/actions/brew/action.yml index 8bdbeec7ab6b8..51d37aa56d470 100644 --- a/.github/actions/brew/action.yml +++ b/.github/actions/brew/action.yml @@ -12,6 +12,7 @@ runs: re2c brew install \ openssl@1.1 \ + curl \ krb5 \ bzip2 \ enchant \ diff --git a/.github/actions/configure-macos/action.yml b/.github/actions/configure-macos/action.yml index 57a9b63a06ea2..317d705645985 100644 --- a/.github/actions/configure-macos/action.yml +++ b/.github/actions/configure-macos/action.yml @@ -11,6 +11,7 @@ runs: set -x export PATH="/usr/local/opt/bison/bin:$PATH" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" From 86ffde3c3837062423b5e4abb9765157960c4a9d Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 4 Apr 2023 16:14:24 +0200 Subject: [PATCH 812/895] Improve ini number handling with INI_SCANNER_TYPED Fixes GH-11010 Closes GH-11014 --- NEWS | 3 ++ Zend/zend_ini_parser.y | 52 +++++++++++++++++-- Zend/zend_ini_scanner.l | 25 --------- .../tests/general_functions/bug70157.phpt | 2 +- .../tests/general_functions/bug77844.phpt | 4 +- .../parse_ini_string_bug76068.phpt | 4 +- ext/standard/tests/gh11010.phpt | 9 ++++ 7 files changed, 65 insertions(+), 34 deletions(-) create mode 100644 ext/standard/tests/gh11010.phpt diff --git a/NEWS b/NEWS index 5da63a489dcdc..a458ae4151d32 100644 --- a/NEWS +++ b/NEWS @@ -170,6 +170,9 @@ PHP NEWS . Fix GH-10239 (proc_close after proc_get_status always returns -1). (nielsdos) . Improve the warning message for unpack() in case not enough values were provided. (nielsdos) + . Fix GH-11010 (parse_ini_string() now preserves formatting of unquoted + strings starting with numbers when the INI_SCANNER_TYPED flag is + specified). (ilutov) - Streams: . Fixed bug #51056: blocking fread() will block even if data is available. diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 322424b979eb8..dc635176d4de2 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -43,6 +43,7 @@ int ini_parse(void); #endif #define ZEND_SYSTEM_INI CG(ini_parser_unbuffered_errors) +#define INI_ZVAL_IS_NUMBER 1 static int get_int_val(zval *op) { switch (Z_TYPE_P(op)) { @@ -92,8 +93,12 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2) break; } - str_len = sprintf(str_result, "%d", i_result); - ZVAL_NEW_STR(result, zend_string_init(str_result, str_len, ZEND_SYSTEM_INI)); + if (INI_SCNG(scanner_mode) != ZEND_INI_SCANNER_TYPED) { + str_len = sprintf(str_result, "%d", i_result); + ZVAL_NEW_STR(result, zend_string_init(str_result, str_len, ZEND_SYSTEM_INI)); + } else { + ZVAL_LONG(result, i_result); + } } /* }}} */ @@ -276,6 +281,41 @@ static void zval_ini_dtor(zval *zv) } /* }}} */ +static inline zend_result convert_to_number(zval *retval, const char *str, const int str_len) +{ + uint8_t type; + int overflow; + zend_long lval; + double dval; + + if ((type = is_numeric_string_ex(str, str_len, &lval, &dval, 0, &overflow, NULL)) != 0) { + if (type == IS_LONG) { + ZVAL_LONG(retval, lval); + return SUCCESS; + } else if (type == IS_DOUBLE && !overflow) { + ZVAL_DOUBLE(retval, dval); + return SUCCESS; + } + } + + return FAILURE; +} + +static void normalize_value(zval *zv) +{ + if (INI_SCNG(scanner_mode) != ZEND_INI_SCANNER_TYPED) { + return; + } + + if (Z_EXTRA_P(zv) == INI_ZVAL_IS_NUMBER && Z_TYPE_P(zv) == IS_STRING) { + zval number_rv; + if (convert_to_number(&number_rv, Z_STRVAL_P(zv), Z_STRLEN_P(zv)) == SUCCESS) { + zval_ptr_dtor(zv); + ZVAL_COPY_VALUE(zv, &number_rv); + } + } +} + %} %expect 0 @@ -351,7 +391,7 @@ section_string_or_value: ; string_or_value: - expr { $$ = $1; } + expr { $$ = $1; normalize_value(&$$); } | BOOL_TRUE { $$ = $1; } | BOOL_FALSE { $$ = $1; } | NULL_NULL { $$ = $1; } @@ -412,7 +452,11 @@ constant_literal: constant_string: TC_CONSTANT { zend_ini_get_constant(&$$, &$1); } | TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ } - | TC_NUMBER { $$ = $1; /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ } + | TC_NUMBER { + $$ = $1; + Z_EXTRA($$) = INI_ZVAL_IS_NUMBER; + /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ + } | TC_STRING { $$ = $1; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ } | TC_WHITESPACE { $$ = $1; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ } ; diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 6e6ffc7bbb78c..534b0e938d34f 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -151,26 +151,6 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals; return type; \ } -static inline zend_result convert_to_number(zval *retval, const char *str, const int str_len) -{ - uint8_t type; - int overflow; - zend_long lval; - double dval; - - if ((type = is_numeric_string_ex(str, str_len, &lval, &dval, 0, &overflow, NULL)) != 0) { - if (type == IS_LONG) { - ZVAL_LONG(retval, lval); - return SUCCESS; - } else if (type == IS_DOUBLE && !overflow) { - ZVAL_DOUBLE(retval, dval); - return SUCCESS; - } - } - - return FAILURE; -} - static void zend_ini_copy_typed_value(zval *retval, const int type, const char *str, int len) { switch (type) { @@ -183,11 +163,6 @@ static void zend_ini_copy_typed_value(zval *retval, const int type, const char * ZVAL_NULL(retval); break; - case TC_NUMBER: - if (convert_to_number(retval, str, len) == SUCCESS) { - break; - } - ZEND_FALLTHROUGH; default: zend_ini_copy_value(retval, str, len); } diff --git a/ext/standard/tests/general_functions/bug70157.phpt b/ext/standard/tests/general_functions/bug70157.phpt index f593682051d0a..815ccdcf966f2 100644 --- a/ext/standard/tests/general_functions/bug70157.phpt +++ b/ext/standard/tests/general_functions/bug70157.phpt @@ -21,7 +21,7 @@ array(%d) { ["foo"]=> array(%d) { [123]=> - string(%d) "24575" + int(24575) [456]=> int(123) } diff --git a/ext/standard/tests/general_functions/bug77844.phpt b/ext/standard/tests/general_functions/bug77844.phpt index a8b6bf3d0dd02..608ea865b82e5 100644 --- a/ext/standard/tests/general_functions/bug77844.phpt +++ b/ext/standard/tests/general_functions/bug77844.phpt @@ -13,7 +13,7 @@ var_dump(parse_ini_string($ini, true, INI_SCANNER_TYPED)); --EXPECT-- array(2) { ["val1"]=> - string(1) "2" + int(2) ["val2"]=> - string(1) "2" + int(2) } diff --git a/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt b/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt index 359e9c34466a3..74d28718a038f 100644 --- a/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt +++ b/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt @@ -21,7 +21,7 @@ array(1) { ["foo"]=> array(1) { ["bar"]=> - string(1) "1" + int(1) } } array(1) { @@ -42,6 +42,6 @@ array(1) { ["foo"]=> array(1) { ["bar"]=> - string(2) "42" + int(42) } } diff --git a/ext/standard/tests/gh11010.phpt b/ext/standard/tests/gh11010.phpt new file mode 100644 index 0000000000000..cde4be52a66b5 --- /dev/null +++ b/ext/standard/tests/gh11010.phpt @@ -0,0 +1,9 @@ +--TEST-- +GH-11010: Preserve ini formatting of concatenated numbers +--FILE-- + +--EXPECT-- +string(9) "-00 20 30" From 450fcc4c9b4e700e2bba39ec24a975a68919aad6 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 11 Apr 2023 22:17:47 +0200 Subject: [PATCH 813/895] [ci skip] UPDATE NEWS ElliotNB helped me a lot debugging this by constantly testing the patches. It is only fair that he is mentioned too, as I couldn't have solved it without his help. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 41acc3f4d15b3..5b74dae32335b 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,7 @@ PHP NEWS . Fixed bug GH-10085 (Assertion when adding two arrays with += where the first array is contained in the second). (ilutov) . Fixed bug GH-10737 (PHP 8.1.16 segfaults on line 597 of - sapi/apache2handler/sapi_apache2.c). (nielsdos) + sapi/apache2handler/sapi_apache2.c). (nielsdos, ElliotNB) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). From aae20cd119c1567b9840ff8e3636df11f381c8b1 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 12 Apr 2023 17:05:03 +0100 Subject: [PATCH 814/895] ext/phar: Fix recently introduced potential NULL dereferencement segfaults (#11065) --- ext/phar/func_interceptors.c | 10 +++++----- ext/phar/phar.c | 10 +++++----- ext/phar/phar_object.c | 19 ++++++++++++++++--- ext/phar/util.c | 4 ++++ 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 7ab3a646b4e09..c52ee805b2b12 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -47,7 +47,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */ /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - if (!zend_string_starts_with_literal_ci(fname, "phar://")) { + if (!fname || !zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } @@ -96,7 +96,7 @@ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - if (!zend_string_starts_with_literal_ci(fname, "phar://")) { + if (!fname || !zend_string_starts_with_literal_ci(fname, "phar://")) { return NULL; } @@ -497,7 +497,7 @@ static void phar_file_stat(const char *filename, size_t filename_length, int typ /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - if (!zend_string_starts_with_literal_ci(fname, "phar://")) { + if (!fname || !zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } @@ -748,7 +748,7 @@ PHAR_FUNC(phar_is_file) /* {{{ */ /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - if (!zend_string_starts_with_literal_ci(fname, "phar://")) { + if (!fname || !zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } @@ -814,7 +814,7 @@ PHAR_FUNC(phar_is_link) /* {{{ */ /* we are checking for existence of a file within the relative path. Chances are good that this is retrieving something from within the phar archive */ - if (!zend_string_starts_with_literal_ci(fname, "phar://")) { + if (!fname || !zend_string_starts_with_literal_ci(fname, "phar://")) { goto skip_phar; } diff --git a/ext/phar/phar.c b/ext/phar/phar.c index dafe73dded717..c4eed6b60e2c5 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2324,17 +2324,17 @@ int phar_open_executed_filename(char *alias, size_t alias_len, char **error) /* zend_string *fname = zend_get_executed_filename_ex(); - if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, alias_len, 0, REPORT_ERRORS, NULL, 0) == SUCCESS) { - return SUCCESS; - } - - if (zend_string_equals_literal(fname, "[no active file]")) { + if (!fname) { if (error) { spprintf(error, 0, "cannot initialize a phar outside of PHP execution"); } return FAILURE; } + if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, alias_len, 0, REPORT_ERRORS, NULL, 0) == SUCCESS) { + return SUCCESS; + } + if (0 == zend_get_constant_str("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) { if (error) { spprintf(error, 0, "__HALT_COMPILER(); must be declared in a phar"); diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index ca581d5631495..b009c0347ce60 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -402,6 +402,9 @@ PHP_METHOD(Phar, running) } fname = zend_get_executed_filename_ex(); + if (!fname) { + RETURN_EMPTY_STRING(); + } if ( zend_string_starts_with_literal_ci(fname, "phar://") @@ -445,8 +448,13 @@ PHP_METHOD(Phar, mount) } zend_string *zend_file_name = zend_get_executed_filename_ex(); - fname = ZSTR_VAL(zend_file_name); - fname_len = ZSTR_LEN(zend_file_name); + if (UNEXPECTED(!zend_file_name)) { + fname = ""; + fname_len = 0; + } else { + fname = ZSTR_VAL(zend_file_name); + fname_len = ZSTR_LEN(zend_file_name); + } #ifdef PHP_WIN32 save_fname = fname; @@ -577,6 +585,10 @@ PHP_METHOD(Phar, webPhar) } zend_string *zend_file_name = zend_get_executed_filename_ex(); + if (UNEXPECTED(!zend_file_name)) { + return; + } + fname = ZSTR_VAL(zend_file_name); fname_len = ZSTR_LEN(zend_file_name); @@ -1298,7 +1310,8 @@ PHP_METHOD(Phar, unlinkArchive) zend_string *zend_file_name = zend_get_executed_filename_ex(); if ( - zend_string_starts_with_literal_ci(zend_file_name, "phar://") + zend_file_name + && zend_string_starts_with_literal_ci(zend_file_name, "phar://") && SUCCESS == phar_split_fname(ZSTR_VAL(zend_file_name), ZSTR_LEN(zend_file_name), &arch, &arch_len, &entry, &entry_len, 2, 0) ) { if (arch_len == fname_len && !memcmp(arch, fname, arch_len)) { diff --git a/ext/phar/util.c b/ext/phar/util.c index 8b82ed6ecbad8..50a2e7a662723 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -257,6 +257,10 @@ zend_string *phar_find_in_include_path(zend_string *filename, phar_archive_data } zend_string *fname = zend_get_executed_filename_ex(); + if (!fname) { + return NULL; + } + bool is_file_a_phar_wrapper = zend_string_starts_with_literal_ci(fname, "phar://"); size_t length_phar_protocol = strlen("phar://"); From 6ebd08bb336ed70b8d2e057ac087b9ead0e6950d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 12 Apr 2023 19:14:54 +0200 Subject: [PATCH 815/895] Optimize HT_HASH_RESET (#11059) Commit d835de19931d added support for AVX2 in hash table initialization code. The same kind of code also occurs for HT_HASH_RESET. However, this place was forgotten in that patch. That is unfortunate, because a loop is just when there may be the most benefit from this SIMD sequence. Furthermore, the NEON special handling exists in the initialization code but is also missing from HT_HASH_RESET, so add this as well. --- Zend/zend_types.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 0372a523f6de3..3f84781b66d3e 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -31,6 +31,12 @@ # include # include #endif +#if defined(__AVX2__) +# include +#endif +#if defined(__aarch64__) || defined(_M_ARM64) +# include +#endif #ifdef WORDS_BIGENDIAN # define ZEND_ENDIAN_LOHI(lo, hi) hi; lo; @@ -460,7 +466,21 @@ struct _zend_array { HT_PACKED_SIZE_EX((ht)->nTableSize, (ht)->nTableMask) #define HT_PACKED_USED_SIZE(ht) \ (HT_HASH_SIZE((ht)->nTableMask) + ((size_t)(ht)->nNumUsed * sizeof(zval))) -#ifdef __SSE2__ +#if defined(__AVX2__) +# define HT_HASH_RESET(ht) do { \ + char *p = (char*)&HT_HASH(ht, (ht)->nTableMask); \ + size_t size = HT_HASH_SIZE((ht)->nTableMask); \ + __m256i ymm0 = _mm256_setzero_si256(); \ + ymm0 = _mm256_cmpeq_epi64(ymm0, ymm0); \ + ZEND_ASSERT(size >= 64 && ((size & 0x3f) == 0)); \ + do { \ + _mm256_storeu_si256((__m256i*)p, ymm0); \ + _mm256_storeu_si256((__m256i*)(p+32), ymm0); \ + p += 64; \ + size -= 64; \ + } while (size != 0); \ + } while (0) +#elif defined(__SSE2__) # define HT_HASH_RESET(ht) do { \ char *p = (char*)&HT_HASH(ht, (ht)->nTableMask); \ size_t size = HT_HASH_SIZE((ht)->nTableMask); \ @@ -476,6 +496,21 @@ struct _zend_array { size -= 64; \ } while (size != 0); \ } while (0) +#elif defined(__aarch64__) || defined(_M_ARM64) +# define HT_HASH_RESET(ht) do { \ + char *p = (char*)&HT_HASH(ht, (ht)->nTableMask); \ + size_t size = HT_HASH_SIZE((ht)->nTableMask); \ + int32x4_t t = vdupq_n_s32(-1); \ + ZEND_ASSERT(size >= 64 && ((size & 0x3f) == 0)); \ + do { \ + vst1q_s32((int32_t*)p, t); \ + vst1q_s32((int32_t*)(p+16), t); \ + vst1q_s32((int32_t*)(p+32), t); \ + vst1q_s32((int32_t*)(p+48), t); \ + p += 64; \ + size -= 64; \ + } while (size != 0); \ + } while (0) #else # define HT_HASH_RESET(ht) \ memset(&HT_HASH(ht, (ht)->nTableMask), HT_INVALID_IDX, HT_HASH_SIZE((ht)->nTableMask)) From 6df7557e430db1ceec883d5a2c61076c2bebb8f5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 3 Apr 2023 01:14:29 +0200 Subject: [PATCH 816/895] mb_parse_str, mb_http_input, and mb_convert_variables use fast text conversion code for automatic encoding detection For mb_parse_str, when mbstring.http_input (INI parameter) is a list of multiple possible text encodings (which is not the case by default), this new implementation is about 25% faster. When mbstring.http_input is a single value, then nothing is changed. (No automatic encoding detection is done in that case.) --- ext/mbstring/libmbfl/mbfl/mbfilter.c | 147 --------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 22 -- ext/mbstring/mb_gpc.c | 19 +- ext/mbstring/mbstring.c | 308 ++++++++++-------- ext/mbstring/mbstring.h | 2 + ext/mbstring/tests/mb_convert_variables.phpt | 22 +- ext/mbstring/tests/mb_detect_encoding.phpt | 12 + .../tests/mb_http_input_multi_post.phpt | 42 +++ ext/mbstring/tests/mb_parse_str_multi.phpt | 16 +- 9 files changed, 260 insertions(+), 330 deletions(-) create mode 100644 ext/mbstring/tests/mb_http_input_multi_post.phpt diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 9e7402cfcc2e9..1c30c9f417755 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -93,153 +93,6 @@ #include "filters/mbfilter_singlebyte.h" #include "filters/mbfilter_utf8.h" -#include "rare_cp_bitvec.h" - -/* - * encoding detector - */ -static int mbfl_estimate_encoding_likelihood(int input_cp, void *void_data) -{ - mbfl_encoding_detector_data *data = void_data; - unsigned int c = input_cp; - - /* Receive wchars decoded from input string using candidate encoding. - * If the string was invalid in the candidate encoding, we assume - * it's the wrong one. Otherwise, give the candidate many 'demerits' - * for each 'rare' codepoint found, a smaller number for each ASCII - * punctuation character, and 1 for all other codepoints. - * - * The 'common' codepoints should cover the vast majority of - * codepoints we are likely to see in practice, while only covering - * a small minority of the entire Unicode encoding space. Why? - * Well, if the test string happens to be valid in an incorrect - * candidate encoding, the bogus codepoints which it decodes to will - * be more or less random. By treating the majority of codepoints as - * 'rare', we ensure that in almost all such cases, the bogus - * codepoints will include plenty of 'rares', thus giving the - * incorrect candidate encoding lots of demerits. See - * common_codepoints.txt for the actual list used. - * - * So, why give extra demerits for ASCII punctuation characters? It's - * because there are some text encodings, like UTF-7, HZ, and ISO-2022, - * which deliberately only use bytes in the ASCII range. When - * misinterpreted as ASCII/UTF-8, strings in these encodings will - * have an unusually high number of ASCII punctuation characters. - * So giving extra demerits for such characters will improve - * detection accuracy for UTF-7 and similar encodings. - * - * Finally, why 1 demerit for all other characters? That penalizes - * long strings, meaning we will tend to choose a candidate encoding - * in which the test string decodes to a smaller number of - * codepoints. That prevents single-byte encodings in which almost - * every possible input byte decodes to a 'common' codepoint from - * being favored too much. */ - if (c == MBFL_BAD_INPUT) { - data->num_illegalchars++; - } else if (c > 0xFFFF) { - data->score += 40; - } else if (c >= 0x21 && c <= 0x2F) { - data->score += 6; - } else if ((rare_codepoint_bitvec[c >> 5] >> (c & 0x1F)) & 1) { - data->score += 30; - } else { - data->score += 1; - } - return 0; -} - -mbfl_encoding_detector *mbfl_encoding_detector_new(const mbfl_encoding **elist, int elistsz, int strict) -{ - if (!elistsz) { - return NULL; - } - - mbfl_encoding_detector *identd = emalloc(sizeof(mbfl_encoding_detector)); - identd->filter_list = ecalloc(elistsz, sizeof(mbfl_convert_filter*)); - identd->filter_data = ecalloc(elistsz, sizeof(mbfl_encoding_detector_data)); - - int filter_list_size = 0; - for (int i = 0; i < elistsz; i++) { - mbfl_convert_filter *filter = mbfl_convert_filter_new(elist[i], &mbfl_encoding_wchar, - mbfl_estimate_encoding_likelihood, NULL, &identd->filter_data[filter_list_size]); - if (filter) { - identd->filter_list[filter_list_size++] = filter; - } - } - identd->filter_list_size = filter_list_size; - identd->strict = strict; - return identd; -} - -void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd) -{ - for (int i = 0; i < identd->filter_list_size; i++) { - mbfl_convert_filter_delete(identd->filter_list[i]); - } - efree(identd->filter_list); - efree(identd->filter_data); - efree(identd); -} - -int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string) -{ - int num = identd->filter_list_size; - size_t n = string->len; - unsigned char *p = string->val; - int bad = 0; - - if (identd->strict) { - for (int i = 0; i < num; i++) { - mbfl_convert_filter *filter = identd->filter_list[i]; - mbfl_encoding_detector_data *data = &identd->filter_data[i]; - if (filter->from->check != NULL && !(filter->from->check)(p, n)) { - data->num_illegalchars++; - } - } - } - - while (n--) { - for (int i = 0; i < num; i++) { - mbfl_convert_filter *filter = identd->filter_list[i]; - mbfl_encoding_detector_data *data = &identd->filter_data[i]; - if (!data->num_illegalchars) { - (*filter->filter_function)(*p, filter); - if (data->num_illegalchars) { - bad++; - } - } - } - if ((num - 1) <= bad && !identd->strict) { - return 1; - } - p++; - } - - for (int i = 0; i < num; i++) { - mbfl_convert_filter *filter = identd->filter_list[i]; - (filter->filter_flush)(filter); - } - - return 0; -} - -const mbfl_encoding *mbfl_encoding_detector_judge(mbfl_encoding_detector *identd) -{ - size_t best_score = SIZE_MAX; /* Low score is 'better' */ - const mbfl_encoding *enc = NULL; - - for (int i = 0; i < identd->filter_list_size; i++) { - mbfl_convert_filter *filter = identd->filter_list[i]; - mbfl_encoding_detector_data *data = &identd->filter_data[i]; - if (!data->num_illegalchars && data->score < best_score) { - enc = filter->from; - best_score = data->score; - } - } - - return enc; -} - /* * strcut */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 5f23c2b98c0ba..786bab677916f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -125,28 +125,6 @@ #define MIN(a,b) ((a)<(b)?(a):(b)) #endif -/* - * encoding detector - */ -typedef struct _mbfl_encoding_detector mbfl_encoding_detector; - -typedef struct { - size_t num_illegalchars; - size_t score; -} mbfl_encoding_detector_data; - -struct _mbfl_encoding_detector { - mbfl_convert_filter **filter_list; - mbfl_encoding_detector_data *filter_data; - int filter_list_size; - int strict; -}; - -MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(const mbfl_encoding **elist, int elistsz, int strict); -MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); -MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); -MBFLAPI extern const mbfl_encoding *mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); - /* Lengths -1 through -16 are reserved for error return values */ static inline int mbfl_is_error(size_t len) { return len >= (size_t) -16; diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 99a8ff903a1e4..1ffe0af56bc7e 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -177,7 +177,6 @@ const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_i size_t n, num = 1, *len_list = NULL; size_t new_val_len; const mbfl_encoding *from_encoding = NULL; - mbfl_encoding_detector *identd = NULL; if (!res || *res == '\0') { goto out; @@ -235,23 +234,7 @@ const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_i } else if (info->num_from_encodings == 1) { from_encoding = info->from_encodings[0]; } else { - /* auto detect */ - from_encoding = NULL; - identd = mbfl_encoding_detector_new(info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection)); - if (identd != NULL) { - n = 0; - while (n < num) { - mbfl_string string; - string.val = (unsigned char *)val_list[n]; - string.len = len_list[n]; - if (mbfl_encoding_detector_feed(identd, &string)) { - break; - } - n++; - } - from_encoding = mbfl_encoding_detector_judge(identd); - mbfl_encoding_detector_delete(identd); - } + from_encoding = mb_guess_encoding_for_strings((const unsigned char**)val_list, len_list, num, info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection)); if (!from_encoding) { if (info->report_errors) { php_error_docref(NULL, E_WARNING, "Unable to detect encoding"); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 80b1799655113..7172656d736d8 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2938,7 +2938,7 @@ static const mbfl_encoding **duplicate_elist(const mbfl_encoding **elist, size_t return new_elist; } -static unsigned int mb_estimate_encoding_demerits(uint32_t w) +static unsigned int estimate_demerits(uint32_t w) { /* Receive wchars decoded from input string using candidate encoding. * Give the candidate many 'demerits' for each 'rare' codepoint found, @@ -2982,84 +2982,81 @@ static unsigned int mb_estimate_encoding_demerits(uint32_t w) return 0; } -/* When doing 'strict' detection, any string which is invalid in the candidate encoding - * is rejected. With non-strict detection, we just continue, but apply demerits for - * each invalid byte sequence */ -static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding **elist, unsigned int elist_size, bool strict) +struct candidate { + const mbfl_encoding *enc; + const unsigned char *in; + size_t in_len; + uint64_t demerits; /* Wide bit size to prevent overflow */ + unsigned int state; +}; + +static size_t init_candidate_array(struct candidate *array, size_t length, const mbfl_encoding **encodings, const unsigned char **in, size_t *in_len, size_t n, bool strict) { - if (elist_size == 0) { - return NULL; - } - if (elist_size == 1) { - if (strict) { - return php_mb_check_encoding((const char*)in, in_len, *elist) ? *elist : NULL; - } else { - return *elist; + size_t j = 0; + + for (size_t i = 0; i < length; i++) { + const mbfl_encoding *enc = encodings[i]; + + /* If any candidate encodings have specialized validation functions, use them + * to eliminate as many candidates as possible */ + if (strict && enc->check != NULL) { + for (size_t k = 0; k < n; k++) { + if (!enc->check((unsigned char*)in[k], in_len[k])) { + goto skip_to_next; + } + } } - } - if (in_len == 0) { - return *elist; + + array[j].enc = enc; + array[j].state = 0; + array[j].demerits = 0; + j++; +skip_to_next: ; } - uint32_t wchar_buf[128]; - struct conversion_data { - const mbfl_encoding *enc; - unsigned char *in; - size_t in_len; - uint64_t demerits; /* Wide bit size to prevent overflow */ - unsigned int state; - }; - /* Allocate on stack; when we return, this array is automatically freed */ - struct conversion_data *data = alloca(elist_size * sizeof(struct conversion_data)); + return j; +} + +static void start_string(struct candidate *array, size_t length, const unsigned char *in, size_t in_len) +{ + for (size_t i = 0; i < length; i++) { + const mbfl_encoding *enc = array[i].enc; - for (unsigned int i = 0; i < elist_size; i++) { - data[i].enc = elist[i]; - data[i].in = in; - data[i].in_len = in_len; - data[i].state = 0; - data[i].demerits = 0; + array[i].in = in; + array[i].in_len = in_len; /* Skip byte order mark for UTF-8, UTF-16BE, or UTF-16LE */ - if (elist[i] == &mbfl_encoding_utf8) { + if (enc == &mbfl_encoding_utf8) { if (in_len >= 3 && in[0] == 0xEF && in[1] == 0xBB && in[2] == 0xBF) { - data[i].in_len -= 3; - data[i].in += 3; + array[i].in_len -= 3; + array[i].in += 3; } - } else if (elist[i] == &mbfl_encoding_utf16be) { + } else if (enc == &mbfl_encoding_utf16be) { if (in_len >= 2 && in[0] == 0xFE && in[1] == 0xFF) { - data[i].in_len -= 2; - data[i].in += 2; + array[i].in_len -= 2; + array[i].in += 2; } - } else if (elist[i] == &mbfl_encoding_utf16le) { + } else if (enc == &mbfl_encoding_utf16le) { if (in_len >= 2 && in[0] == 0xFF && in[1] == 0xFE) { - data[i].in_len -= 2; - data[i].in += 2; - } - } - } - - /* If any candidate encodings have specialized validation functions, use them - * to eliminate as many candidates as possible */ - if (strict) { - for (unsigned int i = 0; i < elist_size; i++) { - const mbfl_encoding *enc = data[i].enc; - if (enc->check != NULL && !enc->check(in, in_len)) { - elist_size--; - memmove(&data[i], &data[i+1], (elist_size - i) * sizeof(struct conversion_data)); - i--; + array[i].in_len -= 2; + array[i].in += 2; } } } +} +static size_t count_demerits(struct candidate *array, size_t length, bool strict) +{ + uint32_t wchar_buf[128]; unsigned int finished = 0; /* For how many candidate encodings have we processed all the input? */ - while (elist_size > 1 && finished < elist_size) { - unsigned int i = 0; + + while ((strict || length > 1) && finished < length) { + for (size_t i = 0; i < length; i++) { try_next_encoding: - while (i < elist_size) { /* Do we still have more input to process for this candidate encoding? */ - if (data[i].in_len) { - const mbfl_encoding *enc = data[i].enc; - size_t out_len = enc->to_wchar(&data[i].in, &data[i].in_len, wchar_buf, 128, &data[i].state); + if (array[i].in_len) { + const mbfl_encoding *enc = array[i].enc; + size_t out_len = enc->to_wchar((unsigned char**)&array[i].in, &array[i].in_len, wchar_buf, 128, &array[i].state); ZEND_ASSERT(out_len <= 128); /* Check this batch of decoded codepoints; are there any error markers? * Also sum up the number of demerits */ @@ -3068,55 +3065,77 @@ static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, if (w == MBFL_BAD_INPUT) { if (strict) { /* This candidate encoding is not valid, eliminate it from consideration */ - elist_size--; - memmove(&data[i], &data[i+1], (elist_size - i) * sizeof(struct conversion_data)); + length--; + if (length == 0) { + return 0; + } + memmove(&array[i], &array[i+1], (length - i) * sizeof(struct candidate)); goto try_next_encoding; } else { - data[i].demerits += 1000; + array[i].demerits += 1000; } } else { - data[i].demerits += mb_estimate_encoding_demerits(w); + array[i].demerits += estimate_demerits(w); } } - if (data[i].in_len == 0) { + if (array[i].in_len == 0) { finished++; } } - i++; } } - if (strict) { + return length; +} + +MBSTRING_API const mbfl_encoding* mb_guess_encoding_for_strings(const unsigned char **strings, size_t *str_lengths, size_t n, const mbfl_encoding **elist, unsigned int elist_size, bool strict) +{ + if (elist_size == 0) { + return NULL; + } + if (elist_size == 1) { + if (strict) { + while (n--) { + if (!php_mb_check_encoding((const char*)strings[n], str_lengths[n], *elist)) { + return NULL; + } + } + } + return *elist; + } + if (n == 1 && *str_lengths == 0) { + return *elist; + } + + /* Allocate on stack; when we return, this array is automatically freed */ + struct candidate *array = alloca(elist_size * sizeof(struct candidate)); + elist_size = init_candidate_array(array, elist_size, elist, strings, str_lengths, n, strict); + + while (n--) { + start_string(array, elist_size, strings[n], str_lengths[n]); + elist_size = count_demerits(array, elist_size, strict); if (elist_size == 0) { /* All candidates were eliminated */ return NULL; } - /* The above loop might have broken because there was only 1 candidate encoding left - * If in strict mode, we still need to process any remaining input for that candidate */ - if (elist_size == 1 && data[0].in_len) { - const mbfl_encoding *enc = data[0].enc; - unsigned char *in = data[0].in; - size_t in_len = data[0].in_len; - unsigned int state = data[0].state; - while (in_len) { - size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); - while (out_len) { - if (wchar_buf[--out_len] == MBFL_BAD_INPUT) { - return NULL; - } - } - } - } } /* See which remaining candidate encoding has the least demerits */ unsigned int best = 0; for (unsigned int i = 1; i < elist_size; i++) { - if (data[i].demerits < data[best].demerits) { + if (array[i].demerits < array[best].demerits) { best = i; } } - return data[best].enc; + return array[best].enc; +} + +/* When doing 'strict' detection, any string which is invalid in the candidate encoding + * is rejected. With non-strict detection, we just continue, but apply demerits for + * each invalid byte sequence */ +static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding **elist, unsigned int elist_size, bool strict) +{ + return mb_guess_encoding_for_strings((const unsigned char**)&in, &in_len, 1, elist, elist_size, strict); } /* {{{ Encodings of the given string is returned (as a string) */ @@ -3382,41 +3401,62 @@ PHP_FUNCTION(mb_convert_kana) RETVAL_STR(jp_kana_convert(str, enc, opt)); } -static int mb_recursive_encoder_detector_feed(mbfl_encoding_detector *identd, zval *var, bool *recursion_error) /* {{{ */ +static unsigned int mb_recursive_count_strings(zval *var) { - mbfl_string string; - HashTable *ht; - zval *entry; - + unsigned int count = 0; ZVAL_DEREF(var); + if (Z_TYPE_P(var) == IS_STRING) { - string.val = (unsigned char *)Z_STRVAL_P(var); - string.len = Z_STRLEN_P(var); - if (mbfl_encoding_detector_feed(identd, &string)) { - return 1; /* complete detecting */ + count++; + } else if (Z_TYPE_P(var) == IS_ARRAY || Z_TYPE_P(var) == IS_OBJECT) { + if (Z_REFCOUNTED_P(var)) { + if (Z_IS_RECURSIVE_P(var)) { + return count; + } + Z_PROTECT_RECURSION_P(var); + } + + HashTable *ht = HASH_OF(var); + if (ht != NULL) { + zval *entry; + ZEND_HASH_FOREACH_VAL_IND(ht, entry) { + count += mb_recursive_count_strings(entry); + } ZEND_HASH_FOREACH_END(); } + + if (Z_REFCOUNTED_P(var)) { + Z_UNPROTECT_RECURSION_P(var); + } + } + + return count; +} + +static bool mb_recursive_find_strings(zval *var, const unsigned char **val_list, size_t *len_list, unsigned int *count) +{ + ZVAL_DEREF(var); + + if (Z_TYPE_P(var) == IS_STRING) { + val_list[*count] = (const unsigned char*)Z_STRVAL_P(var); + len_list[*count] = Z_STRLEN_P(var); + (*count)++; } else if (Z_TYPE_P(var) == IS_ARRAY || Z_TYPE_P(var) == IS_OBJECT) { if (Z_REFCOUNTED_P(var)) { if (Z_IS_RECURSIVE_P(var)) { - *recursion_error = true; - return 0; + return true; } Z_PROTECT_RECURSION_P(var); } - ht = HASH_OF(var); + HashTable *ht = HASH_OF(var); if (ht != NULL) { + zval *entry; ZEND_HASH_FOREACH_VAL_IND(ht, entry) { - if (mb_recursive_encoder_detector_feed(identd, entry, recursion_error)) { + if (mb_recursive_find_strings(entry, val_list, len_list, count)) { if (Z_REFCOUNTED_P(var)) { Z_UNPROTECT_RECURSION_P(var); + return true; } - return 1; - } else if (*recursion_error) { - if (Z_REFCOUNTED_P(var)) { - Z_UNPROTECT_RECURSION_P(var); - } - return 0; } } ZEND_HASH_FOREACH_END(); } @@ -3425,12 +3465,12 @@ static int mb_recursive_encoder_detector_feed(mbfl_encoding_detector *identd, zv Z_UNPROTECT_RECURSION_P(var); } } - return 0; -} /* }}} */ + + return false; +} static bool mb_recursive_convert_variable(zval *var, const mbfl_encoding* from_encoding, const mbfl_encoding* to_encoding) { - HashTable *ht; zval *entry, *orig_var; orig_var = var; @@ -3451,7 +3491,7 @@ static bool mb_recursive_convert_variable(zval *var, const mbfl_encoding* from_e Z_PROTECT_RECURSION_P(var); } - ht = HASH_OF(var); + HashTable *ht = HASH_OF(var); if (ht != NULL) { ZEND_HASH_FOREACH_VAL_IND(ht, entry) { if (mb_recursive_convert_variable(entry, from_encoding, to_encoding)) { @@ -3471,7 +3511,6 @@ static bool mb_recursive_convert_variable(zval *var, const mbfl_encoding* from_e return false; } -/* {{{ Converts the string resource in variables to desired encoding */ PHP_FUNCTION(mb_convert_variables) { zval *args; @@ -3479,11 +3518,9 @@ PHP_FUNCTION(mb_convert_variables) zend_string *from_enc_str; HashTable *from_enc_ht; const mbfl_encoding *from_encoding, *to_encoding; - mbfl_encoding_detector *identd; - int n, argc; + uint32_t argc; size_t elistsz; const mbfl_encoding **elist; - bool recursion_error = false; ZEND_PARSE_PARAMETERS_START(3, -1) Z_PARAM_STR(to_enc_str) @@ -3520,54 +3557,49 @@ PHP_FUNCTION(mb_convert_variables) from_encoding = *elist; } else { /* auto detect */ - from_encoding = NULL; - identd = mbfl_encoding_detector_new(elist, elistsz, MBSTRG(strict_detection)); - if (identd != NULL) { - n = 0; - while (n < argc) { - if (mb_recursive_encoder_detector_feed(identd, &args[n], &recursion_error)) { - break; - } - n++; - } - from_encoding = mbfl_encoding_detector_judge(identd); - mbfl_encoding_detector_delete(identd); - if (recursion_error) { + unsigned int num = 0; + for (size_t n = 0; n < argc; n++) { + zval *zv = &args[n]; + num += mb_recursive_count_strings(zv); + } + const unsigned char **val_list = (const unsigned char**)ecalloc(num, sizeof(char *)); + size_t *len_list = (size_t*)ecalloc(num, sizeof(size_t)); + unsigned int i = 0; + for (size_t n = 0; n < argc; n++) { + zval *zv = &args[n]; + if (mb_recursive_find_strings(zv, val_list, len_list, &i)) { efree(ZEND_VOIDP(elist)); + efree(ZEND_VOIDP(val_list)); + efree(len_list); php_error_docref(NULL, E_WARNING, "Cannot handle recursive references"); RETURN_FALSE; } } - + from_encoding = mb_guess_encoding_for_strings(val_list, len_list, num, elist, elistsz, MBSTRG(strict_detection)); + efree(ZEND_VOIDP(val_list)); + efree(len_list); if (!from_encoding) { php_error_docref(NULL, E_WARNING, "Unable to detect encoding"); efree(ZEND_VOIDP(elist)); RETURN_FALSE; } + } efree(ZEND_VOIDP(elist)); /* convert */ - n = 0; - while (n < argc) { + for (size_t n = 0; n < argc; n++) { zval *zv = &args[n]; ZVAL_DEREF(zv); - recursion_error = mb_recursive_convert_variable(zv, from_encoding, to_encoding); - if (recursion_error) { - break; + if (mb_recursive_convert_variable(zv, from_encoding, to_encoding)) { + php_error_docref(NULL, E_WARNING, "Cannot handle recursive references"); + RETURN_FALSE; } - n++; - } - - if (recursion_error) { - php_error_docref(NULL, E_WARNING, "Cannot handle recursive references"); - RETURN_FALSE; } RETURN_STRING(from_encoding->name); } -/* }}} */ /* HTML numeric entities */ diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 83952a1d7ed2b..0837e45cf327a 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -67,6 +67,8 @@ MBSTRING_API size_t php_mb_mbchar_bytes(const char *s, const mbfl_encoding *enc) MBSTRING_API size_t php_mb_stripos(bool mode, zend_string *haystack, zend_string *needle, zend_long offset, const mbfl_encoding *enc); MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const mbfl_encoding *encoding); +MBSTRING_API const mbfl_encoding* mb_guess_encoding_for_strings(const unsigned char **strings, size_t *str_lengths, size_t n, const mbfl_encoding **elist, unsigned int elist_size, bool strict); + ZEND_BEGIN_MODULE_GLOBALS(mbstring) char *internal_encoding_name; const mbfl_encoding *internal_encoding; diff --git a/ext/mbstring/tests/mb_convert_variables.phpt b/ext/mbstring/tests/mb_convert_variables.phpt index 1190e78a05b86..2eb45946b5e8f 100644 --- a/ext/mbstring/tests/mb_convert_variables.phpt +++ b/ext/mbstring/tests/mb_convert_variables.phpt @@ -41,7 +41,7 @@ $encoding = mb_convert_variables('JIS', 'EUC-JP', $s); print("$encoding\n"); // EUC-JP print(base64_encode($s)."\n"); // Converted to JIS (base64 encoded) -// Test for multiple slcaler +// Test for multiple scalar $s1 = $euc_jp; $s2 = $euc_jp; $s3 = $euc_jp; @@ -49,8 +49,7 @@ $encoding = mb_convert_variables('EUC-JP', 'auto', $s1, $s2, $s3); print("$encoding\n"); // EUC-JP echo bin2hex("$s1$s2$s3"), "\n"; // Converted to EUC-JP -// Note: Mixing encoding in array/object is not supported? -// Test for array +// Note: Mixing encoding in array/object is not supported echo "== ARRAY TEST ==\n"; $a = array($s3, $s2, $s1); $aa = $a; @@ -116,6 +115,7 @@ echo "== SCALAR, ARRAY AND OBJECT TEST ==\n"; $s1 = $euc_jp; $s2 = $euc_jp; $s3 = $euc_jp; +$a = array($s1, $s2, $s3); $aa = $a; $oo = $o; @@ -161,6 +161,17 @@ mb_convert_variables('UTF-16LE', 'UTF-8', $nested); echo bin2hex($nested[0]->inner), "\n"; echo "# of illegal characters detected: ", mb_get_info('illegal_chars') - $illegalCount, "\n"; +echo "== ENCODING AUTO-DETECTION TEST ==\n"; + +ini_set('mbstring.strict_detection', '1'); +$bad_utf7 = "abc + abc"; +var_dump(mb_convert_variables('UTF-8', 'UTF-7,UTF-8', $bad_utf7)); +var_dump($bad_utf7); + +$bad_utf7imap = "abc &"; +var_dump(mb_convert_variables('UTF-8', 'UTF7-IMAP,UTF-8', $bad_utf7imap)); +var_dump($bad_utf7imap); + ?> --EXPECT-- == SCALAR TEST == @@ -197,3 +208,8 @@ UTF-8 # of illegal characters detected: 1 2600 # of illegal characters detected: 1 +== ENCODING AUTO-DETECTION TEST == +string(5) "UTF-8" +string(9) "abc + abc" +string(5) "UTF-8" +string(5) "abc &" diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index f5a4c4833d7a7..544375fbd2998 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -113,6 +113,17 @@ $detected = mb_detect_encoding("\x4E\x4E\xFE\xFF\x4E\x4E", ['UTF-8', 'ISO-8859-1 if ($detected === 'UTF-16BE' || $detected === 'UTF-16LE') die("Don't accept a BOM in the middle of a string"); +echo "== CHECK FUNCTION TEST ==\n"; + +function testCheckFn($str, $encoding, $encodings) { + if (mb_check_encoding($str, $encoding)) + die("Input string " . bin2hex($str) . " should not be valid in " . $encoding); + if (mb_detect_encoding($str, $encodings, true) === $encoding) + die("mb_detect_encoding should never return " . $encoding . " for invalid input string " . bin2hex($str)); +} + +testCheckFn("abc + abc", "UTF-7", "UTF-7,UTF-8"); + echo "== TORTURE TEST ==\n"; function test($strings, $encodings) { @@ -390,5 +401,6 @@ mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "BAD" string(5) "UTF-8" string(8) "UTF-16BE" string(8) "UTF-16LE" +== CHECK FUNCTION TEST == == TORTURE TEST == Done! diff --git a/ext/mbstring/tests/mb_http_input_multi_post.phpt b/ext/mbstring/tests/mb_http_input_multi_post.phpt new file mode 100644 index 0000000000000..64185e4b23ad5 --- /dev/null +++ b/ext/mbstring/tests/mb_http_input_multi_post.phpt @@ -0,0 +1,42 @@ +--TEST-- +mb_http_input() with POST method and multiple candidate encodings +--EXTENSIONS-- +mbstring +--POST-- +a=日本語&b=ελληνικά +--INI-- +mbstring.encoding_translation=1 +input_encoding=UTF-8,SJIS,EUC-JP,ISO-8859-1 +--FILE-- + +--EXPECT-- +日本語 +ελληνικά +string(5) "UTF-8" +bool(false) +bool(false) +bool(false) +array(4) { + [0]=> + string(5) "UTF-8" + [1]=> + string(4) "SJIS" + [2]=> + string(6) "EUC-JP" + [3]=> + string(10) "ISO-8859-1" +} +string(28) "UTF-8,SJIS,EUC-JP,ISO-8859-1" diff --git a/ext/mbstring/tests/mb_parse_str_multi.phpt b/ext/mbstring/tests/mb_parse_str_multi.phpt index e971627c6660c..1efb437f4a443 100644 --- a/ext/mbstring/tests/mb_parse_str_multi.phpt +++ b/ext/mbstring/tests/mb_parse_str_multi.phpt @@ -3,7 +3,7 @@ mb_parse_str() with multiple candidate encodings --EXTENSIONS-- mbstring --INI-- -mbstring.http_input=UTF-8,SJIS,EUC-JP +mbstring.http_input=UTF-8,SJIS,EUC-JP,ISO-8859-1,ISO-2022-JP --FILE-- 616263 Query: 82a082a282a43d9356 e38182e38184e38186=>e5a4a9 +Query: 666f6f3de6266261723d972662617a3da5 +666f6f=>c3a6 +626172=>c297 +62617a=>c2a5 +Query: 611f2428403d313233 +611f242840=>313233 +Query: 6162633d611f242840 +616263=>611f242840 From 00008a861ab5efae195be19992bf4f844a55e27b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 12 Apr 2023 21:28:53 +0200 Subject: [PATCH 817/895] Remove unnecessary memory clearing in virtual_file_ex() (#10963) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I checked a simple Laravel CRUD application's home page under Callgrind and found that the line: char resolved_path[MAXPATHLEN] = {0}; took up about 0.95% of the spent instruction count. This is because when opcache revalidates the timestamps, it has to go through the function virtual_file_ex() which contains that line. That line will memset 4096 bytes on my system to all zeroes. This is bad for the data cache and for the runtime. I found that this memsetting is unnecessary in most cases, and that we can fix the one remaining case: * Lines 1020-1027 don't do anything with resolved_path, so that's okay. * Lines 1033-1098: - The !IS_ABSOLUTE_PATH branch will always result in a memcpy from path to resolved_path (+ sometimes an offset) with the total copied amount equal to path_length+1, so that includes a NUL byte. - The else branch either takes the WIN32 path or the non-WIN32 path. ° WIN32: There's a copy from path+2 with length path_length-1. Note that we chop off the first 2 bytes, so this also includes the NUL byte. ° Non-WIN32: Copies path_length+1 bytes, so that includes a NUL byte. At this point we know that resolved_path ends in a NUL byte. Going further in the code: * Lines 1100-1106 don't write to resolved_path, so no NUL byte is removed. * Lines 1108-1136: - The IS_UNC_PATH branch: ° Lines 1111-1112 don't overwrite the NUL byte, because we know the path length is at least 2 due to the IS_UNC_PATH check. ° Both while loops uppercase the path until a slash is found. If a NUL byte was found then it jumps to verify. Therefore, no NUL byte can be overwritten. Furthermore, Lines 1121 and 1129 cannot overwrite a NUL byte because the check at lines 1115 and 1123 would've jumped to verify when a NUL byte would be encountered. Therefore, the IS_UNC_PATH branch cannot overwrite a NUL byte, so the NUL byte we know we already got stays in place. - The else branch: ° We know the path length is at least 2 due to IS_ABSOLUTE_PATH. That means the earliest NUL byte can be at index 2, which can be overwritten on line 1133. We fix this by adding one byte write if the length is 2. All uses of resolved_path in lines 1139-1141 have a NUL byte at the end now. Lines 1154-1164 do a bunch of post-processing but line 1164 will make sure resolved_path still ends in a NUL byte. So therefore I propose to remove the huge memset, and add a single byte write in that one else branch I mentioned earlier. Looking at Callgrind, the instruction count before this patch for 200 requests is 14,264,569,942; and after the patch it's 14,129,358,195 (averaged over a handful of runs). --- Zend/zend_virtual_cwd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 64fc165174051..6bff2ad984d02 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -1009,7 +1009,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */ { size_t path_length = strlen(path); - char resolved_path[MAXPATHLEN] = {0}; + char resolved_path[MAXPATHLEN]; size_t start = 1; int ll = 0; time_t t; @@ -1131,6 +1131,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func /* skip DRIVE name */ resolved_path[0] = toupper(resolved_path[0]); resolved_path[2] = DEFAULT_SLASH; + if (path_length == 2) { + resolved_path[3] = '\0'; + } start = 3; } #endif From dd44a9330e7443d3b88acc8c5c24503562b5d1e8 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 12 Apr 2023 12:36:46 +0200 Subject: [PATCH 818/895] Fix test bug60120.phpt The process cmd was broken. We're now also checking that the process output is actually what we expect. Closes GH-11064 --- ext/standard/tests/file/bug60120.phpt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt index 0236e9e1ea7c7..811ac786c8e5f 100644 --- a/ext/standard/tests/file/bug60120.phpt +++ b/ext/standard/tests/file/bug60120.phpt @@ -6,6 +6,7 @@ $php = getenv('TEST_PHP_EXECUTABLE'); if (!$php) { die("skip No php executable defined\n"); } +if (PHP_OS_FAMILY === 'Windows') die('skip not for Windows'); ?> --FILE-- = $stdinLen) { fclose($writePipes[0]); @@ -58,12 +62,21 @@ while ($pipes || $writePipes) { foreach ($r as $pipe) { $type = array_search($pipe, $pipes); $data = fread($pipe, 8192); - if (false === $data || feof($pipe)) { + if (feof($pipe)) { fclose($pipe); unset($pipes[$type]); + } elseif (false === $data) { + die('Failed to read from pipe'); + } else { + $procOutput[$type] = ($procOutput[$type] ?? '') . $data; } } } +foreach ($procOutput as $output) { + if ($output !== $stdin) { + die('Output does not match input: ' . $output); + } +} echo "OK."; ?> --EXPECT-- From 4b22c3e3ad5fa7088469315cc96353da747c91f6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 13 Apr 2023 13:13:47 +0200 Subject: [PATCH 819/895] [skip ci] Skip bug45161.phpt on Windows See GH-10753 The test is insanely slow on Windows and it's unclear why. It might be a curl issue. --- ext/curl/tests/bug45161.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/curl/tests/bug45161.phpt b/ext/curl/tests/bug45161.phpt index 9ba8f5f90249c..7e67b6d741ed5 100644 --- a/ext/curl/tests/bug45161.phpt +++ b/ext/curl/tests/bug45161.phpt @@ -2,6 +2,10 @@ Bug #45161 (Reusing a curl handle leaks memory) --EXTENSIONS-- curl +--SKIPIF-- + --FILE-- Date: Wed, 12 Apr 2023 13:33:07 +0800 Subject: [PATCH 820/895] xxhash.h: Fix GCC 12 -Og Change whether to inline XXH3_hashLong_withSecret to a config option Ref: https://github.com/Cyan4973/xxHash/commit/ace22bddc7a366a5dd8a71e8b8247694530684ec Signed-off-by: Mingli Yu Closes GH-11062. --- ext/hash/xxhash/xxhash.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/ext/hash/xxhash/xxhash.h b/ext/hash/xxhash/xxhash.h index b5bd286496c73..8e816c0584ebd 100644 --- a/ext/hash/xxhash/xxhash.h +++ b/ext/hash/xxhash/xxhash.h @@ -1375,6 +1375,23 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, */ # define XXH_NO_INLINE_HINTS 0 +/*! + * @def XXH3_INLINE_SECRET + * @brief Determines whether to inline the XXH3 withSecret code. + * + * When the secret size is known, the compiler can improve the performance + * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret(). + * + * However, if the secret size is not known, it doesn't have any benefit. This + * happens when xxHash is compiled into a global symbol. Therefore, if + * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0. + * + * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers + * that are *sometimes* force inline on -Og, and it is impossible to automatically + * detect this optimization level. + */ +# define XXH3_INLINE_SECRET 0 + /*! * @def XXH32_ENDJMP * @brief Whether to use a jump for `XXH32_finalize`. @@ -1439,6 +1456,15 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, # endif #endif +#ifndef XXH3_INLINE_SECRET +# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \ + || !defined(XXH_INLINE_ALL) +# define XXH3_INLINE_SECRET 0 +# else +# define XXH3_INLINE_SECRET 1 +# endif +#endif + #ifndef XXH32_ENDJMP /* generally preferable for performance */ # define XXH32_ENDJMP 0 @@ -1515,6 +1541,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) # define XXH_NO_INLINE static #endif +#if XXH3_INLINE_SECRET +# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE +#else +# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE +#endif /* ************************************* @@ -4465,7 +4496,7 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, * so that the compiler can properly optimize the vectorized loop. * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. */ -XXH_FORCE_INLINE XXH64_hash_t +XXH3_WITH_SECRET_INLINE XXH64_hash_t XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) { @@ -5263,7 +5294,7 @@ XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, * It's important for performance to pass @secretLen (when it's static) * to the compiler, so that it can properly optimize the vectorized loop. */ -XXH_FORCE_INLINE XXH128_hash_t +XXH3_WITH_SECRET_INLINE XXH128_hash_t XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen) From 2eeff96df5ce1351486e75932680321740ad88b5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 11 Apr 2023 19:33:46 +0200 Subject: [PATCH 821/895] [skip ci] Fix Slack notification ravsamhq/notify-slack-action doesn't work on MacOS, so we use curl directly. --- .github/actions/apt-x32/action.yml | 1 + .github/actions/notify-slack/action.yml | 11 +++-------- .github/workflows/nightly.yml | 18 +++++++++--------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/actions/apt-x32/action.yml b/.github/actions/apt-x32/action.yml index 2cde60fce55b0..879300f992747 100644 --- a/.github/actions/apt-x32/action.yml +++ b/.github/actions/apt-x32/action.yml @@ -13,6 +13,7 @@ runs: apt-get install -y \ autoconf \ bison \ + curl \ g++-multilib \ gcc-multilib \ language-pack-de \ diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml index f447894a21d7a..1ff425b51c6ac 100644 --- a/.github/actions/notify-slack/action.yml +++ b/.github/actions/notify-slack/action.yml @@ -5,11 +5,6 @@ inputs: runs: using: composite steps: - - name: Notify Slack - if: always() - uses: ravsamhq/notify-slack-action@v1 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ inputs.token }} + - shell: bash + run: >- + curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ inputs.token }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ac6473ac74862..63fce11ac0225 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,7 +31,7 @@ jobs: id: set-matrix run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -110,7 +110,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -186,7 +186,7 @@ jobs: -d opcache.jit_buffer_size=16M -d opcache.jit=1205 - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -249,7 +249,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -288,7 +288,7 @@ jobs: if: always() run: bash <(curl -s https://codecov.io/bash) - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -408,7 +408,7 @@ jobs: exit 1 fi - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -484,7 +484,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -581,7 +581,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} @@ -641,7 +641,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack - if: always() + if: failure() uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} From afbc71d88d479ef54f62ddf438497e2aa725acdb Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 6 Apr 2023 19:29:34 +0200 Subject: [PATCH 822/895] Add benchmarking to CI Closes GH-11068 --- .github/workflows/push.yml | 92 +++++++++++++++++++++++++++ benchmark/.gitignore | 1 + benchmark/benchmark.php | 117 +++++++++++++++++++++++++++++++++++ benchmark/docker-compose.yml | 11 ++++ benchmark/generate_diff.php | 63 +++++++++++++++++++ benchmark/shared.php | 72 +++++++++++++++++++++ 6 files changed, 356 insertions(+) create mode 100644 benchmark/.gitignore create mode 100644 benchmark/benchmark.php create mode 100644 benchmark/docker-compose.yml create mode 100644 benchmark/generate_diff.php create mode 100644 benchmark/shared.php diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 65cdf72f3caf3..69914207cd91d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -215,3 +215,95 @@ jobs: run: .github/scripts/windows/build.bat - name: Test run: .github/scripts/windows/test.bat + BENCHMARKING: + name: BENCHMARKING + runs-on: ubuntu-22.04 + steps: + - name: git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: apt + run: | + set -x + sudo apt-get update + sudo apt-get install \ + bison \ + libonig-dev \ + libsqlite3-dev \ + openssl \ + re2c \ + valgrind + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" + append-timestamp: false + - name: ./configure + run: | + set -x + ./buildconf --force + ./configure \ + --disable-debug \ + --enable-mbstring \ + --enable-opcache \ + --enable-option-checking=fatal \ + --enable-sockets \ + --enable-werror \ + --prefix=/usr \ + --with-config-file-scan-dir=/etc/php.d \ + --with-mysqli=mysqlnd \ + --with-openssl \ + --with-pdo-sqlite \ + --with-valgrind + - name: make + run: make -j$(/usr/bin/nproc) >/dev/null + - name: make install + run: | + set -x + sudo make install + sudo mkdir -p /etc/php.d + sudo chmod 777 /etc/php.d + echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini + echo zend_extension=opcache.so >> /etc/php.d/opcache.ini + echo opcache.enable=1 >> /etc/php.d/opcache.ini + echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini + - name: Setup + run: | + git config --global user.name "Benchmark" + git config --global user.email "benchmark@php.net" + sudo service mysql start + mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress" + mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;" + mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;" + - name: git checkout benchmarking-data + uses: actions/checkout@v3 + with: + repository: php/benchmarking-data + ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }} + path: benchmark/repos/data + - name: Benchmark + run: php benchmark/benchmark.php true + - name: Store result + if: github.event_name == 'push' + run: | + set -x + cd benchmark/repos/data + git pull --autostash + if [ -e ".git/MERGE_HEAD" ]; then + echo "Merging, can't proceed" + exit 1 + fi + git add . + if git diff --cached --quiet; then + exit 0 + fi + git commit -m "Add result for ${{ github.repository }}@${{ steps.determine-commit.outputs.sha }}" + git push + - name: Show diff + if: github.event_name == 'pull_request' + run: >- + php benchmark/generate_diff.php + ${{ github.event.pull_request.head.sha }} + $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) + > $GITHUB_STEP_SUMMARY diff --git a/benchmark/.gitignore b/benchmark/.gitignore new file mode 100644 index 0000000000000..cc2bbd2422f01 --- /dev/null +++ b/benchmark/.gitignore @@ -0,0 +1 @@ +/repos diff --git a/benchmark/benchmark.php b/benchmark/benchmark.php new file mode 100644 index 0000000000000..ca79f3dc34b90 --- /dev/null +++ b/benchmark/benchmark.php @@ -0,0 +1,117 @@ +stdout; +} + +function runBench(bool $jit): array { + return runValgrindPhpCgiCommand([dirname(__DIR__) . '/Zend/bench.php'], jit: $jit); +} + +function runSymfonyDemo(bool $jit): array { + $dir = __DIR__ . '/repos/symfony-demo-2.2.3'; + cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git'); + runPhpCommand([$dir . '/bin/console', 'cache:clear']); + runPhpCommand([$dir . '/bin/console', 'cache:warmup']); + return runValgrindPhpCgiCommand([$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50); +} + +function runWordpress(bool $jit): array { + $dir = __DIR__ . '/repos/wordpress-6.2'; + cloneRepo($dir, 'https://github.com/php/benchmarking-wordpress-6.2.git'); + + /* FIXME: It might be better to use a stable version of PHP for this command because we can't + * easily alter the phar file */ + runPhpCommand([ + '-d error_reporting=0', + 'wp-cli.phar', + 'core', + 'install', + '--url=wordpress.local', + '--title="Wordpress"', + '--admin_user=wordpress', + '--admin_password=wordpress', + '--admin_email=benchmark@php.net', + ], $dir); + + // Warmup + runPhpCommand([$dir . '/index.php'], $dir); + return runValgrindPhpCgiCommand([$dir . '/index.php'], cwd: $dir, jit: $jit, warmup: 50); +} + +function runPhpCommand(array $args, ?string $cwd = null): ProcessResult { + return runCommand([PHP_BINARY, ...$args], $cwd); +} + +function runValgrindPhpCgiCommand( + array $args, + ?string $cwd = null, + bool $jit = false, + int $warmup = 0, +): array { + global $phpCgi; + $process = runCommand([ + 'valgrind', + '--tool=callgrind', + '--dump-instr=yes', + '--callgrind-out-file=/dev/null', + '--', + $phpCgi, + '-T' . ($warmup ? $warmup . ',' : '') . '1', + '-d max_execution_time=0', + '-d opcache.enable=1', + '-d opcache.jit_buffer_size=' . ($jit ? '128M' : '0'), + ...$args, + ]); + $instructions = extractInstructionsFromValgrindOutput($process->stderr); + return ['instructions' => $instructions]; +} + +function extractInstructionsFromValgrindOutput(string $output): string { + preg_match("(==[0-9]+== Events : Ir\n==[0-9]+== Collected : (?[0-9]+))", $output, $matches); + return $matches['instructions'] ?? throw new \Exception('Unexpected valgrind output'); +} + +main(); diff --git a/benchmark/docker-compose.yml b/benchmark/docker-compose.yml new file mode 100644 index 0000000000000..6d62806d355b3 --- /dev/null +++ b/benchmark/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.8" +services: + wordpress_db: + image: mysql:8.0 + ports: + - "3306:3306" + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: wordpress + MYSQL_USER: wordpress + MYSQL_PASSWORD: wordpress diff --git a/benchmark/generate_diff.php b/benchmark/generate_diff.php new file mode 100644 index 0000000000000..8ad8fcc40ef84 --- /dev/null +++ b/benchmark/generate_diff.php @@ -0,0 +1,63 @@ + $headBenchmark) { + $baseInstructions = $baseSummary[$name]['instructions'] ?? null; + $headInstructions = $headSummary[$name]['instructions']; + $output .= "| $name | " + . formatInstructions($baseInstructions) . " | " + . formatInstructions($headInstructions) . " | " + . formatDiff($baseInstructions, $headInstructions) . " |\n"; + } + return $output; +} + +function formatInstructions(?int $instructions): string { + if ($instructions === null) { + return '-'; + } + if ($instructions > 1e6) { + return sprintf('%.0fM', $instructions / 1e6); + } elseif ($instructions > 1e3) { + return sprintf('%.0fK', $instructions / 1e3); + } else { + return (string) $instructions; + } +} + +function formatDiff(?int $baseInstructions, int $headInstructions): string { + if ($baseInstructions === null) { + return '-'; + } + $instructionDiff = $headInstructions - $baseInstructions; + return sprintf('%.2f%%', $instructionDiff / $baseInstructions * 100); +} + +$headCommitHash = $argv[1] ?? null; +$baseCommitHash = $argv[2] ?? null; +$output = main($headCommitHash, $baseCommitHash); +fwrite(STDOUT, $output); diff --git a/benchmark/shared.php b/benchmark/shared.php new file mode 100644 index 0000000000000..450101770b28b --- /dev/null +++ b/benchmark/shared.php @@ -0,0 +1,72 @@ + ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; + fwrite(STDOUT, "> $cmd\n"); + $processHandle = proc_open($cmd, $descriptorSpec, $pipes, $cwd ?? getcwd(), null); + + $stdin = $pipes[0]; + $stdout = $pipes[1]; + $stderr = $pipes[2]; + + fclose($stdin); + + stream_set_blocking($stdout, false); + stream_set_blocking($stderr, false); + + $stdoutEof = false; + $stderrEof = false; + + do { + $read = [$stdout, $stderr]; + $write = null; + $except = null; + + stream_select($read, $write, $except, 1, 0); + + foreach ($read as $stream) { + $chunk = fgets($stream); + if ($stream === $stdout) { + $result->stdout .= $chunk; + } elseif ($stream === $stderr) { + $result->stderr .= $chunk; + } + } + + $stdoutEof = $stdoutEof || feof($stdout); + $stderrEof = $stderrEof || feof($stderr); + } while(!$stdoutEof || !$stderrEof); + + fclose($stdout); + fclose($stderr); + + $statusCode = proc_close($processHandle); + if ($statusCode !== 0) { + fwrite(STDOUT, $result->stdout); + fwrite(STDERR, $result->stderr); + fwrite(STDERR, 'Exited with status code ' . $statusCode . "\n"); + exit($statusCode); + } + + return $result; +} + +function cloneRepo(string $path, string $url) { + if (is_dir($path)) { + return; + } + $dir = dirname($path); + $repo = basename($path); + if (!is_dir($dir)) { + mkdir($dir, 0755, true); + } + runCommand(['git', 'clone', '-q', '--end-of-options', $url, $repo], dirname($path)); +} From d1260317288a27b5eced80a760327bccf2b14591 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 14 Apr 2023 17:06:02 +0200 Subject: [PATCH 823/895] Restrict benchmarking push to php org Otherwise the job will just fail due to missing ssh keys --- .github/workflows/push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 69914207cd91d..ad12288e58cef 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -217,6 +217,7 @@ jobs: run: .github/scripts/windows/test.bat BENCHMARKING: name: BENCHMARKING + if: github.repository_owner == 'php' || github.event_name == 'pull_request' runs-on: ubuntu-22.04 steps: - name: git checkout From 8d5e06dc947850a04be178fc2881be441c9515a5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 14 Apr 2023 17:15:36 +0200 Subject: [PATCH 824/895] Fix commit sha in commit name --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ad12288e58cef..c0e718a40ff4e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -299,7 +299,7 @@ jobs: if git diff --cached --quiet; then exit 0 fi - git commit -m "Add result for ${{ github.repository }}@${{ steps.determine-commit.outputs.sha }}" + git commit -m "Add result for ${{ github.repository }}@${{ github.event.pull_request.head.sha }}" git push - name: Show diff if: github.event_name == 'pull_request' From a0476fd32fcad28a85259eab0b19e38188695b15 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 14 Apr 2023 18:22:42 +0200 Subject: [PATCH 825/895] Micro-optimize double comparison (#11061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using ZEND_NORMALIZE_BOOL(a - b) where a and b are doubles, this generates the following instruction sequence on x64: subsd xmm0, xmm1 pxor xmm1, xmm1 comisd xmm0, xmm1 ... whereas if we use ZEND_THREEWAY_COMPARE we get two instructions less: ucomisd xmm0, xmm1 The only difference is that the threeway compare uses *u*comisd instead of comisd. The difference is that it will cause a FP signal if a signaling NAN is used, but as far as I'm aware this doesn't matter for our use case. Similarly, the amount of instructions on AArch64 is also quite a bit lower for this code compared to the old code. ** Results ** Using the benchmark https://gist.github.com/nielsdos/b36517d81a1af74d96baa3576c2b70df I used hyperfine: hyperfine --runs 25 --warmup 3 './sapi/cli/php sort_double.php' No extensions such as opcache used during benchmarking. BEFORE THIS PATCH ----------------- Time (mean ± σ): 255.5 ms ± 2.2 ms [User: 251.0 ms, System: 2.5 ms] Range (min … max): 251.5 ms … 260.7 ms 25 runs AFTER THIS PATCH ---------------- Time (mean ± σ): 236.2 ms ± 2.8 ms [User: 228.9 ms, System: 5.0 ms] Range (min … max): 231.5 ms … 242.7 ms 25 runs --- Zend/zend_operators.c | 23 +++++++---------------- ext/spl/spl_heap.c | 2 +- ext/standard/array.c | 2 +- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 312ba833987e1..00286cac388c7 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2109,7 +2109,7 @@ ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ d1 = zval_get_double(op1); d2 = zval_get_double(op2); - return ZEND_NORMALIZE_BOOL(d1 - d2); + return ZEND_THREEWAY_COMPARE(d1, d2); } /* }}} */ @@ -2131,8 +2131,7 @@ static int compare_long_to_string(zend_long lval, zend_string *str) /* {{{ */ } if (type == IS_DOUBLE) { - double diff = (double) lval - str_dval; - return ZEND_NORMALIZE_BOOL(diff); + return ZEND_THREEWAY_COMPARE((double) lval, str_dval); } zend_string *lval_as_str = zend_long_to_str(lval); @@ -2150,15 +2149,11 @@ static int compare_double_to_string(double dval, zend_string *str) /* {{{ */ uint8_t type = is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), &str_lval, &str_dval, 0); if (type == IS_LONG) { - double diff = dval - (double) str_lval; - return ZEND_NORMALIZE_BOOL(diff); + return ZEND_THREEWAY_COMPARE(dval, (double) str_lval); } if (type == IS_DOUBLE) { - if (dval == str_dval) { - return 0; - } - return ZEND_NORMALIZE_BOOL(dval - str_dval); + return ZEND_THREEWAY_COMPARE(dval, str_dval); } zend_string *dval_as_str = zend_double_to_str(dval); @@ -2180,17 +2175,13 @@ ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2) /* {{{ */ return Z_LVAL_P(op1)>Z_LVAL_P(op2)?1:(Z_LVAL_P(op1)priority); double b = Z_DVAL(((spl_pqueue_elem*) y)->priority); - return ZEND_NORMALIZE_BOOL(a - b); + return ZEND_THREEWAY_COMPARE(a, b); } static spl_ptr_heap *spl_ptr_heap_init(spl_ptr_heap_cmp_func cmp, spl_ptr_heap_ctor_func ctor, spl_ptr_heap_dtor_func dtor, size_t elem_size) /* {{{ */ diff --git a/ext/standard/array.c b/ext/standard/array.c index dc0d434d1883e..b7ab04e5deea3 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -164,7 +164,7 @@ static zend_always_inline int php_array_key_compare_numeric_unstable_i(Bucket *f } else { d2 = (double)(zend_long)s->h; } - return ZEND_NORMALIZE_BOOL(d1 - d2); + return ZEND_THREEWAY_COMPARE(d1, d2); } } /* }}} */ From f4ede230cde2727ac341837d388cfee724d045d5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 14 Apr 2023 18:26:02 +0200 Subject: [PATCH 826/895] Fix commit hash really this time We're not in pull_request-context, of course. --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c0e718a40ff4e..48c1976ec34db 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -299,7 +299,7 @@ jobs: if git diff --cached --quiet; then exit 0 fi - git commit -m "Add result for ${{ github.repository }}@${{ github.event.pull_request.head.sha }}" + git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}" git push - name: Show diff if: github.event_name == 'pull_request' From fc32d39b7f450a331dc1e307c59fa6b8c0f97114 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 8 Apr 2023 15:23:58 +0200 Subject: [PATCH 827/895] Fix GH-11028: Heap Buffer Overflow in zval_undefined_cv. For analysis see https://github.com/php/php-src/issues/11028#issuecomment-1508460440 Closes GH-11083. --- NEWS | 1 + Zend/tests/generators/gh11028_1.phpt | 35 ++++++++++++++++++++++++++++ Zend/tests/generators/gh11028_2.phpt | 24 +++++++++++++++++++ Zend/tests/generators/gh11028_3.phpt | 21 +++++++++++++++++ Zend/zend_generators.c | 13 ++++++++++- 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/generators/gh11028_1.phpt create mode 100644 Zend/tests/generators/gh11028_2.phpt create mode 100644 Zend/tests/generators/gh11028_3.phpt diff --git a/NEWS b/NEWS index 5b74dae32335b..746746e801f98 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP NEWS array is contained in the second). (ilutov) . Fixed bug GH-10737 (PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c). (nielsdos, ElliotNB) + . Fixed bug GH-11028 (Heap Buffer Overflow in zval_undefined_cv.). (nielsdos) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/Zend/tests/generators/gh11028_1.phpt b/Zend/tests/generators/gh11028_1.phpt new file mode 100644 index 0000000000000..e1e7aa5019e54 --- /dev/null +++ b/Zend/tests/generators/gh11028_1.phpt @@ -0,0 +1,35 @@ +--TEST-- +GH-11028 (Heap Buffer Overflow in zval_undefined_cv with generators) - other types variant +--FILE-- + 0; + } finally { + return []; + } +} + +function test($msg, $x) { + echo "yield $msg\n"; + try { + var_dump([...generator($x)]); + } catch (Throwable $e) { + echo $e->getMessage(), "\n"; + } +} + +test("null", null); +test("false", false); +test("true", true); +test("object", new stdClass); +?> +--EXPECT-- +yield null +Keys must be of type int|string during array unpacking +yield false +Keys must be of type int|string during array unpacking +yield true +Keys must be of type int|string during array unpacking +yield object +Keys must be of type int|string during array unpacking diff --git a/Zend/tests/generators/gh11028_2.phpt b/Zend/tests/generators/gh11028_2.phpt new file mode 100644 index 0000000000000..27b36c711f5c1 --- /dev/null +++ b/Zend/tests/generators/gh11028_2.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-11028 (Heap Buffer Overflow in zval_undefined_cv with generators) - original variant +--FILE-- + 0; + } finally { + return []; + } + })()), + ]; +})()[0]; +?> +--EXPECTF-- +Warning: Undefined variable $a in %s on line %d + +Fatal error: Uncaught Error: Keys must be of type int|string during array unpacking in %s:%d +Stack trace: +#0 %s(%d): {closure}() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/generators/gh11028_3.phpt b/Zend/tests/generators/gh11028_3.phpt new file mode 100644 index 0000000000000..7ea1aac6f6cfc --- /dev/null +++ b/Zend/tests/generators/gh11028_3.phpt @@ -0,0 +1,21 @@ +--TEST-- +GH-11028 (Heap Buffer Overflow in zval_undefined_cv with generators) - throw in finally variant +--FILE-- + 0; + } finally { + throw new Exception("exception"); + return []; + } +} + +try { + var_dump([...generator()]); +} catch (Throwable $e) { + echo $e->getMessage(), "\n"; +} +?> +--EXPECT-- +exception diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 5d7bef3854f5e..a3610fa8f7b13 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -279,14 +279,25 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */ ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[try_catch->finally_end].op1.var); zend_generator_cleanup_unfinished_execution(generator, ex, try_catch->finally_op); - Z_OBJ_P(fast_call) = EG(exception); + zend_object *old_exception = EG(exception); + const zend_op *old_opline_before_exception = EG(opline_before_exception); EG(exception) = NULL; + Z_OBJ_P(fast_call) = NULL; Z_OPLINE_NUM_P(fast_call) = (uint32_t)-1; ex->opline = &ex->func->op_array.opcodes[try_catch->finally_op]; generator->flags |= ZEND_GENERATOR_FORCED_CLOSE; zend_generator_resume(generator); + if (old_exception) { + EG(opline_before_exception) = old_opline_before_exception; + if (EG(exception)) { + zend_exception_set_previous(EG(exception), old_exception); + } else { + EG(exception) = old_exception; + } + } + /* TODO: If we hit another yield inside try/finally, * should we also jump to the next finally block? */ break; From 0ac55e9bfbc37c74af15d668ce89731cf85a04f6 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sat, 15 Apr 2023 15:08:24 +0100 Subject: [PATCH 828/895] Add zend_test_crash funtion to segfault PHP process This is useful for testing PHP-FPM handling of crashed children. Closes GH-11082 --- Zend/tests/arginfo_zpp_mismatch.inc | 1 + ext/zend_test/test.c | 17 +++++++++++++++++ ext/zend_test/test.stub.php | 2 ++ ext/zend_test/test_arginfo.h | 8 +++++++- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Zend/tests/arginfo_zpp_mismatch.inc b/Zend/tests/arginfo_zpp_mismatch.inc index 221c347aaa915..023bfefa5d501 100644 --- a/Zend/tests/arginfo_zpp_mismatch.inc +++ b/Zend/tests/arginfo_zpp_mismatch.inc @@ -9,6 +9,7 @@ function skipFunction($function): bool { /* intentionally violate invariants */ || $function === 'zend_create_unterminated_string' || $function === 'zend_test_array_return' + || $function === 'zend_test_crash' || $function === 'zend_leak_bytes' /* mess with output */ || (is_string($function) && str_starts_with($function, 'ob_')) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index d80ed25f933f0..41e17d5cb9104 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -327,6 +327,23 @@ static ZEND_FUNCTION(zend_get_map_ptr_last) RETURN_LONG(CG(map_ptr_last)); } +static ZEND_FUNCTION(zend_test_crash) +{ + zend_string *message; + + ZEND_PARSE_PARAMETERS_START(0, 1) + Z_PARAM_OPTIONAL + Z_PARAM_STR_OR_NULL(message) + ZEND_PARSE_PARAMETERS_END(); + + if (message) { + php_printf("%s", ZSTR_VAL(message)); + } + + char *invalid = (char *) 1; + php_printf("%s", invalid); +} + static zend_object *zend_test_class_new(zend_class_entry *class_type) { zend_object *obj = zend_objects_new(class_type); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index c95c650ad7207..fc35f5743ef28 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -119,6 +119,8 @@ function zend_get_current_func_name(): string {} function zend_call_method(string $class, string $method, mixed $arg1 = UNKNOWN, mixed $arg2 = UNKNOWN): mixed {} function zend_get_map_ptr_last(): int {} + + function zend_test_crash(?string $message = null): void {} } namespace ZendTestNS { diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 766c0b08dd158..08b2d9d8e87f9 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 614310958c6e2acde46c9b7932ba894caf72d6df */ + * Stub hash: 47eb58d644268f4fdce7a6b5007f7755ebfcb197 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -82,6 +82,10 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_map_ptr_last, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_crash, 0, 0, IS_VOID, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 1, "null") +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -143,6 +147,7 @@ static ZEND_FUNCTION(zend_test_parameter_with_attribute); static ZEND_FUNCTION(zend_get_current_func_name); static ZEND_FUNCTION(zend_call_method); static ZEND_FUNCTION(zend_get_map_ptr_last); +static ZEND_FUNCTION(zend_test_crash); static ZEND_FUNCTION(namespaced_func); static ZEND_METHOD(_ZendTestClass, is_object); static ZEND_METHOD(_ZendTestClass, __toString); @@ -182,6 +187,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name) ZEND_FE(zend_call_method, arginfo_zend_call_method) ZEND_FE(zend_get_map_ptr_last, arginfo_zend_get_map_ptr_last) + ZEND_FE(zend_test_crash, arginfo_zend_test_crash) ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func) ZEND_FE_END }; From 24cc40207dc6e6c72dd393d576556f93db9b8bab Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 15 Apr 2023 23:14:20 +0200 Subject: [PATCH 829/895] Benchmarking mean (#11085) * Use 50 runs and calculate mean * Don't validate timestamps * Don't profile PHP startup and shutdown in cgi with valgrind --- .github/workflows/push.yml | 2 ++ benchmark/benchmark.php | 11 ++++++++--- sapi/cgi/cgi_main.c | 16 +++++++++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 48c1976ec34db..8f52ac5bdd229 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -230,6 +230,7 @@ jobs: sudo apt-get update sudo apt-get install \ bison \ + libgmp-dev \ libonig-dev \ libsqlite3-dev \ openssl \ @@ -253,6 +254,7 @@ jobs: --enable-werror \ --prefix=/usr \ --with-config-file-scan-dir=/etc/php.d \ + --with-gmp \ --with-mysqli=mysqlnd \ --with-openssl \ --with-pdo-sqlite \ diff --git a/benchmark/benchmark.php b/benchmark/benchmark.php index ca79f3dc34b90..9ca015f0a223b 100644 --- a/benchmark/benchmark.php +++ b/benchmark/benchmark.php @@ -55,7 +55,7 @@ function runSymfonyDemo(bool $jit): array { cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git'); runPhpCommand([$dir . '/bin/console', 'cache:clear']); runPhpCommand([$dir . '/bin/console', 'cache:warmup']); - return runValgrindPhpCgiCommand([$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50); + return runValgrindPhpCgiCommand([$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 50); } function runWordpress(bool $jit): array { @@ -78,7 +78,7 @@ function runWordpress(bool $jit): array { // Warmup runPhpCommand([$dir . '/index.php'], $dir); - return runValgrindPhpCgiCommand([$dir . '/index.php'], cwd: $dir, jit: $jit, warmup: 50); + return runValgrindPhpCgiCommand([$dir . '/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 50); } function runPhpCommand(array $args, ?string $cwd = null): ProcessResult { @@ -90,6 +90,7 @@ function runValgrindPhpCgiCommand( ?string $cwd = null, bool $jit = false, int $warmup = 0, + int $repeat = 1, ): array { global $phpCgi; $process = runCommand([ @@ -99,13 +100,17 @@ function runValgrindPhpCgiCommand( '--callgrind-out-file=/dev/null', '--', $phpCgi, - '-T' . ($warmup ? $warmup . ',' : '') . '1', + '-T' . ($warmup ? $warmup . ',' : '') . $repeat, '-d max_execution_time=0', '-d opcache.enable=1', '-d opcache.jit_buffer_size=' . ($jit ? '128M' : '0'), + '-d opcache.validate_timestamps=0', ...$args, ]); $instructions = extractInstructionsFromValgrindOutput($process->stderr); + if ($repeat > 1) { + $instructions = gmp_strval(gmp_div_q($instructions, $repeat)); + } return ['instructions' => $instructions]; } diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b45468031fcd0..bf0f233118b10 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2219,6 +2219,8 @@ consult the installation file that came with this distribution, or visit \n\ #ifdef HAVE_VALGRIND if (warmup_repeats > 0) { CALLGRIND_STOP_INSTRUMENTATION; + /* We're not interested in measuring startup */ + CALLGRIND_ZERO_STATS; } #endif } else { @@ -2427,6 +2429,12 @@ consult the installation file that came with this distribution, or visit \n\ } } /* end !cgi && !fastcgi */ +#ifdef HAVE_VALGRIND + if (warmup_repeats == 0) { + CALLGRIND_START_INSTRUMENTATION; + } +#endif + /* request startup only after we've done all we can to * get path_translated */ if (php_request_startup() == FAILURE) { @@ -2546,6 +2554,11 @@ consult the installation file that came with this distribution, or visit \n\ SG(request_info).query_string = NULL; } +#ifdef HAVE_VALGRIND + /* We're not interested in measuring shutdown */ + CALLGRIND_STOP_INSTRUMENTATION; +#endif + if (!fastcgi) { if (benchmark) { if (warmup_repeats) { @@ -2555,9 +2568,6 @@ consult the installation file that came with this distribution, or visit \n\ gettimeofday(&start, NULL); #else time(&start); -#endif -#ifdef HAVE_VALGRIND - CALLGRIND_START_INSTRUMENTATION; #endif } continue; From 2044e5aea05f5467b0fd91756602154d06d74749 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 15 Apr 2023 23:21:48 +0200 Subject: [PATCH 830/895] Fix uninitialized variable compile error --- ext/zend_test/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index bb50012d4de90..55ff614a51ace 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -535,7 +535,7 @@ static ZEND_FUNCTION(zend_get_map_ptr_last) static ZEND_FUNCTION(zend_test_crash) { - zend_string *message; + zend_string *message = NULL; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL From af809ef028e1e3ed59284e2506cab0f275b55d8e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 15 Apr 2023 23:30:07 +0200 Subject: [PATCH 831/895] Fix CI benchmarking diff --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8f52ac5bdd229..19a7985e5b7e0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -305,8 +305,8 @@ jobs: git push - name: Show diff if: github.event_name == 'pull_request' - run: >- - php benchmark/generate_diff.php - ${{ github.event.pull_request.head.sha }} - $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) - > $GITHUB_STEP_SUMMARY + run: |- + php benchmark/generate_diff.php \ + ${{ github.sha }} \ + $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \ + > $GITHUB_STEP_SUMMARY From 84be9042f961135d0e550072b9aad03d3ac5dc43 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 16 Apr 2023 10:54:39 +0100 Subject: [PATCH 832/895] Add missing zend_test_crash message initialization --- ext/zend_test/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 41e17d5cb9104..32fd153ac2d8c 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -329,7 +329,7 @@ static ZEND_FUNCTION(zend_get_map_ptr_last) static ZEND_FUNCTION(zend_test_crash) { - zend_string *message; + zend_string *message = NULL; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL From 581e729e8d3580d8f2aeae3c0b6dada899313ec5 Mon Sep 17 00:00:00 2001 From: Sjon Hortensius Date: Fri, 14 Apr 2023 13:14:29 +0200 Subject: [PATCH 833/895] fpm: remove 2 unneeded newlines from zlog call --- sapi/fpm/fpm/fpm_conf.c | 2 +- sapi/fpm/fpm/fpm_sockets.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 5684a46190eb4..8f7548a402c23 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -1877,7 +1877,7 @@ int fpm_conf_init_main(int test_conf, int force_daemon) /* {{{ */ if (test_conf > 1) { fpm_conf_dump(); } - zlog(ZLOG_NOTICE, "configuration file %s test is successful\n", fpm_globals.config); + zlog(ZLOG_NOTICE, "configuration file %s test is successful", fpm_globals.config); fpm_globals.test_successful = 1; return -1; } diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index 66488b9bf000e..b532e68b9d304 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -313,7 +313,7 @@ static int fpm_socket_af_inet_socket_by_addr(struct fpm_worker_pool_s *wp, const hints.ai_socktype = SOCK_STREAM; if ((status = getaddrinfo(addr, port, &hints, &servinfo)) != 0) { - zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status)); + zlog(ZLOG_ERROR, "getaddrinfo: %s", gai_strerror(status)); return -1; } From e8b8341d3d5ffe10360746c343d403c1a77b38f1 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 4 Apr 2023 18:19:19 +0200 Subject: [PATCH 834/895] Support enums in array_unique Fixes GH-9775 Closes GH-11015 --- NEWS | 2 ++ Zend/tests/gh9775_1.phpt | 56 ++++++++++++++++++++++++++++++++++++++++ Zend/tests/gh9775_2.phpt | 56 ++++++++++++++++++++++++++++++++++++++++ ext/standard/array.c | 22 +++++++++++++++- 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/gh9775_1.phpt create mode 100644 Zend/tests/gh9775_2.phpt diff --git a/NEWS b/NEWS index 746746e801f98..941f610880700 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ PHP NEWS - Standard: . Fixed bug GH-10990 (mail() throws TypeError after iterating over $additional_headers array by reference). (nielsdos) + . Fixed bug GH-9775 (Duplicates returned by array_unique when using enums). + (ilutov) 13 Apr 2023, PHP 8.1.18 diff --git a/Zend/tests/gh9775_1.phpt b/Zend/tests/gh9775_1.phpt new file mode 100644 index 0000000000000..e2ea5287f5df9 --- /dev/null +++ b/Zend/tests/gh9775_1.phpt @@ -0,0 +1,56 @@ +--TEST-- +GH-9775: Backed enum in array_unique() +--FILE-- + +--EXPECT-- +array(8) { + [0]=> + enum(Test::COURSES_ADMIN) + [1]=> + enum(Test::COURSES_REPORTING_ACCESS) + [2]=> + enum(Test::BUNDLES_ADMIN) + [3]=> + enum(Test::USERS_ADMIN) + [4]=> + enum(Test::B2B_DASHBOARD_ACCESS) + [6]=> + enum(Test::INSTRUCTORS_ADMIN) + [8]=> + enum(Test::COUPONS_ADMIN) + [9]=> + enum(Test::AUTHENTICATED) +} diff --git a/Zend/tests/gh9775_2.phpt b/Zend/tests/gh9775_2.phpt new file mode 100644 index 0000000000000..94ef0029fa93d --- /dev/null +++ b/Zend/tests/gh9775_2.phpt @@ -0,0 +1,56 @@ +--TEST-- +GH-9775: Pure enum in array_unique() +--FILE-- + +--EXPECT-- +array(8) { + [0]=> + enum(Test::COURSES_ADMIN) + [1]=> + enum(Test::COURSES_REPORTING_ACCESS) + [2]=> + enum(Test::BUNDLES_ADMIN) + [3]=> + enum(Test::USERS_ADMIN) + [4]=> + enum(Test::B2B_DASHBOARD_ACCESS) + [6]=> + enum(Test::INSTRUCTORS_ADMIN) + [8]=> + enum(Test::COUPONS_ADMIN) + [9]=> + enum(Test::AUTHENTICATED) +} diff --git a/ext/standard/array.c b/ext/standard/array.c index 9a814ea07da47..fb705cd34c4e8 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -345,7 +345,27 @@ static zend_always_inline int php_array_key_compare_string_locale_unstable_i(Buc static zend_always_inline int php_array_data_compare_unstable_i(Bucket *f, Bucket *s) /* {{{ */ { - return zend_compare(&f->val, &s->val); + int result = zend_compare(&f->val, &s->val); + /* Special enums handling for array_unique. We don't want to add this logic to zend_compare as + * that would be observable via comparison operators. */ + zval *rhs = &s->val; + ZVAL_DEREF(rhs); + if (UNEXPECTED(Z_TYPE_P(rhs) == IS_OBJECT) + && result == ZEND_UNCOMPARABLE + && (Z_OBJCE_P(rhs)->ce_flags & ZEND_ACC_ENUM)) { + zval *lhs = &f->val; + ZVAL_DEREF(lhs); + if (Z_TYPE_P(lhs) == IS_OBJECT && (Z_OBJCE_P(lhs)->ce_flags & ZEND_ACC_ENUM)) { + // Order doesn't matter, we just need to group the same enum values + uintptr_t lhs_uintptr = (uintptr_t)Z_OBJ_P(lhs); + uintptr_t rhs_uintptr = (uintptr_t)Z_OBJ_P(rhs); + return lhs_uintptr == rhs_uintptr ? 0 : (lhs_uintptr < rhs_uintptr ? -1 : 1); + } else { + // Shift enums to the end of the array + return -1; + } + } + return result; } /* }}} */ From 414f71a90254cc33896bb3ba953f979f743c198c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 16 Apr 2023 22:20:26 +0200 Subject: [PATCH 835/895] Typed class constants (#10444) RFC: https://wiki.php.net/rfc/typed_class_constants Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com> Co-Authored-By: Bob Weinand <3154871+bwoebi@users.noreply.github.com> Co-Authored-By: Ilija Tovilo --- UPGRADING | 2 + .../typed_class_constants_diamond_error1.phpt | 16 ++ ...ed_class_constants_inheritance_error1.phpt | 14 ++ ...ed_class_constants_inheritance_error2.phpt | 14 ++ ...ed_class_constants_inheritance_error3.phpt | 18 +++ ...ed_class_constants_inheritance_error4.phpt | 18 +++ ...ed_class_constants_inheritance_error5.phpt | 18 +++ ..._class_constants_inheritance_success1.phpt | 29 ++++ ..._class_constants_inheritance_success2.phpt | 48 ++++++ ..._class_constants_inheritance_success3.phpt | 16 ++ ..._class_constants_inheritance_success4.phpt | 39 +++++ ..._class_constants_inheritance_success5.phpt | 26 +++ .../typed_class_constants_type_error1.phpt | 10 ++ .../typed_class_constants_type_error10.phpt | 15 ++ .../typed_class_constants_type_error11.phpt | 21 +++ .../typed_class_constants_type_error12.phpt | 15 ++ .../typed_class_constants_type_error2.phpt | 26 +++ .../typed_class_constants_type_error3.phpt | 25 +++ .../typed_class_constants_type_error4.phpt | 10 ++ .../typed_class_constants_type_error5.phpt | 10 ++ .../typed_class_constants_type_error6.phpt | 10 ++ .../typed_class_constants_type_error7.phpt | 25 +++ .../typed_class_constants_type_error8.phpt | 40 +++++ .../typed_class_constants_type_error9.phpt | 25 +++ .../typed_class_constants_type_success1.phpt | 66 ++++++++ .../typed_class_constants_type_success2.phpt | 52 ++++++ .../typed_class_constants_type_success3.phpt | 52 ++++++ Zend/zend_API.c | 40 ++++- Zend/zend_API.h | 2 + Zend/zend_ast.h | 2 +- Zend/zend_compile.c | 28 +++- Zend/zend_compile.h | 1 + Zend/zend_constants.c | 2 +- Zend/zend_execute.c | 90 ++++++++--- Zend/zend_execute.h | 4 + Zend/zend_inheritance.c | 149 ++++++++++++++++-- Zend/zend_language_parser.y | 19 ++- Zend/zend_vm_def.h | 3 +- Zend/zend_vm_execute.h | 18 +-- ext/opcache/ZendAccelerator.c | 5 +- ext/opcache/zend_file_cache.c | 3 +- ext/opcache/zend_persist.c | 1 + ext/opcache/zend_persist_calc.c | 1 + ext/reflection/php_reflection.c | 75 +++++++-- ext/reflection/php_reflection.stub.php | 6 +- ext/reflection/php_reflection_arginfo.h | 10 +- .../tests/ReflectionClassConstant_basic1.phpt | 31 +++- ...eflectionClassConstant_getValue_typed.phpt | 39 +++++ .../ReflectionClass_getConstant_typed.phpt | 29 ++++ .../tests/ReflectionClass_toString_006.phpt | 32 ++++ .../tests/ReflectionClass_toString_007.phpt | 20 +++ ...roperties_with_typed_class_constants1.phpt | 24 +++ .../constant_with_typed_class_constant.phpt | 25 +++ 53 files changed, 1227 insertions(+), 92 deletions(-) create mode 100644 Zend/tests/type_declarations/typed_class_constants_diamond_error1.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_error1.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_error2.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_error3.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_error4.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_error5.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_success1.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_success2.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_success3.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_success4.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_inheritance_success5.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error1.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error10.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error11.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error12.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error2.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error3.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error4.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error5.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error6.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error7.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error8.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_error9.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_success1.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_success2.phpt create mode 100644 Zend/tests/type_declarations/typed_class_constants_type_success3.phpt create mode 100644 ext/reflection/tests/ReflectionClassConstant_getValue_typed.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstant_typed.phpt create mode 100644 ext/reflection/tests/ReflectionClass_toString_006.phpt create mode 100644 ext/reflection/tests/ReflectionClass_toString_007.phpt create mode 100644 ext/reflection/tests/static_properties_with_typed_class_constants1.phpt create mode 100644 ext/standard/tests/constant_with_typed_class_constant.phpt diff --git a/UPGRADING b/UPGRADING index b55d018f30953..a22bc46328e90 100644 --- a/UPGRADING +++ b/UPGRADING @@ -52,6 +52,8 @@ PHP 8.3 UPGRADE NOTES . Anonymous classes may now be marked as readonly. . Readonly properties can now be reinitialized during cloning. RFC: https://wiki.php.net/rfc/readonly_amendments + . Class, interface, trait, and enum constants now support type + declarations. RFC: https://wiki.php.net/rfc/typed_class_constants - Posix . posix_getrlimit() now takes an optional $res parameter to allow fetching a diff --git a/Zend/tests/type_declarations/typed_class_constants_diamond_error1.phpt b/Zend/tests/type_declarations/typed_class_constants_diamond_error1.phpt new file mode 100644 index 0000000000000..059c3cb2005b7 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_diamond_error1.phpt @@ -0,0 +1,16 @@ +--TEST-- +Typed class constants (diamond error with self) +--FILE-- +getMessage() . "\n"; +} +?> +--EXPECT-- +Undefined constant "C" diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_error1.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_error1.phpt new file mode 100644 index 0000000000000..d4bbe98d6f5ce --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_error1.phpt @@ -0,0 +1,14 @@ +--TEST-- +Typed class constants (incompatible inheritance; simple) +--FILE-- + +--EXPECTF-- +Fatal error: Type of B::CONST1 must be compatible with A::CONST1 of type int in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_error2.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_error2.phpt new file mode 100644 index 0000000000000..72fc4da0ffe2e --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_error2.phpt @@ -0,0 +1,14 @@ +--TEST-- +Typed class constants (incompatible inheritance; missing type in child) +--FILE-- + +--EXPECTF-- +Fatal error: Type of B::CONST1 must be compatible with A::CONST1 of type int in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_error3.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_error3.phpt new file mode 100644 index 0000000000000..82c3154e9bfba --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_error3.phpt @@ -0,0 +1,18 @@ +--TEST-- +Typed class constants (incompatible composition; traits) +--FILE-- + +--EXPECTF-- +Fatal error: C and T define the same constant (CONST1) in the composition of C. However, the definition differs and is considered incompatible. Class was composed in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_error4.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_error4.phpt new file mode 100644 index 0000000000000..55929d8953119 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_error4.phpt @@ -0,0 +1,18 @@ +--TEST-- +Typed class constants (incompatible covariant composition; traits) +--FILE-- + +--EXPECTF-- +Fatal error: C and T define the same constant (CONST1) in the composition of C. However, the definition differs and is considered incompatible. Class was composed in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_error5.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_error5.phpt new file mode 100644 index 0000000000000..7068d9df7cbb7 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_error5.phpt @@ -0,0 +1,18 @@ +--TEST-- +Typed class constants (incompatible contravariant composition; traits) +--FILE-- + +--EXPECTF-- +Fatal error: C and T define the same constant (CONST1) in the composition of C. However, the definition differs and is considered incompatible. Class was composed in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_success1.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_success1.phpt new file mode 100644 index 0000000000000..0dbd3a3385bc8 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_success1.phpt @@ -0,0 +1,29 @@ +--TEST-- +Typed class constants (inheritance success) +--FILE-- + +--EXPECT-- +int(0) +int(0) +int(0) +array(0) { +} diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_success2.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_success2.phpt new file mode 100644 index 0000000000000..40e079c3596e7 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_success2.phpt @@ -0,0 +1,48 @@ +--TEST-- +Typed class constants (inheritance success - object types) +--FILE-- + +--EXPECTF-- +object(Z)#%d (%d) { +} +object(Z)#%d (%d) { +} +object(Z)#%d (%d) { +} +object(Z)#%d (%d) { +} +object(Z)#%d (%d) { +} \ No newline at end of file diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_success3.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_success3.phpt new file mode 100644 index 0000000000000..dfcc5742d2b43 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_success3.phpt @@ -0,0 +1,16 @@ +--TEST-- +Typed class constants (inheritance; private constants) +--FILE-- + +--EXPECT-- +string(1) "a" diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_success4.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_success4.phpt new file mode 100644 index 0000000000000..faacb0d55e49c --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_success4.phpt @@ -0,0 +1,39 @@ +--TEST-- +Typed class constants (composition; traits) +--FILE-- + +--EXPECT-- +int(1) +array(0) { +} +enum(E::Case1) +object(stdClass)#1 (0) { +} diff --git a/Zend/tests/type_declarations/typed_class_constants_inheritance_success5.phpt b/Zend/tests/type_declarations/typed_class_constants_inheritance_success5.phpt new file mode 100644 index 0000000000000..7f59dc1be35aa --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_inheritance_success5.phpt @@ -0,0 +1,26 @@ +--TEST-- +Typed class constants (redefinition; interfaces and traits) +--FILE-- + +--EXPECT-- +enum(E::Case1) diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error1.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error1.phpt new file mode 100644 index 0000000000000..8f70043091fda --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error1.phpt @@ -0,0 +1,10 @@ +--TEST-- +Typed class constants (type mismatch; simple) +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use int as value for class constant A::CONST1 of type string in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error10.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error10.phpt new file mode 100644 index 0000000000000..805edd9854f43 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error10.phpt @@ -0,0 +1,15 @@ +--TEST-- +Typed class constants (type error) +--FILE-- + +--EXPECTF-- +Fatal error: Type of A2::C must be compatible with A1::C of type ?B1 in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error11.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error11.phpt new file mode 100644 index 0000000000000..714e5a00995cf --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error11.phpt @@ -0,0 +1,21 @@ +--TEST-- +Typed class constants (static type error) +--FILE-- +getMessage() . "\n"; +} + +?> +--EXPECT-- +Cannot assign E2 to class constant E1::C of type static diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error12.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error12.phpt new file mode 100644 index 0000000000000..fddc1bca0bae9 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error12.phpt @@ -0,0 +1,15 @@ +--TEST-- +Typed class constants with static in union +--FILE-- + +--EXPECT-- +object(A)#2 (0) { +} diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error2.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error2.phpt new file mode 100644 index 0000000000000..8acffaa38399f --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error2.phpt @@ -0,0 +1,26 @@ +--TEST-- +Typed class constants (type mismatch; runtime simple) +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(A::CONST1); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} + +?> +--EXPECT-- +Cannot assign string to class constant A::CONST1 of type int +Cannot assign string to class constant A::CONST1 of type int diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error3.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error3.phpt new file mode 100644 index 0000000000000..1e6ab277dec8b --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error3.phpt @@ -0,0 +1,25 @@ +--TEST-- +Typed class constants (type mismatch; runtime object) +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(A::CONST1); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot assign stdClass to class constant A::CONST1 of type string +Cannot assign stdClass to class constant A::CONST1 of type string diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error4.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error4.phpt new file mode 100644 index 0000000000000..7e41b602cf8b3 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error4.phpt @@ -0,0 +1,10 @@ +--TEST-- +Typed class constants (type not allowed; callable) +--FILE-- + +--EXPECTF-- +Fatal error: Class constant A::CONST1 cannot have type callable in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error5.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error5.phpt new file mode 100644 index 0000000000000..c083c738989cc --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error5.phpt @@ -0,0 +1,10 @@ +--TEST-- +Typed class constants (type not allowed; void) +--FILE-- + +--EXPECTF-- +Fatal error: Class constant A::CONST1 cannot have type void in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error6.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error6.phpt new file mode 100644 index 0000000000000..cbb96588f5cc3 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error6.phpt @@ -0,0 +1,10 @@ +--TEST-- +Typed class constants (type not allowed; never) +--FILE-- + +--EXPECTF-- +Fatal error: Class constant A::CONST1 cannot have type never in %s on line %d diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error7.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error7.phpt new file mode 100644 index 0000000000000..6fce750166305 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error7.phpt @@ -0,0 +1,25 @@ +--TEST-- +Typed class constants (type mismatch; runtime) +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(A::CONST1); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error8.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error8.phpt new file mode 100644 index 0000000000000..cbd3720a5ea4e --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error8.phpt @@ -0,0 +1,40 @@ +--TEST-- +Typed class constants (type mismatch; runtime) +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(A::CONST2); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} + +try { + var_dump(A::CONST1); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} + +try { + var_dump(A::CONST1); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable +Cannot assign stdClass to class constant A::CONST1 of type stdClass&Stringable diff --git a/Zend/tests/type_declarations/typed_class_constants_type_error9.phpt b/Zend/tests/type_declarations/typed_class_constants_type_error9.phpt new file mode 100644 index 0000000000000..b0f42b2078a5b --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_error9.phpt @@ -0,0 +1,25 @@ +--TEST-- +Typed class constants (type coercion is unsupported) +--FILE-- +getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot assign S to class constant A::S of type string diff --git a/Zend/tests/type_declarations/typed_class_constants_type_success1.phpt b/Zend/tests/type_declarations/typed_class_constants_type_success1.phpt new file mode 100644 index 0000000000000..61e82637d9ada --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_success1.phpt @@ -0,0 +1,66 @@ +--TEST-- +Typed class constants (declaration; compile-type simple) +--FILE-- + +--EXPECT-- +NULL +NULL +bool(false) +bool(false) +bool(true) +bool(true) +bool(true) +bool(true) +int(0) +int(0) +float(3.14) +float(3.14) +float(3) +float(3) +string(0) "" +string(0) "" +array(0) { +} +array(0) { +} +string(0) "" +string(0) "" +NULL +NULL diff --git a/Zend/tests/type_declarations/typed_class_constants_type_success2.phpt b/Zend/tests/type_declarations/typed_class_constants_type_success2.phpt new file mode 100644 index 0000000000000..1359624452355 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_success2.phpt @@ -0,0 +1,52 @@ +--TEST-- +Typed class constants (declaration; runtime) +--FILE-- + +--EXPECTF-- +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} +object(B)#%d (%d) { +} diff --git a/Zend/tests/type_declarations/typed_class_constants_type_success3.phpt b/Zend/tests/type_declarations/typed_class_constants_type_success3.phpt new file mode 100644 index 0000000000000..cf3d7c9557202 --- /dev/null +++ b/Zend/tests/type_declarations/typed_class_constants_type_success3.phpt @@ -0,0 +1,52 @@ +--TEST-- +Typed enum constants (self/static) +--FILE-- + +--EXPECT-- +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) +enum(E::Foo) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 1beb76dff4dc0..e9058f3e43db9 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1412,6 +1412,34 @@ static zend_result update_property(zval *val, zend_property_info *prop_info) { return zval_update_constant_ex(val, prop_info->ce); } +ZEND_API zend_result zend_update_class_constant(zend_class_constant *c, const zend_string *name, zend_class_entry *scope) +{ + ZEND_ASSERT(Z_TYPE(c->value) == IS_CONSTANT_AST); + + if (EXPECTED(!ZEND_TYPE_IS_SET(c->type) || ZEND_TYPE_PURE_MASK(c->type) == MAY_BE_ANY)) { + return zval_update_constant_ex(&c->value, scope); + } + + zval tmp; + + ZVAL_COPY(&tmp, &c->value); + zend_result result = zval_update_constant_ex(&tmp, scope); + if (result == FAILURE) { + zval_ptr_dtor(&tmp); + return FAILURE; + } + + if (UNEXPECTED(!zend_verify_class_constant_type(c, name, &tmp))) { + zval_ptr_dtor(&tmp); + return FAILURE; + } + + zval_ptr_dtor(&c->value); + ZVAL_COPY_VALUE(&c->value, &tmp); + + return SUCCESS; +} + ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /* {{{ */ { zend_class_mutable_data *mutable_data = NULL; @@ -1470,7 +1498,7 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) / } val = &c->value; - if (UNEXPECTED(zval_update_constant_ex(val, c->ce) != SUCCESS)) { + if (UNEXPECTED(zend_update_class_constant(c, name, c->ce) != SUCCESS)) { return FAILURE; } } @@ -4532,7 +4560,7 @@ ZEND_API void zend_declare_property_stringl(zend_class_entry *ce, const char *na } /* }}} */ -ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int flags, zend_string *doc_comment) /* {{{ */ +ZEND_API zend_class_constant *zend_declare_typed_class_constant(zend_class_entry *ce, zend_string *name, zval *value, int flags, zend_string *doc_comment, zend_type type) /* {{{ */ { zend_class_constant *c; @@ -4561,6 +4589,8 @@ ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *c c->doc_comment = doc_comment; c->attributes = NULL; c->ce = ce; + c->type = type; + if (Z_TYPE_P(value) == IS_CONSTANT_AST) { ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED; ce->ce_flags |= ZEND_ACC_HAS_AST_CONSTANTS; @@ -4576,7 +4606,11 @@ ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *c return c; } -/* }}} */ + +ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int flags, zend_string *doc_comment) +{ + return zend_declare_typed_class_constant(ce, name, value, flags, doc_comment, (zend_type) ZEND_TYPE_INIT_NONE(0)); +} ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */ { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 92daf6570aea6..9c1cf08aa78b3 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -429,6 +429,7 @@ ZEND_API void zend_declare_property_double(zend_class_entry *ce, const char *nam ZEND_API void zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type); ZEND_API void zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type); +ZEND_API zend_class_constant *zend_declare_typed_class_constant(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment, zend_type type); ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment); ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value); ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length); @@ -438,6 +439,7 @@ ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const cha ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length); ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value); +ZEND_API zend_result zend_update_class_constant(zend_class_constant *c, const zend_string *name, zend_class_entry *scope); ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type); ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_type); diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index ca12afd6b2149..73e4fed7a997a 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -161,7 +161,6 @@ enum _zend_ast_kind { ZEND_AST_CATCH, ZEND_AST_PROP_GROUP, ZEND_AST_PROP_ELEM, - ZEND_AST_CONST_ELEM, // Pseudo node for initializing enums ZEND_AST_CONST_ENUM_INIT, @@ -170,6 +169,7 @@ enum _zend_ast_kind { ZEND_AST_FOR = 4 << ZEND_AST_NUM_CHILDREN_SHIFT, ZEND_AST_FOREACH, ZEND_AST_ENUM_CASE, + ZEND_AST_CONST_ELEM, /* 5 child nodes */ ZEND_AST_PARAM = 5 << ZEND_AST_NUM_CHILDREN_SHIFT, diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 6aa5bd15a990b..5b8aa00d4df51 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7693,7 +7693,7 @@ static void zend_check_trait_alias_modifiers(uint32_t attr) /* {{{ */ } /* }}} */ -static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_ast *attr_ast) /* {{{ */ +static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_ast *attr_ast) { zend_ast_list *list = zend_ast_get_list(ast); zend_class_entry *ce = CG(active_class_entry); @@ -7705,9 +7705,24 @@ static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_as zend_ast *name_ast = const_ast->child[0]; zend_ast **value_ast_ptr = &const_ast->child[1]; zend_ast *doc_comment_ast = const_ast->child[2]; + zend_ast *type_ast = const_ast->child[3]; zend_string *name = zval_make_interned_string(zend_ast_get_zval(name_ast)); zend_string *doc_comment = doc_comment_ast ? zend_string_copy(zend_ast_get_str(doc_comment_ast)) : NULL; zval value_zv; + zend_type type = ZEND_TYPE_INIT_NONE(0); + + if (type_ast) { + type = zend_compile_typename(type_ast, /* force_allow_null */ 0); + + uint32_t type_mask = ZEND_TYPE_PURE_MASK(type); + + if (type_mask != MAY_BE_ANY && (type_mask & (MAY_BE_CALLABLE|MAY_BE_VOID|MAY_BE_NEVER))) { + zend_string *type_str = zend_type_to_string(type); + + zend_error_noreturn(E_COMPILE_ERROR, "Class constant %s::%s cannot have type %s", + ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(type_str)); + } + } if (UNEXPECTED((flags & ZEND_ACC_PRIVATE) && (flags & ZEND_ACC_FINAL))) { zend_error_noreturn( @@ -7717,14 +7732,21 @@ static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_as } zend_const_expr_to_zval(&value_zv, value_ast_ptr, /* allow_dynamic */ false); - c = zend_declare_class_constant_ex(ce, name, &value_zv, flags, doc_comment); + + if (!Z_CONSTANT(value_zv) && ZEND_TYPE_IS_SET(type) && !zend_is_valid_default_value(type, &value_zv)) { + zend_string *type_str = zend_type_to_string(type); + + zend_error_noreturn(E_COMPILE_ERROR, "Cannot use %s as value for class constant %s::%s of type %s", + zend_zval_type_name(&value_zv), ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(type_str)); + } + + c = zend_declare_typed_class_constant(ce, name, &value_zv, flags, doc_comment, type); if (attr_ast) { zend_compile_attributes(&c->attributes, attr_ast, 0, ZEND_ATTRIBUTE_TARGET_CLASS_CONST, 0); } } } -/* }}} */ static void zend_compile_class_const_group(zend_ast *ast) /* {{{ */ { diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 9a2129d908d6c..0ef351ab274a6 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -407,6 +407,7 @@ typedef struct _zend_class_constant { zend_string *doc_comment; HashTable *attributes; zend_class_entry *ce; + zend_type type; } zend_class_constant; #define ZEND_CLASS_CONST_FLAGS(c) Z_CONSTANT_FLAGS((c)->value) diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index f4ed521605968..854f9c2116ee2 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -361,7 +361,7 @@ ZEND_API zval *zend_get_class_constant_ex(zend_string *class_name, zend_string * } MARK_CONSTANT_VISITED(ret_constant); - ret = zval_update_constant_ex(ret_constant, c->ce); + ret = zend_update_class_constant(c, constant_name, c->ce); RESET_CONSTANT_VISITED(ret_constant); if (UNEXPECTED(ret != SUCCESS)) { diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 59ae2720f92cc..42c9fcdc0fc1c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -820,6 +820,16 @@ ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool s return zend_verify_weak_scalar_type_hint(type_mask, arg); } +ZEND_COLD zend_never_inline void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant) +{ + zend_string *type_str = zend_type_to_string(c->type); + + zend_type_error("Cannot assign %s to class constant %s::%s of type %s", + zend_zval_type_name(constant), ZSTR_VAL(c->ce->name), ZSTR_VAL(name), ZSTR_VAL(type_str)); + + zend_string_release(type_str); +} + ZEND_COLD zend_never_inline void zend_verify_property_type_error(const zend_property_info *info, const zval *property) { zend_string *type_str; @@ -908,7 +918,7 @@ static const zend_class_entry *resolve_single_class_type(zend_string *name, cons } static zend_always_inline const zend_class_entry *zend_ce_from_type( - const zend_property_info *info, const zend_type *type) { + const zend_class_entry *scope, const zend_type *type) { ZEND_ASSERT(ZEND_TYPE_HAS_NAME(*type)); zend_string *name = ZEND_TYPE_NAME(*type); if (ZSTR_HAS_CE_CACHE(name)) { @@ -918,52 +928,61 @@ static zend_always_inline const zend_class_entry *zend_ce_from_type( } return ce; } - return resolve_single_class_type(name, info->ce); + return resolve_single_class_type(name, scope); } -static bool zend_check_intersection_for_property_class_type(zend_type_list *intersection_type_list, - const zend_property_info *info, const zend_class_entry *object_ce) +static bool zend_check_intersection_for_property_or_class_constant_class_type( + const zend_class_entry *scope, zend_type_list *intersection_type_list, const zend_class_entry *value_ce) { zend_type *list_type; ZEND_TYPE_LIST_FOREACH(intersection_type_list, list_type) { ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type)); - const zend_class_entry *ce = zend_ce_from_type(info, list_type); - if (!ce || !instanceof_function(object_ce, ce)) { + const zend_class_entry *ce = zend_ce_from_type(scope, list_type); + if (!ce || !instanceof_function(value_ce, ce)) { return false; } } ZEND_TYPE_LIST_FOREACH_END(); return true; } -static bool zend_check_and_resolve_property_class_type( - const zend_property_info *info, const zend_class_entry *object_ce) { - if (ZEND_TYPE_HAS_LIST(info->type)) { +static bool zend_check_and_resolve_property_or_class_constant_class_type( + const zend_class_entry *scope, zend_type member_type, const zend_class_entry *value_ce) { + if (ZEND_TYPE_HAS_LIST(member_type)) { zend_type *list_type; - if (ZEND_TYPE_IS_INTERSECTION(info->type)) { - return zend_check_intersection_for_property_class_type( - ZEND_TYPE_LIST(info->type), info, object_ce); + if (ZEND_TYPE_IS_INTERSECTION(member_type)) { + return zend_check_intersection_for_property_or_class_constant_class_type( + scope, ZEND_TYPE_LIST(member_type), value_ce); } else { - ZEND_TYPE_LIST_FOREACH(ZEND_TYPE_LIST(info->type), list_type) { + ZEND_TYPE_LIST_FOREACH(ZEND_TYPE_LIST(member_type), list_type) { if (ZEND_TYPE_IS_INTERSECTION(*list_type)) { - if (zend_check_intersection_for_property_class_type( - ZEND_TYPE_LIST(*list_type), info, object_ce)) { + if (zend_check_intersection_for_property_or_class_constant_class_type( + scope, ZEND_TYPE_LIST(*list_type), value_ce)) { return true; } continue; } ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type)); - const zend_class_entry *ce = zend_ce_from_type(info, list_type); - if (ce && instanceof_function(object_ce, ce)) { + const zend_class_entry *ce = zend_ce_from_type(scope, list_type); + if (ce && instanceof_function(value_ce, ce)) { return true; } } ZEND_TYPE_LIST_FOREACH_END(); + + if ((ZEND_TYPE_PURE_MASK(member_type) & MAY_BE_STATIC)) { + return value_ce == scope; + } + return false; } - } else { - const zend_class_entry *ce = zend_ce_from_type(info, &info->type); - return ce && instanceof_function(object_ce, ce); + } else if ((ZEND_TYPE_PURE_MASK(member_type) & MAY_BE_STATIC) && value_ce == scope) { + return true; + } else if (ZEND_TYPE_HAS_NAME(member_type)) { + const zend_class_entry *ce = zend_ce_from_type(scope, &member_type); + return ce && instanceof_function(value_ce, ce); } + + return false; } static zend_always_inline bool i_zend_check_property_type(const zend_property_info *info, zval *property, bool strict) @@ -974,7 +993,7 @@ static zend_always_inline bool i_zend_check_property_type(const zend_property_in } if (ZEND_TYPE_IS_COMPLEX(info->type) && Z_TYPE_P(property) == IS_OBJECT - && zend_check_and_resolve_property_class_type(info, Z_OBJCE_P(property))) { + && zend_check_and_resolve_property_or_class_constant_class_type(info->ce, info->type, Z_OBJCE_P(property))) { return 1; } @@ -1455,6 +1474,33 @@ static ZEND_COLD void zend_verify_missing_return_type(const zend_function *zf) zend_verify_return_error(zf, NULL); } +static zend_always_inline bool zend_check_class_constant_type(zend_class_constant *c, zval *constant) +{ + ZEND_ASSERT(!Z_ISREF_P(constant)); + if (EXPECTED(ZEND_TYPE_CONTAINS_CODE(c->type, Z_TYPE_P(constant)))) { + return 1; + } + + if (((ZEND_TYPE_PURE_MASK(c->type) & MAY_BE_STATIC) || ZEND_TYPE_IS_COMPLEX(c->type)) && Z_TYPE_P(constant) == IS_OBJECT + && zend_check_and_resolve_property_or_class_constant_class_type(c->ce, c->type, Z_OBJCE_P(constant))) { + return 1; + } + + uint32_t type_mask = ZEND_TYPE_FULL_MASK(c->type); + ZEND_ASSERT(!(type_mask & (MAY_BE_CALLABLE|MAY_BE_NEVER|MAY_BE_VOID))); + return zend_verify_scalar_type_hint(type_mask, constant, true, false); +} + +ZEND_API bool zend_never_inline zend_verify_class_constant_type(zend_class_constant *c, const zend_string *name, zval *constant) +{ + if (!zend_check_class_constant_type(c, constant)) { + zend_verify_class_constant_type_error(c, name, constant); + return 0; + } + + return 1; +} + static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_object_as_array(void) { zend_throw_error(NULL, "Cannot use object as array"); @@ -3473,7 +3519,7 @@ static zend_always_inline int i_zend_verify_type_assignable_zval( } if (ZEND_TYPE_IS_COMPLEX(type) && zv_type == IS_OBJECT - && zend_check_and_resolve_property_class_type(info, Z_OBJCE_P(zv))) { + && zend_check_and_resolve_property_or_class_constant_class_type(info->ce, info->type, Z_OBJCE_P(zv))) { return 1; } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index caeaa2a3b9f5f..594561da1bb42 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -484,6 +484,10 @@ ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call); #define ZEND_CLASS_HAS_TYPE_HINTS(ce) ((ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) == ZEND_ACC_HAS_TYPE_HINTS) #define ZEND_CLASS_HAS_READONLY_PROPS(ce) ((ce->ce_flags & ZEND_ACC_HAS_READONLY_PROPS) == ZEND_ACC_HAS_READONLY_PROPS) + +ZEND_API bool zend_verify_class_constant_type(zend_class_constant *c, const zend_string *name, zval *constant); +ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant); + ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict); ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property); ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property); diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 5a689408263ab..ff3a4d7080751 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -51,6 +51,9 @@ static void add_compatibility_obligation( static void add_property_compatibility_obligation( zend_class_entry *ce, const zend_property_info *child_prop, const zend_property_info *parent_prop); +static void add_class_constant_compatibility_obligation( + zend_class_entry *ce, const zend_class_constant *child_const, + const zend_class_constant *parent_const, const zend_string *const_name); static void ZEND_COLD emit_incompatible_method_error( const zend_function *child, zend_class_entry *child_scope, @@ -1359,6 +1362,29 @@ static void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_en } /* }}} */ +static void emit_incompatible_class_constant_error( + const zend_class_constant *child, const zend_class_constant *parent, const zend_string *const_name) { + zend_string *type_str = zend_type_to_string_resolved(parent->type, parent->ce); + zend_error_noreturn(E_COMPILE_ERROR, + "Type of %s::%s must be compatible with %s::%s of type %s", + ZSTR_VAL(child->ce->name), + ZSTR_VAL(const_name), + ZSTR_VAL(parent->ce->name), + ZSTR_VAL(const_name), + ZSTR_VAL(type_str)); +} + +static inheritance_status class_constant_types_compatible(const zend_class_constant *parent, const zend_class_constant *child) +{ + ZEND_ASSERT(ZEND_TYPE_IS_SET(parent->type)); + + if (!ZEND_TYPE_IS_SET(child->type)) { + return INHERITANCE_ERROR; + } + + return zend_perform_covariant_type_check(child->ce, child->type, parent->ce, parent->type); +} + static void do_inherit_class_constant(zend_string *name, zend_class_constant *parent_const, zend_class_entry *ce) /* {{{ */ { zval *zv = zend_hash_find_known_hash(&ce->constants_table, name); @@ -1366,9 +1392,14 @@ static void do_inherit_class_constant(zend_string *name, zend_class_constant *pa if (zv != NULL) { c = (zend_class_constant*)Z_PTR_P(zv); + if (UNEXPECTED((ZEND_CLASS_CONST_FLAGS(c) & ZEND_ACC_PPP_MASK) > (ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PPP_MASK))) { zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s must be %s (as in class %s)%s", - ZSTR_VAL(ce->name), ZSTR_VAL(name), zend_visibility_string(ZEND_CLASS_CONST_FLAGS(parent_const)), ZSTR_VAL(parent_const->ce->name), (ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PUBLIC) ? "" : " or weaker"); + ZSTR_VAL(ce->name), ZSTR_VAL(name), + zend_visibility_string(ZEND_CLASS_CONST_FLAGS(parent_const)), + ZSTR_VAL(parent_const->ce->name), + (ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PUBLIC) ? "" : " or weaker" + ); } if (UNEXPECTED((ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_FINAL))) { @@ -1377,6 +1408,15 @@ static void do_inherit_class_constant(zend_string *name, zend_class_constant *pa ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(parent_const->ce->name), ZSTR_VAL(name) ); } + + if (!(ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PRIVATE) && UNEXPECTED(ZEND_TYPE_IS_SET(parent_const->type))) { + inheritance_status status = class_constant_types_compatible(parent_const, c); + if (status == INHERITANCE_ERROR) { + emit_incompatible_class_constant_error(c, parent_const, name); + } else if (status == INHERITANCE_UNRESOLVED) { + add_class_constant_compatibility_obligation(ce, c, parent_const, name); + } + } } else if (!(ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PRIVATE)) { if (Z_TYPE(parent_const->value) == IS_CONSTANT_AST) { ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED; @@ -1641,12 +1681,18 @@ static zend_always_inline bool check_trait_property_or_constant_value_compatibil /* if any of the values is a constant, we try to resolve it */ if (UNEXPECTED(Z_TYPE_P(op1) == IS_CONSTANT_AST)) { ZVAL_COPY_OR_DUP(&op1_tmp, op1); - zval_update_constant_ex(&op1_tmp, ce); + if (UNEXPECTED(zval_update_constant_ex(&op1_tmp, ce) != SUCCESS)) { + zval_ptr_dtor(&op1_tmp); + return false; + } op1 = &op1_tmp; } if (UNEXPECTED(Z_TYPE_P(op2) == IS_CONSTANT_AST)) { ZVAL_COPY_OR_DUP(&op2_tmp, op2); - zval_update_constant_ex(&op2_tmp, ce); + if (UNEXPECTED(zval_update_constant_ex(&op2_tmp, ce) != SUCCESS)) { + zval_ptr_dtor(&op2_tmp); + return false; + } op2 = &op2_tmp; } @@ -2231,8 +2277,22 @@ static zend_class_entry* find_first_constant_definition(zend_class_entry *ce, ze } /* }}} */ -static bool do_trait_constant_check(zend_class_entry *ce, zend_class_constant *trait_constant, zend_string *name, zend_class_entry **traits, size_t current_trait) /* {{{ */ -{ +static void emit_incompatible_trait_constant_error( + zend_class_entry *ce, zend_class_constant *existing_constant, zend_class_constant *trait_constant, zend_string *name, + zend_class_entry **traits, size_t current_trait +) { + zend_error_noreturn(E_COMPILE_ERROR, + "%s and %s define the same constant (%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed", + ZSTR_VAL(find_first_constant_definition(ce, traits, current_trait, name, existing_constant->ce)->name), + ZSTR_VAL(trait_constant->ce->name), + ZSTR_VAL(name), + ZSTR_VAL(ce->name) + ); +} + +static bool do_trait_constant_check( + zend_class_entry *ce, zend_class_constant *trait_constant, zend_string *name, zend_class_entry **traits, size_t current_trait +) { uint32_t flags_mask = ZEND_ACC_PPP_MASK | ZEND_ACC_FINAL; zval *zv = zend_hash_find_known_hash(&ce->constants_table, name); @@ -2243,21 +2303,32 @@ static bool do_trait_constant_check(zend_class_entry *ce, zend_class_constant *t zend_class_constant *existing_constant = Z_PTR_P(zv); - if ((ZEND_CLASS_CONST_FLAGS(trait_constant) & flags_mask) != (ZEND_CLASS_CONST_FLAGS(existing_constant) & flags_mask) || - !check_trait_property_or_constant_value_compatibility(ce, &trait_constant->value, &existing_constant->value)) { + if ((ZEND_CLASS_CONST_FLAGS(trait_constant) & flags_mask) != (ZEND_CLASS_CONST_FLAGS(existing_constant) & flags_mask)) { + emit_incompatible_trait_constant_error(ce, existing_constant, trait_constant, name, traits, current_trait); + return false; + } + + if (ZEND_TYPE_IS_SET(trait_constant->type) != ZEND_TYPE_IS_SET(existing_constant->type)) { + emit_incompatible_trait_constant_error(ce, existing_constant, trait_constant, name, traits, current_trait); + return false; + } else if (ZEND_TYPE_IS_SET(trait_constant->type)) { + inheritance_status status1 = zend_perform_covariant_type_check(ce, existing_constant->type, traits[current_trait], trait_constant->type); + inheritance_status status2 = zend_perform_covariant_type_check(traits[current_trait], trait_constant->type, ce, existing_constant->type); + if (status1 == INHERITANCE_ERROR || status2 == INHERITANCE_ERROR) { + emit_incompatible_trait_constant_error(ce, existing_constant, trait_constant, name, traits, current_trait); + return false; + } + } + + if (!check_trait_property_or_constant_value_compatibility(ce, &trait_constant->value, &existing_constant->value)) { /* There is an existing constant of the same name, and it conflicts with the new one, so let's throw a fatal error */ - zend_error_noreturn(E_COMPILE_ERROR, - "%s and %s define the same constant (%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed", - ZSTR_VAL(find_first_constant_definition(ce, traits, current_trait, name, existing_constant->ce)->name), - ZSTR_VAL(trait_constant->ce->name), - ZSTR_VAL(name), - ZSTR_VAL(ce->name)); + emit_incompatible_trait_constant_error(ce, existing_constant, trait_constant, name, traits, current_trait); + return false; } /* There is an existing constant which is compatible with the new one, so no need to add it */ return false; } -/* }}} */ static void zend_do_traits_constant_binding(zend_class_entry *ce, zend_class_entry **traits) /* {{{ */ { @@ -2508,7 +2579,8 @@ typedef struct { enum { OBLIGATION_DEPENDENCY, OBLIGATION_COMPATIBILITY, - OBLIGATION_PROPERTY_COMPATIBILITY + OBLIGATION_PROPERTY_COMPATIBILITY, + OBLIGATION_CLASS_CONSTANT_COMPATIBILITY } type; union { zend_class_entry *dependency_ce; @@ -2524,6 +2596,11 @@ typedef struct { const zend_property_info *parent_prop; const zend_property_info *child_prop; }; + struct { + const zend_string *const_name; + const zend_class_constant *parent_const; + const zend_class_constant *child_const; + }; }; } variance_obligation; @@ -2599,6 +2676,18 @@ static void add_property_compatibility_obligation( zend_hash_next_index_insert_ptr(obligations, obligation); } +static void add_class_constant_compatibility_obligation( + zend_class_entry *ce, const zend_class_constant *child_const, + const zend_class_constant *parent_const, const zend_string *const_name) { + HashTable *obligations = get_or_init_obligations_for_class(ce); + variance_obligation *obligation = emalloc(sizeof(variance_obligation)); + obligation->type = OBLIGATION_CLASS_CONSTANT_COMPATIBILITY; + obligation->const_name = const_name; + obligation->child_const = child_const; + obligation->parent_const = parent_const; + zend_hash_next_index_insert_ptr(obligations, obligation); +} + static void resolve_delayed_variance_obligations(zend_class_entry *ce); static void check_variance_obligation(variance_obligation *obligation) { @@ -2622,13 +2711,19 @@ static void check_variance_obligation(variance_obligation *obligation) { &obligation->parent_fn, obligation->parent_scope, status); } /* Either the compatibility check was successful or only threw a warning. */ - } else { - ZEND_ASSERT(obligation->type == OBLIGATION_PROPERTY_COMPATIBILITY); + } else if (obligation->type == OBLIGATION_PROPERTY_COMPATIBILITY) { inheritance_status status = property_types_compatible(obligation->parent_prop, obligation->child_prop); if (status != INHERITANCE_SUCCESS) { emit_incompatible_property_error(obligation->child_prop, obligation->parent_prop); } + } else { + ZEND_ASSERT(obligation->type == OBLIGATION_CLASS_CONSTANT_COMPATIBILITY); + inheritance_status status = + class_constant_types_compatible(obligation->parent_const, obligation->child_const); + if (status != INHERITANCE_SUCCESS) { + emit_incompatible_class_constant_error(obligation->child_const, obligation->parent_const, obligation->const_name); + } } } @@ -3092,6 +3187,7 @@ static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_e zend_string *key; zend_function *parent_func; zend_property_info *parent_info; + zend_class_constant *parent_const; inheritance_status overall_status = INHERITANCE_SUCCESS; ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, parent_func) { @@ -3130,6 +3226,25 @@ static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_e } } ZEND_HASH_FOREACH_END(); + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, parent_const) { + zval *zv; + if ((ZEND_CLASS_CONST_FLAGS(parent_const) & ZEND_ACC_PRIVATE) || !ZEND_TYPE_IS_SET(parent_const->type)) { + continue; + } + + zv = zend_hash_find_known_hash(&ce->constants_table, key); + if (zv) { + zend_class_constant *child_const = Z_PTR_P(zv); + if (ZEND_TYPE_IS_SET(child_const->type)) { + inheritance_status status = class_constant_types_compatible(parent_const, child_const); + ZEND_ASSERT(status != INHERITANCE_WARNING); + if (UNEXPECTED(status != INHERITANCE_SUCCESS)) { + return status; + } + } + } + } ZEND_HASH_FOREACH_END(); + return overall_status; } /* }}} */ diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index d1d54ade4dfd0..9b663887264f0 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -267,7 +267,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type echo_expr_list unset_variables catch_name_list catch_list optional_variable parameter_list class_statement_list %type implements_list case_list if_stmt_without_else %type non_empty_parameter_list argument_list non_empty_argument_list property_list -%type class_const_list class_const_decl class_name_list trait_adaptations method_body non_empty_for_exprs +%type class_const_list first_class_const_decl class_const_decl class_name_list trait_adaptations method_body non_empty_for_exprs %type ctor_arguments alt_if_stmt_without_else trait_adaptation_list lexical_vars %type lexical_var_list encaps_list %type array_pair non_empty_array_pair_list array_pair_list possible_array_pair @@ -812,7 +812,6 @@ parameter: NULL, $6 ? zend_ast_create_zval_from_str($6) : NULL); } ; - optional_type_without_static: %empty { $$ = NULL; } | type_expr_without_static { $$ = $1; } @@ -1077,15 +1076,21 @@ property: class_const_list: class_const_list ',' class_const_decl { $$ = zend_ast_list_add($1, $3); } - | class_const_decl { $$ = zend_ast_create_list(1, ZEND_AST_CLASS_CONST_DECL, $1); } + | first_class_const_decl { $$ = zend_ast_create_list(1, ZEND_AST_CLASS_CONST_DECL, $1); } +; + +first_class_const_decl: + T_STRING '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL), NULL); } + | semi_reserved '=' expr backup_doc_comment { zval zv; if (zend_lex_tstring(&zv, $1) == FAILURE) { YYABORT; } $$ = zend_ast_create(ZEND_AST_CONST_ELEM, zend_ast_create_zval(&zv), $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL), NULL); } + | type_expr identifier '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $2, $4, ($5 ? zend_ast_create_zval_from_str($5) : NULL), $1); } ; class_const_decl: - identifier '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); } + identifier '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL), NULL); } ; const_decl: - T_STRING '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); } + T_STRING '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL), NULL); } ; echo_expr_list: @@ -1317,8 +1322,8 @@ function_call: { $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1, $3, $4); } | variable_class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list { $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1, $3, $4); } - | callable_expr { $$ = CG(zend_lineno); } argument_list { - $$ = zend_ast_create(ZEND_AST_CALL, $1, $3); + | callable_expr { $$ = CG(zend_lineno); } argument_list { + $$ = zend_ast_create(ZEND_AST_CALL, $1, $3); $$->lineno = $2; } ; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index a3a8bde7bd8bb..0b6604217fa35 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5991,8 +5991,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP2(); HANDLE_EXCEPTION(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a48c72d81b79c..21b927c02b895 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7265,8 +7265,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -8419,8 +8418,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); @@ -25084,8 +25082,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -25647,8 +25644,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); @@ -34232,8 +34228,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -34585,8 +34580,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS } } if (Z_TYPE_P(value) == IS_CONSTANT_AST) { - zval_update_constant_ex(value, c->ce); - if (UNEXPECTED(EG(exception) != NULL)) { + if (UNEXPECTED(zend_update_class_constant(c, constant_name, c->ce) != SUCCESS)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); HANDLE_EXCEPTION(); diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 35aa00516b35c..11ab472631b56 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3749,15 +3749,16 @@ static bool preload_try_resolve_constants(zend_class_entry *ce) bool ok, changed, was_changed = false; zend_class_constant *c; zval *val; + zend_string *key; EG(exception) = (void*)(uintptr_t)-1; /* prevent error reporting */ do { ok = true; changed = false; - ZEND_HASH_MAP_FOREACH_PTR(&ce->constants_table, c) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) { val = &c->value; if (Z_TYPE_P(val) == IS_CONSTANT_AST) { - if (EXPECTED(zval_update_constant_ex(val, c->ce) == SUCCESS)) { + if (EXPECTED(zend_update_class_constant(c, key, c->ce) == SUCCESS)) { was_changed = changed = true; } else { ok = false; diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index e1307c8ead04a..f4c9a77996b96 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -692,12 +692,12 @@ static void zend_file_cache_serialize_class_constant(zval *z SERIALIZE_PTR(c->ce); zend_file_cache_serialize_zval(&c->value, script, info, buf); - if (c->doc_comment) { SERIALIZE_STR(c->doc_comment); } SERIALIZE_ATTRIBUTES(c->attributes); + zend_file_cache_serialize_type(&c->type, script, info, buf); } } } @@ -1531,6 +1531,7 @@ static void zend_file_cache_unserialize_class_constant(zval * UNSERIALIZE_STR(c->doc_comment); } UNSERIALIZE_ATTRIBUTES(c->attributes); + zend_file_cache_unserialize_type(&c->type, c->ce, script, buf); } } } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index d7c2d63339107..e21aaa069348a 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -840,6 +840,7 @@ static void zend_persist_class_constant(zval *zv) if (c->attributes) { c->attributes = zend_persist_attributes(c->attributes); } + zend_persist_type(&c->type); } zend_class_entry *zend_persist_class_entry(zend_class_entry *orig_ce) diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 4e3af0d68c653..dfc281eb7f6f7 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -399,6 +399,7 @@ static void zend_persist_class_constant_calc(zval *zv) if (c->attributes) { zend_persist_attributes_calc(c->attributes); } + zend_persist_type_calc(&c->type); } } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 467da74a9b976..2f8acbfb00852 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -297,7 +297,7 @@ static zval *reflection_instantiate(zend_class_entry *pce, zval *object) /* {{{ static void _const_string(smart_str *str, char *name, zval *value, char *indent); static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, char* indent); static void _property_string(smart_str *str, zend_property_info *prop, const char *prop_name, char* indent); -static void _class_const_string(smart_str *str, char *name, zend_class_constant *c, char* indent); +static void _class_const_string(smart_str *str, zend_string *name, zend_class_constant *c, char* indent); static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char *indent); static void _extension_string(smart_str *str, zend_module_entry *module, char *indent); static void _zend_extension_string(smart_str *str, zend_extension *extension, char *indent); @@ -384,7 +384,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char zend_class_constant *c; ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(CE_CONSTANTS_TABLE(ce), key, c) { - _class_const_string(str, ZSTR_VAL(key), c, ZSTR_VAL(sub_indent)); + _class_const_string(str, key, c, ZSTR_VAL(sub_indent)); if (UNEXPECTED(EG(exception))) { zend_string_release(sub_indent); return; @@ -556,17 +556,18 @@ static void _const_string(smart_str *str, char *name, zval *value, char *indent) /* }}} */ /* {{{ _class_const_string */ -static void _class_const_string(smart_str *str, char *name, zend_class_constant *c, char *indent) +static void _class_const_string(smart_str *str, zend_string *name, zend_class_constant *c, char *indent) { - if (zval_update_constant_ex(&c->value, c->ce) == FAILURE) { + if (Z_TYPE(c->value) == IS_CONSTANT_AST && zend_update_class_constant(c, name, c->ce) == FAILURE) { return; } const char *visibility = zend_visibility_string(ZEND_CLASS_CONST_FLAGS(c)); const char *final = ZEND_CLASS_CONST_FLAGS(c) & ZEND_ACC_FINAL ? "final " : ""; - const char *type = zend_zval_type_name(&c->value); + zend_string *type_str = ZEND_TYPE_IS_SET(c->type) ? zend_type_to_string(c->type) : NULL; + const char *type = type_str ? ZSTR_VAL(type_str) : zend_zval_type_name(&c->value); smart_str_append_printf(str, "%sConstant [ %s%s %s %s ] { ", - indent, final, visibility, type, name); + indent, final, visibility, type, ZSTR_VAL(name)); if (Z_TYPE(c->value) == IS_ARRAY) { smart_str_appends(str, "Array"); } else if (Z_TYPE(c->value) == IS_OBJECT) { @@ -578,6 +579,10 @@ static void _class_const_string(smart_str *str, char *name, zend_class_constant zend_tmp_string_release(tmp_value_str); } smart_str_appends(str, " }\n"); + + if (type_str) { + zend_string_release(type_str); + } } /* }}} */ @@ -3796,7 +3801,7 @@ ZEND_METHOD(ReflectionClassConstant, __toString) ZVAL_DEREF(name); ZEND_ASSERT(Z_TYPE_P(name) == IS_STRING); - _class_const_string(&str, Z_STRVAL_P(name), ref, ""); + _class_const_string(&str, Z_STR_P(name), ref, ""); RETURN_STR(smart_str_extract(&str)); } /* }}} */ @@ -3820,6 +3825,39 @@ ZEND_METHOD(ReflectionClassConstant, getName) } /* }}} */ +/* Returns the type associated with the class constant */ +ZEND_METHOD(ReflectionClassConstant, getType) +{ + reflection_object *intern; + zend_class_constant *ref; + + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + + GET_REFLECTION_OBJECT_PTR(ref); + + if (!ZEND_TYPE_IS_SET(ref->type)) { + RETURN_NULL(); + } + + reflection_type_factory(ref->type, return_value, 1); +} + +/* Returns whether class constant has a type */ +ZEND_METHOD(ReflectionClassConstant, hasType) +{ + reflection_object *intern; + zend_class_constant *ref; + + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + + GET_REFLECTION_OBJECT_PTR(ref); + RETVAL_BOOL(ZEND_TYPE_IS_SET(ref->type)); +} + static void _class_constant_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{ */ { reflection_object *intern; @@ -3887,8 +3925,19 @@ ZEND_METHOD(ReflectionClassConstant, getValue) } GET_REFLECTION_OBJECT_PTR(ref); + zval *name = reflection_prop_name(ZEND_THIS); + if (Z_ISUNDEF_P(name)) { + zend_throw_error(NULL, + "Typed property ReflectionClassConstant::$name " + "must not be accessed before initialization"); + RETURN_THROWS(); + } + if (Z_TYPE(ref->value) == IS_CONSTANT_AST) { - zval_update_constant_ex(&ref->value, ref->ce); + zend_result result = zend_update_class_constant(ref, Z_STR_P(name), ref->ce); + if (result == FAILURE) { + RETURN_THROWS(); + } } ZVAL_COPY_OR_DUP(return_value, &ref->value); } @@ -4694,7 +4743,7 @@ ZEND_METHOD(ReflectionClass, getConstants) array_init(return_value); ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(CE_CONSTANTS_TABLE(ce), key, constant) { - if (UNEXPECTED(zval_update_constant_ex(&constant->value, constant->ce) != SUCCESS)) { + if (UNEXPECTED(Z_TYPE(constant->value) == IS_CONSTANT_AST && zend_update_class_constant(constant, key, constant->ce) != SUCCESS)) { RETURN_THROWS(); } @@ -4744,7 +4793,7 @@ ZEND_METHOD(ReflectionClass, getConstant) zend_class_entry *ce; HashTable *constants_table; zend_class_constant *c; - zend_string *name; + zend_string *name, *key; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { RETURN_THROWS(); @@ -4752,8 +4801,8 @@ ZEND_METHOD(ReflectionClass, getConstant) GET_REFLECTION_OBJECT_PTR(ce); constants_table = CE_CONSTANTS_TABLE(ce); - ZEND_HASH_MAP_FOREACH_PTR(constants_table, c) { - if (UNEXPECTED(zval_update_constant_ex(&c->value, c->ce) != SUCCESS)) { + ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(constants_table, key, c) { + if (UNEXPECTED(Z_TYPE(c->value) == IS_CONSTANT_AST && zend_update_class_constant(c, key, c->ce) != SUCCESS)) { RETURN_THROWS(); } } ZEND_HASH_FOREACH_END(); @@ -6954,7 +7003,7 @@ ZEND_METHOD(ReflectionEnumBackedCase, getBackingValue) if (Z_TYPE(ref->value) == IS_CONSTANT_AST) { zval_update_constant_ex(&ref->value, ref->ce); if (EG(exception)) { - return; + RETURN_THROWS(); } } diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 3ecb5f7876500..de0d83d244a85 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -346,7 +346,7 @@ public function getConstants(?int $filter = null): array {} public function getReflectionConstants(?int $filter = null): array {} /** @tentative-return-type */ - public function getConstant(string $name): mixed {} + public function getConstant(string $name): mixed {} // TODO throw exception when the constant doesn't exist /** @tentative-return-type */ public function getReflectionConstant(string $name): ReflectionClassConstant|false {} @@ -609,6 +609,10 @@ public function getDocComment(): string|false {} public function getAttributes(?string $name = null, int $flags = 0): array {} public function isEnumCase(): bool {} + + public function hasType(): bool {} + + public function getType(): ?ReflectionType {} } /** @not-serializable */ diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 708dbbeeb5d63..ddc445f5206d3 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f640c1b592a7e9e7a8e92195df579bfaaa3da6dc */ + * Stub hash: 75d10a475cce503d94bd8471764adf495f0ddd34 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -414,6 +414,10 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClassConstant_isEnumCase arginfo_class_ReflectionFunctionAbstract_hasTentativeReturnType +#define arginfo_class_ReflectionClassConstant_hasType arginfo_class_ReflectionFunctionAbstract_hasTentativeReturnType + +#define arginfo_class_ReflectionClassConstant_getType arginfo_class_ReflectionFunctionAbstract_getTentativeReturnType + #define arginfo_class_ReflectionParameter___clone arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2) @@ -760,6 +764,8 @@ ZEND_METHOD(ReflectionClassConstant, getDeclaringClass); ZEND_METHOD(ReflectionClassConstant, getDocComment); ZEND_METHOD(ReflectionClassConstant, getAttributes); ZEND_METHOD(ReflectionClassConstant, isEnumCase); +ZEND_METHOD(ReflectionClassConstant, hasType); +ZEND_METHOD(ReflectionClassConstant, getType); ZEND_METHOD(ReflectionParameter, __construct); ZEND_METHOD(ReflectionParameter, __toString); ZEND_METHOD(ReflectionParameter, getName); @@ -1046,6 +1052,8 @@ static const zend_function_entry class_ReflectionClassConstant_methods[] = { ZEND_ME(ReflectionClassConstant, getDocComment, arginfo_class_ReflectionClassConstant_getDocComment, ZEND_ACC_PUBLIC) ZEND_ME(ReflectionClassConstant, getAttributes, arginfo_class_ReflectionClassConstant_getAttributes, ZEND_ACC_PUBLIC) ZEND_ME(ReflectionClassConstant, isEnumCase, arginfo_class_ReflectionClassConstant_isEnumCase, ZEND_ACC_PUBLIC) + ZEND_ME(ReflectionClassConstant, hasType, arginfo_class_ReflectionClassConstant_hasType, ZEND_ACC_PUBLIC) + ZEND_ME(ReflectionClassConstant, getType, arginfo_class_ReflectionClassConstant_getType, ZEND_ACC_PUBLIC) ZEND_FE_END }; diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt index 7d563bdf3bc16..33d923d97130c 100644 --- a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt +++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt @@ -28,11 +28,15 @@ function reflectClassConstant($base, $constant) { var_dump($constInfo->getDeclaringClass()); echo "getDocComment():\n"; var_dump($constInfo->getDocComment()); + echo "hasType():\n"; + var_dump($constInfo->hasType()); + echo "getType():\n"; + echo $constInfo->getType() ?? "NULL"; echo "\n**********************************\n"; } class TestClass { - public const /** My Doc comment */ PUB = true; + public const bool /** My Doc comment */ PUB = true; /** Another doc comment */ protected const PROT = 4; private const PRIV = "keepOut"; @@ -76,7 +80,10 @@ object(ReflectionClass)#3 (1) { } getDocComment(): string(21) "/** My Doc comment */" - +hasType(): +bool(true) +getType(): +bool ********************************** ********************************** Reflecting on class constant TestClass::PROT @@ -105,7 +112,10 @@ object(ReflectionClass)#3 (1) { } getDocComment(): string(26) "/** Another doc comment */" - +hasType(): +bool(false) +getType(): +NULL ********************************** ********************************** Reflecting on class constant TestClass::PRIV @@ -134,7 +144,10 @@ object(ReflectionClass)#3 (1) { } getDocComment(): bool(false) - +hasType(): +bool(false) +getType(): +NULL ********************************** ********************************** Reflecting on class constant TestClass::FINAL @@ -163,7 +176,10 @@ object(ReflectionClass)#3 (1) { } getDocComment(): bool(false) - +hasType(): +bool(false) +getType(): +NULL ********************************** ********************************** Reflecting on class constant TestClass::PRIV @@ -192,7 +208,10 @@ object(ReflectionClass)#3 (1) { } getDocComment(): bool(false) - +hasType(): +bool(false) +getType(): +NULL ********************************** Fatal error: Uncaught ReflectionException: Constant TestClass::BAD_CONST does not exist in %s:%d diff --git a/ext/reflection/tests/ReflectionClassConstant_getValue_typed.phpt b/ext/reflection/tests/ReflectionClassConstant_getValue_typed.phpt new file mode 100644 index 0000000000000..f964f4c146fbc --- /dev/null +++ b/ext/reflection/tests/ReflectionClassConstant_getValue_typed.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test variations of getting typed class constant values +--FILE-- +getValue()); +echo $rc; + +$rc = new ReflectionClassConstant(B::class, 'CONST1'); +try { + $rc->getValue(); +} catch (TypeError $e) { + echo $e->getMessage() . "\n"; +} + +try { + echo $rc; +} catch (TypeError $e) { + echo $e->getMessage() . "\n"; +} + +?> +--EXPECT-- +object(stdClass)#1 (0) { +} +Constant [ public object CONST1 ] { Object } +Cannot assign stdClass to class constant B::CONST1 of type array +Cannot assign stdClass to class constant B::CONST1 of type array diff --git a/ext/reflection/tests/ReflectionClass_getConstant_typed.phpt b/ext/reflection/tests/ReflectionClass_getConstant_typed.phpt new file mode 100644 index 0000000000000..c63eaab5d9027 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_getConstant_typed.phpt @@ -0,0 +1,29 @@ +--TEST-- +ReflectionClass::getConstant() with typed class constants +--FILE-- +getConstant("CONST1")); + +$rc = new ReflectionClass(D::class); +try { + $rc->getConstant("CONST1"); +} catch (TypeError $e) { + echo $e->getMessage() . "\n"; +} + +?> +--EXPECT-- +object(stdClass)#1 (0) { +} +Cannot assign stdClass to class constant D::CONST1 of type array diff --git a/ext/reflection/tests/ReflectionClass_toString_006.phpt b/ext/reflection/tests/ReflectionClass_toString_006.phpt new file mode 100644 index 0000000000000..b94467261f682 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_toString_006.phpt @@ -0,0 +1,32 @@ +--TEST-- +Using ReflectionClass::__toString() with typed class constants +--FILE-- + +--EXPECTF-- +Class [ class Foo ] { + @@ %s 3-5 + + - Constants [1] { + Constant [ public ?int CONST1 ] { 1 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } +} diff --git a/ext/reflection/tests/ReflectionClass_toString_007.phpt b/ext/reflection/tests/ReflectionClass_toString_007.phpt new file mode 100644 index 0000000000000..fd3ed8f32e354 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_toString_007.phpt @@ -0,0 +1,20 @@ +--TEST-- +Using ReflectionClass::__toString() with typed class constants when there is a type mismatch +--FILE-- +getMessage() . "\n"; +} + +?> +--EXPECT-- +Cannot assign stdClass to class constant Foo::CONST1 of type array diff --git a/ext/reflection/tests/static_properties_with_typed_class_constants1.phpt b/ext/reflection/tests/static_properties_with_typed_class_constants1.phpt new file mode 100644 index 0000000000000..cebfa1dddd3e0 --- /dev/null +++ b/ext/reflection/tests/static_properties_with_typed_class_constants1.phpt @@ -0,0 +1,24 @@ +--TEST-- +Typed class constant reflection +--FILE-- +getStaticProperties(); +} catch (TypeError $e) { + echo $e->getMessage() . "\n"; +} + +?> +--EXPECT-- +Cannot assign string to class constant Foo::CONST1 of type int diff --git a/ext/standard/tests/constant_with_typed_class_constant.phpt b/ext/standard/tests/constant_with_typed_class_constant.phpt new file mode 100644 index 0000000000000..87a1c006426da --- /dev/null +++ b/ext/standard/tests/constant_with_typed_class_constant.phpt @@ -0,0 +1,25 @@ +--TEST-- +Calling constant() with a typed class constant +--FILE-- +getMessage() . "\n"; +} + +?> +--EXPECT-- +object(stdClass)#1 (0) { +} +Cannot assign stdClass to class constant Foo::CONST2 of type array From 5a4083181b970411d6f3b1c1e3bdd199d5cd1a5e Mon Sep 17 00:00:00 2001 From: Jakub Holubansky Date: Fri, 31 Mar 2023 17:20:35 +0200 Subject: [PATCH 836/895] ext/openssl: pass ini options to extra processes in tests --- ext/openssl/tests/ServerClientTestCase.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/openssl/tests/ServerClientTestCase.inc b/ext/openssl/tests/ServerClientTestCase.inc index 753366df6f4be..1b140b63f6b4a 100644 --- a/ext/openssl/tests/ServerClientTestCase.inc +++ b/ext/openssl/tests/ServerClientTestCase.inc @@ -72,8 +72,9 @@ class ServerClientTestCase ); } else { $cmd = sprintf( - '%s "%s" %s %s', + '%s %s "%s" %s %s', PHP_BINARY, + getenv('TEST_PHP_EXTRA_ARGS'), __FILE__, WORKER_ARGV_VALUE, $worker From b340e10d6e32df0ca586e06d0c9406402b47205f Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 17 Apr 2023 14:15:22 +0200 Subject: [PATCH 837/895] Fix uninitialized memory in parse_ini_string() Introduced by GH-11014 Fixes oss-fuzz #58080 Closes GH-11092 --- Zend/zend_ini_parser.y | 2 ++ Zend/zend_ini_scanner.l | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index dc635176d4de2..1699fddd6e753 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -110,6 +110,7 @@ static void zend_ini_init_string(zval *result) } else { ZVAL_EMPTY_STRING(result); } + Z_EXTRA_P(result) = 0; } /* }}} */ @@ -307,6 +308,7 @@ static void normalize_value(zval *zv) return; } + ZEND_ASSERT(Z_EXTRA_P(zv) == 0 || Z_EXTRA_P(zv) == INI_ZVAL_IS_NUMBER); if (Z_EXTRA_P(zv) == INI_ZVAL_IS_NUMBER && Z_TYPE_P(zv) == IS_STRING) { zval number_rv; if (convert_to_number(&number_rv, Z_STRVAL_P(zv), Z_STRLEN_P(zv)) == SUCCESS) { diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 534b0e938d34f..3c4a22ad35941 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -145,6 +145,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals; if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED && \ (YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW))) {\ zend_ini_copy_typed_value(ini_lval, type, str, len); \ + Z_EXTRA_P(ini_lval) = 0; \ } else { \ zend_ini_copy_value(ini_lval, str, len); \ } \ @@ -598,6 +599,7 @@ end_raw_value_chars: yyleng = YYCURSOR - SCNG(yy_text); zend_ini_escape_string(ini_lval, yytext, yyleng, '"'); + Z_EXTRA_P(ini_lval) = 0; return TC_QUOTED_STRING; } From 31e21f7dbce5ff270c20e7642407a2c2405a6aaf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 14 Apr 2023 10:23:21 +0200 Subject: [PATCH 838/895] Fix GH-11071: Revert "Fix [-Wundef] warning in INTL extension" This reverts commit ea8686540ac43e59dd3f8784e29a0c06e3446df2. --- ext/intl/php_intl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 5826c2e3372f1..a15e166041334 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -286,7 +286,7 @@ PHP_RSHUTDOWN_FUNCTION( intl ) /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION( intl ) { -#ifndef UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING UErrorCode status = U_ZERO_ERROR; const char *tzdata_ver = NULL; #endif @@ -297,7 +297,7 @@ PHP_MINFO_FUNCTION( intl ) #ifdef U_ICU_DATA_VERSION php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION ); #endif -#ifndef UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING tzdata_ver = ucal_getTZDataVersion(&status); if (U_ZERO_ERROR == status) { php_info_print_table_row( 2, "ICU TZData version", tzdata_ver); From 6e8f0f53b157a982895a380f28de6aba7005d3d8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 18 Apr 2023 11:45:50 +0200 Subject: [PATCH 839/895] [ci skip] NEWS for 11071 --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 941f610880700..17294b8297422 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug GH-9397 (exif read : warnings and errors : Potentially invalid endianess, Illegal IFD size and Undefined index). (nielsdos) +- Intl: + . Fixed bug GH-11071 (TZData version not displayed anymore). (Remi) + - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) From 6adf2f65a18079a6f865da5413bde4089db7dc42 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 18 Apr 2023 11:46:18 +0200 Subject: [PATCH 840/895] [ci skip] NEWS for 11071 --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index e9d351c30311d..f50c774b2b025 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug GH-9397 (exif read : warnings and errors : Potentially invalid endianess, Illegal IFD size and Undefined index). (nielsdos) +- Intl: + . Fixed bug GH-11071 (TZData version not displayed anymore). (Remi) + - PCRE: . Fixed bug GH-10968 (Segfault in preg_replace_callback_array()). (ilutov) From 44eef677b077b9635dc98513d2e9f405631ee986 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 17 Apr 2023 18:42:10 +0100 Subject: [PATCH 841/895] Import timelib 2022.06 --- ext/date/lib/interval.c | 119 ++++++++++++---------------------------- ext/date/lib/timelib.h | 6 +- 2 files changed, 37 insertions(+), 88 deletions(-) diff --git a/ext/date/lib/interval.c b/ext/date/lib/interval.c index e3bf5101b1ddd..da9262da999b6 100644 --- a/ext/date/lib/interval.c +++ b/ext/date/lib/interval.c @@ -36,25 +36,6 @@ static void swap_times(timelib_time **one, timelib_time **two, timelib_rel_time rt->invert = 1; } -static void swap_if_negative(timelib_rel_time *rt) -{ - if (rt->y == 0 && rt->m == 0 && rt->d == 0 && rt->h == 0 && rt->i == 0 && rt->s == 0 && rt->us == 0) { - return; - } - if (rt->y >= 0 && rt->m >= 0 && rt->d >= 0 && rt->h >= 0 && rt->i >= 0 && rt->s >= 0 && rt->us >= 0) { - return; - } - - rt->invert = 1 - rt->invert; - rt->y = 0 - rt->y; - rt->m = 0 - rt->m; - rt->d = 0 - rt->d; - rt->h = 0 - rt->h; - rt->i = 0 - rt->i; - rt->s = 0 - rt->s; - rt->us = 0 - rt->us; -} - static void sort_old_to_new(timelib_time **one, timelib_time **two, timelib_rel_time *rt) { /* Check whether date/times need to be inverted. If both times are @@ -115,80 +96,48 @@ static timelib_rel_time *timelib_diff_with_tzid(timelib_time *one, timelib_time rt->days = timelib_diff_days(one, two); /* Fall Back: Cater for transition period, where rt->invert is 0, but there are negative numbers */ - if (one->dst == 1 && two->dst == 0) { - /* First for two "Type 3" times */ - if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID) { - int success = timelib_get_time_zone_offset_info(two->sse, two->tz_info, &trans_offset, &trans_transition_time, NULL); - if ( - success && - one->sse < trans_transition_time && - one->sse >= trans_transition_time + dst_corr - ) { - timelib_sll flipped = SECS_PER_HOUR + (rt->i * 60) + (rt->s); - rt->h = flipped / SECS_PER_HOUR; - rt->i = (flipped - rt->h * SECS_PER_HOUR) / 60; - rt->s = flipped % 60; - } - } else if (rt->h == 0 && (rt->i < 0 || rt->s < 0)) { - /* Then for all the others */ - timelib_sll flipped = SECS_PER_HOUR + (rt->i * 60) + (rt->s); - rt->h = flipped / SECS_PER_HOUR; - rt->i = (flipped - rt->h * SECS_PER_HOUR) / 60; - rt->s = flipped % 60; - dst_corr += SECS_PER_HOUR; - dst_h_corr++; - } + if (two->sse < one->sse) { + timelib_sll flipped = llabs((rt->i * 60) + (rt->s) - dst_corr); + rt->h = flipped / SECS_PER_HOUR; + rt->i = (flipped - rt->h * SECS_PER_HOUR) / 60; + rt->s = flipped % 60; + + rt->invert = 1 - rt->invert; } timelib_do_rel_normalize(rt->invert ? one : two, rt); - /* Do corrections for "Type 3" times with the same TZID */ - if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID && strcmp(one->tz_info->name, two->tz_info->name) == 0) { - if (one->dst == 1 && two->dst == 0) { /* Fall Back */ - if (two->tz_info) { - int success = timelib_get_time_zone_offset_info(two->sse, two->tz_info, &trans_offset, &trans_transition_time, NULL); - - if ( - success && - two->sse >= trans_transition_time && - ((two->sse - one->sse + dst_corr) % SECS_PER_DAY) > (two->sse - trans_transition_time) - ) { - rt->h -= dst_h_corr; - rt->i -= dst_m_corr; - } + if (one->dst == 1 && two->dst == 0) { /* Fall Back */ + if (two->tz_info) { + if ((two->sse - one->sse + dst_corr) < SECS_PER_DAY) { + rt->h -= dst_h_corr; + rt->i -= dst_m_corr; } - } else if (one->dst == 0 && two->dst == 1) { /* Spring Forward */ - if (two->tz_info) { - int success = timelib_get_time_zone_offset_info(two->sse, two->tz_info, &trans_offset, &trans_transition_time, NULL); - - if ( - success && - !((one->sse + SECS_PER_DAY > trans_transition_time) && (one->sse + SECS_PER_DAY <= (trans_transition_time + dst_corr))) && - two->sse >= trans_transition_time && - ((two->sse - one->sse + dst_corr) % SECS_PER_DAY) > (two->sse - trans_transition_time) - ) { - rt->h -= dst_h_corr; - rt->i -= dst_m_corr; - } + } + } else if (one->dst == 0 && two->dst == 1) { /* Spring Forward */ + if (two->tz_info) { + int success = timelib_get_time_zone_offset_info(two->sse, two->tz_info, &trans_offset, &trans_transition_time, NULL); + + if ( + success && + !((one->sse + SECS_PER_DAY > trans_transition_time) && (one->sse + SECS_PER_DAY <= (trans_transition_time + dst_corr))) && + two->sse >= trans_transition_time && + ((two->sse - one->sse + dst_corr) % SECS_PER_DAY) > (two->sse - trans_transition_time) + ) { + rt->h -= dst_h_corr; + rt->i -= dst_m_corr; } - } else if (two->sse - one->sse >= SECS_PER_DAY) { - /* Check whether we're in the period to the next transition time */ - if (timelib_get_time_zone_offset_info(two->sse - two->z, two->tz_info, &trans_offset, &trans_transition_time, NULL)) { - dst_corr = one->z - trans_offset; - - if (two->sse >= trans_transition_time - dst_corr && two->sse < trans_transition_time) { - rt->d--; - rt->h = 24; - } + } + } else if (two->sse - one->sse >= SECS_PER_DAY) { + /* Check whether we're in the period to the next transition time */ + if (timelib_get_time_zone_offset_info(two->sse - two->z, two->tz_info, &trans_offset, &trans_transition_time, NULL)) { + dst_corr = one->z - trans_offset; + + if (two->sse >= trans_transition_time - dst_corr && two->sse < trans_transition_time) { + rt->d--; + rt->h = 24; } } - } else { - rt->h -= dst_h_corr; - rt->i -= dst_m_corr; - - swap_if_negative(rt); - - timelib_do_rel_normalize(rt->invert ? one : two, rt); } return rt; diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 41321ee39824b..97837fcee6cb6 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -30,9 +30,9 @@ # include "timelib_config.h" #endif -#define TIMELIB_VERSION 202205 -#define TIMELIB_EXTENDED_VERSION 20220501 -#define TIMELIB_ASCII_VERSION "2022.05" +#define TIMELIB_VERSION 202206 +#define TIMELIB_EXTENDED_VERSION 20220601 +#define TIMELIB_ASCII_VERSION "2022.06" #include #include From cc7b799c44da67c916df3015a316f1cd1bf9d217 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 17 Apr 2023 18:42:24 +0100 Subject: [PATCH 842/895] Fixed tests --- ext/date/tests/DateTime_diff-fall-type3-type3.phpt | 6 ++---- .../rfc-datetime_and_daylight_saving_time-type3-bd2.phpt | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/date/tests/DateTime_diff-fall-type3-type3.phpt b/ext/date/tests/DateTime_diff-fall-type3-type3.phpt index c360cd4337eea..d69e3808e8410 100644 --- a/ext/date/tests/DateTime_diff-fall-type3-type3.phpt +++ b/ext/date/tests/DateTime_diff-fall-type3-type3.phpt @@ -2,8 +2,6 @@ DateTime::diff() -- fall type3 type3 --CREDITS-- Daniel Convissor ---XFAIL-- -Various bugs exist --FILE-- format($date_format) . ' - ' . $start->format($date_format) echo "\n"; ?> --EXPECT-- -bd0 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = P0DT0H59M59S +bd0 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = P0DT0H0M1S bd5 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT22H bd6 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT21H bd8a 2010-11-07 01:00:00 EST America/New_York - 2010-11-06 01:00:00 EDT America/New_York = P1DT0H From 1dcab8a534aba77cbe62d2d7d150256607d19894 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 18 Apr 2023 13:48:29 +0100 Subject: [PATCH 843/895] Add NEWS entry --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index f50c774b2b025..bd9252a37ead4 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS sapi/apache2handler/sapi_apache2.c). (nielsdos, ElliotNB) . Fixed bug GH-11028 (Heap Buffer Overflow in zval_undefined_cv.). (nielsdos) +- Date: + . Fixed bug where the diff() method would not return the right result around + DST changeover for date/times associated with a timezone identifier. (Derick) + - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). (Nathan Freeman) From af6b4136915c08cb05335b7ba32ed45ade5f1d30 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 19 Apr 2023 16:23:52 +0200 Subject: [PATCH 844/895] [skip ci] Add all conflict to curl --- ext/curl/tests/CONFLICTS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/curl/tests/CONFLICTS b/ext/curl/tests/CONFLICTS index 13368f82902d8..0702cb5bfbb01 100644 --- a/ext/curl/tests/CONFLICTS +++ b/ext/curl/tests/CONFLICTS @@ -1 +1 @@ -curl +all From 0ab51a9561a5bbcd0efd99c75ce0191257330688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 14 Oct 2022 15:58:36 +0200 Subject: [PATCH 845/895] Fix mysql tests with non-standard server port Closes GH-9744 --- ext/mysqli/tests/bug73462.phpt | 6 +++--- ext/mysqli/tests/bug73949.phpt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/mysqli/tests/bug73462.phpt b/ext/mysqli/tests/bug73462.phpt index aa54dbbe5d5cc..a5ae94acffa80 100644 --- a/ext/mysqli/tests/bug73462.phpt +++ b/ext/mysqli/tests/bug73462.phpt @@ -11,14 +11,14 @@ require_once('skipifconnectfailure.inc'); require_once("connect.inc"); /* Initial persistent connection */ - $mysql_1 = new mysqli('p:'.$host, $user, $passwd, $db); + $mysql_1 = new mysqli('p:'.$host, $user, $passwd, $db, $port); $result = $mysql_1->query("SHOW STATUS LIKE 'Connections'"); $c1 = $result->fetch_row(); $result->free(); $mysql_1->close(); /* Failed connection to invalid host */ - $mysql_2 = @new mysqli(' !!! invalid !!! ', $user, $passwd, $db); + $mysql_2 = @new mysqli(' !!! invalid !!! ', $user, $passwd, $db, $port); try { $mysql_2->close(); } catch (Error $exception) { @@ -26,7 +26,7 @@ require_once('skipifconnectfailure.inc'); } /* Re-use persistent connection */ - $mysql_3 = new mysqli('p:'.$host, $user, $passwd, $db); + $mysql_3 = new mysqli('p:'.$host, $user, $passwd, $db, $port); $error = mysqli_connect_errno(); $result = $mysql_3->query("SHOW STATUS LIKE 'Connections'"); $c3 = $result->fetch_row(); diff --git a/ext/mysqli/tests/bug73949.phpt b/ext/mysqli/tests/bug73949.phpt index b706ab20e8819..7c5364c274730 100644 --- a/ext/mysqli/tests/bug73949.phpt +++ b/ext/mysqli/tests/bug73949.phpt @@ -14,7 +14,7 @@ class cc{ function __construct($c=null){ } }; -$i=mysqli_connect('p:'.$host, $user, $passwd, $db); +$i=mysqli_connect('p:'.$host, $user, $passwd, $db, $port); $res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'"); $t=array(new stdClass); while($db= mysqli_fetch_object($res,'cc',$t)){} From 91d3aaaa93bb3ca39de6abdc987315b30e60b99a Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 20 Apr 2023 18:01:43 +1000 Subject: [PATCH 846/895] Bump OCI8 version to make a PECL release for 8.2 --- ext/oci8/README.md | 10 +-- ext/oci8/oci8.c | 2 + ext/oci8/package.xml | 112 ++++++++++++++++++-------------- ext/oci8/php_oci8.h | 2 +- ext/oci8/tests/driver_name.phpt | 6 +- 5 files changed, 75 insertions(+), 57 deletions(-) diff --git a/ext/oci8/README.md b/ext/oci8/README.md index eb2149e21dd95..d0c0c3be09609 100644 --- a/ext/oci8/README.md +++ b/ext/oci8/README.md @@ -4,16 +4,16 @@ Use the OCI8 extension to access Oracle Database. Documentation is at https://www.php.net/oci8 -Use `pecl install oci8` to install for PHP 8. +Use `pecl install oci8` to install for PHP 8.2. -Use `pecl install oci8-2.2.0` to install for PHP 7. +Use `pecl install oci8-3.2.1` to install for PHP 8.1. -Use `pecl install oci8-2.0.12` to install for PHP 5.2 - PHP 5.6. +Use `pecl install oci8-3.0.1` to install for PHP 8.0. -Use `pecl install oci8-1.4.10` to install for PHP 4.3.9 - PHP 5.1. +Use `pecl install oci8-2.2.0` to install for PHP 7. The OCI8 extension can be linked with Oracle client libraries from Oracle -Database 10.2 or later. These libraries are found in your database +Database 11.2 or later. These libraries are found in your database installation, or in the free Oracle Instant Client from https://www.oracle.com/database/technologies/instant-client.html Install the 'Basic' or 'Basic Light' Instant Client package. If building from diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 98e1821568d7d..01cb1c8ad9277 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -51,6 +51,8 @@ #error Use PHP OCI8 2.2 for your version of PHP #elif PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 1 #error Use PHP OCI8 3.0 for your version of PHP +#elif PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2 +#error Use PHP OCI8 3.2 for your version of PHP #endif #include "php_oci8.h" diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index f5ba6005b61c3..63a020750623c 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -10,16 +10,14 @@ http://pear.php.net/dtd/package-2.0.xsd"> The OCI8 extension lets you access Oracle Database. -Use 'pecl install oci8' to install for PHP 8.1. +Use 'pecl install oci8' to install for PHP 8.2. + +Use 'pecl install oci8-3.2.1' to install for PHP 8.1. Use 'pecl install oci8-3.0.1' to install for PHP 8.0. Use 'pecl install oci8-2.2.0' to install for PHP 7. -Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6. - -Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1. - The current OCI8 extension can be linked with Oracle Client libraries from Oracle Database 11.2 or later. (OCI8 3.0 and earlier can be linked with 10g or later). The Oracle Client libraries are in the free Oracle Instant Client from https://www.oracle.com/database/technologies/instant-client.html. They are also included in your database installation. Oracle's standard cross-version connectivity applies. For example, PHP OCI8 linked with Oracle Client 19c can connect to Oracle Database 11.2 onward. See Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1) for details. @@ -55,12 +53,12 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin no - 2021-12-12 + 2023-04-22 - 3.2.1 - 3.2.1 + 3.3.0 + 3.3.0 stable @@ -68,7 +66,7 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin PHP - This version is for PHP 8.1 only. + This version is for PHP 8.2 only. Requires Oracle Client libraries from 11.2 or later. @@ -91,14 +89,14 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - - + - + - + + @@ -111,12 +109,12 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + - + @@ -148,8 +146,8 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + @@ -173,43 +171,44 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - - + - + - + - + - + - + - + - + - + - + - + + - + + + - @@ -219,20 +218,19 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + - + + - - @@ -240,6 +238,7 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin + @@ -258,21 +257,21 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + - - + + @@ -281,7 +280,6 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - @@ -289,14 +287,15 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + + - + @@ -375,33 +374,33 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - - + + - - + - - + + + - + @@ -412,8 +411,8 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin - + @@ -452,6 +451,23 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin + + + 3.2.1 + 3.2.1 + + + stable + stable + + PHP + + This version is for PHP 8.1 only. + + Requires Oracle Client libraries from 11.2 or later. + + + 3.2.0 diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index 5ed8c7bbe72c5..c87c2084d7fd5 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -40,7 +40,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "3.2.1" +#define PHP_OCI8_VERSION "3.3.0" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index 80b4740bc140b..32cb75a5dc0eb 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -57,11 +57,11 @@ function get_attr($conn) ?> --EXPECT-- **Test 1.1 - Default values for the attribute ************** -The value of DRIVER_NAME is PHP OCI8 : 3.2.1 +The value of DRIVER_NAME is PHP OCI8 : 3.3.0 ***Test 1.2 - Get the values from different connections ************** Testing with oci_pconnect() -The value of DRIVER_NAME is PHP OCI8 : 3.2.1 +The value of DRIVER_NAME is PHP OCI8 : 3.3.0 Testing with oci_new_connect() -The value of DRIVER_NAME is PHP OCI8 : 3.2.1 +The value of DRIVER_NAME is PHP OCI8 : 3.3.0 Done From 5855bdcd6c83ce272075bdde42af55e423e441fb Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 20 Apr 2023 10:18:18 +0200 Subject: [PATCH 847/895] Fix reference returned from CallbackFilterIterator::accept() Fixes oss-fuzz #58181 --- Zend/tests/oss_fuzz_58181.phpt | 14 ++++++++++++++ ext/spl/spl_iterators.c | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 Zend/tests/oss_fuzz_58181.phpt diff --git a/Zend/tests/oss_fuzz_58181.phpt b/Zend/tests/oss_fuzz_58181.phpt new file mode 100644 index 0000000000000..36a0ba16d623e --- /dev/null +++ b/Zend/tests/oss_fuzz_58181.phpt @@ -0,0 +1,14 @@ +--TEST-- +oss-fuzz #58181: Fix unexpected reference returned from CallbackFilterIterator::accept() +--FILE-- + true); + $iterator->rewind(); +} + +test(['a', 'b']); +?> +--EXPECTF-- +Notice: Only variable references should be returned by reference in %s on line %d diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 9c7ca4e324481..97253cfe93283 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1787,6 +1787,8 @@ PHP_METHOD(CallbackFilterIterator, accept) if (zend_call_function(fci, fcc) != SUCCESS || Z_ISUNDEF_P(return_value)) { RETURN_FALSE; + } else if (Z_ISREF_P(return_value)) { + zend_unwrap_reference(return_value); } } /* }}} */ From 6f63d4b274f51b792ccfac98bde47e7b4df522e3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 19 Apr 2023 16:59:20 +0200 Subject: [PATCH 848/895] Fix -Wenum-int-mismatch warnings on gcc 13 Closes GH-11103 --- UPGRADING.INTERNALS | 15 +++++++++++++++ Zend/Optimizer/zend_inference.h | 2 +- Zend/zend_API.h | 2 +- Zend/zend_compile.h | 4 ++-- Zend/zend_execute.h | 4 ++-- Zend/zend_ini.h | 4 ++-- Zend/zend_interfaces.c | 5 +++-- Zend/zend_list.h | 2 +- Zend/zend_multibyte.h | 4 ++-- Zend/zend_signal.c | 2 +- Zend/zend_virtual_cwd.h | 4 ++-- ext/session/session.c | 8 ++++---- main/rfc1867.c | 2 +- main/rfc1867.h | 2 +- 14 files changed, 38 insertions(+), 22 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index eecbf26747a74..1309cb34ac6c6 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -51,6 +51,21 @@ PHP 8.3 INTERNALS UPGRADE NOTES variable value. This avoids side-effects through destructors between the assignment of the variable and the assignment to the result zval in the VM (i.e. it may free the new value). See GH-10168 for details. +* The return types of the following functions were changed from int to + zend_result: + - open_file_for_scanning + - php_rfc1867_callback + - virtual_chdir + - zend_execute_scripts + - zend_get_module_started + - zend_handle_undef_args + - zend_list_delete + - zend_multibyte_parse_encoding_list + - zend_multibyte_set_internal_encoding + - zend_parse_ini_file + - zend_parse_ini_string + - zend_set_user_opcode_handler + - zend_ssa_inference ======================== 2. Build system changes diff --git a/Zend/Optimizer/zend_inference.h b/Zend/Optimizer/zend_inference.h index 2266800197936..4e768c4f6d524 100644 --- a/Zend/Optimizer/zend_inference.h +++ b/Zend/Optimizer/zend_inference.h @@ -220,7 +220,7 @@ BEGIN_EXTERN_C() ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa); ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa); -ZEND_API int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level); +ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level); ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, int write, int insert); diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 9c1cf08aa78b3..7c13c5e860b25 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -416,7 +416,7 @@ ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name); ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name); ZEND_API const char *zend_get_module_version(const char *module_name); -ZEND_API int zend_get_module_started(const char *module_name); +ZEND_API zend_result zend_get_module_started(const char *module_name); ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment, zend_type type); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 0ef351ab274a6..d474d13e86d42 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -851,8 +851,8 @@ ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *f ZEND_API zend_op_array *compile_filename(int type, zend_string *filename); ZEND_API zend_ast *zend_compile_string_to_ast( zend_string *code, struct _zend_arena **ast_arena, zend_string *filename); -ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...); -ZEND_API int open_file_for_scanning(zend_file_handle *file_handle); +ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...); +ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle); ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size); ZEND_API void destroy_op_array(zend_op_array *op_array); ZEND_API void zend_destroy_static_vars(zend_op_array *op_array); diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 594561da1bb42..dab902c383cb3 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -404,7 +404,7 @@ ZEND_API bool zend_gcc_global_regs(void); #define ZEND_USER_OPCODE_DISPATCH_TO 0x100 /* call original handler of returned opcode */ -ZEND_API int zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler); +ZEND_API zend_result zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler); ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(uint8_t opcode); ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data); @@ -419,7 +419,7 @@ ZEND_API HashTable *zend_unfinished_execution_gc_ex(zend_execute_data *execute_d zval * ZEND_FASTCALL zend_handle_named_arg( zend_execute_data **call_ptr, zend_string *arg_name, uint32_t *arg_num_ptr, void **cache_slot); -ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call); +ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call); #define CACHE_ADDR(num) \ ((void**)((char*)EX(run_time_cache) + (num))) diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 1618953835339..6ca5658e970d3 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -234,8 +234,8 @@ END_EXTERN_C() /* INI parsing engine */ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg); BEGIN_EXTERN_C() -ZEND_API int zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); -ZEND_API int zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API zend_result zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); END_EXTERN_C() /* INI entries */ diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index d05310b737b01..5d2f7d0ffc4a9 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -118,7 +118,7 @@ static void zend_user_it_dtor(zend_object_iterator *_iter) /* }}} */ /* {{{ zend_user_it_valid */ -ZEND_API int zend_user_it_valid(zend_object_iterator *_iter) +ZEND_API zend_result zend_user_it_valid(zend_object_iterator *_iter) { if (_iter) { zend_user_iterator *iter = (zend_user_iterator*)_iter; @@ -198,7 +198,8 @@ ZEND_API HashTable *zend_user_it_get_gc(zend_object_iterator *_iter, zval **tabl static const zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = { zend_user_it_dtor, - zend_user_it_valid, + // FIXME: Adjust the actual function prototype in zend_object_iterator_funcs + (int (*)(zend_object_iterator *)) zend_user_it_valid, zend_user_it_get_current_data, zend_user_it_get_current_key, zend_user_it_move_forward, diff --git a/Zend/zend_list.h b/Zend/zend_list.h index 680915121e2a6..55ccf78dca106 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -54,7 +54,7 @@ void zend_destroy_rsrc_list_dtors(void); ZEND_API zval* ZEND_FASTCALL zend_list_insert(void *ptr, int type); ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res); -ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res); +ZEND_API zend_result ZEND_FASTCALL zend_list_delete(zend_resource *res); ZEND_API void ZEND_FASTCALL zend_list_close(zend_resource *res); ZEND_API zend_resource *zend_register_resource(void *rsrc_pointer, int rsrc_type); diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 5466840cd900a..b00d57e2f0b22 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -66,12 +66,12 @@ ZEND_API const char *zend_multibyte_get_encoding_name(const zend_encoding *encod ZEND_API int zend_multibyte_check_lexer_compatibility(const zend_encoding *encoding); ZEND_API const zend_encoding *zend_multibyte_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size); ZEND_API size_t zend_multibyte_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from); -ZEND_API int zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent); +ZEND_API zend_result zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent); ZEND_API const zend_encoding *zend_multibyte_get_internal_encoding(void); ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(void); ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size); -ZEND_API int zend_multibyte_set_internal_encoding(const zend_encoding *encoding); +ZEND_API zend_result zend_multibyte_set_internal_encoding(const zend_encoding *encoding); ZEND_API zend_result zend_multibyte_set_script_encoding_by_string(const char *new_value, size_t new_value_length); END_EXTERN_C() diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index 1cad564002ada..f6ca3f40a3e57 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -62,7 +62,7 @@ ZEND_API zend_signal_globals_t zend_signal_globals; #endif static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context); -static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*)); +static zend_result zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*)); #if defined(__CYGWIN__) || defined(__PASE__) /* Matches zend_execute_API.c; these platforms don't support ITIMER_PROF. */ diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h index 728e3ba69d888..f819389af33c7 100644 --- a/Zend/zend_virtual_cwd.h +++ b/Zend/zend_virtual_cwd.h @@ -160,7 +160,7 @@ CWD_API int virtual_cwd_activate(void); CWD_API int virtual_cwd_deactivate(void); CWD_API char *virtual_getcwd_ex(size_t *length); CWD_API char *virtual_getcwd(char *buf, size_t size); -CWD_API int virtual_chdir(const char *path); +CWD_API zend_result virtual_chdir(const char *path); CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path)); CWD_API int virtual_filepath(const char *path, char **filepath); CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path); @@ -260,7 +260,7 @@ extern void virtual_cwd_main_cwd_init(uint8_t); #define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path, flags, mode) #define VCWD_CREAT(path, mode) virtual_creat(path, mode) #define VCWD_CHDIR(path) virtual_chdir(path) -#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir) +#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, (int (*)(const char *)) virtual_chdir) #define VCWD_GETWD(buf) #define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path) #define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname) diff --git a/ext/session/session.c b/ext/session/session.c index a2945b7a31c2b..c3ee25313fbbe 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -56,8 +56,8 @@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps) -static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra); -static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra); +static zend_result php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra); +static zend_result (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra); static void php_session_track_init(void); /* SessionHandler class */ @@ -97,8 +97,8 @@ zend_class_entry *php_session_update_timestamp_iface_entry; #define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies)) -static int php_session_send_cookie(void); -static int php_session_abort(void); +static zend_result php_session_send_cookie(void); +static zend_result php_session_abort(void); /* Initialized in MINIT, readonly otherwise. */ static int my_module_number = 0; diff --git a/main/rfc1867.c b/main/rfc1867.c index 4b1dcff3e23ab..f16af170b6aa8 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -49,7 +49,7 @@ static php_rfc1867_getword_t php_rfc1867_getword = php_ap_getword; static php_rfc1867_getword_conf_t php_rfc1867_getword_conf = php_ap_getword_conf; static php_rfc1867_basename_t php_rfc1867_basename = NULL; -PHPAPI int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra) = NULL; +PHPAPI zend_result (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra) = NULL; static void safe_php_register_variable(char *var, char *strval, size_t val_len, zval *track_vars_array, bool override_protection); diff --git a/main/rfc1867.h b/main/rfc1867.h index e1ec2af87c422..bb690f15aa3e7 100644 --- a/main/rfc1867.h +++ b/main/rfc1867.h @@ -83,7 +83,7 @@ typedef char* (*php_rfc1867_basename_t)(const zend_encoding *encoding, char *str SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler); PHPAPI void destroy_uploaded_files_hash(void); -extern PHPAPI int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra); +extern PHPAPI zend_result (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra); SAPI_API void php_rfc1867_set_multibyte_callbacks( php_rfc1867_encoding_translation_t encoding_translation, From 4c38a79f09d51c483f133c79b47b792f8dc90ebf Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 20 Apr 2023 15:41:50 +0200 Subject: [PATCH 849/895] Fix incorrect CG(memoize_mode) state after bailout in ??= Fixes GH-11108 Closes GH-11109 --- NEWS | 2 ++ Zend/tests/gh11108.phpt | 11 +++++++++++ Zend/tests/gh11108_shutdown.inc | 5 +++++ Zend/tests/gh11108_test.inc | 3 +++ Zend/zend.c | 1 + 5 files changed, 22 insertions(+) create mode 100644 Zend/tests/gh11108.phpt create mode 100644 Zend/tests/gh11108_shutdown.inc create mode 100644 Zend/tests/gh11108_test.inc diff --git a/NEWS b/NEWS index 17294b8297422..cb6c70b760845 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP NEWS . Fixed bug GH-10737 (PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c). (nielsdos, ElliotNB) . Fixed bug GH-11028 (Heap Buffer Overflow in zval_undefined_cv.). (nielsdos) + . Fixed bug GH-11108 (Incorrect CG(memoize_mode) state after bailout in ??=). + (ilutov) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/Zend/tests/gh11108.phpt b/Zend/tests/gh11108.phpt new file mode 100644 index 0000000000000..efbd12dc367fa --- /dev/null +++ b/Zend/tests/gh11108.phpt @@ -0,0 +1,11 @@ +--TEST-- +GH-11108: Incorrect CG(memoize_mode) state after bailout in ??= +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use [] for reading in %s on line %d diff --git a/Zend/tests/gh11108_shutdown.inc b/Zend/tests/gh11108_shutdown.inc new file mode 100644 index 0000000000000..34f8131d4a840 --- /dev/null +++ b/Zend/tests/gh11108_shutdown.inc @@ -0,0 +1,5 @@ + Date: Fri, 21 Apr 2023 06:33:28 +0100 Subject: [PATCH 850/895] ci update freebsd image to the 13.2 image (#11110) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index ceacdf28b8a34..0b5c8c0ad361a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -184,7 +184,7 @@ asan_task: freebsd_task: name: FREEBSD_DEBUG_NTS freebsd_instance: - image_family: freebsd-13-0 + image_family: freebsd-13-2 env: ARCH: amd64 install_script: From 629d7740e8e3d1077ea8cb7f4d11d5d66594943b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 21 Apr 2023 11:29:56 +0100 Subject: [PATCH 851/895] Import timelib 2022.07 to address OSS fuzz issue --- NEWS | 2 ++ ext/date/lib/timelib.h | 6 +++--- ext/date/lib/tm2unixtime.c | 24 +++++++++++++++++++----- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index c12c97fcf2a45..e7c600b29fa6d 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ PHP NEWS - Date: . Fixed bug where the diff() method would not return the right result around DST changeover for date/times associated with a timezone identifier. (Derick) + . Fixed out-of-range bug when converting to/from around the LONG_MIN unix + timestamp. (Derick) - DOM: . Fixed bug #80602 (Segfault when using DOMChildNode::before()). diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 97837fcee6cb6..e385b2e3468c2 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -30,9 +30,9 @@ # include "timelib_config.h" #endif -#define TIMELIB_VERSION 202206 -#define TIMELIB_EXTENDED_VERSION 20220601 -#define TIMELIB_ASCII_VERSION "2022.06" +#define TIMELIB_VERSION 202207 +#define TIMELIB_EXTENDED_VERSION 20220701 +#define TIMELIB_ASCII_VERSION "2022.07" #include #include diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c index 37bfc98fa1d60..f13a9412406f3 100644 --- a/ext/date/lib/tm2unixtime.c +++ b/ext/date/lib/tm2unixtime.c @@ -32,8 +32,16 @@ static int days_in_month[13] = { 31, 31, 28, 31, 30, 31, 30, 31, 3 static void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b) { if (*a < start) { - *b -= (start - *a - 1) / adj + 1; - *a += adj * ((start - *a - 1) / adj + 1); + /* We calculate 'a + 1' first as 'start - *a - 1' causes an int64_t overflows if *a is + * LONG_MIN. 'start' is 0 in this context, and '0 - LONG_MIN > LONG_MAX'. */ + timelib_sll a_plus_1 = *a + 1; + + *b -= (start - a_plus_1) / adj + 1; + + /* This code add the extra 'adj' separately, as otherwise this can overflow int64_t in + * situations where *b is near LONG_MIN. */ + *a += adj * ((start - a_plus_1) / adj); + *a += adj; } if (*a >= end) { *b += *a / adj; @@ -462,9 +470,15 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi) do_adjust_relative(time); do_adjust_special(time); - time->sse = - (timelib_epoch_days_from_time(time) * SECS_PER_DAY) + - timelib_hms_to_seconds(time->h, time->i, time->s); + /* You might be wondering, why this code does this in two steps. This is because + * timelib_epoch_days_from_time(time) * SECS_PER_DAY with the lowest limit of + * timelib_epoch_days_from_time() is less than the range of an int64_t. This then overflows. In + * order to be able to still allow for any time in that day that only halfly fits in the int64_t + * range, we add the time element first, which is always positive, and then twice half the value + * of the earliest day as expressed as unix timestamp. */ + time->sse = timelib_hms_to_seconds(time->h, time->i, time->s); + time->sse += timelib_epoch_days_from_time(time) * (SECS_PER_DAY / 2); + time->sse += timelib_epoch_days_from_time(time) * (SECS_PER_DAY / 2); // This modifies time->sse, if needed do_adjust_timezone(time, tzi); From 976d7ed4c644e958a304b03847e78d135a6e348f Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Thu, 30 Mar 2023 16:29:31 +0100 Subject: [PATCH 852/895] ext/intl: deprecate U_MULTIPLE_DECIMAL_SEPERATORS constant Close GH-10980 --- UPGRADING | 4 ++++ ext/intl/common/common.stub.php | 3 ++- ext/intl/common/common_arginfo.h | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index a22bc46328e90..e3ab9ecb49ef9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -70,6 +70,10 @@ PHP 8.3 UPGRADE NOTES 4. Deprecated Functionality ======================================== +- Intl + . The U_MULTIPLE_DECIMAL_SEPERATORS constant had been deprecated, using + the U_MULTIPLE_DECIMAL_SEPARATORS instead is recommended. + ======================================== 5. Changed Functions ======================================== diff --git a/ext/intl/common/common.stub.php b/ext/intl/common/common.stub.php index cdcca7d413d68..c76ac9f756d4a 100644 --- a/ext/intl/common/common.stub.php +++ b/ext/intl/common/common.stub.php @@ -425,9 +425,10 @@ /** * Typo: kept for backward compatibility. Use U_MULTIPLE_DECIMAL_SEPARATORS * @var int + * @deprecated * @cvalue U_MULTIPLE_DECIMAL_SEPERATORS */ -const U_MULTIPLE_DECIMAL_SEPERATORS = UNKNOWN; // TODO Deprecate +const U_MULTIPLE_DECIMAL_SEPERATORS = UNKNOWN; /** * @var int * @cvalue U_MULTIPLE_EXPONENTIAL_SYMBOLS diff --git a/ext/intl/common/common_arginfo.h b/ext/intl/common/common_arginfo.h index d549e7964c6c2..375a4303e9fec 100644 --- a/ext/intl/common/common_arginfo.h +++ b/ext/intl/common/common_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bc47f841e1bc12324d4c5cfea798fbfb43592c07 */ + * Stub hash: 83971f2cec8c413d6207382e6ebc4ebf500e805f */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlIterator_current, 0, 0, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -115,7 +115,7 @@ static void register_common_symbols(int module_number) REGISTER_LONG_CONSTANT("U_UNEXPECTED_TOKEN", U_UNEXPECTED_TOKEN, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("U_FMT_PARSE_ERROR_START", U_FMT_PARSE_ERROR_START, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("U_MULTIPLE_DECIMAL_SEPARATORS", U_MULTIPLE_DECIMAL_SEPARATORS, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("U_MULTIPLE_DECIMAL_SEPERATORS", U_MULTIPLE_DECIMAL_SEPERATORS, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("U_MULTIPLE_DECIMAL_SEPERATORS", U_MULTIPLE_DECIMAL_SEPERATORS, CONST_PERSISTENT | CONST_DEPRECATED); REGISTER_LONG_CONSTANT("U_MULTIPLE_EXPONENTIAL_SYMBOLS", U_MULTIPLE_EXPONENTIAL_SYMBOLS, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("U_MALFORMED_EXPONENTIAL_PATTERN", U_MALFORMED_EXPONENTIAL_PATTERN, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("U_MULTIPLE_PERCENT_SYMBOLS", U_MULTIPLE_PERCENT_SYMBOLS, CONST_PERSISTENT); From 1209f593cae47d06de643da8afec68002b1032f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 24 Apr 2023 22:39:20 +0200 Subject: [PATCH 853/895] Allow CTE on basic type/math functions (#10842) --- ext/standard/basic_functions.stub.php | 129 ++++++++++++++++++++++--- ext/standard/basic_functions_arginfo.h | 108 ++++++++++----------- 2 files changed, 171 insertions(+), 66 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 2a624f18920ea..9124626b5c5b5 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1722,14 +1722,14 @@ function array_pad(array $array, int $length, mixed $value): array {} /** * @return array - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function array_flip(array $array): array {} /** - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function array_change_key_case(array $array, int $case = CASE_LOWER): array {} @@ -1738,7 +1738,10 @@ function array_change_key_case(array $array, int $case = CASE_LOWER): array {} */ function array_unique(array $array, int $flags = SORT_STRING): array {} -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function array_intersect_key(array $array, array ...$arrays): array {} /** @@ -1747,7 +1750,10 @@ function array_intersect_key(array $array, array ...$arrays): array {} */ function array_intersect_ukey(array $array, ...$rest): array {} -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function array_intersect(array $array, array ...$arrays): array {} /** @@ -1756,7 +1762,10 @@ function array_intersect(array $array, array ...$arrays): array {} */ function array_uintersect(array $array, ...$rest): array {} -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function array_intersect_assoc(array $array, array ...$arrays): array {} /** @@ -1778,8 +1787,8 @@ function array_intersect_uassoc(array $array, ...$rest): array {} function array_uintersect_uassoc(array $array, ...$rest): array {} /** - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function array_diff_key(array $array, array ...$arrays): array {} @@ -1801,8 +1810,8 @@ function array_diff(array $array, array ...$arrays): array {} function array_udiff(array $array, ...$rest): array {} /** - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function array_diff_assoc(array $array, array ...$arrays): array {} @@ -1867,8 +1876,8 @@ function array_is_list(array $array): bool {} /* base64.c */ /** - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function base64_encode(string $string): string {} @@ -2280,8 +2289,8 @@ function wordwrap(string $string, int $width = 75, string $break = "\n", bool $c /** * @return array - * @refcount 1 * @compile-time-eval + * @refcount 1 */ function explode(string $separator, string $string, int $limit = PHP_INT_MAX): array {} @@ -2958,42 +2967,61 @@ function mail(string $to, string $subject, string $message, array|string $additi /* math.c */ +/** @compile-time-eval */ function abs(int|float $num): int|float {} +/** @compile-time-eval */ function ceil(int|float $num): float {} +/** @compile-time-eval */ function floor(int|float $num): float {} +/** @compile-time-eval */ function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} +/** @compile-time-eval */ function sin(float $num): float {} +/** @compile-time-eval */ function cos(float $num): float {} +/** @compile-time-eval */ function tan(float $num): float {} +/** @compile-time-eval */ function asin(float $num): float {} +/** @compile-time-eval */ function acos(float $num): float {} +/** @compile-time-eval */ function atan(float $num): float {} +/** @compile-time-eval */ function atanh(float $num): float {} +/** @compile-time-eval */ function atan2(float $y, float $x): float {} +/** @compile-time-eval */ function sinh(float $num): float {} +/** @compile-time-eval */ function cosh(float $num): float {} +/** @compile-time-eval */ function tanh(float $num): float {} +/** @compile-time-eval */ function asinh(float $num): float {} +/** @compile-time-eval */ function acosh(float $num): float {} +/** @compile-time-eval */ function expm1(float $num): float {} +/** @compile-time-eval */ function log1p(float $num): float {} /** @compile-time-eval */ @@ -3014,18 +3042,25 @@ function is_infinite(float $num): bool {} /** @compile-time-eval */ function pow(mixed $num, mixed $exponent): int|float|object {} +/** @compile-time-eval */ function exp(float $num): float {} +/** @compile-time-eval */ function log(float $num, float $base = M_E): float {} +/** @compile-time-eval */ function log10(float $num): float {} +/** @compile-time-eval */ function sqrt(float $num): float {} +/** @compile-time-eval */ function hypot(float $x, float $y): float {} +/** @compile-time-eval */ function deg2rad(float $num): float {} +/** @compile-time-eval */ function rad2deg(float $num): float {} /** @compile-time-eval */ @@ -3055,14 +3090,26 @@ function decoct(int $num): string {} */ function dechex(int $num): string {} -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function base_convert(string $num, int $from_base, int $to_base): string {} -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function number_format(float $num, int $decimals = 0, ?string $decimal_separator = ".", ?string $thousands_separator = ","): string {} +/** + * @compile-time-eval + */ function fmod(float $num1, float $num2): float {} +/** + * @compile-time-eval + */ function fdiv(float $num1, float $num2): float {} /* microtime.c */ @@ -3088,11 +3135,15 @@ function getrusage(int $mode = 0): array|false {} /* pack.c */ -/** @refcount 1 */ +/** + * @compile-time-eval + * @refcount 1 + */ function pack(string $format, mixed ...$values): string {} /** * @return array|false + * @compile-time-eval * @refcount 1 */ function unpack(string $format, string $string, int $offset = 0): array|false {} @@ -3358,29 +3409,59 @@ function socket_set_timeout($stream, int $seconds, int $microseconds = 0): bool /* type.c */ +/** + * @compile-time-eval + */ function gettype(mixed $value): string {} +/** + * @compile-time-eval + */ function get_debug_type(mixed $value): string {} function settype(mixed &$var, string $type): bool {} +/** + * @compile-time-eval + */ function intval(mixed $value, int $base = 10): int {} +/** + * @compile-time-eval + */ function floatval(mixed $value): float {} /** @alias floatval */ function doubleval(mixed $value): float {} +/** + * @compile-time-eval + */ function boolval(mixed $value): bool {} +/** + * @compile-time-eval + */ function strval(mixed $value): string {} +/** + * @compile-time-eval + */ function is_null(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_resource(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_bool(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_int(mixed $value): bool {} /** @alias is_int */ @@ -3389,26 +3470,50 @@ function is_integer(mixed $value): bool {} /** @alias is_int */ function is_long(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_float(mixed $value): bool {} /** @alias is_float */ function is_double(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_numeric(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_string(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_array(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_object(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_scalar(mixed $value): bool {} /** @param string $callable_name */ function is_callable(mixed $value, bool $syntax_only = false, &$callable_name = null): bool {} +/** + * @compile-time-eval + */ function is_iterable(mixed $value): bool {} +/** + * @compile-time-eval + */ function is_countable(mixed $value): bool {} /* uniqid.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 61822b406729d..bb46fb87090f6 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 22d7938e2402143250c99e110b2ab06ae8270a0b */ + * Stub hash: 73f82e392f5adf146b9b8dfb39496b3ce8465115 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -2897,11 +2897,11 @@ static const zend_function_entry ext_functions[] = { ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_flip, arginfo_array_flip) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_change_key_case, arginfo_array_change_key_case) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_unique, arginfo_array_unique) - ZEND_FE(array_intersect_key, arginfo_array_intersect_key) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_intersect_key, arginfo_array_intersect_key) ZEND_FE(array_intersect_ukey, arginfo_array_intersect_ukey) - ZEND_FE(array_intersect, arginfo_array_intersect) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_intersect, arginfo_array_intersect) ZEND_FE(array_uintersect, arginfo_array_uintersect) - ZEND_FE(array_intersect_assoc, arginfo_array_intersect_assoc) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(array_intersect_assoc, arginfo_array_intersect_assoc) ZEND_FE(array_uintersect_assoc, arginfo_array_uintersect_assoc) ZEND_FE(array_intersect_uassoc, arginfo_array_intersect_uassoc) ZEND_FE(array_uintersect_uassoc, arginfo_array_uintersect_uassoc) @@ -3277,48 +3277,48 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(link, arginfo_link) #endif ZEND_FE(mail, arginfo_mail) - ZEND_FE(abs, arginfo_abs) - ZEND_FE(ceil, arginfo_ceil) - ZEND_FE(floor, arginfo_floor) - ZEND_FE(round, arginfo_round) - ZEND_FE(sin, arginfo_sin) - ZEND_FE(cos, arginfo_cos) - ZEND_FE(tan, arginfo_tan) - ZEND_FE(asin, arginfo_asin) - ZEND_FE(acos, arginfo_acos) - ZEND_FE(atan, arginfo_atan) - ZEND_FE(atanh, arginfo_atanh) - ZEND_FE(atan2, arginfo_atan2) - ZEND_FE(sinh, arginfo_sinh) - ZEND_FE(cosh, arginfo_cosh) - ZEND_FE(tanh, arginfo_tanh) - ZEND_FE(asinh, arginfo_asinh) - ZEND_FE(acosh, arginfo_acosh) - ZEND_FE(expm1, arginfo_expm1) - ZEND_FE(log1p, arginfo_log1p) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(abs, arginfo_abs) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(ceil, arginfo_ceil) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(floor, arginfo_floor) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(round, arginfo_round) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(sin, arginfo_sin) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(cos, arginfo_cos) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(tan, arginfo_tan) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(asin, arginfo_asin) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(acos, arginfo_acos) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(atan, arginfo_atan) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(atanh, arginfo_atanh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(atan2, arginfo_atan2) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(sinh, arginfo_sinh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(cosh, arginfo_cosh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(tanh, arginfo_tanh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(asinh, arginfo_asinh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(acosh, arginfo_acosh) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(expm1, arginfo_expm1) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(log1p, arginfo_log1p) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(pi, arginfo_pi) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_finite, arginfo_is_finite) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_nan, arginfo_is_nan) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(intdiv, arginfo_intdiv) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_infinite, arginfo_is_infinite) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(pow, arginfo_pow) - ZEND_FE(exp, arginfo_exp) - ZEND_FE(log, arginfo_log) - ZEND_FE(log10, arginfo_log10) - ZEND_FE(sqrt, arginfo_sqrt) - ZEND_FE(hypot, arginfo_hypot) - ZEND_FE(deg2rad, arginfo_deg2rad) - ZEND_FE(rad2deg, arginfo_rad2deg) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(exp, arginfo_exp) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(log, arginfo_log) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(log10, arginfo_log10) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(sqrt, arginfo_sqrt) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(hypot, arginfo_hypot) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(deg2rad, arginfo_deg2rad) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(rad2deg, arginfo_rad2deg) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(bindec, arginfo_bindec) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(hexdec, arginfo_hexdec) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(octdec, arginfo_octdec) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(decbin, arginfo_decbin) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(decoct, arginfo_decoct) ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(dechex, arginfo_dechex) - ZEND_FE(base_convert, arginfo_base_convert) - ZEND_FE(number_format, arginfo_number_format) - ZEND_FE(fmod, arginfo_fmod) - ZEND_FE(fdiv, arginfo_fdiv) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(base_convert, arginfo_base_convert) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(number_format, arginfo_number_format) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(fmod, arginfo_fmod) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(fdiv, arginfo_fdiv) #if defined(HAVE_GETTIMEOFDAY) ZEND_FE(microtime, arginfo_microtime) #endif @@ -3328,8 +3328,8 @@ static const zend_function_entry ext_functions[] = { #if defined(HAVE_GETRUSAGE) ZEND_FE(getrusage, arginfo_getrusage) #endif - ZEND_FE(pack, arginfo_pack) - ZEND_FE(unpack, arginfo_unpack) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(pack, arginfo_pack) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(unpack, arginfo_unpack) ZEND_FE(password_get_info, arginfo_password_get_info) ZEND_FE(password_hash, arginfo_password_hash) ZEND_FE(password_needs_rehash, arginfo_password_needs_rehash) @@ -3400,30 +3400,30 @@ static const zend_function_entry ext_functions[] = { #if (defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32)) ZEND_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_socket_set_timeout) #endif - ZEND_FE(gettype, arginfo_gettype) - ZEND_FE(get_debug_type, arginfo_get_debug_type) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(gettype, arginfo_gettype) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(get_debug_type, arginfo_get_debug_type) ZEND_FE(settype, arginfo_settype) - ZEND_FE(intval, arginfo_intval) - ZEND_FE(floatval, arginfo_floatval) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(intval, arginfo_intval) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(floatval, arginfo_floatval) ZEND_FALIAS(doubleval, floatval, arginfo_doubleval) - ZEND_FE(boolval, arginfo_boolval) - ZEND_FE(strval, arginfo_strval) - ZEND_FE(is_null, arginfo_is_null) - ZEND_FE(is_resource, arginfo_is_resource) - ZEND_FE(is_bool, arginfo_is_bool) - ZEND_FE(is_int, arginfo_is_int) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(boolval, arginfo_boolval) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(strval, arginfo_strval) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_null, arginfo_is_null) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_resource, arginfo_is_resource) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_bool, arginfo_is_bool) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_int, arginfo_is_int) ZEND_FALIAS(is_integer, is_int, arginfo_is_integer) ZEND_FALIAS(is_long, is_int, arginfo_is_long) - ZEND_FE(is_float, arginfo_is_float) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_float, arginfo_is_float) ZEND_FALIAS(is_double, is_float, arginfo_is_double) - ZEND_FE(is_numeric, arginfo_is_numeric) - ZEND_FE(is_string, arginfo_is_string) - ZEND_FE(is_array, arginfo_is_array) - ZEND_FE(is_object, arginfo_is_object) - ZEND_FE(is_scalar, arginfo_is_scalar) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_numeric, arginfo_is_numeric) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_string, arginfo_is_string) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_array, arginfo_is_array) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_object, arginfo_is_object) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_scalar, arginfo_is_scalar) ZEND_FE(is_callable, arginfo_is_callable) - ZEND_FE(is_iterable, arginfo_is_iterable) - ZEND_FE(is_countable, arginfo_is_countable) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_iterable, arginfo_is_iterable) + ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(is_countable, arginfo_is_countable) #if defined(HAVE_GETTIMEOFDAY) ZEND_FE(uniqid, arginfo_uniqid) #endif From 947eb95241ad34b472cefde03683b00ec45cac01 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 24 Apr 2023 23:18:05 +0200 Subject: [PATCH 854/895] Allow array functions to operate in-place if the refcount is 1 (#11060) This allows array_merge, array_intersect, array_replace, array_unique and usort to avoid taking a copy and do the transformation in-place. ** Safety ** There are some array functions which take a copy of the input array into a temporary C array for sorting purposes. (e.g. array_unique, array_diff, and array_intersect do this). Since we no longer take a copy in all cases, we must check if it's possible that a value is accessed that was already destroyed. For array_unique: cmpdata will never be removed so that will never reach refcount 0. And when something is removed, it is the previous value of cmpdata, not the one user later. So this seems okay. For array_intersect: a previous pointer (ptr[0] - 1) is accessed. But this can't be a destroyed value because the pointer is first moved forward. For array_diff: it's possible a previous pointer is accessed after destruction. So we can't optimise this case easily. --- Zend/zend_types.h | 5 +++ ext/standard/array.c | 96 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 80 insertions(+), 21 deletions(-) diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 3f84781b66d3e..c341ffa0b4d8c 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -1507,4 +1507,9 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) { do { ZVAL_COPY_OR_DUP(z, v); Z_PROP_FLAG_P(z) = Z_PROP_FLAG_P(v); } while (0) +static zend_always_inline bool zend_may_modify_arg_in_place(const zval *arg) +{ + return Z_REFCOUNTED_P(arg) && !(GC_FLAGS(Z_COUNTED_P(arg)) & (GC_IMMUTABLE | GC_PERSISTENT)) && Z_REFCOUNT_P(arg) == 1; +} + #endif /* ZEND_TYPES_H */ diff --git a/ext/standard/array.c b/ext/standard/array.c index b442e4453df1f..5399706320d19 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -901,11 +901,19 @@ static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compar RETURN_TRUE; } - /* Copy array, so the in-place modifications will not be visible to the callback function */ - arr = zend_array_dup(arr); + /* Copy array, so the in-place modifications will not be visible to the callback function. + * Unless there are no other references since we know for sure it won't be visible. */ + bool in_place = zend_may_modify_arg_in_place(array); + if (!in_place) { + arr = zend_array_dup(arr); + } zend_hash_sort(arr, compare_func, renumber); + if (in_place) { + GC_ADDREF(arr); + } + zval garbage; ZVAL_COPY_VALUE(&garbage, array); ZVAL_ARR(array, arr); @@ -3866,10 +3874,17 @@ static zend_always_inline void php_array_replace_wrapper(INTERNAL_FUNCTION_PARAM } } - /* copy first array */ + /* copy first array if necessary */ arg = args; - dest = zend_array_dup(Z_ARRVAL_P(arg)); + bool in_place = zend_may_modify_arg_in_place(arg); + if (in_place) { + dest = Z_ARRVAL_P(arg); + } else { + dest = zend_array_dup(Z_ARRVAL_P(arg)); + } + ZVAL_ARR(return_value, dest); + if (recursive) { for (i = 1; i < argc; i++) { arg = args + i; @@ -3881,6 +3896,10 @@ static zend_always_inline void php_array_replace_wrapper(INTERNAL_FUNCTION_PARAM zend_hash_merge(dest, Z_ARRVAL_P(arg), zval_add_ref, 1); } } + + if (in_place) { + GC_ADDREF(dest); + } } /* }}} */ @@ -3945,22 +3964,34 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET arg = args; src = Z_ARRVAL_P(arg); - /* copy first array */ - array_init_size(return_value, count); - dest = Z_ARRVAL_P(return_value); + /* copy first array if necessary */ + bool in_place = false; if (HT_IS_PACKED(src)) { - zend_hash_real_init_packed(dest); - ZEND_HASH_FILL_PACKED(dest) { - ZEND_HASH_PACKED_FOREACH_VAL(src, src_entry) { - if (UNEXPECTED(Z_ISREF_P(src_entry) && - Z_REFCOUNT_P(src_entry) == 1)) { - src_entry = Z_REFVAL_P(src_entry); - } - Z_TRY_ADDREF_P(src_entry); - ZEND_HASH_FILL_ADD(src_entry); - } ZEND_HASH_FOREACH_END(); - } ZEND_HASH_FILL_END(); + /* Note: If it has holes, it might get sequentialized */ + if (HT_IS_WITHOUT_HOLES(src) && zend_may_modify_arg_in_place(arg)) { + dest = src; + in_place = true; + ZVAL_ARR(return_value, dest); + } else { + array_init_size(return_value, count); + dest = Z_ARRVAL_P(return_value); + + zend_hash_real_init_packed(dest); + ZEND_HASH_FILL_PACKED(dest) { + ZEND_HASH_PACKED_FOREACH_VAL(src, src_entry) { + if (UNEXPECTED(Z_ISREF_P(src_entry) && + Z_REFCOUNT_P(src_entry) == 1)) { + src_entry = Z_REFVAL_P(src_entry); + } + Z_TRY_ADDREF_P(src_entry); + ZEND_HASH_FILL_ADD(src_entry); + } ZEND_HASH_FOREACH_END(); + } ZEND_HASH_FILL_END(); + } } else { + array_init_size(return_value, count); + dest = Z_ARRVAL_P(return_value); + zend_string *string_key; zend_hash_real_init_mixed(dest); ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(src, string_key, src_entry) { @@ -3987,6 +4018,10 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET php_array_merge(dest, Z_ARRVAL_P(arg)); } } + + if (in_place) { + GC_ADDREF(dest); + } } /* }}} */ @@ -4594,7 +4629,12 @@ PHP_FUNCTION(array_unique) cmp = php_get_data_compare_func_unstable(sort_type, 0); - RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(array))); + bool in_place = zend_may_modify_arg_in_place(array); + if (in_place) { + RETVAL_ARR(Z_ARRVAL_P(array)); + } else { + RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(array))); + } /* create and sort array with pointers to the target_hash buckets */ arTmp = pemalloc((Z_ARRVAL_P(array)->nNumOfElements + 1) * sizeof(struct bucketindex), GC_FLAGS(Z_ARRVAL_P(array)) & IS_ARRAY_PERSISTENT); @@ -4640,6 +4680,10 @@ PHP_FUNCTION(array_unique) } } pefree(arTmp, GC_FLAGS(Z_ARRVAL_P(array)) & IS_ARRAY_PERSISTENT); + + if (in_place) { + Z_ADDREF_P(return_value); + } } /* }}} */ @@ -4764,6 +4808,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int zend_fcall_info *fci_key = NULL, *fci_data; zend_fcall_info_cache *fci_key_cache = NULL, *fci_data_cache; PHP_ARRAY_CMP_FUNC_VARS; + bool in_place = false; bucket_compare_func_t intersect_key_compare_func; bucket_compare_func_t intersect_data_compare_func; @@ -4890,8 +4935,13 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int } } - /* copy the argument array */ - RETVAL_ARR(zend_array_dup(Z_ARRVAL(args[0]))); + /* copy the argument array if necessary */ + in_place = zend_may_modify_arg_in_place(&args[0]); + if (in_place) { + RETVAL_ARR(Z_ARRVAL_P(&args[0])); + } else { + RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(&args[0]))); + } /* go through the lists and look for common values */ while (Z_TYPE(ptrs[0]->val) != IS_UNDEF) { @@ -5002,6 +5052,10 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int efree(ptrs); efree(lists); + + if (in_place) { + Z_ADDREF_P(return_value); + } } /* }}} */ From 691ff9f845f11ed6f5d187d7a781ad86d689bf76 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 4 Mar 2023 01:45:46 +0100 Subject: [PATCH 855/895] Set error_log to an empty value if the test relies on that feature Some tests fail if the error_log is overriden by the loaded ini configuration. Explicitly set it to an empty value to prevent the failures. See https://github.com/php/php-src/issues/10737#issuecomment-1452899299 Closes GH-10772. --- Zend/tests/bug39542.phpt | 2 ++ Zend/tests/bug79919.phpt | 2 ++ ext/opcache/tests/jit/bug80861.phpt | 1 + 3 files changed, 5 insertions(+) diff --git a/Zend/tests/bug39542.phpt b/Zend/tests/bug39542.phpt index 79c1c56e9185b..d2023673ef0b5 100644 --- a/Zend/tests/bug39542.phpt +++ b/Zend/tests/bug39542.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0) +--INI-- +error_log= --FILE-- Date: Tue, 25 Apr 2023 16:18:30 +0200 Subject: [PATCH 856/895] PHP-8.1 is now for PHP 8.1.20-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index cb6c70b760845..49a182e388476 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.1.19 +?? ??? ????, PHP 8.1.20 + + +11 May 2023, PHP 8.1.19 - Core: . Fix inconsistent float negation in constant expressions. (ilutov) diff --git a/Zend/zend.h b/Zend/zend.h index 863d06499c9c8..5c3c1de49d5ce 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.1.19-dev" +#define ZEND_VERSION "4.1.20-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 235a0bb304d97..166d313f133bc 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.19-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.20-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index d42ff869a27b1..8b01d87fbacc1 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 19 +#define PHP_RELEASE_VERSION 20 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.19-dev" -#define PHP_VERSION_ID 80119 +#define PHP_VERSION "8.1.20-dev" +#define PHP_VERSION_ID 80120 From 04a5f2b11f5f1a1421f13a821cbc8864940a4934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 25 Apr 2023 17:17:05 +0200 Subject: [PATCH 857/895] Add test to make sure that readonly properties cannot be reassigned by invoking the __clone() method directly --- .../readonly_props/readonly_clone_error6.phpt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Zend/tests/readonly_props/readonly_clone_error6.phpt diff --git a/Zend/tests/readonly_props/readonly_clone_error6.phpt b/Zend/tests/readonly_props/readonly_clone_error6.phpt new file mode 100644 index 0000000000000..16a04d802a11f --- /dev/null +++ b/Zend/tests/readonly_props/readonly_clone_error6.phpt @@ -0,0 +1,47 @@ +--TEST-- +Test that readonly properties cannot be reassigned by invoking the __clone() method directly +--FILE-- +bar = 1; + } +} + +$foo = new Foo(0); + +var_dump($foo); + +try { + $foo->__clone(); +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} + +try { + $foo->__clone(); +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} + +var_dump($foo); + +?> +--EXPECTF-- +object(Foo)#%d (%d) { + ["bar"]=> + int(0) +} +Cannot modify readonly property Foo::$bar +Cannot modify readonly property Foo::$bar +object(Foo)#%d (%d) { + ["bar"]=> + int(0) +} From 8318f4a6b1b0f871c2f6373ca4a98fe6ce59ff68 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 25 Apr 2023 18:33:13 +0300 Subject: [PATCH 858/895] PHP-8.2 is now for PHP 8.2.7-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index e7c600b29fa6d..7f8e7a22b3263 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.2.6 +?? ??? ????, PHP 8.2.7 + + +11 May 2023, PHP 8.2.6 - Core: . Fix inconsistent float negation in constant expressions. (ilutov) diff --git a/Zend/zend.h b/Zend/zend.h index f5ea5dc911603..cd10119651ba8 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.2.6-dev" +#define ZEND_VERSION "4.2.7-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 899ead28d3dbf..e95a37fd428e0 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.2.6-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.2.7-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 1ce7c926d8697..f24a3aa56bcde 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 6 +#define PHP_RELEASE_VERSION 7 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.2.6-dev" -#define PHP_VERSION_ID 80206 +#define PHP_VERSION "8.2.7-dev" +#define PHP_VERSION_ID 80207 From f89fe830f2bc9337c372a5af8422b4dd241e652b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 26 Apr 2023 15:12:01 +0200 Subject: [PATCH 859/895] Minor conditions simplify (#10397) --- ext/phar/phar.c | 2 +- ext/phar/phar_object.c | 2 +- ext/phar/util.c | 2 +- sapi/fpm/status.html.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index c4eed6b60e2c5..d2713c2a6f652 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1965,7 +1965,7 @@ int phar_detect_phar_fname_ext(const char *filename, size_t filename_len, const *ext_str = NULL; *ext_len = 0; - if (!filename_len || filename_len == 1) { + if (filename_len <= 1) { return FAILURE; } diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index b009c0347ce60..47a4ca541d12e 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -496,7 +496,7 @@ PHP_METHOD(Phar, mount) zend_throw_exception_ex(phar_ce_PharException, 0, "Mounting of %s to %s within phar %s failed", path, actual, arch); } - if (entry && path && path == entry) { + if (entry && path == entry) { efree(entry); } diff --git a/ext/phar/util.c b/ext/phar/util.c index 50a2e7a662723..edd10dc3837af 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1257,7 +1257,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, si } if (is_dir) { - if (!path_len || path_len == 1) { + if (path_len <= 1) { return NULL; } path_len--; diff --git a/sapi/fpm/status.html.in b/sapi/fpm/status.html.in index d3b6d5efd3e59..b87a446f59f66 100644 --- a/sapi/fpm/status.html.in +++ b/sapi/fpm/status.html.in @@ -215,7 +215,7 @@ doc_rate.disabled = false; } else { delay = parseInt(doc_rate.value); - if (!delay || delay < 1) { + if (isNaN(delay) || delay < 1) { doc_status.innerHTML = "Not valid 'refresh' value"; return; } From 3a76f795f8543aca37df6bb8b63a860d9701e62d Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 26 Apr 2023 11:55:23 +0200 Subject: [PATCH 860/895] Fix incorrect match default branch optimization Fixes GH-11134 Closes GH-11135 --- NEWS | 2 ++ Zend/Optimizer/dfa_pass.c | 29 +++++++++++++++++++---------- Zend/tests/match/gh11134.phpt | 28 ++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 Zend/tests/match/gh11134.phpt diff --git a/NEWS b/NEWS index 49a182e388476..d6da8fdab79f2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.20 +- Opcache: + . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) 11 May 2023, PHP 8.1.19 diff --git a/Zend/Optimizer/dfa_pass.c b/Zend/Optimizer/dfa_pass.c index 754dec7ee60cf..0087e957ff395 100644 --- a/Zend/Optimizer/dfa_pass.c +++ b/Zend/Optimizer/dfa_pass.c @@ -1000,32 +1000,41 @@ static int zend_dfa_optimize_jmps(zend_op_array *op_array, zend_ssa *ssa) || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); - if (!correct_type) { + /* Switch statements have a fallback chain for loose comparison. In those + * cases the SWITCH_* instruction is a NOP. Match does strict comparison and + * thus jumps to the default branch on mismatched types, so we need to + * convert MATCH to a jmp. */ + if (!correct_type && opline->opcode != ZEND_MATCH) { removed_ops++; MAKE_NOP(opline); opline->extended_value = 0; take_successor_ex(ssa, block_num, block, block->successors[block->successors_count - 1]); goto optimize_nop; - } else { + } + + uint32_t target; + if (correct_type) { HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); zval *jmp_zv = type == IS_LONG ? zend_hash_index_find(jmptable, Z_LVAL_P(zv)) : zend_hash_find(jmptable, Z_STR_P(zv)); - uint32_t target; if (jmp_zv) { target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(jmp_zv)); } else { target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); } - opline->opcode = ZEND_JMP; - opline->extended_value = 0; - SET_UNUSED(opline->op1); - ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + target); - SET_UNUSED(opline->op2); - take_successor_ex(ssa, block_num, block, ssa->cfg.map[target]); - goto optimize_jmp; + } else { + ZEND_ASSERT(opline->opcode == ZEND_MATCH); + target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); } + opline->opcode = ZEND_JMP; + opline->extended_value = 0; + SET_UNUSED(opline->op1); + ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + target); + SET_UNUSED(opline->op2); + take_successor_ex(ssa, block_num, block, ssa->cfg.map[target]); + goto optimize_jmp; } break; case ZEND_NOP: diff --git a/Zend/tests/match/gh11134.phpt b/Zend/tests/match/gh11134.phpt new file mode 100644 index 0000000000000..94e3223d2a07a --- /dev/null +++ b/Zend/tests/match/gh11134.phpt @@ -0,0 +1,28 @@ +--TEST-- +GH-11134: Incorrect match optimization +--FILE-- + 'foo', + 'bar' => 'bar', + default => 'baz', + }; +} + +function testSwitch() { + switch ($unset ?? null) { + case 'foo': return 'foo'; + case 'bar': return 'bar'; + default: return 'baz'; + } +} + +var_dump(testMatch()); +var_dump(testSwitch()); + +?> +--EXPECT-- +string(3) "baz" +string(3) "baz" From 7b4b40f06f39f1dc05fc4be8531fa3d582062488 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 22 Apr 2023 17:44:42 +0100 Subject: [PATCH 861/895] ext/sockets: addig Linux's IP_BIND_ADDRESS_NO_PORT. Delay ephemeral port number attribution at connect time rather than at bind's one. Close GH-11119. --- NEWS | 1 + UPGRADING | 1 + ext/sockets/sockets.stub.php | 7 +++++++ ext/sockets/sockets_arginfo.h | 5 ++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a458ae4151d32..2de7df7d29d7b 100644 --- a/NEWS +++ b/NEWS @@ -159,6 +159,7 @@ PHP NEWS (David Carlier) . Added TCP_REPAIR for quietly close a connection. (David Carlier) . Added SO_REUSEPORT_LB freebsd constant. (David Carlier) + . Added IP_BIND_ADDRESS_NO_PORT. (David Carlier) - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) diff --git a/UPGRADING b/UPGRADING index e3ab9ecb49ef9..7920c62ccecfc 100644 --- a/UPGRADING +++ b/UPGRADING @@ -235,6 +235,7 @@ PHP 8.3 UPGRADE NOTES . SO_SPLICE (OpenBSD only). . TCP_REPAIR (Linux only). . SO_REUSEPORT_LB (FreeBSD only). + . IP_BIND_ADDRESS_NO_PORT (Linux only). ======================================== 11. Changes to INI File Handling diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index c0007a8f938cd..6860cea3aacf2 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -642,6 +642,13 @@ * @cvalue IP_MULTICAST_LOOP */ const IP_MULTICAST_LOOP = UNKNOWN; +#ifdef IP_BIND_ADDRESS_NO_PORT +/** + * @var int + * @cvalue IP_BIND_ADDRESS_NO_PORT + */ +const IP_BIND_ADDRESS_NO_PORT = UNKNOWN; +#endif #if HAVE_IPV6 /** * @var int diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index dbc88406d8f8a..ae9334d6b6743 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b8ca31ff65d450afac0d7e555311f57193b003c4 */ + * Stub hash: a64427da8198261f528a38c5bf90c673eb5b8282 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -576,6 +576,9 @@ static void register_sockets_symbols(int module_number) REGISTER_LONG_CONSTANT("IP_MULTICAST_IF", IP_MULTICAST_IF, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IP_MULTICAST_TTL", IP_MULTICAST_TTL, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP, CONST_PERSISTENT); +#if defined(IP_BIND_ADDRESS_NO_PORT) + REGISTER_LONG_CONSTANT("IP_BIND_ADDRESS_NO_PORT", IP_BIND_ADDRESS_NO_PORT, CONST_PERSISTENT); +#endif #if HAVE_IPV6 REGISTER_LONG_CONSTANT("IPV6_MULTICAST_IF", IPV6_MULTICAST_IF, CONST_PERSISTENT); #endif From f0149c5c0b2b0af25d03c7b02e3f6eed3354376f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 25 Apr 2023 23:20:39 +0200 Subject: [PATCH 862/895] Fix ZPP of pg_lo_export() Closes GH-11132 --- NEWS | 3 +++ ext/pgsql/pgsql.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d6da8fdab79f2..4318d871d9dd5 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) +- PGSQL: + . Fixed parameter parsing of pg_lo_export(). (kocsismate) + 11 May 2023, PHP 8.1.19 - Core: diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 13120e2b588b4..cbed6b7db18e2 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2760,7 +2760,7 @@ PHP_FUNCTION(pg_lo_export) /* allow string to handle large OID value correctly */ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), - "rlP", &pgsql_link, pgsql_link_ce, &oid_long, &file_out) == SUCCESS) { + "OlP", &pgsql_link, pgsql_link_ce, &oid_long, &file_out) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { zend_value_error("Invalid OID value passed"); RETURN_THROWS(); From 294d3e9eb51e3065838e64fab40337b2c401a895 Mon Sep 17 00:00:00 2001 From: Go Kudo Date: Fri, 28 Apr 2023 15:43:41 +0900 Subject: [PATCH 863/895] [ci skip] Add zeriyoshi to CODEOWNERS for ext-random (#11148) --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 46984a4c24580..befcdd6fce863 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -22,7 +22,7 @@ /ext/opcache @dstogov @iluuu1994 /ext/openssl @bukka /ext/pgsql @devnexen -/ext/random @TimWolla +/ext/random @TimWolla @zeriyoshi /ext/session @Girgias /ext/sockets @devnexen /ext/spl @Girgias From 732d92c0e546874e5aeaf58e985d17b2ffae8bc0 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 28 Apr 2023 11:05:32 +0200 Subject: [PATCH 864/895] [skip ci] Fix various typos and grammar issues (#11143) --- ext/calendar/calendar.c | 2 +- ext/gd/libgd/gd_bmp.c | 10 +++++----- ext/hash/hash_fnv.c | 4 ++-- ext/hash/hash_md.c | 2 +- ext/intl/collator/collator_convert.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_base64.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_gb18030.c | 2 +- .../libmbfl/filters/mbfilter_iso2022jp_mobile.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_qprint.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_ucs4.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf32.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_language.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_string.c | 2 +- ext/mbstring/mbstring.c | 6 +++--- ext/mysqlnd/mysqlnd_ps_codec.c | 2 +- ext/mysqlnd/mysqlnd_result.c | 2 +- ext/openssl/xp_ssl.c | 2 +- ext/pdo_dblib/dblib_stmt.c | 2 +- ext/sockets/sockets.c | 2 +- ext/standard/file.c | 2 +- ext/standard/filters.c | 2 +- ext/standard/html.c | 4 ++-- ext/standard/http_fopen_wrapper.c | 2 +- main/fopen_wrappers.c | 6 +++--- main/main.c | 4 ++-- main/network.c | 2 +- main/output.c | 4 ++-- main/php_network.h | 2 +- main/php_streams.h | 8 ++++---- main/php_variables.c | 2 +- main/snprintf.c | 2 +- main/streams/plain_wrapper.c | 4 ++-- main/streams/streams.c | 6 +++--- main/streams/transports.c | 2 +- 46 files changed, 64 insertions(+), 64 deletions(-) diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index aab1501fd38e4..756ce0e90dc98 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -354,7 +354,7 @@ PHP_FUNCTION(juliantojd) /* {{{ heb_number_to_chars*/ /* -caution: the Hebrew format produces non unique result. +caution: the Hebrew format produces non-unique result. for example both: year '5' and year '5000' produce 'ה'. use the numeric one for calculations. */ diff --git a/ext/gd/libgd/gd_bmp.c b/ext/gd/libgd/gd_bmp.c index 00903d5ff8dcc..a80904a62914d 100644 --- a/ext/gd/libgd/gd_bmp.c +++ b/ext/gd/libgd/gd_bmp.c @@ -152,7 +152,7 @@ void gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) gdBMPPutInt(out, im->colorsTotal); /* colours used */ gdBMPPutInt(out, 0); /* important colours */ - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)(im->trueColor ? 3 : 1) * im->sx) % 4; if (padding) { padding = 4 - padding; @@ -646,7 +646,7 @@ static int bmp_read_os2_v2_info(gdIOCtxPtr infile, bmp_info_t *info) return 1; } - /* Lets seek the next 24 pointless bytes, we don't care too much about it */ + /* Let's seek the next 24 pointless bytes, we don't care too much about it */ if (!gdGetBuf(useless_bytes, 24, infile)) { return 1; } @@ -716,7 +716,7 @@ static int bmp_read_direct(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, b } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)(info->depth / 8) * info->width) % 4; if (padding) { padding = 4 - padding; @@ -883,7 +883,7 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)ceil(0.5 * info->width)) % 4; if (padding) { padding = 4 - padding; @@ -970,7 +970,7 @@ static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = (1 * info->width) % 4; if (padding) { padding = 4 - padding; diff --git a/ext/hash/hash_fnv.c b/ext/hash/hash_fnv.c index 37dc1f22dc7c3..92d4922bd810e 100644 --- a/ext/hash/hash_fnv.c +++ b/ext/hash/hash_fnv.c @@ -161,7 +161,7 @@ PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * cont * alternate - if > 0 use the alternate version * * returns: - * 32 bit hash as a static hash type + * 32-bit hash as a static hash type */ static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) @@ -204,7 +204,7 @@ fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) * alternate - if > 0 use the alternate version * * returns: - * 64 bit hash as a static hash type + * 64-bit hash as a static hash type */ static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate) diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c index a065f417e5395..eef2af3526608 100644 --- a/ext/hash/hash_md.c +++ b/ext/hash/hash_md.c @@ -238,7 +238,7 @@ PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX * context, const unsigned char *inpu /* }}} */ /* {{{ PHP_MD4Final - MD4 finalization. Ends an MD4 message-digest operation, writing the + MD4 finalization. Ends an MD4 message-digest operation, writing the message digest and zeroizing the context. */ PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context) diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index 3c29910698d99..acf2b2f7d41fe 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -370,7 +370,7 @@ zval* collator_normalize_sort_argument( zval* arg, zval *rv ) if( Z_TYPE_P( arg ) != IS_STRING ) { - /* If its not a string then nothing to do. + /* If it's not a string then nothing to do. * Return original arg. */ COLLATOR_CONVERT_RETURN_FAILED( arg ); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index 0f93670fa1257..b5a732224f003 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 4 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index faf77524af075..ab10c6a5df3e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_tw.c + * The source code included in this file was separated from mbfilter_tw.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 9b0f02766b8a0..ba3e6c6436708 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -22,7 +22,7 @@ * */ /* - * the source code included in this files was separated from mbfilter_cn.c + * the source code included in this file was separated from mbfilter_cn.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index cec5f5d41d5e6..d8181d7f7c30d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_cn.c + * The source code included in this file was separated from mbfilter_cn.c * by Moriyoshi Koizumi on 4 Dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index aa5f323db6f0a..d9b1362d15f93 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index d35cec9541093..96b9546dde105 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index 6a0d1ab6653ba..6485e735ed4ba 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -22,7 +22,7 @@ * */ /* - * the source code included in this files was separated from mbfilter_cp936.c + * the source code included in this file was separated from mbfilter_cp936.c * by rui hirokawa on 11 Aug 2011. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index 63d7c7b7f298c..79b7a4714af23 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_iso2022_jp_ms.c + * The source code included in this file was separated from mbfilter_iso2022_jp_ms.c * by Rui Hirokawa on 25 July 2011. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 0bbef0fcb1b84..c743942d0c5c4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 6966c8425cb59..fd0efb2987994 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c index 410be0ace74f5..1585cb82e3ff9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index ab8789fab35f4..9e584cb354c2c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index 58551c8b3932d..b49f5df5369e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 20 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index c3a2aaae0cf10..af84602ae1880 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 77b65bbeee8a4..d8af71686a1f3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c index 59e2676208b90..7d5fdc3e0a469 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by rui hrokawa on 8 aug 2011. * */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c index 2bd9cca7b5b2a..93a8d91e7a552 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c index aab0a17daa96e..41572faa568e8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.c b/ext/mbstring/libmbfl/mbfl/mbfl_language.c index ba1855aed109e..05be288ab77f8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_string.c b/ext/mbstring/libmbfl/mbfl/mbfl_string.c index 760634e65d06d..6485ceac74db8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_string.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_string.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 7172656d736d8..73dea4e5c6b81 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1348,7 +1348,7 @@ PHP_FUNCTION(mb_http_output) } /* }}} */ -/* {{{ Sets the current detect_order or Return the current detect_order as a array */ +/* {{{ Sets the current detect_order or Return the current detect_order as an array */ PHP_FUNCTION(mb_detect_order) { zend_string *order_str = NULL; @@ -4828,7 +4828,7 @@ static bool mb_fast_check_utf8_default(zend_string *str) switch (ab) { case 1: /* 2-byte character. No further bytes to check for 0x80. Check first byte - * for for xx00 000x (overlong sequence). */ + * for xx00 000x (overlong sequence). */ if ((c & 0x3e) == 0) { return false; } @@ -4844,7 +4844,7 @@ static bool mb_fast_check_utf8_default(zend_string *str) case 3: /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2 - * bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a + * bytes for 1111 0000, xx00 xxxx (overlong sequence), then check for a * character greater than 0x0010ffff (f4 8f bf bf) */ if ((*(++p) & 0xc0) != 0x80 || (*(++p) & 0xc0) != 0x80 || (c == 0xf0 && (d & 0x30) == 0) || (c > 0xf4 || (c == 0xf4 && d > 0x8f))) { return false; diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 89d90cc78c2a1..ca6c2112cffa5 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -691,7 +691,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval /* User hasn't sent anything, we will send empty string. Empty string has length of 0, encoded in 1 byte. No real - data will follows after it. + data will follow after it. */ (*data_size)++; } diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 9cad5247a7d39..d3314b366fecb 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -328,7 +328,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) /* If SERVER_MORE_RESULTS_EXISTS is set then this is either MULTI_QUERY or a CALL() The first packet after sending the query/com_execute has the bit set only - in this cases. Not sure why it's a needed but it marks that the whole stream + in these cases. Not sure why it's a needed but it marks that the whole stream will include many result sets. What actually matters are the bits set at the end of every result set (the EOF packet). */ diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 166fa2a91f186..7b604be043a5c 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -1636,7 +1636,7 @@ zend_result php_openssl_setup_crypto(php_stream *stream, ERR_clear_error(); /* We need to do slightly different things based on client/server method - * so lets remember which method was selected */ + * so let's remember which method was selected */ sslsock->is_client = cparam->inputs.method & STREAM_CRYPTO_IS_CLIENT; method_flags = cparam->inputs.method & ~STREAM_CRYPTO_IS_CLIENT; diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index acdbf7306d409..c16eb07c59604 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -41,7 +41,7 @@ static char *pdo_dblib_get_field_name(int type) * (example: varchar is reported as char by dbprtype) * * FIX ME: Cache datatypes from server systypes table in pdo_dblib_handle_factory() - * to make this future proof. + * to make this future-proof. */ switch (type) { diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index b73166f75a8c5..77e6a2c4c2b01 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2297,7 +2297,7 @@ PHP_FUNCTION(socket_export_stream) getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen); if (protoid == SOCK_STREAM) { - /* SO_PROTOCOL is not (yet?) supported on OS X, so lets assume it's TCP there */ + /* SO_PROTOCOL is not (yet?) supported on OS X, so let's assume it's TCP there */ #ifdef SO_PROTOCOL protoidlen = sizeof(protoid); getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen); diff --git a/ext/standard/file.c b/ext/standard/file.c index 37f2a6a2b982b..919d21b9a8d7e 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -675,7 +675,7 @@ PHP_FUNCTION(file) } while ((p = memchr(p, eol_marker, (e-p)))); } - /* handle any left overs of files without new lines */ + /* handle any leftovers of files without new lines */ if (s != e) { p = e; goto parse_eol; diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 69336aeefab27..d72c09b7d22b6 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -939,7 +939,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins ps++, icnt--; break; } else if (!inst->lbchars && lb_cnt == 0 && *ps == '\n') { - /* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seem in the wild, a lot */ + /* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seen in the wild, a lot */ lb_cnt = lb_ptr = 0; scan_stat = 0; ps++, icnt--; diff --git a/ext/standard/html.c b/ext/standard/html.c index e6c7798925523..f736ef33d9c76 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -712,9 +712,9 @@ static inline int process_named_entity_html(const char **buf, const char **start *start = *buf; /* "&" is represented by a 0x26 in all supported encodings. That means - * the byte after represents a character or is the leading byte of an + * the byte after represents a character or is the leading byte of a * sequence of 8-bit code units. If in the ranges below, it represents - * necessarily a alpha character because none of the supported encodings + * necessarily an alpha character because none of the supported encodings * has an overlap with ASCII in the leading byte (only on the second one) */ while ((**buf >= 'a' && **buf <= 'z') || (**buf >= 'A' && **buf <= 'Z') || diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 9ae725f7b0d75..89ea1220177f4 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -567,7 +567,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, * interprets the RFC literally and establishes a keep-alive connection, * unless the user specifically requests something else by specifying a * Connection header in the context options. Send that header even for - * HTTP/1.0 to avoid issues when the server respond with a HTTP/1.1 + * HTTP/1.0 to avoid issues when the server respond with an HTTP/1.1 * keep-alive response, which is the preferred response type. */ if ((have_header & HTTP_HEADER_CONNECTION) == 0) { smart_str_appends(&req_buf, "Connection: close\r\n"); diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 848e204a0f43a..ead11a958b32a 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -590,7 +590,7 @@ PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_lengt } } /* end provided path */ - /* check in calling scripts' current working directory as a fall back case + /* check in calling scripts' current working directory as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { @@ -670,7 +670,7 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c /* check in provided path */ /* append the calling scripts' current working directory - * as a fall back case + * as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { @@ -806,7 +806,7 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co fdtest = VCWD_OPEN(filepath, O_RDONLY); if (fdtest != -1) { /* return a relative file path if for any reason - * we cannot cannot getcwd() and the requested, + * we cannot getcwd() and the requested, * relatively referenced file is accessible */ copy_len = path_len > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : path_len; if (real_path) { diff --git a/main/main.c b/main/main.c index bf3d30795040d..2e0802d3b3b00 100644 --- a/main/main.c +++ b/main/main.c @@ -407,7 +407,7 @@ static PHP_INI_MH(OnUpdateTimeout) /* * If we're restoring INI values, we shouldn't reset the timer. * Otherwise, the timer is active when PHP is idle, such as the - * the CLI web server or CGI. Running a script will re-activate + * CLI web server or CGI. Running a script will re-activate * the timeout, so it's not needed to do so at script end. */ zend_set_timeout(EG(timeout_seconds), 0); @@ -1022,7 +1022,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ origin = ZSTR_VAL(replace_origin); } - /* origin and buffer available, so lets come up with the error message */ + /* origin and buffer available, so let's come up with the error message */ if (docref && docref[0] == '#') { docref_target = strchr(docref, '#'); docref = NULL; diff --git a/main/network.c b/main/network.c index a189714aafbf9..ea3d17614f565 100644 --- a/main/network.c +++ b/main/network.c @@ -969,7 +969,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short /* }}} */ /* {{{ php_any_addr - * Fills the any (wildcard) address into php_sockaddr_storage + * Fills any (wildcard) address into php_sockaddr_storage */ PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port) { diff --git a/main/output.c b/main/output.c index 0567ca97570c5..57a61e4b93651 100644 --- a/main/output.c +++ b/main/output.c @@ -156,7 +156,7 @@ PHPAPI void php_output_shutdown(void) /* }}} */ /* {{{ SUCCESS|FAILURE php_output_activate(void) - * Reset output globals and setup the output handler stack */ + * Reset output globals and set up the output handler stack */ PHPAPI int php_output_activate(void) { #ifdef ZTS @@ -348,7 +348,7 @@ PHPAPI void php_output_discard_all(void) /* }}} */ /* {{{ int php_output_get_level(void) - * Get output buffering level, ie. how many output handlers the stack contains */ + * Get output buffering level, i.e. how many output handlers the stack contains */ PHPAPI int php_output_get_level(void) { return OG(active) ? zend_stack_count(&OG(handlers)) : 0; diff --git a/main/php_network.h b/main/php_network.h index a3b7ba7ab3180..7cc3609c44089 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -49,7 +49,7 @@ # define EWOULDBLOCK EAGAIN #endif -/* This is a work around for GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 */ +/* This is a workaround for GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 */ #if EAGAIN != EWOULDBLOCK # define PHP_IS_TRANSIENT_ERROR(err) (err == EAGAIN || err == EWOULDBLOCK) #else diff --git a/main/php_streams.h b/main/php_streams.h index 1058c2b54ad45..13f8fe827b08a 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -90,7 +90,7 @@ END_EXTERN_C() * The only exceptions to this rule are that stream implementations can use * the php_stream->abstract pointer to hold their context, and streams * opened via stream_open_wrappers can use the zval ptr in - * php_stream->wrapperdata to hold meta data for php scripts to + * php_stream->wrapperdata to hold metadata for php scripts to * retrieve using file_get_wrapper_data(). */ typedef struct _php_stream php_stream; @@ -199,7 +199,7 @@ struct _php_stream { php_stream_filter_chain readfilters, writefilters; php_stream_wrapper *wrapper; /* which wrapper was used to open the stream */ - void *wrapperthis; /* convenience pointer for a instance of a wrapper */ + void *wrapperthis; /* convenience pointer for an instance of a wrapper */ zval wrapperdata; /* fgetwrapperdata retrieves this */ uint8_t is_persistent:1; @@ -290,7 +290,7 @@ PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream * #define PHP_STREAM_FREE_CALL_DTOR 1 /* call ops->close */ #define PHP_STREAM_FREE_RELEASE_STREAM 2 /* pefree(stream) */ -#define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close it's underlying handle */ +#define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close its underlying handle */ #define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */ #define PHP_STREAM_FREE_PERSISTENT 16 /* manually freeing a persistent connection */ #define PHP_STREAM_FREE_IGNORE_ENCLOSING 32 /* don't close the enclosing stream instead */ @@ -441,7 +441,7 @@ PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize); #define php_stream_truncate_set_size(stream, size) _php_stream_truncate_set_size((stream), (size)) END_EXTERN_C() -#define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add meta data information */ +#define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add metadata information */ #define php_stream_populate_meta_data(stream, zv) (_php_stream_set_option((stream), PHP_STREAM_OPTION_META_DATA_API, 0, zv) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0) /* Check if the stream is still "live"; for sockets/pipes this means the socket diff --git a/main/php_variables.c b/main/php_variables.c index 3d7d904a47d7f..15314869180aa 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -207,7 +207,7 @@ PHPAPI void php_register_variable_ex(const char *var_name, zval *val, zval *trac zval_ptr_dtor_nogc(val); /* do not output the error message to the screen, - this helps us to to avoid "information disclosure" */ + this helps us to avoid "information disclosure" */ if (!PG(display_errors)) { php_error_docref(NULL, E_WARNING, "Input variable nesting level exceeded " ZEND_LONG_FMT ". To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level)); } diff --git a/main/snprintf.c b/main/snprintf.c index 9acd4efe6d772..de69200304a43 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -421,7 +421,7 @@ typedef struct buf_area buffy; * bep points to the end-of-buffer+1 * While using this macro, note that the nextb pointer is NOT updated. * - * NOTE: Evaluation of the c argument should not have any side-effects + * NOTE: Evaluation of the c argument should not have any side effects */ #define INS_CHAR(c, sp, bep, cc) \ { \ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 3a6b2ccf28dcc..128c3410aa835 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -539,7 +539,7 @@ static int php_stdiop_flush(php_stream *stream) /* * stdio buffers data in user land. By calling fflush(3), this - * data is send to the kernel using write(2). fsync'ing is + * data is sent to the kernel using write(2). fsync'ing is * something completely different. */ if (data->file) { @@ -1671,7 +1671,7 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char /* check in provided path */ /* append the calling scripts' current working directory - * as a fall back case + * as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { diff --git a/main/streams/streams.c b/main/streams/streams.c index 9663f792bc393..f655faef10cbf 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -469,7 +469,7 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov the cookie_closer unsets the fclose_stdiocast flags, so we can be sure that we only reach here when PHP code calls php_stream_free. - Lets let the cookie code clean it all up. + Let's let the cookie code clean it all up. */ stream->in_free = 0; return fclose(stream->stdiocast); @@ -839,7 +839,7 @@ PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb) } /* if the stream doesn't directly support stat-ing, return with failure. - * We could try and emulate this by casting to a FD and fstat-ing it, + * We could try and emulate this by casting to an FD and fstat-ing it, * but since the fd might not represent the actual underlying content * this would give bogus results. */ if (stream->ops->stat == NULL) { @@ -1503,7 +1503,7 @@ PHPAPI zend_string *_php_stream_copy_to_mem(php_stream *src, size_t maxlen, int return result; } - /* avoid many reallocs by allocating a good sized chunk to begin with, if + /* avoid many reallocs by allocating a good-sized chunk to begin with, if * we can. Note that the stream may be filtered, in which case the stat * result may be inaccurate, as the filter may inflate or deflate the * number of bytes that we can read. In order to avoid an upsize followed diff --git a/main/streams/transports.c b/main/streams/transports.c index 6fc2848be6e67..1c9a83be2c882 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -76,7 +76,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in if (persistent_id) { switch(php_stream_from_persistent_id(persistent_id, &stream)) { case PHP_STREAM_PERSISTENT_SUCCESS: - /* use a 0 second timeout when checking if the socket + /* use a 0-second timeout when checking if the socket * has already died */ if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL)) { return stream; From 6a9061e0afaf57fd21e29bf2f59644489e91023e Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 17 Mar 2023 09:45:36 +0000 Subject: [PATCH 865/895] Fix GH-9344: pgsql pipeline mode proposal. Adding pg_enter_pipeline_mode, pg_exit_pipeline_mode, pg_pipeline_sync and pg_pipeline_status. Close GH-10868 --- NEWS | 1 + ext/pgsql/pgsql.c | 62 +++++++++++++++++ ext/pgsql/pgsql.stub.php | 30 ++++++++ ext/pgsql/pgsql_arginfo.h | 58 +++++++++++++++- ext/pgsql/tests/pg_pipeline_sync.phpt | 99 +++++++++++++++++++++++++++ 5 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 ext/pgsql/tests/pg_pipeline_sync.phpt diff --git a/NEWS b/NEWS index 2de7df7d29d7b..72c7e60526bce 100644 --- a/NEWS +++ b/NEWS @@ -118,6 +118,7 @@ PHP NEWS - PGSQL: . pg_fetch_object raises a ValueError instead of an Exception. (David Carlier) + . Added GH-9344, pipeline mode support. (David Carlier) - Phar: . Fix memory leak in phar_rename_archive(). (stkeke) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 7bc61bed81da6..56b828df7f5ed 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -5798,4 +5798,66 @@ PHP_FUNCTION(pg_select) } /* }}} */ +#ifdef LIBPQ_HAS_PIPELINING +PHP_FUNCTION(pg_enter_pipeline_mode) +{ + zval *pgsql_link; + pgsql_link_handle *pgsql_handle; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pgsql_link, pgsql_link_ce) == FAILURE) { + RETURN_THROWS(); + } + + pgsql_handle = Z_PGSQL_LINK_P(pgsql_link); + CHECK_PGSQL_LINK(pgsql_handle); + + RETURN_BOOL(PQenterPipelineMode(pgsql_handle->conn)); +} + +PHP_FUNCTION(pg_exit_pipeline_mode) +{ + zval *pgsql_link; + pgsql_link_handle *pgsql_handle; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pgsql_link, pgsql_link_ce) == FAILURE) { + RETURN_THROWS(); + } + + pgsql_handle = Z_PGSQL_LINK_P(pgsql_link); + CHECK_PGSQL_LINK(pgsql_handle); + + RETURN_BOOL(PQexitPipelineMode(pgsql_handle->conn)); +} + +PHP_FUNCTION(pg_pipeline_sync) +{ + zval *pgsql_link; + pgsql_link_handle *pgsql_handle; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pgsql_link, pgsql_link_ce) == FAILURE) { + RETURN_THROWS(); + } + + pgsql_handle = Z_PGSQL_LINK_P(pgsql_link); + CHECK_PGSQL_LINK(pgsql_handle); + + RETURN_BOOL(PQpipelineSync(pgsql_handle->conn)); +} + +PHP_FUNCTION(pg_pipeline_status) +{ + zval *pgsql_link; + pgsql_link_handle *pgsql_handle; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &pgsql_link, pgsql_link_ce) == FAILURE) { + RETURN_THROWS(); + } + + pgsql_handle = Z_PGSQL_LINK_P(pgsql_link); + CHECK_PGSQL_LINK(pgsql_handle); + + RETURN_LONG(PQpipelineStatus(pgsql_handle->conn)); +} +#endif + #endif diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 2fb3f41b6bf32..35efd2f33d7bc 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -413,6 +413,29 @@ */ const PGSQL_DML_STRING = UNKNOWN; +#ifdef LIBPQ_HAS_PIPELINING + /** + * @var int + * @cvalue PGRES_PIPELINE_SYNC + */ + const PGSQL_PIPELINE_SYNC = UNKNOWN; + /** + * @var int + * @cvalue PQ_PIPELINE_ON + */ + const PGSQL_PIPELINE_ON = UNKNOWN; + /** + * @var int + * @cvalue PQ_PIPELINE_OFF + */ + const PGSQL_PIPELINE_OFF = UNKNOWN; + /** + * @var int + * @cvalue PQ_PIPELINE_ABORTED + */ + const PGSQL_PIPELINE_ABORTED = UNKNOWN; +#endif + function pg_connect(string $connection_string, int $flags = 0): PgSql\Connection|false {} function pg_pconnect(string $connection_string, int $flags = 0): PgSql\Connection|false {} @@ -894,6 +917,13 @@ function pg_delete(PgSql\Connection $connection, string $table_name, array $cond * @refcount 1 */ function pg_select(PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {} + +#ifdef LIBPQ_HAS_PIPELINING + function pg_enter_pipeline_mode(PgSql\Connection $connection): bool {} + function pg_exit_pipeline_mode(PgSql\Connection $connection): bool {} + function pg_pipeline_sync(PgSql\Connection $connection): bool {} + function pg_pipeline_status(PgSql\Connection $connection): int {} +#endif } namespace PgSql { diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index a9fea83d3f153..01ffe5c3df614 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 52d055086569456122f9d9a1264f7a3667127ea7 */ + * Stub hash: c4ff82a0df3e65eae3abbb8c9910978f28bf6ac4 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -449,6 +449,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_select, 0, 3, MAY_BE_ARRAY|MA ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC") ZEND_END_ARG_INFO() +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_enter_pipeline_mode, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0) +ZEND_END_ARG_INFO() +#endif + +#if defined(LIBPQ_HAS_PIPELINING) +#define arginfo_pg_exit_pipeline_mode arginfo_pg_enter_pipeline_mode +#endif + +#if defined(LIBPQ_HAS_PIPELINING) +#define arginfo_pg_pipeline_sync arginfo_pg_enter_pipeline_mode +#endif + +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_pipeline_status, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0) +ZEND_END_ARG_INFO() +#endif + ZEND_FUNCTION(pg_connect); ZEND_FUNCTION(pg_pconnect); @@ -539,6 +559,18 @@ ZEND_FUNCTION(pg_insert); ZEND_FUNCTION(pg_update); ZEND_FUNCTION(pg_delete); ZEND_FUNCTION(pg_select); +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_FUNCTION(pg_enter_pipeline_mode); +#endif +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_FUNCTION(pg_exit_pipeline_mode); +#endif +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_FUNCTION(pg_pipeline_sync); +#endif +#if defined(LIBPQ_HAS_PIPELINING) +ZEND_FUNCTION(pg_pipeline_status); +#endif static const zend_function_entry ext_functions[] = { @@ -656,6 +688,18 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(pg_update, arginfo_pg_update) ZEND_FE(pg_delete, arginfo_pg_delete) ZEND_FE(pg_select, arginfo_pg_select) +#if defined(LIBPQ_HAS_PIPELINING) + ZEND_FE(pg_enter_pipeline_mode, arginfo_pg_enter_pipeline_mode) +#endif +#if defined(LIBPQ_HAS_PIPELINING) + ZEND_FE(pg_exit_pipeline_mode, arginfo_pg_exit_pipeline_mode) +#endif +#if defined(LIBPQ_HAS_PIPELINING) + ZEND_FE(pg_pipeline_sync, arginfo_pg_pipeline_sync) +#endif +#if defined(LIBPQ_HAS_PIPELINING) + ZEND_FE(pg_pipeline_status, arginfo_pg_pipeline_status) +#endif ZEND_FE_END }; @@ -764,6 +808,18 @@ static void register_pgsql_symbols(int module_number) REGISTER_LONG_CONSTANT("PGSQL_DML_EXEC", PGSQL_DML_EXEC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_ASYNC", PGSQL_DML_ASYNC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_STRING", PGSQL_DML_STRING, CONST_PERSISTENT); +#if defined(LIBPQ_HAS_PIPELINING) + REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_SYNC", PGRES_PIPELINE_SYNC, CONST_PERSISTENT); +#endif +#if defined(LIBPQ_HAS_PIPELINING) + REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_ON", PQ_PIPELINE_ON, CONST_PERSISTENT); +#endif +#if defined(LIBPQ_HAS_PIPELINING) + REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_OFF", PQ_PIPELINE_OFF, CONST_PERSISTENT); +#endif +#if defined(LIBPQ_HAS_PIPELINING) + REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_ABORTED", PQ_PIPELINE_ABORTED, CONST_PERSISTENT); +#endif } static zend_class_entry *register_class_PgSql_Connection(void) diff --git a/ext/pgsql/tests/pg_pipeline_sync.phpt b/ext/pgsql/tests/pg_pipeline_sync.phpt new file mode 100644 index 0000000000000..38366a025483b --- /dev/null +++ b/ext/pgsql/tests/pg_pipeline_sync.phpt @@ -0,0 +1,99 @@ +--TEST-- +PostgreSQL pipeline mode +--EXTENSIONS-- +pgsql +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK From bbe42a5ccd9edfee3a85cbf5a1b6b86054ddeb58 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 29 Apr 2023 11:44:33 +0100 Subject: [PATCH 866/895] [skip ci] UPGRADING highligh last intl deprecation difference --- UPGRADING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index 7920c62ccecfc..7107b0c4c4b3d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -71,8 +71,8 @@ PHP 8.3 UPGRADE NOTES ======================================== - Intl - . The U_MULTIPLE_DECIMAL_SEPERATORS constant had been deprecated, using - the U_MULTIPLE_DECIMAL_SEPARATORS instead is recommended. + . The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using + the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended. ======================================== 5. Changed Functions From 8bf2d587d7de46350468ab1d63d350fcd6808511 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 28 Apr 2023 18:04:47 +0200 Subject: [PATCH 867/895] Propagate STREAM_DISABLE_OPEN_BASEDIR src flag to php_stream_stat_path_ex Otherwise we can get open_basedir warnings from the stat call while still performing the actual copy. Fixes GH-11138 Closes GH-11156 --- NEWS | 4 ++++ Zend/tests/gh11138.phpt | 28 ++++++++++++++++++++++++++++ ext/standard/file.c | 3 ++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/gh11138.phpt diff --git a/NEWS b/NEWS index 4318d871d9dd5..bac82772401d4 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS - PGSQL: . Fixed parameter parsing of pg_lo_export(). (kocsismate) +- Standard: + . Fixed bug GH-11138 (move_uploaded_file() emits open_basedir warning for + source file). (ilutov) + 11 May 2023, PHP 8.1.19 - Core: diff --git a/Zend/tests/gh11138.phpt b/Zend/tests/gh11138.phpt new file mode 100644 index 0000000000000..fcd5cd11cfb8e --- /dev/null +++ b/Zend/tests/gh11138.phpt @@ -0,0 +1,28 @@ +--TEST-- +move_uploaded_file() emits open_basedir warning for source file +--POST_RAW-- +Content-type: multipart/form-data, boundary=AaB03x + +--AaB03x +content-disposition: form-data; name="file"; filename="file.txt" +Content-Type: text/plain + +foo +--AaB03x-- +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +foo diff --git a/ext/standard/file.c b/ext/standard/file.c index 548bcc7a37ca3..d51a584ed9c7a 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1669,8 +1669,9 @@ PHPAPI int php_copy_file_ctx(const char *src, const char *dest, int src_flg, php php_stream *srcstream = NULL, *deststream = NULL; int ret = FAILURE; php_stream_statbuf src_s, dest_s; + int src_stat_flags = (src_flg & STREAM_DISABLE_OPEN_BASEDIR) ? PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR : 0; - switch (php_stream_stat_path_ex(src, 0, &src_s, ctx)) { + switch (php_stream_stat_path_ex(src, src_stat_flags, &src_s, ctx)) { case -1: /* non-statable stream */ goto safe_to_copy; From 5ad6571a21e4be13ad8b64f742e958ece101dcfc Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 28 Apr 2023 11:40:44 +0200 Subject: [PATCH 868/895] Allow aliasing namespaces containing reserved class names This reverts commit b9f7123c5e4ccdc3c381ab949ff01e3c14f3465c. Fixes GH-11152 Closes GH-11153 --- NEWS | 4 ++++ Zend/tests/gh11152.phpt | 20 +++++++++++++++++++ .../use_statement/aliasing_builtin_types.phpt | 10 ---------- Zend/zend_compile.c | 6 ------ 4 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 Zend/tests/gh11152.phpt delete mode 100644 Zend/tests/use_statement/aliasing_builtin_types.phpt diff --git a/NEWS b/NEWS index e0d1de309b3e1..d958329b87460 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.7 +- Core: + . Fixed bug GH-11152 (Unable to alias namespaces containing reserved class + names). (ilutov) + - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) diff --git a/Zend/tests/gh11152.phpt b/Zend/tests/gh11152.phpt new file mode 100644 index 0000000000000..4f0b7d9cbb031 --- /dev/null +++ b/Zend/tests/gh11152.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-11152: Allow aliasing namespaces containing reserved class names +--FILE-- + +--EXPECT-- +string(8) "string\C" diff --git a/Zend/tests/use_statement/aliasing_builtin_types.phpt b/Zend/tests/use_statement/aliasing_builtin_types.phpt deleted file mode 100644 index 681a77c24b28a..0000000000000 --- a/Zend/tests/use_statement/aliasing_builtin_types.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Aliasing built-in types ---FILE-- - ---EXPECTF-- -Fatal error: Cannot alias 'bool' as it is a built-in type in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 9036fc8ca66db..53fb5c7f4f7f8 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -8124,12 +8124,6 @@ static void zend_compile_use(zend_ast *ast) /* {{{ */ zend_string *old_name = zend_ast_get_str(old_name_ast); zend_string *new_name, *lookup_name; - /* Check that we are not attempting to alias a built-in type */ - if (type == ZEND_SYMBOL_CLASS && zend_is_reserved_class_name(old_name)) { - zend_error_noreturn(E_COMPILE_ERROR, - "Cannot alias '%s' as it is a built-in type", ZSTR_VAL(old_name)); - } - if (new_name_ast) { new_name = zend_string_copy(zend_ast_get_str(new_name_ast)); } else { From b915a1d8d7ee6e537316c755aaed7f9a62b8b81b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 30 Apr 2023 00:16:45 +0200 Subject: [PATCH 869/895] Fix uninitialised variable warning in mbfilter_sjis.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling in release mode with UBSAN gives me the following compiler warning: ``` In function ‘mb_wchar_to_sjismac’: mbfilter_sjis.c:1419:89: warning: ‘i’ may be used uninitialized [-Wmaybe-uninitialized] 1419 | buf->state = (i << 24) | (index << 16) | (w & 0xFFFF); | ^~ mbfilter_sjis.c:1398:42: note: ‘i’ was declared here 1398 | for (int i = 0; i < code_tbl_m_len; i++) { | ^ ``` Since the if condition will always be taken after the goto, we can get rid of the warning by moving the label inside the if. Signed-off-by: Alex Dowad --- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index fd0efb2987994..4db34c56b0e57 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -1400,8 +1400,8 @@ process_codepoint: ; /* This might be a valid transcoding hint sequence */ int index = 3; -resume_transcoding_hint: if (buf->state) { +resume_transcoding_hint: i = buf->state >> 24; index = (buf->state >> 16) & 0xFF; buf->state = 0; From 5cbc917feeb0e82ca7de4e03ad1784c36547f23a Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 30 Apr 2023 13:52:18 +0200 Subject: [PATCH 870/895] Update libenchant in arm build --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 270fd25551b64..bb65ac062f447 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -62,7 +62,7 @@ arm_task: libgmp-dev libicu-dev libtidy-dev - libenchant-dev + libenchant-2-dev libaspell-dev libpspell-dev libsasl2-dev From 43e267aeab8a84ceae34c3a3a93e72d39f8cfc9b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 1 May 2023 11:28:33 +0200 Subject: [PATCH 871/895] [skip ci] Upgrade libmysql version --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 63fce11ac0225..dff19b9c46a4a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -632,7 +632,7 @@ jobs: with: # FIXME: There are new warnings # configurationParameters: --enable-werror - libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz + libmysql: mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }} - name: Test mysql-8.0 uses: ./.github/actions/test-libmysqlclient From dc20cd9c3a9a5c3ad595ae61205ee90a7fda38e5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 1 May 2023 13:16:13 +0200 Subject: [PATCH 872/895] Endless recursion when using + on array in foreach This reverts commit 84b4020eb4a8ebc45cb80164d4589cbf818f47f2. Fixes GH-11171 --- NEWS | 2 -- Zend/tests/gh10085_1.phpt | 22 ---------------------- Zend/tests/gh10085_2.phpt | 25 ------------------------- Zend/tests/gh11171.phpt | 15 +++++++++++++++ Zend/zend_operators.c | 18 ++++++------------ 5 files changed, 21 insertions(+), 61 deletions(-) delete mode 100644 Zend/tests/gh10085_1.phpt delete mode 100644 Zend/tests/gh10085_2.phpt create mode 100644 Zend/tests/gh11171.phpt diff --git a/NEWS b/NEWS index bac82772401d4..b99a989402b3f 100644 --- a/NEWS +++ b/NEWS @@ -18,8 +18,6 @@ PHP NEWS . Fix inconsistent float negation in constant expressions. (ilutov) . Fixed bug GH-8841 (php-cli core dump calling a badly formed function). (nielsdos) - . Fixed bug GH-10085 (Assertion when adding two arrays with += where the first - array is contained in the second). (ilutov) . Fixed bug GH-10737 (PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c). (nielsdos, ElliotNB) . Fixed bug GH-11028 (Heap Buffer Overflow in zval_undefined_cv.). (nielsdos) diff --git a/Zend/tests/gh10085_1.phpt b/Zend/tests/gh10085_1.phpt deleted file mode 100644 index cc11c96a09d32..0000000000000 --- a/Zend/tests/gh10085_1.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -GH-10085: Assertion in add_function_array() ---FILE-- - ---EXPECT-- -array(2) { - [0]=> - array(2) { - [0]=> - array(0) { - } - [1]=> - int(0) - } - [1]=> - int(0) -} diff --git a/Zend/tests/gh10085_2.phpt b/Zend/tests/gh10085_2.phpt deleted file mode 100644 index 7895999f2cd05..0000000000000 --- a/Zend/tests/gh10085_2.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -GH-10085: Assertion in add_function_array() ---FILE-- - ---EXPECT-- -array(2) { - [0]=> - array(2) { - [0]=> - array(0) { - } - [1]=> - int(0) - } - [1]=> - int(0) -} diff --git a/Zend/tests/gh11171.phpt b/Zend/tests/gh11171.phpt new file mode 100644 index 0000000000000..8bda7da0b7b41 --- /dev/null +++ b/Zend/tests/gh11171.phpt @@ -0,0 +1,15 @@ +--TEST-- +GH-11171: Test +--FILE-- + +--EXPECT-- +array(1) { + [0]=> + &string(4) "test" +} diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 387cc8baa7450..ef5c50c4336d2 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -965,22 +965,16 @@ static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error(const cha static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) /* {{{ */ { + if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { + /* $a += $a */ + return; + } if (result != op1) { ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); - zend_hash_merge(Z_ARRVAL_P(result), Z_ARRVAL_P(op2), zval_add_ref, 0); - } else if (Z_ARR_P(op1) == Z_ARR_P(op2)) { - /* $a += $a */ } else { - /* We have to duplicate op1 (even with refcount == 1) because it may be an element of op2 - * and therefore its reference counter may be increased by zend_hash_merge(). That leads to - * an assertion in _zend_hash_add_or_update_i() that only allows adding elements to hash - * tables with RC1. See GH-10085 and Zend/tests/gh10085*.phpt */ - zval tmp; - ZVAL_ARR(&tmp, zend_array_dup(Z_ARR_P(op1))); - zend_hash_merge(Z_ARRVAL(tmp), Z_ARRVAL_P(op2), zval_add_ref, 0); - zval_ptr_dtor(result); - ZVAL_COPY_VALUE(result, &tmp); + SEPARATE_ARRAY(result); } + zend_hash_merge(Z_ARRVAL_P(result), Z_ARRVAL_P(op2), zval_add_ref, 0); } /* }}} */ From 8fc023cbaeab4763374aaf3a005e66c6f3482b84 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 1 May 2023 15:28:59 +0200 Subject: [PATCH 873/895] [skip ci] Fix tmp file clash in ext/zip/tests/oo_cancel.phpt --- ext/zip/tests/oo_cancel.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zip/tests/oo_cancel.phpt b/ext/zip/tests/oo_cancel.phpt index fe9f9868c75b1..fa5fe92dadaad 100644 --- a/ext/zip/tests/oo_cancel.phpt +++ b/ext/zip/tests/oo_cancel.phpt @@ -12,7 +12,7 @@ date.timezone=UTC --FILE-- Date: Mon, 1 May 2023 19:06:40 +0200 Subject: [PATCH 874/895] RFC: Make unserialize() emit a warning for trailing bytes (#9630) --- NEWS | 2 + UPGRADING | 5 ++- .../typed_property_ref_overwrite.phpt | 2 +- .../serialize/unserialize_extra_data_001.phpt | 26 ++++++++++++ .../serialize/unserialize_extra_data_002.phpt | 42 +++++++++++++++++++ .../serialize/unserialize_extra_data_003.phpt | 42 +++++++++++++++++++ ext/standard/var.c | 18 +++++--- 7 files changed, 130 insertions(+), 7 deletions(-) create mode 100644 ext/standard/tests/serialize/unserialize_extra_data_001.phpt create mode 100644 ext/standard/tests/serialize/unserialize_extra_data_002.phpt create mode 100644 ext/standard/tests/serialize/unserialize_extra_data_003.phpt diff --git a/NEWS b/NEWS index 72c7e60526bce..d91d92bdc035f 100644 --- a/NEWS +++ b/NEWS @@ -164,6 +164,8 @@ PHP NEWS - Standard: . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla) + . unserialize() now emits a new E_WARNING if the input contains unconsumed + bytes. (timwolla) . Make array_pad's $length warning less confusing. (nielsdos) . E_WARNING emitted by strtok in the caase both arguments are not provided when starting tokenisation. (David Carlier) diff --git a/UPGRADING b/UPGRADING index 7107b0c4c4b3d..9f096a189b35b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -141,8 +141,11 @@ PHP 8.3 UPGRADE NOTES . pg_insert now raises a ValueError instead of a WARNING when the table specified is invalid. - Standard: - . E_NOTICEs emitted by unserialized() have been promoted to E_WARNING. + . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling + . unserialize() now emits a new E_WARNING if the input contains unconsumed + bytes. + RFC: https://wiki.php.net/rfc/unserialize_warn_on_trailing_data . array_pad() is now only limited by the maximum number of elements an array can have. Before, it was only possible to add at most 1048576 elements at a time. diff --git a/ext/standard/tests/serialize/typed_property_ref_overwrite.phpt b/ext/standard/tests/serialize/typed_property_ref_overwrite.phpt index 148c66b76c741..9b68e50783795 100644 --- a/ext/standard/tests/serialize/typed_property_ref_overwrite.phpt +++ b/ext/standard/tests/serialize/typed_property_ref_overwrite.phpt @@ -7,7 +7,7 @@ class Test { public ?object $prop; } $s = <<<'STR' -O:4:"Test":2:{s:4:"prop";R:1;s:4:"prop";N;}} +O:4:"Test":2:{s:4:"prop";R:1;s:4:"prop";N;} STR; var_dump(unserialize($s)); diff --git a/ext/standard/tests/serialize/unserialize_extra_data_001.phpt b/ext/standard/tests/serialize/unserialize_extra_data_001.phpt new file mode 100644 index 0000000000000..421fb3428b3a7 --- /dev/null +++ b/ext/standard/tests/serialize/unserialize_extra_data_001.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test unserialize() with extra data at the end of a valid value +--FILE-- + +--EXPECTF-- +Warning: unserialize(): Extra data starting at offset 4 of 8 bytes in %s on line %d +int(5) + +Warning: unserialize(): Extra data starting at offset 2 of 6 bytes in %s on line %d +NULL + +Warning: unserialize(): Extra data starting at offset 4 of 8 bytes in %s on line %d +bool(true) + +Warning: unserialize(): Extra data starting at offset 20 of 24 bytes in %s on line %d +array(1) { + ["foo"]=> + bool(true) +} diff --git a/ext/standard/tests/serialize/unserialize_extra_data_002.phpt b/ext/standard/tests/serialize/unserialize_extra_data_002.phpt new file mode 100644 index 0000000000000..31e6a227f7112 --- /dev/null +++ b/ext/standard/tests/serialize/unserialize_extra_data_002.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test unserialize() with extra data at the end of a valid value with nested unserialize +--FILE-- +foo = unserialize($foo['bar']); + } + + public function __serialize(): array + { + return [ + 'bar' => serialize($this->foo) . 'garbage', + ]; + } +} + +$f = new Foo; +$f->foo = ['a', 'b', 'c']; + +var_dump(unserialize(serialize($f) . 'garbage')); + +?> +--EXPECTF-- +Warning: unserialize(): Extra data starting at offset 81 of 88 bytes in %s on line %d + +Warning: unserialize(): Extra data starting at offset 42 of 49 bytes in %s on line %d +object(Foo)#2 (1) { + ["foo"]=> + array(3) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + string(1) "c" + } +} diff --git a/ext/standard/tests/serialize/unserialize_extra_data_003.phpt b/ext/standard/tests/serialize/unserialize_extra_data_003.phpt new file mode 100644 index 0000000000000..93f2c49a56a0c --- /dev/null +++ b/ext/standard/tests/serialize/unserialize_extra_data_003.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test unserialize() with extra data at the end of a valid value with Serializable +--FILE-- +foo = unserialize($foo); + } + + public function serialize(): string + { + return serialize($this->foo) . 'garbage'; + } +} + +$f = new Foo; +$f->foo = ['a', 'b', 'c']; + +var_dump(unserialize(serialize($f) . 'garbage')); + +?> +--EXPECTF-- +Deprecated: Foo implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d + +Warning: unserialize(): Extra data starting at offset 42 of 49 bytes in %s on line %d + +Warning: unserialize(): Extra data starting at offset 64 of 71 bytes in %s on line %d +object(Foo)#2 (1) { + ["foo"]=> + array(3) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + string(1) "c" + } +} diff --git a/ext/standard/var.c b/ext/standard/var.c index 5a4cec3e0e153..cbd59e22c5230 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1391,11 +1391,19 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co zval_ptr_dtor(return_value); } RETVAL_FALSE; - } else if (BG(unserialize).level > 1) { - ZVAL_COPY(return_value, retval); - } else if (Z_REFCOUNTED_P(return_value)) { - zend_refcounted *ref = Z_COUNTED_P(return_value); - gc_check_possible_root(ref); + } else { + if ((char*)p < buf + buf_len) { + if (!EG(exception)) { + php_error_docref(NULL, E_WARNING, "Extra data starting at offset " ZEND_LONG_FMT " of %zd bytes", + (zend_long)((char*)p - buf), buf_len); + } + } + if (BG(unserialize).level > 1) { + ZVAL_COPY(return_value, retval); + } else if (Z_REFCOUNTED_P(return_value)) { + zend_refcounted *ref = Z_COUNTED_P(return_value); + gc_check_possible_root(ref); + } } cleanup: From 25ad171f63b7ba8b8fd323e26466951f512a666f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 2 May 2023 12:02:20 +0300 Subject: [PATCH 875/895] JIT: Fixed inaccurate range inference usage for UNDEF/NULL/FALSE Fixes oss-fuzz #58459 --- ext/opcache/jit/zend_jit_arm64.dasc | 2 +- ext/opcache/jit/zend_jit_x86.dasc | 2 +- ext/opcache/tests/jit/mod_007.phpt | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 ext/opcache/tests/jit/mod_007.phpt diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index a1f60030574f6..0621d7e76c4f2 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -4834,7 +4834,7 @@ static int zend_jit_long_math_helper(dasm_State **Dst, op2_reg = Z_REG(op2_addr); } - if (!op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) { + if ((op2_type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) || !op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) { | cbz Rx(op2_reg), >1 |.cold_code |1: diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 44e14d1f1126d..d47e346989d65 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -5272,7 +5272,7 @@ static int zend_jit_long_math_helper(dasm_State **Dst, } } } else { - if (!op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) { + if ((op2_type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) || !op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) { if (Z_MODE(op2_addr) == IS_MEM_ZVAL) { | cmp aword [Ra(Z_REG(op2_addr))+Z_OFFSET(op2_addr)], 0 } else if (Z_MODE(op2_addr) == IS_REG) { diff --git a/ext/opcache/tests/jit/mod_007.phpt b/ext/opcache/tests/jit/mod_007.phpt new file mode 100644 index 0000000000000..c83bd0e5a058b --- /dev/null +++ b/ext/opcache/tests/jit/mod_007.phpt @@ -0,0 +1,23 @@ +--TEST-- +JIT MOD: 007 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +opcache.protect_memory=1 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught DivisionByZeroError: Modulo by zero in %smod_007.php:4 +Stack trace: +#0 %smod_007.php(7): test(NULL) +#1 {main} + thrown in %smod_007.php on line 4 \ No newline at end of file From f127e6581ae53cef690a80a8c373a70d3e47d60c Mon Sep 17 00:00:00 2001 From: yang yuhan Date: Tue, 2 May 2023 17:34:49 +0800 Subject: [PATCH 876/895] JIT: Align JIT stubs (#11149) Fixed phpGH-11120 Signed-off-by: PeterYang12 --- ext/opcache/jit/zend_jit.c | 1 + ext/opcache/jit/zend_jit_arm64.dasc | 6 ++++++ ext/opcache/jit/zend_jit_trace.c | 1 + ext/opcache/jit/zend_jit_x86.dasc | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 231c976d0bab7..e5a748d8355a8 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4696,6 +4696,7 @@ static int zend_jit_make_stubs(void) for (i = 0; i < sizeof(zend_jit_stubs)/sizeof(zend_jit_stubs[0]); i++) { dasm_setup(&dasm_state, dasm_actions); + zend_jit_align_stub(&dasm_state); if (!zend_jit_stubs[i].stub(&dasm_state)) { return 0; } diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index ed3ae28476f2e..a2963d0aa4e53 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -2854,6 +2854,12 @@ static int zend_jit_align_func(dasm_State **Dst) return 1; } +static int zend_jit_align_stub(dasm_State **Dst) +{ + |.align 16 + return 1; +} + static int zend_jit_prologue(dasm_State **Dst) { if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) { diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f46e7a73cd5e7..ed8cdbc95b590 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -94,6 +94,7 @@ static const void *zend_jit_trace_allocate_exit_group(uint32_t n) dasm_init(&dasm_state, DASM_MAXSECTION); dasm_setupglobal(&dasm_state, dasm_labels, zend_lb_MAX); dasm_setup(&dasm_state, dasm_actions); + zend_jit_align_stub(&dasm_state); zend_jit_trace_exit_group_stub(&dasm_state, n); sprintf(name, "jit$$trace_exit_%d", n); diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index a1b5aade0e994..37f6a1e0e36bf 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3070,6 +3070,12 @@ static int zend_jit_align_func(dasm_State **Dst) return 1; } +static int zend_jit_align_stub(dasm_State **Dst) +{ + |.align 16 + return 1; +} + static int zend_jit_prologue(dasm_State **Dst) { | ENDBR From e2f477c2cb8736d6f847631a10ea1fa1b4560650 Mon Sep 17 00:00:00 2001 From: ColinHDev Date: Fri, 28 Apr 2023 17:12:31 +0200 Subject: [PATCH 877/895] Fix negative indices on empty array not affecting next chosen index Changed the value of nNextFreeElement in _zend_empty_array from 0 to ZEND_LONG_MIN. Fixes GH-11154 Closes GH-11157 --- NEWS | 2 ++ UPGRADING | 2 ++ Zend/zend_hash.c | 2 +- .../array/negative_index_empty_array.phpt | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/array/negative_index_empty_array.phpt diff --git a/NEWS b/NEWS index d91d92bdc035f..268ae89ce7dd7 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,8 @@ PHP NEWS values). (dstogov, nielsdos, ilutov) . Fix bug GH-10935 (Use of trait doesn't redeclare static property if class has inherited it from its parent). (ilutov) + . Fix bug GH-11154 (Negative indices on empty array don't affect next chosen + index). (ColinHDev) - Date: . Implement More Appropriate Date/Time Exceptions RFC. (Derick) diff --git a/UPGRADING b/UPGRADING index 9f096a189b35b..665f6b3f418a6 100644 --- a/UPGRADING +++ b/UPGRADING @@ -39,6 +39,8 @@ PHP 8.3 UPGRADE NOTES inherited from the parent class. This will create a separate static property storage for the current class. This is analogous to adding the static property to the class directly without traits. + . Assigning a negative index n to an empty array will now make sure that the + next index is n+1 instead of 0. - FFI: . C functions that have a return type of void now return null instead of diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 9c09dfdc274a6..e9525db95c51a 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -255,7 +255,7 @@ ZEND_API const HashTable zend_empty_array = { .nNumOfElements = 0, .nTableSize = HT_MIN_SIZE, .nInternalPointer = 0, - .nNextFreeElement = 0, + .nNextFreeElement = ZEND_LONG_MIN, .pDestructor = ZVAL_PTR_DTOR }; diff --git a/ext/standard/tests/array/negative_index_empty_array.phpt b/ext/standard/tests/array/negative_index_empty_array.phpt new file mode 100644 index 0000000000000..322ac6e820ce6 --- /dev/null +++ b/ext/standard/tests/array/negative_index_empty_array.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test empty arrays with first added index being negative +--FILE-- + +--EXPECT-- +array(2) { + [-5]=> + string(2) "-5" + [-4]=> + string(8) "after -5" +} From 0e5ac62f4eb310032a2ad65ea2c008e1981ddad3 Mon Sep 17 00:00:00 2001 From: Sara Date: Tue, 2 May 2023 23:47:13 +0800 Subject: [PATCH 878/895] Add configuration opcache.jit_max_trace_length (#11173) Max length of a single trace. A long trace generates long JITTed code, which influences the performance slightly. opcache.jit_max_trace_length range is [4,1024], the default value is 1024. Reviewed-by: Su, Tao Signed-off-by: Wang, Xue --- ext/opcache/jit/zend_jit.h | 1 + ext/opcache/jit/zend_jit_vm_helpers.c | 4 ++-- ext/opcache/zend_accelerator_module.c | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index 09380f14ebe59..029bdd9a510a3 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -115,6 +115,7 @@ typedef struct _zend_jit_globals { zend_long max_recursive_calls; /* max number of recursive inlined call unrolls */ zend_long max_recursive_returns; /* max number of recursive inlined return unrolls */ zend_long max_polymorphic_calls; /* max number of inlined polymorphic calls */ + zend_long max_trace_length; /* max length of a single trace */ zend_sym_node *symbols; /* symbols for disassembler */ diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index ea23b4b2ed815..d78cde95e9641 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -360,7 +360,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_trace_helper(ZEND_OPCODE_HAN trace_buffer[idx].info = _op | (_info); \ trace_buffer[idx].ptr = _ptr; \ idx++; \ - if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 2) { \ + if (idx >= JIT_G(max_trace_length) - 2) { \ stop = ZEND_JIT_TRACE_STOP_TOO_LONG; \ break; \ } @@ -372,7 +372,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_trace_helper(ZEND_OPCODE_HAN trace_buffer[idx].op3_type = _op3_type; \ trace_buffer[idx].ptr = _ptr; \ idx++; \ - if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 2) { \ + if (idx >= JIT_G(max_trace_length) - 2) { \ stop = ZEND_JIT_TRACE_STOP_TOO_LONG; \ break; \ } diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index a50110b17572f..6b1c872fe0520 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -258,6 +258,19 @@ static ZEND_INI_MH(OnUpdateUnrollL) ZEND_JIT_TRACE_MAX_LOOPS_UNROLL); return FAILURE; } + +static ZEND_INI_MH(OnUpdateMaxTraceLength) +{ + zend_long val = zend_ini_parse_quantity_warn(new_value, entry->name); + if (val > 3 && val <= ZEND_JIT_TRACE_MAX_LENGTH) { + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); + *p = val; + return SUCCESS; + } + zend_error(E_WARNING, "Invalid \"%s\" setting. Should be between 4 and %d", ZSTR_VAL(entry->name), + ZEND_JIT_TRACE_MAX_LENGTH); + return FAILURE; +} #endif ZEND_INI_BEGIN() @@ -336,6 +349,7 @@ ZEND_INI_BEGIN() STD_PHP_INI_ENTRY("opcache.jit_max_recursive_calls" , "2", PHP_INI_ALL, OnUpdateUnrollC, max_recursive_calls, zend_jit_globals, jit_globals) STD_PHP_INI_ENTRY("opcache.jit_max_recursive_returns" , "2", PHP_INI_ALL, OnUpdateUnrollR, max_recursive_returns, zend_jit_globals, jit_globals) STD_PHP_INI_ENTRY("opcache.jit_max_polymorphic_calls" , "2", PHP_INI_ALL, OnUpdateLong, max_polymorphic_calls, zend_jit_globals, jit_globals) + STD_PHP_INI_ENTRY("opcache.jit_max_trace_length" , "1024", PHP_INI_ALL, OnUpdateMaxTraceLength, max_trace_length, zend_jit_globals, jit_globals) #endif ZEND_INI_END() @@ -849,6 +863,7 @@ ZEND_FUNCTION(opcache_get_configuration) add_assoc_long(&directives, "opcache.jit_max_root_traces", JIT_G(max_root_traces)); add_assoc_long(&directives, "opcache.jit_max_side_traces", JIT_G(max_side_traces)); add_assoc_long(&directives, "opcache.jit_prof_threshold", JIT_G(prof_threshold)); + add_assoc_long(&directives, "opcache.jit_max_trace_length", JIT_G(max_trace_length)); #endif add_assoc_zval(return_value, "directives", &directives); From ed0b593c11225e5a013cd09bc3992efa2e7f5a49 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 2 May 2023 20:32:48 +0300 Subject: [PATCH 879/895] Fixed GH-11127 (JIT fault) * Fixed GH-11127 (JIT fault) * Added test * Add new line --- ext/opcache/jit/zend_jit_arm64.dasc | 12 +++++++++- ext/opcache/jit/zend_jit_x86.dasc | 24 ++++++++++++++++++-- ext/opcache/tests/jit/init_fcall_003.inc | 6 +++++ ext/opcache/tests/jit/init_fcall_003.phpt | 27 +++++++++++++++++++++++ 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 ext/opcache/tests/jit/init_fcall_003.inc create mode 100644 ext/opcache/tests/jit/init_fcall_003.phpt diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index 0621d7e76c4f2..06969de67c65d 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -8836,7 +8836,17 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t | // if (CACHED_PTR(opline->result.num)) | ldr REG2, EX->run_time_cache | MEM_ACCESS_64_WITH_UOFFSET ldr, REG0, REG2, opline->result.num, TMP1 - | cbz REG0, >1 + if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE + && func + && (func->common.fn_flags & ZEND_ACC_IMMUTABLE) + && opline->opcode != ZEND_INIT_FCALL) { + /* Called func may be changed because of recompilation. See ext/opcache/tests/jit/init_fcall_003.phpt */ + | LOAD_ADDR REG1, ((ptrdiff_t)func) + | cmp REG0, REG1 + | bne >1 + } else { + | cbz REG0, >1 + } |.cold_code |1: if (opline->opcode == ZEND_INIT_FCALL diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index d47e346989d65..3e6ecaec5b179 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9453,8 +9453,28 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t | // if (CACHED_PTR(opline->result.num)) | mov r2, EX->run_time_cache | mov r0, aword [r2 + opline->result.num] - | test r0, r0 - | jz >1 + if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE + && func + && (func->common.fn_flags & ZEND_ACC_IMMUTABLE) + && opline->opcode != ZEND_INIT_FCALL) { + /* Called func may be changed because of recompilation. See ext/opcache/tests/jit/init_fcall_003.phpt */ + | .if X64 + || if (!IS_SIGNED_32BIT(func)) { + | mov64 r1, ((ptrdiff_t)func) + | cmp r0, r1 + || } else { + | cmp r0, func + || } + | .else + | cmp r0, func + | .endif + | jnz >1 + |.cold_code + |1: + } else { + | test r0, r0 + | jz >1 + } |.cold_code |1: if (opline->opcode == ZEND_INIT_FCALL diff --git a/ext/opcache/tests/jit/init_fcall_003.inc b/ext/opcache/tests/jit/init_fcall_003.inc new file mode 100644 index 0000000000000..b35315778f42a --- /dev/null +++ b/ext/opcache/tests/jit/init_fcall_003.inc @@ -0,0 +1,6 @@ + diff --git a/ext/opcache/tests/jit/init_fcall_003.phpt b/ext/opcache/tests/jit/init_fcall_003.phpt new file mode 100644 index 0000000000000..f37344cbce4a9 --- /dev/null +++ b/ext/opcache/tests/jit/init_fcall_003.phpt @@ -0,0 +1,27 @@ +--TEST-- +JIT INIT_FCALL: 003 incorrect init fcall guard (fail with tracing JIT and --repeat 3) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +opcache.jit_max_polymorphic_calls=0 +opcache.jit=tracing +opcache.jit_hot_loop=64 +opcache.jit_hot_func=127 +opcache.jit_hot_return=8 +opcache.jit_hot_side_exit=8 +--FILE-- + +DONE +--EXPECT-- +DONE From fbf5216ca0480af791488a790dadd2a8e01e48b7 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Mon, 1 May 2023 01:54:23 +0200 Subject: [PATCH 880/895] Fix too wide OR and AND range inference There is a typo which causes the AND and OR range inference to infer a wider range than necessary. Fix this typo. There are many ranges for which the inference is too wide, I just picked one for AND and one for OR that I found through symbolic execution. In this example test, the previous range inferred for test_or was [-27..-1] instead of [-20..-1]. And the previous range inferred for test_and was [-32..-25] instead of [-28..-25]. Closes GH-11170. --- NEWS | 1 + Zend/Optimizer/zend_inference.c | 4 +- ext/opcache/tests/opt/gh11170.phpt | 145 +++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 ext/opcache/tests/opt/gh11170.phpt diff --git a/NEWS b/NEWS index b99a989402b3f..9a3421557113f 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP NEWS - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) + . Fixed too wide OR and AND range inference. (nielsdos) - PGSQL: . Fixed parameter parsing of pg_lo_export(). (kocsismate) diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index ba7c302582f64..91a142a9f863f 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -436,7 +436,7 @@ static void zend_ssa_range_or(zend_long a, zend_long b, zend_long c, zend_long d int x = ((a < 0) ? 8 : 0) | ((b < 0) ? 4 : 0) | ((c < 0) ? 2 : 0) | - ((d < 0) ? 2 : 0); + ((d < 0) ? 1 : 0); switch (x) { case 0x0: case 0x3: @@ -484,7 +484,7 @@ static void zend_ssa_range_and(zend_long a, zend_long b, zend_long c, zend_long int x = ((a < 0) ? 8 : 0) | ((b < 0) ? 4 : 0) | ((c < 0) ? 2 : 0) | - ((d < 0) ? 2 : 0); + ((d < 0) ? 1 : 0); switch (x) { case 0x0: case 0x3: diff --git a/ext/opcache/tests/opt/gh11170.phpt b/ext/opcache/tests/opt/gh11170.phpt new file mode 100644 index 0000000000000..ca00c5e852966 --- /dev/null +++ b/ext/opcache/tests/opt/gh11170.phpt @@ -0,0 +1,145 @@ +--TEST-- +GH-11170 (Too wide OR and AND range inferred) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +opcache.opt_debug_level=0x400000 +opcache.preload= +--EXTENSIONS-- +opcache +--FILE-- + +--EXPECTF-- +$_main: + ; (lines=5, args=0, vars=0, tmps=2, ssa_vars=0, no_loops) + ; (after dfa pass) + ; %s + ; return [long] RANGE[1..1] +BB0: + ; start exit lines=[0-4] + ; level=0 +0000 INIT_FCALL 0 %d string("test_or") +0001 DO_UCALL +0002 INIT_FCALL 0 %d string("test_and") +0003 DO_UCALL +0004 RETURN int(1) + +test_or: + ; (lines=11, args=0, vars=2, tmps=7, ssa_vars=11, no_loops) + ; (after dfa pass) + ; %s + ; return [long] RANGE[-20..-1] + ; #0.CV0($a) NOVAL [undef] + ; #1.CV1($b) NOVAL [undef] +BB0: + ; start lines=[0-3] + ; to=(BB2, BB1) + ; level=0 + ; children=(BB1, BB2, BB3) +0000 INIT_FCALL 0 %d string("rand") +0001 #2.V2 [long] = DO_ICALL +0002 #3.T3 [long] RANGE[MIN..MAX] = MOD #2.V2 [long] int(10) +0003 JMPZ #3.T3 [long] RANGE[MIN..MAX] BB2 + +BB1: + ; follow lines=[4-6] + ; from=(BB0) + ; to=(BB3) + ; idom=BB0 + ; level=1 +0004 #4.CV0($a) [long] RANGE[-27..-27] = QM_ASSIGN int(-27) +0005 #5.CV1($b) [long] RANGE[-20..-20] = QM_ASSIGN int(-20) +0006 JMP BB3 + +BB2: + ; target lines=[7-8] + ; from=(BB0) + ; to=(BB3) + ; idom=BB0 + ; level=1 +0007 #6.CV0($a) [long] RANGE[-7..-7] = QM_ASSIGN int(-7) +0008 #7.CV1($b) [long] RANGE[-10..-10] = QM_ASSIGN int(-10) + +BB3: + ; follow target exit lines=[9-10] + ; from=(BB1, BB2) + ; idom=BB0 + ; level=1 + #8.CV0($a) [long] RANGE[-27..-7] = Phi(#4.CV0($a) [long] RANGE[-27..-27], #6.CV0($a) [long] RANGE[-7..-7]) + #9.CV1($b) [long] RANGE[-20..-10] = Phi(#5.CV1($b) [long] RANGE[-20..-20], #7.CV1($b) [long] RANGE[-10..-10]) +0009 #10.T8 [long] RANGE[-20..-1] = BW_OR #8.CV0($a) [long] RANGE[-27..-7] #9.CV1($b) [long] RANGE[-20..-10] +0010 RETURN #10.T8 [long] RANGE[-20..-1] + +test_and: + ; (lines=11, args=0, vars=2, tmps=7, ssa_vars=11, no_loops) + ; (after dfa pass) + ; %s + ; return [long] RANGE[-28..-25] + ; #0.CV0($a) NOVAL [undef] + ; #1.CV1($b) NOVAL [undef] +BB0: + ; start lines=[0-3] + ; to=(BB2, BB1) + ; level=0 + ; children=(BB1, BB2, BB3) +0000 INIT_FCALL 0 %d string("rand") +0001 #2.V2 [long] = DO_ICALL +0002 #3.T3 [long] RANGE[MIN..MAX] = MOD #2.V2 [long] int(10) +0003 JMPZ #3.T3 [long] RANGE[MIN..MAX] BB2 + +BB1: + ; follow lines=[4-6] + ; from=(BB0) + ; to=(BB3) + ; idom=BB0 + ; level=1 +0004 #4.CV0($a) [long] RANGE[-12..-12] = QM_ASSIGN int(-12) +0005 #5.CV1($b) [long] RANGE[-27..-27] = QM_ASSIGN int(-27) +0006 JMP BB3 + +BB2: + ; target lines=[7-8] + ; from=(BB0) + ; to=(BB3) + ; idom=BB0 + ; level=1 +0007 #6.CV0($a) [long] RANGE[-9..-9] = QM_ASSIGN int(-9) +0008 #7.CV1($b) [long] RANGE[-25..-25] = QM_ASSIGN int(-25) + +BB3: + ; follow target exit lines=[9-10] + ; from=(BB1, BB2) + ; idom=BB0 + ; level=1 + #8.CV0($a) [long] RANGE[-12..-9] = Phi(#4.CV0($a) [long] RANGE[-12..-12], #6.CV0($a) [long] RANGE[-9..-9]) + #9.CV1($b) [long] RANGE[-27..-25] = Phi(#5.CV1($b) [long] RANGE[-27..-27], #7.CV1($b) [long] RANGE[-25..-25]) +0009 #10.T8 [long] RANGE[-28..-25] = BW_AND #8.CV0($a) [long] RANGE[-12..-9] #9.CV1($b) [long] RANGE[-27..-25] +0010 RETURN #10.T8 [long] RANGE[-28..-25] From d82e96cc09c59b34573acd883235eed9e328ba9e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 28 Apr 2023 12:26:02 +0200 Subject: [PATCH 881/895] [skip ci] Link technical resources in CONTRIBUTING.md Co-authored-by: KapitanOczywisty Closes GH-11155 --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14ce3c53dd9fa..56df41053c35e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,7 @@ had several contributions accepted, commit privileges are often quickly granted. * [Pull requests](#pull-requests) * [Filing bugs](#filing-bugs) * [Feature requests](#feature-requests) +* [Technical resources](#technical-resources) * [Writing tests](#writing-tests) * [Writing documentation](#writing-documentation) * [Getting help](#getting-help) @@ -85,6 +86,30 @@ You may also want to read [The Mysterious PHP RFC Process](https://blogs.oracle.com/opal/post/the-mysterious-php-rfc-process-and-how-you-can-change-the-web) for additional notes on the best way to approach submitting an RFC. +## Technical resources + +There are a number of technical resources on php-src. Unfortunately, they are +scattered across different websites, and often outdated. Nonetheless, they can +provide a good starting point for learning about the fundamentals of the code +base. + +* https://www.phpinternalsbook.com/ +* https://www.npopov.com/ + * [Internal value representation](https://www.npopov.com/2015/05/05/Internal-value-representation-in-PHP-7-part-1.html), [part 2](https://www.npopov.com/2015/06/19/Internal-value-representation-in-PHP-7-part-2.html) + * [HashTable implementation](https://www.npopov.com/2014/12/22/PHPs-new-hashtable-implementation.html) + * [Zend Virtual Machine](https://www.npopov.com/2017/04/14/PHP-7-Virtual-machine.html) + * [How opcache works](https://www.npopov.com/2021/10/13/How-opcache-works.html) + * [The opcache optimizer](https://www.npopov.com/2022/05/22/The-opcache-optimizer.html) +* https://wiki.php.net/internals + * [Objects](https://wiki.php.net/internals/engine/objects) +* https://qa.php.net/ + * [Writing tests](https://qa.php.net/write-test.php) + * [Running tests](https://qa.php.net/running-tests.php) + * [PHPT structure](https://qa.php.net/phpt_details.php) +* https://phpinternals.net/ + * [Implementing new operator](https://phpinternals.net/articles/implementing_a_range_operator_into_php), [part 2](https://phpinternals.net/articles/a_reimplementation_of_the_range_operator) + * [Opcode extending](https://phpinternals.net/articles/implementing_new_language_constructs_via_opcode_extending) + ## Writing tests We love getting new tests! PHP is a huge project and improving test coverage is From 11597d18d6ca59ef1d61670120e74a82a6c85179 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 20 Mar 2023 22:15:54 +0100 Subject: [PATCH 882/895] Add retry mechanism in run-tests.php We have lots of spurious failures in CI, many of them with the "all" CONFLICT. We're limiting the retrying to specific error messages. In the future we may also provide a FLAKY section to retry specific tests. Closes GH-10892 --- run-tests.php | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/run-tests.php b/run-tests.php index 8bc59e2d847ec..14eb45eecd609 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1886,6 +1886,10 @@ function run_test(string $php, $file, array $env): string $skipCache = new SkipCache($enableSkipCache, $cfg['keep']['skip']); } + $retriable = true; + $retried = false; +retry: + $temp_filenames = null; $org_file = $file; $orig_php = $php; @@ -1930,8 +1934,11 @@ function run_test(string $php, $file, array $env): string $tested = $test->getName(); - if ($num_repeats > 1 && $test->hasSection('FILE_EXTERNAL')) { - return skip_test($tested, $tested_file, $shortname, 'Test with FILE_EXTERNAL might not be repeatable'); + if ($test->hasSection('FILE_EXTERNAL')) { + $retriable = false; + if ($num_repeats > 1) { + return skip_test($tested, $tested_file, $shortname, 'Test with FILE_EXTERNAL might not be repeatable'); + } } if ($test->hasSection('CAPTURE_STDIO')) { @@ -1957,6 +1964,7 @@ function run_test(string $php, $file, array $env): string } $php = $php_cgi . ' -C '; $uses_cgi = true; + $retriable = false; if ($num_repeats > 1) { return skip_test($tested, $tested_file, $shortname, 'CGI does not support --repeat'); } @@ -1974,20 +1982,18 @@ function run_test(string $php, $file, array $env): string } else { return skip_test($tested, $tested_file, $shortname, 'phpdbg not available'); } + $retriable = false; if ($num_repeats > 1) { return skip_test($tested, $tested_file, $shortname, 'phpdbg does not support --repeat'); } } - if ($num_repeats > 1) { - if ($test->hasSection('CLEAN')) { - return skip_test($tested, $tested_file, $shortname, 'Test with CLEAN might not be repeatable'); - } - if ($test->hasSection('STDIN')) { - return skip_test($tested, $tested_file, $shortname, 'Test with STDIN might not be repeatable'); - } - if ($test->hasSection('CAPTURE_STDIO')) { - return skip_test($tested, $tested_file, $shortname, 'Test with CAPTURE_STDIO might not be repeatable'); + foreach (['CLEAN', 'STDIN', 'CAPTURE_STDIO'] as $section) { + if ($test->hasSection($section)) { + $retriable = false; + if ($num_repeats > 1) { + return skip_test($tested, $tested_file, $shortname, "Test with $section might not be repeatable"); + } } } @@ -2166,8 +2172,11 @@ function run_test(string $php, $file, array $env): string $ini = preg_replace('/{MAIL:(\S+)}/', $replacement, $ini); settings2array(preg_split("/[\n\r]+/", $ini), $ini_settings); - if ($num_repeats > 1 && isset($ini_settings['opcache.opt_debug_level'])) { - return skip_test($tested, $tested_file, $shortname, 'opt_debug_level tests are not repeatable'); + if (isset($ini_settings['opcache.opt_debug_level'])) { + $retriable = false; + if ($num_repeats > 1) { + return skip_test($tested, $tested_file, $shortname, 'opt_debug_level tests are not repeatable'); + } } } @@ -2693,6 +2702,9 @@ function run_test(string $php, $file, array $env): string } elseif ($test->hasSection('XLEAK')) { $warn = true; $info = " (warn: XLEAK section but test passes)"; + } elseif ($retried) { + $warn = true; + $info = " (warn: Test passed on retry attempt)"; } else { show_result("PASS", $tested, $tested_file, '', $temp_filenames); $junit->markTestAs('PASS', $shortname, $tested); @@ -2722,6 +2734,9 @@ function run_test(string $php, $file, array $env): string } elseif ($test->hasSection('XLEAK')) { $warn = true; $info = " (warn: XLEAK section but test passes)"; + } elseif ($retried) { + $warn = true; + $info = " (warn: Test passed on retry attempt)"; } else { show_result("PASS", $tested, $tested_file, '', $temp_filenames); $junit->markTestAs('PASS', $shortname, $tested); @@ -2732,6 +2747,10 @@ function run_test(string $php, $file, array $env): string $wanted_re = null; } + if (!$passed && !$retried && $retriable && error_may_be_retried($output)) { + $retried = true; + goto retry; + } // Test failed so we need to report details. if ($failed_headers) { @@ -2856,6 +2875,11 @@ function run_test(string $php, $file, array $env): string return $restype[0] . 'ED'; } +function error_may_be_retried(string $output): bool +{ + return preg_match('((timed out)|(connection refused))i', $output) === 1; +} + /** * @return bool|int */ From 36559fb264b223125dc20d0955ec8be4f0e5ffda Mon Sep 17 00:00:00 2001 From: Nils Date: Wed, 3 May 2023 17:46:31 +0100 Subject: [PATCH 883/895] Remove unused macro PHP_FNV1_32A_INIT and PHP_FNV1A_64_INIT (#11114) --- UPGRADING.INTERNALS | 1 + ext/hash/php_hash_fnv.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 1309cb34ac6c6..b4675e22215e9 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -66,6 +66,7 @@ PHP 8.3 INTERNALS UPGRADE NOTES - zend_parse_ini_string - zend_set_user_opcode_handler - zend_ssa_inference +* Removed unused macros PHP_FNV1_32A_INIT and PHP_FNV1A_64_INIT. See GH-11114. ======================== 2. Build system changes diff --git a/ext/hash/php_hash_fnv.h b/ext/hash/php_hash_fnv.h index b05e70a8ad21e..e9d1ce8d0b442 100644 --- a/ext/hash/php_hash_fnv.h +++ b/ext/hash/php_hash_fnv.h @@ -18,12 +18,10 @@ #define PHP_HASH_FNV_H #define PHP_FNV1_32_INIT ((uint32_t)0x811c9dc5) -#define PHP_FNV1_32A_INIT PHP_FNV1_32_INIT #define PHP_FNV_32_PRIME ((uint32_t)0x01000193) #define PHP_FNV1_64_INIT ((uint64_t)0xcbf29ce484222325ULL) -#define PHP_FNV1A_64_INIT FNV1_64_INIT #define PHP_FNV_64_PRIME ((uint64_t)0x100000001b3ULL) From ef6bbaa1ecfa6891a2308008c1a8c8a104c60bf7 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 18 Apr 2023 13:59:07 +0200 Subject: [PATCH 884/895] Downgrade to Ubuntu 20.04 for ASAN nightly for now See https://github.com/actions/runner-images/issues/6709. --- .github/nightly_matrix.php | 3 +++ .github/scripts/setup-slapd.sh | 4 ++++ .github/workflows/nightly.yml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/nightly_matrix.php b/.github/nightly_matrix.php index 18e0df0d9eaa8..5c89c0e8986dc 100644 --- a/.github/nightly_matrix.php +++ b/.github/nightly_matrix.php @@ -53,6 +53,7 @@ function get_matrix_include(array $branches) { 'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'", 'run_tests_parameters' => '--asan', 'test_function_jit' => false, + 'asan' => true, ]; if ($branch['ref'] !== 'PHP-8.0') { $jobs[] = [ @@ -63,6 +64,7 @@ function get_matrix_include(array $branches) { 'run_tests_parameters' => '--repeat 2', 'timeout_minutes' => 360, 'test_function_jit' => true, + 'asan' => false, ]; $jobs[] = [ 'name' => '_VARIATION', @@ -72,6 +74,7 @@ function get_matrix_include(array $branches) { 'configuration_parameters' => "CFLAGS='-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1'", 'timeout_minutes' => 360, 'test_function_jit' => true, + 'asan' => false, ]; } } diff --git a/.github/scripts/setup-slapd.sh b/.github/scripts/setup-slapd.sh index c698d16afae9f..5539d7f6272f3 100755 --- a/.github/scripts/setup-slapd.sh +++ b/.github/scripts/setup-slapd.sh @@ -42,6 +42,10 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap # Configure LDAP database. DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`; +if test -f "/etc/ldap/schema/ppolicy.ldif"; then + sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif +fi + sudo service slapd restart sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b81fc879b6777..4617343647410 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,7 @@ jobs: zts: [true, false] include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.matrix-include) }} name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" - runs-on: ubuntu-${{ matrix.branch.ref == 'master' && '22.04' || '20.04' }} + runs-on: ubuntu-${{ (matrix.branch.ref == 'master' && !matrix.asan) && '22.04' || '20.04' }} steps: - name: git checkout uses: actions/checkout@v3 From 4ca8daf3eda7eca5430e9234785c1401d14667c2 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Tue, 2 May 2023 21:21:01 +0200 Subject: [PATCH 885/895] Fix GH-9068: Conditional jump or move depends on uninitialised value(s) This patch preserves the scratch registers of the SysV x86-64 ABI by storing them to the stack and restoring them later. We need to do this to prevent the registers of the caller from being corrupted. The reason these get corrupted is because the compiler is unaware of the Valgrind replacement function and thus makes assumptions about the original function regarding registers which are not true for the replacement function. For implementation I used a GCC and Clang attribute. A more general approach would be to use inline assembly but that's also less portable and quite hacky. This attributes is supported since GCC 7.x, but the target option is only supported since 11.x. For Clang the target option does not matter. Closes GH-10221. --- NEWS | 4 ++++ Zend/zend_string.c | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9a3421557113f..4c29303a5ad22 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.20 +- Core: + . Fixed bug GH-9068 (Conditional jump or move depends on uninitialised + value(s)). (nielsdos) + - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) . Fixed too wide OR and AND range inference. (nielsdos) diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 8e6a16c64afb5..1da3ce5248522 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -372,11 +372,28 @@ ZEND_API void zend_interned_strings_switch_storage(bool request) # define I_REPLACE_SONAME_FNNAME_ZU(soname, fnname) _vgr00000ZU_ ## soname ## _ ## fnname #endif -ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) +/* See GH-9068 */ +#if defined(__GNUC__) && (__GNUC__ >= 11 || defined(__clang__)) && __has_attribute(no_caller_saved_registers) +# define NO_CALLER_SAVED_REGISTERS __attribute__((no_caller_saved_registers)) +# ifndef __clang__ +# pragma GCC push_options +# pragma GCC target ("general-regs-only") +# define POP_OPTIONS +# endif +#else +# define NO_CALLER_SAVED_REGISTERS +#endif + +ZEND_API bool ZEND_FASTCALL NO_CALLER_SAVED_REGISTERS I_REPLACE_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) { return !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); } +#ifdef POP_OPTIONS +# pragma GCC pop_options +# undef POP_OPTIONS +#endif + #if defined(__GNUC__) && defined(__i386__) ZEND_API bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2) { From d75c1d00a98faedbc36031ab42780e63192d9e2b Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Tue, 2 May 2023 23:45:50 +0200 Subject: [PATCH 886/895] Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour A negative value like -1 may overflow and cause incorrect results in the timeout variable, which causes an immediate timeout. As this is caused by undefined behaviour the exact behaviour depends on the compiler, its version, and the platform. A large overflow is also possible, if an extremely large timeout value is passed we also set an indefinite timeout. This is because the timeout value is at least a 64-bit number and waiting for UINT64_MAX/1000000 seconds is waiting about 584K years. Closes GH-11183. --- NEWS | 5 +++++ ext/standard/streamsfuncs.c | 39 +++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 4c29303a5ad22..2f9d717c0d2c4 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,11 @@ PHP NEWS . Fixed bug GH-11138 (move_uploaded_file() emits open_basedir warning for source file). (ilutov) +- Streams: + . Fixed bug GH-11175 (Stream Socket Timeout). (nielsdos) + . Fixed bug GH-11177 (ASAN UndefinedBehaviorSanitizer when timeout = -1 + passed to stream_socket_accept/stream_socket_client). (nielsdos) + 11 May 2023, PHP 8.1.19 - Core: diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 188bcee885481..8bd345cc2c1c3 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -33,11 +33,13 @@ #ifndef PHP_WIN32 #define php_select(m, r, w, e, t) select(m, r, w, e, t) typedef unsigned long long php_timeout_ull; +#define PHP_TIMEOUT_ULL_MAX ULLONG_MAX #else #include "win32/select.h" #include "win32/sockets.h" #include "win32/console.h" typedef unsigned __int64 php_timeout_ull; +#define PHP_TIMEOUT_ULL_MAX UINT64_MAX #endif #define GET_CTX_OPT(stream, wrapper, name, val) (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), wrapper, name))) @@ -134,14 +136,21 @@ PHP_FUNCTION(stream_socket_client) } /* prepare the timeout value for use */ - conv = (php_timeout_ull) (timeout * 1000000.0); + struct timeval *tv_pointer; + if (timeout < 0.0 || timeout >= (double) PHP_TIMEOUT_ULL_MAX / 1000000.0) { + tv_pointer = NULL; + } else { + conv = (php_timeout_ull) (timeout * 1000000.0); #ifdef PHP_WIN32 - tv.tv_sec = (long)(conv / 1000000); - tv.tv_usec =(long)(conv % 1000000); + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec = (long)(conv % 1000000); #else - tv.tv_sec = conv / 1000000; - tv.tv_usec = conv % 1000000; + tv.tv_sec = conv / 1000000; + tv.tv_usec = conv % 1000000; #endif + tv_pointer = &tv; + } + if (zerrno) { ZEND_TRY_ASSIGN_REF_LONG(zerrno, 0); } @@ -152,7 +161,7 @@ PHP_FUNCTION(stream_socket_client) stream = php_stream_xport_create(ZSTR_VAL(host), ZSTR_LEN(host), REPORT_ERRORS, STREAM_XPORT_CLIENT | (flags & PHP_STREAM_CLIENT_CONNECT ? STREAM_XPORT_CONNECT : 0) | (flags & PHP_STREAM_CLIENT_ASYNC_CONNECT ? STREAM_XPORT_CONNECT_ASYNC : 0), - hashkey, &tv, context, &errstr, &err); + hashkey, tv_pointer, context, &errstr, &err); if (stream == NULL) { @@ -275,19 +284,25 @@ PHP_FUNCTION(stream_socket_accept) php_stream_from_zval(stream, zstream); /* prepare the timeout value for use */ - conv = (php_timeout_ull) (timeout * 1000000.0); + struct timeval *tv_pointer; + if (timeout < 0.0 || timeout >= (double) PHP_TIMEOUT_ULL_MAX / 1000000.0) { + tv_pointer = NULL; + } else { + conv = (php_timeout_ull) (timeout * 1000000.0); #ifdef PHP_WIN32 - tv.tv_sec = (long)(conv / 1000000); - tv.tv_usec = (long)(conv % 1000000); + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec = (long)(conv % 1000000); #else - tv.tv_sec = conv / 1000000; - tv.tv_usec = conv % 1000000; + tv.tv_sec = conv / 1000000; + tv.tv_usec = conv % 1000000; #endif + tv_pointer = &tv; + } if (0 == php_stream_xport_accept(stream, &clistream, zpeername ? &peername : NULL, NULL, NULL, - &tv, &errstr + tv_pointer, &errstr ) && clistream) { if (peername) { From 81e50b4ee3fa737f57f177ad21f2b57fd8edabc7 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Tue, 2 May 2023 20:53:22 +0200 Subject: [PATCH 887/895] Fix GH-11178: Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18) Dynamic property case in zend_get_property_info() can return NULL for prop info. This was not handled. Closes GH-11182. --- NEWS | 4 ++++ ext/spl/spl_array.c | 3 ++- ext/spl/tests/gh11178.phpt | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ext/spl/tests/gh11178.phpt diff --git a/NEWS b/NEWS index 2f9d717c0d2c4..91e22d7252365 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ PHP NEWS - PGSQL: . Fixed parameter parsing of pg_lo_export(). (kocsismate) +- SPL: + . Fixed bug GH-11178 (Segmentation fault in spl_array_it_get_current_data + (PHP 8.1.18)). (nielsdos) + - Standard: . Fixed bug GH-11138 (move_uploaded_file() emits open_basedir warning for source file). (ilutov) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 75607e80f4365..676f68fb6b276 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1037,7 +1037,8 @@ static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */ zend_hash_get_current_key_ex(aht, &key, NULL, spl_array_get_pos_ptr(aht, object)); zend_class_entry *ce = Z_OBJCE(object->array); zend_property_info *prop_info = zend_get_property_info(ce, key, true); - if (ZEND_TYPE_IS_SET(prop_info->type)) { + ZEND_ASSERT(prop_info != ZEND_WRONG_PROPERTY_INFO); + if (EXPECTED(prop_info != NULL) && ZEND_TYPE_IS_SET(prop_info->type)) { if (prop_info->flags & ZEND_ACC_READONLY) { zend_throw_error(NULL, "Cannot acquire reference to readonly property %s::$%s", diff --git a/ext/spl/tests/gh11178.phpt b/ext/spl/tests/gh11178.phpt new file mode 100644 index 0000000000000..3732c57a59d19 --- /dev/null +++ b/ext/spl/tests/gh11178.phpt @@ -0,0 +1,28 @@ +--TEST-- +GH-11178 (Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18)) +--FILE-- +{'x'} = 1; + } + + function getIterator(): Traversable { + return new ArrayIterator($this); + } +} + +$obj = new A; + +foreach ($obj as $k => &$v) { + $v = 3; +} + +var_dump($obj); +?> +--EXPECT-- +object(A)#1 (1) { + ["x"]=> + &int(3) +} From f6c0c60ef63c1e528dd3bd945c8f22270bbe3837 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:33:41 +0200 Subject: [PATCH 888/895] Fix GH-11104: STDIN/STDOUT/STDERR is not available for CLI without a script I found no reason why this is done this way. Of course this will allow users to do stupid stuff like `fclose(STDOUT);` etc. but if they type in that code they clearly know what they're doing... Close GH-11169. --- NEWS | 2 ++ sapi/cli/php_cli.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 268ae89ce7dd7..81095b5f96ba9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - CLI: . Added pdeathsig to builtin server to terminate workers when the master process is killed. (ilutov) + . Fixed bug GH-11104 (STDIN/STDOUT/STDERR is not available for CLI without + a script). (nielsdos) - Core: . Fixed bug GH-9388 (Improve unset property and __get type incompatibility diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 2f936a39b714f..5e84ae7379cfb 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -951,9 +951,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ PG(during_request_startup) = 0; switch (behavior) { case PHP_MODE_STANDARD: - if (script_file) { - cli_register_file_handles(); - } + cli_register_file_handles(); if (interactive) { EG(exit_status) = cli_shell_callbacks.cli_shell_run(); From a65cdd97a148dccdb68a5f58c258d54c305f1b2e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 4 May 2023 19:51:02 +0200 Subject: [PATCH 889/895] Implement NEON-accelerated version of BLOCKCONV for lowercasing and uppercasing strings (#11161) Since lowercasing and uppercasing is a common operation for both internal purposes and userland purposes, it makes sense to implement a NEON accelerated version for this. --- Zend/zend_operators.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index d16699d698fea..a9932a6b592b6 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -41,6 +41,9 @@ #ifdef __SSE2__ #include #endif +#if defined(__aarch64__) || defined(_M_ARM64) +#include +#endif #if defined(ZEND_WIN32) && !defined(ZTS) && defined(_MSC_VER) /* This performance improvement of tolower() on Windows gives 10-18% on bench.php */ @@ -105,7 +108,30 @@ static _locale_t current_locale = NULL; __m128i blconv_result = _mm_add_epi8(blconv_operand, blconv_add); \ _mm_storeu_si128((__m128i *)(dest), blconv_result); -#endif /* __SSE2__ */ +#elif defined(__aarch64__) || defined(_M_ARM64) +#define HAVE_BLOCKCONV + +#define BLOCKCONV_INIT_RANGE(start, end) \ + const int8x16_t blconv_offset = vdupq_n_s8((signed char)(SCHAR_MIN - start)); \ + const int8x16_t blconv_threshold = vdupq_n_s8(SCHAR_MIN + (end - start) + 1); + +#define BLOCKCONV_STRIDE sizeof(int8x16_t) + +#define BLOCKCONV_INIT_DELTA(delta) \ + const int8x16_t blconv_delta = vdupq_n_s8(delta); + +#define BLOCKCONV_LOAD(input) \ + int8x16_t blconv_operand = vld1q_s8((const int8_t*)(input)); \ + uint8x16_t blconv_mask = vcltq_s8(vaddq_s8(blconv_operand, blconv_offset), blconv_threshold); + +#define BLOCKCONV_FOUND() vmaxvq_u8(blconv_mask) + +#define BLOCKCONV_STORE(dest) \ + int8x16_t blconv_add = vandq_s8(vreinterpretq_s8_u8(blconv_mask), blconv_delta); \ + int8x16_t blconv_result = vaddq_s8(blconv_operand, blconv_add); \ + vst1q_s8((int8_t *)(dest), blconv_result); + +#endif /* defined(__aarch64__) || defined(_M_ARM64) */ ZEND_API const unsigned char zend_tolower_map[256] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, From 84c185c8ba0d4235010f5c23cb2ace60fff3fd7b Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 15 Apr 2023 14:53:42 +0100 Subject: [PATCH 890/895] ext/pgsql: pg_cancel_query internal update. Removing (obsolete) PGrequestCancel usage in favor of the thread-safe PQcancel/PQfreeCancel pair. Close GH-11081 --- NEWS | 1 + ext/pgsql/pgsql.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 81095b5f96ba9..1a099ff0e20a2 100644 --- a/NEWS +++ b/NEWS @@ -123,6 +123,7 @@ PHP NEWS . pg_fetch_object raises a ValueError instead of an Exception. (David Carlier) . Added GH-9344, pipeline mode support. (David Carlier) + . pg_cancel use thread safe PQcancel api instead. (David Carlier) - Phar: . Fix memory leak in phar_rename_archive(). (stkeke) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 56b828df7f5ed..9eab234200259 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3470,12 +3470,22 @@ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type) PQconsumeInput(pgsql); RETVAL_LONG(PQisBusy(pgsql)); break; - case PHP_PG_ASYNC_REQUEST_CANCEL: - RETVAL_LONG(PQrequestCancel(pgsql)); + case PHP_PG_ASYNC_REQUEST_CANCEL: { + PGcancel *c; + char err[256]; + int rc; + + c = PQgetCancel(pgsql); + RETVAL_LONG((rc = PQcancel(c, err, sizeof(err)))); + if (rc < 0) { + zend_error(E_WARNING, "cannot cancel the query: %s", err); + } while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); } + PQfreeCancel(c); break; + } EMPTY_SWITCH_DEFAULT_CASE() } if (PQsetnonblocking(pgsql, 0)) { From 05bd1423eee788c3fda31fbaa99f9be2f3da1df3 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 5 May 2023 12:00:32 +0200 Subject: [PATCH 891/895] Fix GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state There are more places in zend_hash.c where the resize happened after some values on the HashTable struct were set. I reordered them all, but writing a test for these would rely on the particular amount of bytes allocated at given points in time. --- NEWS | 2 ++ Zend/tests/gh11189.phpt | 29 +++++++++++++++++++++++++++++ Zend/tests/gh11189_1.phpt | 29 +++++++++++++++++++++++++++++ Zend/zend_hash.c | 17 ++++++++++------- 4 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 Zend/tests/gh11189.phpt create mode 100644 Zend/tests/gh11189_1.phpt diff --git a/NEWS b/NEWS index 91e22d7252365..8938421723666 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - Core: . Fixed bug GH-9068 (Conditional jump or move depends on uninitialised value(s)). (nielsdos) + . Fixed bug GH-11189 (Exceeding memory limit in zend_hash_do_resize leaves + the array in an invalid state). (Bob) - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) diff --git a/Zend/tests/gh11189.phpt b/Zend/tests/gh11189.phpt new file mode 100644 index 0000000000000..f1c877f20ee47 --- /dev/null +++ b/Zend/tests/gh11189.phpt @@ -0,0 +1,29 @@ +--TEST-- +GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (packed array) +--SKIPIF-- + +--INI-- +memory_limit=2M +--FILE-- + 0; --$i) { + $a[] = 2; + } + fwrite(STDOUT, "Success"); +}); + +$a = []; +// trigger OOM in a resize operation +while (1) { + $a[] = 1; +} + +?> +--EXPECTF-- +Success +Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d diff --git a/Zend/tests/gh11189_1.phpt b/Zend/tests/gh11189_1.phpt new file mode 100644 index 0000000000000..53727908e5e2a --- /dev/null +++ b/Zend/tests/gh11189_1.phpt @@ -0,0 +1,29 @@ +--TEST-- +GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (not packed array) +--SKIPIF-- + +--INI-- +memory_limit=2M +--FILE-- + 0; --$i) { + $a[] = 2; + } + fwrite(STDOUT, "Success"); +}); + +$a = ["not packed" => 1]; +// trigger OOM in a resize operation +while (1) { + $a[] = 1; +} + +?> +--EXPECTF-- +Success +Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index a13bb196924e6..49c0df614369b 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -309,8 +309,9 @@ ZEND_API void ZEND_FASTCALL zend_hash_packed_grow(HashTable *ht) if (ht->nTableSize >= HT_MAX_SIZE) { zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%u * %zu + %zu)", ht->nTableSize * 2, sizeof(Bucket), sizeof(Bucket)); } - ht->nTableSize += ht->nTableSize; - HT_SET_DATA_ADDR(ht, perealloc2(HT_GET_DATA_ADDR(ht), HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), HT_USED_SIZE(ht), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)); + uint32_t newTableSize = ht->nTableSize * 2; + HT_SET_DATA_ADDR(ht, perealloc2(HT_GET_DATA_ADDR(ht), HT_SIZE_EX(newTableSize, HT_MIN_MASK), HT_USED_SIZE(ht), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)); + ht->nTableSize = newTableSize; } ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, bool packed) @@ -346,8 +347,9 @@ ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash(HashTable *ht) ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); HT_ASSERT_RC1(ht); - HT_FLAGS(ht) &= ~HASH_FLAG_PACKED; + // Alloc before assign to avoid inconsistencies on OOM new_data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); + HT_FLAGS(ht) &= ~HASH_FLAG_PACKED; ht->nTableMask = HT_SIZE_TO_MASK(ht->nTableSize); HT_SET_DATA_ADDR(ht, new_data); memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed); @@ -387,8 +389,9 @@ ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, bool if (packed) { ZEND_ASSERT(HT_FLAGS(ht) & HASH_FLAG_PACKED); if (nSize > ht->nTableSize) { - ht->nTableSize = zend_hash_check_size(nSize); - HT_SET_DATA_ADDR(ht, perealloc2(HT_GET_DATA_ADDR(ht), HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), HT_USED_SIZE(ht), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)); + uint32_t newTableSize = zend_hash_check_size(nSize); + HT_SET_DATA_ADDR(ht, perealloc2(HT_GET_DATA_ADDR(ht), HT_SIZE_EX(newTableSize, HT_MIN_MASK), HT_USED_SIZE(ht), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)); + ht->nTableSize = newTableSize; } } else { ZEND_ASSERT(!(HT_FLAGS(ht) & HASH_FLAG_PACKED)); @@ -396,8 +399,8 @@ ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, bool void *new_data, *old_data = HT_GET_DATA_ADDR(ht); Bucket *old_buckets = ht->arData; nSize = zend_hash_check_size(nSize); - ht->nTableSize = nSize; new_data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); + ht->nTableSize = nSize; ht->nTableMask = HT_SIZE_TO_MASK(ht->nTableSize); HT_SET_DATA_ADDR(ht, new_data); memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed); @@ -1217,8 +1220,8 @@ static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht) ZEND_ASSERT(HT_SIZE_TO_MASK(nSize)); - ht->nTableSize = nSize; new_data = pemalloc(HT_SIZE_EX(nSize, HT_SIZE_TO_MASK(nSize)), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); + ht->nTableSize = nSize; ht->nTableMask = HT_SIZE_TO_MASK(ht->nTableSize); HT_SET_DATA_ADDR(ht, new_data); memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed); From 7ec8ae12c4b214e39f27e0a93556750505f9cf95 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 9 Apr 2023 11:59:50 +0100 Subject: [PATCH 892/895] ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants. - PGSQL_TRACE_SUPPRESS_TIMESTAMPS. - PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable output to check possible regressions. Close GH-11041 --- NEWS | 2 ++ UPGRADING | 12 ++++++++---- ext/pgsql/pgsql.c | 16 +++++++++++++++- ext/pgsql/pgsql.stub.php | 16 +++++++++++++++- ext/pgsql/pgsql_arginfo.h | 9 ++++++++- ext/pgsql/tests/pg_trace.phpt | 26 ++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 ext/pgsql/tests/pg_trace.phpt diff --git a/NEWS b/NEWS index 1a099ff0e20a2..92fe365e3ab6b 100644 --- a/NEWS +++ b/NEWS @@ -124,6 +124,8 @@ PHP NEWS (David Carlier) . Added GH-9344, pipeline mode support. (David Carlier) . pg_cancel use thread safe PQcancel api instead. (David Carlier) + . pg_trace new PGSQL_TRACE_SUPPRESS_TIMESTAMPS/PGSQL_TRACE_REGRESS_MODE + contants support. (David Carlier) - Phar: . Fix memory leak in phar_rename_archive(). (stkeke) diff --git a/UPGRADING b/UPGRADING index 665f6b3f418a6..c9067e0288493 100644 --- a/UPGRADING +++ b/UPGRADING @@ -214,11 +214,15 @@ PHP 8.3 UPGRADE NOTES - PCNTL: . SIGINFO +- PGSQL: + . PGSQL_TRACE_SUPPRESS_TIMESTAMPS. + . PGSQL_TRACE_REGRESS_MODE. + - Posix: - . POSIX_SC_ARG_MAX - . POSIX_SC_PAGESIZE - . POSIX_SC_NPROCESSORS_CONF - . POSIX_SC_NPROCESSORS_ONLN + . POSIX_SC_ARG_MAX. + . POSIX_SC_PAGESIZE. + . POSIX_SC_NPROCESSORS_CONF. + . POSIX_SC_NPROCESSORS_ONLN. - Sockets: . SO_ATTACH_REUSEPORT_CBPF (Linux only). diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 9eab234200259..7f91232039884 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2115,13 +2115,14 @@ PHP_FUNCTION(pg_trace) { char *z_filename, *mode = "w"; size_t z_filename_len, mode_len; + zend_long trace_mode = 0; zval *pgsql_link = NULL; PGconn *pgsql; FILE *fp = NULL; php_stream *stream; pgsql_link_handle *link; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|sO!", &z_filename, &z_filename_len, &mode, &mode_len, &pgsql_link, pgsql_link_ce) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|sO!l", &z_filename, &z_filename_len, &mode, &mode_len, &pgsql_link, pgsql_link_ce, &trace_mode) == FAILURE) { RETURN_THROWS(); } @@ -2147,6 +2148,19 @@ PHP_FUNCTION(pg_trace) } php_stream_auto_cleanup(stream); PQtrace(pgsql, fp); + if (trace_mode > 0) { +#ifdef PQTRACE_REGRESS_MODE + if (!(trace_mode & (PQTRACE_SUPPRESS_TIMESTAMPS|PQTRACE_REGRESS_MODE))) { + zend_argument_value_error(4, "must be PGSQL_TRACE_SUPPRESS_TIMESTAMPS and/or PGSQL_TRACE_REGRESS_MODE"); + RETURN_THROWS(); + } else { + PQsetTraceFlags(pgsql, trace_mode); + } +#else + zend_argument_value_error(4, "cannot set as trace is unsupported"); + RETURN_THROWS(); +#endif + } RETURN_TRUE; } /* }}} */ diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 35efd2f33d7bc..e095350543c79 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -412,6 +412,20 @@ * @cvalue PGSQL_DML_STRING */ const PGSQL_DML_STRING = UNKNOWN; +#ifdef PQTRACE_SUPPPRESS_TIMESTAMPS + /** + * @var int + * @cvalue PQTRACE_SUPPRESS_TIMESTAMPS + */ + const PGSQL_TRACE_SUPPRESS_TIMESTAMPS = UNKNOWN; +#endif +#ifdef PQTRACE_REGRESS_MODE + /** + * @var int + * @cvalue PQTRACE_REGRESS_MODE + */ + const PGSQL_TRACE_REGRESS_MODE = UNKNOWN; +#endif #ifdef LIBPQ_HAS_PIPELINING /** @@ -662,7 +676,7 @@ function pg_last_oid(PgSql\Result $result): string|int|false {} */ function pg_getlastoid(PgSql\Result $result): string|int|false {} - function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null): bool {} + function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null, int $trace_mode = 0): bool {} function pg_untrace(?PgSql\Connection $connection = null): bool {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index 01ffe5c3df614..2b8e7cd17ae6a 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c4ff82a0df3e65eae3abbb8c9910978f28bf6ac4 */ + * Stub hash: f18a73443942daa2b3695e8750c8daaea6b96194 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -198,6 +198,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_trace, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"w\"") ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, trace_mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_pg_untrace arginfo_pg_close @@ -808,6 +809,12 @@ static void register_pgsql_symbols(int module_number) REGISTER_LONG_CONSTANT("PGSQL_DML_EXEC", PGSQL_DML_EXEC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_ASYNC", PGSQL_DML_ASYNC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_STRING", PGSQL_DML_STRING, CONST_PERSISTENT); +#if defined(PQTRACE_SUPPPRESS_TIMESTAMPS) + REGISTER_LONG_CONSTANT("PGSQL_TRACE_SUPPRESS_TIMESTAMPS", PQTRACE_SUPPRESS_TIMESTAMPS, CONST_PERSISTENT); +#endif +#if defined(PQTRACE_REGRESS_MODE) + REGISTER_LONG_CONSTANT("PGSQL_TRACE_REGRESS_MODE", PQTRACE_REGRESS_MODE, CONST_PERSISTENT); +#endif #if defined(LIBPQ_HAS_PIPELINING) REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_SYNC", PGRES_PIPELINE_SYNC, CONST_PERSISTENT); #endif diff --git a/ext/pgsql/tests/pg_trace.phpt b/ext/pgsql/tests/pg_trace.phpt new file mode 100644 index 0000000000000..0917959bbef77 --- /dev/null +++ b/ext/pgsql/tests/pg_trace.phpt @@ -0,0 +1,26 @@ +--TEST-- +pg_trace +--EXTENSIONS-- +pgsql +--SKIPIF-- + +--FILE-- +getMessage() . PHP_EOL; +} +var_dump(pg_trace($tracefile, 'w', $db, 0)); +$res = pg_query($db, 'select 1'); + +?> +--EXPECT-- +pg_trace(): Argument #4 ($trace_mode) cannot set as trace is unsupported +bool(true) From bb38ad7768bd583a1cff9e89125402d2ac28d018 Mon Sep 17 00:00:00 2001 From: Julien Quiaios Date: Fri, 5 May 2023 07:36:17 -0400 Subject: [PATCH 893/895] Add new test for array_fill() to cover the case when the parameter count is too large (#11184) --- .../tests/array/array_fill_error2.phpt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ext/standard/tests/array/array_fill_error2.phpt diff --git a/ext/standard/tests/array/array_fill_error2.phpt b/ext/standard/tests/array/array_fill_error2.phpt new file mode 100644 index 0000000000000..1f8b841c8421f --- /dev/null +++ b/ext/standard/tests/array/array_fill_error2.phpt @@ -0,0 +1,23 @@ +--TEST-- +Test array_fill() function : error conditions - count is too large +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} + +// calling array_fill() with 'count' equals to INT_MAX +$array = array_fill(0, $intMax, 1); + +?> +--EXPECTF-- +array_fill(): Argument #2 ($count) is too large + +Fatal error: Possible integer overflow in memory allocation (%d * %d + %d) in %s on line %d From 2e0f75ec1472b44a76617c87bad689d237d07ec0 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 5 May 2023 12:41:52 +0100 Subject: [PATCH 894/895] ext/pgsql: pg_lo_read addressing the todo. (#11159) --- ext/pgsql/pgsql.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 7f91232039884..f2a7fb2ac296b 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2490,9 +2490,8 @@ PHP_FUNCTION(pg_lo_read) RETURN_FALSE; } - /* TODO Use truncate API? */ - ZSTR_LEN(buf) = nbytes; - ZSTR_VAL(buf)[ZSTR_LEN(buf)] = '\0'; + ZSTR_VAL(buf)[nbytes] = '\0'; + buf = zend_string_truncate(buf, nbytes, 0); RETURN_NEW_STR(buf); } /* }}} */ From c02348cf9deaf92923eb3d99f144279f7824a8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Fri, 5 May 2023 13:43:34 +0200 Subject: [PATCH 895/895] Make SERVER_SOFTWARE compliant with RFC3875 (#11093) --- UPGRADING | 3 +++ sapi/cli/php_cli_server.c | 2 +- sapi/cli/tests/php_cli_server_002.phpt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index c9067e0288493..a3f6a12f3dc09 100644 --- a/UPGRADING +++ b/UPGRADING @@ -68,6 +68,9 @@ PHP 8.3 UPGRADE NOTES 3. Changes in SAPI modules ======================================== +- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed + to make it compliant with RFC3875. + ======================================== 4. Deprecated Functionality ======================================== diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index e59037ac2e8d3..8ea04137d1229 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -696,7 +696,7 @@ static void sapi_cli_server_register_variables(zval *track_vars_array) /* {{{ */ } } { - zend_string *tmp = strpprintf(0, "PHP %s Development Server", PHP_VERSION); + zend_string *tmp = strpprintf(0, "PHP/%s (Development Server)", PHP_VERSION); sapi_cli_server_register_known_var_str(track_vars_array, "SERVER_SOFTWARE", strlen("SERVER_SOFTWARE"), tmp); zend_string_release_ex(tmp, /* persistent */ false); } diff --git a/sapi/cli/tests/php_cli_server_002.phpt b/sapi/cli/tests/php_cli_server_002.phpt index 2daf6aad73107..d2b561b8bb6bc 100644 --- a/sapi/cli/tests/php_cli_server_002.phpt +++ b/sapi/cli/tests/php_cli_server_002.phpt @@ -14,7 +14,7 @@ var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS)); ?> --EXPECTF-- string(%d) "string(%d) "%sphp_cli_server_002" -string(%d) "PHP %s Development Server" +string(%d) "PHP/%s (Development Server)" string(%d) "localhost" string(%d) "%s" "