This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 699
Wrong stacktrace lines #151
Comments
The stack trace is generated at the line where the errors.Errorf is called. So, this behavior is Working As Intended. |
No, I'm referring to the stack frame where the nil pointer dereference is generated, not the one where I capture the stacktrace.
|
Ah, ok, I see what you’re saying now. Sorry. The 3 stack traces all kind of jammed together made this difficult to pull out right. |
Yeah, this is definitely because of the change in the way the stack traces were supposed to be built introduced from https://github.com/golang/proposal/blob/master/design/19348-midstack-inlining.md Specifically, turning off optimizations with
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
go version go1.10 linux/amd64
The following snippet causes the stacktrace to point to the wrong source code line.
A nil pointer deref occurs on line
if f.b == nil {
.The pkg/errors stacktrace points to the wrong line:
for i, f := range slice {
(2 lines above).The golang stacktrace points to the correct line.
The text was updated successfully, but these errors were encountered: