A simple Go error handling pattern led to 54GB memory usage with 65535 errors (gist.github.com) 3 points by alingse 1y ago ↗ HN
[–] alingse 1y ago ↗ While debugging why our golangci-lint runs in CI were getting randomly killed, I discovered a surprising memory issue in Go's error handling.The problem occurs when combining many errors using `errors.Join()` and wrapping them with `fmt.Errorf()`. Here's a minimal reproduction
1 comment
[ 3.0 ms ] story [ 17.1 ms ] threadThe problem occurs when combining many errors using `errors.Join()` and wrapping them with `fmt.Errorf()`. Here's a minimal reproduction