Skip to content

x/net/spdy: processing of 35 bytes takes 7 seconds #10544

Description

@dvyukov

The following program runs for 7+ seconds. This is too much to process 35 bytes of input.

package main

import (
    "bytes"
    "encoding/hex"
    "golang.org/x/net/spdy"
    "io/ioutil"
)

func main() {
    data, _ := hex.DecodeString("80300002303030303030303078f9e3c6a7c24230104e04e57c08af090600000000ffff")
    framer, err := spdy.NewFramer(ioutil.Discard, bytes.NewReader(data))
    if err != nil {
        panic(err)
    }
    for score := 0; ; score++ {
        f, err := framer.ReadFrame()
        if err != nil {
            if f != nil {
                panic(err)
            }
            return
        }
        err = framer.WriteFrame(f)
        if err != nil {
            panic(err)
        }
    }
}

on commit 6f62f426de90c0ed6a55207b51476115fcb17237

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