[Lldb-commits] [lldb] r253086 - Add a null check against the ThreadPlan

2015-11-13 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Nov 13 15:28:53 2015 New Revision: 253086 URL: http://llvm.org/viewvc/llvm-project?rev=253086=rev Log: Add a null check against the ThreadPlan I'm seeing some cases where the ThreadPlan is null. It could be a sign of a valid race condition, but at least we shouldn't

Re: [Lldb-commits] [lldb] r253086 - Add a null check against the ThreadPlan

2015-11-13 Thread Jim Ingham via lldb-commits
Thanks. When I first did the thread plan stuff I wasn't sure whether I would have a use for an empty plan stack, so I didn't rigorously go through and assert everywhere that might happen. I had some idea for using an empty plan stack which was apparently so kooky that not only did I never

Re: [Lldb-commits] [lldb] r253086 - Add a null check against the ThreadPlan

2015-11-13 Thread Zachary Turner via lldb-commits
I'll change it to an assert and next time it happens I'll dig a little more. I've only seen this on about 1 or 2 out of 100 runs of the test suite so I don't know how it happens. On Fri, Nov 13, 2015 at 1:44 PM Jim Ingham wrote: > GetCurrentPlan should never return NULL.

Re: [Lldb-commits] [lldb] r253086 - Add a null check against the ThreadPlan

2015-11-13 Thread Jim Ingham via lldb-commits
GetCurrentPlan should never return NULL. The Thread constructor pushes the Base thread plan onto the stack, and pop won't remove the Base plan. When we destroy the thread (in ThreadDestroy) we clear the plan stack and then push a ThreadPlanNull onto the plan stack. So if you are seeing a