Skip to content

time: harden extreme time handling - #167

Merged
nalgeon merged 1 commit into
nalgeon:mainfrom
RogerHYang:time-hardening-followups
Aug 14, 2026
Merged

nalgeon merged 1 commit into
nalgeon:mainfrom
RogerHYang:time-hardening-followups

Conversation

@RogerHYang

Copy link
Copy Markdown
Contributor

Summary

  • define overflow behavior for extreme date, duration, conversion, and serialization operations
  • correct leap-day boundaries, week truncation, wide-year and negative-offset formatting, and ancient-time blob round trips
  • add focused boundary regression coverage and update the documented week-truncation result

Test plan

  • Time C tests under AddressSanitizer and UndefinedBehaviorSanitizer
  • Duration C tests under AddressSanitizer and UndefinedBehaviorSanitizer
  • Time SQL suite against the rebuilt extension
  • 1,000,000 libFuzzer inputs under ASan/UBSan

Define overflow behavior across date arithmetic, formatting, and
serialization while correcting week and leap-day boundary results.
@RogerHYang

Copy link
Copy Markdown
Contributor Author

Additional fuzz validation: I ran this time-library harness for 100,000,000 libFuzzer executions across eight workers under ASan and UBSan. It exercises parsing, blobs, arbitrary date fields, arithmetic, rounding, formatting, and round-trip invariants using independent reference oracles.

All jobs completed in about 53 seconds wall-clock with no crashes, sanitizer findings, or oracle failures.

@nalgeon
nalgeon merged commit 9d21757 into nalgeon:main Aug 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants