This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/19690] Do not store resolver state (_res) in TCB
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 07 Oct 2016 13:25:42 +0000
- Subject: [Bug network/19690] Do not store resolver state (_res) in TCB
- Auto-submitted: auto-generated
- References: <bug-19690-131@http.sourceware.org/bugzilla/>
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.