Skip to content

Commit

Permalink
Do not assert on POSIXDYLD double-eAdd.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sas committed Mar 23, 2015
1 parent d2a1559 commit acd80d8
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -206,7 +206,12 @@ DYLDRendezvous::UpdateSOEntries()
// state and take a snapshot of the currently loaded images.
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_added_soentries.clear();
m_removed_soentries.clear();
Expand Down

0 comments on commit acd80d8

Please sign in to comment.