From 9348492c5816d8ede4300ff10031a96d82171d9d Mon Sep 17 00:00:00 2001 From: aarzilli Date: Fri, 23 Jun 2017 13:56:15 +0200 Subject: [PATCH] proc: bugfix: onNextGoroutine and breakpoints with nil condition Next will add internal breakpoints with nil condition if it can't find the current goroutine (possibly because there isn't a current goroutine because the runtime hasn't been initialized yet). onNextGoroutine should skip breakpoints with nil condition, otherwise we'll end up with an internal debugger error trying to walk a nil expression. Updates #893 --- pkg/proc/threads.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proc/threads.go b/pkg/proc/threads.go index 9e76febd..c9dc008a 100644 --- a/pkg/proc/threads.go +++ b/pkg/proc/threads.go @@ -407,7 +407,7 @@ func onRuntimeBreakpoint(thread Thread) bool { func onNextGoroutine(thread Thread, breakpoints map[uint64]*Breakpoint) (bool, error) { var bp *Breakpoint for i := range breakpoints { - if breakpoints[i].Internal() { + if breakpoints[i].Internal() && breakpoints[i].Cond != nil { bp = breakpoints[i] break }