]> Cypherpunks repositories - gostls13.git/commit
gc: fix pc/line table
authorJulian Phillips <julian@quantumfyre.co.uk>
Tue, 23 Aug 2011 21:01:14 +0000 (17:01 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 23 Aug 2011 21:01:14 +0000 (17:01 -0400)
commitb99d7229631160a3bf846ac77f0f701bf8b6a6c8
treec5a1600ef8477bc721bf5735ab3fdb6c4f88350f
parent33e9d24ad9007d0dd4eec90b1c755aac7d1a9cbb
gc: fix pc/line table

When a line directive was encountered we would push a new 'z' entry into
the history to indicate the start of new file attributation, and a 'Z'
entry to change line numbering.  However we didn't pop the 'z' entry, so
we were actually corrupting the history stack.  The most obvious
occurance of this was in the code that build the symbol tables for the
DWARF information - where an internal stack in the linker would overflow
when more than a few line directives were encountered in a single stack
(Issue 1878).  So now we pop the 'z' entry when we encounter the end of
the file that the directive was in, which maintains the history stack
integrity.

Also, although new 'z' entries for new files had relative paths
expanded, the same was not done for line directives.  Now we do it for
line directives also - so that the now correct DWARF information has the
full path available.

Fixes #1878.

R=rsc
CC=golang-dev
https://golang.org/cl/4938042
src/cmd/gc/obj.c