Join GitHub today
GitHub is home to over 40 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:
Updates #29919 Change-Id: Ibf92c9957f71394f08c1203a29eae35a12021585 Reviewed-on: https://go-review.googlesource.com/c/159877 Run-TryBot: Ian Lance Taylor <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org> Reviewed-by: Brad Fitzpatrick <email@example.com> Reviewed-by: Keith Randall <firstname.lastname@example.org>
The name change init -> init.ializers was initially required for initialization code. With CL 161337 there's no wrapper code any more, there's a data structure instead (named .inittask). So we can go back to just plain init appearing in tracebacks. RELNOTE=yes Update #29919. Followon to CL 161337. Change-Id: I5a4a49d286df24b53b2baa193dfda482f3ea82a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/167780 Run-TryBot: Keith Randall <email@example.com> Reviewed-by: Josh Bleecher Snyder <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>