diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml index 4786242455a1a..e0a3fd4e7d316 100644 --- a/.github/actions/setup-windows/action.yml +++ b/.github/actions/setup-windows/action.yml @@ -3,10 +3,12 @@ runs: using: composite steps: - name: Setup MySQL - shell: pwsh + shell: cmd run: | - choco install mysql -y --no-progress --params="/port:3306" - mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" + mysqld --initialize-insecure + mysqld --install + net start MySQL + mysql --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" - name: Setup MSSQL shell: pwsh run: | diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index fa2f6347d53bc..79517b5338b84 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -125,8 +125,9 @@ rem generate php.ini echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini -rem work-around for some spawned PHP processes requiring OpenSSL +rem work-around for some spawned PHP processes requiring OpenSSL and sockets echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini +echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported for %%i in (ldap) do ( diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 90e9a1d7b760c..4c8ec23b158a4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,6 +26,12 @@ on: windows_version: required: true type: string + skip_symfony: + required: true + type: boolean + skip_wordpress: + required: true + type: boolean permissions: contents: read jobs: @@ -227,6 +233,8 @@ jobs: runs-on: ubuntu-latest container: image: ubuntu:${{ inputs.ubuntu_version }} + env: + PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb services: mysql: image: mysql:8.3 @@ -235,6 +243,15 @@ jobs: env: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: root + firebird: + image: jacobalberty/firebird + ports: + - 3050:3050 + env: + ISC_PASSWORD: test + FIREBIRD_DATABASE: test.fdb + FIREBIRD_USER: test + FIREBIRD_PASSWORD: test steps: - name: git checkout uses: actions/checkout@v4 @@ -410,7 +427,7 @@ jobs: -d zend_extension=opcache.so -d opcache.enable_cli=1 - uses: codecov/codecov-action@v4 - if: always() + if: ${{ !cancelled() }} with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} @@ -483,7 +500,7 @@ jobs: echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini php -v - name: Test AMPHP - if: always() + if: ${{ !cancelled() }} run: | repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server" X=0 @@ -501,7 +518,7 @@ jobs: done exit $X - name: Test Laravel - if: always() + if: ${{ !cancelled() }} run: | git clone https://github.com/laravel/framework.git --branch=master --depth=1 cd framework @@ -514,7 +531,7 @@ jobs: exit 1 fi - name: Test ReactPHP - if: always() + if: ${{ !cancelled() }} run: | repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream" X=0 @@ -532,7 +549,7 @@ jobs: done exit $X - name: Test Revolt PHP - if: always() + if: ${{ !cancelled() }} run: | git clone https://github.com/revoltphp/event-loop.git --depth=1 cd event-loop @@ -543,7 +560,7 @@ jobs: exit 1 fi - name: Test Symfony - if: always() + if: ${{ !cancelled() && !inputs.skip_symfony }} run: | git clone https://github.com/symfony/symfony.git --depth=1 cd symfony @@ -564,7 +581,7 @@ jobs: done exit $X - name: Test PHPUnit - if: always() + if: ${{ !cancelled() }} run: | git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1 cd phpunit @@ -575,7 +592,7 @@ jobs: exit 1 fi - name: 'Symfony Preloading' - if: always() + if: ${{ !cancelled() && !inputs.skip_symfony }} run: | php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs cd symfony_demo @@ -583,7 +600,7 @@ jobs: sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php - name: Test Wordpress - if: always() + if: ${{ !cancelled() && !inputs.skip_wordpress }} run: | git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1 cd wordpress @@ -952,10 +969,18 @@ jobs: - x64: true zts: true opcache: true + asan: false - x64: false zts: false opcache: false - name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + asan: false + - x64: true + zts: true + opcache: true + asan: true + branch: 'master' + timeout: 120 + name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}" runs-on: windows-${{ inputs.windows_version }} env: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache @@ -968,6 +993,7 @@ jobs: INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" PARALLEL: -j2 OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + ASAN: "${{ matrix.asan && '1' || '0' }}" steps: - name: git config run: git config --global core.autocrlf false && git config --global core.eol lf diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index cefabd0394a46..5cdd70489343f 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -59,4 +59,6 @@ jobs: || ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04') || '20.04' }} windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }} + skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }} + skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }} secrets: inherit diff --git a/NEWS b/NEWS index 262e322af1bce..a12ac2b91bc20 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,125 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.4.3 +13 Feb 2025, PHP 8.4.4 + +- Core: + . Fixed bug GH-17234 (Numeric parent hook call fails with assertion). + (nielsdos) + . Fixed bug GH-16892 (ini_parse_quantity() fails to parse inputs starting + with 0x0b). (nielsdos) + . Fixed bug GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0). + (nielsdos) + . Fixed bug GH-17222 (__PROPERTY__ magic constant does not work in all + constant expression contexts). (ilutov) + . Fixed bug GH-17214 (Relax final+private warning for trait methods with + inherited final). (ilutov) + . Fixed NULL arithmetic during system program execution on Windows. (cmb, + nielsdos) + . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) + . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c). + (nielsdos, ilutov) + . Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos) + . Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb) + . Fixed bug GH-17597 (#[\Deprecated] does not work for __call() and + __callStatic()). (timwolla) + +- DOM: + . Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos) + . Fixed bug GH-17486 (Incorrect error line numbers reported in + Dom\HTMLDocument::createFromString). (nielsdos) + . Fixed bug GH-17481 (UTF-8 corruption in \Dom\HTMLDocument). (nielsdos) + . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). + (nielsdos) + . Fixed bug GH-17485 (upstream fix, Self-closing tag on void elements + shouldn't be a parse error/warning in \Dom\HTMLDocument). (lexborisov) + . Fixed bug GH-17572 (getElementsByTagName returns collections with + tagName-based indexing). (nielsdos) + +- Enchant: + . Fix crashes in enchant when passing null bytes. (nielsdos) + +- FTP: + . Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos) + +- GD: + . Fixed bug GH-17349 (Tiled truecolor filling looses single color + transparency). (cmb) + . Fixed bug GH-17373 (imagefttext() ignores clipping rect for palette + images). (cmb) + . Ported fix for libgd 223 (gdImageRotateGeneric() does not properly + interpolate). (cmb) + . Added support for reading GIFs without colormap to bundled libgd. (Andrew + Burley, cmb) + +- Gettext: + . Fixed bug GH-17400 (bindtextdomain SEGV on invalid domain). + (David Carlier) + +- Intl: + . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) + +- Opcache: + . Fixed bug GH-15981 (Segfault with frameless jumps and minimal JIT). + (nielsdos) + . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) + . Fixed bug GH-17428 (Assertion failure ext/opcache/jit/zend_jit_ir.c:8940). + (nielsdos) + . Fixed bug GH-17564 (Potential UB when reading from / writing to struct + padding). (ilutov) + +- PCNTL: + . Fixed pcntl_setcpuaffinity exception type from ValueError to TypeError for + the cpu mask argument with entries type different than int/string. + (David Carlier) + +- PCRE: + . Fixed bug GH-17122 (memory leak in regex). (nielsdos) + +- PDO: + . Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias) + . Fixed a crash in the PDO Firebird Statement destructor. (nielsdos) + . Fixed UAFs when changing default fetch class ctor args. (Girgias, nielsdos) + +- PgSql: + . Fixed build failure when the constant PGRES_TUPLES_CHUNK is not present + in the system. (chschneider) + +- Phar: + . Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos) + +- PHPDBG: + . Fix crashes in function registration + test. (nielsdos, Girgias) + +- Session: + . Fix type confusion with session SID constant. (nielsdos) + . Fixed bug GH-17541 (ext/session NULL pointer dereferencement during + ID reset). (Girgias) + +- SimpleXML: + . Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos) + +- SNMP: + . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). + (David Carlier) + +- SPL: + . Fixed bug GH-15833 (Segmentation fault (access null pointer) in + ext/spl/spl_array.c). (nielsdos) + . Fixed bug GH-17516 (SplFileTempObject::getPathInfo() Undefined behavior + on invalid class). (David Carlier) + +- Standard: + . Fixed bug GH-17447 (Assertion failure when array popping a self addressing + variable). (nielsdos) + +- Windows: + . Fixed clang compiler detection. (cmb) + +- Zip: + . Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry). + (nielsdos) + +02 Jan 2025, PHP 8.4.3 - BcMath: . Fixed bug GH-17049 (Correctly compare 0 and -0). (Saki Takamachi) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 4b8445542fce8..1fe2a47a87c24 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -374,14 +374,16 @@ static process_pair *process_get(FILE *stream) process_pair *ptr; process_pair *newptr; - for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) { - if (ptr->stream == stream) { - break; + if (TWG(process) != NULL) { + for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) { + if (ptr->stream == stream) { + break; + } } - } - if (ptr < (TWG(process) + TWG(process_size))) { - return ptr; + if (ptr < (TWG(process) + TWG(process_size))) { + return ptr; + } } newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair)); @@ -400,19 +402,21 @@ static shm_pair *shm_get(key_t key, void *addr) shm_pair *ptr; shm_pair *newptr; - for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) { - if (!ptr->descriptor) { - continue; - } - if (!addr && ptr->descriptor->shm_perm.key == key) { - break; - } else if (ptr->addr == addr) { - break; + if (TWG(shm) != NULL) { + for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) { + if (!ptr->descriptor) { + continue; + } + if (!addr && ptr->descriptor->shm_perm.key == key) { + break; + } else if (ptr->addr == addr) { + break; + } } - } - if (ptr < (TWG(shm) + TWG(shm_size))) { - return ptr; + if (ptr < (TWG(shm) + TWG(shm_size))) { + return ptr; + } } newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair)); diff --git a/Zend/tests/attributes/deprecated/functions/magic_call.phpt b/Zend/tests/attributes/deprecated/functions/magic_call.phpt new file mode 100644 index 0000000000000..b56d3a1deb716 --- /dev/null +++ b/Zend/tests/attributes/deprecated/functions/magic_call.phpt @@ -0,0 +1,24 @@ +--TEST-- +#[\Deprecated]: __call() and __callStatic() +--FILE-- +test(); +Clazz::test2(); + +?> +--EXPECTF-- +Deprecated: Method Clazz::test() is deprecated in %s + +Deprecated: Method Clazz::test2() is deprecated, due to some reason in %s on line %d diff --git a/Zend/tests/gh17214.phpt b/Zend/tests/gh17214.phpt new file mode 100644 index 0000000000000..ec63c0e9855ea --- /dev/null +++ b/Zend/tests/gh17214.phpt @@ -0,0 +1,26 @@ +--TEST-- +GH-17214: Relax final+private warning for trait methods with inherited final +--FILE-- +anotherMethod(); + } +} + +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/tests/gh17222.phpt b/Zend/tests/gh17222.phpt new file mode 100644 index 0000000000000..1ef920c6119cd --- /dev/null +++ b/Zend/tests/gh17222.phpt @@ -0,0 +1,45 @@ +--TEST-- +GH-17222: __PROPERTY__ does not work in all constant expression contexts +--FILE-- +i; + } + set (#[MyAttr(msg: __PROPERTY__)] string $v) { + $this->i = $v; + } + } +} + +$f = new Foo(); +var_dump($f->i); + +$r = new ReflectionClass(Foo::class); +$p = $r->getProperty('i'); +var_dump($p->getAttributes()[0]->getArguments()['msg']); + +$get = $p->getHook(PropertyHookType::Get); +var_dump($get->getAttributes()[0]->getArguments()['msg']); + +$set = $p->getHook(PropertyHookType::Set); +var_dump($set->getParameters()[0]->getAttributes()[0]->getArguments()['msg']); + +?> +--EXPECT-- +string(1) "i" +string(1) "i" +string(1) "i" +string(1) "i" +string(1) "i" diff --git a/Zend/tests/property_hooks/gh17234.phpt b/Zend/tests/property_hooks/gh17234.phpt new file mode 100644 index 0000000000000..18e9c2598f9d5 --- /dev/null +++ b/Zend/tests/property_hooks/gh17234.phpt @@ -0,0 +1,15 @@ +--TEST-- +GH-17234 (Numeric parent hook call fails with assertion) +--FILE-- + +--EXPECTF-- +Fatal error: Must not use parent::$0::get() in a different property ($a) in %s on line %d diff --git a/Zend/tests/traits/gh12854.phpt b/Zend/tests/traits/gh12854.phpt index 471b4c6b56558..627f78ccae29f 100644 --- a/Zend/tests/traits/gh12854.phpt +++ b/Zend/tests/traits/gh12854.phpt @@ -39,8 +39,6 @@ foreach (['pub', 'prot', 'priv', 'final1', 'final2', 'final3'] as $method) { ?> --EXPECTF-- -Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d - Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d --- Method: pub --- bool(true) diff --git a/Zend/tests/zend_ini/gh16886.phpt b/Zend/tests/zend_ini/gh16886.phpt new file mode 100644 index 0000000000000..2e85894572359 --- /dev/null +++ b/Zend/tests/zend_ini/gh16886.phpt @@ -0,0 +1,41 @@ +--TEST-- +GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0) +--FILE-- + +--EXPECTF-- +Warning: Invalid quantity "0x 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0x+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0x-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 diff --git a/Zend/tests/zend_ini/gh16892.phpt b/Zend/tests/zend_ini/gh16892.phpt new file mode 100644 index 0000000000000..05cfe02192e9d --- /dev/null +++ b/Zend/tests/zend_ini/gh16892.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-16892 (ini_parse_quantity() fails to parse inputs starting with 0x0b) +--FILE-- + +--EXPECT-- +11 +11 +-11 +-11 +48879 +48879 +-48879 +-48879 diff --git a/Zend/zend.h b/Zend/zend.h index 6cd065e04891f..56bdbf841a300 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.4.3-dev" +#define ZEND_VERSION "4.4.4" #define ZEND_ENGINE_3 diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 456c0b8f410b4..6c5d6d0d3c456 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3753,6 +3753,12 @@ static uint32_t zend_compile_args( "Cannot use argument unpacking after named arguments"); } + /* Unpack may contain named arguments. */ + may_have_undef = 1; + if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) { + *may_have_extra_named_args = 1; + } + uses_arg_unpack = 1; fbc = NULL; @@ -3761,11 +3767,6 @@ static uint32_t zend_compile_args( opline->op2.num = arg_count; opline->result.var = EX_NUM_TO_VAR(arg_count - 1); - /* Unpack may contain named arguments. */ - may_have_undef = 1; - if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) { - *may_have_extra_named_args = 1; - } continue; } @@ -5098,7 +5099,8 @@ static bool zend_compile_parent_property_hook_call(znode *result, zend_ast *ast, zend_error_noreturn(E_COMPILE_ERROR, "Cannot create Closure for parent property hook call"); } - zend_string *property_name = zend_ast_get_str(class_ast->child[1]); + zval *property_hook_name_zv = zend_ast_get_zval(class_ast->child[1]); + zend_string *property_name = zval_get_string(property_hook_name_zv); zend_string *hook_name = zend_ast_get_str(method_ast); zend_property_hook_kind hook_kind = zend_get_property_hook_kind_from_name(hook_name); ZEND_ASSERT(hook_kind != (uint32_t)-1); @@ -5122,7 +5124,6 @@ static bool zend_compile_parent_property_hook_call(znode *result, zend_ast *ast, zend_op *opline = get_next_op(); opline->opcode = ZEND_INIT_PARENT_PROPERTY_HOOK_CALL; opline->op1_type = IS_CONST; - zend_string_copy(property_name); opline->op1.constant = zend_add_literal_string(&property_name); opline->op2.num = hook_kind; @@ -8634,6 +8635,13 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f zend_type type = ZEND_TYPE_INIT_NONE(0); flags |= zend_property_is_virtual(ce, name, hooks_ast, flags) ? ZEND_ACC_VIRTUAL : 0; + /* FIXME: This is a dirty fix to maintain ABI compatibility. We don't + * have an actual property info yet, but we really only need the name + * anyway. We should convert this to a zend_string. */ + ZEND_ASSERT(!CG(context).active_property_info); + zend_property_info dummy_prop_info = { .name = name }; + CG(context).active_property_info = &dummy_prop_info; + if (!hooks_ast) { if (ce->ce_flags & ZEND_ACC_INTERFACE) { zend_error_noreturn(E_COMPILE_ERROR, @@ -8726,6 +8734,8 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f if (attr_ast) { zend_compile_attributes(&info->attributes, attr_ast, 0, ZEND_ATTRIBUTE_TARGET_PROPERTY, 0); } + + CG(context).active_property_info = NULL; } } /* }}} */ diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index f532c07e4e679..207b781385452 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -194,7 +194,6 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* zend_exception_set_previous(exception, EG(exception)); EG(exception) = exception; if (previous) { - ZEND_ASSERT(is_handle_exception_set() && "HANDLE_EXCEPTION not set?"); return; } } diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 8197e61628439..9a1314682cee6 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2379,9 +2379,11 @@ static void zend_fixup_trait_method(zend_function *fn, zend_class_entry *ce) /* static void zend_traits_check_private_final_inheritance(uint32_t original_fn_flags, zend_function *fn_copy, zend_string *name) { - /* If the function was originally already private+final, then it will have already been warned about. - * If the function became private+final only after applying modifiers, we need to emit the same warning. */ - if ((original_fn_flags & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) != (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL) + /* If the function was originally already private+final, then it will have + * already been warned about. Only emit this error when the used trait method + * explicitly became final, avoiding errors for `as private` where it was + * already final. */ + if (!(original_fn_flags & ZEND_ACC_FINAL) && (fn_copy->common.fn_flags & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) == (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL) && !zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME)) { zend_error(E_COMPILE_WARNING, "Private methods cannot be final as they are never overridden by other classes"); diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index b4c0722e3e946..28bccceaee20a 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -587,7 +587,7 @@ typedef enum { ZEND_INI_PARSE_QUANTITY_UNSIGNED, } zend_ini_parse_quantity_signed_result_t; -static const char *zend_ini_consume_quantity_prefix(const char *const digits, const char *const str_end) { +static const char *zend_ini_consume_quantity_prefix(const char *const digits, const char *const str_end, int base) { const char *digits_consumed = digits; /* Ignore leading whitespace. */ while (digits_consumed < str_end && zend_is_whitespace(*digits_consumed)) {++digits_consumed;} @@ -598,7 +598,7 @@ static const char *zend_ini_consume_quantity_prefix(const char *const digits, co if (digits_consumed[0] == '0' && !isdigit(digits_consumed[1])) { /* Value is just 0 */ if ((digits_consumed+1) == str_end) { - return digits; + return digits_consumed; } switch (digits_consumed[1]) { @@ -606,9 +606,14 @@ static const char *zend_ini_consume_quantity_prefix(const char *const digits, co case 'X': case 'o': case 'O': + digits_consumed += 2; + break; case 'b': case 'B': - digits_consumed += 2; + if (base != 16) { + /* 0b or 0B is valid in base 16, but not in the other supported bases. */ + digits_consumed += 2; + } break; } } @@ -696,19 +701,8 @@ static zend_ulong zend_ini_parse_quantity_internal(zend_string *value, zend_ini_ return 0; } digits += 2; - if (UNEXPECTED(digits == str_end)) { - /* Escape the string to avoid null bytes and to make non-printable chars - * visible */ - smart_str_append_escaped(&invalid, ZSTR_VAL(value), ZSTR_LEN(value)); - smart_str_0(&invalid); - - *errstr = zend_strpprintf(0, "Invalid quantity \"%s\": no digits after base prefix, interpreting as \"0\" for backwards compatibility", - ZSTR_VAL(invalid.s)); - - smart_str_free(&invalid); - return 0; - } - if (UNEXPECTED(digits != zend_ini_consume_quantity_prefix(digits, str_end))) { + /* STRTOULL may silently ignore a prefix of whitespace, sign, and base prefix, which would be invalid at this position */ + if (UNEXPECTED(digits == str_end || digits != zend_ini_consume_quantity_prefix(digits, str_end, base))) { /* Escape the string to avoid null bytes and to make non-printable chars * visible */ smart_str_append_escaped(&invalid, ZSTR_VAL(value), ZSTR_LEN(value)); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index f08685092745a..68d21d25253a4 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1617,7 +1617,13 @@ ZEND_API zend_function *zend_get_call_trampoline_func(const zend_class_entry *ce func->fn_flags = ZEND_ACC_CALL_VIA_TRAMPOLINE | ZEND_ACC_PUBLIC | ZEND_ACC_VARIADIC - | (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE); + | (fbc->common.fn_flags & (ZEND_ACC_RETURN_REFERENCE|ZEND_ACC_DEPRECATED)); + if (fbc->common.attributes) { + func->attributes = fbc->common.attributes; + GC_TRY_ADDREF(func->attributes); + } else { + func->attributes = NULL; + } if (is_static) { func->fn_flags |= ZEND_ACC_STATIC; } diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index f36eb765c24a5..2fc59d5020c25 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -339,7 +339,12 @@ ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_p } while (0) #define zend_free_trampoline(func) do { \ + HashTable *attributes = (func)->common.attributes; \ + if (attributes && !(GC_FLAGS(attributes) & GC_IMMUTABLE) && !GC_DELREF(attributes)) { \ + zend_array_destroy(attributes); \ + } \ if ((func) == &EG(trampoline)) { \ + EG(trampoline).common.attributes = NULL; \ EG(trampoline).common.function_name = NULL; \ } else { \ efree(func); \ diff --git a/configure.ac b/configure.ac index 6efa19164ecb4..9d79720a204a0 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.4.3-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.4.4],[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/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 43d980a8a2dc7..3c75462009afb 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -79,533 +79,533 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (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" , 0x008089 }, - { (char*) "America/Belem" , 0x0081AB }, - { (char*) "America/Belize" , 0x008353 }, - { (char*) "America/Blanc-Sablon" , 0x008774 }, - { (char*) "America/Boa_Vista" , 0x008869 }, - { (char*) "America/Bogota" , 0x008A2A }, - { (char*) "America/Boise" , 0x008AE9 }, - { (char*) "America/Buenos_Aires" , 0x008EFC }, - { (char*) "America/Cambridge_Bay" , 0x0091CC }, - { (char*) "America/Campo_Grande" , 0x00955F }, - { (char*) "America/Cancun" , 0x009935 }, - { (char*) "America/Caracas" , 0x009B67 }, - { (char*) "America/Catamarca" , 0x009C31 }, - { (char*) "America/Cayenne" , 0x009F01 }, - { (char*) "America/Cayman" , 0x009FA4 }, - { (char*) "America/Chicago" , 0x00A045 }, - { (char*) "America/Chihuahua" , 0x00A73F }, - { (char*) "America/Ciudad_Juarez" , 0x00AA14 }, - { (char*) "America/Coral_Harbour" , 0x00AD0A }, - { (char*) "America/Cordoba" , 0x00ADAB }, - { (char*) "America/Costa_Rica" , 0x00B07B }, - { (char*) "America/Creston" , 0x00B16F }, - { (char*) "America/Cuiaba" , 0x00B22B }, - { (char*) "America/Curacao" , 0x00B5E8 }, - { (char*) "America/Danmarkshavn" , 0x00B68B }, - { (char*) "America/Dawson" , 0x00B870 }, - { (char*) "America/Dawson_Creek" , 0x00BC93 }, - { (char*) "America/Denver" , 0x00BF6A }, - { (char*) "America/Detroit" , 0x00C39D }, - { (char*) "America/Dominica" , 0x00C745 }, - { (char*) "America/Edmonton" , 0x00C7D3 }, - { (char*) "America/Eirunepe" , 0x00CBCB }, - { (char*) "America/El_Salvador" , 0x00CD9A }, - { (char*) "America/Ensenada" , 0x00CE56 }, - { (char*) "America/Fort_Nelson" , 0x00D299 }, - { (char*) "America/Fort_Wayne" , 0x00D861 }, - { (char*) "America/Fortaleza" , 0x00DA80 }, - { (char*) "America/Glace_Bay" , 0x00DC96 }, - { (char*) "America/Godthab" , 0x00E02D }, - { (char*) "America/Goose_Bay" , 0x00E3FE }, - { (char*) "America/Grand_Turk" , 0x00EA56 }, - { (char*) "America/Grenada" , 0x00EDB7 }, - { (char*) "America/Guadeloupe" , 0x00EE45 }, - { (char*) "America/Guatemala" , 0x00EED3 }, - { (char*) "America/Guayaquil" , 0x00EFB3 }, - { (char*) "America/Guyana" , 0x00F084 }, - { (char*) "America/Halifax" , 0x00F145 }, - { (char*) "America/Havana" , 0x00F7F7 }, - { (char*) "America/Hermosillo" , 0x00FC60 }, - { (char*) "America/Indiana/Indianapolis" , 0x00FD74 }, - { (char*) "America/Indiana/Knox" , 0x00FFAC }, - { (char*) "America/Indiana/Marengo" , 0x0103C5 }, - { (char*) "America/Indiana/Petersburg" , 0x01061F }, - { (char*) "America/Indiana/Tell_City" , 0x0108E9 }, - { (char*) "America/Indiana/Vevay" , 0x010B13 }, - { (char*) "America/Indiana/Vincennes" , 0x010CAA }, - { (char*) "America/Indiana/Winamac" , 0x010F00 }, - { (char*) "America/Indianapolis" , 0x01117D }, - { (char*) "America/Inuvik" , 0x01139C }, - { (char*) "America/Iqaluit" , 0x0116ED }, - { (char*) "America/Jamaica" , 0x011A69 }, - { (char*) "America/Jujuy" , 0x011BC8 }, - { (char*) "America/Juneau" , 0x011E86 }, - { (char*) "America/Kentucky/Louisville" , 0x01226C }, - { (char*) "America/Kentucky/Monticello" , 0x012770 }, - { (char*) "America/Knox_IN" , 0x012B5C }, - { (char*) "America/Kralendijk" , 0x012F60 }, - { (char*) "America/La_Paz" , 0x01301D }, - { (char*) "America/Lima" , 0x0130D3 }, - { (char*) "America/Los_Angeles" , 0x0131FA }, - { (char*) "America/Louisville" , 0x01371B }, - { (char*) "America/Lower_Princes" , 0x013C01 }, - { (char*) "America/Maceio" , 0x013CBE }, - { (char*) "America/Managua" , 0x013ED0 }, - { (char*) "America/Manaus" , 0x014003 }, - { (char*) "America/Marigot" , 0x0141BA }, - { (char*) "America/Martinique" , 0x014277 }, - { (char*) "America/Matamoros" , 0x014335 }, - { (char*) "America/Mazatlan" , 0x014522 }, - { (char*) "America/Mendoza" , 0x014812 }, - { (char*) "America/Menominee" , 0x014AE2 }, - { (char*) "America/Merida" , 0x014EA2 }, - { (char*) "America/Metlakatla" , 0x01514D }, - { (char*) "America/Mexico_City" , 0x0153BA }, - { (char*) "America/Miquelon" , 0x0156D9 }, - { (char*) "America/Moncton" , 0x01590B }, - { (char*) "America/Monterrey" , 0x015F04 }, - { (char*) "America/Montevideo" , 0x01620B }, - { (char*) "America/Montreal" , 0x0165E0 }, - { (char*) "America/Montserrat" , 0x016CA1 }, - { (char*) "America/Nassau" , 0x016D2F }, - { (char*) "America/New_York" , 0x017129 }, - { (char*) "America/Nipigon" , 0x017819 }, - { (char*) "America/Nome" , 0x017EDA }, - { (char*) "America/Noronha" , 0x0182C2 }, - { (char*) "America/North_Dakota/Beulah" , 0x0184C2 }, - { (char*) "America/North_Dakota/Center" , 0x0188F6 }, - { (char*) "America/North_Dakota/New_Salem" , 0x018CF5 }, - { (char*) "America/Nuuk" , 0x0190FA }, - { (char*) "America/Ojinaga" , 0x0194DC }, - { (char*) "America/Panama" , 0x0197D2 }, - { (char*) "America/Pangnirtung" , 0x019873 }, - { (char*) "America/Paramaribo" , 0x019BD6 }, - { (char*) "America/Phoenix" , 0x019C9D }, - { (char*) "America/Port-au-Prince" , 0x019DB1 }, - { (char*) "America/Port_of_Spain" , 0x019FF2 }, - { (char*) "America/Porto_Acre" , 0x01A080 }, - { (char*) "America/Porto_Velho" , 0x01A22E }, - { (char*) "America/Puerto_Rico" , 0x01A3CC }, - { (char*) "America/Punta_Arenas" , 0x01A489 }, - { (char*) "America/Rainy_River" , 0x01A96B }, - { (char*) "America/Rankin_Inlet" , 0x01AE85 }, - { (char*) "America/Recife" , 0x01B1CE }, - { (char*) "America/Regina" , 0x01B3C8 }, - { (char*) "America/Resolute" , 0x01B667 }, - { (char*) "America/Rio_Branco" , 0x01B9B1 }, - { (char*) "America/Rosario" , 0x01BB63 }, - { (char*) "America/Santa_Isabel" , 0x01BE33 }, - { (char*) "America/Santarem" , 0x01C276 }, - { (char*) "America/Santiago" , 0x01C426 }, - { (char*) "America/Santo_Domingo" , 0x01C989 }, - { (char*) "America/Sao_Paulo" , 0x01CAD2 }, - { (char*) "America/Scoresbysund" , 0x01CECC }, - { (char*) "America/Shiprock" , 0x01D2CD }, - { (char*) "America/Sitka" , 0x01D6EB }, - { (char*) "America/St_Barthelemy" , 0x01DAC6 }, - { (char*) "America/St_Johns" , 0x01DB83 }, - { (char*) "America/St_Kitts" , 0x01E300 }, - { (char*) "America/St_Lucia" , 0x01E38E }, - { (char*) "America/St_Thomas" , 0x01E42F }, - { (char*) "America/St_Vincent" , 0x01E4BD }, - { (char*) "America/Swift_Current" , 0x01E55E }, - { (char*) "America/Tegucigalpa" , 0x01E6EC }, - { (char*) "America/Thule" , 0x01E7BA }, - { (char*) "America/Thunder_Bay" , 0x01E99B }, - { (char*) "America/Tijuana" , 0x01F05C }, - { (char*) "America/Toronto" , 0x01F4AE }, - { (char*) "America/Tortola" , 0x01FB8D }, - { (char*) "America/Vancouver" , 0x01FC1B }, - { (char*) "America/Virgin" , 0x020172 }, - { (char*) "America/Whitehorse" , 0x02022F }, - { (char*) "America/Winnipeg" , 0x020652 }, - { (char*) "America/Yakutat" , 0x020B89 }, - { (char*) "America/Yellowknife" , 0x020F57 }, - { (char*) "Antarctica/Casey" , 0x02132D }, - { (char*) "Antarctica/Davis" , 0x02145D }, - { (char*) "Antarctica/DumontDUrville" , 0x021533 }, - { (char*) "Antarctica/Macquarie" , 0x0215E7 }, - { (char*) "Antarctica/Mawson" , 0x0219D3 }, - { (char*) "Antarctica/McMurdo" , 0x021A7D }, - { (char*) "Antarctica/Palmer" , 0x021DAF }, - { (char*) "Antarctica/Rothera" , 0x022138 }, - { (char*) "Antarctica/South_Pole" , 0x0221CF }, - { (char*) "Antarctica/Syowa" , 0x0225EE }, - { (char*) "Antarctica/Troll" , 0x022684 }, - { (char*) "Antarctica/Vostok" , 0x022733 }, - { (char*) "Arctic/Longyearbyen" , 0x0227EF }, - { (char*) "Asia/Aden" , 0x022ABC }, - { (char*) "Asia/Almaty" , 0x022B4D }, - { (char*) "Asia/Amman" , 0x022DD5 }, - { (char*) "Asia/Anadyr" , 0x023181 }, - { (char*) "Asia/Aqtau" , 0x023487 }, - { (char*) "Asia/Aqtobe" , 0x023706 }, - { (char*) "Asia/Ashgabat" , 0x023986 }, - { (char*) "Asia/Ashkhabad" , 0x023B09 }, - { (char*) "Asia/Atyrau" , 0x023C8C }, - { (char*) "Asia/Baghdad" , 0x023F15 }, - { (char*) "Asia/Bahrain" , 0x024197 }, - { (char*) "Asia/Baku" , 0x024250 }, - { (char*) "Asia/Bangkok" , 0x024544 }, - { (char*) "Asia/Barnaul" , 0x0245E8 }, - { (char*) "Asia/Beirut" , 0x0248F3 }, - { (char*) "Asia/Bishkek" , 0x024BDB }, - { (char*) "Asia/Brunei" , 0x024E51 }, - { (char*) "Asia/Calcutta" , 0x024EF7 }, - { (char*) "Asia/Chita" , 0x024FDF }, - { (char*) "Asia/Choibalsan" , 0x0252ED }, - { (char*) "Asia/Chongqing" , 0x02554B }, - { (char*) "Asia/Chungking" , 0x0256E0 }, - { (char*) "Asia/Colombo" , 0x025875 }, - { (char*) "Asia/Dacca" , 0x025978 }, - { (char*) "Asia/Damascus" , 0x025A6B }, - { (char*) "Asia/Dhaka" , 0x025F49 }, - { (char*) "Asia/Dili" , 0x02603C }, - { (char*) "Asia/Dubai" , 0x0260F2 }, - { (char*) "Asia/Dushanbe" , 0x026183 }, - { (char*) "Asia/Famagusta" , 0x0262FD }, - { (char*) "Asia/Gaza" , 0x0266C4 }, - { (char*) "Asia/Harbin" , 0x027260 }, - { (char*) "Asia/Hebron" , 0x0273F5 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x027FA2 }, - { (char*) "Asia/Hong_Kong" , 0x02809A }, - { (char*) "Asia/Hovd" , 0x0283AD }, - { (char*) "Asia/Irkutsk" , 0x028621 }, - { (char*) "Asia/Istanbul" , 0x02893F }, - { (char*) "Asia/Jakarta" , 0x028DFB }, - { (char*) "Asia/Jayapura" , 0x028F0C }, - { (char*) "Asia/Jerusalem" , 0x028FF9 }, - { (char*) "Asia/Kabul" , 0x029437 }, - { (char*) "Asia/Kamchatka" , 0x0294E2 }, - { (char*) "Asia/Karachi" , 0x0297D7 }, - { (char*) "Asia/Kashgar" , 0x0298ED }, - { (char*) "Asia/Kathmandu" , 0x02997E }, - { (char*) "Asia/Katmandu" , 0x029A2B }, - { (char*) "Asia/Khandyga" , 0x029AD8 }, - { (char*) "Asia/Kolkata" , 0x029E09 }, - { (char*) "Asia/Krasnoyarsk" , 0x029EF1 }, - { (char*) "Asia/Kuala_Lumpur" , 0x02A1FB }, - { (char*) "Asia/Kuching" , 0x02A31B }, - { (char*) "Asia/Kuwait" , 0x02A475 }, - { (char*) "Asia/Macao" , 0x02A506 }, - { (char*) "Asia/Macau" , 0x02A829 }, - { (char*) "Asia/Magadan" , 0x02AB4C }, - { (char*) "Asia/Makassar" , 0x02AE57 }, - { (char*) "Asia/Manila" , 0x02AF6A }, - { (char*) "Asia/Muscat" , 0x02B064 }, - { (char*) "Asia/Nicosia" , 0x02B0F5 }, - { (char*) "Asia/Novokuznetsk" , 0x02B364 }, - { (char*) "Asia/Novosibirsk" , 0x02B657 }, - { (char*) "Asia/Omsk" , 0x02B968 }, - { (char*) "Asia/Oral" , 0x02BC66 }, - { (char*) "Asia/Phnom_Penh" , 0x02BEF2 }, - { (char*) "Asia/Pontianak" , 0x02BFC6 }, - { (char*) "Asia/Pyongyang" , 0x02C0DF }, - { (char*) "Asia/Qatar" , 0x02C1A2 }, - { (char*) "Asia/Qostanay" , 0x02C246 }, - { (char*) "Asia/Qyzylorda" , 0x02C4DC }, - { (char*) "Asia/Rangoon" , 0x02C775 }, - { (char*) "Asia/Riyadh" , 0x02C83C }, - { (char*) "Asia/Saigon" , 0x02C8CD }, - { (char*) "Asia/Sakhalin" , 0x02C9C5 }, - { (char*) "Asia/Samarkand" , 0x02CCDC }, - { (char*) "Asia/Seoul" , 0x02CE67 }, - { (char*) "Asia/Shanghai" , 0x02D012 }, - { (char*) "Asia/Singapore" , 0x02D1B3 }, - { (char*) "Asia/Srednekolymsk" , 0x02D2BF }, - { (char*) "Asia/Taipei" , 0x02D5CF }, - { (char*) "Asia/Tashkent" , 0x02D7DA }, - { (char*) "Asia/Tbilisi" , 0x02D965 }, - { (char*) "Asia/Tehran" , 0x02DBE6 }, - { (char*) "Asia/Tel_Aviv" , 0x02DF1E }, - { (char*) "Asia/Thimbu" , 0x02E35C }, - { (char*) "Asia/Thimphu" , 0x02E402 }, - { (char*) "Asia/Tokyo" , 0x02E4A8 }, - { (char*) "Asia/Tomsk" , 0x02E589 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E894 }, - { (char*) "Asia/Ulaanbaatar" , 0x02E95E }, - { (char*) "Asia/Ulan_Bator" , 0x02EBCC }, - { (char*) "Asia/Urumqi" , 0x02EE2A }, - { (char*) "Asia/Ust-Nera" , 0x02EEC8 }, - { (char*) "Asia/Vientiane" , 0x02F1EB }, - { (char*) "Asia/Vladivostok" , 0x02F2D1 }, - { (char*) "Asia/Yakutsk" , 0x02F5D6 }, - { (char*) "Asia/Yangon" , 0x02F8DA }, - { (char*) "Asia/Yekaterinburg" , 0x02F9A1 }, - { (char*) "Asia/Yerevan" , 0x02FCB3 }, - { (char*) "Atlantic/Azores" , 0x02FF83 }, - { (char*) "Atlantic/Bermuda" , 0x03050E }, - { (char*) "Atlantic/Canary" , 0x03091A }, - { (char*) "Atlantic/Cape_Verde" , 0x030B12 }, - { (char*) "Atlantic/Faeroe" , 0x030BCD }, - { (char*) "Atlantic/Faroe" , 0x030D92 }, - { (char*) "Atlantic/Jan_Mayen" , 0x030F57 }, - { (char*) "Atlantic/Madeira" , 0x031224 }, - { (char*) "Atlantic/Reykjavik" , 0x03179B }, - { (char*) "Atlantic/South_Georgia" , 0x031A98 }, - { (char*) "Atlantic/St_Helena" , 0x031B28 }, - { (char*) "Atlantic/Stanley" , 0x031BC9 }, - { (char*) "Australia/ACT" , 0x031EEA }, - { (char*) "Australia/Adelaide" , 0x03227E }, - { (char*) "Australia/Brisbane" , 0x032632 }, - { (char*) "Australia/Broken_Hill" , 0x032776 }, - { (char*) "Australia/Canberra" , 0x032B4B }, - { (char*) "Australia/Currie" , 0x032EDF }, - { (char*) "Australia/Darwin" , 0x0332D6 }, - { (char*) "Australia/Eucla" , 0x0333DE }, - { (char*) "Australia/Hobart" , 0x03353D }, - { (char*) "Australia/LHI" , 0x03393C }, - { (char*) "Australia/Lindeman" , 0x033BFC }, - { (char*) "Australia/Lord_Howe" , 0x033D6C }, - { (char*) "Australia/Melbourne" , 0x03403C }, - { (char*) "Australia/North" , 0x0343D8 }, - { (char*) "Australia/NSW" , 0x0344CE }, - { (char*) "Australia/Perth" , 0x034862 }, - { (char*) "Australia/Queensland" , 0x0349BE }, - { (char*) "Australia/South" , 0x034AEB }, - { (char*) "Australia/Sydney" , 0x034E90 }, - { (char*) "Australia/Tasmania" , 0x035240 }, - { (char*) "Australia/Victoria" , 0x035637 }, - { (char*) "Australia/West" , 0x0359CB }, - { (char*) "Australia/Yancowinna" , 0x035B09 }, - { (char*) "Brazil/Acre" , 0x035EC2 }, - { (char*) "Brazil/DeNoronha" , 0x036070 }, - { (char*) "Brazil/East" , 0x036260 }, - { (char*) "Brazil/West" , 0x036624 }, - { (char*) "Canada/Atlantic" , 0x0367CC }, - { (char*) "Canada/Central" , 0x036E60 }, - { (char*) "Canada/Eastern" , 0x03737A }, - { (char*) "Canada/Mountain" , 0x037A3B }, - { (char*) "Canada/Newfoundland" , 0x037E11 }, - { (char*) "Canada/Pacific" , 0x038573 }, - { (char*) "Canada/Saskatchewan" , 0x038AB1 }, - { (char*) "Canada/Yukon" , 0x038D3B }, - { (char*) "CET" , 0x03914C }, - { (char*) "Chile/Continental" , 0x0395A7 }, - { (char*) "Chile/EasterIsland" , 0x039AFD }, - { (char*) "CST6CDT" , 0x039F9F }, - { (char*) "Cuba" , 0x03A685 }, - { (char*) "EET" , 0x03AAEE }, - { (char*) "Egypt" , 0x03ADA4 }, - { (char*) "Eire" , 0x03B2CD }, - { (char*) "EST" , 0x03B8B1 }, - { (char*) "EST5EDT" , 0x03B952 }, - { (char*) "Etc/GMT" , 0x03C02E }, - { (char*) "Etc/GMT+0" , 0x03C0A9 }, - { (char*) "Etc/GMT+1" , 0x03C124 }, - { (char*) "Etc/GMT+10" , 0x03C1A1 }, - { (char*) "Etc/GMT+11" , 0x03C21F }, - { (char*) "Etc/GMT+12" , 0x03C29D }, - { (char*) "Etc/GMT+2" , 0x03C31B }, - { (char*) "Etc/GMT+3" , 0x03C398 }, - { (char*) "Etc/GMT+4" , 0x03C415 }, - { (char*) "Etc/GMT+5" , 0x03C492 }, - { (char*) "Etc/GMT+6" , 0x03C50F }, - { (char*) "Etc/GMT+7" , 0x03C58C }, - { (char*) "Etc/GMT+8" , 0x03C609 }, - { (char*) "Etc/GMT+9" , 0x03C686 }, - { (char*) "Etc/GMT-0" , 0x03C703 }, - { (char*) "Etc/GMT-1" , 0x03C77E }, - { (char*) "Etc/GMT-10" , 0x03C7FC }, - { (char*) "Etc/GMT-11" , 0x03C87B }, - { (char*) "Etc/GMT-12" , 0x03C8FA }, - { (char*) "Etc/GMT-13" , 0x03C979 }, - { (char*) "Etc/GMT-14" , 0x03C9F8 }, - { (char*) "Etc/GMT-2" , 0x03CA77 }, - { (char*) "Etc/GMT-3" , 0x03CAF5 }, - { (char*) "Etc/GMT-4" , 0x03CB73 }, - { (char*) "Etc/GMT-5" , 0x03CBF1 }, - { (char*) "Etc/GMT-6" , 0x03CC6F }, - { (char*) "Etc/GMT-7" , 0x03CCED }, - { (char*) "Etc/GMT-8" , 0x03CD6B }, - { (char*) "Etc/GMT-9" , 0x03CDE9 }, - { (char*) "Etc/GMT0" , 0x03CE67 }, - { (char*) "Etc/Greenwich" , 0x03CEE2 }, - { (char*) "Etc/UCT" , 0x03CF5D }, - { (char*) "Etc/Universal" , 0x03CFD8 }, - { (char*) "Etc/UTC" , 0x03D053 }, - { (char*) "Etc/Zulu" , 0x03D0CE }, - { (char*) "Europe/Amsterdam" , 0x03D149 }, - { (char*) "Europe/Andorra" , 0x03D584 }, - { (char*) "Europe/Astrakhan" , 0x03D715 }, - { (char*) "Europe/Athens" , 0x03DA09 }, - { (char*) "Europe/Belfast" , 0x03DCBF }, - { (char*) "Europe/Belgrade" , 0x03E30A }, - { (char*) "Europe/Berlin" , 0x03E4F4 }, - { (char*) "Europe/Bratislava" , 0x03E7D0 }, - { (char*) "Europe/Brussels" , 0x03EAAF }, - { (char*) "Europe/Bucharest" , 0x03EF0A }, - { (char*) "Europe/Budapest" , 0x03F1AB }, - { (char*) "Europe/Busingen" , 0x03F4B5 }, - { (char*) "Europe/Chisinau" , 0x03F6BA }, - { (char*) "Europe/Copenhagen" , 0x03F9B9 }, - { (char*) "Europe/Dublin" , 0x03FC34 }, - { (char*) "Europe/Gibraltar" , 0x040218 }, - { (char*) "Europe/Guernsey" , 0x0406E8 }, - { (char*) "Europe/Helsinki" , 0x040D3F }, - { (char*) "Europe/Isle_of_Man" , 0x040F2C }, - { (char*) "Europe/Istanbul" , 0x041577 }, - { (char*) "Europe/Jersey" , 0x041A33 }, - { (char*) "Europe/Kaliningrad" , 0x04208A }, - { (char*) "Europe/Kiev" , 0x042432 }, - { (char*) "Europe/Kirov" , 0x04266C }, - { (char*) "Europe/Kyiv" , 0x042965 }, - { (char*) "Europe/Lisbon" , 0x042BAE }, - { (char*) "Europe/Ljubljana" , 0x043184 }, - { (char*) "Europe/London" , 0x04336E }, - { (char*) "Europe/Luxembourg" , 0x0439B9 }, - { (char*) "Europe/Madrid" , 0x043E04 }, - { (char*) "Europe/Malta" , 0x0441A1 }, - { (char*) "Europe/Mariehamn" , 0x04454D }, - { (char*) "Europe/Minsk" , 0x04473A }, - { (char*) "Europe/Monaco" , 0x044A6E }, - { (char*) "Europe/Moscow" , 0x044ED4 }, - { (char*) "Europe/Nicosia" , 0x045280 }, - { (char*) "Europe/Oslo" , 0x0454E1 }, - { (char*) "Europe/Paris" , 0x045791 }, - { (char*) "Europe/Podgorica" , 0x045BEE }, - { (char*) "Europe/Prague" , 0x045DD8 }, - { (char*) "Europe/Riga" , 0x0460B7 }, - { (char*) "Europe/Rome" , 0x046379 }, - { (char*) "Europe/Samara" , 0x046738 }, - { (char*) "Europe/San_Marino" , 0x046A39 }, - { (char*) "Europe/Sarajevo" , 0x046DF8 }, - { (char*) "Europe/Saratov" , 0x046FE2 }, - { (char*) "Europe/Simferopol" , 0x0472D4 }, - { (char*) "Europe/Skopje" , 0x047647 }, - { (char*) "Europe/Sofia" , 0x047831 }, - { (char*) "Europe/Stockholm" , 0x047A8D }, - { (char*) "Europe/Tallinn" , 0x047C8A }, - { (char*) "Europe/Tirane" , 0x047F39 }, - { (char*) "Europe/Tiraspol" , 0x0481A1 }, - { (char*) "Europe/Ulyanovsk" , 0x0484A0 }, - { (char*) "Europe/Uzhgorod" , 0x0487B6 }, - { (char*) "Europe/Vaduz" , 0x0489F0 }, - { (char*) "Europe/Vatican" , 0x048BDA }, - { (char*) "Europe/Vienna" , 0x048F99 }, - { (char*) "Europe/Vilnius" , 0x049237 }, - { (char*) "Europe/Volgograd" , 0x0494E7 }, - { (char*) "Europe/Warsaw" , 0x0497F6 }, - { (char*) "Europe/Zagreb" , 0x049B9D }, - { (char*) "Europe/Zaporozhye" , 0x049D87 }, - { (char*) "Europe/Zurich" , 0x049FC1 }, - { (char*) "Factory" , 0x04A1BE }, - { (char*) "GB" , 0x04A23B }, - { (char*) "GB-Eire" , 0x04A886 }, - { (char*) "GMT" , 0x04AED1 }, - { (char*) "GMT+0" , 0x04AF4C }, - { (char*) "GMT-0" , 0x04AFC7 }, - { (char*) "GMT0" , 0x04B042 }, - { (char*) "Greenwich" , 0x04B0BD }, - { (char*) "Hongkong" , 0x04B138 }, - { (char*) "HST" , 0x04B44B }, - { (char*) "Iceland" , 0x04B534 }, - { (char*) "Indian/Antananarivo" , 0x04B5C2 }, - { (char*) "Indian/Chagos" , 0x04B66E }, - { (char*) "Indian/Christmas" , 0x04B712 }, - { (char*) "Indian/Cocos" , 0x04B7A3 }, - { (char*) "Indian/Comoro" , 0x04B83B }, - { (char*) "Indian/Kerguelen" , 0x04B8CA }, - { (char*) "Indian/Mahe" , 0x04B95B }, - { (char*) "Indian/Maldives" , 0x04B9EC }, - { (char*) "Indian/Mauritius" , 0x04BA90 }, - { (char*) "Indian/Mayotte" , 0x04BB4F }, - { (char*) "Indian/Reunion" , 0x04BBDE }, - { (char*) "Iran" , 0x04BC6F }, - { (char*) "Israel" , 0x04BFA7 }, - { (char*) "Jamaica" , 0x04C3E5 }, - { (char*) "Japan" , 0x04C544 }, - { (char*) "Kwajalein" , 0x04C625 }, - { (char*) "Libya" , 0x04C70C }, - { (char*) "MET" , 0x04C8C7 }, - { (char*) "Mexico/BajaNorte" , 0x04CD22 }, - { (char*) "Mexico/BajaSur" , 0x04D165 }, - { (char*) "Mexico/General" , 0x04D423 }, - { (char*) "MST" , 0x04D734 }, - { (char*) "MST7MDT" , 0x04D830 }, - { (char*) "Navajo" , 0x04DC4E }, - { (char*) "NZ" , 0x04E06C }, - { (char*) "NZ-CHAT" , 0x04E48B }, - { (char*) "Pacific/Apia" , 0x04E7BF }, - { (char*) "Pacific/Auckland" , 0x04E962 }, - { (char*) "Pacific/Bougainville" , 0x04ED94 }, - { (char*) "Pacific/Chatham" , 0x04EE75 }, - { (char*) "Pacific/Chuuk" , 0x04F1B8 }, - { (char*) "Pacific/Easter" , 0x04F296 }, - { (char*) "Pacific/Efate" , 0x04F745 }, - { (char*) "Pacific/Enderbury" , 0x04F8A7 }, - { (char*) "Pacific/Fakaofo" , 0x04F95F }, - { (char*) "Pacific/Fiji" , 0x04FA04 }, - { (char*) "Pacific/Funafuti" , 0x04FB9C }, - { (char*) "Pacific/Galapagos" , 0x04FC2E }, - { (char*) "Pacific/Gambier" , 0x04FCFA }, - { (char*) "Pacific/Guadalcanal" , 0x04FD99 }, - { (char*) "Pacific/Guam" , 0x04FE2B }, - { (char*) "Pacific/Honolulu" , 0x04FF95 }, - { (char*) "Pacific/Johnston" , 0x050084 }, - { (char*) "Pacific/Kanton" , 0x05016D }, - { (char*) "Pacific/Kiritimati" , 0x050234 }, - { (char*) "Pacific/Kosrae" , 0x0502FA }, - { (char*) "Pacific/Kwajalein" , 0x0503FE }, - { (char*) "Pacific/Majuro" , 0x0504EE }, - { (char*) "Pacific/Marquesas" , 0x0505EC }, - { (char*) "Pacific/Midway" , 0x050694 }, - { (char*) "Pacific/Nauru" , 0x050757 }, - { (char*) "Pacific/Niue" , 0x05081A }, - { (char*) "Pacific/Norfolk" , 0x0508C0 }, - { (char*) "Pacific/Noumea" , 0x0509B9 }, - { (char*) "Pacific/Pago_Pago" , 0x050A8B }, - { (char*) "Pacific/Palau" , 0x050B29 }, - { (char*) "Pacific/Pitcairn" , 0x050BC9 }, - { (char*) "Pacific/Pohnpei" , 0x050C6E }, - { (char*) "Pacific/Ponape" , 0x050D5E }, - { (char*) "Pacific/Port_Moresby" , 0x050DF0 }, - { (char*) "Pacific/Rarotonga" , 0x050EAE }, - { (char*) "Pacific/Saipan" , 0x051050 }, - { (char*) "Pacific/Samoa" , 0x0511B1 }, - { (char*) "Pacific/Tahiti" , 0x05124F }, - { (char*) "Pacific/Tarawa" , 0x0512EF }, - { (char*) "Pacific/Tongatapu" , 0x051390 }, - { (char*) "Pacific/Truk" , 0x051489 }, - { (char*) "Pacific/Wake" , 0x05152F }, - { (char*) "Pacific/Wallis" , 0x0515CC }, - { (char*) "Pacific/Yap" , 0x05165E }, - { (char*) "Poland" , 0x051704 }, - { (char*) "Portugal" , 0x051AAB }, - { (char*) "PRC" , 0x05206E }, - { (char*) "PST8PDT" , 0x052203 }, - { (char*) "ROC" , 0x05271D }, - { (char*) "ROK" , 0x052928 }, - { (char*) "Singapore" , 0x052AD3 }, - { (char*) "Turkey" , 0x052BDF }, - { (char*) "UCT" , 0x05309B }, - { (char*) "Universal" , 0x053116 }, - { (char*) "US/Alaska" , 0x053191 }, - { (char*) "US/Aleutian" , 0x05356E }, - { (char*) "US/Arizona" , 0x053943 }, - { (char*) "US/Central" , 0x053A3F }, - { (char*) "US/East-Indiana" , 0x054125 }, - { (char*) "US/Eastern" , 0x054344 }, - { (char*) "US/Hawaii" , 0x054A20 }, - { (char*) "US/Indiana-Starke" , 0x054B09 }, - { (char*) "US/Michigan" , 0x054F0D }, - { (char*) "US/Mountain" , 0x05529C }, - { (char*) "US/Pacific" , 0x0556BA }, - { (char*) "US/Samoa" , 0x055BD4 }, - { (char*) "UTC" , 0x055C72 }, - { (char*) "W-SU" , 0x055CED }, - { (char*) "WET" , 0x056085 }, - { (char*) "Zulu" , 0x056648 }, + { (char*) "America/Atikokan" , 0x0076DC }, + { (char*) "America/Atka" , 0x0077E9 }, + { (char*) "America/Bahia" , 0x007BBE }, + { (char*) "America/Bahia_Banderas" , 0x007E79 }, + { (char*) "America/Barbados" , 0x008152 }, + { (char*) "America/Belem" , 0x008274 }, + { (char*) "America/Belize" , 0x00841C }, + { (char*) "America/Blanc-Sablon" , 0x00883D }, + { (char*) "America/Boa_Vista" , 0x008932 }, + { (char*) "America/Bogota" , 0x008AF3 }, + { (char*) "America/Boise" , 0x008BB2 }, + { (char*) "America/Buenos_Aires" , 0x008FC5 }, + { (char*) "America/Cambridge_Bay" , 0x009295 }, + { (char*) "America/Campo_Grande" , 0x009628 }, + { (char*) "America/Cancun" , 0x0099FE }, + { (char*) "America/Caracas" , 0x009C30 }, + { (char*) "America/Catamarca" , 0x009CFA }, + { (char*) "America/Cayenne" , 0x009FCA }, + { (char*) "America/Cayman" , 0x00A06D }, + { (char*) "America/Chicago" , 0x00A10E }, + { (char*) "America/Chihuahua" , 0x00A808 }, + { (char*) "America/Ciudad_Juarez" , 0x00AADD }, + { (char*) "America/Coral_Harbour" , 0x00ADD3 }, + { (char*) "America/Cordoba" , 0x00AE74 }, + { (char*) "America/Costa_Rica" , 0x00B144 }, + { (char*) "America/Creston" , 0x00B238 }, + { (char*) "America/Cuiaba" , 0x00B2F4 }, + { (char*) "America/Curacao" , 0x00B6B1 }, + { (char*) "America/Danmarkshavn" , 0x00B754 }, + { (char*) "America/Dawson" , 0x00B939 }, + { (char*) "America/Dawson_Creek" , 0x00BD5C }, + { (char*) "America/Denver" , 0x00C033 }, + { (char*) "America/Detroit" , 0x00C466 }, + { (char*) "America/Dominica" , 0x00C80E }, + { (char*) "America/Edmonton" , 0x00C89C }, + { (char*) "America/Eirunepe" , 0x00CC94 }, + { (char*) "America/El_Salvador" , 0x00CE63 }, + { (char*) "America/Ensenada" , 0x00CF1F }, + { (char*) "America/Fort_Nelson" , 0x00D362 }, + { (char*) "America/Fort_Wayne" , 0x00D92A }, + { (char*) "America/Fortaleza" , 0x00DB49 }, + { (char*) "America/Glace_Bay" , 0x00DD5F }, + { (char*) "America/Godthab" , 0x00E0F6 }, + { (char*) "America/Goose_Bay" , 0x00E4C7 }, + { (char*) "America/Grand_Turk" , 0x00EB1F }, + { (char*) "America/Grenada" , 0x00EE80 }, + { (char*) "America/Guadeloupe" , 0x00EF0E }, + { (char*) "America/Guatemala" , 0x00EF9C }, + { (char*) "America/Guayaquil" , 0x00F07C }, + { (char*) "America/Guyana" , 0x00F14D }, + { (char*) "America/Halifax" , 0x00F20E }, + { (char*) "America/Havana" , 0x00F8C0 }, + { (char*) "America/Hermosillo" , 0x00FD29 }, + { (char*) "America/Indiana/Indianapolis" , 0x00FE3D }, + { (char*) "America/Indiana/Knox" , 0x010075 }, + { (char*) "America/Indiana/Marengo" , 0x01048E }, + { (char*) "America/Indiana/Petersburg" , 0x0106E8 }, + { (char*) "America/Indiana/Tell_City" , 0x0109B2 }, + { (char*) "America/Indiana/Vevay" , 0x010BDC }, + { (char*) "America/Indiana/Vincennes" , 0x010D73 }, + { (char*) "America/Indiana/Winamac" , 0x010FC9 }, + { (char*) "America/Indianapolis" , 0x011246 }, + { (char*) "America/Inuvik" , 0x011465 }, + { (char*) "America/Iqaluit" , 0x0117B6 }, + { (char*) "America/Jamaica" , 0x011B32 }, + { (char*) "America/Jujuy" , 0x011C91 }, + { (char*) "America/Juneau" , 0x011F4F }, + { (char*) "America/Kentucky/Louisville" , 0x012335 }, + { (char*) "America/Kentucky/Monticello" , 0x012839 }, + { (char*) "America/Knox_IN" , 0x012C25 }, + { (char*) "America/Kralendijk" , 0x013029 }, + { (char*) "America/La_Paz" , 0x0130E6 }, + { (char*) "America/Lima" , 0x01319C }, + { (char*) "America/Los_Angeles" , 0x0132C3 }, + { (char*) "America/Louisville" , 0x0137E4 }, + { (char*) "America/Lower_Princes" , 0x013CCA }, + { (char*) "America/Maceio" , 0x013D87 }, + { (char*) "America/Managua" , 0x013F99 }, + { (char*) "America/Manaus" , 0x0140CC }, + { (char*) "America/Marigot" , 0x014283 }, + { (char*) "America/Martinique" , 0x014340 }, + { (char*) "America/Matamoros" , 0x0143FE }, + { (char*) "America/Mazatlan" , 0x0145EB }, + { (char*) "America/Mendoza" , 0x0148DB }, + { (char*) "America/Menominee" , 0x014BAB }, + { (char*) "America/Merida" , 0x014F6B }, + { (char*) "America/Metlakatla" , 0x015216 }, + { (char*) "America/Mexico_City" , 0x015483 }, + { (char*) "America/Miquelon" , 0x0157A2 }, + { (char*) "America/Moncton" , 0x0159D4 }, + { (char*) "America/Monterrey" , 0x015FCD }, + { (char*) "America/Montevideo" , 0x0162D4 }, + { (char*) "America/Montreal" , 0x0166A9 }, + { (char*) "America/Montserrat" , 0x016D6A }, + { (char*) "America/Nassau" , 0x016DF8 }, + { (char*) "America/New_York" , 0x0171F2 }, + { (char*) "America/Nipigon" , 0x0178E2 }, + { (char*) "America/Nome" , 0x017FA3 }, + { (char*) "America/Noronha" , 0x01838B }, + { (char*) "America/North_Dakota/Beulah" , 0x01858B }, + { (char*) "America/North_Dakota/Center" , 0x0189BF }, + { (char*) "America/North_Dakota/New_Salem" , 0x018DBE }, + { (char*) "America/Nuuk" , 0x0191C3 }, + { (char*) "America/Ojinaga" , 0x0195A5 }, + { (char*) "America/Panama" , 0x01989B }, + { (char*) "America/Pangnirtung" , 0x01993C }, + { (char*) "America/Paramaribo" , 0x019C9F }, + { (char*) "America/Phoenix" , 0x019D66 }, + { (char*) "America/Port-au-Prince" , 0x019E7A }, + { (char*) "America/Port_of_Spain" , 0x01A0BB }, + { (char*) "America/Porto_Acre" , 0x01A149 }, + { (char*) "America/Porto_Velho" , 0x01A2F7 }, + { (char*) "America/Puerto_Rico" , 0x01A495 }, + { (char*) "America/Punta_Arenas" , 0x01A552 }, + { (char*) "America/Rainy_River" , 0x01AA34 }, + { (char*) "America/Rankin_Inlet" , 0x01AF4E }, + { (char*) "America/Recife" , 0x01B297 }, + { (char*) "America/Regina" , 0x01B491 }, + { (char*) "America/Resolute" , 0x01B730 }, + { (char*) "America/Rio_Branco" , 0x01BA7A }, + { (char*) "America/Rosario" , 0x01BC2C }, + { (char*) "America/Santa_Isabel" , 0x01BEFC }, + { (char*) "America/Santarem" , 0x01C33F }, + { (char*) "America/Santiago" , 0x01C4EF }, + { (char*) "America/Santo_Domingo" , 0x01CA52 }, + { (char*) "America/Sao_Paulo" , 0x01CB9B }, + { (char*) "America/Scoresbysund" , 0x01CF95 }, + { (char*) "America/Shiprock" , 0x01D396 }, + { (char*) "America/Sitka" , 0x01D7B4 }, + { (char*) "America/St_Barthelemy" , 0x01DB8F }, + { (char*) "America/St_Johns" , 0x01DC4C }, + { (char*) "America/St_Kitts" , 0x01E3C9 }, + { (char*) "America/St_Lucia" , 0x01E457 }, + { (char*) "America/St_Thomas" , 0x01E4F8 }, + { (char*) "America/St_Vincent" , 0x01E586 }, + { (char*) "America/Swift_Current" , 0x01E627 }, + { (char*) "America/Tegucigalpa" , 0x01E7B5 }, + { (char*) "America/Thule" , 0x01E883 }, + { (char*) "America/Thunder_Bay" , 0x01EA64 }, + { (char*) "America/Tijuana" , 0x01F125 }, + { (char*) "America/Toronto" , 0x01F577 }, + { (char*) "America/Tortola" , 0x01FC56 }, + { (char*) "America/Vancouver" , 0x01FCE4 }, + { (char*) "America/Virgin" , 0x02023B }, + { (char*) "America/Whitehorse" , 0x0202F8 }, + { (char*) "America/Winnipeg" , 0x02071B }, + { (char*) "America/Yakutat" , 0x020C52 }, + { (char*) "America/Yellowknife" , 0x021020 }, + { (char*) "Antarctica/Casey" , 0x0213F6 }, + { (char*) "Antarctica/Davis" , 0x021526 }, + { (char*) "Antarctica/DumontDUrville" , 0x0215FC }, + { (char*) "Antarctica/Macquarie" , 0x0216B0 }, + { (char*) "Antarctica/Mawson" , 0x021A9C }, + { (char*) "Antarctica/McMurdo" , 0x021B46 }, + { (char*) "Antarctica/Palmer" , 0x021E78 }, + { (char*) "Antarctica/Rothera" , 0x022201 }, + { (char*) "Antarctica/South_Pole" , 0x022298 }, + { (char*) "Antarctica/Syowa" , 0x0226B7 }, + { (char*) "Antarctica/Troll" , 0x02274D }, + { (char*) "Antarctica/Vostok" , 0x0227FC }, + { (char*) "Arctic/Longyearbyen" , 0x0228B8 }, + { (char*) "Asia/Aden" , 0x022B85 }, + { (char*) "Asia/Almaty" , 0x022C16 }, + { (char*) "Asia/Amman" , 0x022E9E }, + { (char*) "Asia/Anadyr" , 0x02324A }, + { (char*) "Asia/Aqtau" , 0x023550 }, + { (char*) "Asia/Aqtobe" , 0x0237CF }, + { (char*) "Asia/Ashgabat" , 0x023A4F }, + { (char*) "Asia/Ashkhabad" , 0x023BD2 }, + { (char*) "Asia/Atyrau" , 0x023D55 }, + { (char*) "Asia/Baghdad" , 0x023FDE }, + { (char*) "Asia/Bahrain" , 0x024260 }, + { (char*) "Asia/Baku" , 0x024319 }, + { (char*) "Asia/Bangkok" , 0x02460D }, + { (char*) "Asia/Barnaul" , 0x0246B1 }, + { (char*) "Asia/Beirut" , 0x0249BC }, + { (char*) "Asia/Bishkek" , 0x024CA4 }, + { (char*) "Asia/Brunei" , 0x024F1A }, + { (char*) "Asia/Calcutta" , 0x024FC0 }, + { (char*) "Asia/Chita" , 0x0250A8 }, + { (char*) "Asia/Choibalsan" , 0x0253B6 }, + { (char*) "Asia/Chongqing" , 0x025614 }, + { (char*) "Asia/Chungking" , 0x0257A9 }, + { (char*) "Asia/Colombo" , 0x02593E }, + { (char*) "Asia/Dacca" , 0x025A41 }, + { (char*) "Asia/Damascus" , 0x025B34 }, + { (char*) "Asia/Dhaka" , 0x026012 }, + { (char*) "Asia/Dili" , 0x026105 }, + { (char*) "Asia/Dubai" , 0x0261BB }, + { (char*) "Asia/Dushanbe" , 0x02624C }, + { (char*) "Asia/Famagusta" , 0x0263C6 }, + { (char*) "Asia/Gaza" , 0x02678D }, + { (char*) "Asia/Harbin" , 0x027329 }, + { (char*) "Asia/Hebron" , 0x0274BE }, + { (char*) "Asia/Ho_Chi_Minh" , 0x02806B }, + { (char*) "Asia/Hong_Kong" , 0x028163 }, + { (char*) "Asia/Hovd" , 0x028476 }, + { (char*) "Asia/Irkutsk" , 0x0286EA }, + { (char*) "Asia/Istanbul" , 0x028A08 }, + { (char*) "Asia/Jakarta" , 0x028EC4 }, + { (char*) "Asia/Jayapura" , 0x028FD5 }, + { (char*) "Asia/Jerusalem" , 0x0290C2 }, + { (char*) "Asia/Kabul" , 0x029500 }, + { (char*) "Asia/Kamchatka" , 0x0295AB }, + { (char*) "Asia/Karachi" , 0x0298A0 }, + { (char*) "Asia/Kashgar" , 0x0299B6 }, + { (char*) "Asia/Kathmandu" , 0x029A47 }, + { (char*) "Asia/Katmandu" , 0x029AF4 }, + { (char*) "Asia/Khandyga" , 0x029BA1 }, + { (char*) "Asia/Kolkata" , 0x029ED2 }, + { (char*) "Asia/Krasnoyarsk" , 0x029FBA }, + { (char*) "Asia/Kuala_Lumpur" , 0x02A2C4 }, + { (char*) "Asia/Kuching" , 0x02A3E4 }, + { (char*) "Asia/Kuwait" , 0x02A53E }, + { (char*) "Asia/Macao" , 0x02A5CF }, + { (char*) "Asia/Macau" , 0x02A8F2 }, + { (char*) "Asia/Magadan" , 0x02AC15 }, + { (char*) "Asia/Makassar" , 0x02AF20 }, + { (char*) "Asia/Manila" , 0x02B033 }, + { (char*) "Asia/Muscat" , 0x02B151 }, + { (char*) "Asia/Nicosia" , 0x02B1E2 }, + { (char*) "Asia/Novokuznetsk" , 0x02B451 }, + { (char*) "Asia/Novosibirsk" , 0x02B744 }, + { (char*) "Asia/Omsk" , 0x02BA55 }, + { (char*) "Asia/Oral" , 0x02BD53 }, + { (char*) "Asia/Phnom_Penh" , 0x02BFDF }, + { (char*) "Asia/Pontianak" , 0x02C0B3 }, + { (char*) "Asia/Pyongyang" , 0x02C1CC }, + { (char*) "Asia/Qatar" , 0x02C28F }, + { (char*) "Asia/Qostanay" , 0x02C333 }, + { (char*) "Asia/Qyzylorda" , 0x02C5C9 }, + { (char*) "Asia/Rangoon" , 0x02C862 }, + { (char*) "Asia/Riyadh" , 0x02C929 }, + { (char*) "Asia/Saigon" , 0x02C9BA }, + { (char*) "Asia/Sakhalin" , 0x02CAB2 }, + { (char*) "Asia/Samarkand" , 0x02CDC9 }, + { (char*) "Asia/Seoul" , 0x02CF54 }, + { (char*) "Asia/Shanghai" , 0x02D0FF }, + { (char*) "Asia/Singapore" , 0x02D2A0 }, + { (char*) "Asia/Srednekolymsk" , 0x02D3AC }, + { (char*) "Asia/Taipei" , 0x02D6BC }, + { (char*) "Asia/Tashkent" , 0x02D8C7 }, + { (char*) "Asia/Tbilisi" , 0x02DA52 }, + { (char*) "Asia/Tehran" , 0x02DCD3 }, + { (char*) "Asia/Tel_Aviv" , 0x02E00B }, + { (char*) "Asia/Thimbu" , 0x02E449 }, + { (char*) "Asia/Thimphu" , 0x02E4EF }, + { (char*) "Asia/Tokyo" , 0x02E595 }, + { (char*) "Asia/Tomsk" , 0x02E676 }, + { (char*) "Asia/Ujung_Pandang" , 0x02E981 }, + { (char*) "Asia/Ulaanbaatar" , 0x02EA4B }, + { (char*) "Asia/Ulan_Bator" , 0x02ECB9 }, + { (char*) "Asia/Urumqi" , 0x02EF17 }, + { (char*) "Asia/Ust-Nera" , 0x02EFB5 }, + { (char*) "Asia/Vientiane" , 0x02F2D8 }, + { (char*) "Asia/Vladivostok" , 0x02F3BE }, + { (char*) "Asia/Yakutsk" , 0x02F6C3 }, + { (char*) "Asia/Yangon" , 0x02F9C7 }, + { (char*) "Asia/Yekaterinburg" , 0x02FA8E }, + { (char*) "Asia/Yerevan" , 0x02FDA0 }, + { (char*) "Atlantic/Azores" , 0x030070 }, + { (char*) "Atlantic/Bermuda" , 0x0305FB }, + { (char*) "Atlantic/Canary" , 0x030A07 }, + { (char*) "Atlantic/Cape_Verde" , 0x030BFF }, + { (char*) "Atlantic/Faeroe" , 0x030CBA }, + { (char*) "Atlantic/Faroe" , 0x030E7F }, + { (char*) "Atlantic/Jan_Mayen" , 0x031044 }, + { (char*) "Atlantic/Madeira" , 0x031311 }, + { (char*) "Atlantic/Reykjavik" , 0x031888 }, + { (char*) "Atlantic/South_Georgia" , 0x031B85 }, + { (char*) "Atlantic/St_Helena" , 0x031C15 }, + { (char*) "Atlantic/Stanley" , 0x031CB6 }, + { (char*) "Australia/ACT" , 0x031FD7 }, + { (char*) "Australia/Adelaide" , 0x03236B }, + { (char*) "Australia/Brisbane" , 0x03271F }, + { (char*) "Australia/Broken_Hill" , 0x032863 }, + { (char*) "Australia/Canberra" , 0x032C38 }, + { (char*) "Australia/Currie" , 0x032FCC }, + { (char*) "Australia/Darwin" , 0x0333C3 }, + { (char*) "Australia/Eucla" , 0x0334CB }, + { (char*) "Australia/Hobart" , 0x03362A }, + { (char*) "Australia/LHI" , 0x033A29 }, + { (char*) "Australia/Lindeman" , 0x033CE9 }, + { (char*) "Australia/Lord_Howe" , 0x033E59 }, + { (char*) "Australia/Melbourne" , 0x034129 }, + { (char*) "Australia/North" , 0x0344C5 }, + { (char*) "Australia/NSW" , 0x0345BB }, + { (char*) "Australia/Perth" , 0x03494F }, + { (char*) "Australia/Queensland" , 0x034AAB }, + { (char*) "Australia/South" , 0x034BD8 }, + { (char*) "Australia/Sydney" , 0x034F7D }, + { (char*) "Australia/Tasmania" , 0x03532D }, + { (char*) "Australia/Victoria" , 0x035724 }, + { (char*) "Australia/West" , 0x035AB8 }, + { (char*) "Australia/Yancowinna" , 0x035BF6 }, + { (char*) "Brazil/Acre" , 0x035FAF }, + { (char*) "Brazil/DeNoronha" , 0x03615D }, + { (char*) "Brazil/East" , 0x03634D }, + { (char*) "Brazil/West" , 0x036711 }, + { (char*) "Canada/Atlantic" , 0x0368B9 }, + { (char*) "Canada/Central" , 0x036F4D }, + { (char*) "Canada/Eastern" , 0x037467 }, + { (char*) "Canada/Mountain" , 0x037B28 }, + { (char*) "Canada/Newfoundland" , 0x037EFE }, + { (char*) "Canada/Pacific" , 0x038660 }, + { (char*) "Canada/Saskatchewan" , 0x038B9E }, + { (char*) "Canada/Yukon" , 0x038E28 }, + { (char*) "CET" , 0x039239 }, + { (char*) "Chile/Continental" , 0x039694 }, + { (char*) "Chile/EasterIsland" , 0x039BEA }, + { (char*) "CST6CDT" , 0x03A08C }, + { (char*) "Cuba" , 0x03A772 }, + { (char*) "EET" , 0x03ABDB }, + { (char*) "Egypt" , 0x03AE91 }, + { (char*) "Eire" , 0x03B3BA }, + { (char*) "EST" , 0x03B99E }, + { (char*) "EST5EDT" , 0x03BA3F }, + { (char*) "Etc/GMT" , 0x03C11B }, + { (char*) "Etc/GMT+0" , 0x03C196 }, + { (char*) "Etc/GMT+1" , 0x03C211 }, + { (char*) "Etc/GMT+10" , 0x03C28E }, + { (char*) "Etc/GMT+11" , 0x03C30C }, + { (char*) "Etc/GMT+12" , 0x03C38A }, + { (char*) "Etc/GMT+2" , 0x03C408 }, + { (char*) "Etc/GMT+3" , 0x03C485 }, + { (char*) "Etc/GMT+4" , 0x03C502 }, + { (char*) "Etc/GMT+5" , 0x03C57F }, + { (char*) "Etc/GMT+6" , 0x03C5FC }, + { (char*) "Etc/GMT+7" , 0x03C679 }, + { (char*) "Etc/GMT+8" , 0x03C6F6 }, + { (char*) "Etc/GMT+9" , 0x03C773 }, + { (char*) "Etc/GMT-0" , 0x03C7F0 }, + { (char*) "Etc/GMT-1" , 0x03C86B }, + { (char*) "Etc/GMT-10" , 0x03C8E9 }, + { (char*) "Etc/GMT-11" , 0x03C968 }, + { (char*) "Etc/GMT-12" , 0x03C9E7 }, + { (char*) "Etc/GMT-13" , 0x03CA66 }, + { (char*) "Etc/GMT-14" , 0x03CAE5 }, + { (char*) "Etc/GMT-2" , 0x03CB64 }, + { (char*) "Etc/GMT-3" , 0x03CBE2 }, + { (char*) "Etc/GMT-4" , 0x03CC60 }, + { (char*) "Etc/GMT-5" , 0x03CCDE }, + { (char*) "Etc/GMT-6" , 0x03CD5C }, + { (char*) "Etc/GMT-7" , 0x03CDDA }, + { (char*) "Etc/GMT-8" , 0x03CE58 }, + { (char*) "Etc/GMT-9" , 0x03CED6 }, + { (char*) "Etc/GMT0" , 0x03CF54 }, + { (char*) "Etc/Greenwich" , 0x03CFCF }, + { (char*) "Etc/UCT" , 0x03D04A }, + { (char*) "Etc/Universal" , 0x03D0C5 }, + { (char*) "Etc/UTC" , 0x03D140 }, + { (char*) "Etc/Zulu" , 0x03D1BB }, + { (char*) "Europe/Amsterdam" , 0x03D236 }, + { (char*) "Europe/Andorra" , 0x03D671 }, + { (char*) "Europe/Astrakhan" , 0x03D802 }, + { (char*) "Europe/Athens" , 0x03DAF6 }, + { (char*) "Europe/Belfast" , 0x03DDAC }, + { (char*) "Europe/Belgrade" , 0x03E3F7 }, + { (char*) "Europe/Berlin" , 0x03E5E1 }, + { (char*) "Europe/Bratislava" , 0x03E8BD }, + { (char*) "Europe/Brussels" , 0x03EB9C }, + { (char*) "Europe/Bucharest" , 0x03EFF7 }, + { (char*) "Europe/Budapest" , 0x03F298 }, + { (char*) "Europe/Busingen" , 0x03F5A2 }, + { (char*) "Europe/Chisinau" , 0x03F7A7 }, + { (char*) "Europe/Copenhagen" , 0x03FAA6 }, + { (char*) "Europe/Dublin" , 0x03FD21 }, + { (char*) "Europe/Gibraltar" , 0x040305 }, + { (char*) "Europe/Guernsey" , 0x0407D5 }, + { (char*) "Europe/Helsinki" , 0x040E2C }, + { (char*) "Europe/Isle_of_Man" , 0x041019 }, + { (char*) "Europe/Istanbul" , 0x041664 }, + { (char*) "Europe/Jersey" , 0x041B20 }, + { (char*) "Europe/Kaliningrad" , 0x042177 }, + { (char*) "Europe/Kiev" , 0x04251F }, + { (char*) "Europe/Kirov" , 0x042759 }, + { (char*) "Europe/Kyiv" , 0x042A52 }, + { (char*) "Europe/Lisbon" , 0x042C9B }, + { (char*) "Europe/Ljubljana" , 0x043271 }, + { (char*) "Europe/London" , 0x04345B }, + { (char*) "Europe/Luxembourg" , 0x043AA6 }, + { (char*) "Europe/Madrid" , 0x043EF1 }, + { (char*) "Europe/Malta" , 0x04428E }, + { (char*) "Europe/Mariehamn" , 0x04463A }, + { (char*) "Europe/Minsk" , 0x044827 }, + { (char*) "Europe/Monaco" , 0x044B5B }, + { (char*) "Europe/Moscow" , 0x044FC1 }, + { (char*) "Europe/Nicosia" , 0x04536D }, + { (char*) "Europe/Oslo" , 0x0455CE }, + { (char*) "Europe/Paris" , 0x04587E }, + { (char*) "Europe/Podgorica" , 0x045CDB }, + { (char*) "Europe/Prague" , 0x045EC5 }, + { (char*) "Europe/Riga" , 0x0461A4 }, + { (char*) "Europe/Rome" , 0x046466 }, + { (char*) "Europe/Samara" , 0x046825 }, + { (char*) "Europe/San_Marino" , 0x046B26 }, + { (char*) "Europe/Sarajevo" , 0x046EE5 }, + { (char*) "Europe/Saratov" , 0x0470CF }, + { (char*) "Europe/Simferopol" , 0x0473C1 }, + { (char*) "Europe/Skopje" , 0x047734 }, + { (char*) "Europe/Sofia" , 0x04791E }, + { (char*) "Europe/Stockholm" , 0x047B7A }, + { (char*) "Europe/Tallinn" , 0x047D77 }, + { (char*) "Europe/Tirane" , 0x048026 }, + { (char*) "Europe/Tiraspol" , 0x04828E }, + { (char*) "Europe/Ulyanovsk" , 0x04858D }, + { (char*) "Europe/Uzhgorod" , 0x0488A3 }, + { (char*) "Europe/Vaduz" , 0x048ADD }, + { (char*) "Europe/Vatican" , 0x048CC7 }, + { (char*) "Europe/Vienna" , 0x049086 }, + { (char*) "Europe/Vilnius" , 0x049324 }, + { (char*) "Europe/Volgograd" , 0x0495D4 }, + { (char*) "Europe/Warsaw" , 0x0498E3 }, + { (char*) "Europe/Zagreb" , 0x049C8A }, + { (char*) "Europe/Zaporozhye" , 0x049E74 }, + { (char*) "Europe/Zurich" , 0x04A0AE }, + { (char*) "Factory" , 0x04A2AB }, + { (char*) "GB" , 0x04A328 }, + { (char*) "GB-Eire" , 0x04A973 }, + { (char*) "GMT" , 0x04AFBE }, + { (char*) "GMT+0" , 0x04B039 }, + { (char*) "GMT-0" , 0x04B0B4 }, + { (char*) "GMT0" , 0x04B12F }, + { (char*) "Greenwich" , 0x04B1AA }, + { (char*) "Hongkong" , 0x04B225 }, + { (char*) "HST" , 0x04B538 }, + { (char*) "Iceland" , 0x04B621 }, + { (char*) "Indian/Antananarivo" , 0x04B6AF }, + { (char*) "Indian/Chagos" , 0x04B75B }, + { (char*) "Indian/Christmas" , 0x04B7FF }, + { (char*) "Indian/Cocos" , 0x04B890 }, + { (char*) "Indian/Comoro" , 0x04B928 }, + { (char*) "Indian/Kerguelen" , 0x04B9B7 }, + { (char*) "Indian/Mahe" , 0x04BA48 }, + { (char*) "Indian/Maldives" , 0x04BAD9 }, + { (char*) "Indian/Mauritius" , 0x04BB7D }, + { (char*) "Indian/Mayotte" , 0x04BC3C }, + { (char*) "Indian/Reunion" , 0x04BCCB }, + { (char*) "Iran" , 0x04BD5C }, + { (char*) "Israel" , 0x04C094 }, + { (char*) "Jamaica" , 0x04C4D2 }, + { (char*) "Japan" , 0x04C631 }, + { (char*) "Kwajalein" , 0x04C712 }, + { (char*) "Libya" , 0x04C7F9 }, + { (char*) "MET" , 0x04C9B4 }, + { (char*) "Mexico/BajaNorte" , 0x04CE0F }, + { (char*) "Mexico/BajaSur" , 0x04D252 }, + { (char*) "Mexico/General" , 0x04D510 }, + { (char*) "MST" , 0x04D821 }, + { (char*) "MST7MDT" , 0x04D91D }, + { (char*) "Navajo" , 0x04DD3B }, + { (char*) "NZ" , 0x04E159 }, + { (char*) "NZ-CHAT" , 0x04E578 }, + { (char*) "Pacific/Apia" , 0x04E8AC }, + { (char*) "Pacific/Auckland" , 0x04EA4F }, + { (char*) "Pacific/Bougainville" , 0x04EE81 }, + { (char*) "Pacific/Chatham" , 0x04EF62 }, + { (char*) "Pacific/Chuuk" , 0x04F2A5 }, + { (char*) "Pacific/Easter" , 0x04F383 }, + { (char*) "Pacific/Efate" , 0x04F832 }, + { (char*) "Pacific/Enderbury" , 0x04F994 }, + { (char*) "Pacific/Fakaofo" , 0x04FA4C }, + { (char*) "Pacific/Fiji" , 0x04FAF1 }, + { (char*) "Pacific/Funafuti" , 0x04FC89 }, + { (char*) "Pacific/Galapagos" , 0x04FD1B }, + { (char*) "Pacific/Gambier" , 0x04FDE7 }, + { (char*) "Pacific/Guadalcanal" , 0x04FE86 }, + { (char*) "Pacific/Guam" , 0x04FF18 }, + { (char*) "Pacific/Honolulu" , 0x050082 }, + { (char*) "Pacific/Johnston" , 0x050171 }, + { (char*) "Pacific/Kanton" , 0x05025A }, + { (char*) "Pacific/Kiritimati" , 0x050321 }, + { (char*) "Pacific/Kosrae" , 0x0503E7 }, + { (char*) "Pacific/Kwajalein" , 0x0504EB }, + { (char*) "Pacific/Majuro" , 0x0505DB }, + { (char*) "Pacific/Marquesas" , 0x0506D9 }, + { (char*) "Pacific/Midway" , 0x050781 }, + { (char*) "Pacific/Nauru" , 0x050844 }, + { (char*) "Pacific/Niue" , 0x050907 }, + { (char*) "Pacific/Norfolk" , 0x0509AD }, + { (char*) "Pacific/Noumea" , 0x050AA6 }, + { (char*) "Pacific/Pago_Pago" , 0x050B78 }, + { (char*) "Pacific/Palau" , 0x050C16 }, + { (char*) "Pacific/Pitcairn" , 0x050CB6 }, + { (char*) "Pacific/Pohnpei" , 0x050D5B }, + { (char*) "Pacific/Ponape" , 0x050E4B }, + { (char*) "Pacific/Port_Moresby" , 0x050EDD }, + { (char*) "Pacific/Rarotonga" , 0x050F9B }, + { (char*) "Pacific/Saipan" , 0x05113D }, + { (char*) "Pacific/Samoa" , 0x05129E }, + { (char*) "Pacific/Tahiti" , 0x05133C }, + { (char*) "Pacific/Tarawa" , 0x0513DC }, + { (char*) "Pacific/Tongatapu" , 0x05147D }, + { (char*) "Pacific/Truk" , 0x051576 }, + { (char*) "Pacific/Wake" , 0x05161C }, + { (char*) "Pacific/Wallis" , 0x0516B9 }, + { (char*) "Pacific/Yap" , 0x05174B }, + { (char*) "Poland" , 0x0517F1 }, + { (char*) "Portugal" , 0x051B98 }, + { (char*) "PRC" , 0x05215B }, + { (char*) "PST8PDT" , 0x0522F0 }, + { (char*) "ROC" , 0x05280A }, + { (char*) "ROK" , 0x052A15 }, + { (char*) "Singapore" , 0x052BC0 }, + { (char*) "Turkey" , 0x052CCC }, + { (char*) "UCT" , 0x053188 }, + { (char*) "Universal" , 0x053203 }, + { (char*) "US/Alaska" , 0x05327E }, + { (char*) "US/Aleutian" , 0x05365B }, + { (char*) "US/Arizona" , 0x053A30 }, + { (char*) "US/Central" , 0x053B2C }, + { (char*) "US/East-Indiana" , 0x054212 }, + { (char*) "US/Eastern" , 0x054431 }, + { (char*) "US/Hawaii" , 0x054B0D }, + { (char*) "US/Indiana-Starke" , 0x054BF6 }, + { (char*) "US/Michigan" , 0x054FFA }, + { (char*) "US/Mountain" , 0x055389 }, + { (char*) "US/Pacific" , 0x0557A7 }, + { (char*) "US/Samoa" , 0x055CC1 }, + { (char*) "UTC" , 0x055D5F }, + { (char*) "W-SU" , 0x055DDA }, + { (char*) "WET" , 0x056172 }, + { (char*) "Zulu" , 0x056735 }, }; -const unsigned char timelib_timezone_db_data_builtin[353987] = { +const unsigned char timelib_timezone_db_data_builtin[354224] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2627,7 +2627,7 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 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, 0x4F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, 0xB0, 0x00, @@ -2667,18 +2667,30 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, 0x30, 0x00, -0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, +0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, 0x30, 0x00, +0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, 0x30, 0x00, +0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, 0x30, 0x00, +0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, 0x30, 0x00, +0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, 0x30, 0x00, +0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, 0x30, 0x00, +0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, 0x30, 0x00, +0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0x0D, 0xDA, 0xB0, 0x01, +0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, -0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, -0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, -0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, -0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, -0x30, 0x2F, 0x30, 0x0A, 0x00, 0x62, 0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, - +0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, +0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, +0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, +0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, +0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x62, 0xC6, +0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, /* America/Atikokan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12352,17 +12364,19 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 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, 0x0A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, -0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x1F, 0x3F, 0x90, 0xFF, -0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x16, 0x30, 0x70, 0xFF, -0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x25, 0x70, 0xFF, -0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xD5, 0xA2, 0xF0, 0x00, -0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x66, 0x7A, 0xF0, 0x01, -0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, -0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, -0x94, 0xDD, 0x01, 0xCB, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0xBB, 0x7A, 0x40, 0xFF, +0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x70, 0xFF, +0xFF, 0xFF, 0xFF, 0xCB, 0x3F, 0x9B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x8C, 0x03, 0xF0, 0xFF, +0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0x4D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xB1, 0xE5, 0xF0, 0xFF, +0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xB3, 0x5B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x0D, 0x9B, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x26, 0x56, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xB1, 0xA8, 0x70, 0x01, +0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, +0xE8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x68, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, +0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x50, +0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, +0x38, 0x0A, 0x00, 0x9F, 0x96, 0x2A, 0x01, 0xCB, 0x3D, 0x89, 0x00, 0x00, 0x00, 0x00, /* Asia/Muscat */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4F, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24301,533 +24315,533 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (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" , 0x00C7A2 }, - { (char*) "America/Belem" , 0x00C962 }, - { (char*) "America/Belize" , 0x00CBB2 }, - { (char*) "America/Blanc-Sablon" , 0x00D20C }, - { (char*) "America/Boa_Vista" , 0x00D35E }, - { (char*) "America/Bogota" , 0x00D5DB }, - { (char*) "America/Boise" , 0x00D6CF }, - { (char*) "America/Buenos_Aires" , 0x00E065 }, - { (char*) "America/Cambridge_Bay" , 0x00E497 }, - { (char*) "America/Campo_Grande" , 0x00ED85 }, - { (char*) "America/Cancun" , 0x00F339 }, - { (char*) "America/Caracas" , 0x00F6B1 }, - { (char*) "America/Catamarca" , 0x00F7B7 }, - { (char*) "America/Cayenne" , 0x00FBE9 }, - { (char*) "America/Cayman" , 0x00FCAD }, - { (char*) "America/Chicago" , 0x00FD6F }, - { (char*) "America/Chihuahua" , 0x010B97 }, - { (char*) "America/Ciudad_Juarez" , 0x011007 }, - { (char*) "America/Coral_Harbour" , 0x011631 }, - { (char*) "America/Cordoba" , 0x0116F3 }, - { (char*) "America/Costa_Rica" , 0x011B25 }, - { (char*) "America/Creston" , 0x011C6D }, - { (char*) "America/Cuiaba" , 0x011D5B }, - { (char*) "America/Curacao" , 0x0122EC }, - { (char*) "America/Danmarkshavn" , 0x0123B2 }, - { (char*) "America/Dawson" , 0x012692 }, - { (char*) "America/Dawson_Creek" , 0x012CFE }, - { (char*) "America/Denver" , 0x013144 }, - { (char*) "America/Detroit" , 0x013B01 }, - { (char*) "America/Dominica" , 0x0143DC }, - { (char*) "America/Edmonton" , 0x01447C }, - { (char*) "America/Eirunepe" , 0x014DC6 }, - { (char*) "America/El_Salvador" , 0x015063 }, - { (char*) "America/Ensenada" , 0x01514F }, - { (char*) "America/Fort_Nelson" , 0x015AF5 }, - { (char*) "America/Fort_Wayne" , 0x0163D5 }, - { (char*) "America/Fortaleza" , 0x016A73 }, - { (char*) "America/Glace_Bay" , 0x016D63 }, - { (char*) "America/Godthab" , 0x01761A }, - { (char*) "America/Goose_Bay" , 0x017D87 }, - { (char*) "America/Grand_Turk" , 0x018A3D }, - { (char*) "America/Grenada" , 0x019173 }, - { (char*) "America/Guadeloupe" , 0x019213 }, - { (char*) "America/Guatemala" , 0x0192B3 }, - { (char*) "America/Guayaquil" , 0x0193D7 }, - { (char*) "America/Guyana" , 0x0194DD }, - { (char*) "America/Halifax" , 0x0195E1 }, - { (char*) "America/Havana" , 0x01A36B }, - { (char*) "America/Hermosillo" , 0x01ACE7 }, - { (char*) "America/Indiana/Indianapolis" , 0x01AE7D }, - { (char*) "America/Indiana/Knox" , 0x01B534 }, - { (char*) "America/Indiana/Marengo" , 0x01BEE1 }, - { (char*) "America/Indiana/Petersburg" , 0x01C5CE }, - { (char*) "America/Indiana/Tell_City" , 0x01CD6D }, - { (char*) "America/Indiana/Vevay" , 0x01D431 }, - { (char*) "America/Indiana/Vincennes" , 0x01D9ED }, - { (char*) "America/Indiana/Winamac" , 0x01E0C3 }, - { (char*) "America/Indianapolis" , 0x01E7E7 }, - { (char*) "America/Inuvik" , 0x01EE85 }, - { (char*) "America/Iqaluit" , 0x01F6BF }, - { (char*) "America/Jamaica" , 0x01FF7E }, - { (char*) "America/Jujuy" , 0x02016C }, - { (char*) "America/Juneau" , 0x020582 }, - { (char*) "America/Kentucky/Louisville" , 0x020ED3 }, - { (char*) "America/Kentucky/Monticello" , 0x0219E1 }, - { (char*) "America/Knox_IN" , 0x022341 }, - { (char*) "America/Kralendijk" , 0x022CD9 }, - { (char*) "America/La_Paz" , 0x022DDB }, - { (char*) "America/Lima" , 0x022EC1 }, - { (char*) "America/Los_Angeles" , 0x023055 }, - { (char*) "America/Louisville" , 0x023B8C }, - { (char*) "America/Lower_Princes" , 0x02467C }, - { (char*) "America/Maceio" , 0x02477E }, - { (char*) "America/Managua" , 0x024A74 }, - { (char*) "America/Manaus" , 0x024C2E }, - { (char*) "America/Marigot" , 0x024E97 }, - { (char*) "America/Martinique" , 0x024F99 }, - { (char*) "America/Matamoros" , 0x02508D }, - { (char*) "America/Mazatlan" , 0x02564F }, - { (char*) "America/Mendoza" , 0x025AB1 }, - { (char*) "America/Menominee" , 0x025EE3 }, - { (char*) "America/Merida" , 0x0267F0 }, - { (char*) "America/Metlakatla" , 0x026BF9 }, - { (char*) "America/Mexico_City" , 0x0271AB }, - { (char*) "America/Miquelon" , 0x02768B }, - { (char*) "America/Moncton" , 0x027D0B }, - { (char*) "America/Monterrey" , 0x028981 }, - { (char*) "America/Montevideo" , 0x028E1D }, - { (char*) "America/Montreal" , 0x029401 }, - { (char*) "America/Montserrat" , 0x02A1B3 }, - { (char*) "America/Nassau" , 0x02A253 }, - { (char*) "America/New_York" , 0x02ABB3 }, - { (char*) "America/Nipigon" , 0x02B9B3 }, - { (char*) "America/Nome" , 0x02C765 }, - { (char*) "America/Noronha" , 0x02D0BD }, - { (char*) "America/North_Dakota/Beulah" , 0x02D397 }, - { (char*) "America/North_Dakota/Center" , 0x02DD14 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E691 }, - { (char*) "America/Nuuk" , 0x02F014 }, - { (char*) "America/Ojinaga" , 0x02F792 }, - { (char*) "America/Panama" , 0x02FDAE }, - { (char*) "America/Pangnirtung" , 0x02FE70 }, - { (char*) "America/Paramaribo" , 0x030716 }, - { (char*) "America/Phoenix" , 0x03081A }, - { (char*) "America/Port-au-Prince" , 0x0309A6 }, - { (char*) "America/Port_of_Spain" , 0x030F4C }, - { (char*) "America/Porto_Acre" , 0x030FEC }, - { (char*) "America/Porto_Velho" , 0x03125E }, - { (char*) "America/Puerto_Rico" , 0x0314A4 }, - { (char*) "America/Punta_Arenas" , 0x0315A6 }, - { (char*) "America/Rainy_River" , 0x031D34 }, - { (char*) "America/Rankin_Inlet" , 0x032874 }, - { (char*) "America/Recife" , 0x0330A8 }, - { (char*) "America/Regina" , 0x03337C }, - { (char*) "America/Resolute" , 0x033771 }, - { (char*) "America/Rio_Branco" , 0x033FA6 }, - { (char*) "America/Rosario" , 0x03421C }, - { (char*) "America/Santa_Isabel" , 0x03464E }, - { (char*) "America/Santarem" , 0x034FF4 }, - { (char*) "America/Santiago" , 0x035257 }, - { (char*) "America/Santo_Domingo" , 0x035C43 }, - { (char*) "America/Sao_Paulo" , 0x035E19 }, - { (char*) "America/Scoresbysund" , 0x0363F1 }, - { (char*) "America/Shiprock" , 0x036BA9 }, - { (char*) "America/Sitka" , 0x037551 }, - { (char*) "America/St_Barthelemy" , 0x037E89 }, - { (char*) "America/St_Johns" , 0x037F8B }, - { (char*) "America/St_Kitts" , 0x038DF9 }, - { (char*) "America/St_Lucia" , 0x038E99 }, - { (char*) "America/St_Thomas" , 0x038F5B }, - { (char*) "America/St_Vincent" , 0x038FFB }, - { (char*) "America/Swift_Current" , 0x0390BD }, - { (char*) "America/Tegucigalpa" , 0x03930B }, - { (char*) "America/Thule" , 0x039413 }, - { (char*) "America/Thunder_Bay" , 0x039A0B }, - { (char*) "America/Tijuana" , 0x03A7BD }, - { (char*) "America/Toronto" , 0x03B172 }, - { (char*) "America/Tortola" , 0x03BF42 }, - { (char*) "America/Vancouver" , 0x03BFE2 }, - { (char*) "America/Virgin" , 0x03CB53 }, - { (char*) "America/Whitehorse" , 0x03CC55 }, - { (char*) "America/Winnipeg" , 0x03D2C1 }, - { (char*) "America/Yakutat" , 0x03DE1E }, - { (char*) "America/Yellowknife" , 0x03E73B }, - { (char*) "Antarctica/Casey" , 0x03F063 }, - { (char*) "Antarctica/Davis" , 0x03F21B }, - { (char*) "Antarctica/DumontDUrville" , 0x03F347 }, - { (char*) "Antarctica/Macquarie" , 0x03F417 }, - { (char*) "Antarctica/Mawson" , 0x03FD07 }, - { (char*) "Antarctica/McMurdo" , 0x03FDD2 }, - { (char*) "Antarctica/Palmer" , 0x0405CD }, - { (char*) "Antarctica/Rothera" , 0x040B5B }, - { (char*) "Antarctica/South_Pole" , 0x040C04 }, - { (char*) "Antarctica/Syowa" , 0x041595 }, - { (char*) "Antarctica/Troll" , 0x04163D }, - { (char*) "Antarctica/Vostok" , 0x041ACA }, - { (char*) "Arctic/Longyearbyen" , 0x041BB1 }, - { (char*) "Asia/Aden" , 0x0424B7 }, - { (char*) "Asia/Almaty" , 0x04255A }, - { (char*) "Asia/Amman" , 0x04294F }, - { (char*) "Asia/Anadyr" , 0x042EF4 }, - { (char*) "Asia/Aqtau" , 0x0433A9 }, - { (char*) "Asia/Aqtobe" , 0x043793 }, - { (char*) "Asia/Ashgabat" , 0x043B91 }, - { (char*) "Asia/Ashkhabad" , 0x043DFA }, - { (char*) "Asia/Atyrau" , 0x044063 }, - { (char*) "Asia/Baghdad" , 0x044455 }, - { (char*) "Asia/Bahrain" , 0x04482A }, - { (char*) "Asia/Baku" , 0x044915 }, - { (char*) "Asia/Bangkok" , 0x044DDE }, - { (char*) "Asia/Barnaul" , 0x044EA3 }, - { (char*) "Asia/Beirut" , 0x045374 }, - { (char*) "Asia/Bishkek" , 0x045BEA }, - { (char*) "Asia/Brunei" , 0x045FBF }, - { (char*) "Asia/Calcutta" , 0x046088 }, - { (char*) "Asia/Chita" , 0x0461B1 }, - { (char*) "Asia/Choibalsan" , 0x046688 }, - { (char*) "Asia/Chongqing" , 0x046A01 }, - { (char*) "Asia/Chungking" , 0x046C3E }, - { (char*) "Asia/Colombo" , 0x046E7B }, - { (char*) "Asia/Dacca" , 0x046FED }, - { (char*) "Asia/Damascus" , 0x04713C }, - { (char*) "Asia/Dhaka" , 0x047899 }, - { (char*) "Asia/Dili" , 0x0479E8 }, - { (char*) "Asia/Dubai" , 0x047AF5 }, - { (char*) "Asia/Dushanbe" , 0x047B98 }, - { (char*) "Asia/Famagusta" , 0x047DE5 }, - { (char*) "Asia/Gaza" , 0x0485EC }, - { (char*) "Asia/Harbin" , 0x049506 }, - { (char*) "Asia/Hebron" , 0x049743 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x04A678 }, - { (char*) "Asia/Hong_Kong" , 0x04A7D5 }, - { (char*) "Asia/Hovd" , 0x04ACB2 }, - { (char*) "Asia/Irkutsk" , 0x04B041 }, - { (char*) "Asia/Istanbul" , 0x04B534 }, - { (char*) "Asia/Jakarta" , 0x04BCCD }, - { (char*) "Asia/Jayapura" , 0x04BE65 }, - { (char*) "Asia/Jerusalem" , 0x04BF84 }, - { (char*) "Asia/Kabul" , 0x04C8E4 }, - { (char*) "Asia/Kamchatka" , 0x04C9B2 }, - { (char*) "Asia/Karachi" , 0x04CE50 }, - { (char*) "Asia/Kashgar" , 0x04CFD7 }, - { (char*) "Asia/Kathmandu" , 0x04D07A }, - { (char*) "Asia/Katmandu" , 0x04D14C }, - { (char*) "Asia/Khandyga" , 0x04D21E }, - { (char*) "Asia/Kolkata" , 0x04D731 }, - { (char*) "Asia/Krasnoyarsk" , 0x04D85A }, - { (char*) "Asia/Kuala_Lumpur" , 0x04DD28 }, - { (char*) "Asia/Kuching" , 0x04DED9 }, - { (char*) "Asia/Kuwait" , 0x04E0C8 }, - { (char*) "Asia/Macao" , 0x04E16B }, - { (char*) "Asia/Macau" , 0x04E642 }, - { (char*) "Asia/Magadan" , 0x04EB19 }, - { (char*) "Asia/Makassar" , 0x04EFED }, - { (char*) "Asia/Manila" , 0x04F140 }, - { (char*) "Asia/Muscat" , 0x04F294 }, - { (char*) "Asia/Nicosia" , 0x04F337 }, - { (char*) "Asia/Novokuznetsk" , 0x04FB23 }, - { (char*) "Asia/Novosibirsk" , 0x04FFBF }, - { (char*) "Asia/Omsk" , 0x050496 }, - { (char*) "Asia/Oral" , 0x050958 }, - { (char*) "Asia/Phnom_Penh" , 0x050D52 }, - { (char*) "Asia/Pontianak" , 0x050E77 }, - { (char*) "Asia/Pyongyang" , 0x050FFA }, - { (char*) "Asia/Qatar" , 0x0510F3 }, - { (char*) "Asia/Qostanay" , 0x0511B8 }, - { (char*) "Asia/Qyzylorda" , 0x0515DF }, - { (char*) "Asia/Rangoon" , 0x0519FB }, - { (char*) "Asia/Riyadh" , 0x051B05 }, - { (char*) "Asia/Saigon" , 0x051BA8 }, - { (char*) "Asia/Sakhalin" , 0x051D05 }, - { (char*) "Asia/Samarkand" , 0x0521CD }, - { (char*) "Asia/Seoul" , 0x05241D }, - { (char*) "Asia/Shanghai" , 0x052692 }, - { (char*) "Asia/Singapore" , 0x0528DB }, - { (char*) "Asia/Srednekolymsk" , 0x052A78 }, - { (char*) "Asia/Taipei" , 0x052F4C }, - { (char*) "Asia/Tashkent" , 0x053251 }, - { (char*) "Asia/Tbilisi" , 0x0534AF }, - { (char*) "Asia/Tehran" , 0x0538B8 }, - { (char*) "Asia/Tel_Aviv" , 0x053DA4 }, - { (char*) "Asia/Thimbu" , 0x054704 }, - { (char*) "Asia/Thimphu" , 0x0547CD }, - { (char*) "Asia/Tokyo" , 0x054896 }, - { (char*) "Asia/Tomsk" , 0x0549D7 }, - { (char*) "Asia/Ujung_Pandang" , 0x054EA8 }, - { (char*) "Asia/Ulaanbaatar" , 0x054FB2 }, - { (char*) "Asia/Ulan_Bator" , 0x05533B }, - { (char*) "Asia/Urumqi" , 0x0556B4 }, - { (char*) "Asia/Ust-Nera" , 0x055764 }, - { (char*) "Asia/Vientiane" , 0x055C5A }, - { (char*) "Asia/Vladivostok" , 0x055D9B }, - { (char*) "Asia/Yakutsk" , 0x056264 }, - { (char*) "Asia/Yangon" , 0x05672C }, - { (char*) "Asia/Yekaterinburg" , 0x056836 }, - { (char*) "Asia/Yerevan" , 0x056D1D }, - { (char*) "Atlantic/Azores" , 0x05719A }, - { (char*) "Atlantic/Bermuda" , 0x057F1E }, - { (char*) "Atlantic/Canary" , 0x058886 }, - { (char*) "Atlantic/Cape_Verde" , 0x059009 }, - { (char*) "Atlantic/Faeroe" , 0x059115 }, - { (char*) "Atlantic/Faroe" , 0x059838 }, - { (char*) "Atlantic/Jan_Mayen" , 0x059F5B }, - { (char*) "Atlantic/Madeira" , 0x05A861 }, - { (char*) "Atlantic/Reykjavik" , 0x05B5AD }, - { (char*) "Atlantic/South_Georgia" , 0x05BA43 }, - { (char*) "Atlantic/St_Helena" , 0x05BAE5 }, - { (char*) "Atlantic/Stanley" , 0x05BBA7 }, - { (char*) "Australia/ACT" , 0x05C063 }, - { (char*) "Australia/Adelaide" , 0x05C8FD }, - { (char*) "Australia/Brisbane" , 0x05D1B8 }, - { (char*) "Australia/Broken_Hill" , 0x05D37E }, - { (char*) "Australia/Canberra" , 0x05DC5B }, - { (char*) "Australia/Currie" , 0x05E4F5 }, - { (char*) "Australia/Darwin" , 0x05EE37 }, - { (char*) "Australia/Eucla" , 0x05EF9A }, - { (char*) "Australia/Hobart" , 0x05F187 }, - { (char*) "Australia/LHI" , 0x05FAD1 }, - { (char*) "Australia/Lindeman" , 0x060213 }, - { (char*) "Australia/Lord_Howe" , 0x060419 }, - { (char*) "Australia/Melbourne" , 0x060B6B }, - { (char*) "Australia/North" , 0x06140D }, - { (char*) "Australia/NSW" , 0x06155E }, - { (char*) "Australia/Perth" , 0x061DF8 }, - { (char*) "Australia/Queensland" , 0x061FE0 }, - { (char*) "Australia/South" , 0x06218F }, - { (char*) "Australia/Sydney" , 0x062A3B }, - { (char*) "Australia/Tasmania" , 0x0632F1 }, - { (char*) "Australia/Victoria" , 0x063C33 }, - { (char*) "Australia/West" , 0x0644CD }, - { (char*) "Australia/Yancowinna" , 0x064697 }, - { (char*) "Brazil/Acre" , 0x064F58 }, - { (char*) "Brazil/DeNoronha" , 0x0651CA }, - { (char*) "Brazil/East" , 0x065494 }, - { (char*) "Brazil/West" , 0x065A36 }, - { (char*) "Canada/Atlantic" , 0x065C90 }, - { (char*) "Canada/Central" , 0x0669FC }, - { (char*) "Canada/Eastern" , 0x06753C }, - { (char*) "Canada/Mountain" , 0x0682EE }, - { (char*) "Canada/Newfoundland" , 0x068C16 }, - { (char*) "Canada/Pacific" , 0x069A69 }, - { (char*) "Canada/Saskatchewan" , 0x06A5C1 }, - { (char*) "Canada/Yukon" , 0x06A9A1 }, - { (char*) "CET" , 0x06AFFB }, - { (char*) "Chile/Continental" , 0x06BB7C }, - { (char*) "Chile/EasterIsland" , 0x06C55B }, - { (char*) "CST6CDT" , 0x06CE12 }, - { (char*) "Cuba" , 0x06DC26 }, - { (char*) "EET" , 0x06E5A2 }, - { (char*) "Egypt" , 0x06EE84 }, - { (char*) "Eire" , 0x06F7EF }, - { (char*) "EST" , 0x07059F }, - { (char*) "EST5EDT" , 0x070661 }, - { (char*) "Etc/GMT" , 0x07144D }, - { (char*) "Etc/GMT+0" , 0x0714CB }, - { (char*) "Etc/GMT+1" , 0x071549 }, - { (char*) "Etc/GMT+10" , 0x0715C9 }, - { (char*) "Etc/GMT+11" , 0x07164A }, - { (char*) "Etc/GMT+12" , 0x0716CB }, - { (char*) "Etc/GMT+2" , 0x07174C }, - { (char*) "Etc/GMT+3" , 0x0717CC }, - { (char*) "Etc/GMT+4" , 0x07184C }, - { (char*) "Etc/GMT+5" , 0x0718CC }, - { (char*) "Etc/GMT+6" , 0x07194C }, - { (char*) "Etc/GMT+7" , 0x0719CC }, - { (char*) "Etc/GMT+8" , 0x071A4C }, - { (char*) "Etc/GMT+9" , 0x071ACC }, - { (char*) "Etc/GMT-0" , 0x071B4C }, - { (char*) "Etc/GMT-1" , 0x071BCA }, - { (char*) "Etc/GMT-10" , 0x071C4B }, - { (char*) "Etc/GMT-11" , 0x071CCD }, - { (char*) "Etc/GMT-12" , 0x071D4F }, - { (char*) "Etc/GMT-13" , 0x071DD1 }, - { (char*) "Etc/GMT-14" , 0x071E53 }, - { (char*) "Etc/GMT-2" , 0x071ED5 }, - { (char*) "Etc/GMT-3" , 0x071F56 }, - { (char*) "Etc/GMT-4" , 0x071FD7 }, - { (char*) "Etc/GMT-5" , 0x072058 }, - { (char*) "Etc/GMT-6" , 0x0720D9 }, - { (char*) "Etc/GMT-7" , 0x07215A }, - { (char*) "Etc/GMT-8" , 0x0721DB }, - { (char*) "Etc/GMT-9" , 0x07225C }, - { (char*) "Etc/GMT0" , 0x0722DD }, - { (char*) "Etc/Greenwich" , 0x07235B }, - { (char*) "Etc/UCT" , 0x0723D9 }, - { (char*) "Etc/Universal" , 0x072457 }, - { (char*) "Etc/UTC" , 0x0724D5 }, - { (char*) "Etc/Zulu" , 0x072553 }, - { (char*) "Europe/Amsterdam" , 0x0725D1 }, - { (char*) "Europe/Andorra" , 0x07313B }, - { (char*) "Europe/Astrakhan" , 0x073815 }, - { (char*) "Europe/Athens" , 0x073CB2 }, - { (char*) "Europe/Belfast" , 0x074594 }, - { (char*) "Europe/Belgrade" , 0x0753F0 }, - { (char*) "Europe/Berlin" , 0x075B7C }, - { (char*) "Europe/Bratislava" , 0x076491 }, - { (char*) "Europe/Brussels" , 0x076D9A }, - { (char*) "Europe/Bucharest" , 0x07791B }, - { (char*) "Europe/Budapest" , 0x0781AF }, - { (char*) "Europe/Busingen" , 0x078AFB }, - { (char*) "Europe/Chisinau" , 0x079284 }, - { (char*) "Europe/Copenhagen" , 0x079BE6 }, - { (char*) "Europe/Dublin" , 0x07A44B }, - { (char*) "Europe/Gibraltar" , 0x07B1FB }, - { (char*) "Europe/Guernsey" , 0x07BE03 }, - { (char*) "Europe/Helsinki" , 0x07CCA3 }, - { (char*) "Europe/Isle_of_Man" , 0x07D41B }, - { (char*) "Europe/Istanbul" , 0x07E267 }, - { (char*) "Europe/Jersey" , 0x07EA00 }, - { (char*) "Europe/Kaliningrad" , 0x07F8A0 }, - { (char*) "Europe/Kiev" , 0x07FE95 }, - { (char*) "Europe/Kirov" , 0x0806E9 }, - { (char*) "Europe/Kyiv" , 0x080BA4 }, - { (char*) "Europe/Lisbon" , 0x081407 }, - { (char*) "Europe/Ljubljana" , 0x0821ED }, - { (char*) "Europe/London" , 0x082979 }, - { (char*) "Europe/Luxembourg" , 0x0837D5 }, - { (char*) "Europe/Madrid" , 0x084363 }, - { (char*) "Europe/Malta" , 0x084DB5 }, - { (char*) "Europe/Mariehamn" , 0x0857FD }, - { (char*) "Europe/Minsk" , 0x085F75 }, - { (char*) "Europe/Monaco" , 0x08649C }, - { (char*) "Europe/Moscow" , 0x087028 }, - { (char*) "Europe/Nicosia" , 0x087647 }, - { (char*) "Europe/Oslo" , 0x087E25 }, - { (char*) "Europe/Paris" , 0x0886E5 }, - { (char*) "Europe/Podgorica" , 0x089283 }, - { (char*) "Europe/Prague" , 0x089A0F }, - { (char*) "Europe/Riga" , 0x08A318 }, - { (char*) "Europe/Rome" , 0x08ABBA }, - { (char*) "Europe/Samara" , 0x08B617 }, - { (char*) "Europe/San_Marino" , 0x08BAED }, - { (char*) "Europe/Sarajevo" , 0x08C54A }, - { (char*) "Europe/Saratov" , 0x08CCD6 }, - { (char*) "Europe/Simferopol" , 0x08D183 }, - { (char*) "Europe/Skopje" , 0x08D752 }, - { (char*) "Europe/Sofia" , 0x08DEDE }, - { (char*) "Europe/Stockholm" , 0x08E707 }, - { (char*) "Europe/Tallinn" , 0x08EE88 }, - { (char*) "Europe/Tirane" , 0x08F6F8 }, - { (char*) "Europe/Tiraspol" , 0x08FF28 }, - { (char*) "Europe/Ulyanovsk" , 0x09088A }, - { (char*) "Europe/Uzhgorod" , 0x090D8D }, - { (char*) "Europe/Vaduz" , 0x0915E1 }, - { (char*) "Europe/Vatican" , 0x091D4D }, - { (char*) "Europe/Vienna" , 0x0927AA }, - { (char*) "Europe/Vilnius" , 0x09304E }, - { (char*) "Europe/Volgograd" , 0x0938CC }, - { (char*) "Europe/Warsaw" , 0x093D93 }, - { (char*) "Europe/Zagreb" , 0x0947FD }, - { (char*) "Europe/Zaporozhye" , 0x094F89 }, - { (char*) "Europe/Zurich" , 0x0957DD }, - { (char*) "Factory" , 0x095F5E }, - { (char*) "GB" , 0x095FDE }, - { (char*) "GB-Eire" , 0x096E3A }, - { (char*) "GMT" , 0x097C96 }, - { (char*) "GMT+0" , 0x097D14 }, - { (char*) "GMT-0" , 0x097D92 }, - { (char*) "GMT0" , 0x097E10 }, - { (char*) "Greenwich" , 0x097E8E }, - { (char*) "Hongkong" , 0x097F0C }, - { (char*) "HST" , 0x0983E9 }, - { (char*) "Iceland" , 0x09853E }, - { (char*) "Indian/Antananarivo" , 0x0985DE }, - { (char*) "Indian/Chagos" , 0x0986C5 }, - { (char*) "Indian/Christmas" , 0x09878A }, - { (char*) "Indian/Cocos" , 0x09882D }, - { (char*) "Indian/Comoro" , 0x0988D9 }, - { (char*) "Indian/Kerguelen" , 0x09897A }, - { (char*) "Indian/Mahe" , 0x098A1D }, - { (char*) "Indian/Maldives" , 0x098AC0 }, - { (char*) "Indian/Mauritius" , 0x098B85 }, - { (char*) "Indian/Mayotte" , 0x098C74 }, - { (char*) "Indian/Reunion" , 0x098D15 }, - { (char*) "Iran" , 0x098DB8 }, - { (char*) "Israel" , 0x0992A4 }, - { (char*) "Jamaica" , 0x099C04 }, - { (char*) "Japan" , 0x099DF2 }, - { (char*) "Kwajalein" , 0x099F33 }, - { (char*) "Libya" , 0x09A06D }, - { (char*) "MET" , 0x09A2EA }, - { (char*) "Mexico/BajaNorte" , 0x09AE6B }, - { (char*) "Mexico/BajaSur" , 0x09B811 }, - { (char*) "Mexico/General" , 0x09BC41 }, - { (char*) "MST" , 0x09C113 }, - { (char*) "MST7MDT" , 0x09C287 }, - { (char*) "Navajo" , 0x09CC2F }, - { (char*) "NZ" , 0x09D5D7 }, - { (char*) "NZ-CHAT" , 0x09DF68 }, - { (char*) "Pacific/Apia" , 0x09E77A }, - { (char*) "Pacific/Auckland" , 0x09E9DC }, - { (char*) "Pacific/Bougainville" , 0x09F380 }, - { (char*) "Pacific/Chatham" , 0x09F496 }, - { (char*) "Pacific/Chuuk" , 0x09FCB7 }, - { (char*) "Pacific/Easter" , 0x09FDD1 }, - { (char*) "Pacific/Efate" , 0x0A0695 }, - { (char*) "Pacific/Enderbury" , 0x0A08AD }, - { (char*) "Pacific/Fakaofo" , 0x0A0995 }, - { (char*) "Pacific/Fiji" , 0x0A0A5B }, - { (char*) "Pacific/Funafuti" , 0x0A0C9B }, - { (char*) "Pacific/Galapagos" , 0x0A0D3F }, - { (char*) "Pacific/Gambier" , 0x0A0E3C }, - { (char*) "Pacific/Guadalcanal" , 0x0A0EED }, - { (char*) "Pacific/Guam" , 0x0A0F91 }, - { (char*) "Pacific/Honolulu" , 0x0A118B }, - { (char*) "Pacific/Johnston" , 0x0A12E6 }, - { (char*) "Pacific/Kanton" , 0x0A143B }, - { (char*) "Pacific/Kiritimati" , 0x0A1532 }, - { (char*) "Pacific/Kosrae" , 0x0A162A }, - { (char*) "Pacific/Kwajalein" , 0x0A178D }, - { (char*) "Pacific/Majuro" , 0x0A18D0 }, - { (char*) "Pacific/Marquesas" , 0x0A1A1C }, - { (char*) "Pacific/Midway" , 0x0A1AD8 }, - { (char*) "Pacific/Nauru" , 0x0A1BCB }, - { (char*) "Pacific/Niue" , 0x0A1CC5 }, - { (char*) "Pacific/Norfolk" , 0x0A1D8E }, - { (char*) "Pacific/Noumea" , 0x0A20FC }, - { (char*) "Pacific/Pago_Pago" , 0x0A222A }, - { (char*) "Pacific/Palau" , 0x0A22E5 }, - { (char*) "Pacific/Pitcairn" , 0x0A2397 }, - { (char*) "Pacific/Pohnpei" , 0x0A245F }, - { (char*) "Pacific/Ponape" , 0x0A259A }, - { (char*) "Pacific/Port_Moresby" , 0x0A263E }, - { (char*) "Pacific/Rarotonga" , 0x0A270E }, - { (char*) "Pacific/Saipan" , 0x0A2967 }, - { (char*) "Pacific/Samoa" , 0x0A2B53 }, - { (char*) "Pacific/Tahiti" , 0x0A2C0E }, - { (char*) "Pacific/Tarawa" , 0x0A2CC0 }, - { (char*) "Pacific/Tongatapu" , 0x0A2D73 }, - { (char*) "Pacific/Truk" , 0x0A2EE5 }, - { (char*) "Pacific/Wake" , 0x0A2F9D }, - { (char*) "Pacific/Wallis" , 0x0A304C }, - { (char*) "Pacific/Yap" , 0x0A30F0 }, - { (char*) "Poland" , 0x0A31A8 }, - { (char*) "Portugal" , 0x0A3C12 }, - { (char*) "PRC" , 0x0A49E5 }, - { (char*) "PST8PDT" , 0x0A4C22 }, - { (char*) "ROC" , 0x0A5752 }, - { (char*) "ROK" , 0x0A5A57 }, - { (char*) "Singapore" , 0x0A5CCC }, - { (char*) "Turkey" , 0x0A5E69 }, - { (char*) "UCT" , 0x0A6602 }, - { (char*) "Universal" , 0x0A6680 }, - { (char*) "US/Alaska" , 0x0A66FE }, - { (char*) "US/Aleutian" , 0x0A704D }, - { (char*) "US/Arizona" , 0x0A798D }, - { (char*) "US/Central" , 0x0A7B01 }, - { (char*) "US/East-Indiana" , 0x0A8915 }, - { (char*) "US/Eastern" , 0x0A8FB3 }, - { (char*) "US/Hawaii" , 0x0A9D9F }, - { (char*) "US/Indiana-Starke" , 0x0A9EF4 }, - { (char*) "US/Michigan" , 0x0AA88C }, - { (char*) "US/Mountain" , 0x0AB14E }, - { (char*) "US/Pacific" , 0x0ABAF6 }, - { (char*) "US/Samoa" , 0x0AC626 }, - { (char*) "UTC" , 0x0AC6E1 }, - { (char*) "W-SU" , 0x0AC75F }, - { (char*) "WET" , 0x0ACD6A }, - { (char*) "Zulu" , 0x0ADB3D }, + { (char*) "America/Atikokan" , 0x00B2F7 }, + { (char*) "America/Atka" , 0x00B474 }, + { (char*) "America/Bahia" , 0x00BDB4 }, + { (char*) "America/Bahia_Banderas" , 0x00C1B7 }, + { (char*) "America/Barbados" , 0x00C620 }, + { (char*) "America/Belem" , 0x00C7E0 }, + { (char*) "America/Belize" , 0x00CA30 }, + { (char*) "America/Blanc-Sablon" , 0x00D08A }, + { (char*) "America/Boa_Vista" , 0x00D1DC }, + { (char*) "America/Bogota" , 0x00D459 }, + { (char*) "America/Boise" , 0x00D54D }, + { (char*) "America/Buenos_Aires" , 0x00DEE3 }, + { (char*) "America/Cambridge_Bay" , 0x00E315 }, + { (char*) "America/Campo_Grande" , 0x00EC03 }, + { (char*) "America/Cancun" , 0x00F1B7 }, + { (char*) "America/Caracas" , 0x00F52F }, + { (char*) "America/Catamarca" , 0x00F635 }, + { (char*) "America/Cayenne" , 0x00FA67 }, + { (char*) "America/Cayman" , 0x00FB2B }, + { (char*) "America/Chicago" , 0x00FBED }, + { (char*) "America/Chihuahua" , 0x010A15 }, + { (char*) "America/Ciudad_Juarez" , 0x010E85 }, + { (char*) "America/Coral_Harbour" , 0x0114AF }, + { (char*) "America/Cordoba" , 0x011571 }, + { (char*) "America/Costa_Rica" , 0x0119A3 }, + { (char*) "America/Creston" , 0x011AEB }, + { (char*) "America/Cuiaba" , 0x011BD9 }, + { (char*) "America/Curacao" , 0x01216A }, + { (char*) "America/Danmarkshavn" , 0x012230 }, + { (char*) "America/Dawson" , 0x012510 }, + { (char*) "America/Dawson_Creek" , 0x012B7C }, + { (char*) "America/Denver" , 0x012FC2 }, + { (char*) "America/Detroit" , 0x01397F }, + { (char*) "America/Dominica" , 0x01425A }, + { (char*) "America/Edmonton" , 0x0142FA }, + { (char*) "America/Eirunepe" , 0x014C44 }, + { (char*) "America/El_Salvador" , 0x014EE1 }, + { (char*) "America/Ensenada" , 0x014FCD }, + { (char*) "America/Fort_Nelson" , 0x015973 }, + { (char*) "America/Fort_Wayne" , 0x016253 }, + { (char*) "America/Fortaleza" , 0x0168F1 }, + { (char*) "America/Glace_Bay" , 0x016BE1 }, + { (char*) "America/Godthab" , 0x017498 }, + { (char*) "America/Goose_Bay" , 0x017C05 }, + { (char*) "America/Grand_Turk" , 0x0188BB }, + { (char*) "America/Grenada" , 0x018FF1 }, + { (char*) "America/Guadeloupe" , 0x019091 }, + { (char*) "America/Guatemala" , 0x019131 }, + { (char*) "America/Guayaquil" , 0x019255 }, + { (char*) "America/Guyana" , 0x01935B }, + { (char*) "America/Halifax" , 0x01945F }, + { (char*) "America/Havana" , 0x01A1E9 }, + { (char*) "America/Hermosillo" , 0x01AB65 }, + { (char*) "America/Indiana/Indianapolis" , 0x01ACFB }, + { (char*) "America/Indiana/Knox" , 0x01B3B2 }, + { (char*) "America/Indiana/Marengo" , 0x01BD5F }, + { (char*) "America/Indiana/Petersburg" , 0x01C44C }, + { (char*) "America/Indiana/Tell_City" , 0x01CBEB }, + { (char*) "America/Indiana/Vevay" , 0x01D2AF }, + { (char*) "America/Indiana/Vincennes" , 0x01D86B }, + { (char*) "America/Indiana/Winamac" , 0x01DF41 }, + { (char*) "America/Indianapolis" , 0x01E665 }, + { (char*) "America/Inuvik" , 0x01ED03 }, + { (char*) "America/Iqaluit" , 0x01F53D }, + { (char*) "America/Jamaica" , 0x01FDFC }, + { (char*) "America/Jujuy" , 0x01FFEA }, + { (char*) "America/Juneau" , 0x020400 }, + { (char*) "America/Kentucky/Louisville" , 0x020D51 }, + { (char*) "America/Kentucky/Monticello" , 0x02185F }, + { (char*) "America/Knox_IN" , 0x0221BF }, + { (char*) "America/Kralendijk" , 0x022B57 }, + { (char*) "America/La_Paz" , 0x022C59 }, + { (char*) "America/Lima" , 0x022D3F }, + { (char*) "America/Los_Angeles" , 0x022ED3 }, + { (char*) "America/Louisville" , 0x023A0A }, + { (char*) "America/Lower_Princes" , 0x0244FA }, + { (char*) "America/Maceio" , 0x0245FC }, + { (char*) "America/Managua" , 0x0248F2 }, + { (char*) "America/Manaus" , 0x024AAC }, + { (char*) "America/Marigot" , 0x024D15 }, + { (char*) "America/Martinique" , 0x024E17 }, + { (char*) "America/Matamoros" , 0x024F0B }, + { (char*) "America/Mazatlan" , 0x0254CD }, + { (char*) "America/Mendoza" , 0x02592F }, + { (char*) "America/Menominee" , 0x025D61 }, + { (char*) "America/Merida" , 0x02666E }, + { (char*) "America/Metlakatla" , 0x026A77 }, + { (char*) "America/Mexico_City" , 0x027029 }, + { (char*) "America/Miquelon" , 0x027509 }, + { (char*) "America/Moncton" , 0x027B89 }, + { (char*) "America/Monterrey" , 0x0287FF }, + { (char*) "America/Montevideo" , 0x028C9B }, + { (char*) "America/Montreal" , 0x02927F }, + { (char*) "America/Montserrat" , 0x02A031 }, + { (char*) "America/Nassau" , 0x02A0D1 }, + { (char*) "America/New_York" , 0x02AA31 }, + { (char*) "America/Nipigon" , 0x02B831 }, + { (char*) "America/Nome" , 0x02C5E3 }, + { (char*) "America/Noronha" , 0x02CF3B }, + { (char*) "America/North_Dakota/Beulah" , 0x02D215 }, + { (char*) "America/North_Dakota/Center" , 0x02DB92 }, + { (char*) "America/North_Dakota/New_Salem" , 0x02E50F }, + { (char*) "America/Nuuk" , 0x02EE92 }, + { (char*) "America/Ojinaga" , 0x02F610 }, + { (char*) "America/Panama" , 0x02FC2C }, + { (char*) "America/Pangnirtung" , 0x02FCEE }, + { (char*) "America/Paramaribo" , 0x030594 }, + { (char*) "America/Phoenix" , 0x030698 }, + { (char*) "America/Port-au-Prince" , 0x030824 }, + { (char*) "America/Port_of_Spain" , 0x030DCA }, + { (char*) "America/Porto_Acre" , 0x030E6A }, + { (char*) "America/Porto_Velho" , 0x0310DC }, + { (char*) "America/Puerto_Rico" , 0x031322 }, + { (char*) "America/Punta_Arenas" , 0x031424 }, + { (char*) "America/Rainy_River" , 0x031BB2 }, + { (char*) "America/Rankin_Inlet" , 0x0326F2 }, + { (char*) "America/Recife" , 0x032F26 }, + { (char*) "America/Regina" , 0x0331FA }, + { (char*) "America/Resolute" , 0x0335EF }, + { (char*) "America/Rio_Branco" , 0x033E24 }, + { (char*) "America/Rosario" , 0x03409A }, + { (char*) "America/Santa_Isabel" , 0x0344CC }, + { (char*) "America/Santarem" , 0x034E72 }, + { (char*) "America/Santiago" , 0x0350D5 }, + { (char*) "America/Santo_Domingo" , 0x035AC1 }, + { (char*) "America/Sao_Paulo" , 0x035C97 }, + { (char*) "America/Scoresbysund" , 0x03626F }, + { (char*) "America/Shiprock" , 0x036A27 }, + { (char*) "America/Sitka" , 0x0373CF }, + { (char*) "America/St_Barthelemy" , 0x037D07 }, + { (char*) "America/St_Johns" , 0x037E09 }, + { (char*) "America/St_Kitts" , 0x038C77 }, + { (char*) "America/St_Lucia" , 0x038D17 }, + { (char*) "America/St_Thomas" , 0x038DD9 }, + { (char*) "America/St_Vincent" , 0x038E79 }, + { (char*) "America/Swift_Current" , 0x038F3B }, + { (char*) "America/Tegucigalpa" , 0x039189 }, + { (char*) "America/Thule" , 0x039291 }, + { (char*) "America/Thunder_Bay" , 0x039889 }, + { (char*) "America/Tijuana" , 0x03A63B }, + { (char*) "America/Toronto" , 0x03AFF0 }, + { (char*) "America/Tortola" , 0x03BDC0 }, + { (char*) "America/Vancouver" , 0x03BE60 }, + { (char*) "America/Virgin" , 0x03C9D1 }, + { (char*) "America/Whitehorse" , 0x03CAD3 }, + { (char*) "America/Winnipeg" , 0x03D13F }, + { (char*) "America/Yakutat" , 0x03DC9C }, + { (char*) "America/Yellowknife" , 0x03E5B9 }, + { (char*) "Antarctica/Casey" , 0x03EEE1 }, + { (char*) "Antarctica/Davis" , 0x03F099 }, + { (char*) "Antarctica/DumontDUrville" , 0x03F1C5 }, + { (char*) "Antarctica/Macquarie" , 0x03F295 }, + { (char*) "Antarctica/Mawson" , 0x03FB85 }, + { (char*) "Antarctica/McMurdo" , 0x03FC50 }, + { (char*) "Antarctica/Palmer" , 0x04044B }, + { (char*) "Antarctica/Rothera" , 0x0409D9 }, + { (char*) "Antarctica/South_Pole" , 0x040A82 }, + { (char*) "Antarctica/Syowa" , 0x041413 }, + { (char*) "Antarctica/Troll" , 0x0414BB }, + { (char*) "Antarctica/Vostok" , 0x041948 }, + { (char*) "Arctic/Longyearbyen" , 0x041A2F }, + { (char*) "Asia/Aden" , 0x042335 }, + { (char*) "Asia/Almaty" , 0x0423D8 }, + { (char*) "Asia/Amman" , 0x0427CD }, + { (char*) "Asia/Anadyr" , 0x042D72 }, + { (char*) "Asia/Aqtau" , 0x043227 }, + { (char*) "Asia/Aqtobe" , 0x043611 }, + { (char*) "Asia/Ashgabat" , 0x043A0F }, + { (char*) "Asia/Ashkhabad" , 0x043C78 }, + { (char*) "Asia/Atyrau" , 0x043EE1 }, + { (char*) "Asia/Baghdad" , 0x0442D3 }, + { (char*) "Asia/Bahrain" , 0x0446A8 }, + { (char*) "Asia/Baku" , 0x044793 }, + { (char*) "Asia/Bangkok" , 0x044C5C }, + { (char*) "Asia/Barnaul" , 0x044D21 }, + { (char*) "Asia/Beirut" , 0x0451F2 }, + { (char*) "Asia/Bishkek" , 0x045A68 }, + { (char*) "Asia/Brunei" , 0x045E3D }, + { (char*) "Asia/Calcutta" , 0x045F06 }, + { (char*) "Asia/Chita" , 0x04602F }, + { (char*) "Asia/Choibalsan" , 0x046506 }, + { (char*) "Asia/Chongqing" , 0x04687F }, + { (char*) "Asia/Chungking" , 0x046ABC }, + { (char*) "Asia/Colombo" , 0x046CF9 }, + { (char*) "Asia/Dacca" , 0x046E6B }, + { (char*) "Asia/Damascus" , 0x046FBA }, + { (char*) "Asia/Dhaka" , 0x047717 }, + { (char*) "Asia/Dili" , 0x047866 }, + { (char*) "Asia/Dubai" , 0x047973 }, + { (char*) "Asia/Dushanbe" , 0x047A16 }, + { (char*) "Asia/Famagusta" , 0x047C63 }, + { (char*) "Asia/Gaza" , 0x04846A }, + { (char*) "Asia/Harbin" , 0x049384 }, + { (char*) "Asia/Hebron" , 0x0495C1 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x04A4F6 }, + { (char*) "Asia/Hong_Kong" , 0x04A653 }, + { (char*) "Asia/Hovd" , 0x04AB30 }, + { (char*) "Asia/Irkutsk" , 0x04AEBF }, + { (char*) "Asia/Istanbul" , 0x04B3B2 }, + { (char*) "Asia/Jakarta" , 0x04BB4B }, + { (char*) "Asia/Jayapura" , 0x04BCE3 }, + { (char*) "Asia/Jerusalem" , 0x04BE02 }, + { (char*) "Asia/Kabul" , 0x04C762 }, + { (char*) "Asia/Kamchatka" , 0x04C830 }, + { (char*) "Asia/Karachi" , 0x04CCCE }, + { (char*) "Asia/Kashgar" , 0x04CE55 }, + { (char*) "Asia/Kathmandu" , 0x04CEF8 }, + { (char*) "Asia/Katmandu" , 0x04CFCA }, + { (char*) "Asia/Khandyga" , 0x04D09C }, + { (char*) "Asia/Kolkata" , 0x04D5AF }, + { (char*) "Asia/Krasnoyarsk" , 0x04D6D8 }, + { (char*) "Asia/Kuala_Lumpur" , 0x04DBA6 }, + { (char*) "Asia/Kuching" , 0x04DD57 }, + { (char*) "Asia/Kuwait" , 0x04DF46 }, + { (char*) "Asia/Macao" , 0x04DFE9 }, + { (char*) "Asia/Macau" , 0x04E4C0 }, + { (char*) "Asia/Magadan" , 0x04E997 }, + { (char*) "Asia/Makassar" , 0x04EE6B }, + { (char*) "Asia/Manila" , 0x04EFBE }, + { (char*) "Asia/Muscat" , 0x04F170 }, + { (char*) "Asia/Nicosia" , 0x04F213 }, + { (char*) "Asia/Novokuznetsk" , 0x04F9FF }, + { (char*) "Asia/Novosibirsk" , 0x04FE9B }, + { (char*) "Asia/Omsk" , 0x050372 }, + { (char*) "Asia/Oral" , 0x050834 }, + { (char*) "Asia/Phnom_Penh" , 0x050C2E }, + { (char*) "Asia/Pontianak" , 0x050D53 }, + { (char*) "Asia/Pyongyang" , 0x050ED6 }, + { (char*) "Asia/Qatar" , 0x050FCF }, + { (char*) "Asia/Qostanay" , 0x051094 }, + { (char*) "Asia/Qyzylorda" , 0x0514BB }, + { (char*) "Asia/Rangoon" , 0x0518D7 }, + { (char*) "Asia/Riyadh" , 0x0519E1 }, + { (char*) "Asia/Saigon" , 0x051A84 }, + { (char*) "Asia/Sakhalin" , 0x051BE1 }, + { (char*) "Asia/Samarkand" , 0x0520A9 }, + { (char*) "Asia/Seoul" , 0x0522F9 }, + { (char*) "Asia/Shanghai" , 0x05256E }, + { (char*) "Asia/Singapore" , 0x0527B7 }, + { (char*) "Asia/Srednekolymsk" , 0x052954 }, + { (char*) "Asia/Taipei" , 0x052E28 }, + { (char*) "Asia/Tashkent" , 0x05312D }, + { (char*) "Asia/Tbilisi" , 0x05338B }, + { (char*) "Asia/Tehran" , 0x053794 }, + { (char*) "Asia/Tel_Aviv" , 0x053C80 }, + { (char*) "Asia/Thimbu" , 0x0545E0 }, + { (char*) "Asia/Thimphu" , 0x0546A9 }, + { (char*) "Asia/Tokyo" , 0x054772 }, + { (char*) "Asia/Tomsk" , 0x0548B3 }, + { (char*) "Asia/Ujung_Pandang" , 0x054D84 }, + { (char*) "Asia/Ulaanbaatar" , 0x054E8E }, + { (char*) "Asia/Ulan_Bator" , 0x055217 }, + { (char*) "Asia/Urumqi" , 0x055590 }, + { (char*) "Asia/Ust-Nera" , 0x055640 }, + { (char*) "Asia/Vientiane" , 0x055B36 }, + { (char*) "Asia/Vladivostok" , 0x055C77 }, + { (char*) "Asia/Yakutsk" , 0x056140 }, + { (char*) "Asia/Yangon" , 0x056608 }, + { (char*) "Asia/Yekaterinburg" , 0x056712 }, + { (char*) "Asia/Yerevan" , 0x056BF9 }, + { (char*) "Atlantic/Azores" , 0x057076 }, + { (char*) "Atlantic/Bermuda" , 0x057DFA }, + { (char*) "Atlantic/Canary" , 0x058762 }, + { (char*) "Atlantic/Cape_Verde" , 0x058EE5 }, + { (char*) "Atlantic/Faeroe" , 0x058FF1 }, + { (char*) "Atlantic/Faroe" , 0x059714 }, + { (char*) "Atlantic/Jan_Mayen" , 0x059E37 }, + { (char*) "Atlantic/Madeira" , 0x05A73D }, + { (char*) "Atlantic/Reykjavik" , 0x05B489 }, + { (char*) "Atlantic/South_Georgia" , 0x05B91F }, + { (char*) "Atlantic/St_Helena" , 0x05B9C1 }, + { (char*) "Atlantic/Stanley" , 0x05BA83 }, + { (char*) "Australia/ACT" , 0x05BF3F }, + { (char*) "Australia/Adelaide" , 0x05C7D9 }, + { (char*) "Australia/Brisbane" , 0x05D094 }, + { (char*) "Australia/Broken_Hill" , 0x05D25A }, + { (char*) "Australia/Canberra" , 0x05DB37 }, + { (char*) "Australia/Currie" , 0x05E3D1 }, + { (char*) "Australia/Darwin" , 0x05ED13 }, + { (char*) "Australia/Eucla" , 0x05EE76 }, + { (char*) "Australia/Hobart" , 0x05F063 }, + { (char*) "Australia/LHI" , 0x05F9AD }, + { (char*) "Australia/Lindeman" , 0x0600EF }, + { (char*) "Australia/Lord_Howe" , 0x0602F5 }, + { (char*) "Australia/Melbourne" , 0x060A47 }, + { (char*) "Australia/North" , 0x0612E9 }, + { (char*) "Australia/NSW" , 0x06143A }, + { (char*) "Australia/Perth" , 0x061CD4 }, + { (char*) "Australia/Queensland" , 0x061EBC }, + { (char*) "Australia/South" , 0x06206B }, + { (char*) "Australia/Sydney" , 0x062917 }, + { (char*) "Australia/Tasmania" , 0x0631CD }, + { (char*) "Australia/Victoria" , 0x063B0F }, + { (char*) "Australia/West" , 0x0643A9 }, + { (char*) "Australia/Yancowinna" , 0x064573 }, + { (char*) "Brazil/Acre" , 0x064E34 }, + { (char*) "Brazil/DeNoronha" , 0x0650A6 }, + { (char*) "Brazil/East" , 0x065370 }, + { (char*) "Brazil/West" , 0x065912 }, + { (char*) "Canada/Atlantic" , 0x065B6C }, + { (char*) "Canada/Central" , 0x0668D8 }, + { (char*) "Canada/Eastern" , 0x067418 }, + { (char*) "Canada/Mountain" , 0x0681CA }, + { (char*) "Canada/Newfoundland" , 0x068AF2 }, + { (char*) "Canada/Pacific" , 0x069945 }, + { (char*) "Canada/Saskatchewan" , 0x06A49D }, + { (char*) "Canada/Yukon" , 0x06A87D }, + { (char*) "CET" , 0x06AED7 }, + { (char*) "Chile/Continental" , 0x06BA58 }, + { (char*) "Chile/EasterIsland" , 0x06C437 }, + { (char*) "CST6CDT" , 0x06CCEE }, + { (char*) "Cuba" , 0x06DB02 }, + { (char*) "EET" , 0x06E47E }, + { (char*) "Egypt" , 0x06ED60 }, + { (char*) "Eire" , 0x06F6CB }, + { (char*) "EST" , 0x07047B }, + { (char*) "EST5EDT" , 0x07053D }, + { (char*) "Etc/GMT" , 0x071329 }, + { (char*) "Etc/GMT+0" , 0x0713A7 }, + { (char*) "Etc/GMT+1" , 0x071425 }, + { (char*) "Etc/GMT+10" , 0x0714A5 }, + { (char*) "Etc/GMT+11" , 0x071526 }, + { (char*) "Etc/GMT+12" , 0x0715A7 }, + { (char*) "Etc/GMT+2" , 0x071628 }, + { (char*) "Etc/GMT+3" , 0x0716A8 }, + { (char*) "Etc/GMT+4" , 0x071728 }, + { (char*) "Etc/GMT+5" , 0x0717A8 }, + { (char*) "Etc/GMT+6" , 0x071828 }, + { (char*) "Etc/GMT+7" , 0x0718A8 }, + { (char*) "Etc/GMT+8" , 0x071928 }, + { (char*) "Etc/GMT+9" , 0x0719A8 }, + { (char*) "Etc/GMT-0" , 0x071A28 }, + { (char*) "Etc/GMT-1" , 0x071AA6 }, + { (char*) "Etc/GMT-10" , 0x071B27 }, + { (char*) "Etc/GMT-11" , 0x071BA9 }, + { (char*) "Etc/GMT-12" , 0x071C2B }, + { (char*) "Etc/GMT-13" , 0x071CAD }, + { (char*) "Etc/GMT-14" , 0x071D2F }, + { (char*) "Etc/GMT-2" , 0x071DB1 }, + { (char*) "Etc/GMT-3" , 0x071E32 }, + { (char*) "Etc/GMT-4" , 0x071EB3 }, + { (char*) "Etc/GMT-5" , 0x071F34 }, + { (char*) "Etc/GMT-6" , 0x071FB5 }, + { (char*) "Etc/GMT-7" , 0x072036 }, + { (char*) "Etc/GMT-8" , 0x0720B7 }, + { (char*) "Etc/GMT-9" , 0x072138 }, + { (char*) "Etc/GMT0" , 0x0721B9 }, + { (char*) "Etc/Greenwich" , 0x072237 }, + { (char*) "Etc/UCT" , 0x0722B5 }, + { (char*) "Etc/Universal" , 0x072333 }, + { (char*) "Etc/UTC" , 0x0723B1 }, + { (char*) "Etc/Zulu" , 0x07242F }, + { (char*) "Europe/Amsterdam" , 0x0724AD }, + { (char*) "Europe/Andorra" , 0x073017 }, + { (char*) "Europe/Astrakhan" , 0x0736F1 }, + { (char*) "Europe/Athens" , 0x073B8E }, + { (char*) "Europe/Belfast" , 0x074470 }, + { (char*) "Europe/Belgrade" , 0x0752CC }, + { (char*) "Europe/Berlin" , 0x075A58 }, + { (char*) "Europe/Bratislava" , 0x07636D }, + { (char*) "Europe/Brussels" , 0x076C76 }, + { (char*) "Europe/Bucharest" , 0x0777F7 }, + { (char*) "Europe/Budapest" , 0x07808B }, + { (char*) "Europe/Busingen" , 0x0789D7 }, + { (char*) "Europe/Chisinau" , 0x079160 }, + { (char*) "Europe/Copenhagen" , 0x079AC2 }, + { (char*) "Europe/Dublin" , 0x07A327 }, + { (char*) "Europe/Gibraltar" , 0x07B0D7 }, + { (char*) "Europe/Guernsey" , 0x07BCDF }, + { (char*) "Europe/Helsinki" , 0x07CB7F }, + { (char*) "Europe/Isle_of_Man" , 0x07D2F7 }, + { (char*) "Europe/Istanbul" , 0x07E143 }, + { (char*) "Europe/Jersey" , 0x07E8DC }, + { (char*) "Europe/Kaliningrad" , 0x07F77C }, + { (char*) "Europe/Kiev" , 0x07FD71 }, + { (char*) "Europe/Kirov" , 0x0805C5 }, + { (char*) "Europe/Kyiv" , 0x080A80 }, + { (char*) "Europe/Lisbon" , 0x0812E3 }, + { (char*) "Europe/Ljubljana" , 0x0820C9 }, + { (char*) "Europe/London" , 0x082855 }, + { (char*) "Europe/Luxembourg" , 0x0836B1 }, + { (char*) "Europe/Madrid" , 0x08423F }, + { (char*) "Europe/Malta" , 0x084C91 }, + { (char*) "Europe/Mariehamn" , 0x0856D9 }, + { (char*) "Europe/Minsk" , 0x085E51 }, + { (char*) "Europe/Monaco" , 0x086378 }, + { (char*) "Europe/Moscow" , 0x086F04 }, + { (char*) "Europe/Nicosia" , 0x087523 }, + { (char*) "Europe/Oslo" , 0x087D01 }, + { (char*) "Europe/Paris" , 0x0885C1 }, + { (char*) "Europe/Podgorica" , 0x08915F }, + { (char*) "Europe/Prague" , 0x0898EB }, + { (char*) "Europe/Riga" , 0x08A1F4 }, + { (char*) "Europe/Rome" , 0x08AA96 }, + { (char*) "Europe/Samara" , 0x08B4F3 }, + { (char*) "Europe/San_Marino" , 0x08B9C9 }, + { (char*) "Europe/Sarajevo" , 0x08C426 }, + { (char*) "Europe/Saratov" , 0x08CBB2 }, + { (char*) "Europe/Simferopol" , 0x08D05F }, + { (char*) "Europe/Skopje" , 0x08D62E }, + { (char*) "Europe/Sofia" , 0x08DDBA }, + { (char*) "Europe/Stockholm" , 0x08E5E3 }, + { (char*) "Europe/Tallinn" , 0x08ED64 }, + { (char*) "Europe/Tirane" , 0x08F5D4 }, + { (char*) "Europe/Tiraspol" , 0x08FE04 }, + { (char*) "Europe/Ulyanovsk" , 0x090766 }, + { (char*) "Europe/Uzhgorod" , 0x090C69 }, + { (char*) "Europe/Vaduz" , 0x0914BD }, + { (char*) "Europe/Vatican" , 0x091C29 }, + { (char*) "Europe/Vienna" , 0x092686 }, + { (char*) "Europe/Vilnius" , 0x092F2A }, + { (char*) "Europe/Volgograd" , 0x0937A8 }, + { (char*) "Europe/Warsaw" , 0x093C6F }, + { (char*) "Europe/Zagreb" , 0x0946D9 }, + { (char*) "Europe/Zaporozhye" , 0x094E65 }, + { (char*) "Europe/Zurich" , 0x0956B9 }, + { (char*) "Factory" , 0x095E3A }, + { (char*) "GB" , 0x095EBA }, + { (char*) "GB-Eire" , 0x096D16 }, + { (char*) "GMT" , 0x097B72 }, + { (char*) "GMT+0" , 0x097BF0 }, + { (char*) "GMT-0" , 0x097C6E }, + { (char*) "GMT0" , 0x097CEC }, + { (char*) "Greenwich" , 0x097D6A }, + { (char*) "Hongkong" , 0x097DE8 }, + { (char*) "HST" , 0x0982C5 }, + { (char*) "Iceland" , 0x09841A }, + { (char*) "Indian/Antananarivo" , 0x0984BA }, + { (char*) "Indian/Chagos" , 0x0985A1 }, + { (char*) "Indian/Christmas" , 0x098666 }, + { (char*) "Indian/Cocos" , 0x098709 }, + { (char*) "Indian/Comoro" , 0x0987B5 }, + { (char*) "Indian/Kerguelen" , 0x098856 }, + { (char*) "Indian/Mahe" , 0x0988F9 }, + { (char*) "Indian/Maldives" , 0x09899C }, + { (char*) "Indian/Mauritius" , 0x098A61 }, + { (char*) "Indian/Mayotte" , 0x098B50 }, + { (char*) "Indian/Reunion" , 0x098BF1 }, + { (char*) "Iran" , 0x098C94 }, + { (char*) "Israel" , 0x099180 }, + { (char*) "Jamaica" , 0x099AE0 }, + { (char*) "Japan" , 0x099CCE }, + { (char*) "Kwajalein" , 0x099E0F }, + { (char*) "Libya" , 0x099F49 }, + { (char*) "MET" , 0x09A1C6 }, + { (char*) "Mexico/BajaNorte" , 0x09AD47 }, + { (char*) "Mexico/BajaSur" , 0x09B6ED }, + { (char*) "Mexico/General" , 0x09BB1D }, + { (char*) "MST" , 0x09BFEF }, + { (char*) "MST7MDT" , 0x09C163 }, + { (char*) "Navajo" , 0x09CB0B }, + { (char*) "NZ" , 0x09D4B3 }, + { (char*) "NZ-CHAT" , 0x09DE44 }, + { (char*) "Pacific/Apia" , 0x09E656 }, + { (char*) "Pacific/Auckland" , 0x09E8B8 }, + { (char*) "Pacific/Bougainville" , 0x09F25C }, + { (char*) "Pacific/Chatham" , 0x09F372 }, + { (char*) "Pacific/Chuuk" , 0x09FB93 }, + { (char*) "Pacific/Easter" , 0x09FCAD }, + { (char*) "Pacific/Efate" , 0x0A0571 }, + { (char*) "Pacific/Enderbury" , 0x0A0789 }, + { (char*) "Pacific/Fakaofo" , 0x0A0871 }, + { (char*) "Pacific/Fiji" , 0x0A0937 }, + { (char*) "Pacific/Funafuti" , 0x0A0B77 }, + { (char*) "Pacific/Galapagos" , 0x0A0C1B }, + { (char*) "Pacific/Gambier" , 0x0A0D18 }, + { (char*) "Pacific/Guadalcanal" , 0x0A0DC9 }, + { (char*) "Pacific/Guam" , 0x0A0E6D }, + { (char*) "Pacific/Honolulu" , 0x0A1067 }, + { (char*) "Pacific/Johnston" , 0x0A11C2 }, + { (char*) "Pacific/Kanton" , 0x0A1317 }, + { (char*) "Pacific/Kiritimati" , 0x0A140E }, + { (char*) "Pacific/Kosrae" , 0x0A1506 }, + { (char*) "Pacific/Kwajalein" , 0x0A1669 }, + { (char*) "Pacific/Majuro" , 0x0A17AC }, + { (char*) "Pacific/Marquesas" , 0x0A18F8 }, + { (char*) "Pacific/Midway" , 0x0A19B4 }, + { (char*) "Pacific/Nauru" , 0x0A1AA7 }, + { (char*) "Pacific/Niue" , 0x0A1BA1 }, + { (char*) "Pacific/Norfolk" , 0x0A1C6A }, + { (char*) "Pacific/Noumea" , 0x0A1FD8 }, + { (char*) "Pacific/Pago_Pago" , 0x0A2106 }, + { (char*) "Pacific/Palau" , 0x0A21C1 }, + { (char*) "Pacific/Pitcairn" , 0x0A2273 }, + { (char*) "Pacific/Pohnpei" , 0x0A233B }, + { (char*) "Pacific/Ponape" , 0x0A2476 }, + { (char*) "Pacific/Port_Moresby" , 0x0A251A }, + { (char*) "Pacific/Rarotonga" , 0x0A25EA }, + { (char*) "Pacific/Saipan" , 0x0A2843 }, + { (char*) "Pacific/Samoa" , 0x0A2A2F }, + { (char*) "Pacific/Tahiti" , 0x0A2AEA }, + { (char*) "Pacific/Tarawa" , 0x0A2B9C }, + { (char*) "Pacific/Tongatapu" , 0x0A2C4F }, + { (char*) "Pacific/Truk" , 0x0A2DC1 }, + { (char*) "Pacific/Wake" , 0x0A2E79 }, + { (char*) "Pacific/Wallis" , 0x0A2F28 }, + { (char*) "Pacific/Yap" , 0x0A2FCC }, + { (char*) "Poland" , 0x0A3084 }, + { (char*) "Portugal" , 0x0A3AEE }, + { (char*) "PRC" , 0x0A48C1 }, + { (char*) "PST8PDT" , 0x0A4AFE }, + { (char*) "ROC" , 0x0A562E }, + { (char*) "ROK" , 0x0A5933 }, + { (char*) "Singapore" , 0x0A5BA8 }, + { (char*) "Turkey" , 0x0A5D45 }, + { (char*) "UCT" , 0x0A64DE }, + { (char*) "Universal" , 0x0A655C }, + { (char*) "US/Alaska" , 0x0A65DA }, + { (char*) "US/Aleutian" , 0x0A6F29 }, + { (char*) "US/Arizona" , 0x0A7869 }, + { (char*) "US/Central" , 0x0A79DD }, + { (char*) "US/East-Indiana" , 0x0A87F1 }, + { (char*) "US/Eastern" , 0x0A8E8F }, + { (char*) "US/Hawaii" , 0x0A9C7B }, + { (char*) "US/Indiana-Starke" , 0x0A9DD0 }, + { (char*) "US/Michigan" , 0x0AA768 }, + { (char*) "US/Mountain" , 0x0AB02A }, + { (char*) "US/Pacific" , 0x0AB9D2 }, + { (char*) "US/Samoa" , 0x0AC502 }, + { (char*) "UTC" , 0x0AC5BD }, + { (char*) "W-SU" , 0x0AC63B }, + { (char*) "WET" , 0x0ACC46 }, + { (char*) "Zulu" , 0x0ADA19 }, }; -const unsigned char timelib_timezone_db_data_builtin[711611] = { +const unsigned char timelib_timezone_db_data_builtin[711319] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -27783,7 +27797,7 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { /* America/Asuncion */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0xB8, 0x17, 0xF5, 0x90, 0x05, 0x2B, 0xDA, 0x40, 0x07, 0xFC, 0xF0, 0xB0, 0x0A, 0xCF, 0x74, 0xC0, 0x0B, 0x97, 0xCA, 0xB0, 0x0C, 0xB1, 0xF9, 0xC0, 0x0D, 0x78, 0xFE, 0x30, 0x0E, 0x93, 0x2D, 0x40, 0x0F, 0x5A, 0x31, 0xB0, 0x10, 0x74, 0x60, 0xC0, 0x11, 0x64, 0x43, 0xB0, 0x12, 0x55, 0x94, 0x40, @@ -27809,106 +27823,82 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { 0x5A, 0xB7, 0x10, 0xB0, 0x5B, 0xB9, 0x84, 0xC0, 0x5C, 0x96, 0xF2, 0xB0, 0x5D, 0x99, 0x66, 0xC0, 0x5E, 0x76, 0xD4, 0xB0, 0x5F, 0x79, 0x48, 0xC0, 0x60, 0x5F, 0xF1, 0x30, 0x61, 0x59, 0x2A, 0xC0, 0x62, 0x3F, 0xD3, 0x30, 0x63, 0x39, 0x0C, 0xC0, 0x64, 0x1F, 0xB5, 0x30, 0x65, 0x18, 0xEE, 0xC0, -0x65, 0xFF, 0x97, 0x30, 0x67, 0x02, 0x0B, 0x40, 0x67, 0xDF, 0x79, 0x30, 0x68, 0xE1, 0xED, 0x40, -0x69, 0xBF, 0x5B, 0x30, 0x6A, 0xC1, 0xCF, 0x40, 0x6B, 0xA8, 0x77, 0xB0, 0x6C, 0xA1, 0xB1, 0x40, -0x6D, 0x88, 0x59, 0xB0, 0x6E, 0x81, 0x93, 0x40, 0x6F, 0x68, 0x3B, 0xB0, 0x70, 0x6A, 0xAF, 0xC0, -0x71, 0x48, 0x1D, 0xB0, 0x72, 0x4A, 0x91, 0xC0, 0x73, 0x27, 0xFF, 0xB0, 0x74, 0x2A, 0x73, 0xC0, -0x75, 0x11, 0x1C, 0x30, 0x76, 0x0A, 0x55, 0xC0, 0x76, 0xF0, 0xFE, 0x30, 0x77, 0xEA, 0x37, 0xC0, -0x78, 0xD0, 0xE0, 0x30, 0x79, 0xCA, 0x19, 0xC0, 0x7A, 0xB0, 0xC2, 0x30, 0x7B, 0xB3, 0x36, 0x40, -0x7C, 0x90, 0xA4, 0x30, 0x7D, 0x93, 0x18, 0x40, 0x7E, 0x70, 0x86, 0x30, 0x7F, 0x72, 0xFA, 0x40, -0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x65, 0xFF, 0x97, 0x30, 0x67, 0x02, 0x0B, 0x40, 0x67, 0x0D, 0xDA, 0xB0, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, -0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, -0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, -0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, -0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, -0x00, 0x2D, 0x30, 0x33, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, +0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, +0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, +0x33, 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, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, -0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x78, 0xFE, -0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5A, 0x31, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x43, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x46, 0xC8, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xFC, -0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x09, 0x2F, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x63, -0x30, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0xE8, -0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAE, 0x1B, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8F, 0x4F, -0x30, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x82, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x53, 0x07, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x34, 0x3B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x6E, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0xA2, -0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB9, 0x09, -0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x70, 0x0C, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x4F, 0xEE, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x36, 0x68, -0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0F, 0xB2, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, -0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xE1, 0xEB, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xC1, 0xCD, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xA1, 0xAF, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xB6, -0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x98, -0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x7A, -0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x1A, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x52, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x34, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, -0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, -0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, -0x30, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, -0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, -0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, -0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, -0x30, 0x00, 0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, -0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, -0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDF, 0x79, -0x30, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x5B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0xCF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x77, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0xB1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x59, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x81, 0x93, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x3B, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x48, 0x1D, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x4A, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x27, 0xFF, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x2A, 0x73, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x1C, -0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x0A, 0x55, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xFE, -0x30, 0x00, 0x00, 0x00, 0x00, 0x77, 0xEA, 0x37, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xE0, -0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xCA, 0x19, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xC2, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB3, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x90, 0xA4, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x93, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x70, 0x86, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xFA, 0x40, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, -0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, -0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, -0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, -0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, -0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x62, -0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, +0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, +0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x78, 0xFE, 0x30, 0x00, 0x00, +0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5A, 0x31, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x43, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x46, 0xC8, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xFC, 0x30, 0x00, 0x00, +0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x09, 0x2F, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x63, 0x30, 0x00, 0x00, +0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0xE8, 0x30, 0x00, 0x00, +0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAE, 0x1B, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8F, 0x4F, 0x30, 0x00, 0x00, +0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x82, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x53, 0x07, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x34, 0x3B, 0x30, 0x00, 0x00, +0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x6E, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0xA2, 0x30, 0x00, 0x00, +0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB9, 0x09, 0x30, 0x00, 0x00, +0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x70, 0x0C, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x4F, 0xEE, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x36, 0x68, 0x30, 0x00, 0x00, +0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0F, 0xB2, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, +0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xE1, 0xEB, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xC1, 0xCD, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xA1, 0xAF, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xB6, 0x30, 0x00, 0x00, +0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x98, 0x30, 0x00, 0x00, +0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x7A, 0x30, 0x00, 0x00, +0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x47, 0x1A, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x52, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x34, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, +0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, +0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, 0x30, 0x00, 0x00, +0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, 0x30, 0x00, 0x00, +0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, 0x30, 0x00, 0x00, +0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, 0x30, 0x00, 0x00, +0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, 0x30, 0x00, 0x00, +0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, 0x30, 0x00, 0x00, +0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, 0x30, 0x00, 0x00, +0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, 0x30, 0x00, 0x00, +0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0x0D, 0xDA, 0xB0, 0x01, 0x02, +0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, +0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, +0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, +0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x62, 0xC6, 0x75, +0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, /* America/Atikokan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45831,27 +45821,33 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { /* Asia/Manila */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, -0xC1, 0x9C, 0xF4, 0x80, 0xC2, 0x16, 0x30, 0x70, 0xCB, 0xF2, 0xE7, 0x00, 0xD0, 0xA9, 0x25, 0x70, -0xE2, 0x6C, 0x39, 0x00, 0xE2, 0xD5, 0xA2, 0xF0, 0x0F, 0x75, 0x46, 0x80, 0x10, 0x66, 0x7A, 0xF0, -0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, -0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, -0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 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, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, -0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, -0x1F, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, -0x16, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, -0xA9, 0x25, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, -0xD5, 0xA2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, -0x66, 0x7A, 0xF0, 0x01, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, -0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, +0xC1, 0x9C, 0xF4, 0x80, 0xC2, 0x01, 0x18, 0x70, 0xCB, 0x3F, 0x9B, 0x00, 0xCB, 0x8C, 0x03, 0xF0, +0xD1, 0x4B, 0x4D, 0xF0, 0xD2, 0xB1, 0xE5, 0xF0, 0xE2, 0x6C, 0x39, 0x00, 0xE2, 0xB3, 0x5B, 0xF0, +0x0D, 0x9B, 0xFC, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x26, 0x56, 0xBF, 0x00, 0x26, 0xB1, 0xA8, 0x70, +0x03, 0x01, 0x02, 0x01, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x1F, +0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, -0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, 0x94, 0xDD, 0x01, 0xCB, 0x4A, 0x20, -0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, +0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0xBB, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, +0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x3F, 0x9B, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x8C, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0x4D, +0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xB1, 0xE5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xB3, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x9B, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x56, 0xBF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xB1, 0xA8, 0x70, 0x01, 0x04, 0x02, 0x03, 0x02, 0x05, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x71, +0x68, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, +0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, +0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, +0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, 0x96, 0x2A, 0x01, 0xCB, 0x3D, 0x89, 0x00, 0x00, +0x00, 0x00, /* Asia/Muscat */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4F, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -70848,4 +70844,4 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2024.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2025.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index ad7dae5b3f129..36ed3cd3e6f5f 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -49,6 +49,13 @@ static void itemHashScanner (void *payload, void *data, xmlChar *name) } /* }}} */ +static dom_nnodemap_object *php_dom_iterator_get_nnmap(const php_dom_iterator *iterator) +{ + const zval *object = &iterator->intern.data; + dom_object *nnmap = Z_DOMOBJ_P(object); + return nnmap->ptr; +} + xmlNodePtr create_notation(const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) /* {{{ */ { xmlEntityPtr ret = xmlMalloc(sizeof(xmlEntity)); @@ -120,18 +127,22 @@ zval *php_dom_iterator_current_data(zend_object_iterator *iter) /* {{{ */ static void php_dom_iterator_current_key(zend_object_iterator *iter, zval *key) /* {{{ */ { php_dom_iterator *iterator = (php_dom_iterator *)iter; - zval *object = &iterator->intern.data; - zend_class_entry *ce = Z_OBJCE_P(object); + dom_nnodemap_object *objmap = php_dom_iterator_get_nnmap(iterator); - /* Nodelists have the index as a key while named node maps have the name as a key. */ - if (instanceof_function(ce, dom_nodelist_class_entry) || instanceof_function(ce, dom_modern_nodelist_class_entry)) { + /* Only dtd named node maps, i.e. the ones based on a libxml hash table or attribute collections, + * are keyed by the name because in that case the name is unique. */ + if (!objmap->ht && objmap->nodetype != XML_ATTRIBUTE_NODE) { ZVAL_LONG(key, iter->index); } else { dom_object *intern = Z_DOMOBJ_P(&iterator->curobj); if (intern != NULL && intern->ptr != NULL) { - xmlNodePtr curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->ptr)->node; - ZVAL_STRINGL(key, (char *) curnode->name, xmlStrlen(curnode->name)); + xmlNodePtr curnode = ((php_libxml_node_ptr *)intern->ptr)->node; + if (objmap->nodetype == XML_ATTRIBUTE_NODE && php_dom_follow_spec_intern(intern)) { + ZVAL_NEW_STR(key, dom_node_get_node_name_attribute_or_element(curnode, false)); + } else { + ZVAL_STRINGL(key, (const char *) curnode->name, xmlStrlen(curnode->name)); + } } else { ZVAL_NULL(key); } @@ -169,9 +180,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ } dom_object *intern = Z_DOMOBJ_P(&iterator->curobj); - zval *object = &iterator->intern.data; - dom_object *nnmap = Z_DOMOBJ_P(object); - dom_nnodemap_object *objmap = nnmap->ptr; + dom_nnodemap_object *objmap = php_dom_iterator_get_nnmap(iterator); if (intern != NULL && intern->ptr != NULL) { if (objmap->nodetype != XML_ENTITY_NODE && diff --git a/ext/dom/html_document.c b/ext/dom/html_document.c index ed7454dd89d43..92a6c94166a5c 100644 --- a/ext/dom/html_document.c +++ b/ext/dom/html_document.c @@ -528,9 +528,32 @@ static bool dom_decode_encode_fast_path( size_t *tree_error_offset ) { - decoding_encoding_ctx->decode.status = LXB_STATUS_OK; - const lxb_char_t *buf_ref = *buf_ref_ref; + + /* If we returned for needing more bytes, we need to finish up the buffer for the old codepoint. */ + if (decoding_encoding_ctx->decode.status == LXB_STATUS_CONTINUE) { + lxb_char_t buf[4]; + lxb_char_t *buf_ptr = buf; + lxb_codepoint_t codepoint = lxb_encoding_decode_utf_8_single(&decoding_encoding_ctx->decode, &buf_ref, buf_end); + if (lxb_encoding_encode_utf_8_single(&decoding_encoding_ctx->encode, &buf_ptr, buf + sizeof(buf), codepoint) > sizeof(buf)) { + buf_ptr = zend_mempcpy(buf, LXB_ENCODING_REPLACEMENT_BYTES, LXB_ENCODING_REPLACEMENT_SIZE); + } + decoding_encoding_ctx->decode.status = LXB_STATUS_OK; + + if (!dom_process_parse_chunk( + ctx, + document, + parser, + buf_ptr - buf, + buf, + buf_ref - *buf_ref_ref, + tokenizer_error_offset, + tree_error_offset + )) { + goto fail_oom; + } + } + const lxb_char_t *last_output = buf_ref; while (buf_ref != buf_end) { /* Fast path converts non-validated UTF-8 -> validated UTF-8 */ @@ -880,6 +903,13 @@ PHP_METHOD(Dom_HTMLDocument, createFromString) if (!result) { goto fail_oom; } + + /* In the string case we have a single buffer that acts as a sliding window. + * The `current_input_characters` field starts pointing at the start of the buffer, but needs to slide along the + * sliding window as well. */ + if (application_data.current_input_characters) { + application_data.current_input_characters += chunk_size; + } } if (!dom_parse_decode_encode_finish(&ctx, document, parser, &decoding_encoding_ctx, &tokenizer_error_offset, &tree_error_offset)) { diff --git a/ext/dom/lexbor/lexbor/html/tag.h b/ext/dom/lexbor/lexbor/html/tag.h index 2761ee7eccf4b..6570d7d40b7c4 100644 --- a/ext/dom/lexbor/lexbor/html/tag.h +++ b/ext/dom/lexbor/lexbor/html/tag.h @@ -82,7 +82,6 @@ lxb_html_tag_is_void(lxb_tag_id_t tag_id) case LXB_TAG_INPUT: case LXB_TAG_LINK: case LXB_TAG_META: - case LXB_TAG_PARAM: case LXB_TAG_SOURCE: case LXB_TAG_TRACK: case LXB_TAG_WBR: diff --git a/ext/dom/lexbor/lexbor/html/tokenizer/state.c b/ext/dom/lexbor/lexbor/html/tokenizer/state.c index 69b78f288d14e..fa423cbd5b397 100644 --- a/ext/dom/lexbor/lexbor/html/tokenizer/state.c +++ b/ext/dom/lexbor/lexbor/html/tokenizer/state.c @@ -2106,7 +2106,11 @@ lxb_html_tokenizer_state_char_ref_numeric_end(lxb_html_tokenizer_t *tkz, break; } - if (tkz->entity_number <= 0x1F + if ((tkz->entity_number <= 0x1F + && tkz->entity_number != 0x09 /* TAB */ + && tkz->entity_number != 0x0A /* LINE FEED (LF) */ + && tkz->entity_number != 0x0C /* FORM FEED (FF) */ + && tkz->entity_number != 0x20) /* SPACE */ || (tkz->entity_number >= 0x7F && tkz->entity_number <= 0x9F)) { lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->markup, diff --git a/ext/dom/lexbor/lexbor/html/tree.h b/ext/dom/lexbor/lexbor/html/tree.h index ba55d852d37a4..3feb3a7283c00 100644 --- a/ext/dom/lexbor/lexbor/html/tree.h +++ b/ext/dom/lexbor/lexbor/html/tree.h @@ -333,7 +333,7 @@ lxb_html_tree_acknowledge_token_self_closing(lxb_html_tree_t *tree, bool is_void = lxb_html_tag_is_void(token->tag_id); - if (is_void) { + if (!is_void) { lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_NOVOHTELSTTAWITRSO); } diff --git a/ext/dom/lexbor/lexbor/html/tree/insertion_mode/foreign_content.c b/ext/dom/lexbor/lexbor/html/tree/insertion_mode/foreign_content.c index 8c4ff37e61c10..900557a59c337 100644 --- a/ext/dom/lexbor/lexbor/html/tree/insertion_mode/foreign_content.c +++ b/ext/dom/lexbor/lexbor/html/tree/insertion_mode/foreign_content.c @@ -113,12 +113,10 @@ lxb_html_tree_insertion_mode_foreign_content_anything_else(lxb_html_tree_t *tree node = lxb_html_tree_current_node(tree); if (token->tag_id == LXB_TAG_SCRIPT && node->ns == LXB_NS_SVG) { - lxb_html_tree_acknowledge_token_self_closing(tree, token); return lxb_html_tree_insertion_mode_foreign_content_script_closed(tree, token); } else { lxb_html_tree_open_elements_pop(tree); - lxb_html_tree_acknowledge_token_self_closing(tree, token); } return true; diff --git a/ext/dom/lexbor/lexbor/html/tree/insertion_mode/in_select.c b/ext/dom/lexbor/lexbor/html/tree/insertion_mode/in_select.c index 359d3b28f130b..b4eed2c5d3a84 100644 --- a/ext/dom/lexbor/lexbor/html/tree/insertion_mode/in_select.c +++ b/ext/dom/lexbor/lexbor/html/tree/insertion_mode/in_select.c @@ -125,6 +125,37 @@ lxb_html_tree_insertion_mode_in_select_optgroup(lxb_html_tree_t *tree, return true; } +lxb_inline bool +lxb_html_tree_insertion_mode_in_select_hr(lxb_html_tree_t *tree, + lxb_html_token_t *token) +{ + lxb_html_element_t *element; + lxb_dom_node_t *node = lxb_html_tree_current_node(tree); + + if (lxb_html_tree_node_is(node, LXB_TAG_OPTION)) { + lxb_html_tree_open_elements_pop(tree); + } + + node = lxb_html_tree_current_node(tree); + + if (lxb_html_tree_node_is(node, LXB_TAG_OPTGROUP)) { + lxb_html_tree_open_elements_pop(tree); + } + + element = lxb_html_tree_insert_html_element(tree, token); + if (element == NULL) { + tree->status = LXB_STATUS_ERROR_MEMORY_ALLOCATION; + + return lxb_html_tree_process_abort(tree); + } + + lxb_html_tree_open_elements_pop(tree); + + lxb_html_tree_acknowledge_token_self_closing(tree, token); + + return true; +} + lxb_inline bool lxb_html_tree_insertion_mode_in_select_optgroup_closed(lxb_html_tree_t *tree, lxb_html_token_t *token) @@ -319,6 +350,9 @@ lxb_html_tree_insertion_mode_in_select(lxb_html_tree_t *tree, case LXB_TAG_OPTGROUP: return lxb_html_tree_insertion_mode_in_select_optgroup(tree, token); + case LXB_TAG_HR: + return lxb_html_tree_insertion_mode_in_select_hr(tree, token); + case LXB_TAG_SELECT: return lxb_html_tree_insertion_mode_in_select_select(tree, token); diff --git a/ext/dom/node.c b/ext/dom/node.c index 76a6d60833087..105f4cb73a018 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -102,11 +102,17 @@ zend_result dom_node_node_name_read(dom_object *obj, zval *retval) } case XML_DOCUMENT_TYPE_NODE: case XML_DTD_NODE: + if (nodep->name) { + ZVAL_STRING(retval, (const char *) nodep->name); + } else { + ZVAL_EMPTY_STRING(retval); + } + break; case XML_PI_NODE: case XML_ENTITY_DECL: case XML_ENTITY_REF_NODE: case XML_NOTATION_NODE: - ZVAL_STRING(retval, (char *) nodep->name); + ZVAL_STRING(retval, (const char *) nodep->name); break; case XML_CDATA_SECTION_NODE: ZVAL_STRING(retval, "#cdata-section"); diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 9c1dc5f61d391..6f9d87feebfb4 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1080,7 +1080,7 @@ PHP_MINIT_FUNCTION(dom) DOM_REGISTER_PROP_HANDLER(&dom_modern_attr_prop_handlers, "value", dom_attr_value_read, dom_attr_value_write); DOM_REGISTER_PROP_HANDLER(&dom_modern_attr_prop_handlers, "ownerElement", dom_attr_owner_element_read, NULL); DOM_REGISTER_PROP_HANDLER(&dom_modern_attr_prop_handlers, "specified", dom_attr_specified_read, NULL); - zend_hash_merge(&dom_modern_attr_prop_handlers, &dom_node_prop_handlers, NULL, false); + zend_hash_merge(&dom_modern_attr_prop_handlers, &dom_modern_node_prop_handlers, NULL, false); DOM_OVERWRITE_PROP_HANDLER(&dom_modern_attr_prop_handlers, "nodeValue", dom_node_node_value_read, dom_node_node_value_write); DOM_OVERWRITE_PROP_HANDLER(&dom_modern_attr_prop_handlers, "textContent", dom_node_text_content_read, dom_node_text_content_write); zend_hash_add_new_ptr(&classes, dom_modern_attr_class_entry->name, &dom_modern_attr_prop_handlers); @@ -1194,7 +1194,7 @@ PHP_MINIT_FUNCTION(dom) DOM_REGISTER_PROP_HANDLER(&dom_modern_documenttype_prop_handlers, "publicId", dom_documenttype_public_id_read, NULL); DOM_REGISTER_PROP_HANDLER(&dom_modern_documenttype_prop_handlers, "systemId", dom_documenttype_system_id_read, NULL); DOM_REGISTER_PROP_HANDLER(&dom_modern_documenttype_prop_handlers, "internalSubset", dom_documenttype_internal_subset_read, NULL); - zend_hash_merge(&dom_modern_documenttype_prop_handlers, &dom_node_prop_handlers, NULL, false); + zend_hash_merge(&dom_modern_documenttype_prop_handlers, &dom_modern_node_prop_handlers, NULL, false); zend_hash_add_new_ptr(&classes, dom_modern_documenttype_class_entry->name, &dom_modern_documenttype_prop_handlers); dom_notation_class_entry = register_class_DOMNotation(dom_node_class_entry); diff --git a/ext/dom/tests/gh17397.phpt b/ext/dom/tests/gh17397.phpt new file mode 100644 index 0000000000000..83d7beab90761 --- /dev/null +++ b/ext/dom/tests/gh17397.phpt @@ -0,0 +1,16 @@ +--TEST-- +GH-17397 (Assertion failure ext/dom/php_dom.c) +--EXTENSIONS-- +dom +--FILE-- +'); +var_dump($dom->doctype->prefix); +echo $dom->saveXml(); +?> +--EXPECTF-- +Warning: Undefined property: Dom\DocumentType::$prefix in %s on line %d +NULL + + + diff --git a/ext/dom/tests/gh17500.phpt b/ext/dom/tests/gh17500.phpt new file mode 100644 index 0000000000000..02082ed762980 --- /dev/null +++ b/ext/dom/tests/gh17500.phpt @@ -0,0 +1,14 @@ +--TEST-- +GH-17500 (Segfault with requesting nodeName on nameless doctype) +--EXTENSIONS-- +dom +--FILE-- +loadHTML("", LIBXML_NOERROR); +var_dump($doc->doctype->nodeName); + +?> +--EXPECT-- +string(0) "" diff --git a/ext/dom/tests/modern/html/encoding/HTMLDocument_encoding_edge_case_08.phpt b/ext/dom/tests/modern/html/encoding/HTMLDocument_encoding_edge_case_08.phpt index 68f0708bab780..305b78f4b6123 100644 --- a/ext/dom/tests/modern/html/encoding/HTMLDocument_encoding_edge_case_08.phpt +++ b/ext/dom/tests/modern/html/encoding/HTMLDocument_encoding_edge_case_08.phpt @@ -9,9 +9,9 @@ function test(string $str) { $dom = Dom\HTMLDocument::createFromString($str); var_dump($dom->body->textContent); - file_put_contents(__DIR__ . '/HTMLDocument_encoding_edge_case_07.tmp', $str); + file_put_contents(__DIR__ . '/HTMLDocument_encoding_edge_case_08.tmp', $str); - $dom = Dom\HTMLDocument::createFromFile(__DIR__ . '/HTMLDocument_encoding_edge_case_07.tmp'); + $dom = Dom\HTMLDocument::createFromFile(__DIR__ . '/HTMLDocument_encoding_edge_case_08.tmp'); var_dump($dom->body->textContent); } @@ -36,7 +36,7 @@ test($str); ?> --CLEAN-- --EXPECT-- string(4198) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA�BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" diff --git a/ext/dom/tests/modern/html/encoding/gh17481.phpt b/ext/dom/tests/modern/html/encoding/gh17481.phpt new file mode 100644 index 0000000000000..74e13e1300942 --- /dev/null +++ b/ext/dom/tests/modern/html/encoding/gh17481.phpt @@ -0,0 +1,33 @@ +--TEST-- +GH-17481 (UTF-8 corruption in \Dom\HTMLDocument) +--EXTENSIONS-- +dom +--FILE-- +$input"; + if ($endTag) { + $Data .= ''; + } + $Document = \Dom\HTMLDocument::createFromString($Data, 0, 'UTF-8'); + var_dump($Document->body->textContent === $input); +} + +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/dom/tests/modern/html/parser/gh17485.phpt b/ext/dom/tests/modern/html/parser/gh17485.phpt new file mode 100644 index 0000000000000..3f2c6245113df --- /dev/null +++ b/ext/dom/tests/modern/html/parser/gh17485.phpt @@ -0,0 +1,13 @@ +--TEST-- +GH-17485 (Self-closing tag on void elements shouldn't be a parse error/warning in \Dom\HTMLDocument) +--EXTENSIONS-- +dom +--FILE-- +\n
\n"; +$Document = \Dom\HTMLDocument::createFromString( $Data ); +echo $Document->saveHTML(); +?> +--EXPECT-- +
+ diff --git a/ext/dom/tests/modern/html/parser/gh17486.phpt b/ext/dom/tests/modern/html/parser/gh17486.phpt new file mode 100644 index 0000000000000..4d7ddee7dde96 --- /dev/null +++ b/ext/dom/tests/modern/html/parser/gh17486.phpt @@ -0,0 +1,39 @@ +--TEST-- +GH-17486 (Incorrect error line numbers reported in Dom\HTMLDocument::createFromString) +--EXTENSIONS-- +dom +--INI-- +error_reporting=E_ALL +--CREDITS-- +xPaw +--FILE-- + + + + + + +
+ + +HTML; + +\Dom\HTMLDocument::createFromString($html); + +file_put_contents(__DIR__ . '/gh17486.tmp', $html); +\Dom\HTMLDocument::createFromFile(__DIR__ . '/gh17486.tmp'); + +?> +--CLEAN-- + +--EXPECTF-- +Warning: Dom\HTMLDocument::createFromString(): tokenizer error null-character-reference in Entity, line: 7, column: 9 in %s on line %d + +Warning: Dom\HTMLDocument::createFromFile(): tokenizer error null-character-reference in %s line: 7, column: 9 in %s on line %d diff --git a/ext/dom/tests/modern/spec/Document_implementation_createDocumentType.phpt b/ext/dom/tests/modern/spec/Document_implementation_createDocumentType.phpt index 88c66abf09c91..bfb150b5cca89 100644 --- a/ext/dom/tests/modern/spec/Document_implementation_createDocumentType.phpt +++ b/ext/dom/tests/modern/spec/Document_implementation_createDocumentType.phpt @@ -25,7 +25,7 @@ foreach ($test_matrix as $test_item) { ?> --EXPECT-- -object(Dom\DocumentType)#3 (23) { +object(Dom\DocumentType)#3 (19) { ["name"]=> string(5) "qname" ["entities"]=> @@ -38,12 +38,14 @@ object(Dom\DocumentType)#3 (23) { string(6) "system" ["internalSubset"]=> NULL + ["nodeType"]=> + int(10) ["nodeName"]=> string(5) "qname" - ["nodeValue"]=> + ["baseURI"]=> NULL - ["nodeType"]=> - int(10) + ["isConnected"]=> + bool(false) ["parentNode"]=> NULL ["parentElement"]=> @@ -58,17 +60,7 @@ object(Dom\DocumentType)#3 (23) { NULL ["nextSibling"]=> NULL - ["attributes"]=> - NULL - ["isConnected"]=> - bool(false) - ["namespaceURI"]=> - NULL - ["prefix"]=> - string(0) "" - ["localName"]=> - NULL - ["baseURI"]=> + ["nodeValue"]=> NULL ["textContent"]=> string(0) "" @@ -76,7 +68,7 @@ object(Dom\DocumentType)#3 (23) { -object(Dom\DocumentType)#2 (23) { +object(Dom\DocumentType)#2 (19) { ["name"]=> string(5) "qname" ["entities"]=> @@ -89,12 +81,14 @@ object(Dom\DocumentType)#2 (23) { string(0) "" ["internalSubset"]=> NULL + ["nodeType"]=> + int(10) ["nodeName"]=> string(5) "qname" - ["nodeValue"]=> + ["baseURI"]=> NULL - ["nodeType"]=> - int(10) + ["isConnected"]=> + bool(false) ["parentNode"]=> NULL ["parentElement"]=> @@ -109,17 +103,7 @@ object(Dom\DocumentType)#2 (23) { NULL ["nextSibling"]=> NULL - ["attributes"]=> - NULL - ["isConnected"]=> - bool(false) - ["namespaceURI"]=> - NULL - ["prefix"]=> - string(0) "" - ["localName"]=> - NULL - ["baseURI"]=> + ["nodeValue"]=> NULL ["textContent"]=> string(0) "" @@ -127,7 +111,7 @@ object(Dom\DocumentType)#2 (23) { -object(Dom\DocumentType)#1 (23) { +object(Dom\DocumentType)#1 (19) { ["name"]=> string(5) "qname" ["entities"]=> @@ -140,12 +124,14 @@ object(Dom\DocumentType)#1 (23) { string(6) "system" ["internalSubset"]=> NULL + ["nodeType"]=> + int(10) ["nodeName"]=> string(5) "qname" - ["nodeValue"]=> + ["baseURI"]=> NULL - ["nodeType"]=> - int(10) + ["isConnected"]=> + bool(false) ["parentNode"]=> NULL ["parentElement"]=> @@ -160,17 +146,7 @@ object(Dom\DocumentType)#1 (23) { NULL ["nextSibling"]=> NULL - ["attributes"]=> - NULL - ["isConnected"]=> - bool(false) - ["namespaceURI"]=> - NULL - ["prefix"]=> - string(0) "" - ["localName"]=> - NULL - ["baseURI"]=> + ["nodeValue"]=> NULL ["textContent"]=> string(0) "" @@ -178,7 +154,7 @@ object(Dom\DocumentType)#1 (23) { -object(Dom\DocumentType)#4 (23) { +object(Dom\DocumentType)#4 (19) { ["name"]=> string(5) "qname" ["entities"]=> @@ -191,12 +167,14 @@ object(Dom\DocumentType)#4 (23) { string(0) "" ["internalSubset"]=> NULL + ["nodeType"]=> + int(10) ["nodeName"]=> string(5) "qname" - ["nodeValue"]=> + ["baseURI"]=> NULL - ["nodeType"]=> - int(10) + ["isConnected"]=> + bool(false) ["parentNode"]=> NULL ["parentElement"]=> @@ -211,17 +189,7 @@ object(Dom\DocumentType)#4 (23) { NULL ["nextSibling"]=> NULL - ["attributes"]=> - NULL - ["isConnected"]=> - bool(false) - ["namespaceURI"]=> - NULL - ["prefix"]=> - string(0) "" - ["localName"]=> - NULL - ["baseURI"]=> + ["nodeValue"]=> NULL ["textContent"]=> string(0) "" diff --git a/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt b/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt index c94dce263efd2..fb0853939f88e 100644 --- a/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt +++ b/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt @@ -26,7 +26,7 @@ var_dump($doctype->notations["GIF"]); ?> --EXPECTF-- -object(Dom\DocumentType)#2 (24) { +object(Dom\DocumentType)#2 (20) { ["name"]=> string(4) "root" ["entities"]=> @@ -41,12 +41,16 @@ object(Dom\DocumentType)#2 (24) { string(105) " " - ["nodeName"]=> - string(4) "root" - ["nodeValue"]=> - NULL ["nodeType"]=> int(10) + ["nodeName"]=> + string(4) "root" + ["baseURI"]=> + string(%d) "%s" + ["isConnected"]=> + bool(true) + ["ownerDocument"]=> + string(22) "(object value omitted)" ["parentNode"]=> string(22) "(object value omitted)" ["parentElement"]=> @@ -61,20 +65,8 @@ object(Dom\DocumentType)#2 (24) { NULL ["nextSibling"]=> string(22) "(object value omitted)" - ["attributes"]=> - NULL - ["isConnected"]=> - bool(true) - ["ownerDocument"]=> - string(22) "(object value omitted)" - ["namespaceURI"]=> - NULL - ["prefix"]=> - string(0) "" - ["localName"]=> + ["nodeValue"]=> NULL - ["baseURI"]=> - string(%d) "%s" ["textContent"]=> NULL } diff --git a/ext/dom/tests/modern/xml/gh17572.phpt b/ext/dom/tests/modern/xml/gh17572.phpt new file mode 100644 index 0000000000000..1f1c2937b00a5 --- /dev/null +++ b/ext/dom/tests/modern/xml/gh17572.phpt @@ -0,0 +1,71 @@ +--TEST-- +GH-17572 (getElementsByTagName returns collections with tagName-based indexing, causing loss of elements when converted to arrays) +--EXTENSIONS-- +dom +--FILE-- + +]> + +

+

+ +XML); + +echo "--- querySelectorAll('p') ---\n"; + +foreach ($dom->querySelectorAll('p') as $k => $v) { + var_dump($k, $v->nodeName); +} + +echo "--- getElementsByTagName('p') ---\n"; + +foreach ($dom->getElementsByTagName('p') as $k => $v) { + var_dump($k, $v->nodeName); +} + +echo "--- entities ---\n"; + +foreach ($dom->doctype->entities as $k => $v) { + var_dump($k, $v->nodeName); +} + +echo "--- attributes ---\n"; + +$attribs = $dom->getElementsByTagName('p')[1]->attributes; +foreach ($attribs as $k => $v) { + var_dump($k, $v->value); + var_dump($attribs[$k]->value); +} + +?> +--EXPECT-- +--- querySelectorAll('p') --- +int(0) +string(1) "p" +int(1) +string(1) "p" +--- getElementsByTagName('p') --- +int(0) +string(1) "p" +int(1) +string(1) "p" +--- entities --- +string(1) "a" +string(1) "a" +--- attributes --- +string(7) "xmlns:x" +string(5) "urn:x" +string(5) "urn:x" +string(3) "x:a" +string(1) "1" +string(1) "1" +string(1) "b" +string(1) "2" +string(1) "2" +string(1) "a" +string(1) "3" +string(1) "3" diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index d27db9bcd29b5..bbebd8cd80695 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -339,7 +339,7 @@ PHP_FUNCTION(enchant_broker_set_dict_path) char *value; size_t value_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ols", &broker, enchant_broker_ce, &dict_type, &value, &value_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Olp", &broker, enchant_broker_ce, &dict_type, &value, &value_len) == FAILURE) { RETURN_THROWS(); } @@ -440,7 +440,7 @@ PHP_FUNCTION(enchant_broker_request_dict) char *tag; size_t taglen; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { RETURN_THROWS(); } @@ -534,7 +534,7 @@ PHP_FUNCTION(enchant_broker_dict_exists) size_t taglen; enchant_broker * pbroker; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { RETURN_THROWS(); } @@ -559,7 +559,7 @@ PHP_FUNCTION(enchant_broker_set_ordering) size_t ptaglen; enchant_broker * pbroker; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oss", &broker, enchant_broker_ce, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &broker, enchant_broker_ce, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) { RETURN_THROWS(); } @@ -597,7 +597,7 @@ PHP_FUNCTION(enchant_dict_quick_check) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|z", &dict, enchant_dict_ce, &word, &wordlen, &sugg) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|z", &dict, enchant_dict_ce, &word, &wordlen, &sugg) == FAILURE) { RETURN_THROWS(); } @@ -642,7 +642,7 @@ PHP_FUNCTION(enchant_dict_check) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -662,7 +662,7 @@ PHP_FUNCTION(enchant_dict_suggest) enchant_dict *pdict; size_t n_sugg; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -690,7 +690,7 @@ PHP_FUNCTION(enchant_dict_add) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -708,7 +708,7 @@ PHP_FUNCTION(enchant_dict_add_to_session) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -726,7 +726,7 @@ PHP_FUNCTION(enchant_dict_is_added) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -748,7 +748,7 @@ PHP_FUNCTION(enchant_dict_store_replacement) enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oss", &dict, enchant_dict_ce, &mis, &mislen, &cor, &corlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &dict, enchant_dict_ce, &mis, &mislen, &cor, &corlen) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/enchant/tests/null_bytes.phpt b/ext/enchant/tests/null_bytes.phpt new file mode 100644 index 0000000000000..cdd26cf97d355 --- /dev/null +++ b/ext/enchant/tests/null_bytes.phpt @@ -0,0 +1,70 @@ +--TEST-- +null bytes +--EXTENSIONS-- +enchant +--SKIPIF-- + +--FILE-- +getMessage(), "\n"; + } +} + +foreach ($two_params_dict as $func) { + try { + $func($requestDict, "foo\0bar"); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } +} + +try { + var_dump(enchant_broker_set_ordering($broker, "foo\0bar", "foo\0bar")); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + +try { + var_dump(enchant_dict_store_replacement($requestDict, "foo\0bar", "foo\0bar")); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +enchant_broker_request_dict(): Argument #2 ($tag) must not contain any null bytes +enchant_broker_dict_exists(): Argument #2 ($tag) must not contain any null bytes +enchant_dict_quick_check(): Argument #2 ($word) must not contain any null bytes +enchant_dict_check(): Argument #2 ($word) must not contain any null bytes +enchant_dict_suggest(): Argument #2 ($word) must not contain any null bytes +enchant_dict_add(): Argument #2 ($word) must not contain any null bytes +enchant_dict_add_to_session(): Argument #2 ($word) must not contain any null bytes +enchant_dict_is_added(): Argument #2 ($word) must not contain any null bytes +enchant_broker_set_ordering(): Argument #2 ($tag) must not contain any null bytes +enchant_dict_store_replacement(): Argument #2 ($misspelled) must not contain any null bytes diff --git a/ext/fileinfo/tests/cve-2014-3538-mb.phpt b/ext/fileinfo/tests/cve-2014-3538-mb.phpt index 1cbeaf45a58dd..e6c63e35ac852 100644 --- a/ext/fileinfo/tests/cve-2014-3538-mb.phpt +++ b/ext/fileinfo/tests/cve-2014-3538-mb.phpt @@ -30,7 +30,7 @@ if ($t < 3) { Done --CLEAN-- --EXPECTF-- string(%d) "%s" diff --git a/ext/fileinfo/tests/cve-2014-3538-nojit.phpt b/ext/fileinfo/tests/cve-2014-3538-nojit.phpt index 5ddc2765ee556..2010d538da951 100644 --- a/ext/fileinfo/tests/cve-2014-3538-nojit.phpt +++ b/ext/fileinfo/tests/cve-2014-3538-nojit.phpt @@ -13,7 +13,7 @@ if (getenv('SKIP_PERF_SENSITIVE')) pcre.jit=0 --FILE-- --EXPECTF-- string(%d) "%s" diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 4693787607b43..3dc401a4bffbb 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1407,6 +1407,22 @@ ftp_getresp(ftpbuf_t *ftp) } /* }}} */ +static ssize_t my_send_wrapper_with_restart(php_socket_t fd, const void *buf, size_t size, int flags) { + ssize_t n; + do { + n = send(fd, buf, size, flags); + } while (n == -1 && php_socket_errno() == EINTR); + return n; +} + +static ssize_t my_recv_wrapper_with_restart(php_socket_t fd, void *buf, size_t size, int flags) { + ssize_t n; + do { + n = recv(fd, buf, size, flags); + } while (n == -1 && php_socket_errno() == EINTR); + return n; +} + int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { #ifdef HAVE_FTP_SSL int err; @@ -1422,7 +1438,7 @@ int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { handle = ftp->data->ssl_handle; fd = ftp->data->fd; } else { - return send(s, buf, size, 0); + return my_send_wrapper_with_restart(s, buf, size, 0); } do { @@ -1461,8 +1477,33 @@ int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { } while (retry); return sent; #else - return send(s, buf, size, 0); + return my_send_wrapper_with_restart(s, buf, size, 0); +#endif +} + +static int my_poll(php_socket_t fd, int events, int timeout) { + int n; + zend_hrtime_t timeout_hr = (zend_hrtime_t) timeout * 1000000; + + while (true) { + zend_hrtime_t start_ns = zend_hrtime(); + n = php_pollfd_for_ms(fd, events, (int) (timeout_hr / 1000000)); + + if (n == -1 && php_socket_errno() == EINTR) { + zend_hrtime_t delta_ns = zend_hrtime() - start_ns; + if (delta_ns > timeout_hr) { +#ifndef PHP_WIN32 + errno = ETIMEDOUT; #endif + break; + } + timeout_hr -= delta_ns; + } else { + break; + } + } + + return n; } /* {{{ my_send */ @@ -1474,7 +1515,7 @@ my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) size = len; while (size) { - n = php_pollfd_for_ms(s, POLLOUT, ftp->timeout_sec * 1000); + n = my_poll(s, POLLOUT, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; @@ -1513,7 +1554,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) SSL *handle = NULL; php_socket_t fd; #endif - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); + n = my_poll(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1573,7 +1614,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) } while (retry); } else { #endif - nr_bytes = recv(s, buf, len, 0); + nr_bytes = my_recv_wrapper_with_restart(s, buf, len, 0); #ifdef HAVE_FTP_SSL } #endif @@ -1587,7 +1628,7 @@ data_available(ftpbuf_t *ftp, php_socket_t s) { int n; - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, 1000); + n = my_poll(s, PHP_POLLREADABLE, 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1610,7 +1651,7 @@ data_writeable(ftpbuf_t *ftp, php_socket_t s) { int n; - n = php_pollfd_for_ms(s, POLLOUT, 1000); + n = my_poll(s, POLLOUT, 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1634,7 +1675,7 @@ my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrl { int n; - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); + n = my_poll(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; if (n == 0) { diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 44a90773ee12d..922e39031c2ad 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -930,7 +930,9 @@ static int gdImageTileGet (gdImagePtr im, int x, int y) srcy = y % gdImageSY(im->tile); p = gdImageGetPixel(im->tile, srcx, srcy); - if (im->trueColor) { + if (p == im->tile->transparent) { + tileColor = im->transparent; + } else if (im->trueColor) { if (im->tile->trueColor) { tileColor = p; } else { diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c index 6fb79fd00b6ba..0204c4158db4a 100644 --- a/ext/gd/libgd/gd_gif_in.c +++ b/ext/gd/libgd/gd_gif_in.c @@ -244,8 +244,10 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ BitSet(buf[8], INTERLACE), &ZeroDataBlock); } else { if (!haveGlobalColormap) { - gdImageDestroy(im); - return 0; + // Still a valid gif, apply simple default palette as per spec + ColorMap[CM_RED][1] = 0xff; + ColorMap[CM_GREEN][1] = 0xff; + ColorMap[CM_BLUE][1] = 0xff; } ReadImage(im, fd, width, height, ColorMap, diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index b08cc64aa30da..5481fa2a16b02 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -738,8 +738,8 @@ static int getPixelInterpolateWeight(gdImagePtr im, const double x, const double */ int getPixelInterpolated(gdImagePtr im, const double x, const double y, const int bgColor) { - const int xi=(int)((x) < 0 ? x - 1: x); - const int yi=(int)((y) < 0 ? y - 1: y); + const int xi=(int)(x); + const int yi=(int)(y); int yii; int i; double kernel, kernel_cache_y; @@ -1703,13 +1703,6 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b int new_width, new_height; gdRect bbox; - const gdFixed f_slop_y = f_sin; - const gdFixed f_slop_x = f_cos; - const gdFixed f_slop = f_slop_x > 0 && f_slop_y > 0 ? - (f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)) - : 0; - - if (bgColor < 0) { return NULL; } @@ -1735,15 +1728,10 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b long m = gd_fxtoi(f_m); long n = gd_fxtoi(f_n); - if ((n <= 0) || (m <= 0) || (m >= src_h) || (n >= src_w)) { + if (m < -1 || n < -1 || m >= src_h || n >= src_w ) { dst->tpixels[dst_offset_y][dst_offset_x++] = bgColor; - } else if ((n <= 1) || (m <= 1) || (m >= src_h - 1) || (n >= src_w - 1)) { - register int c = getPixelInterpolated(src, n, m, bgColor); - c = c | (( gdTrueColorGetAlpha(c) + ((int)(127* gd_fxtof(f_slop)))) << 24); - - dst->tpixels[dst_offset_y][dst_offset_x++] = _color_blend(bgColor, c); } else { - dst->tpixels[dst_offset_y][dst_offset_x++] = getPixelInterpolated(src, n, m, bgColor); + dst->tpixels[dst_offset_y][dst_offset_x++] = getPixelInterpolated(src, gd_fxtod(f_n), gd_fxtod(f_m), bgColor); } } dst_offset_y++; diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 67f553ebc9d7c..dc5cdde0aa6d7 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -720,7 +720,7 @@ static char * gdft_draw_bitmap (gdCache_head_t *tc_cache, gdImage * im, int fg, y = pen_y + row; /* clip if out of bounds */ - if (y >= im->sy || y < 0) { + if (y > im->cy2 || y < im->cy1) { continue; } @@ -743,7 +743,7 @@ static char * gdft_draw_bitmap (gdCache_head_t *tc_cache, gdImage * im, int fg, x = pen_x + col; /* clip if out of bounds */ - if (x >= im->sx || x < 0) { + if (x > im->cx2 || x < im->cx1) { continue; } /* get pixel location in gd buffer */ diff --git a/ext/gd/tests/gd223.phpt b/ext/gd/tests/gd223.phpt new file mode 100644 index 0000000000000..c378ab199ac50 --- /dev/null +++ b/ext/gd/tests/gd223.phpt @@ -0,0 +1,26 @@ +--TEST-- +libgd bug 223 (gdImageRotateGeneric() does not properly interpolate) +--EXTENSIONS-- +gd +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The images are equal. diff --git a/ext/gd/tests/gd223.png b/ext/gd/tests/gd223.png new file mode 100644 index 0000000000000..02e10e2cc3a13 Binary files /dev/null and b/ext/gd/tests/gd223.png differ diff --git a/ext/gd/tests/gh17349.phpt b/ext/gd/tests/gh17349.phpt new file mode 100644 index 0000000000000..cd0fc4317b59b --- /dev/null +++ b/ext/gd/tests/gh17349.phpt @@ -0,0 +1,27 @@ +--TEST-- +GH-17349 (Tiled truecolor filling looses single color transparency) +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +The images are equal. diff --git a/ext/gd/tests/gh17349.png b/ext/gd/tests/gh17349.png new file mode 100644 index 0000000000000..dd75d9df99043 Binary files /dev/null and b/ext/gd/tests/gh17349.png differ diff --git a/ext/gd/tests/gh17373.phpt b/ext/gd/tests/gh17373.phpt new file mode 100644 index 0000000000000..354cdd07362b2 --- /dev/null +++ b/ext/gd/tests/gh17373.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug GH-17373 (imagefttext() ignores clipping rect for palette images) +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +int(0) diff --git a/ext/gd/tests/gif_nocolormaps.gif b/ext/gd/tests/gif_nocolormaps.gif new file mode 100644 index 0000000000000..b3aa80d843a92 Binary files /dev/null and b/ext/gd/tests/gif_nocolormaps.gif differ diff --git a/ext/gd/tests/gif_nocolormaps.phpt b/ext/gd/tests/gif_nocolormaps.phpt new file mode 100644 index 0000000000000..c962c0e9b20fd --- /dev/null +++ b/ext/gd/tests/gif_nocolormaps.phpt @@ -0,0 +1,11 @@ +--TEST-- +A GIF without any Global or Local color tables is still decoded +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +bool(true) diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 53eaf7975457d..27f0dfa26da70 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -183,9 +183,9 @@ PHP_FUNCTION(bindtextdomain) char *retval, dir_name[MAXPATHLEN], *btd_result; ZEND_PARSE_PARAMETERS_START(1, 2) - Z_PARAM_STR(domain) + Z_PARAM_PATH_STR(domain) Z_PARAM_OPTIONAL - Z_PARAM_STR_OR_NULL(dir) + Z_PARAM_PATH_STR_OR_NULL(dir) ZEND_PARSE_PARAMETERS_END(); PHP_GETTEXT_DOMAIN_LENGTH_CHECK(1, ZSTR_LEN(domain)) diff --git a/ext/gettext/tests/gh17400.phpt b/ext/gettext/tests/gh17400.phpt new file mode 100644 index 0000000000000..836b792bf0de7 --- /dev/null +++ b/ext/gettext/tests/gh17400.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-17400 bindtextdomain segfaults with invalid domain/domain with null bytes. +--EXTENSIONS-- +gettext +--CREDITS-- +YuanchengJiang +--FILE-- +getMessage(); +} +?> +--EXPECT-- +bindtextdomain(): Argument #1 ($domain) must not contain any null bytes diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index 5767b429e7e67..6817f52ffb020 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -51,6 +51,7 @@ inline BreakIterator *_breakiter_prolog(zend_object_iterator *iter) static void _breakiterator_destroy_it(zend_object_iterator *iter) { zval_ptr_dtor(&iter->data); + /* Don't free iter here because it is allocated as an object on its own, not embedded. */ } static void _breakiterator_move_forward(zend_object_iterator *iter) @@ -79,8 +80,18 @@ static void _breakiterator_rewind(zend_object_iterator *iter) ZVAL_LONG(&zoi_iter->current, (zend_long)pos); } +static void zoi_with_current_dtor_self(zend_object_iterator *iter) +{ + // Note: wrapping_obj is unused, call to zoi_with_current_dtor() not necessary + zoi_with_current *zoi_iter = (zoi_with_current*)iter; + ZEND_ASSERT(Z_ISUNDEF(zoi_iter->wrapping_obj)); + + // Unlike the other iterators, this iterator is a new, standalone instance + zoi_iter->destroy_it(iter); +} + static const zend_object_iterator_funcs breakiterator_iterator_funcs = { - zoi_with_current_dtor, + zoi_with_current_dtor_self, zoi_with_current_valid, zoi_with_current_get_current_data, NULL, @@ -211,7 +222,7 @@ static const zend_object_iterator_funcs breakiterator_parts_it_funcs = { _breakiterator_parts_move_forward, _breakiterator_parts_rewind, zoi_with_current_invalidate_current, - NULL, /* get_gc */ + zoi_with_current_get_gc, }; void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, @@ -231,7 +242,7 @@ void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, ii->iterator->index = 0; ((zoi_with_current*)ii->iterator)->destroy_it = _breakiterator_parts_destroy_it; - ZVAL_OBJ(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); + ZVAL_OBJ_COPY(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); ((zoi_break_iter_parts*)ii->iterator)->bio = Z_INTL_BREAKITERATOR_P(break_iter_zv); diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp index 9af230eaf6540..58ebeabcb406c 100644 --- a/ext/intl/common/common_enum.cpp +++ b/ext/intl/common/common_enum.cpp @@ -35,25 +35,8 @@ zend_object_handlers IntlIterator_handlers; void zoi_with_current_dtor(zend_object_iterator *iter) { zoi_with_current *zoiwc = (zoi_with_current*)iter; - - if (!Z_ISUNDEF(zoiwc->wrapping_obj)) { - /* we have to copy the pointer because zoiwc->wrapping_obj may be - * changed midway the execution of zval_ptr_dtor() */ - zval *zwo = &zoiwc->wrapping_obj; - - /* object is still here, we can rely on it to call this again and - * destroy this object */ - zval_ptr_dtor(zwo); - } else { - /* Object not here anymore (we've been called by the object free handler) - * Note that the iterator wrapper objects (that also depend on this - * structure) call this function earlier, in the destruction phase, which - * precedes the object free phase. Therefore there's no risk on this - * function being called by the iterator wrapper destructor function and - * not finding the memory of this iterator allocated anymore. */ - iter->funcs->invalidate_current(iter); - zoiwc->destroy_it(iter); - } + zval_ptr_dtor(&zoiwc->wrapping_obj); + ZVAL_UNDEF(&zoiwc->wrapping_obj); } U_CFUNC zend_result zoi_with_current_valid(zend_object_iterator *iter) @@ -98,6 +81,14 @@ static void string_enum_current_move_forward(zend_object_iterator *iter) } //else we've reached the end of the enum, nothing more is required } +HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n) +{ + zoi_with_current *zoiwc = reinterpret_cast(iter); + *table = &zoiwc->wrapping_obj; + *n = 1; + return nullptr; +} + static void string_enum_rewind(zend_object_iterator *iter) { zoi_with_current *zoi_iter = (zoi_with_current*)iter; @@ -134,7 +125,7 @@ static const zend_object_iterator_funcs string_enum_object_iterator_funcs = { string_enum_current_move_forward, string_enum_rewind, zoi_with_current_invalidate_current, - NULL, /* get_gc */ + zoi_with_current_get_gc, }; U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object) @@ -148,24 +139,47 @@ U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *ob ii->iterator->funcs = &string_enum_object_iterator_funcs; ii->iterator->index = 0; ((zoi_with_current*)ii->iterator)->destroy_it = string_enum_destroy_it; - ZVAL_OBJ(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); + ZVAL_OBJ_COPY(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); } -static void IntlIterator_objects_free(zend_object *object) +static void IntlIterator_objects_dtor(zend_object *object) { IntlIterator_object *ii = php_intl_iterator_fetch_object(object); - if (ii->iterator) { - zval *wrapping_objp = &((zoi_with_current*)ii->iterator)->wrapping_obj; - ZVAL_UNDEF(wrapping_objp); - zend_iterator_dtor(ii->iterator); + ((zoi_with_current*)ii->iterator)->destroy_it(ii->iterator); + OBJ_RELEASE(&ii->iterator->std); + ii->iterator = NULL; } +} + +static void IntlIterator_objects_free(zend_object *object) +{ + IntlIterator_object *ii = php_intl_iterator_fetch_object(object); + intl_error_reset(INTLITERATOR_ERROR_P(ii)); zend_object_std_dtor(&ii->zo); } +static HashTable *IntlIterator_object_get_gc(zend_object *obj, zval **table, int *n) +{ + IntlIterator_object *ii = php_intl_iterator_fetch_object(obj); + if (ii->iterator) { + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); + zend_get_gc_buffer_add_obj(gc_buffer, &ii->iterator->std); + zend_get_gc_buffer_use(gc_buffer, table, n); + } else { + *table = nullptr; + *n = 0; + } + if (obj->properties == nullptr && obj->ce->default_properties_count == 0) { + return nullptr; + } else { + return zend_std_get_properties(obj); + } +} + static zend_object_iterator *IntlIterator_get_iterator( zend_class_entry *ce, zval *object, int by_ref) { @@ -282,7 +296,9 @@ U_CFUNC void intl_register_common_symbols(int module_number) sizeof IntlIterator_handlers); IntlIterator_handlers.offset = XtOffsetOf(IntlIterator_object, zo); IntlIterator_handlers.clone_obj = NULL; + IntlIterator_handlers.dtor_obj = IntlIterator_objects_dtor; IntlIterator_handlers.free_obj = IntlIterator_objects_free; + IntlIterator_handlers.get_gc = IntlIterator_object_get_gc; register_common_symbols(module_number); } diff --git a/ext/intl/common/common_enum.h b/ext/intl/common/common_enum.h index 7c56f34715c49..6f08285289019 100644 --- a/ext/intl/common/common_enum.h +++ b/ext/intl/common/common_enum.h @@ -71,6 +71,7 @@ U_CFUNC void zoi_with_current_dtor(zend_object_iterator *iter); U_CFUNC zend_result zoi_with_current_valid(zend_object_iterator *iter); U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter); U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter); +U_CFUNC HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n); #ifdef __cplusplus using icu::StringEnumeration; diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index db2b73e2cb6d3..858f1ee3b50de 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -384,20 +384,23 @@ static bool php_converter_set_encoding(php_converter_object *objval, if (objval) { THROW_UFAILURE(objval, "ucnv_open", error); } else { - php_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); + char *msg; + spprintf(&msg, 0, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); + intl_error_set(NULL, error, msg, 1); + efree(msg); } - return 0; + return false; } if (objval && !php_converter_set_callbacks(objval, cnv)) { - return 0; + return false; } if (*pcnv) { ucnv_close(*pcnv); } *pcnv = cnv; - return 1; + return true; } /* }}} */ diff --git a/ext/intl/tests/IntlIterator_cycle_management.phpt b/ext/intl/tests/IntlIterator_cycle_management.phpt new file mode 100644 index 0000000000000..ec6aa889f3bee --- /dev/null +++ b/ext/intl/tests/IntlIterator_cycle_management.phpt @@ -0,0 +1,19 @@ +--TEST-- +IntlIterator cycle management +--EXTENSIONS-- +intl +--FILE-- + +--EXPECT-- +int(1) +int(1) +int(1) diff --git a/ext/intl/tests/gh11874.phpt b/ext/intl/tests/gh11874.phpt new file mode 100644 index 0000000000000..4b44cfb157be1 --- /dev/null +++ b/ext/intl/tests/gh11874.phpt @@ -0,0 +1,28 @@ +--TEST-- +GH-11874 (intl causing segfault in docker images) +--EXTENSIONS-- +intl +--FILE-- + 0); +echo "No crash\n"; + +?> +--EXPECT-- +string(7) "persian" +string(9) "gregorian" +string(7) "islamic" +string(13) "islamic-civil" +string(12) "islamic-tbla" +bool(true) +No crash diff --git a/ext/intl/tests/gh17469.phpt b/ext/intl/tests/gh17469.phpt new file mode 100644 index 0000000000000..a0c5d719817d7 --- /dev/null +++ b/ext/intl/tests/gh17469.phpt @@ -0,0 +1,34 @@ +--TEST-- +GH-17469: UConverter::transcode() raises always E_WARNING regardless of INI settings +--SKIPIF-- + +--FILE-- +getMessage(), PHP_EOL; +} +try { + UConverter::transcode("\x0a", 'UTF-16BE', 'da!'); +} catch (IntlException $e) { + echo $e->getMessage(), PHP_EOL; +} +?> +--EXPECTF-- + +Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line %d + +Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line 5 +Error setting encoding: 4 - U_FILE_ACCESS_ERROR +Error setting encoding: 4 - U_FILE_ACCESS_ERROR diff --git a/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt b/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt index e40ed1d58c7ff..bd12aee3ed153 100644 --- a/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt +++ b/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt @@ -47,6 +47,6 @@ print "done!"; [*] Sending - Malicious Stmt Response for items [Extract heap through buffer over-read]: 01000001013000000203646566087068705f74657374056974656d73056974656d73046974656d046974656d0ce000c8000000fd011000000005000003fe00002200070000040000fa7465737405000005fe00002200 Warning: mysqli_result::fetch_assoc(): Malformed server packet. Field length pointing after the end of packet in %s on line %d -[*] Received: 0500000019010000000100000001 +[*] Received: 05000000190100000%d [*] Server finished done! diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 66147121b2f0f..d1421fdf8653b 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -145,6 +145,8 @@ static void preload_restart(void); # define LOCKVAL(v) (ZCSG(v)) #endif +#define ZCG_KEY_LEN (MAXPATHLEN * 8) + /** * Clear AVX/SSE2-aligned memory. */ @@ -1194,7 +1196,8 @@ zend_string *accel_make_persistent_key(zend_string *str) char *key; int key_length; - ZSTR_LEN(&ZCG(key)) = 0; + ZEND_ASSERT(GC_REFCOUNT(ZCG(key)) == 1); + ZSTR_LEN(ZCG(key)) = 0; /* CWD and include_path don't matter for absolute file names and streams */ if (IS_ABSOLUTE_PATH(path, path_length)) { @@ -1304,7 +1307,7 @@ zend_string *accel_make_persistent_key(zend_string *str) } /* Calculate key length */ - if (UNEXPECTED((size_t)(cwd_len + path_length + include_path_len + 2) >= sizeof(ZCG(_key)))) { + if (UNEXPECTED((size_t)(cwd_len + path_length + include_path_len + 2) >= ZCG_KEY_LEN)) { return NULL; } @@ -1313,7 +1316,7 @@ zend_string *accel_make_persistent_key(zend_string *str) * since in itself, it may include colons (which we use to separate * different components of the key) */ - key = ZSTR_VAL(&ZCG(key)); + key = ZSTR_VAL(ZCG(key)); memcpy(key, path, path_length); key[path_length] = ':'; key_length = path_length + 1; @@ -1337,7 +1340,7 @@ zend_string *accel_make_persistent_key(zend_string *str) parent_script_len = ZSTR_LEN(parent_script); while ((--parent_script_len > 0) && !IS_SLASH(ZSTR_VAL(parent_script)[parent_script_len])); - if (UNEXPECTED((size_t)(key_length + parent_script_len + 1) >= sizeof(ZCG(_key)))) { + if (UNEXPECTED((size_t)(key_length + parent_script_len + 1) >= ZCG_KEY_LEN)) { return NULL; } key[key_length] = ':'; @@ -1346,11 +1349,9 @@ zend_string *accel_make_persistent_key(zend_string *str) key_length += parent_script_len; } key[key_length] = '\0'; - GC_SET_REFCOUNT(&ZCG(key), 1); - GC_TYPE_INFO(&ZCG(key)) = GC_STRING; - ZSTR_H(&ZCG(key)) = 0; - ZSTR_LEN(&ZCG(key)) = key_length; - return &ZCG(key); + ZSTR_H(ZCG(key)) = 0; + ZSTR_LEN(ZCG(key)) = key_length; + return ZCG(key); } /* not use_cwd */ @@ -2025,8 +2026,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) ZCG(cache_opline) == EG(current_execute_data)->opline))) { persistent_script = ZCG(cache_persistent_script); - if (ZSTR_LEN(&ZCG(key))) { - key = &ZCG(key); + if (ZSTR_LEN(ZCG(key))) { + key = ZCG(key); } } else { @@ -2579,7 +2580,7 @@ static zend_string* persistent_zend_resolve_path(zend_string *filename) SHM_PROTECT(); HANDLE_UNBLOCK_INTERRUPTIONS(); } else { - ZSTR_LEN(&ZCG(key)) = 0; + ZSTR_LEN(ZCG(key)) = 0; } ZCG(cache_opline) = EG(current_execute_data) ? EG(current_execute_data)->opline : NULL; ZCG(cache_persistent_script) = persistent_script; @@ -2951,7 +2952,16 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals) ZEND_TSRMLS_CACHE_UPDATE(); #endif memset(accel_globals, 0, sizeof(zend_accel_globals)); + accel_globals->key = zend_string_alloc(ZCG_KEY_LEN, true); + GC_MAKE_PERSISTENT_LOCAL(accel_globals->key); +} + +#ifdef ZTS +static void accel_globals_dtor(zend_accel_globals *accel_globals) +{ + zend_string_free(accel_globals->key); } +#endif #ifdef HAVE_HUGE_CODE_PAGES # ifndef _WIN32 @@ -3127,7 +3137,7 @@ static void accel_move_code_to_huge_pages(void) static int accel_startup(zend_extension *extension) { #ifdef ZTS - accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, NULL); + accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, (ts_allocate_dtor) accel_globals_dtor); #else accel_globals_ctor(&accel_globals); #endif diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 162892bf2c279..54d55e10e4f5c 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -223,8 +223,7 @@ typedef struct _zend_accel_globals { const zend_op *cache_opline; zend_persistent_script *cache_persistent_script; /* preallocated buffer for keys */ - zend_string key; - char _key[MAXPATHLEN * 8]; + zend_string *key; } zend_accel_globals; typedef struct _zend_string_table { diff --git a/ext/opcache/jit/ir/ir.c b/ext/opcache/jit/ir/ir.c index 17c3954591693..1aa887f6a949e 100644 --- a/ext/opcache/jit/ir/ir.c +++ b/ext/opcache/jit/ir/ir.c @@ -348,6 +348,12 @@ static void ir_grow_top(ir_ctx *ctx) memset(ctx->use_lists + old_insns_limit, 0, (ctx->insns_limit - old_insns_limit) * sizeof(ir_use_list)); } + + if (ctx->cfg_map) { + ctx->cfg_map = ir_mem_realloc(ctx->cfg_map, ctx->insns_limit * sizeof(uint32_t)); + memset(ctx->cfg_map + old_insns_limit, 0, + (ctx->insns_limit - old_insns_limit) * sizeof(uint32_t)); + } } static ir_ref ir_next_insn(ir_ctx *ctx) @@ -1283,9 +1289,11 @@ void ir_build_def_use_lists(ir_ctx *ctx) void ir_use_list_remove_all(ir_ctx *ctx, ir_ref from, ir_ref ref) { ir_ref j, n, *p, *q, use; - ir_use_list *use_list = &ctx->use_lists[from]; + ir_use_list *use_list; ir_ref skip = 0; + IR_ASSERT(from > 0); + use_list = &ctx->use_lists[from]; n = use_list->count; for (j = 0, p = q = &ctx->use_edges[use_list->refs]; j < n; j++, p++) { use = *p; @@ -1310,8 +1318,10 @@ void ir_use_list_remove_all(ir_ctx *ctx, ir_ref from, ir_ref ref) void ir_use_list_remove_one(ir_ctx *ctx, ir_ref from, ir_ref ref) { ir_ref j, n, *p; - ir_use_list *use_list = &ctx->use_lists[from]; + ir_use_list *use_list; + IR_ASSERT(from > 0); + use_list = &ctx->use_lists[from]; n = use_list->count; j = 0; p = &ctx->use_edges[use_list->refs]; @@ -1334,9 +1344,11 @@ void ir_use_list_remove_one(ir_ctx *ctx, ir_ref from, ir_ref ref) void ir_use_list_replace_one(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use) { - ir_use_list *use_list = &ctx->use_lists[ref]; + ir_use_list *use_list; ir_ref i, n, *p; + IR_ASSERT(ref > 0); + use_list = &ctx->use_lists[ref]; n = use_list->count; for (i = 0, p = &ctx->use_edges[use_list->refs]; i < n; i++, p++) { if (*p == use) { @@ -1348,9 +1360,11 @@ void ir_use_list_replace_one(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use void ir_use_list_replace_all(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use) { - ir_use_list *use_list = &ctx->use_lists[ref]; + ir_use_list *use_list; ir_ref i, n, *p; + IR_ASSERT(ref > 0); + use_list = &ctx->use_lists[ref]; n = use_list->count; for (i = 0, p = &ctx->use_edges[use_list->refs]; i < n; i++, p++) { if (*p == use) { @@ -1361,9 +1375,12 @@ void ir_use_list_replace_all(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use bool ir_use_list_add(ir_ctx *ctx, ir_ref to, ir_ref ref) { - ir_use_list *use_list = &ctx->use_lists[to]; - ir_ref n = use_list->refs + use_list->count; + ir_use_list *use_list; + ir_ref n; + IR_ASSERT(to > 0); + use_list = &ctx->use_lists[to]; + n = use_list->refs + use_list->count; if (n < ctx->use_edges_count && ctx->use_edges[n] == IR_UNUSED) { ctx->use_edges[n] = ref; use_list->count++; @@ -1375,6 +1392,11 @@ bool ir_use_list_add(ir_ctx *ctx, ir_ref to, ir_ref ref) if (old_size < new_size) { /* Reallocate the whole edges buffer (this is inefficient) */ ctx->use_edges = ir_mem_realloc(ctx->use_edges, new_size); + } else if (n == ctx->use_edges_count) { + ctx->use_edges[n] = ref; + use_list->count++; + ctx->use_edges_count++; + return 0; } memcpy(ctx->use_edges + ctx->use_edges_count, ctx->use_edges + use_list->refs, use_list->count * sizeof(ir_ref)); use_list->refs = ctx->use_edges_count; @@ -1385,6 +1407,78 @@ bool ir_use_list_add(ir_ctx *ctx, ir_ref to, ir_ref ref) } } +static int ir_ref_cmp(const void *p1, const void *p2) +{ + return *(ir_ref*)p1 - *(ir_ref*)p2; +} + +void ir_use_list_sort(ir_ctx *ctx, ir_ref ref) +{ + ir_use_list *use_list; + uint32_t n; + + IR_ASSERT(ref > 0); + use_list = &ctx->use_lists[ref]; + n = use_list->count; + if (n > 1) { + qsort(ctx->use_edges + use_list->refs, n, sizeof(ir_ref), ir_ref_cmp); + } +} + +void ir_replace(ir_ctx *ctx, ir_ref ref, ir_ref new_ref) +{ + int i, j, n, *p, use; + ir_insn *insn; + ir_use_list *use_list; + + IR_ASSERT(ref != new_ref); + use_list = &ctx->use_lists[ref]; + n = use_list->count; + p = ctx->use_edges + use_list->refs; + + if (new_ref < 0) { + /* constant or IR_UNUSED */ + for (; n; p++, n--) { + use = *p; + IR_ASSERT(use != ref); + insn = &ctx->ir_base[use]; + j = ir_insn_find_op(insn, ref); + IR_ASSERT(j > 0); + ir_insn_set_op(insn, j, new_ref); + } + } else { + for (i = 0; i < n; p++, i++) { + use = *p; + IR_ASSERT(use != ref); + insn = &ctx->ir_base[use]; + j = ir_insn_find_op(insn, ref); + IR_ASSERT(j > 0); + ir_insn_set_op(insn, j, new_ref); + if (ir_use_list_add(ctx, new_ref, use)) { + /* restore after reallocation */ + use_list = &ctx->use_lists[ref]; + n = use_list->count; + p = &ctx->use_edges[use_list->refs + i]; + } + } + } +} + +void ir_update_op(ir_ctx *ctx, ir_ref ref, uint32_t idx, ir_ref new_val) +{ + ir_insn *insn = &ctx->ir_base[ref]; + ir_ref old_val = ir_insn_op(insn, idx); + + IR_ASSERT(old_val != new_val); + if (new_val > 0) { + ir_use_list_add(ctx, new_val, ref); + } + ir_insn_set_op(insn, idx, new_val); + if (old_val > 0) { + ir_use_list_remove_one(ctx, old_val, ref); + } +} + /* Helper Data Types */ void ir_array_grow(ir_array *a, uint32_t size) { @@ -1428,16 +1522,16 @@ void ir_list_remove(ir_list *l, uint32_t i) l->len--; } -bool ir_list_contains(const ir_list *l, ir_ref val) +uint32_t ir_list_find(const ir_list *l, ir_ref val) { uint32_t i; for (i = 0; i < l->len; i++) { if (ir_array_at(&l->a, i) == val) { - return 1; + return i; } } - return 0; + return (uint32_t)-1; } static uint32_t ir_hashtab_hash_size(uint32_t size) @@ -2010,18 +2104,22 @@ ir_ref _ir_PHI_N(ir_ctx *ctx, ir_type type, ir_ref n, ir_ref *inputs) return inputs[0]; } else { ir_ref i; - ir_ref ref = inputs[0]; - - IR_ASSERT(ctx->ir_base[ctx->control].op == IR_MERGE || ctx->ir_base[ctx->control].op == IR_LOOP_BEGIN); - if (ref != IR_UNUSED) { - for (i = 1; i < n; i++) { - if (inputs[i] != ref) { - break; + ir_ref ref; + + if (UNEXPECTED(!(ctx->flags & IR_OPT_FOLDING))) { + IR_ASSERT(ctx->ir_base[ctx->control].op == IR_MERGE + || ctx->ir_base[ctx->control].op == IR_LOOP_BEGIN); + ref = inputs[0]; + if (ref != IR_UNUSED) { + for (i = 1; i < n; i++) { + if (inputs[i] != ref) { + break; + } + } + if (i == n) { + /* all the same */ + return ref; } - } - if (i == n) { - /* all the same */ - return ref; } } @@ -2066,7 +2164,8 @@ void _ir_ENTRY(ir_ctx *ctx, ir_ref src, ir_ref num) void _ir_BEGIN(ir_ctx *ctx, ir_ref src) { IR_ASSERT(!ctx->control); - if (src + if (EXPECTED(ctx->flags & IR_OPT_FOLDING) + && src && src + 1 == ctx->insns_count && ctx->ir_base[src].op == IR_END) { /* merge with the last END */ @@ -2095,8 +2194,14 @@ ir_ref _ir_IF(ir_ctx *ctx, ir_ref condition) { ir_ref if_ref; - condition = _ir_fold_condition(ctx, condition); IR_ASSERT(ctx->control); + if (UNEXPECTED(!(ctx->flags & IR_OPT_FOLDING))) { + if_ref = ir_emit2(ctx, IR_IF, ctx->control, condition); + ctx->control = IR_UNUSED; + return if_ref; + } + + condition = _ir_fold_condition(ctx, condition); if (IR_IS_CONST_REF(condition)) { condition = ir_ref_is_true(ctx, condition) ? IR_TRUE : IR_FALSE; } else { @@ -2649,7 +2754,7 @@ void _ir_GUARD(ir_ctx *ctx, ir_ref condition, ir_ref addr) return; } condition = IR_FALSE; - } else { + } else if (EXPECTED(ctx->flags & IR_OPT_FOLDING)) { ir_insn *prev = NULL; ir_ref ref = ctx->control; ir_insn *insn; @@ -2695,7 +2800,7 @@ void _ir_GUARD_NOT(ir_ctx *ctx, ir_ref condition, ir_ref addr) return; } condition = IR_TRUE; - } else { + } else if (EXPECTED(ctx->flags & IR_OPT_FOLDING)) { ir_insn *prev = NULL; ir_ref ref = ctx->control; ir_insn *insn; @@ -2779,6 +2884,10 @@ ir_ref _ir_VLOAD(ir_ctx *ctx, ir_type type, ir_ref var) ir_ref ref = ctx->control; ir_insn *insn; + if (UNEXPECTED(!(ctx->flags & IR_OPT_FOLDING))) { + IR_ASSERT(ctx->control); + return ctx->control = ir_emit2(ctx, IR_OPT(IR_VLOAD, type), ctx->control, var); + } while (ref > var) { insn = &ctx->ir_base[ref]; if (insn->op == IR_VLOAD) { @@ -2825,6 +2934,12 @@ void _ir_VSTORE(ir_ctx *ctx, ir_ref var, ir_ref val) ir_insn *insn; bool guarded = 0; + if (UNEXPECTED(!(ctx->flags & IR_OPT_FOLDING))) { + IR_ASSERT(ctx->control); + ctx->control = ir_emit3(ctx, IR_VSTORE, ctx->control, var, val); + return; + } + if (!IR_IS_CONST_REF(val)) { insn = &ctx->ir_base[val]; if (insn->op == IR_BITCAST @@ -2893,9 +3008,12 @@ void _ir_RSTORE(ir_ctx *ctx, ir_ref reg, ir_ref val) ir_ref _ir_LOAD(ir_ctx *ctx, ir_type type, ir_ref addr) { - ir_ref ref = ir_find_aliasing_load(ctx, ctx->control, type, addr); + ir_ref ref = IR_UNUSED; IR_ASSERT(ctx->control); + if (EXPECTED(ctx->flags & IR_OPT_FOLDING)) { + ref = ir_find_aliasing_load(ctx, ctx->control, type, addr); + } if (!ref) { ctx->control = ref = ir_emit2(ctx, IR_OPT(IR_LOAD, type), ctx->control, addr); } @@ -2912,6 +3030,12 @@ void _ir_STORE(ir_ctx *ctx, ir_ref addr, ir_ref val) ir_type type2; bool guarded = 0; + IR_ASSERT(ctx->control); + if (UNEXPECTED(!(ctx->flags & IR_OPT_FOLDING))) { + ctx->control = ir_emit3(ctx, IR_STORE, ctx->control, addr, val); + return; + } + if (!IR_IS_CONST_REF(val)) { insn = &ctx->ir_base[val]; if (insn->op == IR_BITCAST @@ -2922,7 +3046,6 @@ void _ir_STORE(ir_ctx *ctx, ir_ref addr, ir_ref val) } } - IR_ASSERT(ctx->control); while (ref > limit) { insn = &ctx->ir_base[ref]; if (insn->op == IR_STORE) { diff --git a/ext/opcache/jit/ir/ir.h b/ext/opcache/jit/ir/ir.h index 433c59472f560..2670fdfa96d4f 100644 --- a/ext/opcache/jit/ir/ir.h +++ b/ext/opcache/jit/ir/ir.h @@ -29,7 +29,9 @@ extern "C" { # endif /* Only supported is little endian for any arch on Windows, so just fake the same for all. */ -# define __ORDER_LITTLE_ENDIAN__ 1 +# ifndef __ORDER_LITTLE_ENDIAN__ +# define __ORDER_LITTLE_ENDIAN__ 1 +# endif # define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ # ifndef __has_builtin # define __has_builtin(arg) (0) @@ -705,6 +707,7 @@ ir_ref ir_emit3(ir_ctx *ctx, uint32_t opt, ir_ref op1, ir_ref op2, ir_ref op3); ir_ref ir_emit_N(ir_ctx *ctx, uint32_t opt, int32_t count); void ir_set_op(ir_ctx *ctx, ir_ref ref, int32_t n, ir_ref val); +ir_ref ir_get_op(ir_ctx *ctx, ir_ref ref, int32_t n); IR_ALWAYS_INLINE void ir_set_op1(ir_ctx *ctx, ir_ref ref, ir_ref val) { @@ -721,8 +724,6 @@ IR_ALWAYS_INLINE void ir_set_op3(ir_ctx *ctx, ir_ref ref, ir_ref val) ctx->ir_base[ref].op3 = val; } -ir_ref ir_get_op(ir_ctx *ctx, ir_ref ref, int32_t n); - IR_ALWAYS_INLINE ir_ref ir_insn_op(const ir_insn *insn, int32_t n) { const ir_ref *p = insn->ops + n; @@ -735,6 +736,18 @@ IR_ALWAYS_INLINE void ir_insn_set_op(ir_insn *insn, int32_t n, ir_ref val) *p = val; } +IR_ALWAYS_INLINE uint32_t ir_insn_find_op(const ir_insn *insn, ir_ref val) +{ + int i, n = insn->inputs_count; + + for (i = 1; i <= n; i++) { + if (ir_insn_op(insn, i) == val) { + return i; + } + } + return 0; +} + ir_ref ir_fold(ir_ctx *ctx, uint32_t opt, ir_ref op1, ir_ref op2, ir_ref op3); ir_ref ir_fold0(ir_ctx *ctx, uint32_t opt); @@ -947,10 +960,12 @@ IR_ALWAYS_INLINE void *ir_jit_compile(ir_ctx *ctx, int opt_level, size_t *size) || !ir_mem2ssa(ctx)) { return NULL; } + if (opt_level > 1) { + ir_reset_cfg(ctx); + } } if (opt_level > 1) { - ir_reset_cfg(ctx); if (!ir_sccp(ctx)) { return NULL; } diff --git a/ext/opcache/jit/ir/ir_aarch64.dasc b/ext/opcache/jit/ir/ir_aarch64.dasc index 6b397f27b31ad..b96d47461196c 100644 --- a/ext/opcache/jit/ir/ir_aarch64.dasc +++ b/ext/opcache/jit/ir/ir_aarch64.dasc @@ -925,7 +925,7 @@ binop_fp: if (ctx->flags & IR_FUNCTION) { ctx->flags |= IR_USE_FRAME_POINTER; } - ctx->flags2 |= IR_HAS_CALLS | IR_16B_FRAME_ALIGNMENT; + ctx->flags2 |= IR_HAS_CALLS; return IR_CALL; case IR_VAR: return IR_SKIPPED | IR_VAR; @@ -941,7 +941,7 @@ binop_fp: } } ctx->flags |= IR_USE_FRAME_POINTER; - ctx->flags2 |= IR_HAS_ALLOCA | IR_16B_FRAME_ALIGNMENT; + ctx->flags2 |= IR_HAS_ALLOCA; } return IR_ALLOCA; case IR_LOAD: @@ -5788,12 +5788,12 @@ void ir_fix_stack_frame(ir_ctx *ctx) ctx->stack_frame_alignment = 0; ctx->call_stack_size = 0; - if ((ctx->flags2 & IR_16B_FRAME_ALIGNMENT) && !(ctx->flags & IR_FUNCTION)) { + if (!(ctx->flags & IR_FUNCTION)) { while (IR_ALIGNED_SIZE(ctx->stack_frame_size, 16) != ctx->stack_frame_size) { ctx->stack_frame_size += sizeof(void*); ctx->stack_frame_alignment += sizeof(void*); } - } else if (ctx->flags2 & IR_16B_FRAME_ALIGNMENT) { + } else { /* Stack must be 16 byte aligned */ if (!(ctx->flags & IR_FUNCTION)) { while (IR_ALIGNED_SIZE(ctx->stack_frame_size, 16) != ctx->stack_frame_size) { diff --git a/ext/opcache/jit/ir/ir_builder.h b/ext/opcache/jit/ir/ir_builder.h index 0fbdcb3e04586..208c1ae4c8167 100644 --- a/ext/opcache/jit/ir/ir_builder.h +++ b/ext/opcache/jit/ir/ir_builder.h @@ -461,7 +461,7 @@ extern "C" { #define ir_COND_A(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_ADDR), (_op1), (_op2), (_op3)) #define ir_COND_C(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_CHAR), (_op1), (_op2), (_op3)) #define ir_COND_I8(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_I8), (_op1), (_op2), (_op3)) -#define ir_COND_I16(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COMD, IR_I16), (_op1), (_op2), (_op3)) +#define ir_COND_I16(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_I16), (_op1), (_op2), (_op3)) #define ir_COND_I32(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_I32), (_op1), (_op2), (_op3)) #define ir_COND_I64(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_I64), (_op1), (_op2), (_op3)) #define ir_COND_D(_op1, _op2, _op3) ir_fold3(_ir_CTX, IR_OPT(IR_COND, IR_DOUBLE), (_op1), (_op2), (_op3)) diff --git a/ext/opcache/jit/ir/ir_cfg.c b/ext/opcache/jit/ir/ir_cfg.c index 7a71208d7823c..3678867e46c7a 100644 --- a/ext/opcache/jit/ir/ir_cfg.c +++ b/ext/opcache/jit/ir/ir_cfg.c @@ -92,7 +92,7 @@ int ir_build_cfg(ir_ctx *ctx) uint32_t len = ir_bitset_len(ctx->insns_count); ir_bitset bb_starts = ir_mem_calloc(len * 2, IR_BITSET_BITS / 8); ir_bitset bb_leaks = bb_starts + len; - _blocks = ir_mem_calloc(ctx->insns_count, sizeof(uint32_t)); + _blocks = ir_mem_calloc(ctx->insns_limit, sizeof(uint32_t)); ir_worklist_init(&worklist, ctx->insns_count); /* First try to perform backward DFS search starting from "stop" nodes */ diff --git a/ext/opcache/jit/ir/ir_check.c b/ext/opcache/jit/ir/ir_check.c index 656f8dbe7c1a2..0e0bf3ca4c535 100644 --- a/ext/opcache/jit/ir/ir_check.c +++ b/ext/opcache/jit/ir/ir_check.c @@ -291,6 +291,12 @@ bool ir_check(const ir_ctx *ctx) ok = 0; } break; + case IR_PARAM: + if (i > 2 && ctx->ir_base[i - 1].op != IR_PARAM) { + fprintf(stderr, "ir_base[%d].op PARAMs must be used only right after START\n", i); + ok = 0; + } + break; } if (ctx->use_lists) { diff --git a/ext/opcache/jit/ir/ir_emit.c b/ext/opcache/jit/ir/ir_emit.c index 83fc242a20c11..367dee72963bf 100644 --- a/ext/opcache/jit/ir/ir_emit.c +++ b/ext/opcache/jit/ir/ir_emit.c @@ -272,10 +272,10 @@ static bool ir_is_same_mem_var(const ir_ctx *ctx, ir_ref r1, int32_t offset) void *ir_resolve_sym_name(const char *name) { - void *handle = NULL; void *addr; #ifndef _WIN32 + void *handle = NULL; # ifdef RTLD_DEFAULT handle = RTLD_DEFAULT; # endif diff --git a/ext/opcache/jit/ir/ir_fold.h b/ext/opcache/jit/ir/ir_fold.h index b23ea832df962..f768116976f3b 100644 --- a/ext/opcache/jit/ir/ir_fold.h +++ b/ext/opcache/jit/ir/ir_fold.h @@ -323,13 +323,14 @@ IR_FOLD(ADD(C_I16, C_I16)) IR_FOLD(ADD(C_I32, C_I32)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type || (sizeof(void*) == 4 && IR_OPT_TYPE(opt) == IR_ADDR)); - IR_FOLD_CONST_I(op1_insn->val.i32 + op2_insn->val.i32); + /* Here and below we use "unsigned math" to prevent undefined signed overflow behavior */ + IR_FOLD_CONST_I((int32_t)(op1_insn->val.u32 + op2_insn->val.u32)); } IR_FOLD(ADD(C_I64, C_I64)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type || (sizeof(void*) == 8 && IR_OPT_TYPE(opt) == IR_ADDR)); - IR_FOLD_CONST_I(op1_insn->val.i64 + op2_insn->val.i64); + IR_FOLD_CONST_I(op1_insn->val.u64 + op2_insn->val.u64); } IR_FOLD(ADD(C_DOUBLE, C_DOUBLE)) @@ -393,13 +394,13 @@ IR_FOLD(SUB(C_I16, C_I16)) IR_FOLD(SUB(C_I32, C_I32)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - IR_FOLD_CONST_I(op1_insn->val.i32 - op2_insn->val.i32); + IR_FOLD_CONST_I((int32_t)(op1_insn->val.u32 - op2_insn->val.u32)); } IR_FOLD(SUB(C_I64, C_I64)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - IR_FOLD_CONST_I(op1_insn->val.i64 - op2_insn->val.i64); + IR_FOLD_CONST_I(op1_insn->val.u64 - op2_insn->val.u64); } IR_FOLD(SUB(C_DOUBLE, C_DOUBLE)) @@ -463,13 +464,13 @@ IR_FOLD(MUL(C_I16, C_I16)) IR_FOLD(MUL(C_I32, C_I32)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - IR_FOLD_CONST_I(op1_insn->val.i32 * op2_insn->val.i32); + IR_FOLD_CONST_I((int32_t)(op1_insn->val.u32 * op2_insn->val.u32)); } IR_FOLD(MUL(C_I64, C_I64)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - IR_FOLD_CONST_I(op1_insn->val.i64 * op2_insn->val.i64); + IR_FOLD_CONST_I(op1_insn->val.u64 * op2_insn->val.u64); } IR_FOLD(MUL(C_DOUBLE, C_DOUBLE)) @@ -556,7 +557,7 @@ IR_FOLD(NEG(C_I32)) IR_FOLD(NEG(C_I64)) { IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - IR_FOLD_CONST_I(-op1_insn->val.i64); + IR_FOLD_CONST_I(-op1_insn->val.u64); } IR_FOLD(NEG(C_DOUBLE)) @@ -580,7 +581,7 @@ IR_FOLD(ABS(C_I64)) if (op1_insn->val.i64 >= 0) { IR_FOLD_COPY(op1); } else { - IR_FOLD_CONST_I(-op1_insn->val.i64); + IR_FOLD_CONST_I(-op1_insn->val.u64); } } @@ -680,7 +681,7 @@ IR_FOLD(MUL_OV(C_I64, C_I64)) int64_t min = - max - 1; int64_t res; IR_ASSERT(IR_OPT_TYPE(opt) == op1_insn->type); - res = op1_insn->val.i64 * op2_insn->val.i64; + res = op1_insn->val.u64 * op2_insn->val.u64; if (op1_insn->val.i64 != 0 && res / op1_insn->val.i64 != op2_insn->val.i64 && res >= min && res <= max) { IR_FOLD_NEXT; } @@ -1808,10 +1809,6 @@ IR_FOLD(MUL(_, C_ADDR)) IR_FOLD_COPY(op2); } else if (op2_insn->val.u64 == 1) { IR_FOLD_COPY(op1); - } else if (op2_insn->val.u64 == 2 && IR_OPT_TYPE(opt) != IR_ADDR) { - opt = IR_ADD | (opt & IR_OPT_TYPE_MASK); - op2 = op1; - IR_FOLD_RESTART; } IR_FOLD_NEXT; } @@ -1827,11 +1824,6 @@ IR_FOLD(MUL(_, C_I64)) } else if (op2_insn->val.i64 == 1) { /* a * 1 => a */ IR_FOLD_COPY(op1); - } else if (op2_insn->val.i64 == 2) { - /* a * 2 => a + a */ - opt = IR_ADD | (opt & IR_OPT_TYPE_MASK); - op2 = op1; - IR_FOLD_RESTART; } else if (op2_insn->val.i64 == -1) { /* a * -1 => -a */ opt = IR_NEG | (opt & IR_OPT_TYPE_MASK); @@ -2527,7 +2519,7 @@ IR_FOLD(ADD(ADD, C_I64)) { if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x + c1) + c2 => x + (c1 + c2) */ - val.i64 = ctx->ir_base[op1_insn->op2].val.i64 + op2_insn->val.i64; + val.i64 = ctx->ir_base[op1_insn->op2].val.u64 + op2_insn->val.u64; op1 = op1_insn->op1; op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); IR_FOLD_RESTART; @@ -2565,8 +2557,8 @@ IR_FOLD(ADD(SUB, C_I64)) { if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x - c1) + c2 => x + (c2 - c1) */ - val.i64 = op2_insn->val.i64 - ctx->ir_base[op1_insn->op2].val.i64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + val.i64 = op2_insn->val.u64 - ctx->ir_base[op1_insn->op2].val.u64; + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; opt++; /* ADD -> SUB */ } @@ -2575,7 +2567,7 @@ IR_FOLD(ADD(SUB, C_I64)) IR_FOLD_RESTART; } else if (IR_IS_CONST_REF(op1_insn->op1) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op1].op)) { /* (c1 - x) + c2 => (c1 + c2) - x */ - val.i64 = ctx->ir_base[op1_insn->op1].val.i64 + op2_insn->val.i64; + val.i64 = ctx->ir_base[op1_insn->op1].val.u64 + op2_insn->val.u64; opt++; /* ADD -> SUB */ op2 = op1_insn->op2; op1 = ir_const(ctx, val, IR_OPT_TYPE(opt)); @@ -2608,8 +2600,8 @@ IR_FOLD(SUB(ADD, C_I64)) { if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x + c1) - c2 => x + (c1 - c2) */ - val.i64 = ctx->ir_base[op1_insn->op2].val.i64 - op2_insn->val.i64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + val.i64 = ctx->ir_base[op1_insn->op2].val.u64 - op2_insn->val.u64; + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; } else { opt--; /* SUB -> ADD */ @@ -2644,7 +2636,7 @@ IR_FOLD(SUB(C_I64, ADD)) { if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { /* c1 - (x + c2) => (c1 - c2) - x */ - val.i64 = op1_insn->val.i64 - ctx->ir_base[op2_insn->op2].val.i64; + val.i64 = op1_insn->val.u64 - ctx->ir_base[op2_insn->op2].val.u64; op2 = op2_insn->op1; op1 = ir_const(ctx, val, IR_OPT_TYPE(opt)); IR_FOLD_RESTART; @@ -2661,7 +2653,7 @@ IR_FOLD(SUB(SUB, C_ADDR)) if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x - c1) - c2 => x - (c1 + c2) */ val.u64 = ctx->ir_base[op1_insn->op2].val.u64 + op2_insn->val.u64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; opt--; /* SUB -> ADD */ } @@ -2685,8 +2677,8 @@ IR_FOLD(SUB(SUB, C_I64)) { if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x - c1) - c2 => x - (c1 + c2) */ - val.i64 = ctx->ir_base[op1_insn->op2].val.i64 + op2_insn->val.i64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + val.i64 = ctx->ir_base[op1_insn->op2].val.u64 + op2_insn->val.u64; + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; opt--; /* SUB -> ADD */ } @@ -2695,7 +2687,7 @@ IR_FOLD(SUB(SUB, C_I64)) IR_FOLD_RESTART; } else if (IR_IS_CONST_REF(op1_insn->op1) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op1].op)) { /* (c1 - x) - c2 => (c1 - c2) - x */ - val.i64 = ctx->ir_base[op1_insn->op1].val.i64 - op2_insn->val.i64; + val.i64 = ctx->ir_base[op1_insn->op1].val.u64 - op2_insn->val.u64; op2 = op1_insn->op2; op1 = ir_const(ctx, val, IR_OPT_TYPE(opt)); IR_FOLD_RESTART; @@ -2718,7 +2710,7 @@ IR_FOLD(SUB(C_ADDR, SUB)) } else if (IR_IS_CONST_REF(op2_insn->op1) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op1].op)) { /* c1 - (c2 - x) => x + (c1 - c2) */ val.u64 = op1_insn->val.u64 - ctx->ir_base[op2_insn->op1].val.u64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; opt++; /* ADD -> SUB */ } @@ -2736,14 +2728,14 @@ IR_FOLD(SUB(C_I64, SUB)) { if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { /* c1 - (x - c2) => (c1 + c2) - x */ - val.i64 = op1_insn->val.i64 + ctx->ir_base[op2_insn->op2].val.i64; + val.i64 = op1_insn->val.u64 + ctx->ir_base[op2_insn->op2].val.u64; op2 = op2_insn->op1; op1 = ir_const(ctx, val, IR_OPT_TYPE(opt)); IR_FOLD_RESTART; } else if (IR_IS_CONST_REF(op2_insn->op1) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op1].op)) { /* c1 - (c2 - x) => x + (c1 - c2) */ - val.i64 = op1_insn->val.i64 - ctx->ir_base[op2_insn->op1].val.i64; - if (val.i64 < 0 && val.i64 - 1 < 0) { + val.i64 = op1_insn->val.u64 - ctx->ir_base[op2_insn->op1].val.u64; + if (val.i64 < 0 && val.i64 != INT64_MIN) { val.i64 = -val.i64; opt++; /* ADD -> SUB */ } @@ -2777,7 +2769,7 @@ IR_FOLD(MUL(MUL, C_I64)) { if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { /* (x * c1) * c2 => x * (c1 * c2) */ - val.i64 = ctx->ir_base[op1_insn->op2].val.i64 * op2_insn->val.i64; + val.i64 = ctx->ir_base[op1_insn->op2].val.u64 * op2_insn->val.u64; op1 = op1_insn->op1; op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); IR_FOLD_RESTART; @@ -2907,7 +2899,6 @@ IR_FOLD(ADD(SHR, SHL)) /* Swap operands (move lower ref to op2) for better CSE */ -IR_FOLD(ADD(_, _)) IR_FOLD(MUL(_, _)) IR_FOLD_NAMED(swap_ops) { @@ -2929,6 +2920,19 @@ IR_FOLD(MUL_OV(_, _)) IR_FOLD_EMIT; } +IR_FOLD(ADD(_, _)) +{ + if (IR_IS_TYPE_INT(IR_OPT_TYPE(opt)) && op1 == op2) { + /* a + a => a * 2 */ + IR_ASSERT(!IR_IS_CONST_REF(op1)); + val.u64 = 2; + opt = IR_MUL | (opt & IR_OPT_TYPE_MASK); + op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); + IR_FOLD_RESTART; + } + IR_FOLD_DO_NAMED(swap_ops); +} + IR_FOLD(SUB(_, _)) { if (IR_IS_TYPE_INT(IR_OPT_TYPE(opt)) && op1 == op2) { diff --git a/ext/opcache/jit/ir/ir_private.h b/ext/opcache/jit/ir/ir_private.h index f88ba75496921..f980b86b89320 100644 --- a/ext/opcache/jit/ir/ir_private.h +++ b/ext/opcache/jit/ir/ir_private.h @@ -137,9 +137,10 @@ IR_ALWAYS_INLINE uint32_t ir_ntz(uint32_t num) /* Number of trailing zero bits (0x01 -> 0; 0x40 -> 6; 0x00 -> LEN) */ IR_ALWAYS_INLINE uint32_t ir_ntzl(uint64_t num) { -#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) - return __builtin_ctzl(num); -#elif defined(_WIN64) + // Note that the _WIN64 case should come before __has_builtin() below so that + // clang-cl on Windows will use the uint64_t version, not the "long" uint32_t + // version. +#if defined(_WIN64) unsigned long index; if (!_BitScanForward64(&index, num)) { @@ -148,6 +149,8 @@ IR_ALWAYS_INLINE uint32_t ir_ntzl(uint64_t num) } return (uint32_t) index; +#elif (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) + return __builtin_ctzl(num); #else uint32_t n; @@ -701,7 +704,7 @@ typedef struct _ir_list { uint32_t len; } ir_list; -bool ir_list_contains(const ir_list *l, ir_ref val); +uint32_t ir_list_find(const ir_list *l, ir_ref val); void ir_list_insert(ir_list *l, uint32_t i, ir_ref val); void ir_list_remove(ir_list *l, uint32_t i); @@ -766,6 +769,19 @@ IR_ALWAYS_INLINE void ir_list_set(ir_list *l, uint32_t i, ir_ref val) ir_array_set_unchecked(&l->a, i, val); } +/* Doesn't preserve order */ +IR_ALWAYS_INLINE void ir_list_del(ir_list *l, uint32_t i) +{ + IR_ASSERT(i < l->len); + l->len--; + ir_array_set_unchecked(&l->a, i, ir_array_at(&l->a, l->len)); +} + +IR_ALWAYS_INLINE bool ir_list_contains(const ir_list *l, ir_ref val) +{ + return ir_list_find(l, val) != (uint32_t)-1; +} + /* Worklist (unique list) */ typedef struct _ir_worklist { ir_list l; @@ -1019,11 +1035,12 @@ struct _ir_use_list { ir_ref count; }; -void ir_use_list_remove_all(ir_ctx *ctx, ir_ref from, ir_ref use); -void ir_use_list_remove_one(ir_ctx *ctx, ir_ref from, ir_ref use); -void ir_use_list_replace_all(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use); -void ir_use_list_replace_one(ir_ctx *ctx, ir_ref ref, ir_ref use, ir_ref new_use); -bool ir_use_list_add(ir_ctx *ctx, ir_ref to, ir_ref new_use); +void ir_use_list_remove_all(ir_ctx *ctx, ir_ref def, ir_ref use); +void ir_use_list_remove_one(ir_ctx *ctx, ir_ref def, ir_ref use); +void ir_use_list_replace_all(ir_ctx *ctx, ir_ref def, ir_ref use, ir_ref new_use); +void ir_use_list_replace_one(ir_ctx *ctx, ir_ref def, ir_ref use, ir_ref new_use); +bool ir_use_list_add(ir_ctx *ctx, ir_ref def, ir_ref use); +void ir_use_list_sort(ir_ctx *ctx, ir_ref def); IR_ALWAYS_INLINE ir_ref ir_next_control(const ir_ctx *ctx, ir_ref ref) { @@ -1068,6 +1085,9 @@ IR_ALWAYS_INLINE ir_ref ir_next_control(const ir_ctx *ctx, ir_ref ref) _insn2 = _tmp; \ } while (0) +void ir_replace(ir_ctx *ctx, ir_ref ref, ir_ref new_ref); +void ir_update_op(ir_ctx *ctx, ir_ref ref, uint32_t idx, ir_ref new_val); + /*** IR Basic Blocks info ***/ #define IR_IS_BB_START(op) \ ((ir_op_flags[op] & IR_OP_FLAG_BB_START) != 0) diff --git a/ext/opcache/jit/ir/ir_sccp.c b/ext/opcache/jit/ir/ir_sccp.c index 05577f05b31ff..680e86c508657 100644 --- a/ext/opcache/jit/ir/ir_sccp.c +++ b/ext/opcache/jit/ir/ir_sccp.c @@ -385,7 +385,7 @@ static void ir_sccp_remove_insn2(ir_ctx *ctx, ir_ref ref, ir_bitqueue *worklist) static void ir_sccp_replace_insn(ir_ctx *ctx, ir_insn *_values, ir_ref ref, ir_ref new_ref, ir_bitqueue *worklist) { - ir_ref j, n, *p, use, k, l; + ir_ref j, n, *p, use, i; ir_insn *insn; ir_use_list *use_list; @@ -409,40 +409,48 @@ static void ir_sccp_replace_insn(ir_ctx *ctx, ir_insn *_values, ir_ref ref, ir_r use_list = &ctx->use_lists[ref]; n = use_list->count; - for (j = 0, p = &ctx->use_edges[use_list->refs]; j < n; j++, p++) { - use = *p; - if (IR_IS_FEASIBLE(use)) { - insn = &ctx->ir_base[use]; - l = insn->inputs_count; - for (k = 1; k <= l; k++) { - if (ir_insn_op(insn, k) == ref) { - ir_insn_set_op(insn, k, new_ref); - } + p = &ctx->use_edges[use_list->refs]; + if (new_ref <= 0) { + /* constant or IR_UNUSED */ + for (; n; p++, n--) { + use = *p; + /* we may skip nodes that are going to be removed by SCCP (TOP, CONST and COPY) */ + if (_values[use].op > IR_COPY) { + insn = &ctx->ir_base[use]; + i = ir_insn_find_op(insn, ref); + if (!i) continue; + IR_ASSERT(i > 0); + ir_insn_set_op(insn, i, new_ref); + /* schedule folding */ + ir_bitqueue_add(worklist, use); } -#if IR_COMBO_COPY_PROPAGATION - if (new_ref > 0 && IR_IS_BOTTOM(use)) { + } + } else { + for (j = 0; j < n; j++, p++) { + use = *p; + /* we may skip nodes that are going to be removed by SCCP (TOP, CONST and COPY) */ + if (_values[use].optx == IR_BOTTOM) { + insn = &ctx->ir_base[use]; + i = ir_insn_find_op(insn, ref); + IR_ASSERT(i > 0); + ir_insn_set_op(insn, i, new_ref); if (ir_use_list_add(ctx, new_ref, use)) { /* restore after reallocation */ use_list = &ctx->use_lists[ref]; n = use_list->count; p = &ctx->use_edges[use_list->refs + j]; } - } -#endif - /* we may skip nodes that are going to be removed by SCCP (TOP, CONST and COPY) */ - if (worklist && _values[use].op > IR_COPY) { /* schedule folding */ ir_bitqueue_add(worklist, use); } } } - CLEAR_USES(ref); } static void ir_sccp_replace_insn2(ir_ctx *ctx, ir_ref ref, ir_ref new_ref, ir_bitqueue *worklist) { - ir_ref j, n, *p, use, k, l; + ir_ref i, j, n, *p, use; ir_insn *insn; ir_use_list *use_list; @@ -468,29 +476,37 @@ static void ir_sccp_replace_insn2(ir_ctx *ctx, ir_ref ref, ir_ref new_ref, ir_bi use_list = &ctx->use_lists[ref]; n = use_list->count; - for (j = 0, p = &ctx->use_edges[use_list->refs]; j < n; j++, p++) { - use = *p; - insn = &ctx->ir_base[use]; - l = insn->inputs_count; - for (k = 1; k <= l; k++) { - if (ir_insn_op(insn, k) == ref) { - ir_insn_set_op(insn, k, new_ref); - } + p = &ctx->use_edges[use_list->refs]; + if (new_ref <= 0) { + /* constant or IR_UNUSED */ + for (; n; p++, n--) { + use = *p; + IR_ASSERT(use != ref); + insn = &ctx->ir_base[use]; + i = ir_insn_find_op(insn, ref); + IR_ASSERT(i > 0); + ir_insn_set_op(insn, i, new_ref); + /* schedule folding */ + ir_bitqueue_add(worklist, use); } -#if IR_COMBO_COPY_PROPAGATION - if (new_ref > 0) { + } else { + for (j = 0; j < n; j++, p++) { + use = *p; + IR_ASSERT(use != ref); + insn = &ctx->ir_base[use]; + i = ir_insn_find_op(insn, ref); + IR_ASSERT(i > 0); + ir_insn_set_op(insn, i, new_ref); if (ir_use_list_add(ctx, new_ref, use)) { /* restore after reallocation */ use_list = &ctx->use_lists[ref]; n = use_list->count; p = &ctx->use_edges[use_list->refs + j]; } + /* schedule folding */ + ir_bitqueue_add(worklist, use); } -#endif - /* schedule folding */ - ir_bitqueue_add(worklist, use); } - CLEAR_USES(ref); } @@ -1238,7 +1254,7 @@ static void ir_merge_blocks(ir_ctx *ctx, ir_ref end, ir_ref begin, ir_bitqueue * /* connect their predecessor and successor */ ctx->ir_base[next].op1 = prev; - ir_use_list_replace_all(ctx, prev, end, next); + ir_use_list_replace_one(ctx, prev, end, next); if (ctx->ir_base[prev].op == IR_BEGIN || ctx->ir_base[prev].op == IR_MERGE) { ir_bitqueue_add(worklist2, prev); @@ -2483,7 +2499,9 @@ int ir_sccp(ir_ctx *ctx) } else if (value->op == IR_TOP) { /* remove unreachable instruction */ insn = &ctx->ir_base[i]; - if (ir_op_flags[insn->op] & (IR_OP_FLAG_DATA|IR_OP_FLAG_MEM)) { + if (insn->op == IR_NOP) { + /* already removed */ + } else if (ir_op_flags[insn->op] & (IR_OP_FLAG_DATA|IR_OP_FLAG_MEM)) { if (insn->op != IR_PARAM && (insn->op != IR_VAR || _values[insn->op1].op == IR_TOP)) { ir_sccp_remove_insn(ctx, _values, i, &worklist2); } diff --git a/ext/opcache/jit/ir/ir_x86.dasc b/ext/opcache/jit/ir/ir_x86.dasc index bc90dc5966ab5..58c6ed40f7df2 100644 --- a/ext/opcache/jit/ir/ir_x86.dasc +++ b/ext/opcache/jit/ir/ir_x86.dasc @@ -1001,6 +1001,8 @@ const char *ir_reg_name(int8_t reg, ir_type type) _(LEA_SI_OB) \ _(LEA_B_SI) \ _(LEA_SI_B) \ + _(LEA_B_SI_O) \ + _(LEA_SI_B_O) \ _(INC) \ _(DEC) \ _(MUL_PWR2) \ @@ -1581,7 +1583,7 @@ static void ir_match_fuse_addr(ir_ctx *ctx, ir_ref addr_ref) if (!rule) { ctx->rules[addr_ref] = rule = ir_match_insn(ctx, addr_ref); } - if (rule >= IR_LEA_OB && rule <= IR_LEA_SI_B) { + if (rule >= IR_LEA_OB && rule <= IR_LEA_SI_B_O) { ir_use_list *use_list; ir_ref j; @@ -1943,7 +1945,8 @@ static uint32_t ir_match_insn(ir_ctx *ctx, ir_ref ref) } else if ((op1_insn->op == IR_OR || op1_insn->op == IR_AND || op1_insn->op == IR_XOR) || /* GT(ADD(_, _), 0) can't be optimized because ADD may overflow */ ((op1_insn->op == IR_ADD || op1_insn->op == IR_SUB) && - (insn->op == IR_EQ || insn->op == IR_NE))) { + (insn->op == IR_EQ || insn->op == IR_NE || + insn->op == IR_LT || insn->op == IR_GE))) { /* v = BINOP(_, _); CMP(v, 0) => BINOP; SETCC */ if (ir_op_flags[op1_insn->op] & IR_OP_FLAG_COMMUTATIVE) { ir_match_fuse_load_commutative_int(ctx, op1_insn, ref); @@ -1990,14 +1993,20 @@ lea: /* z = MUL(Y, 2|4|8) ... ADD(z, imm32) => SKIP ... LEA [Y*2|4|8+im32] */ ctx->rules[insn->op1] = IR_FUSED | IR_SIMPLE | IR_LEA_SI; return IR_LEA_SI_O; - } else if (rule == IR_LEA_SIB) { + } else if (rule == IR_LEA_SIB || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_SIB)) { /* z = ADD(X, MUL(Y, 2|4|8)) ... ADD(z, imm32) => SKIP ... LEA [X+Y*2|4|8+im32] */ ctx->rules[insn->op1] = IR_FUSED | IR_SIMPLE | IR_LEA_SIB; return IR_LEA_SIB_O; - } else if (rule == IR_LEA_IB) { + } else if (rule == IR_LEA_IB || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_IB)) { /* z = ADD(X, Y) ... ADD(z, imm32) => SKIP ... LEA [X+Y+im32] */ ctx->rules[insn->op1] = IR_FUSED | IR_SIMPLE | IR_LEA_IB; return IR_LEA_IB_O; + } else if (rule == IR_LEA_B_SI || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_B_SI)) { + ctx->rules[insn->op1] = IR_FUSED | IR_SIMPLE | IR_LEA_B_SI; + return IR_LEA_B_SI_O; + } else if (rule == IR_LEA_SI_B || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_SI_B)) { + ctx->rules[insn->op1] = IR_FUSED | IR_SIMPLE | IR_LEA_SI_B; + return IR_LEA_SI_B_O; } } /* ADD(X, imm32) => LEA [X+imm32] */ @@ -2050,7 +2059,7 @@ lea: if (!rule) { ctx->rules[insn->op2] = rule = ir_match_insn(ctx, insn->op2); } - if (rule == IR_LEA_OB) { + if (rule == IR_LEA_OB || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_OB)) { /* x = ADD(X, imm32) ... y = MUL(Y, 2|4|8) ... ADD(y, x) => SKIP ... SKIP ... LEA */ ctx->rules[insn->op2] = IR_FUSED | IR_SIMPLE | IR_LEA_OB; return IR_LEA_SI_OB; @@ -2065,7 +2074,7 @@ lea: if (!rule) { ctx->rules[insn->op2] = rule = ir_match_insn(ctx, insn->op2); } - if (rule == IR_LEA_OB) { + if (rule == IR_LEA_OB || rule == (IR_FUSED | IR_SIMPLE | IR_LEA_OB)) { ctx->rules[insn->op2] = IR_FUSED | IR_SIMPLE | IR_LEA_OB; /* x = ADD(X, imm32) ... ADD(Y, x) => SKIP ... LEA */ return IR_LEA_I_OB; @@ -2602,7 +2611,8 @@ store_int: ((op1_insn->op == IR_OR || op1_insn->op == IR_AND || op1_insn->op == IR_XOR) || /* GT(ADD(_, _), 0) can't be optimized because ADD may overflow */ ((op1_insn->op == IR_ADD || op1_insn->op == IR_SUB) && - (op2_insn->op == IR_EQ || op2_insn->op == IR_NE)))) { + (op2_insn->op == IR_EQ || op2_insn->op == IR_NE || + op2_insn->op == IR_LT || op2_insn->op == IR_GE)))) { /* v = BINOP(_, _); c = CMP(v, 0) ... IF(c) => BINOP; SKIP_CMP ... JCC */ if (ir_op_flags[op1_insn->op] & IR_OP_FLAG_COMMUTATIVE) { ir_match_fuse_load_commutative_int(ctx, op1_insn, ref); @@ -2744,7 +2754,8 @@ store_int: if ((op1_insn->op == IR_OR || op1_insn->op == IR_AND || op1_insn->op == IR_XOR) || /* GT(ADD(_, _), 0) can't be optimized because ADD may overflow */ ((op1_insn->op == IR_ADD || op1_insn->op == IR_SUB) && - (op2_insn->op == IR_EQ || op2_insn->op == IR_NE))) { + (op2_insn->op == IR_EQ || op2_insn->op == IR_NE || + op2_insn->op == IR_LT || op2_insn->op == IR_GE))) { if (ir_op_flags[op1_insn->op] & IR_OP_FLAG_COMMUTATIVE) { ir_match_fuse_load_commutative_int(ctx, op1_insn, ref); ctx->rules[op2_insn->op1] = IR_BINOP_INT | IR_MAY_SWAP; @@ -2768,7 +2779,8 @@ store_int: if ((op_insn->op == IR_OR || op_insn->op == IR_AND || op_insn->op == IR_XOR) || /* GT(ADD(_, _), 0) can't be optimized because ADD may overflow */ ((op_insn->op == IR_ADD || op_insn->op == IR_SUB) && - (op2_insn->op == IR_EQ || op2_insn->op == IR_NE))) { + (op2_insn->op == IR_EQ || op2_insn->op == IR_NE || + op2_insn->op == IR_LT || op2_insn->op == IR_GE))) { if (ctx->ir_base[op_insn->op1].op == IR_LOAD && ctx->ir_base[op_insn->op1].op2 == store_insn->op2) { if (ir_in_same_block(ctx, op_insn->op1) @@ -3286,7 +3298,7 @@ static ir_mem ir_fuse_addr(ir_ctx *ctx, ir_ref root, ir_ref ref) int32_t offset = 0, scale; IR_ASSERT(((rule & IR_RULE_MASK) >= IR_LEA_OB && - (rule & IR_RULE_MASK) <= IR_LEA_SI_B) || + (rule & IR_RULE_MASK) <= IR_LEA_SI_B_O) || rule == IR_STATIC_ALLOCA); switch (rule & IR_RULE_MASK) { default: @@ -3456,6 +3468,22 @@ static ir_mem ir_fuse_addr(ir_ctx *ctx, ir_ref root, ir_ref ref) scale = ctx->ir_base[op1_insn->op2].val.i32; offset_insn = NULL; break; + case IR_LEA_B_SI_O: + offset_insn = insn; + op1_insn = &ctx->ir_base[insn->op1]; + base_reg_ref = insn->op1 * sizeof(ir_ref) + 1; + index_reg_ref = op1_insn->op2 * sizeof(ir_ref) + 1; + op2_insn = &ctx->ir_base[op1_insn->op2]; + scale = ctx->ir_base[op2_insn->op2].val.i32; + break; + case IR_LEA_SI_B_O: + offset_insn = insn; + op1_insn = &ctx->ir_base[insn->op1]; + index_reg_ref = op1_insn->op1 * sizeof(ir_ref) + 1; + base_reg_ref = insn->op1 * sizeof(ir_ref) + 2; + op1_insn = &ctx->ir_base[op1_insn->op1]; + scale = ctx->ir_base[op1_insn->op2].val.i32; + break; case IR_ALLOCA: offset = IR_SPILL_POS_TO_OFFSET(insn->op3); base_reg = (ctx->flags & IR_USE_FRAME_POINTER) ? IR_REG_FRAME_POINTER : IR_REG_STACK_POINTER; @@ -5583,7 +5611,7 @@ static void ir_emit_cmp_int_common2(ir_ctx *ctx, ir_ref root, ir_ref ref, ir_ins ir_emit_cmp_int_common(ctx, type, root, cmp_insn, op1_reg, op1, op2_reg, op2); } -static void _ir_emit_setcc_int(ir_ctx *ctx, uint8_t op, ir_reg def_reg) +static void _ir_emit_setcc_int(ir_ctx *ctx, uint8_t op, ir_reg def_reg, bool after_op) { ir_backend_data *data = ctx->data; dasm_State **Dst = &data->dasm_state; @@ -5598,10 +5626,18 @@ static void _ir_emit_setcc_int(ir_ctx *ctx, uint8_t op, ir_reg def_reg) | setne Rb(def_reg) break; case IR_LT: - | setl Rb(def_reg) + if (after_op) { + | sets Rb(def_reg) + } else { + | setl Rb(def_reg) + } break; case IR_GE: - | setge Rb(def_reg) + if (after_op) { + | setns Rb(def_reg) + } else { + | setge Rb(def_reg) + } break; case IR_LE: | setle Rb(def_reg) @@ -5711,7 +5747,7 @@ static void ir_emit_cmp_int(ir_ctx *ctx, ir_ref def, ir_insn *insn) } } ir_emit_cmp_int_common(ctx, type, def, insn, op1_reg, op1, op2_reg, op2); - _ir_emit_setcc_int(ctx, op, def_reg); + _ir_emit_setcc_int(ctx, op, def_reg, 0); if (IR_REG_SPILLED(ctx->regs[def][0])) { ir_emit_store(ctx, insn->type, def, def_reg); } @@ -5808,7 +5844,7 @@ static void ir_emit_testcc_int(ir_ctx *ctx, ir_ref def, ir_insn *insn) IR_ASSERT(def_reg != IR_REG_NONE); ir_emit_test_int_common(ctx, def, insn->op1, insn->op); - _ir_emit_setcc_int(ctx, insn->op, def_reg); + _ir_emit_setcc_int(ctx, insn->op, def_reg, 0); if (IR_REG_SPILLED(ctx->regs[def][0])) { ir_emit_store(ctx, insn->type, def, def_reg); } @@ -5819,7 +5855,7 @@ static void ir_emit_setcc_int(ir_ctx *ctx, ir_ref def, ir_insn *insn) ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]); IR_ASSERT(def_reg != IR_REG_NONE); - _ir_emit_setcc_int(ctx, insn->op, def_reg); + _ir_emit_setcc_int(ctx, insn->op, def_reg, 1); if (IR_REG_SPILLED(ctx->regs[def][0])) { ir_emit_store(ctx, insn->type, def, def_reg); } @@ -5963,7 +5999,7 @@ static void ir_emit_jmp_false(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next } } -static void ir_emit_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block, uint8_t op, bool int_cmp) +static void ir_emit_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block, uint8_t op, bool int_cmp, bool after_op) { uint32_t true_block, false_block; ir_backend_data *data = ctx->data; @@ -5994,10 +6030,18 @@ static void ir_emit_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint | jne =>true_block break; case IR_LT: - | jl =>true_block + if (after_op) { + | js =>true_block + } else { + | jl =>true_block + } break; case IR_GE: - | jge =>true_block + if (after_op) { + | jns =>true_block + } else { + | jge =>true_block + } break; case IR_LE: | jle =>true_block @@ -6133,7 +6177,7 @@ static void ir_emit_cmp_and_branch_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_i if (!same_comparison) { ir_emit_cmp_int_common(ctx, type, def, cmp_insn, op1_reg, op1, op2_reg, op2); } - ir_emit_jcc(ctx, b, def, insn, next_block, op, 1); + ir_emit_jcc(ctx, b, def, insn, next_block, op, 1, 0); } static void ir_emit_test_and_branch_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) @@ -6149,13 +6193,13 @@ static void ir_emit_test_and_branch_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_ } ir_emit_test_int_common(ctx, def, op2, op); - ir_emit_jcc(ctx, b, def, insn, next_block, op, 1); + ir_emit_jcc(ctx, b, def, insn, next_block, op, 1, 0); } static void ir_emit_cmp_and_branch_fp(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) { ir_op op = ir_emit_cmp_fp_common(ctx, def, insn->op2, &ctx->ir_base[insn->op2]); - ir_emit_jcc(ctx, b, def, insn, next_block, op, 0); + ir_emit_jcc(ctx, b, def, insn, next_block, op, 0, 0); } static void ir_emit_if_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) @@ -6203,7 +6247,7 @@ static void ir_emit_if_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, u } | ASM_MEM_IMM_OP cmp, type, mem, 0 } - ir_emit_jcc(ctx, b, def, insn, next_block, IR_NE, 1); + ir_emit_jcc(ctx, b, def, insn, next_block, IR_NE, 1, 0); } static void ir_emit_cond(ir_ctx *ctx, ir_ref def, ir_insn *insn) @@ -9078,7 +9122,7 @@ static void ir_emit_ijmp(ir_ctx *ctx, ir_ref def, ir_insn *insn) } } -static bool ir_emit_guard_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next_block, uint8_t op, void *addr, bool int_cmp) +static bool ir_emit_guard_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next_block, uint8_t op, void *addr, bool int_cmp, bool after_op) { ir_backend_data *data = ctx->data; dasm_State **Dst = &data->dasm_state; @@ -9112,10 +9156,18 @@ static bool ir_emit_guard_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next | je =>target break; case IR_LT: - | jge =>target + if (after_op) { + | jns =>target + } else { + | jge =>target + } break; case IR_GE: - | jl =>target + if (after_op) { + | js =>target + } else { + | jl =>target + } break; case IR_LE: | jg =>target @@ -9183,10 +9235,18 @@ static bool ir_emit_guard_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next | je &target_addr break; case IR_LT: - | jge &target_addr + if (after_op) { + | jns &target_addr + } else { + | jge &target_addr + } break; case IR_GE: - | jl &target_addr + if (after_op) { + | js &target_addr + } else { + | jl &target_addr + } break; case IR_LE: | jg &target_addr @@ -9251,10 +9311,18 @@ static bool ir_emit_guard_jcc(ir_ctx *ctx, uint32_t b, ir_ref def, uint32_t next | jne &addr break; case IR_LT: - | jl &addr + if (after_op) { + | js &addr + } else { + | jl &addr + } break; case IR_GE: - | jge &addr + if (after_op) { + | jns &addr + } else { + | jge &addr + } break; case IR_LE: | jle &addr @@ -9369,7 +9437,7 @@ static bool ir_emit_guard(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, ui } else { op = IR_NE; } - return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1); + return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1, 0); } else { |.if X64 if (insn->op == IR_GUARD) { @@ -9447,7 +9515,7 @@ static bool ir_emit_guard_cmp_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn * op ^= 1; // reverse } - return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1); + return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1, 0); } static bool ir_emit_guard_cmp_fp(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) @@ -9458,7 +9526,7 @@ static bool ir_emit_guard_cmp_fp(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *i if (insn->op == IR_GUARD) { op ^= 1; // reverse } - return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 0); + return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 0, 0); } static bool ir_emit_guard_test_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) @@ -9467,7 +9535,7 @@ static bool ir_emit_guard_test_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn ir_op op = (insn->op == IR_GUARD) ? IR_EQ : IR_NE; ir_emit_test_int_common(ctx, def, insn->op2, op); - return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1); + return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1, 0); } static bool ir_emit_guard_jcc_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn, uint32_t next_block) @@ -9478,7 +9546,7 @@ static bool ir_emit_guard_jcc_int(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn * if (insn->op == IR_GUARD) { op ^= 1; // reverse } - return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1); + return ir_emit_guard_jcc(ctx, b, def, next_block, op, addr, 1, 1); } static bool ir_emit_guard_overflow(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn) @@ -9528,7 +9596,15 @@ static void ir_emit_lea(ir_ctx *ctx, ir_ref def, ir_type type) && IR_MEM_BASE(mem) != IR_REG_NONE) { ir_reg reg = IR_MEM_BASE(mem); | add Rd(def_reg), Rd(reg) + } else if (IR_MEM_INDEX(mem) == def_reg + && IR_MEM_OFFSET(mem) == 0 + && IR_MEM_SCALE(mem) == 2 + && IR_MEM_BASE(mem) == IR_REG_NONE) { + | add Rd(def_reg), Rd(def_reg) } else { + if (IR_MEM_SCALE(mem) == 2 && IR_MEM_BASE(mem) == IR_REG_NONE) { + mem = IR_MEM(IR_MEM_INDEX(mem), IR_MEM_OFFSET(mem), IR_MEM_INDEX(mem), 1); + } | ASM_TXT_TMEM_OP lea, Rd(def_reg), dword, mem } } else { @@ -9544,7 +9620,15 @@ static void ir_emit_lea(ir_ctx *ctx, ir_ref def, ir_type type) && IR_MEM_BASE(mem) != IR_REG_NONE) { ir_reg reg = IR_MEM_BASE(mem); | add Ra(def_reg), Ra(reg) + } else if (IR_MEM_INDEX(mem) == def_reg + && IR_MEM_OFFSET(mem) == 0 + && IR_MEM_SCALE(mem) == 2 + && IR_MEM_BASE(mem) == IR_REG_NONE) { + | add Ra(def_reg), Ra(def_reg) } else { + if (IR_MEM_SCALE(mem) == 2 && IR_MEM_BASE(mem) == IR_REG_NONE) { + mem = IR_MEM(IR_MEM_INDEX(mem), IR_MEM_OFFSET(mem), IR_MEM_INDEX(mem), 1); + } | ASM_TXT_TMEM_OP lea, Ra(def_reg), aword, mem } } @@ -10453,6 +10537,8 @@ void *ir_emit_code(ir_ctx *ctx, size_t *size_ptr) case IR_LEA_SI_OB: case IR_LEA_B_SI: case IR_LEA_SI_B: + case IR_LEA_B_SI_O: + case IR_LEA_SI_B_O: ir_emit_lea(ctx, i, insn->type); break; case IR_MUL_PWR2: @@ -10575,7 +10661,7 @@ void *ir_emit_code(ir_ctx *ctx, size_t *size_ptr) } else { IR_ASSERT(op >= IR_EQ && op <= IR_UGT); } - ir_emit_jcc(ctx, b, i, insn, _ir_next_block(ctx, _b), op, 1); + ir_emit_jcc(ctx, b, i, insn, _ir_next_block(ctx, _b), op, 1, 1); } break; case IR_GUARD_CMP_INT: diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 21870089e484a..77694e07d132e 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2489,6 +2489,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op goto jit_failure; } goto done; + case ZEND_JMP_FRAMELESS: + if (!zend_jit_jmp_frameless(&ctx, opline, /* exit_addr */ NULL, /* guard */ 0)) { + goto jit_failure; + } + goto done; case ZEND_INIT_METHOD_CALL: if (opline->op2_type != IS_CONST || Z_TYPE_P(RT_CONSTANT(opline, opline->op2)) != IS_STRING) { @@ -2542,6 +2547,23 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op goto jit_failure; } goto done; + case ZEND_FRAMELESS_ICALL_0: + jit_frameless_icall0(jit, opline); + goto done; + case ZEND_FRAMELESS_ICALL_1: + op1_info = OP1_INFO(); + jit_frameless_icall1(jit, opline, op1_info); + goto done; + case ZEND_FRAMELESS_ICALL_2: + op1_info = OP1_INFO(); + op2_info = OP2_INFO(); + jit_frameless_icall2(jit, opline, op1_info, op2_info); + goto done; + case ZEND_FRAMELESS_ICALL_3: + op1_info = OP1_INFO(); + op2_info = OP2_INFO(); + jit_frameless_icall3(jit, opline, op1_info, op2_info, OP1_DATA_INFO()); + goto done; default: break; } @@ -2600,8 +2622,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op /* THROW and EXIT may be used in the middle of BB */ /* don't generate code for the rest of BB */ - /* Skip current opline for call_level computation - * Don't include last opline because end of loop already checks call level of last opline */ + /* Skip current opline for call_level computation because it does not influence call_level. + * Don't include last opline because end of loop already checks call level of last opline. */ i++; for (; i < end; i++) { opline = op_array->opcodes + i; @@ -2611,7 +2633,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op call_level--; } } - opline = op_array->opcodes + i; + opline = op_array->opcodes + end; break; /* stackless execution */ case ZEND_INCLUDE_OR_EVAL: @@ -2644,17 +2666,13 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op case ZEND_FE_FETCH_R: case ZEND_FE_FETCH_RW: case ZEND_BIND_INIT_STATIC_OR_JMP: + case ZEND_JMP_FRAMELESS: if (!zend_jit_handler(&ctx, opline, zend_may_throw(opline, ssa_op, op_array, ssa)) || !zend_jit_cond_jmp(&ctx, opline + 1, ssa->cfg.blocks[b].successors[0])) { goto jit_failure; } break; - case ZEND_JMP_FRAMELESS: - if (!zend_jit_jmp_frameless(&ctx, opline, /* exit_addr */ NULL, /* guard */ 0)) { - goto jit_failure; - } - break; case ZEND_NEW: if (!zend_jit_handler(&ctx, opline, 1)) { return 0; @@ -2692,23 +2710,6 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op call_level--; } break; - case ZEND_FRAMELESS_ICALL_0: - jit_frameless_icall0(jit, opline); - goto done; - case ZEND_FRAMELESS_ICALL_1: - op1_info = OP1_INFO(); - jit_frameless_icall1(jit, opline, op1_info); - goto done; - case ZEND_FRAMELESS_ICALL_2: - op1_info = OP1_INFO(); - op2_info = OP2_INFO(); - jit_frameless_icall2(jit, opline, op1_info, op2_info); - goto done; - case ZEND_FRAMELESS_ICALL_3: - op1_info = OP1_INFO(); - op2_info = OP2_INFO(); - jit_frameless_icall3(jit, opline, op1_info, op2_info, OP1_DATA_INFO()); - goto done; default: if (!zend_jit_handler(&ctx, opline, zend_may_throw(opline, ssa_op, op_array, ssa))) { diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index e14345215f6f4..0aea4eab2bff7 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -8503,18 +8503,16 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co } else { ir_ref num_args_ref; ir_ref if_internal_func = IR_UNUSED; + const size_t func_type_offset = is_closure ? offsetof(zend_closure, func.type) : offsetof(zend_function, type); used_stack = (ZEND_CALL_FRAME_SLOT + opline->extended_value + ZEND_OBSERVER_ENABLED) * sizeof(zval); used_stack_ref = ir_CONST_ADDR(used_stack); + used_stack_ref = ir_HARD_COPY_A(used_stack_ref); /* load constant once */ - if (!is_closure) { - used_stack_ref = ir_HARD_COPY_A(used_stack_ref); /* load constant once */ - - // JIT: if (EXPECTED(ZEND_USER_CODE(func->type))) { - ir_ref tmp = ir_LOAD_U8(ir_ADD_OFFSET(func_ref, offsetof(zend_function, type))); - if_internal_func = ir_IF(ir_AND_U8(tmp, ir_CONST_U8(1))); - ir_IF_FALSE(if_internal_func); - } + // JIT: if (EXPECTED(ZEND_USER_CODE(func->type))) { + ir_ref tmp = ir_LOAD_U8(ir_ADD_OFFSET(func_ref, func_type_offset)); + if_internal_func = ir_IF(ir_AND_U8(tmp, ir_CONST_U8(1))); + ir_IF_FALSE(if_internal_func); // JIT: used_stack += (func->op_array.last_var + func->op_array.T - MIN(func->op_array.num_args, num_args)) * sizeof(zval); num_args_ref = ir_CONST_U32(opline->extended_value); @@ -8541,12 +8539,8 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co } ref = ir_SUB_A(used_stack_ref, ref); - if (is_closure) { - used_stack_ref = ref; - } else { - ir_MERGE_WITH_EMPTY_TRUE(if_internal_func); - used_stack_ref = ir_PHI_2(IR_ADDR, ref, used_stack_ref); - } + ir_MERGE_WITH_EMPTY_TRUE(if_internal_func); + used_stack_ref = ir_PHI_2(IR_ADDR, ref, used_stack_ref); } zend_jit_start_reuse_ip(jit); diff --git a/ext/opcache/tests/jit/gh15981.phpt b/ext/opcache/tests/jit/gh15981.phpt new file mode 100644 index 0000000000000..823b6122dc1d9 --- /dev/null +++ b/ext/opcache/tests/jit/gh15981.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-15981 (Segfault with frameless jumps and minimal JIT) +--EXTENSIONS-- +opcache +--INI-- +opcache.jit=1111 +--FILE-- + +--EXPECTF-- +string(%d) "%s" diff --git a/ext/opcache/tests/jit/gh17307.phpt b/ext/opcache/tests/jit/gh17307.phpt new file mode 100644 index 0000000000000..292d695963c2e --- /dev/null +++ b/ext/opcache/tests/jit/gh17307.phpt @@ -0,0 +1,32 @@ +--TEST-- +GH-17307 (Internal closure causes JIT failure) +--EXTENSIONS-- +opcache +simplexml +bcmath +--INI-- +opcache.jit=1254 +opcache.jit_hot_func=1 +opcache.jit_buffer_size=32M +--FILE-- +"); + +function run_loop($firstTerms, $closure) { + foreach ($firstTerms as $firstTerm) { + \debug_zval_dump($firstTerm); + $closure($firstTerm, "10"); + } +} + +run_loop($simple, bcadd(...)); +echo "Done\n"; + +?> +--EXPECTF-- +object(SimpleXMLElement)#%d (0) refcount(3){ +} +object(SimpleXMLElement)#%d (0) refcount(3){ +} +Done diff --git a/ext/opcache/tests/jit/gh17428.phpt b/ext/opcache/tests/jit/gh17428.phpt new file mode 100644 index 0000000000000..21bb18676322b --- /dev/null +++ b/ext/opcache/tests/jit/gh17428.phpt @@ -0,0 +1,35 @@ +--TEST-- +GH-17428 (Assertion failure ext/opcache/jit/zend_jit_ir.c:8940) +--EXTENSIONS-- +opcache +--INI-- +opcache.jit=1205 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Call to undefined function testConversion() in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 68b76cd1e6fdf..89631960d5677 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1720,9 +1720,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity) cpu = (zend_long)tmp; } else { - zend_string *wcpu = zval_get_string_func(ncpu); - zend_argument_value_error(2, "cpu id invalid type (%s)", ZSTR_VAL(wcpu)); - zend_string_release(wcpu); + zend_argument_type_error(2, "value must be of type int|string, %s given", zend_zval_value_name(ncpu)); PCNTL_CPU_DESTROY(mask); RETURN_THROWS(); } diff --git a/ext/pcntl/tests/pcntl_cpuaffinity.phpt b/ext/pcntl/tests/pcntl_cpuaffinity.phpt index 6dc3399e16118..1e3809f928c78 100644 --- a/ext/pcntl/tests/pcntl_cpuaffinity.phpt +++ b/ext/pcntl/tests/pcntl_cpuaffinity.phpt @@ -48,7 +48,7 @@ try { try { pcntl_setcpuaffinity(null, [1, array(1)]); -} catch (\ValueError $e) { +} catch (\TypeError $e) { echo $e->getMessage(); } ?> @@ -64,6 +64,4 @@ pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id invalid value (def) pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id must be between 0 and %d (%d) pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id must be between 0 and %d (-1024) pcntl_getcpuaffinity(): Argument #1 ($process_id) invalid process (-1024) - -Warning: Array to string conversion in %s on line %d -pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id invalid type (Array) +pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) value must be of type int|string, array given diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 19068b90c0d0b..5671957daac52 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -49,10 +49,14 @@ char *php_pcre_version; struct _pcre_cache_entry { pcre2_code *re; - /* Pointer is not NULL when there are named captures. - * Length is equal to capture_count + 1 to account for capture group 0. */ + /* Pointer is not NULL (during request) when there are named captures. + * Length is equal to capture_count + 1 to account for capture group 0. + * This table cache is only valid during request. + * Trying to store this over multiple requests causes issues when the keys are exposed in user arrays + * (see GH-17122 and GH-17132). */ zend_string **subpats_table; uint32_t preg_options; + uint32_t name_count; uint32_t capture_count; uint32_t compile_options; uint32_t refcount; @@ -478,6 +482,14 @@ static PHP_RINIT_FUNCTION(pcre) static PHP_RSHUTDOWN_FUNCTION(pcre) { + pcre_cache_entry *pce; + ZEND_HASH_MAP_FOREACH_PTR(&PCRE_G(pcre_cache), pce) { + if (pce->subpats_table) { + free_subpats_table(pce->subpats_table, pce->capture_count + 1); + pce->subpats_table = NULL; + } + } ZEND_HASH_FOREACH_END(); + pcre2_general_context_free(PCRE_G(gctx_zmm)); PCRE_G(gctx_zmm) = NULL; @@ -509,10 +521,10 @@ static void free_subpats_table(zend_string **subpat_names, uint32_t num_subpats) uint32_t i; for (i = 0; i < num_subpats; i++) { if (subpat_names[i]) { - zend_string_release_ex(subpat_names[i], true); + zend_string_release_ex(subpat_names[i], false); } } - pefree(subpat_names, true); + efree(subpat_names); } /* {{{ static make_subpats_table */ @@ -531,24 +543,25 @@ static zend_string **make_subpats_table(uint32_t name_cnt, pcre_cache_entry *pce return NULL; } - subpat_names = pecalloc(num_subpats, sizeof(zend_string *), true); + subpat_names = ecalloc(num_subpats, sizeof(zend_string *)); while (ni++ < name_cnt) { unsigned short name_idx = 0x100 * (unsigned char)name_table[0] + (unsigned char)name_table[1]; const char *name = name_table + 2; - /* Note: this makes a persistent string when the cache is not request-based because the string - * has to outlive the request. In that case, they will only be used within this thread - * and never be shared. - * Although we will be storing them in user-exposed arrays, they cannot cause problems - * because they only live in this thread and the last reference is deleted on shutdown - * instead of by user code. */ - subpat_names[name_idx] = zend_string_init(name, strlen(name), true); - GC_MAKE_PERSISTENT_LOCAL(subpat_names[name_idx]); + subpat_names[name_idx] = zend_string_init(name, strlen(name), false); name_table += name_size; } return subpat_names; } /* }}} */ +static zend_string **ensure_subpats_table(uint32_t name_cnt, pcre_cache_entry *pce) +{ + if (!pce->subpats_table) { + pce->subpats_table = make_subpats_table(name_cnt, pce); + } + return pce->subpats_table; +} + /* {{{ static calculate_unit_length */ /* Calculates the byte length of the next character. Assumes valid UTF-8 for PCRE2_UTF. */ static zend_always_inline size_t calculate_unit_length(pcre_cache_entry *pce, const char *start) @@ -820,6 +833,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, bo new_entry.preg_options = poptions; new_entry.compile_options = coptions; new_entry.refcount = 0; + new_entry.subpats_table = NULL; rc = pcre2_pattern_info(re, PCRE2_INFO_CAPTURECOUNT, &new_entry.capture_count); if (rc < 0) { @@ -831,8 +845,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, bo return NULL; } - uint32_t name_count; - rc = pcre2_pattern_info(re, PCRE2_INFO_NAMECOUNT, &name_count); + rc = pcre2_pattern_info(re, PCRE2_INFO_NAMECOUNT, &new_entry.name_count); if (rc < 0) { if (key != regex) { zend_string_release_ex(key, 0); @@ -842,21 +855,6 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, bo return NULL; } - /* Compute and cache the subpattern table to avoid computing it again over and over. */ - if (name_count > 0) { - new_entry.subpats_table = make_subpats_table(name_count, &new_entry); - if (!new_entry.subpats_table) { - if (key != regex) { - zend_string_release_ex(key, false); - } - /* Warning already emitted by make_subpats_table() */ - pcre_handle_exec_error(PCRE2_ERROR_INTERNAL); - return NULL; - } - } else { - new_entry.subpats_table = NULL; - } - /* * Interned strings are not duplicated when stored in HashTable, * but all the interned strings created during HTTP request are removed @@ -971,6 +969,8 @@ static zend_always_inline void populate_match_value( static inline void add_named( HashTable *const subpats, zend_string *name, zval *val, bool unmatched) { + ZEND_ASSERT(!(GC_FLAGS(name) & IS_STR_PERSISTENT)); + /* If the DUPNAMES option is used, multiple subpatterns might have the same name. * In this case we want to preserve the one that actually has a value. */ if (!unmatched) { @@ -1232,8 +1232,11 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, * allocate the table only if there are any named subpatterns. */ subpat_names = NULL; - if (subpats) { - subpat_names = pce->subpats_table; + if (subpats && pce->name_count > 0) { + subpat_names = ensure_subpats_table(pce->name_count, pce); + if (UNEXPECTED(!subpat_names)) { + RETURN_FALSE; + } } matched = 0; @@ -1869,7 +1872,14 @@ static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_strin /* Calculate the size of the offsets array, and allocate memory for it. */ num_subpats = pce->capture_count + 1; - subpat_names = pce->subpats_table; + if (pce->name_count > 0) { + subpat_names = ensure_subpats_table(pce->name_count, pce); + if (UNEXPECTED(!subpat_names)) { + return NULL; + } + } else { + subpat_names = NULL; + } alloc_len = 0; result = NULL; diff --git a/ext/pcre/tests/gh17122.phpt b/ext/pcre/tests/gh17122.phpt new file mode 100644 index 0000000000000..afccb47b96dab --- /dev/null +++ b/ext/pcre/tests/gh17122.phpt @@ -0,0 +1,30 @@ +--TEST-- +GH-17122 (memory leak in regex) +--FILE-- +)(\d+)|', 0xffffffff, $m1); +var_dump($m1); +\preg_match('|(?P)(\d+)|', 0, $m2); +var_dump($m2); +?> +--EXPECT-- +array(4) { + [0]=> + string(10) "4294967295" + ["name"]=> + string(0) "" + [1]=> + string(0) "" + [2]=> + string(10) "4294967295" +} +array(4) { + [0]=> + string(1) "0" + ["name2"]=> + string(0) "" + [1]=> + string(0) "" + [2]=> + string(1) "0" +} diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 777cb8fce3b6b..94106b715ef56 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1247,6 +1247,7 @@ PHP_METHOD(PDOStatement, fetchAll) zval *arg2 = NULL; zend_class_entry *old_ce; zval old_ctor_args, *ctor_args = NULL; + HashTable *current_ctor = NULL; bool error = false; int flags, old_arg_count; @@ -1264,6 +1265,10 @@ PHP_METHOD(PDOStatement, fetchAll) old_ce = stmt->fetch.cls.ce; ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); + if (Z_TYPE(old_ctor_args) == IS_ARRAY) { + /* Protect against destruction by marking this as immutable: we consider this non-owned temporarily */ + Z_TYPE_INFO(stmt->fetch.cls.ctor_args) = IS_ARRAY; + } old_arg_count = stmt->fetch.cls.fci.param_count; do_fetch_opt_finish(stmt, 0); @@ -1288,7 +1293,13 @@ PHP_METHOD(PDOStatement, fetchAll) } if (ctor_args && zend_hash_num_elements(Z_ARRVAL_P(ctor_args)) > 0) { - ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ + /* We increase the refcount and store it in case usercode has been messing around with the ctor args. + * We need to store current_ctor separately as usercode may change the ctor_args which will cause a leak. */ + current_ctor = Z_ARRVAL_P(ctor_args); + ZVAL_COPY(&stmt->fetch.cls.ctor_args, ctor_args); + /* Protect against destruction by marking this as immutable: we consider this non-owned + * as destruction is handled via current_ctor. */ + Z_TYPE_INFO(stmt->fetch.cls.ctor_args) = IS_ARRAY; } else { ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); } @@ -1360,6 +1371,7 @@ PHP_METHOD(PDOStatement, fetchAll) } PDO_STMT_CLEAR_ERR(); + if ((how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR) ) { @@ -1384,9 +1396,15 @@ PHP_METHOD(PDOStatement, fetchAll) } do_fetch_opt_finish(stmt, 0); + if (current_ctor) { + zend_array_release(current_ctor); + } /* Restore defaults which were changed by PDO_FETCH_CLASS mode */ stmt->fetch.cls.ce = old_ce; + /* ctor_args may have been changed to an owned object in the meantime, so destroy it. + * If it was not, then the type flags update will have protected us against destruction. */ + zval_ptr_dtor(&stmt->fetch.cls.ctor_args); ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt->fetch.cls.fci.param_count = old_arg_count; @@ -2074,8 +2092,11 @@ static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *me static HashTable *dbstmt_get_gc(zend_object *object, zval **gc_data, int *gc_count) { pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - *gc_data = &stmt->fetch.into; - *gc_count = 1; + + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); + zend_get_gc_buffer_add_zval(gc_buffer, &stmt->database_object_handle); + zend_get_gc_buffer_add_zval(gc_buffer, &stmt->fetch.into); + zend_get_gc_buffer_use(gc_buffer, gc_data, gc_count); /** * If there are no dynamic properties and the default property is 1 (that is, there is only one property diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt new file mode 100644 index 0000000000000..194610b1119a2 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt @@ -0,0 +1,59 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetch() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +$db->exec('CREATE TABLE pdo_fetch_class_change_ctor_one(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_one VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_one VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_one VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_one VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_change_ctor_one'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$stmt]); + +$stmt->execute(); +var_dump($stmt->fetch()); + +?> +--CLEAN-- + +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(54) "SELECT val1, val2 FROM pdo_fetch_class_change_ctor_one" +} +object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt new file mode 100644 index 0000000000000..f2cc4a2946997 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt @@ -0,0 +1,59 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchObject() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +// TODO Rename pdo_fetch_class_change_ctor_two table to pdo_fetch_class_change_ctor_two in PHP-8.4 +$db->exec('CREATE TABLE pdo_fetch_class_change_ctor_two(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_two VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_two VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_two VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_two VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_change_ctor_two'); + +$stmt->execute(); +var_dump($stmt->fetchObject('Test', [$stmt])); + +?> +--CLEAN-- + +--EXPECTF-- +object(PDOStatement)#%s (1) { + ["queryString"]=> + string(54) "SELECT val1, val2 FROM pdo_fetch_class_change_ctor_two" +} +object(Test)#%s (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt new file mode 100644 index 0000000000000..6b2fb788700e8 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt @@ -0,0 +1,86 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (no args variation) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +$db->exec('CREATE TABLE pdo_fetch_class_change_ctor_three(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_three VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_three VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_three VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_three VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_change_ctor_three'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$stmt]); + +$stmt->execute(); +var_dump($stmt->fetchAll()); + +?> +--CLEAN-- + +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(56) "SELECT val1, val2 FROM pdo_fetch_class_change_ctor_three" +} +string(5) "alpha" +string(5) "alpha" +string(5) "alpha" +array(4) { + [0]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" + } + [1]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "B" + ["val2"]=> + string(4) "beta" + } + [2]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "C" + ["val2"]=> + string(5) "gamma" + } + [3]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "D" + ["val2"]=> + string(5) "delta" + } +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt new file mode 100644 index 0000000000000..d4bad52a2b5ab --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt @@ -0,0 +1,85 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (args in fetchAll) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +$db->exec('CREATE TABLE pdo_fetch_class_change_ctor_four(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_four VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_four VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_four VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_four VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_change_ctor_four'); + +$stmt->execute(); +var_dump($stmt->fetchAll(PDO::FETCH_CLASS, 'Test', [$stmt])); + +?> +--CLEAN-- + +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(55) "SELECT val1, val2 FROM pdo_fetch_class_change_ctor_four" +} +string(5) "alpha" +string(5) "alpha" +string(5) "alpha" +array(4) { + [0]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" + } + [1]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "B" + ["val2"]=> + string(4) "beta" + } + [2]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "C" + ["val2"]=> + string(5) "gamma" + } + [3]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "D" + ["val2"]=> + string(5) "delta" + } +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt new file mode 100644 index 0000000000000..533a61410c42e --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt @@ -0,0 +1,55 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (via warning and error handler) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + +class B { + public function __construct() {} +} + +$db->exec('CREATE TABLE pdo_fetch_class_change_ctor_five(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_five VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_five VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_five VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_change_ctor_five VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_change_ctor_five'); +$stmt->execute(); + +function stuffingErrorHandler(int $errno, string $errstr, string $errfile, int $errline) { + global $stmt; + $stmt->setFetchMode(PDO::FETCH_CLASS, 'B', [$errstr]); + echo $errstr, PHP_EOL; +} +set_error_handler(stuffingErrorHandler(...)); + +var_dump($stmt->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_SERIALIZE, 'B', [$stmt])); + +?> +--CLEAN-- + +--EXPECTF-- +PDOStatement::fetchAll(): The PDO::FETCH_SERIALIZE mode is deprecated +PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot unserialize class +PDOStatement::fetchAll(): SQLSTATE[HY000]: General error%S +array(0) { +} diff --git a/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt b/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt new file mode 100644 index 0000000000000..48c10c01f786f --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt @@ -0,0 +1,59 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetch() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +exec('CREATE TABLE pdo_fetch_class_cyclic_ctor(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_fetch_class_cyclic_ctor VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO pdo_fetch_class_cyclic_ctor VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO pdo_fetch_class_cyclic_ctor VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO pdo_fetch_class_cyclic_ctor VALUES(4, 'D', 'delta')"); + +$args = []; +$args[] = &$args; + +$stmt = $db->prepare('SELECT val1, val2 FROM pdo_fetch_class_cyclic_ctor'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$args]); + +$stmt->execute(); +var_dump($stmt->fetch()); + +?> +--CLEAN-- + +--EXPECTF-- +array(1) { + [0]=> + *RECURSION* +} +object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} diff --git a/ext/pdo/tests/pdo_stmt_cyclic_references.phpt b/ext/pdo/tests/pdo_stmt_cyclic_references.phpt new file mode 100644 index 0000000000000..59d72c4b0d36e --- /dev/null +++ b/ext/pdo/tests/pdo_stmt_cyclic_references.phpt @@ -0,0 +1,138 @@ +--TEST-- +PDO Common: Cyclic PDOStatement child class +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +exec('CREATE TABLE pdo_stmt_cyclic_ref(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO pdo_stmt_cyclic_ref VALUES(1, 'A', 'AA')"); +$db->exec("INSERT INTO pdo_stmt_cyclic_ref VALUES(2, 'B', 'BB')"); +$db->exec("INSERT INTO pdo_stmt_cyclic_ref VALUES(3, 'C', 'CC')"); + +$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['CyclicStatement', [new Ref]]); + +echo "Column fetch:\n"; +$stmt = $db->query('SELECT id, val2, val FROM pdo_stmt_cyclic_ref'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_COLUMN, 2); +foreach($stmt as $obj) { + var_dump($obj); +} + +echo "Class fetch:\n"; +$stmt = $db->query('SELECT id, val2, val FROM pdo_stmt_cyclic_ref'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_CLASS, 'TestRow', ['Hello world']); +foreach($stmt as $obj) { + var_dump($obj); +} + +echo "Fetch into:\n"; +$stmt = $db->query('SELECT id, val2, val FROM pdo_stmt_cyclic_ref'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_INTO, new TestRow('I am being fetch into')); +foreach($stmt as $obj) { + var_dump($obj); +} + +?> +--CLEAN-- + +--EXPECTF-- +Column fetch: +string(1) "A" +string(1) "B" +string(1) "C" +Class fetch: +object(TestRow)#%d (4) { + ["id"]=> + string(1) "1" + ["val"]=> + string(1) "A" + ["val2"]=> + string(2) "AA" + ["arg"]=> + string(11) "Hello world" +} +object(TestRow)#%d (4) { + ["id"]=> + string(1) "2" + ["val"]=> + string(1) "B" + ["val2"]=> + string(2) "BB" + ["arg"]=> + string(11) "Hello world" +} +object(TestRow)#%d (4) { + ["id"]=> + string(1) "3" + ["val"]=> + string(1) "C" + ["val2"]=> + string(2) "CC" + ["arg"]=> + string(11) "Hello world" +} +Fetch into: +object(TestRow)#4 (4) { + ["id"]=> + string(1) "1" + ["val"]=> + string(1) "A" + ["val2"]=> + string(2) "AA" + ["arg"]=> + string(21) "I am being fetch into" +} +object(TestRow)#4 (4) { + ["id"]=> + string(1) "2" + ["val"]=> + string(1) "B" + ["val2"]=> + string(2) "BB" + ["arg"]=> + string(21) "I am being fetch into" +} +object(TestRow)#4 (4) { + ["id"]=> + string(1) "3" + ["val"]=> + string(1) "C" + ["val2"]=> + string(2) "CC" + ["arg"]=> + string(21) "I am being fetch into" +} diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index ceb10339a518c..2d91ca1f05dac 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -158,8 +158,15 @@ static int pdo_firebird_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; int result = 1; - /* release the statement */ - if (isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { + /* TODO: for master, move this check to a separate function shared between pdo drivers. + * pdo_pgsql and pdo_mysql do this exact same thing */ + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) + && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); + + /* release the statement. + * Note: if the server object is already gone then the statement was closed already as well. */ + if (server_obj_usable && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { php_firebird_error_stmt(stmt); result = 0; } diff --git a/ext/pdo_firebird/tests/transaction_access_mode.phpt b/ext/pdo_firebird/tests/transaction_access_mode.phpt index 8eb3738ff47bf..5202e17129bf4 100644 --- a/ext/pdo_firebird/tests/transaction_access_mode.phpt +++ b/ext/pdo_firebird/tests/transaction_access_mode.phpt @@ -135,7 +135,7 @@ $dbh = getDbConnection(); @$dbh->exec('DROP TABLE transaction_access_mode'); unset($dbh); ?> ---EXPECT-- +--EXPECTF-- ========== Set attr in construct ========== OK: writable OK: readonly @@ -157,7 +157,7 @@ array(1) { readonly bool(true) OK: readonly -SQLSTATE[42000]: Syntax error or access violation: -817 attempted update during read-only transaction +SQLSTATE[%r(42000|25006)%r]: %r(Read only sql transaction|Syntax error or access violation)%r: -817 attempted update during read-only transaction array(1) { [0]=> array(2) { diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index ffe09a6bf16aa..939adbfb202a6 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -136,7 +136,11 @@ static int odbc_stmt_dtor(pdo_stmt_t *stmt) { pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; - if (S->stmt != SQL_NULL_HANDLE) { + // TODO: Factor this out; pg/mysql/firebird do the same thing + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) + && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); + if (S->stmt != SQL_NULL_HANDLE && server_obj_usable) { if (stmt->executed) { SQLCloseCursor(S->stmt); } diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4 index 8718208e85061..e4d63b98bc72c 100644 --- a/ext/pgsql/config.m4 +++ b/ext/pgsql/config.m4 @@ -28,15 +28,19 @@ if test "$PHP_PGSQL" != "no"; then [Define to 1 if libpq has the 'PQsocketPoll' function (PostgreSQL 17 or later).])],, [$PGSQL_LIBS]) - PHP_CHECK_LIBRARY([pq], [PQsetChunkedRowsMode], - [AC_DEFINE([HAVE_PG_SET_CHUNKED_ROWS_SIZE], [1], - [Define to 1 if libpq has the 'PQsetChunkedRowsMode' function (PostgreSQL - 17 or later).])],, - [$PGSQL_LIBS]) old_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PGSQL_CFLAGS" + AC_CHECK_DECLS([PGRES_TUPLES_CHUNK], + PHP_CHECK_LIBRARY([pq], [PQsetChunkedRowsMode], + [AC_DEFINE([HAVE_PG_SET_CHUNKED_ROWS_SIZE], [1], + [Define to 1 if libpq has the 'PQsetChunkedRowsMode' function (PostgreSQL + 17 or later).])],, + [$PGSQL_LIBS]),, + [#include ] + ) + dnl Available since PostgreSQL 12. AC_CACHE_CHECK([if PGVerbosity enum has PQERRORS_SQLSTATE], [php_cv_enum_pgverbosity_pqerrors_sqlstate], diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index dbc3f91b983d1..3b8ecddfac079 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4333,7 +4333,7 @@ static int extract_helper(phar_archive_data *archive, zend_string *search, char if (FAILURE == phar_extract_file(overwrite, entry, pathto, pathto_len, error)) return -1; extracted++; } ZEND_HASH_FOREACH_END(); - } else if ('/' == ZSTR_VAL(search)[ZSTR_LEN(search) - 1]) { + } else if (ZSTR_LEN(search) > 0 && '/' == ZSTR_VAL(search)[ZSTR_LEN(search) - 1]) { /* ends in "/" -- extract all entries having that prefix */ ZEND_HASH_MAP_FOREACH_PTR(&archive->manifest, entry) { if (0 != strncmp(ZSTR_VAL(search), entry->filename, ZSTR_LEN(search))) continue; diff --git a/ext/phar/tests/033.phpt b/ext/phar/tests/033.phpt index 30d6cf6c55112..4dcff19996d5d 100644 --- a/ext/phar/tests/033.phpt +++ b/ext/phar/tests/033.phpt @@ -5,6 +5,12 @@ phar --INI-- phar.readonly=0 phar.require_hash=0 +--SKIPIF-- + --FILE-- extractTo(__DIR__ . '/gh17518', ''); +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), "\n"; +} +?> +--CLEAN-- + +--EXPECTF-- +PharException: phar error: attempted to extract non-existent file or directory "" from phar "%sgh17518.phar.php" diff --git a/ext/phar/tests/tar/033.phpt b/ext/phar/tests/tar/033.phpt index fa6ed5959cc0c..f13121951fe51 100644 --- a/ext/phar/tests/tar/033.phpt +++ b/ext/phar/tests/tar/033.phpt @@ -5,6 +5,12 @@ phar --INI-- phar.readonly=0 phar.require_hash=0 +--SKIPIF-- + --FILE-- +--INI-- +session.use_cookies=0 +session.use_only_cookies=1 +--FILE-- + +--EXPECT-- +string(0) "" diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt index 88c2e48ed7999..26a31279fbed2 100644 --- a/ext/session/tests/bug66481.phpt +++ b/ext/session/tests/bug66481.phpt @@ -15,6 +15,6 @@ var_dump(session_name("foo")); var_dump(session_name("bar")); ?> --EXPECT-- -Warning: PHP Startup: session.name "" cannot be numeric or empty in Unknown on line 0 +Warning: PHP Startup: session.name "" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in Unknown on line 0 string(9) "PHPSESSID" string(3) "foo" diff --git a/ext/session/tests/gh17541.phpt b/ext/session/tests/gh17541.phpt new file mode 100644 index 0000000000000..bbf6a50393b5e --- /dev/null +++ b/ext/session/tests/gh17541.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-17541 (ext/session NULL pointer dereferencement during ID reset) +--EXTENSIONS-- +session +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d +string(9) "PHPSESSID" +bool(true) diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt index ef68b80b3def9..0bd4dcf21a8a5 100644 --- a/ext/session/tests/session_name_variation1.phpt +++ b/ext/session/tests/session_name_variation1.phpt @@ -32,20 +32,18 @@ ob_end_flush(); ?> --EXPECTF-- *** Testing session_name() : variation *** -string(9) "PHPSESSID" -Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d +Warning: session_name(): session.name " " must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in %s on line %d +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" bool(true) -string(1) " " - -Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d -string(1) " " +string(9) "PHPSESSID" -Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d +Warning: session_name(): session.name "" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in %s on line %d +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" Done diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index a00b152f9c089..df4640e59dd42 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2138,8 +2138,8 @@ static void sxe_object_free_storage(zend_object *object) sxe_object_free_iterxpath(sxe); if (sxe->properties) { - zend_hash_destroy(sxe->properties); - FREE_HASHTABLE(sxe->properties); + ZEND_ASSERT(!(GC_FLAGS(sxe->properties) & IS_ARRAY_IMMUTABLE)); + zend_hash_release(sxe->properties); } } /* }}} */ diff --git a/ext/simplexml/tests/gh17409.phpt b/ext/simplexml/tests/gh17409.phpt new file mode 100644 index 0000000000000..f91ef38ba70ec --- /dev/null +++ b/ext/simplexml/tests/gh17409.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-17409 (Assertion failure Zend/zend_hash.c) +--EXTENSIONS-- +simplexml +--CREDITS-- +YuanchengJiang +--FILE-- + + + + +'); +// Need to use $GLOBALS such that simplexml object is destroyed +var_dump(array_merge_recursive($GLOBALS, $GLOBALS)["root"]); +?> +--EXPECT-- +array(1) { + ["child"]=> + array(0) { + } +} diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index ec62dd91c72fb..91b530f3b39d7 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1660,6 +1660,10 @@ PHP_METHOD(SNMP, setSecurity) zend_string *a1 = NULL, *a2 = NULL, *a3 = NULL, *a4 = NULL, *a5 = NULL, *a6 = NULL, *a7 = NULL; snmp_object = Z_SNMP_P(object); + if (!snmp_object->session) { + zend_throw_error(NULL, "Invalid or uninitialized SNMP object"); + RETURN_THROWS(); + } if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|SSSSSS", &a1, &a2, &a3, &a4,&a5, &a6, &a7) == FAILURE) { RETURN_THROWS(); diff --git a/ext/snmp/tests/gh17330.phpt b/ext/snmp/tests/gh17330.phpt new file mode 100644 index 0000000000000..a6f077a9c8600 --- /dev/null +++ b/ext/snmp/tests/gh17330.phpt @@ -0,0 +1,18 @@ +--TEST-- +SNMP::setSecurity() segfault when the object had been closed. +--EXTENSIONS-- +snmp +--CREDITS-- +YuanchengJiang +--FILE-- +close(); +try { + $session->setSecurity('authPriv', 'MD5', '', 'AES', ''); +} catch(Error $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Invalid or uninitialized SNMP object diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 0acbc98611966..db7f4fff9bb04 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -40,6 +40,7 @@ PHPAPI zend_class_entry *spl_ce_ArrayObject; typedef struct _spl_array_object { zval array; + HashTable *sentinel_array; uint32_t ht_iter; int ar_flags; unsigned char nApplyCount; @@ -74,6 +75,19 @@ static inline HashTable **spl_array_get_hash_table_ptr(spl_array_object* intern) return &Z_ARRVAL(intern->array); } else { zend_object *obj = Z_OBJ(intern->array); + /* Since we're directly playing with the properties table, we shall initialize the lazy object directly. + * If we don't, it's possible to continue working with the wrong object in case we're using a proxy. */ + if (UNEXPECTED(zend_lazy_object_must_init(obj))) { + obj = zend_lazy_object_init(obj); + if (UNEXPECTED(!obj)) { + if (!intern->sentinel_array) { + intern->sentinel_array = zend_new_array(0); + } + return &intern->sentinel_array; + } + } + /* should no longer be lazy */ + ZEND_ASSERT(!zend_lazy_object_must_init(obj)); /* rebuild properties */ zend_std_get_properties_ex(obj); if (GC_REFCOUNT(obj->properties) > 1) { @@ -129,6 +143,10 @@ static void spl_array_object_free_storage(zend_object *object) zend_hash_iterator_del(intern->ht_iter); } + if (UNEXPECTED(intern->sentinel_array)) { + zend_array_release(intern->sentinel_array); + } + zend_object_std_dtor(&intern->std); zval_ptr_dtor(&intern->array); @@ -489,6 +507,9 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec uint32_t refcount = 0; if (!offset || Z_TYPE_P(offset) == IS_NULL) { ht = spl_array_get_hash_table(intern); + if (UNEXPECTED(ht == intern->sentinel_array)) { + return; + } refcount = spl_array_set_refcount(intern->is_child, ht, 1); zend_hash_next_index_insert(ht, value); @@ -505,6 +526,10 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec } ht = spl_array_get_hash_table(intern); + if (UNEXPECTED(ht == intern->sentinel_array)) { + spl_hash_key_release(&key); + return; + } refcount = spl_array_set_refcount(intern->is_child, ht, 1); if (key.key) { zend_hash_update_ind(ht, key.key, value); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index b14d182dcd763..cb9d6586635e3 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1368,6 +1368,9 @@ PHP_METHOD(SplFileInfo, getPathInfo) if (ce == NULL) { ce = intern->info_class; + } else if (!instanceof_function(ce, spl_ce_SplFileInfo)) { + zend_argument_type_error(1, "must be a class name derived from %s or null, %s given", ZSTR_VAL(spl_ce_SplFileInfo->name), ZSTR_VAL(ce->name)); + RETURN_THROWS(); } path = spl_filesystem_object_get_pathname(intern); @@ -2684,6 +2687,12 @@ PHP_METHOD(SplFileObject, ftruncate) CHECK_SPL_FILE_OBJECT_IS_INITIALIZED(intern); + if (size < 0) { + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + + if (!php_stream_truncate_supported(intern->u.file.stream)) { zend_throw_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", ZSTR_VAL(intern->file_name)); RETURN_THROWS(); diff --git a/ext/spl/tests/gh15833_1.phpt b/ext/spl/tests/gh15833_1.phpt new file mode 100644 index 0000000000000..d658a770e80f5 --- /dev/null +++ b/ext/spl/tests/gh15833_1.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-15833 (Segmentation fault (access null pointer) in ext/spl/spl_array.c) +--CREDITS-- +YuanchengJiang +--FILE-- +newLazyProxy(function ($obj) { + $obj = new C(); + return $obj; +}); +$recursiveArrayIterator = new RecursiveArrayIterator($obj); +var_dump($recursiveArrayIterator->current()); +$recursiveArrayIterator->next(); +var_dump($recursiveArrayIterator->current()); +?> +--EXPECT-- +int(1) +NULL diff --git a/ext/spl/tests/gh15833_2.phpt b/ext/spl/tests/gh15833_2.phpt new file mode 100644 index 0000000000000..8f30921741fe3 --- /dev/null +++ b/ext/spl/tests/gh15833_2.phpt @@ -0,0 +1,41 @@ +--TEST-- +GH-15833 (Segmentation fault (access null pointer) in ext/spl/spl_array.c) +--CREDITS-- +YuanchengJiang +--FILE-- +newLazyProxy(function ($obj) { + static $counter = 0; + throw new Error('nope ' . ($counter++)); +}); +$recursiveArrayIterator = new RecursiveArrayIterator($obj); +try { + var_dump($recursiveArrayIterator->current()); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump($recursiveArrayIterator->current()); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + $recursiveArrayIterator->next(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump($recursiveArrayIterator->current()); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +?> +--EXPECT-- +nope 0 +nope 1 +nope 2 +nope 3 diff --git a/ext/spl/tests/gh17463.phpt b/ext/spl/tests/gh17463.phpt new file mode 100644 index 0000000000000..41939c62f5b2c --- /dev/null +++ b/ext/spl/tests/gh17463.phpt @@ -0,0 +1,16 @@ +--TEST-- +GH-17463 segfault on SplFileObject::ftruncate() with negative value. +--CREDITS-- +YuanchengJiang +--FILE-- +ftruncate(-1); +} catch (\ValueError $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +SplFileObject::ftruncate(): Argument #1 ($size) must be greater than or equal to 0 diff --git a/ext/spl/tests/gh17516.phpt b/ext/spl/tests/gh17516.phpt new file mode 100644 index 0000000000000..f1a05f9ca1849 --- /dev/null +++ b/ext/spl/tests/gh17516.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-17516 SplTempFileObject::getPathInfo() crashes on invalid class ID. +--FILE-- +getPathInfo('SplFileInfoChild')); + +try { + $cls->getPathInfo('BadSplFileInfo'); +} catch (\TypeError $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +object(SplFileInfoChild)#2 (2) { + ["pathName":"SplFileInfo":private]=> + string(4) "php:" + ["fileName":"SplFileInfo":private]=> + string(4) "php:" +} +SplFileInfo::getPathInfo(): Argument #1 ($class) must be a class name derived from SplFileInfo or null, BadSplFileInfo given diff --git a/ext/standard/array.c b/ext/standard/array.c index d95ea012ad6bc..6bfc0dc9c0403 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3564,7 +3564,8 @@ PHP_FUNCTION(array_pop) break; } } - RETVAL_COPY_DEREF(val); + RETVAL_COPY_VALUE(val); + ZVAL_UNDEF(val); if (idx == (Z_ARRVAL_P(stack)->nNextFreeElement - 1)) { Z_ARRVAL_P(stack)->nNextFreeElement = Z_ARRVAL_P(stack)->nNextFreeElement - 1; @@ -3588,7 +3589,8 @@ PHP_FUNCTION(array_pop) break; } } - RETVAL_COPY_DEREF(val); + RETVAL_COPY_VALUE(val); + ZVAL_UNDEF(val); if (!p->key && (zend_long)p->h == (Z_ARRVAL_P(stack)->nNextFreeElement - 1)) { Z_ARRVAL_P(stack)->nNextFreeElement = Z_ARRVAL_P(stack)->nNextFreeElement - 1; @@ -3598,6 +3600,10 @@ PHP_FUNCTION(array_pop) zend_hash_del_bucket(Z_ARRVAL_P(stack), p); } zend_hash_internal_pointer_reset(Z_ARRVAL_P(stack)); + + if (Z_ISREF_P(return_value)) { + zend_unwrap_reference(return_value); + } } /* }}} */ diff --git a/ext/standard/tests/array/gh17447.phpt b/ext/standard/tests/array/gh17447.phpt new file mode 100644 index 0000000000000..e107efbd17bfa --- /dev/null +++ b/ext/standard/tests/array/gh17447.phpt @@ -0,0 +1,12 @@ +--TEST-- +GH-17447 (Assertion failure when array poping a self addressing variable) +--FILE-- + +--EXPECT-- +array(0) { +} +array(0) { +} diff --git a/ext/standard/tests/filters/gh13264.phpt b/ext/standard/tests/filters/gh13264.phpt index 6456a082a1e40..e992d0868898d 100644 --- a/ext/standard/tests/filters/gh13264.phpt +++ b/ext/standard/tests/filters/gh13264.phpt @@ -45,5 +45,5 @@ array(4) { ["line"]=> int(%d) } -string(7) "Hello 6" +string(%d) "Hello%s" diff --git a/ext/standard/tests/http/gh16810.phpt b/ext/standard/tests/http/gh16810.phpt index 4aa563b57b270..6feab1fb01f86 100644 --- a/ext/standard/tests/http/gh16810.phpt +++ b/ext/standard/tests/http/gh16810.phpt @@ -1,16 +1,23 @@ --TEST-- -Bug #79265 variation: "host:" not at start of header +GH-16809 (fopen HTTP wrapper timeout stream context option overflow) --INI-- allow_url_fopen=1 --SKIPIF-- --FILE-- [ -'timeout' => PHP_INT_MIN, -], + 'http' => [ + 'timeout' => PHP_INT_MIN, + ], ]; $ctx = stream_context_create($config); var_dump(fopen($uri, "r", false, $ctx)); @@ -22,5 +29,5 @@ var_dump(fopen($uri, "r", false, $ctx)); --EXPECTF-- resource(%d) of type (stream) -Warning: fopen(http://www.example.com): Failed to open stream: timeout must be lower than %d in %s on line %d +Warning: fopen(http://%s): Failed to open stream: timeout must be lower than %d in %s on line %d bool(false) diff --git a/ext/standard/tests/streams/gh15937.phpt b/ext/standard/tests/streams/gh15937.phpt deleted file mode 100644 index db0564342b13b..0000000000000 --- a/ext/standard/tests/streams/gh15937.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -GH-15937 (stream overflow on timeout setting) ---SKIPIF-- - ---FILE-- - [ - 'timeout' => PHP_INT_MAX, - ], -]; -$ctx = stream_context_create($config); -var_dump(fopen("http://www.example.com", "r", false, $ctx)); -?> ---EXPECTF-- -resource(%d) of type (stream) diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt index 6f656ca15f9cc..e20e294180ccc 100644 --- a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt +++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt @@ -5,9 +5,6 @@ sockets --SKIPIF-- --FILE-- run($clientCode, $serverCode); ?> ---EXPECT-- +--EXPECTF-- server-delay:conn-nodelay + diff --git a/ext/zend_test/tests/gh17408.phpt b/ext/zend_test/tests/gh17408.phpt new file mode 100644 index 0000000000000..f54a7b81fce9c --- /dev/null +++ b/ext/zend_test/tests/gh17408.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-17408 (Assertion failure Zend/zend_exceptions.c) +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 %s(%d): test() +#1 {main} + +Next Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 9fc0af4fcaca4..e9b560ab1df61 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1261,6 +1261,7 @@ PHP_FUNCTION(zip_read) RETURN_FALSE; } + zr_rsrc->zip_rsrc_handle = Z_RES_P(zip_dp)->handle; zr_rsrc->zf = zip_fopen_index(rsrc_int->za, rsrc_int->index_current, 0); if (zr_rsrc->zf) { rsrc_int->index_current++; @@ -1377,7 +1378,7 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{ RETURN_THROWS(); } - if (!zr_rsrc->zf) { + if (!zr_rsrc->zf || !zend_hash_index_exists(&EG(regular_list), zr_rsrc->zip_rsrc_handle)) { RETURN_FALSE; } diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 82f7b5e057a43..4f4750993f990 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -60,6 +60,9 @@ typedef zip_rsrc * zip_rsrc_ptr; typedef struct _ze_zip_read_rsrc { struct zip_file *zf; struct zip_stat sb; + /* Used to check if the zip resource still exists, + * without holding a reference. This works because the IDs are unique. */ + zend_long zip_rsrc_handle; } zip_read_rsrc; /* Extends zend object */ diff --git a/ext/zip/tests/gh17319.phpt b/ext/zip/tests/gh17319.phpt new file mode 100644 index 0000000000000..3f41be287c637 --- /dev/null +++ b/ext/zip/tests/gh17319.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-17139 - zip_entry_name() crash +--EXTENSIONS-- +zip +--FILE-- + +--EXPECTF-- +Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on line %d + +Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s on line %d + +Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s on line %d +bool(false) diff --git a/main/php_version.h b/main/php_version.h index b4f174a470965..9d352335c464a 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 4 -#define PHP_RELEASE_VERSION 3 -#define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.4.3-dev" -#define PHP_VERSION_ID 80403 +#define PHP_RELEASE_VERSION 4 +#define PHP_EXTRA_VERSION "" +#define PHP_VERSION "8.4.4" +#define PHP_VERSION_ID 80404 diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 87d2510a9aadf..c4b3aa4cb374b 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -90,11 +90,6 @@ static void php_phpdbg_destroy_bp_condition(zval *data) /* {{{ */ efree(brake); } /* }}} */ -static void php_phpdbg_destroy_registered(zval *data) /* {{{ */ -{ - zend_function_dtor(data); -} /* }}} */ - static void php_phpdbg_destroy_file_source(zval *data) /* {{{ */ { phpdbg_file_source *source = (phpdbg_file_source *) Z_PTR_P(data); @@ -164,7 +159,7 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */ zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP], 8, NULL, NULL, 0); zend_hash_init(&PHPDBG_G(seek), 8, NULL, NULL, 0); - zend_hash_init(&PHPDBG_G(registered), 8, NULL, php_phpdbg_destroy_registered, 0); + zend_hash_init(&PHPDBG_G(registered), 8, NULL, NULL, true); zend_hash_init(&PHPDBG_G(file_sources), 0, NULL, php_phpdbg_destroy_file_source, 0); phpdbg_setup_watchpoints(); diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 6333fdcb76554..d47f967e724dd 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1420,7 +1420,6 @@ PHPDBG_COMMAND(register) /* {{{ */ if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { if ((function = zend_hash_str_find_ptr(EG(function_table), lcname, lcname_len))) { zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); - function_add_ref(function); phpdbg_notice("Registered %s", lcname); } else { diff --git a/sapi/phpdbg/tests/register_function.phpt b/sapi/phpdbg/tests/register_function.phpt new file mode 100644 index 0000000000000..bf4f1615d3235 --- /dev/null +++ b/sapi/phpdbg/tests/register_function.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test registering of functions +--PHPDBG-- +R testfunc +testfunc 1 2 3 +R var_dump +var_dump foo +q +--FILE-- + +--EXPECTF-- +[Successful compilation of %s] +prompt> [Registered testfunc] +prompt> array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} + +prompt> [Registered var_dump] +prompt> string(3) "foo" + +prompt> diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 1a4ddbffaa9be..add581aa640c4 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3125,7 +3125,7 @@ function toolset_get_compiler_name(short) var command = 'cmd /c ""' + PHP_CL + '" -v"'; var full = execute(command + '" 2>&1"'); - ERROR(full.split(/\n/)[0].replace(/\s/g, ' ')); + return full.split(/\n/)[0].replace(/\s/g, ' '); } WARNING("Unsupported toolset"); diff --git a/win32/winutil.c b/win32/winutil.c index e09944d131b9b..35cc0fc4e2e23 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -56,7 +56,7 @@ PHP_WINUTIL_API void php_win32_error_msg_free(char *msg) int php_win32_check_trailing_space(const char * path, const size_t path_len) {/*{{{*/ - if (path_len > MAXPATHLEN - 1) { + if (path_len == 0 || path_len > MAXPATHLEN - 1) { return 1; } if (path) {