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 <a@kra>
This commit is contained in:
Alessandro Arzilli
2020-09-24 17:03:46 +02:00
committed by GitHub
parent 310a124dba
commit 2bd38fff90

View File

@ -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)
}