Skip to content

fmt: Printf loops on invalid verb spec #10674

Closed
@dvyukov

Description

@dvyukov

The following program hangs in Execute.

package main

import (
    "text/template"
    "io/ioutil"
)

func main() {
    t, err := template.New("foo").Parse(data)
    if err != nil {
        return
    }
    t.Execute(ioutil.Discard, nil)
}

var data = "{{printf \"%017091901790959340919092959340919017929593813360\" 0}}"
SIGABRT: abort
goroutine 1 [running]:
    goroutine running on other thread; stack unavailable

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions