1. 01 Dec, 2015 7 commits
  2. 30 Nov, 2015 7 commits
  3. 29 Nov, 2015 3 commits
  4. 28 Nov, 2015 5 commits
  5. 27 Nov, 2015 2 commits
  6. 26 Nov, 2015 8 commits
  7. 25 Nov, 2015 8 commits
    • Michael Hudson-Doyle's avatar
      syscall: skip tests that create a user namespace when chrooted · 21efa7b2
      Michael Hudson-Doyle authored
      The kernel rejects attempts to create user namespaces when in a chroot.
      
      Change-Id: I6548302732c8f5be52f4167cd7233aea16839ad8
      Reviewed-on: https://go-review.googlesource.com/17214Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      21efa7b2
    • Matthew Dempsky's avatar
      doc: update go1.6.txt for cmd/cgo's C.complexfloat and C.complexdouble fix · 240144a3
      Matthew Dempsky authored
      Updates #13402.
      
      Change-Id: Ia7b729d81fb78206d214444911f2e6573b88717a
      Reviewed-on: https://go-review.googlesource.com/17240Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      240144a3
    • Matthew Dempsky's avatar
      cmd/cgo: fix C.complexfloat and C.complexdouble · 10cb39af
      Matthew Dempsky authored
      This also fixes an unintended behavior where C's "complex float" and
      "complex double" types were interchangeable with Go's "complex64" and
      "complex128" types.
      
      Fixes #13402.
      
      Change-Id: I73f96d9a4772088d495073783c6982e9634430e8
      Reviewed-on: https://go-review.googlesource.com/17208Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      10cb39af
    • Matthew Dempsky's avatar
      cmd/cgo: handle another Clang DWARF quirk · de640d36
      Matthew Dempsky authored
      Without the fix:
      
          $ CC=clang-3.5 ./test.bash
          misc/cgo/errors/test.bash: BUG: expected error output to contain "C.ushort" but saw:
          # command-line-arguments
          ./issue13129.go:13: cannot use int(0) (type int) as type C.unsignedshort in assignment
      
      Fixes #13129.
      
      Change-Id: I2c019d2d000f5bfa3e33c477e533aff97031a84f
      Reviewed-on: https://go-review.googlesource.com/17207
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      de640d36
    • Robert Griesemer's avatar
      cmd/compile: clearer error for invalid array/slice literal elements · c7a34031
      Robert Griesemer authored
      Fixes #13365.
      
      Change-Id: I5a447ff806dbbb11c8c75e2b5cfa7fd4a845fb92
      Reviewed-on: https://go-review.googlesource.com/17206
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c7a34031
    • Caleb Spare's avatar
      regexp: fix one-pass compilation · e36bf614
      Caleb Spare authored
      The one-pass transformation is structured as a search over the input
      machine for conditions that violate the one-pass requisites. At each
      iteration, we should fully explore all non-input paths that proceed from
      the current instruction; this is implemented via recursive check calls.
      But when we reach instructions that demand input (InstRune*), these
      should be put onto the search queue.
      
      Instead of searching this way, the routine previously (effectively)
      proceeded through the machine one instruction at a time until finding an
      Inst{Match,Fail,Rune*}, calling check on each instruction. This caused
      bug #11905, where the transformation stopped before rewriting all
      InstAlts as InstAltMatches.
      
      Further, the check function unnecessarily recurred on InstRune*
      instructions. (I believe this helps to mask the above bug.)
      
      This change also deletes some unused functions and duplicate test cases.
      
      Fixes #11905.
      
      Change-Id: I5b0b26efea3d3bd01c7479a518b5ed1b886701cd
      Reviewed-on: https://go-review.googlesource.com/17195Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      e36bf614
    • Caleb Spare's avatar
      regexp: fix LiteralPrefix for certain onepass progs · d1eedfe1
      Caleb Spare authored
      The prefix computation for onepass was incorrectly returning
      complete=true when it encountered a beginning-of-text empty width match
      (^) in the middle of an expression.
      
      Fix by returning complete only when the prefix is followed by $ and then
      an accepting state.
      
      Fixes #11175.
      
      Change-Id: Ie9c4cf5f76c1d2c904a6fb2f016cedb265c19fde
      Reviewed-on: https://go-review.googlesource.com/16200
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      d1eedfe1
    • Caleb Spare's avatar
      regexp: add Copy method to Regexp · 937172b2
      Caleb Spare authored
      This helps users who wish to use separate Regexps in each goroutine to
      avoid lock contention. Previously they had to parse the expression
      multiple times to achieve this.
      
      I used variants of the included benchmark to evaluate this change. I
      used the arguments -benchtime 20s -cpu 1,2,4,8,16 on a machine with 16
      hardware cores.
      
      Comparing a single shared Regexp vs. copied Regexps, we can see that
      lock contention causes huge slowdowns at higher levels of parallelism.
      The copied version shows the expected linear speedup.
      
      name              old time/op  new time/op  delta
      MatchParallel      366ns ± 0%   370ns ± 0%   +1.09%   (p=0.000 n=10+8)
      MatchParallel-2    324ns ±28%   184ns ± 1%  -43.37%  (p=0.000 n=10+10)
      MatchParallel-4    352ns ± 5%    93ns ± 1%  -73.70%   (p=0.000 n=9+10)
      MatchParallel-8    480ns ± 3%    46ns ± 0%  -90.33%    (p=0.000 n=9+8)
      MatchParallel-16   510ns ± 8%    24ns ± 6%  -95.36%   (p=0.000 n=10+8)
      
      I also compared a modified version of Regexp that has no mutex and a
      single machine (the "RegexpForSingleGoroutine" rsc mentioned in
      https://github.com/golang/go/issues/8232#issuecomment-66096128).
      
      In this next test, I compared using N copied Regexps vs. N separate
      RegexpForSingleGoroutines. This shows that, even for this relatively
      simple regex, avoiding the lock entirely would only buy about 10-12%
      further improvement.
      
      name              old time/op  new time/op  delta
      MatchParallel      370ns ± 0%   322ns ± 0%  -12.97%    (p=0.000 n=8+8)
      MatchParallel-2    184ns ± 1%   162ns ± 1%  -11.60%  (p=0.000 n=10+10)
      MatchParallel-4   92.7ns ± 1%  81.1ns ± 2%  -12.43%  (p=0.000 n=10+10)
      MatchParallel-8   46.4ns ± 0%  41.8ns ±10%   -9.78%   (p=0.000 n=8+10)
      MatchParallel-16  23.7ns ± 6%  20.6ns ± 1%  -13.14%    (p=0.000 n=8+8)
      
      Updates #8232.
      
      Change-Id: I15201a080c363d1b44104eafed46d8df5e311902
      Reviewed-on: https://go-review.googlesource.com/16110Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      937172b2