[Lldb-commits] [lldb] r232966 - Do not assert on POSIXDYLD double-eAdd.
sas at cd80.net
Mon Mar 23 10:05:41 PDT 2015
Date: Mon Mar 23 12:05:41 2015
New Revision: 232966
Do not assert on POSIXDYLD double-eAdd.
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
Differential Revision: http://reviews.llvm.org/D8495
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Mon Mar 23 12:05:41 2015
@@ -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;
More information about the lldb-commits