Opened 9 years ago

Last modified 4 years ago

#911 new enhancement

time64 & Y2038

Reported by: fdupont Owned by:
Priority: low Milestone: Outstanding Tasks
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: Core Feature Depending on Ticket: none
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Some systems (at least HPUX and Windows) provide a "time64" version of time_t, time(), etc, which will still work after 2038. I suggest 3 things:

  • use the 64 bit variant when it is available (e.g., twist a #define config.h and don't forget to include it)
  • make the code compiling without warnings with the 64 bit variant
  • at low priority provide a 64 variant on systems which don't have it.

Even we have ~20 years to solve this issue it should be fine to not wait so long...

Subtickets

Change History (17)

comment:1 Changed 9 years ago by shane

  • Milestone New Tasks deleted

comment:2 Changed 8 years ago by jelte

  • Milestone set to Next-Sprint-Proposed

comment:3 Changed 8 years ago by jinmei

IMO this is the lowest priority issue among others reported by Francis (I mean,
build errors on Windows are more important)

comment:4 Changed 8 years ago by jelte

  • Estimated Difficulty changed from 0.0 to 3

comment:5 Changed 8 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20111220

comment:6 Changed 8 years ago by shane

  • Feature Depending on Ticket set to Windows port

comment:7 Changed 8 years ago by shane

  • Feature Depending on Ticket changed from Windows port to none

comment:8 Changed 8 years ago by jelte

  • Milestone changed from Sprint-20111220 to Year 3 Task Backlog

comment:9 Changed 8 years ago by shane

  • Milestone Year 3 Task Backlog deleted
  • Sub-Project changed from DNS to Core

comment:10 Changed 8 years ago by jinmei

  • Milestone set to Next-Sprint-Proposed

comment:11 Changed 7 years ago by fdupont

In the OS list there is now NetBSD too. So IMHO it is time to resume this ticket, i.e., it is time for optional 64 bit times!!!

comment:12 follow-ups: Changed 7 years ago by shane

Francis, I'm not sure what the issue here is.

BIND 10 supports 64-bit time_t when the compiler provides it. I assume this will be the default in the next 25 years, so I don't think we need to take any action on our side to use a special 64-bit data type in the interim.

comment:13 in reply to: ↑ 12 Changed 7 years ago by fdupont

Replying to shane:

Francis, I'm not sure what the issue here is.

BIND 10 supports 64-bit time_t when the compiler provides it. I assume this will be the default in the next 25 years, so I don't think we need to take any action on our side to use a special 64-bit data type in the interim.

=> I still got some warnings about time_t. I should refresh the log of the compilation of
the 66 projects and dig in it...

comment:14 in reply to: ↑ 12 Changed 7 years ago by fdupont

Some examples:
random_number_generator.h lines 82 and 125: rng_.seed(time(NULL));
(as it is in a .h one can get it many times)
rrset_entry.cc line 59: uint32_t now = time(NULL);
rrset_entry.cc line 60: uint32_t newTTL = now < expire_time_ ? (expire_time_ - now) : 0;
dhcp6_srv.cc line 226: srandom(time(NULL));
(BTW there is already a random generator in libutil)
rrset_entry_unittest.cc line 116: uint32_t exp_time = time(NULL) + TEST_TTL;
range_utilities_unittest.cc line 45: srandom(time(NULL));
(note in this case it is another libutil test)

comment:15 Changed 5 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:16 Changed 4 years ago by tomek

  • Milestone changed from Remaining BIND10 tickets to DHCP Outstanding Tasks

As part of bug scrubbing during Kea 1.0, we decided to move a number of tickets to DHCP Outstanding.

comment:17 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

Note: See TracTickets for help on using tickets.