Skip to content
Tcl Source Code View Ticket
Login

View Ticket

ThreadSafeLocalTime(): check if localtime_r() encountered error

Closed / Fixede368ba6683926255f5f109c478e91c63fbce32f9Created 3 years agoUpdated 3 years ago
Descriptionwiki2023-09-20 22:37:25
In response to bug [1237907], ThreadSafeLocalTime() checks whether localtime() encountered an error (e.g. EOVERFLOW) by checking if the return value is NULL: [96beb107b193]. The same check is needed for localtime_r() as well. See attached patch.
Referenced by2
chrstphrchvz Ticket [e368ba6683]: 3 changes [History diff]2023-09-20 22:37:40
chrstphrchvzwiki2023-09-21 00:16:24

I would like to propose non-regression tests for this: see localtime-tests.diff. However I have not completely verified their portability, and maybe their formatting can be improved.

oehharwiki2024-02-07 17:36:36

As the patch was merged, it might be closed, no?

oehharwiki2024-02-07 17:37:21

Merged by commit [c94812e9a9]

chrstphrchvzwiki2024-02-16 10:38:42

If there is no interest in having non-regression tests for this (similar to those in the other attached patch) then I will not reopen this.

Log in (anonymous is fine) to add a comment.

Attachments: