Skip to content

Bump cctz from 2026c to 2026d - #121325

Merged
thevar1able merged 3 commits into
ClickHouse:masterfrom
actueleai:bump-cctz-2026d
Sep 23, 2026
Merged

thevar1able merged 3 commits into
ClickHouse:masterfrom
actueleai:bump-cctz-2026d

Conversation

@actueleai

@actueleai actueleai commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Bumps cctz to the ClickHouse/2026d fork head, refreshing embedded tzdata from 2026c to 2026d while keeping the patch set on top of upstream v2.3.

Fork

  • Carries 3 ClickHouse patches — CoreFoundation dependency removal, arbitrary-file-open prevention while loading timezones, illumos -Wchar-subscripts fix — rebased onto the upstream 2026d update.
  • Also includes Reject the file: prefix in time zone names (2026d) cctz#14: CheckTimeZoneName now rejects the file: prefix. Previously file:/abs/path bypassed the leading / check because the prefix is stripped by FileZoneInfoSource::Open after the check ran. A stateless test covers toDateTime, toTimeZone, the DateTime type parameter and session_timezone. This gap was pre-existing on master, not introduced by the 2026d update.

Closes: #121367

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Update cctz to 2026d. Time zone names with the file: prefix are now rejected.


Workflow [PR]
Sync PR [sync-upstream/pr/121325]

Version info

  • Merged into: 26.10.1.515-master (included in 26.10 and later)
  • Backported to: 26.9.2.23, 26.8.11.26, 26.7.14.25, 26.3.33.134

Update the `cctz` submodule from `8e694da054a9` (fork head with tzdata
2026c) to `a1b98f7d40d7` (`ClickHouse/2026d`), which carries the upstream
2026d update plus the three ClickHouse patches rebased on top:

- `Remove dependency on CoreFoundation library`
- `Prevent arbitrary file open while loading timezone`
- `Fix -Wchar-subscripts warning on illumos.`

All three are still needed and are present at the new head: `time_zone_lookup.cc`
still pulls in `CoreFoundation` on Apple, `CheckTimeZoneName` is still called
from `time_zone_info.cc`, and the `-Wchar-subscripts` fix in `civil_time_detail.cc`
is unchanged.

Upstream additionally reworked `detail::join_seconds`/`split_seconds` in
`include/cctz/time_zone.h` (SFINAE-constrained overloads, correct flooring for
negative time points) and fixed extended-transition ordering, empty quoted
abbreviations and `join_seconds` overflow/underflow. ClickHouse only uses
`cctz::format`, `cctz::load_time_zone` and `time_zone::lookup`, so no source
adaptation was required.

The tzdata refresh 2026c -> 2026d changes the bytes of only 8 zone files
(`America/Bogota`, `America/Inuvik`, `Asia/Tehran`, `CST6CDT`, `EST5EDT`,
`Iran`, `MST7MDT`, `PST8PDT`); the shrink of the `*TZ` zones is a fat -> slim
TZif conversion (POSIX rule instead of precomputed transitions) and is
semantically neutral. Differential checks against a 2026c build over the full
`DateLUT` range show byte-identical `formatDateTime` results and an identical
`system.time_zones` list, so no `contrib/cctz-cmake/CMakeLists.txt` change is
needed - the embedded tzdata list is regenerated at configure time.
@thevar1able thevar1able self-assigned this Sep 21, 2026
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Sep 21, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [144de3a]

Summary: ✅


AI Review

Summary

This PR bumps the cctz fork from 2026c to 2026d and carries the file:-prefix hardening into ClickHouse with a focused stateless regression test. I did not find a remaining correctness issue in the code change: the previous file:/abs/path bypass is now rejected in cctz, and the ClickHouse test exercises the affected SQL entrypoints.

PR Metadata

💡 Changelog category is mismatched. This PR is not just build or packaging work: it changes runtime time-zone validation and fixes a user-visible bug that is present in stable releases. Replace:

- Build/Testing/Packaging Improvement

with:

- Bug Fix

The current Changelog entry is specific enough and can stay as-is.

Final Verdict

✅ No new code blockers. Adjust the Changelog category to Bug Fix, then this looks ready from a review perspective.

LLVM Coverage Report

Measured on commit 144de3a.

Metric Baseline Current Δ
Lines 88.00% 88.00% +0.00%
Functions 91.70% 91.80% +0.10%
Branches 79.30% 79.30% +0.00%

Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage).

Newly covered: +148 lines in 50 files (-115 lines lost coverage) · Details

Full report

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. labels Sep 21, 2026
@thevar1able thevar1able added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Sep 21, 2026
Comment thread contrib/cctz Resolved
`CheckTimeZoneName` in the `cctz` fork ran on the raw name, but
`FileZoneInfoSource::Open` strips the `file:` prefix before it builds
the path, so `file:/abs/path` bypassed the leading `/` check and opened
an arbitrary absolute path. The fork now rejects the prefix outright.

Add a stateless test for the `file:` bypass and the other forbidden
patterns across `toDateTime`, `toTimeZone`, the `DateTime` type
parameter and `session_timezone`.

Closes: ClickHouse#121367
ClickHouse/cctz#14

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Sep 21, 2026
`clickhouse-client` applies `session_timezone` locally before sending the
query, so the rejection surfaces as a client error rather than a server
error, and the test harness reported "got no server error".

ClickHouse#121325

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 144de3ae5 with master 505337ef2 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

9519 translation units recompiled, 10235 s compile time in total, 9097 of them have a recent master baseline.

Job report

@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Sep 22, 2026
@thevar1able
thevar1able added this pull request to the merge queue Sep 23, 2026
Merged via the queue into ClickHouse:master with commit 11baac0 Sep 23, 2026
177 checks passed
@thevar1able
thevar1able deleted the bump-cctz-2026d branch September 23, 2026 15:04
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 23, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Sep 23, 2026
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Sep 23, 2026
clickhouse-gh Bot added a commit that referenced this pull request Sep 23, 2026
Backport #121325 to 26.9: Bump `cctz` from 2026c to 2026d
thevar1able added a commit that referenced this pull request Sep 23, 2026
Backport #121325 to 26.3: Bump `cctz` from 2026c to 2026d
thevar1able added a commit that referenced this pull request Sep 23, 2026
Backport #121325 to 26.7: Bump `cctz` from 2026c to 2026d
thevar1able added a commit that referenced this pull request Sep 23, 2026
Backport #121325 to 26.8: Bump `cctz` from 2026c to 2026d
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 25, 2026
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 25, 2026
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 25, 2026
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 25, 2026
alexey-milovidov added a commit that referenced this pull request Nov 24, 2026
Two cases where a copied bullet was wrong, from the review of
#134278:

- A bullet merged from several entries was copied for any of its pull
  requests. The bullet of #121325 (`cctz` 2026d) and #124249 (2026e) would be
  copied for the backport of the former into `v26.9.3.38-stable` and announce
  the latter, which is not in that release.
- A pull request with an entry in two releases got both of them: #124907 is
  under `Performance Improvement` in 26.11 and under `New Feature` in 26.10,
  with different wording.

The bullets and the pull requests they attribute now make groups, connected by
the attributions. The bullets of a group are copied only if they are all in one
release and every pull request of the group is merged in the changelog
interval; for a backport, the group has to be the original pull request alone.
All other pull requests are requested from GitHub as before.

On `v26.11.1.2942-stable` this leaves 1789 of the 5313 pull requests copied
instead of 1796.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. manual approve Manual approve required to run CI pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-build Pull request with build/testing/packaging improvement pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

file: prefix in time zone names bypasses the arbitrary-file-open check in cctz

5 participants