[RTEMS Project] #4338: rtems_clock_set(): Cannot set future dates later than approximately 2105

RTEMS trac trac at rtems.org
Fri Mar 12 15:30:38 UTC 2021


#4338: rtems_clock_set(): Cannot set future dates later than approximately 2105
-------------------------------------------------+-------------------------
 Reporter:  Frank Kuehndel                       |       Owner:  Sebastian
                                                 |  Huber
     Type:  defect                               |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  rtems                                |     Version:  6
 Severity:  normal                               |  Resolution:
 Keywords:  rtems_clock_set, 2514,               |  Blocked By:
  _TOD_To_seconds                                |
 Blocking:                                       |
-------------------------------------------------+-------------------------

Comment (by Frank Kuehndel):

 * `time_t` - I presume 64 bit - will avoid the overflow in
 _TOD_To_seconds() but
   * ... there are still the not correctly handled far away leap years.
   * ... there is STATUS_INVALID_NUMBER (Should not occur when the overflow
 is fixed. Yet, I do not like such incorrect code even if it should not
 trigger.)

 * Overruns in rtems_clock_get_ticks_since_boot() are OK because the
 Classic API Guide says:

 > With a 1ms clock tick, this counter overflows after 50 days since boot.
 This is the historical measure of uptime in an RTEMS system. The newer
 service rtems_clock_get_uptime() is another and potentially more accurate
 way of obtaining similar information.

 * At other functions like rtems_clock_get_seconds_since_epoch() I had not
 have a look, yet.

--
Ticket URL: <http://devel.rtems.org/ticket/4338#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list