1. 18 Nov, 2012 2 commits
    • Dave Cheney's avatar
      net: fix data race on fd.sysfd · c9856e7d
      Dave Cheney authored
      Fixes #4369.
      
      Remove the check for fd.sysfd < 0, the first line of fd.accept() tests if the fd is open correctly and will handle the fd being closed during accept.
      
      R=dvyukov, bradfitz
      CC=golang-dev
      https://golang.org/cl/6843076
      c9856e7d
    • Dave Cheney's avatar
      net: remove unused nil check · 0bfece06
      Dave Cheney authored
      This is part 1 of a series of proposals to fix issue 4369.
      
      In resolving issue 3507 it was decided not to nil out the inner conn.fd field to avoid a race. This implies the checks for fd == nil inside incref/decref are never true.
      
      Removing this logic removes one source of errClosing error values, which affects issue 4373 and moves towards bradfitz's request that fd.accept() return io.EOF when closed concurrently.
      
      Update #4369.
      Update #4373.
      
      R=mikioh.mikioh, bradfitz, dvyukov, rsc
      CC=golang-dev
      https://golang.org/cl/6852057
      0bfece06
  2. 17 Nov, 2012 9 commits
  3. 16 Nov, 2012 7 commits
  4. 15 Nov, 2012 8 commits
  5. 14 Nov, 2012 11 commits
  6. 13 Nov, 2012 3 commits
    • Robert Griesemer's avatar
      reflect: fix FieldByNameFunc · aa388017
      Robert Griesemer authored
      The existing algorithm did not properly propagate the type
      count from one level to the next, and as a consequence it
      missed collisions.
      
      Properly propagate multiplicity (count) information to the
      next level.
      
      benchmark                old ns/op    new ns/op    delta
      BenchmarkFieldByName1          182          180   -1.10%
      BenchmarkFieldByName2         6273         6183   -1.43%
      BenchmarkFieldByName3        49267        46784   -5.04%
      
      Fixes #4355.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/6821094
      aa388017
    • Russ Cox's avatar
      cmd/ld: fix build on elf systems · 2e77bc48
      Russ Cox authored
      TBR=iant
      CC=golang-dev
      https://golang.org/cl/6843050
      2e77bc48
    • Russ Cox's avatar
      reflect: add ArrayOf, ChanOf, MapOf, SliceOf · 11209825
      Russ Cox authored
      In order to add these, we need to be able to find references
      to such types that already exist in the binary. To do that, introduce
      a new linker section holding a list of the types corresponding to
      arrays, chans, maps, and slices.
      
      To offset the storage cost of this list, and to simplify the code,
      remove the interface{} header from the representation of a
      runtime type. It was used in early versions of the code but was
      made obsolete by the kind field: a switch on kind is more efficient
      than a type switch.
      
      In the godoc binary, removing the interface{} header cuts two
      words from each of about 10,000 types. Adding back the list of pointers
      to array, chan, map, and slice types reintroduces one word for
      each of about 500 types. On a 64-bit machine, then, this CL *removes*
      a net 156 kB of read-only data from the binary.
      
      This CL does not include the needed support for precise garbage
      collection. I have created issue 4375 to track that.
      
      This CL also does not set the 'algorithm' - specifically the equality
      and copy functions - for a new array correctly, so I have unexported
      ArrayOf for now. That is also part of issue 4375.
      
      Fixes #2339.
      
      R=r, remyoudompheng, mirtchovski, iant
      CC=golang-dev
      https://golang.org/cl/6572043
      11209825