Socket::resolve isn't thread safe
Bug #590359 reported by
Razzloss
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
Medium
|
Razzloss | ||
LinuxDC++ |
Fix Released
|
Medium
|
Razzloss |
Bug Description
gethostbyname() shouldn't be called from multiple threads in Linux. As it may return pointer to static data that will be overwritten by the next call. (And based on the few stacktraces I've seen lately it is overwritten.) Windows seems to allocate the data for gethostbyname from thread local storage, so that will probably explain why it took so long to be reported.
Changed in linuxdcpp: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Windows people, can you check if this patch can be compiled/used with DC++ or does it need to be #ifdeffed.
--EZ