Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt: index out of range (5) #10945

Closed
dvyukov opened this issue May 25, 2015 · 1 comment
Closed

fmt: index out of range (5) #10945

dvyukov opened this issue May 25, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented May 25, 2015

The following program crashes with a panic:

package main

import "fmt"

func main() {
    fmt.Printf("%.90", -2)
}
panic: runtime error: index out of range

goroutine 1 [running]:
fmt.(*fmt).integer(0xc2080546d8, 0x2, 0xa, 0x4bab01, 0x514050, 0x10)
    src/fmt/format.go:277 +0x540
fmt.(*pp).fmtInt64(0xc208054680, 0xfffffffffffffffe, 0xc200000076)
    src/fmt/print.go:363 +0x15d
fmt.(*pp).printArg(0xc208054680, 0x4bab60, 0xc20800a460, 0x76, 0x0, 0xc20800e400)
    src/fmt/print.go:770 +0xe56
fmt.(*pp).doPrintf(0xc208054680, 0x4ff230, 0x4, 0xc208041f60, 0x1, 0x1)
    src/fmt/print.go:1211 +0x795
fmt.Fprintf(0x7f2a2da971c0, 0xc20802e010, 0x4ff230, 0x4, 0xc208041f60, 0x1, 0x1, 0x40af13, 0x0, 0x0)
    src/fmt/print.go:188 +0x77
fmt.Printf(0x4ff230, 0x4, 0xc208041f60, 0x1, 0x1, 0xc2080200b8, 0x0, 0x0)
    src/fmt/print.go:197 +0x97
main.main()
    fmt.go:6 +0xdb

on commit 8017ace

@dvyukov dvyukov added this to the Go1.5 milestone May 25, 2015
@gopherbot
Copy link
Contributor

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

@robpike robpike closed this as completed in 70cf735 Jun 2, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants