forked from OSchip/llvm-project
Do not assert on POSIXDYLD double-eAdd.
Summary: This has been discovered while experimenting with the gecko linker on android. In general, assert()'ing on "user input" is a bad idea. Test Plan: Run unit tests. Reviewers: clayborg, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8495 llvm-svn: 232966
This commit is contained in:
parent
d2a1559846
commit
acd80d80dd
|
@ -206,7 +206,12 @@ DYLDRendezvous::UpdateSOEntries()
|
||||||
// state and take a snapshot of the currently loaded images.
|
// state and take a snapshot of the currently loaded images.
|
||||||
if (m_current.state == eAdd || m_current.state == eDelete)
|
if (m_current.state == eAdd || m_current.state == eDelete)
|
||||||
{
|
{
|
||||||
assert(m_previous.state == eConsistent || (m_previous.state == eAdd && m_current.state == eDelete));
|
// Some versions of the android dynamic linker might send two
|
||||||
|
// notifications with state == eAdd back to back. Ignore them
|
||||||
|
// until we get an eConsistent notification.
|
||||||
|
if (!(m_previous.state == eConsistent || (m_previous.state == eAdd && m_current.state == eDelete)))
|
||||||
|
return false;
|
||||||
|
|
||||||
m_soentries.clear();
|
m_soentries.clear();
|
||||||
m_added_soentries.clear();
|
m_added_soentries.clear();
|
||||||
m_removed_soentries.clear();
|
m_removed_soentries.clear();
|
||||||
|
|
Loading…
Reference in New Issue