From 5ec8a2de62b1de896320d7629ed7ee99b7a60ed2 Mon Sep 17 00:00:00 2001 From: Prashant Varanasi Date: Sun, 3 Apr 2016 22:23:19 -0700 Subject: [PATCH] Fix for stacks ending with 0 bytes --- introspection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/introspection.go b/introspection.go index d150081e..e82e5a2e 100644 --- a/introspection.go +++ b/introspection.go @@ -318,7 +318,7 @@ func getStacks(all bool) []byte { buf = make([]byte, n) stackLen := runtime.Stack(buf, all) if stackLen < n { - return buf + return buf[:stackLen] } }