Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gracefully handle elided frames (#120)
When parsing stacks we frequently encounter elided frames. The actual stack line looks something like `...23 frames elided...`, which is passed to `parseFuncName`, which of course is not parsable as a function name. As a result, whenever this happens we get a useless panic like the following: ``` panic: Failed to parse stack trace: parse function: no function found: "...23 frames elided..." goroutine 1 [running]: go.uber.org/goleak/internal/stack.getStackBuffer(0x1) /home/runner/go/pkg/mod/go.uber.org/[email protected]/internal/stack/stacks.go:240 +0x65 go.uber.org/goleak/internal/stack.getStacks(0x1) /home/runner/go/pkg/mod/go.uber.org/[email protected]/internal/stack/stacks.go:84 +0x3b go.uber.org/goleak/internal/stack.All(...) /home/runner/go/pkg/mod/go.uber.org/[email protected]/internal/stack/stacks.go:229 go.uber.org/goleak.Find({0xc0003ae880, 0x4, 0x4}) /home/runner/go/pkg/mod/go.uber.org/[email protected]/leaks.go:65 +0x1ea ``` This PR gracefully handles elided frames to prevent the panic.
- Loading branch information