[Bug libc/23296] Data race in setting function descriptor during lazy binding
danglin at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Mon Jun 18 14:20:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23296
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
After thinking about this, I don't believe this can be fixed in glibc.
1) The window for the race could be reduced by atomically updating function
descriptors but the race can't be fully eliminated. See for example the linker
stub shown at the end of comment #1. Function descriptors would have to have
8 byte alignment.
2) Even if we could detect the case where the function descriptor has been
updated between the loading of the ip and gp values, there's no way to find
the function descriptor and correct the ip value.
So, I think we should link pthread executables and shared libraries with
"-z now".
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list