Skip to content

fmt: index out of range #10675

Description

@dvyukov

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions