runtime/pprof: pprof.Profile WriteTo
does not check for the error, and return success on errors
#73107
Labels
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.24.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I performed a heap lookup, and tried to perform a write to a custom writer, which returned an error
Demo code: https://go.dev/play/p/uaNjHnwqiJh
What did you see happen?
The function
WriteTo
returned no error even though the provided writer errored out.Demo code: https://go.dev/play/p/uaNjHnwqiJh
What did you expect to see?
I expected the function to return the error as per its godoc
Stack trace of the calls
The call to writer provided happens here. That function returns the error that is not checked here
The text was updated successfully, but these errors were encountered: