From 2bd38fff90f9f76647bda190ed40e7c33637aebf Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Thu, 24 Sep 2020 17:03:46 +0200 Subject: [PATCH] dwarf/line: ignore end_of_sequence entry if AllPCsBetween (#2180) * dwarf/line: ignore end_of_sequence entry if AllPCsBetween Go 1.15 (but possibly prior versions of Go too) has a tendency to use an address in the middle of an instruction for this entry, but if it was correct it would be after the last instruction of the function anyway. This problem manifests especially frequently as a target crash in TestStepConcurrentPtr on linux/arm64 (~6% of the runs). * Travis-CI: add ignorechecksum option to chocolatey command Looks like a configuration problem on chocolatey's end. Co-authored-by: a --- pkg/dwarf/line/state_machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/dwarf/line/state_machine.go b/pkg/dwarf/line/state_machine.go index b5c8abd2..2fae44c2 100644 --- a/pkg/dwarf/line/state_machine.go +++ b/pkg/dwarf/line/state_machine.go @@ -182,7 +182,7 @@ func (lineInfo *DebugLineInfo) AllPCsBetween(begin, end uint64, excludeFile stri if (sm.address > end) && (end >= sm.lastAddress) { break } - if sm.address >= begin && sm.address <= end && sm.address > lastaddr && sm.isStmt && ((sm.file != excludeFile) || (sm.line != excludeLine)) { + if sm.address >= begin && sm.address <= end && sm.address > lastaddr && sm.isStmt && !sm.endSeq && ((sm.file != excludeFile) || (sm.line != excludeLine)) { lastaddr = sm.address pcs = append(pcs, sm.address) }