|author||Rich Felker <firstname.lastname@example.org>||2014-01-21 00:36:35 -0500|
|committer||Rich Felker <email@example.com>||2014-01-21 00:36:35 -0500|
fix crash in dynamic linker when certain copy relocations are unsatisfied
STB_WEAK is only a weak reference for undefined symbols (those with a section of SHN_UNDEF). otherwise, it's a weak definition. normally this distinction would not matter, since a relocation referencing a symbol that also provides a definition (not SHN_UNDEF) will always succeed in finding the referenced symbol itself. however, in the case of copy relocations, the referenced symbol itself is ignored in order to search for another symbol to copy from, and thus it's possible that no definition is found. in this case, if the symbol being resolved happened to be a weak definition, it was misinterpreted as a weak reference, suppressing the error path and causing a crash when the copy relocation was performed with a null source pointer passed to memcpy. there are almost certainly still situations in which invalid combinations of symbol and relocation types can cause the dynamic linker to crash (this is pretty much inevitable), but the intent is that crashes not be possible for symbol/relocation tables produced by a valid linker.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions