Skip to content

Conversation

@tbleher
Copy link
Contributor

@tbleher tbleher commented Jun 23, 2025

localtime is not thread-safe on POSIX systems, meaning that the values might be corrupted if another thread in the same process calls localtime at the same time. Use localtime_r instead, which is thread-safe.

@tbleher
Copy link
Contributor Author

tbleher commented Jun 24, 2025

@modelonrobinandersson This is a small fix, where our static analysis (CodeQL) complained about use of localtime. I suggest replacing the call by localtime_r.

@modelonrobinandersson
Copy link
Contributor

Thank you @tbleher! Could you add a changelog entry as well?

@tbleher
Copy link
Contributor Author

tbleher commented Jun 25, 2025

Thank you @tbleher! Could you add a changelog entry as well?

You mean in RELEASE_NOTES.md? I can add a line there. 😃 Or is there another changelog file I am missing?

@modelonrobinandersson
Copy link
Contributor

@tbleher you are correct, RELEASE_NOTES.md, sorry for the confusion!

@tbleher
Copy link
Contributor Author

tbleher commented Jun 25, 2025

@tbleher you are correct, RELEASE_NOTES.md, sorry for the confusion!

Thank you for the clarification 👍 I have added a line there, I hope it is suitable.

@modelonrobinandersson
Copy link
Contributor

@tbleher looks good! When rebasing just note that version 3.0.4 was released yesterday, therefore make sure you move the entry up to FUTURE.
Thanks a lot!

@modelonrobinandersson modelonrobinandersson self-requested a review June 26, 2025 12:32
@modelonrobinandersson modelonrobinandersson added the enhancement New feature or request label Jun 26, 2025
tbleher added 2 commits June 28, 2025 13:08
`localtime` is not thread-safe on POSIX systems, meaning that the values
might be corrupted if another thread in the same process calls `localtime`
at the same time. Use `localtime_r` instead, which is thread-safe.
@tbleher tbleher force-pushed the minizip-use-localtime_r branch from 1c7fe5d to df90398 Compare June 28, 2025 11:18
@tbleher
Copy link
Contributor Author

tbleher commented Jun 28, 2025

I have rebased the changes unto current master.

@modelonrobinandersson modelonrobinandersson merged commit bb232e8 into modelon-community:master Jun 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants