I’ve noticed this many times but when a stack trace is printed during
“go test”, the location information in the stack trace is off by a few
dozen lines (it seems to vary).
goroutine 30 [running]:
foo/bar.(*someObj).someFunc(0xc2081a9500, 0xc208042210, 0xc208034108,
0x1, 0x1, 0x225000, 0x0, 0x0, 0x0, 0x0)
foo/bar.(*someObj).parentFunc(0xc2081a9500, 0xc2080d7900, 0xd, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0)
myfile.go doesn’t even have 641 lines (it has 515). The stack frame
in parentFunc claims to have invoked someFunc at line 284, but that’s
wrong too. Line 284 doesn’t even fall in parentFunc’s definition.
In parentFunc()’s implementation, the only call to someFunc() is at
line 212 (so 72 lines before).
This seems to happen only during “go test”, and only when the stack
trace also shows the path to the .go file with the "_test/_obj_test”
intermediate directories added to the path of the file.
Is this a known issue?
Benoit "tsuna" Sigoure
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.