From 6bb6d4554d044f0d3d14f95d1dc6eb9315345a1a Mon Sep 17 00:00:00 2001 From: toshski Date: Tue, 19 Dec 2023 17:51:25 +1300 Subject: [PATCH] 2nd try at github compile --- pkg/common/debug.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]) }