[ELF] - Fix segfault when processing .eh_frame.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 09:27:41 +0000 (09:27 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 09:27:41 +0000 (09:27 +0000)
commit94444b9a0778d076a73bd430f69ea84aff7185d5
treee2f8574104af7f36b56d1b20adab791b7093e7eb
parent06064d1bac6c232e601dd31a0c2b7a463210b7df
[ELF] - Fix segfault when processing .eh_frame.

Its a PR34648 which was a segfault that happened because
we stored pointers to elements in DenseMap.
When DenseMap grows such pointers are invalidated.
Solution implemented is to keep elements by pointer
and not by value.

Differential revision: https://reviews.llvm.org/D38034

llvm-svn: 313741
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h