From 4091d244fdb413d603755f6f7653ee8dc1f566ec Mon Sep 17 00:00:00 2001 From: rfyiamcool Date: Sun, 8 Oct 2023 13:46:29 +0800 Subject: [PATCH] fix: validate_invalid_gogc Signed-off-by: rfyiamcool --- util/gctuner/tuner.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/gctuner/tuner.go b/util/gctuner/tuner.go index 81958b2c..0bd6a14a 100644 --- a/util/gctuner/tuner.go +++ b/util/gctuner/tuner.go @@ -35,6 +35,9 @@ func init() { if err != nil { return } + if gogc <= 0 { + return + } defaultGCPercent = uint32(gogc) }