RTEMS | score: Fix TOD_LATEST_YEAR and watchdog overflow beyond 2400 (!1484)

Sharvin Neve (@Sharvin) gitlab at rtems.org
Sun Sep 20 11:35:21 UTC 2026




Sharvin Neve commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159629


Thanks @sebhub. Addressed all review points in the updated commit (8a90da88):

1. **coretodcheck.c**: Updated `_TOD_Is_valid_new_time_of_day()` to `tod->tv_sec >= TOD_SECONDS_1970_THROUGH_2400`. Both `rtems_clock_set()` and POSIX `clock_settime()` now stop at `2400-12-31T23:59:59.999999999Z`.
2. **clock.h**: Synchronized the notes and constraints list to remove the contradiction and accurately reference `2400-12-31T23:59:59.999999999Z` (latest accepted) / `2401-01-01T00:00:00.000000000Z` (upper bound).
3. **psxclock**: Moved boundary cases to test `2400-12-31T23:59:59.999999999Z` (13601087999 s) for success and `2401-01-01T00:00:00Z` (13601088000 s) for `EINVAL`.
4. **spclock_err02**: Replaced the year 2800 test with year 2400 year-end rollover, verified rejection of year 2401 with `RTEMS_INVALID_CLOCK`, and removed years 4000 and 4095.
5. **Commit message & rebase**: Rewrote the commit body to state the problem and approach directly, corrected the note on `spclock_err02`, and rebased onto upstream `main`. All MR pipeline checks pass.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159629
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-ekt47o7etd0z3ckdbzxq2zjx4-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/20260920/d81b389f/attachment.htm>


More information about the bugs mailing list