]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix bug in logic for computing var abstract origins
authorThan McIntosh <thanm@google.com>
Thu, 7 Dec 2017 01:10:51 +0000 (20:10 -0500)
committerThan McIntosh <thanm@google.com>
Thu, 7 Dec 2017 17:03:05 +0000 (17:03 +0000)
commit692f2e9c44e629e84b315f10c8538c9461fd6d61
treea2bef2c228a6cfa80d0d710b1e2fcc37b294a0e6
parent8b13988e40e468995360802a2dc7de9b32a34fea
cmd/compile: fix bug in logic for computing var abstract origins

The DWARF inline info generation code was using file/line/column (from
src.Pos) as a means of matching up pre- and post-optimization variable
nodes. This turns out to be problematic since it looks as though
distinct formals on the same line can be assigned the same column
number. Work around this issue by adding variable names to the
disambiguation code. Added a testpoint to the linker DWARF test that
checks to make sure each abstract origin offset of distinct within a
given DWARF DW_AT_inlined_routine body.

Fixes #23020.

Change-Id: Ie09bbe01dc60822d84d4085547b138e644036fb3
Reviewed-on: https://go-review.googlesource.com/82396
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/dwinl.go
src/cmd/link/internal/ld/dwarf_test.go