RefService::FindAllTags: slice bounds out of range
Summary
FindAllTags panics:
runtime error: slice bounds out of range [10225:10224]
Stack trace
File "tag.go", line 126, in buildAnnotatedTag
signature := string(tag.Message[index : bytes.Index(tag.Message[index:], []byte("\n"))+index])
File "tag.go", line 38, in GetTagCatfile
tag, err := buildAnnotatedTag(c, tagID, tagName, header, body, trimLen, trimRightNewLine)
File "refs.go", line 379, in parseTagLine
tag, err := gitlog.GetTagCatfile(c, tagID, refName, true, true)
File "refs.go", line 103, in parseAndReturnTags
tag, err := parseTagLine(c, scanner.Text())
This sounds like bytes.Index(tag.Message[index:], []byte("\n"))
is returning -1, aka there is no newline.
Environment
gitaly version: 12.9.2
Original ticket: https://salsa.debian.org/salsa/support/-/issues/205
Edited by Bastian Blank