diff options
| author | Stephane Sezer <sas@cd80.net> | 2015-03-23 17:05:41 +0000 |
|---|---|---|
| committer | Stephane Sezer <sas@cd80.net> | 2015-03-23 17:05:41 +0000 |
| commit | acd80d80dda80ef3b6818b2fdb5b538866aae4c1 (patch) | |
| tree | b9b05d7ea3c3271502a3a0d37ce575d7a5259974 /lldb | |
| parent | d2a15598461db035f940db17d2389731d101c65f (diff) | |
| download | bcm5719-llvm-acd80d80dda80ef3b6818b2fdb5b538866aae4c1.tar.gz bcm5719-llvm-acd80d80dda80ef3b6818b2fdb5b538866aae4c1.zip | |
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
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp index dc737bdeec3..7d8ee9cca9c 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -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(); |

