Skip to content

Commit 088b3f7

Browse files
committed
Fix bug with overlapping typing.
1 parent 19b8e0d commit 088b3f7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

gocore/dwarf.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ func (c typeChunk) matchingAlignment(d typeChunk) bool {
275275
panic("can't check alignment of differently typed chunks")
276276
}
277277
if c.a >= d.a {
278-
return d.a.Sub(c.a)%c.t.Size != 0
278+
return d.a.Sub(c.a)%c.t.Size == 0
279279
}
280-
return c.a.Sub(d.a)%c.t.Size != 0
280+
return c.a.Sub(d.a)%c.t.Size == 0
281281
}
282282

283283
func (c typeChunk) merge(d typeChunk) typeChunk {
@@ -327,9 +327,6 @@ func (p *Program) typeHeap() {
327327
if a == 0 { // nil pointer
328328
return
329329
}
330-
if t == nil {
331-
return // TODO: why?
332-
}
333330
i, _ := p.findObjectIndex(a)
334331
if i < 0 { // pointer doesn't point to an object in the Go heap
335332
return

0 commit comments

Comments
 (0)