jbrukh / ggit

ggit
17 stars 2 forks source link

ggcompare fails on libgit2 git repo with bad size. #42

Closed jbrukh closed 11 years ago

jbrukh commented 11 years ago

3748 git/ggit object: 3243a3b56530d63af8ea7859a8439d570179f781 panic: payload doesn't match prescibed size

goroutine 1 [running]: github.com/jbrukh/ggit/api.panicErr(0x1126cc, 0x24) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/parser.go:45 +0x42 github.com/jbrukh/ggit/api.(_objectParser).parseTree(0x11a6ea80, 0x4, 0xf6648) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/tree.go:86 +0x2a4 github.com/jbrukh/ggit/api.(_packedObjectParser).applyDelta(0x110828b0, 0x1213c260, 0x106e2740, 0x106e2740, 0x110828b0, ...) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/pack.go:688 +0x9ea github.com/jbrukh/ggit/api.(_Pack).parseDeltaEntry(0x105e1e10, 0x10be2204, 0x1f6, 0x1f6, 0x30620b06, ...) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/pack.go:564 +0x216 github.com/jbrukh/ggit/api.(_Pack).parseEntry(0x105e1e10, 0xea4, 0x0, 0x106e2760) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/pack.go:409 +0x2f4 github.com/jbrukh/ggit/api.(_Pack).unpack(0x105e1e10, 0x106e2740, 0x0, 0x0, 0x10893b00, ...) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/pack.go:138 +0xcd github.com/jbrukh/ggit/api.unpack(0x105e0358, 0x1, 0x1, 0x106e2740, 0x0, ...) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/pack.go:188 +0x75 github.com/jbrukh/ggit/api.(_DiskRepository).ObjectFromOid(0x1060e880, 0x106e2740, 0x0, 0x0, 0x0, ...) /Users/brukhman/other/src/github.com/jbrukh/ggit/api/disk_repository.go:63 +0xeb main.main() /Users/brukhman/other/src/github.com/jbrukh/ggit/cmd/ggcompare/ggcompare.go:42 +0x32e

goroutine 2 [syscall]: created by runtime.main /usr/local/go/src/pkg/runtime/proc.c:221

goroutine 9 [finalizer wait]: created by runtime.gc /usr/local/go/src/pkg/runtime/mgc0.c:882

MikeBosw commented 11 years ago

There was an issue with the consume method in the parser. Resolved.