• Adam Langley's avatar
    Fix bug when sending via select. · b89d6309
    Adam Langley authored
    selfree maintains a cache of Select structures for several sizes. In
    newselect, we'll use an entry from the cache if one is found. However,
    the Scase structures corresponding to a send may have been allocated
    for the wrong size. In this case we'll write off the end of the Scase
    into random memory and, generally, read some amount of junk in the
    receive.
    
    This patch fixes the issue by removing the cache, on the advice of
    rsc.
    
    R=rsc
    CC=go-dev
    http://go/go-review/1016002
    b89d6309
chan.c 17.2 KB