Repository navigation
fix(libc): check daylight availability at the representable year edges - #19901
Merged
oneandonlydean merged 1 commit intoNov 14, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BnsKwjbZijNX2cctQKmrU
Contributor
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
guest_mktimefails on Ubuntu 22.04 (glibc 2.35) withdaylight hint at a representable year edge failed.tm_yearlimits,mktimeskipped the daylight availability query because its one-year search window leaves the representable calendar, and passedtm_isdst > 0to the hostmktime.EOVERFLOWfortm_isdst = 1in any zone without daylight saving, for ordinary years too (2024 inUTC0,IST-5:30, and December of the edge years inEST5EDT); newer glibc ignores the hint, so the result depended on the host C library.mktimedaylight hints records where the boundary query is made.Tested
BUILD_TESTING=ON.mktimewithtm_isdst = 1returns -1 (errno75) inIST-5:30andUTC0at year 124 and at bothtm_yearlimits.guest_mktimefails onmainand passes with the change.ctest -R '^guest_(mktime|time|freebsd_clocks)': 13/13 pass, includingguest_time_conversion,guest_time_extrasandguest_freebsd_clocks, which passed onmaintoo.tools/pr_overlap.py --branchcould not compare 28 open PRs that conflict withmainindocs/dev/debt/libc.md(feat(libc): add the std::__sce_v2 thread start, timed wait, clock and processor count calls #9447 and fix(libc): write a 36-byte struct tm as the console does #10409 also inTime.cpp); compared by hand against their merge bases, none editslibc_mktime_nid_postfixor themktime daylight hintsdebt entry.tools/check_conventions.py --base origin/mainandgit diff --checkpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)