From 6eb5a4122879941275ca1e292d873b2a3452bf21 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Fri, 10 Apr 2026 18:28:42 +0000 Subject: runtime/pprof: using buffer writer instead of original writer Change-Id: Ibff8e7a08090d67d9a0625dee068c8d2eefbd190 GitHub-Last-Rev: b90b986121314615cf5d259d76a7be59303de1b0 GitHub-Pull-Request: golang/go#78630 Reviewed-on: https://go-review.googlesource.com/c/go/+/765480 Reviewed-by: Florian Lehner Reviewed-by: David Chase Auto-Submit: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com --- src/runtime/pprof/pprof.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime') diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index 6708d2dfa3..2dc0ac1807 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -1003,7 +1003,7 @@ func writeProfileInternal(w io.Writer, debug int, name string, runtimeProfile fu } b := bufio.NewWriter(w) - tw := tabwriter.NewWriter(w, 1, 8, 1, '\t', 0) + tw := tabwriter.NewWriter(b, 1, 8, 1, '\t', 0) w = tw fmt.Fprintf(w, "--- %v:\n", name) -- cgit v1.3