diff --git a/pkg/common/debug.go b/pkg/common/debug.go index 633b8c278..aa7077608 100644 --- a/pkg/common/debug.go +++ b/pkg/common/debug.go @@ -33,7 +33,10 @@ func getFrame(skipFrames int) runtime.Frame { } func GetStackTrace() string { - buf := make([]byte, uint64(1)<<32) + buf := make([]byte, 2147483647) stackSize := runtime.Stack(buf, false) + if stackSize > 2147483647 { + stackSize = 2147483647 + } return string(buf[:stackSize]) }