1. 19 Oct, 2017 5 commits
    • Jed Denlea's avatar
      image/gif: make blockReader a ByteReader, harden tests · 58d7231b
      Jed Denlea authored
      golang.org/cl/37258 was committed to fix issue #16146.
      
      This patch seemed intent to allow at most one dangling byte.  But, as
      implemented, many more bytes may actually slip through.  This is because
      the LZW layer creates a bufio.Reader which will itself consume data
      beyond the end of the LZW stream, and this isn't accounted for anywhere.
      
      This change means to avoid the allocation of the bufio.Reader by making
      blockReader implement io.ByteReader.  Further, it adds a close() method
      which detects extra data in the block sequence.  To avoid any
      regressions with poorly encoded GIFs which may have worked accidentally,
      there are no restrictions on how many extra bytes may exist in the final
      full sub-block that contained LZW data.  If the end of the LZW stream
      happened to align with the end of a sub-block, at most one more
      sub-block with a length of 1 byte may exist before the block terminator.
      
      This change aims to be at least as performant as the prior
      implementation.  But the primary gain is avoiding the allocation of a
      bufio.Reader per frame:
      
      name      old time/op    new time/op    delta
      Decode-8     276µs ± 0%     275µs ± 2%    ~     (p=0.690 n=5+5)
      
      name      old speed      new speed      delta
      Decode-8  55.9MB/s ± 0%  56.3MB/s ± 2%    ~     (p=0.690 n=5+5)
      
      name      old alloc/op   new alloc/op   delta
      Decode-8    49.2kB ± 0%    44.8kB ± 0%  -9.10%  (p=0.008 n=5+5)
      
      name      old allocs/op  new allocs/op  delta
      Decode-8       269 ± 0%       267 ± 0%  -0.74%  (p=0.008 n=5+5)
      
      Change-Id: Iec4f9b895561ad52266313fbc73ec82c070c3349
      Reviewed-on: https://go-review.googlesource.com/68350
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
      58d7231b
    • Austin Clements's avatar
      cmd/compile: allow duplicate DWARF producer symbols · 717d3759
      Austin Clements authored
      When building test binaries, we build one archive with all of the test
      sources and a second archive with the generated test package main and
      link them together. If the test sources are themselves in package main
      and the test was compiled with non-default compiler flags, then both
      archives will contain a go.cuinfo.producer.main symbol, leading to a
      duplicate symbol failure.
      
      This has been causing test build failures on darwin-arm-a1428ios,
      darwin-arm64-a1549ios, linux-amd64-noopt, android-arm-wiko-fever, and
      android-arm64-wiko-fever since CL 71430 added this symbol. This CL
      should fix the build.
      
      Change-Id: I69051c846e7c0d97395a865a361cae07f411f9ad
      Reviewed-on: https://go-review.googlesource.com/71771
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: 's avatarThan McIntosh <thanm@google.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      717d3759
    • Alex Brainman's avatar
      cmd/link: add TODO missing from CL 70310 · 8ce8143f
      Alex Brainman authored
      CL 70310 dropped TODO while moving code.
      Add TODO back, so we do not forget.
      
      Change-Id: I3599ac02743bd35fb9556fdc238e9c72cf7f718f
      Reviewed-on: https://go-review.googlesource.com/71590Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      8ce8143f
    • griesemer's avatar
      spec: simplify paragraph on certain range expressions over arrays · ada65575
      griesemer authored
      Fixes #22258.
      
      Change-Id: I43e68f1cf3163e1a041ebff2734ff2cb7943f695
      Reviewed-on: https://go-review.googlesource.com/71431Reviewed-by: 's avatarRob Pike <r@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      ada65575
    • Ian Lance Taylor's avatar
      internal/poll: always decref if setting deadline fails · 3813f941
      Ian Lance Taylor authored
      No test because at present it is never called in a way that fails.
      When #22114 is implemented, failure will be possible. Not including this
      change in that work because this change is separable and clearly correct.
      
      Updates #22114
      
      Change-Id: I81eb9eec8800e8082d918c0e5fb71282f538267e
      Reviewed-on: https://go-review.googlesource.com/71751
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarJoe Tsai <joetsai@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3813f941
  2. 18 Oct, 2017 10 commits
  3. 17 Oct, 2017 16 commits
  4. 16 Oct, 2017 9 commits