Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: extra stack frames in Go 1.12beta2 compared to 1.11 #29919
What version of Go are you using (
Yeah, this doesn't look right. I will try and fix.
Init functions are special because they contain some generated code and some user code. The decision to print the frame used to use the actual file/line of the location the call happened. Now it uses the file/line of the function definition. This normally wouldn't matter, but for init functions. Possibly we could go back to the old method, although it is tricky to get the information to where it is needed. Another fix would be to split out the user code into a separate function. The outer function would be wrapper and the inner function wouldn't be. From the code to generate init functions, we'd pull step 7 into a separate function: