about summary refs log tree commit diff
path: root/resolv/tst-res_hconf_reorder.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Revert "tst-res_hconf_reorder: Set RESOLV_REORDER environment variable"Florian Weimer2015-12-041-3/+0
| | | | | | | This reverts commit 731a713b72e1281d58b3304738f04efb7bfca8b7. This change is unnecessary because the Makefile already sets up the environment for the test.
* tst-res_hconf_reorder: Set RESOLV_REORDER environment variableFlorian Weimer2015-12-041-0/+3
| | | | Otherwise, the problematic code does not run.
* Fix potential hanging of gethostbyaddr_r/gethostbyname_rDmitry V. Levin2015-06-231-0/+112
When "reorder" resolver option is enabled, threads of a multi-threaded process could hang in gethostbyaddr_r, gethostbyname_r, or gethostbyname2_r. Due to a trivial bug in _res_hconf_reorder_addrs, simultaneous invocations of this function in a multi-threaded process could result to _res_hconf_reorder_addrs returning without releasing the lock it holds, causing other threads to block indefinitely while waiting for the lock that is not going to be released. [BZ #17977] * resolv/res_hconf.c (_res_hconf_reorder_addrs): Fix unlocking when initializing interface list, based on the bug analysis and the patch proposed by Eric Newton. * resolv/tst-res_hconf_reorder.c: New test. * resolv/Makefile [$(have-thread-library) = yes] (tests): Add tst-res_hconf_reorder. ($(objpfx)tst-res_hconf_reorder): Depend on $(libdl) and $(shared-thread-library). (tst-res_hconf_reorder-ENV): New variable.