1. 20 Dec, 2016 9 commits
    • Kirill Smelkov's avatar
      io: fix PipeWriter.Close to wake up Writes · 029f6e07
      Kirill Smelkov authored
      Since commit cc62bed0 (CL 994043) the pipe deadlock when doing
      Read+Close or Write+Close on same end was fixed, alas with test for
      Read+Close case only.
      
      Then commit 6d6f3381 (CL 4252057) made a thinko: in the writer path
      p.werr is checked for != nil and then err is set but there is no break
      from waiting loop unlike break is there in similar condition for reader.
      Together with having only Read+Close case tested that made it to leave
      reintroduced Write+Close deadlock unnoticed.
      
      Fix it.
      
      Implicitly this also fixes net.Pipe to conform to semantic of net.Conn
      interface where Close is documented to unblock any blocked Read or Write
      operations.
      
      No test added to net/ since net.Pipe tests are "Assuming that the
      underlying io.Pipe implementation is solid and we're just testing the
      net wrapping". The test added in this patch should be enough to cover
      the breakage.
      
      Fixes #TODO
      Updates #18170
      
      Change-Id: I9e9460b3fd7d220bbe60b726accf86f352aed8d4
      029f6e07
    • Ian Lance Taylor's avatar
      misc/cgo/testcshared: wait up to 1 second in main2.c · 860c9c0b
      Ian Lance Taylor authored
      Wait longer in case the system is heavily loaded.
      
      Fixes #18324.
      
      Change-Id: If9a6da1cf32d0321302d244ee24fb3f80e54489d
      Reviewed-on: https://go-review.googlesource.com/34653Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      860c9c0b
    • Shenghou Ma's avatar
      doc/go1.8: document that CGO_ENABLED is sticky · 5a72bad8
      Shenghou Ma authored
      Fixes #18363.
      
      Change-Id: Ifc98506d33a6753cd7db8e505cf86d5626fbbad0
      Reviewed-on: https://go-review.googlesource.com/34596Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      5a72bad8
    • Kevin Burke's avatar
      crypto/x509: fix spelling/grammar in comments · c5f16d4e
      Kevin Burke authored
      Also tweak one of the comment lines to fit in 80 characters.
      
      Change-Id: I9c6d2028c29318ba9264486590056cb1ffc8219e
      Reviewed-on: https://go-review.googlesource.com/34655Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c5f16d4e
    • Brad Fitzpatrick's avatar
      crypto/x509: speed up and deflake non-cgo Darwin root cert discovery · 3357daa9
      Brad Fitzpatrick authored
      Piping into security verify-cert only worked on macOS Sierra, and was
      flaky for unknown reasons. Users reported that the number of trusted
      root certs stopped randomly jumping around once they switched to using
      verify-cert against files on disk instead of /dev/stdin.
      
      But even using "security verify-cert" on 150-200 certs took too
      long. It took 3.5 seconds on my machine. More than 4 goroutines
      hitting verify-cert didn't help much, and soon started to hurt
      instead.
      
      New strategy, from comments in the code:
      
      // 1. Run "security trust-settings-export" and "security
      //    trust-settings-export -d" to discover the set of certs with some
      //    user-tweaked trusy policy. We're too lazy to parse the XML (at
      //    least at this stage of Go 1.8) to understand what the trust
      //    policy actually is. We just learn that there is _some_ policy.
      //
      // 2. Run "security find-certificate" to dump the list of system root
      //    CAs in PEM format.
      //
      // 3. For each dumped cert, conditionally verify it with "security
      //    verify-cert" if that cert was in the set discovered in Step 1.
      //    Without the Step 1 optimization, running "security verify-cert"
      //    150-200 times takes 3.5 seconds. With the optimization, the
      //    whole process takes about 180 milliseconds with 1 untrusted root
      //    CA. (Compared to 110ms in the cgo path)
      
      Fixes #18203
      
      Change-Id: I4e9c11fa50d0273c615382e0d8f9fd03498d4cb4
      Reviewed-on: https://go-review.googlesource.com/34389
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarQuentin Smith <quentin@golang.org>
      3357daa9
    • Kevin Burke's avatar
      cmd/cover: fix spelling mistake · 4d02833c
      Kevin Burke authored
      Change-Id: Iac7c4f22dc55c970940af33e0f0470694da5c4a6
      Reviewed-on: https://go-review.googlesource.com/34654Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      4d02833c
    • Joe Tsai's avatar
      doc: remove archive/zip changes from go1.8.html · a1c835f5
      Joe Tsai authored
      Change-Id: I5670e9924b21fb2466b2b32aa01a922e9a0a0f8a
      Reviewed-on: https://go-review.googlesource.com/34652Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      a1c835f5
    • Joe Tsai's avatar
      Revert: "archive/zip: handle mtime in NTFS/UNIX/ExtendedTS extra fields" · 5df59a4f
      Joe Tsai authored
      This change reverts the following CLs:
      	CL/18274: handle mtime in NTFS/UNIX/ExtendedTS extra fields
      	CL/30811: only use Extended Timestamp on non-zero MS-DOS timestamps
      
      We are reverting support for extended timestamps since the support was not
      not complete. CL/18274 added full support for reading extended timestamp fields
      and minimal support for writing them. CL/18274 is incomplete because it made
      no changes to the FileHeader struct, so timezone information was lost when
      reading and/or writing.
      
      While CL/18274 was a step in the right direction, we should provide full
      support for high precision timestamps in both the reader and writer.
      This will probably require that we add a new field of type time.Time.
      The complete fix is too involved to add in the time remaining for Go 1.8
      and will be completed in Go 1.9.
      
      Updates #10242
      Updates #17403
      Updates #18359
      Fixes #18378
      
      Change-Id: Icf6d028047f69379f7979a29bfcb319a02f4783e
      Reviewed-on: https://go-review.googlesource.com/34651
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      5df59a4f
    • Dhananjay Nakrani's avatar
      cmd/cover: retain un-attached compiler directives · 7eee5127
      Dhananjay Nakrani authored
      Parser doesn't attach some compiler directives to anything in the tree.
      We have to explicitely retain them in the generated code. This change,
      makes cover explicitely print out any compiler directive that wasn't
      handled in the ast.Visitor.
      
      Fixes #18285.
      
      Change-Id: Ib60f253815e92d7fc85051a7f663a61116e40a91
      Reviewed-on: https://go-review.googlesource.com/34563
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      7eee5127
  2. 19 Dec, 2016 7 commits
  3. 16 Dec, 2016 6 commits
  4. 15 Dec, 2016 18 commits