[llvm-branch-commits] [lldb] r324327 - Merging r324234:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 6 01:42:38 PST 2018
Author: hans
Date: Tue Feb 6 01:42:38 2018
New Revision: 324327
URL: http://llvm.org/viewvc/llvm-project?rev=324327&view=rev
Log:
Merging r324234:
------------------------------------------------------------------------
r324234 | kamil | 2018-02-05 14:16:22 +0100 (Mon, 05 Feb 2018) | 29 lines
Fix a crash in *NetBSD::Factory::Launch
Summary:
We cannot call process_up->SetState() inside
the NativeProcessNetBSD::Factory::Launch
function because it triggers a NULL pointer
deference.
The generic code for launching a process in:
GDBRemoteCommunicationServerLLGS::LaunchProcess
sets the m_debugged_process_up pointer after
a successful call to m_process_factory.Launch().
If we attempt to call process_up->SetState()
inside a platform specific Launch function we
end up dereferencing a NULL pointer in
NativeProcessProtocol::GetCurrentThreadID().
Use the proper call process_up->SetState(,false)
that sets notify_delegates to false.
Sponsored by <The NetBSD Foundation>
Reviewers: labath, joerg
Reviewed By: labath
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D42868
------------------------------------------------------------------------
Modified:
lldb/branches/release_60/ (props changed)
lldb/branches/release_60/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
Propchange: lldb/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 6 01:42:38 2018
@@ -1,3 +1,3 @@
/lldb/branches/apple/python-GIL:156467-162159
/lldb/branches/iohandler:198360-200250
-/lldb/trunk:321932,322081,324251
+/lldb/trunk:321932,322081,324234,324251
Modified: lldb/branches/release_60/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_60/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=324327&r1=324326&r2=324327&view=diff
==============================================================================
--- lldb/branches/release_60/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original)
+++ lldb/branches/release_60/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Tue Feb 6 01:42:38 2018
@@ -111,7 +111,7 @@ NativeProcessNetBSD::Factory::Launch(Pro
for (const auto &thread : process_up->m_threads)
static_cast<NativeThreadNetBSD &>(*thread).SetStoppedBySignal(SIGSTOP);
- process_up->SetState(StateType::eStateStopped);
+ process_up->SetState(StateType::eStateStopped, false);
return std::move(process_up);
}
More information about the llvm-branch-commits
mailing list