Skip to content

Commit

Permalink
Fix bug with overlapping typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
randall77 committed Oct 2, 2017
1 parent 19b8e0d commit 088b3f7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gocore/dwarf.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ func (c typeChunk) matchingAlignment(d typeChunk) bool {
panic("can't check alignment of differently typed chunks")
}
if c.a >= d.a {
return d.a.Sub(c.a)%c.t.Size != 0
return d.a.Sub(c.a)%c.t.Size == 0
}
return c.a.Sub(d.a)%c.t.Size != 0
return c.a.Sub(d.a)%c.t.Size == 0
}

func (c typeChunk) merge(d typeChunk) typeChunk {
Expand Down Expand Up @@ -327,9 +327,6 @@ func (p *Program) typeHeap() {
if a == 0 { // nil pointer
return
}
if t == nil {
return // TODO: why?
}
i, _ := p.findObjectIndex(a)
if i < 0 { // pointer doesn't point to an object in the Go heap
return
Expand Down

0 comments on commit 088b3f7

Please sign in to comment.