golang/go

fmt: index out of range

dvyukov opened this issue · 1 comments

The following program crashes with panic:

package main

import "fmt"

func main() {
    fmt.Sprintf("%.[]")
}
panic: runtime error: index out of range

goroutine 1 [running]:
fmt.(*pp).doPrintf(0x2082321a0, 0x104130, 0x4, 0x0, 0x0, 0x0)
    src/fmt/print.go:1134 +0x2251
fmt.Sprintf(0x104130, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
    src/fmt/print.go:207 +0x3b5
main.main()
    fmt.go:6 +0x44

go version devel +fbb4c74 Sat May 2 02:48:32 2015 +0000 darwin/amd64

CL https://golang.org/cl/9636 mentions this issue.