1. 20 Oct, 2016 3 commits
    • Daniel Theophanes's avatar
      database/sql: add missing unlock when context is expired · 692df217
      Daniel Theophanes authored
      Missing the DB mutex unlock on an early return after checking
      if the context has expired.
      
      Fixes #17518
      
      Change-Id: I247cafcef62623d813f534a941f3d5a3744f0738
      Reviewed-on: https://go-review.googlesource.com/31494Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      692df217
    • Alberto Donizetti's avatar
      lib/time: update to IANA release 2016g (September 2016) · 9cefbe9d
      Alberto Donizetti authored
      Change-Id: Ie6258602554c5bb6685c9de42ccda84d297af1e2
      Reviewed-on: https://go-review.googlesource.com/31515
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      9cefbe9d
    • Joe Tsai's avatar
      archive/tar: fix parsePAXTime · ef8e85e8
      Joe Tsai authored
      Issues fixed:
      * Could not handle quantity of seconds greater than 1<<31 on
      32bit machines since strconv.ParseInt did not treat integers as 64b.
      * Did not handle negative timestamps properly if nanoseconds were used.
      Note that "-123.456" should result in a call to time.Unix(-123, -456000000).
      * Incorrectly allowed a '-' right after the '.' (e.g., -123.-456)
      * Did not detect invalid input after the truncation point (e.g., 123.123456789badbadbad).
      
      Note that negative timestamps are allowed by PAX, but are not guaranteed
      to be portable. See the relevant specification:
      <<<
      If pax encounters a file with a negative timestamp in copy or write mode,
      it can reject the file, substitute a non-negative timestamp, or generate
      a non-portable timestamp with a leading '-'.
      >>>
      
      Since the previous behavior already partially supported negative timestamps,
      we are bound by Go's compatibility rules to keep support for them.
      However, we should at least make sure we handle them properly.
      
      Change-Id: I5686997708bfb59110ea7981175427290be737d1
      Reviewed-on: https://go-review.googlesource.com/31441
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      ef8e85e8
  2. 19 Oct, 2016 35 commits
  3. 18 Oct, 2016 2 commits
    • Robert Griesemer's avatar
      spec: require 16 bit minimum exponent in constants rather than 32 · 8fbfdad2
      Robert Griesemer authored
      A 16bit binary exponent permits a constant range covering roughly the range
      from 7e-9865 to 7e9863 which is more than enough for any practical and
      hypothetical constant arithmetic.
      
      Furthermore, until recently cmd/compile could not handle very large exponents
      correctly anyway; i.e., the chance that any real programs (but for tests that
      explore corner cases) are affected are close to zero.
      
      Finally, restricting the minimum supported range significantly reduces the
      implementation complexity in an area that hardly matters in reality for new
      or alternative spec-compliant implementations that don't or cannot rely on
      pre-existing arbitratry precision arithmetic packages that support a 32bit
      exponent range.
      
      This is technically a language change but for the reasons mentioned above
      this is unlikely to affect any real programs, and certainly not programs
      compiled with the gc or gccgo compilers as they currently support up to
      32bit exponents.
      
      Fixes #13572.
      
      Change-Id: I970f919c57fc82c0175844364cf48ea335f17d39
      Reviewed-on: https://go-review.googlesource.com/17711Reviewed-by: 's avatarRob Pike <r@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      8fbfdad2
    • Matthew Dempsky's avatar
      cmd/compile: handle unsafe builtins like universal builtins · 3f2cb493
      Matthew Dempsky authored
      Reuse the same mechanisms for handling universal builtins like len to
      handle unsafe.Sizeof, etc. Allows us to drop package unsafe's export
      data, and simplifies some code.
      
      Updates #17508.
      
      Change-Id: I620e0617c24e57e8a2d7cccd0e2de34608779656
      Reviewed-on: https://go-review.googlesource.com/31433
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      3f2cb493