[Bug network/19690] Do not store resolver state (_res) in TCB

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Fri Oct 7 13:25:00 GMT 2016


https://sourceware.org/bugzilla/show_bug.cgi?id=19690

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
I thought that this was done to share _res across a static dlopen boundary, so
that _res.options would allow configuration of resolver behavior in a
statically linked binary.  But my tests show that this is not the case, and
_res is separate:

  <https://pagure.io/glibc-resolv-tests/blob/master/f/tst-res.c>

Output when statically linked:

info: main thread _res: 0x6f0cd8
error: mismatch between local and libc.so.6 _res in main thread:
error:   local: 0x6f6ba0
error:   libc.so.6: 0x7f63c8a1aaa0
info: first new thread _res: 0x7f63c8a1bdb8
error: mismatch between local and libc.so.6 _res in new thread:
error:   local: 0x7f63c8a1bdb8
error:   libc.so.6: 0x7f63c3ffeaa0
info: second thread _res: 0x7f63c3fffdb8
error: mismatch between local and libc.so.6 _res in second new thread:
error:   local: 0x7f63c3fffdb8
error:   libc.so.6: 0x7f63c37fdaa0

I don't understand how this is possible.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list