Skip to content

runtime/pprof: printStackRecord should check whether len(stk) == 0 #18836

@josharian

Description

@josharian

In runtime/pprof/pprof.go, func printStackRecord, if len(stk) == 0, I think junk will be written to the profile. This could happen if a user calls Add on a custom profile with a skip value that is too large. See also #18788 (comment).

cc @matloob

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions