mirror of https://github.com/golang/go.git
runtime: the last section should be len(md.textsectmap)-1
This commit is contained in:
parent
5eb382fc08
commit
bcad6d6619
|
|
@ -622,7 +622,7 @@ func (md *moduledata) textOff(pc uintptr) (uint32, bool) {
|
|||
}
|
||||
end := sect.baseaddr + (sect.end - sect.vaddr)
|
||||
// For the last section, include the end address (etext), as it is included in the functab.
|
||||
if i == len(md.textsectmap) {
|
||||
if i == len(md.textsectmap)-1 {
|
||||
end++
|
||||
}
|
||||
if pc < end {
|
||||
|
|
|
|||
Loading…
Reference in New Issue