Skip to content
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

Race fix: tdns: strerror() -> strerror_r() #1623

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jun 16, 2024

Found by: thommey and michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Fix locking / race for tdns error logging

Additional description (if needed):
Non main threads like tdns must use strerror_r() instead of strerror().

Test cases demonstrating functionality (if applicable):

valgrind --tool=helgrind ./eggdrop -nt BotA.conf
[...]
.tcl dnslookup google.de foo

Without this patch applied, valgrind will report race

@michaelortmann michaelortmann changed the title tdns: strerror() -> strerror_r() Race fix: tdns: strerror() -> strerror_r() Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant