Skip to content

git: tree_entries table crashes #68

@smola

Description

@smola
➜  gitql git:(f028104) ✗ gitql query 'SELECT size, name FROM blobs, tree_entries WHERE hash = entry_hash LIMIT 5'
SELECT size, name FROM blobs, tree_entries WHERE hash = entry_hash LIMIT 5
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4976d0]

goroutine 1 [running]:
panic(0x832420, 0xc420014130)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/gitql/gitql/git.(*treeEntryIter).Next(0xc4202a67e0, 0xac7a80, 0xc4202a6bc0, 0x0, 0x0)
	/home/smola/dev/go/src/github.com/gitql/gitql/git/tree_entries.go:79 +0x50
github.com/gitql/gitql/sql/plan.(*crossJoinIterator).fillRows(0xc420342be0, 0xc42001ee60, 0x18)
	/home/smola/dev/go/src/github.com/gitql/gitql/sql/plan/cross_join.go:106 +0x38
github.com/gitql/gitql/sql/plan.(*crossJoinIterator).Next(0xc420342be0, 0x20, 0x7ffb5f379000, 0xc4202a68a0, 0x4)
	/home/smola/dev/go/src/github.com/gitql/gitql/sql/plan/cross_join.go:75 +0x365
github.com/gitql/gitql/sql/plan.(*filterIter).Next(0xc4202a6800, 0xc4201f24d0, 0x1, 0x1, 0x2)
	/home/smola/dev/go/src/github.com/gitql/gitql/sql/plan/filter.go:55 +0x38
github.com/gitql/gitql/sql/plan.(*limitIter).Next(0xc4202a6820, 0x4, 0x2, 0x1, 0x8b4759)
	/home/smola/dev/go/src/github.com/gitql/gitql/sql/plan/limit.go:61 +0x4c
github.com/gitql/gitql/sql/plan.(*iter).Next(0xc4202a6840, 0xc4202a6880, 0x2, 0x2, 0x2)
	/home/smola/dev/go/src/github.com/gitql/gitql/sql/plan/project.go:77 +0x38
main.(*CmdQuery).printQuery(0xc420011e00, 0xc4202717c0, 0x2, 0x2, 0xac6180, 0xc4202a6840)
	/home/smola/dev/go/src/github.com/gitql/gitql/cmd/gitql/query.go:102 +0x1fc
main.(*CmdQuery).executeQuery(0xc420011e00, 0x0, 0x0)
	/home/smola/dev/go/src/github.com/gitql/gitql/cmd/gitql/query.go:89 +0x33a
main.(*CmdQuery).Execute(0xc420011e00, 0xc42014c380, 0x0, 0x2, 0x1, 0x2)
	/home/smola/dev/go/src/github.com/gitql/gitql/cmd/gitql/query.go:39 +0x69
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc420076780, 0xc42000c310, 0x2, 0x2, 0x2, 0x1, 0xc42001e630, 0xc4200fa780, 0xc4200fa6c8)
	/home/smola/dev/go/src/github.com/jessevdk/go-flags/parser.go:316 +0x8e6
github.com/jessevdk/go-flags.(*Parser).Parse(0xc420076780, 0x8b79fd, 0x7, 0x8c3a7d, 0x1d, 0x0)
	/home/smola/dev/go/src/github.com/jessevdk/go-flags/parser.go:186 +0x74
main.main()
	/home/smola/dev/go/src/github.com/gitql/gitql/cmd/gitql/main.go:15 +0x2e8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions