RTEMS | score: Fix TOD_LATEST_YEAR and watchdog overflow beyond 2400 (!1484)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Tue Sep 22 06:18:27 UTC 2026
Sebastian Huber commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159731
The branch answers the four small points of my second review. I fetched
the head into my work tree and diffed `2c07609b` against `8a90da88`, the
commit which I built and tested in four configurations. Only two comment
blocks and the commit message differ. No code moves. The test result of
my second review stands.
## One sentence of the commit body names the wrong year
> Setting CLOCK_REALTIME beyond year 2400 breaks every subsequent tick
The tick breaks above `WATCHDOG_MAX_SECONDS`, which is 17179869183 seconds
and stands at 2514-05-30T01:53:03Z. A set to the year 2500 works. Year
2400 is the limit which this commit chooses for margin. Name the wrap year
in that sentence.
## What I checked again
- 13601088000 is 2401-01-01T00:00:00Z. 13601087999 with 999999999
nanoseconds is the latest value which both directives accept.
- 17179869183 is 2514-05-30T01:53:03Z. The date of `clock.h` matches it.
- The margin between the two is 113.4 years.
- No other test of the tree sets a year above 2400.
- `_TOD_Is_valid_new_time_of_day()` keeps no dead branch after the change.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159731
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-cqxk2et01fdq40lxkgyhsjlnm-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260922/f88bf5bb/attachment.htm>
More information about the bugs
mailing list