From: Russ Cox Date: Wed, 11 Jun 2014 20:55:38 +0000 (-0400) Subject: [release-branch.go1.3] cmd/ld: fix PC deltas in DWARF line number table X-Git-Tag: go1.3rc2~11 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=16367614fbcd4ccdc6662e71bea76f3fbe6a7545;p=gostls13.git [release-branch.go1.3] cmd/ld: fix PC deltas in DWARF line number table ««« CL 104950045 / 87daa424d96a cmd/ld: fix PC deltas in DWARF line number table The putpclcdelta function set the DWARF line number PC to s->value + pcline->pc, which is correct, but the code then set the local variable pc to epc, which can be a different value. This caused the next delta in the DWARF table to be wrong. Fixes #8098. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/104950045 »»» LGTM=r R=golang-codereviews, r CC=bradfitz, golang-codereviews, iant https://golang.org/cl/107900045 --- diff --git a/src/cmd/ld/dwarf.c b/src/cmd/ld/dwarf.c index cee591ffa6..cc77b45cd6 100644 --- a/src/cmd/ld/dwarf.c +++ b/src/cmd/ld/dwarf.c @@ -1624,13 +1624,13 @@ writelines(void) } putpclcdelta(s->value + pcline.pc - pc, pcline.value - line); - pc = epc; + pc = s->value + pcline.pc; + line = pcline.value; if(pcfile.nextpc < pcline.nextpc) epc = pcfile.nextpc; else epc = pcline.nextpc; epc += s->value; - line = pcline.value; } da = 0;