-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Y2038 compatibility #2038
Comments
👋🏼 going to answer each of the points in turn, though in practice the problem you're asking about is more a function of the semihosting protocol spec itself and what firmware being debugged supports (or doesn't):
We control for this by saying that other libc's are just unsupported as that's way too many variables to even begin to try and control in practice. If a user manages to even get a good build of the firmware out that way (which we currently doubt they would), then if they run into problems with 2038 then from the project's perspective, that's firmly on them for running an unsupported configuration. This is the only viable way we have to control for this.
On 32-bit targets, SYS_TIME is 32-bit, but it is unsigned, thus pushing the problem out past 2038. This is currently a problem we don't deal with properly under BMDA as we never got back to addressing the C API used to grab the time (never actually use
It overflows every UINT32_MAX miliseconds, which is well defined by C. We then specifically take the overflow case into account in the timeout handling code. #1812 has more details about that. It used to be a problem and is a reason for people to migrate of their v1.x firmware once the release has been made of v2.0.
In practice, this is only a problem on really ancient glibc's and such. All modern Linux distros have a time_t that is suitable. Meson also fixed a bug around this for us by passing BMDA itself uses
Yes, no time primitives exist in that protocol. |
Please clarify whether any BMP firmware platform or BMDA supported OS is affected by the Y2038 superbug.
time_t
is 32-bit and BMDA compares timestamps, this is a potential problem. Are any mitigations required?Less sure about battery-powered ctxLink, Farpatch, etc. And 3rd party desktop software is not considered here, especially if they have their own issue trackers.
The text was updated successfully, but these errors were encountered: