1. 25 Aug, 2017 6 commits
    • Tom Levy's avatar
      sort: fix TestAdversary · 3723d080
      Tom Levy authored
      There are some major problems with TestAdversary (based on "A Killer
      Adversary for Quicksort"[1] by M. D. McIlroy). See #21581 for details.
      
      Rewrite the test to closely match the version in the paper so it can
      be verified as correct by virtue of similarity.
      
      The only major difference between this new version and the version in
      the paper is that this version swaps the values directly instead of
      permuting an array of indices because we don't need to recover the
      original permutation.
      
      This new version also counts the number of calls to Less() and fails
      the test if there are too many.
      
      Fixes #21581.
      
      [1]: http://www.cs.dartmouth.edu/~doug/mdmspe.pdf
      
      Change-Id: Ia94b5b6d288b8fa3805a5fa27661cebbc5bad9a7
      Reviewed-on: https://go-review.googlesource.com/58330
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      3723d080
    • Tom Levy's avatar
      sync/atomic: remove references to old atomic pointer hammer tests · b0ba0b49
      Tom Levy authored
      The tests were removed in https://golang.org/cl/2311 but some
      references to them were missed.
      
      Change-Id: I163e554a0cc99401a012deead8fda813ad74dbfe
      Reviewed-on: https://go-review.googlesource.com/58870Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b0ba0b49
    • David du Colombier's avatar
      cmd/compile: don't use MOVOstore instruction on plan9/amd64 · 14cb4158
      David du Colombier authored
      CL 54410 and CL 56250 recently added use of the MOVOstore
      instruction to improve performance.
      
      However, we can't use the MOVOstore instruction on Plan 9,
      because floating point operations are not allowed in the
      note handler.
      
      This change adds a configuration flag useSSE to enable the
      use of SSE instructions for non-floating point operations.
      This flag is enabled by default and disabled on Plan 9.
      When this flag is disabled, the MOVOstore instruction is
      not used and the MOVQstoreconst instruction is used instead.
      
      Fixes #21599
      
      Change-Id: Ie609e5d9b82ec0092ae874bab4ce01caa5bc8fb8
      Reviewed-on: https://go-review.googlesource.com/58850Reviewed-by: default avatarKeith Randall <khr@golang.org>
      14cb4158
    • Wei Congrui's avatar
      build: add `go env GOROOT` as default GOROOT_BOOTSTRAP value · a164a2f5
      Wei Congrui authored
      This change also added the same check in make.bash to make.rc,
      which makes sure $GOROOT_BOOTSTRAP != $GOROOT.
      
      Fixes #14339
      
      Change-Id: I2758f4a845bae42ace02492fc6a911f6d6247d26
      Reviewed-on: https://go-review.googlesource.com/57753
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      a164a2f5
    • Joe Tsai's avatar
      archive/tar: return better WriteHeader errors · 3d62000a
      Joe Tsai authored
      WriteHeader may fail to encode a header for any number of reasons,
      which can be frustrating for the user when trying to create a tar archive.
      As we validate the Header, we generate an informative error message
      intended for human consumption and return that if and only if no
      format can be selected.
      
      This allows WriteHeader to return informative errors like:
          tar: cannot encode header: invalid PAX record: "linkpath = \x00hello"
          tar: cannot encode header: invalid PAX record: "SCHILY.xattr.foo=bar = baz"
          tar: cannot encode header: Format specifies GNU; and only PAX supports Xattrs
          tar: cannot encode header: Format specifies GNU; and GNU cannot encode ModTime=1969-12-31 15:59:59.0000005 -0800 PST
          tar: cannot encode header: Format specifies GNU; and GNU supports sparse files only with TypeGNUSparse
          tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode ModTime=292277026596-12-04 07:30:07 -0800 PST
          tar: cannot encode header: Format specifies USTAR; and USTAR does not support sparse files
          tar: cannot encode header: Format specifies PAX; and only GNU supports TypeGNUSparse
      
      Updates #18710
      
      Change-Id: I82a498d6f29d02c4e73bce47b768eb578da8499c
      Reviewed-on: https://go-review.googlesource.com/58310
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      3d62000a
    • Keith Randall's avatar
      cmd/compile: remove more nil ptr checks after newobject · f1517ec6
      Keith Randall authored
      For code like the following (where x escapes):
      
         x := []int{1}
      
      We're currently generating a nil check.  The line above is really 3 operations:
      
      	t := new([1]int)
      	t[0] = 1
      	x := t[:]
      
      We remove the nil check for t[0] = 1, but not for t[:].
      
      Our current nil check removal rule is too strict about the possible
      memory arguments of the nil check. Unlike zeroing or storing to the
      result of runtime.newobject, the nilness of runtime.newobject is
      always false, even after other stores have happened in the meantime.
      
      Change-Id: I95fad4e3a59c27effdb37c43ea215e18f30b1e5f
      Reviewed-on: https://go-review.googlesource.com/58711
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      f1517ec6
  2. 24 Aug, 2017 16 commits
  3. 23 Aug, 2017 12 commits
  4. 22 Aug, 2017 6 commits