1. 18 Nov, 2015 16 commits
  2. 17 Nov, 2015 17 commits
  3. 16 Nov, 2015 7 commits
    • Robert Griesemer's avatar
      test: fix test case · fbe855ba
      Robert Griesemer authored
      Issue introduced by https://go-review.googlesource.com/#/c/16920/ .
      
      TBR=rsc
      
      Change-Id: I2a0e0c81f641f869568230837c566913f6538f37
      Reviewed-on: https://go-review.googlesource.com/16990
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      fbe855ba
    • Austin Clements's avatar
      runtime: make mcache.tiny a uintptr · 4d39bb6a
      Austin Clements authored
      mcache.tiny is in non-GC'd memory, but points to heap memory. As a
      result, there may or may not be write barriers when writing to
      mcache.tiny. Make it clearer that funny things are going on by making
      mcache.tiny a uintptr instead of an unsafe.Pointer.
      
      Change-Id: I732a5b7ea17162f196a9155154bbaff8d4d00eac
      Reviewed-on: https://go-review.googlesource.com/16963
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4d39bb6a
    • Austin Clements's avatar
      runtime: clear tiny alloc cache in mark term, not sweep term · 835c83b4
      Austin Clements authored
      The tiny alloc cache is maintained in a pointer from non-GC'd memory
      (mcache) to heap memory and hence must be handled carefully.
      
      Currently we clear the tiny alloc cache during sweep termination and,
      if it is assigned to a non-nil value during concurrent marking, we
      depend on a write barrier to keep the new value alive. However, while
      the compiler currently always generates this write barrier, we're
      treading on thin ice because write barriers may not happen for writes
      to non-heap memory (e.g., typedmemmove). Without this lucky write
      barrier, the GC may free a current tiny block while it's still
      reachable by the tiny allocator, leading to later memory corruption.
      
      Change this code so that, rather than depending on the write barrier,
      we simply clear the tiny cache during mark termination when we're
      clearing all of the other mcaches. If the current tiny block is
      reachable from regular pointers, it will be retained; if it isn't
      reachable from regular pointers, it may be freed, but that's okay
      because there won't be any pointers in non-GC'd memory to it.
      
      Change-Id: I8230980d8612c35c2997b9705641a1f9f865f879
      Reviewed-on: https://go-review.googlesource.com/16962
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      835c83b4
    • Caleb Spare's avatar
      crypto/tls: return a typed error on invalid record headers · 45d1c8ab
      Caleb Spare authored
      The user can inspect the record data to detect that the other side is
      not using the TLS protocol.
      
      This will be used by the net/http client (in a follow-on CL) to detect
      when an HTTPS client is speaking to an HTTP server.
      
      Updates #11111.
      
      Change-Id: I872f78717aa8e8e98cebd8075436209a52039a73
      Reviewed-on: https://go-review.googlesource.com/16078Reviewed-by: default avatarAdam Langley <agl@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      45d1c8ab
    • Marcel van Lohuizen's avatar
      unicode/utf8: table-based algorithm for decoding · bf5b4e71
      Marcel van Lohuizen authored
      This simplifies covering all cases, reducing the number of branches
      and making unrolling for simpler functions manageable.
      This significantly improves performance of non-ASCII input.
      
      This change will also allow addressing Issue #11733 in an efficient
      manner.
      
      RuneCountTenASCIIChars-8             13.7ns ± 4%  13.5ns ± 2%     ~     (p=0.116 n=7+8)
      RuneCountTenJapaneseChars-8           153ns ± 3%    74ns ± 2%  -51.42%  (p=0.000 n=8+8)
      RuneCountInStringTenASCIIChars-8     13.5ns ± 2%  12.5ns ± 3%   -7.13%  (p=0.000 n=8+7)
      RuneCountInStringTenJapaneseChars-8   145ns ± 2%    68ns ± 2%  -53.21%  (p=0.000 n=8+8)
      ValidTenASCIIChars-8                 14.1ns ± 3%  12.5ns ± 5%  -11.38%  (p=0.000 n=8+8)
      ValidTenJapaneseChars-8               147ns ± 3%    71ns ± 4%  -51.72%  (p=0.000 n=8+8)
      ValidStringTenASCIIChars-8           12.5ns ± 3%  12.3ns ± 3%     ~     (p=0.095 n=8+8)
      ValidStringTenJapaneseChars-8         146ns ± 4%    70ns ± 2%  -51.62%  (p=0.000 n=8+7)
      DecodeASCIIRune-8                    5.91ns ± 2%  4.83ns ± 3%  -18.28%  (p=0.001 n=7+7)
      DecodeJapaneseRune-8                 12.2ns ± 7%   8.5ns ± 3%  -29.79%  (p=0.000 n=8+7)
      FullASCIIRune-8                      5.95ns ± 3%  4.27ns ± 1%  -28.23%  (p=0.000 n=8+7)
      FullJapaneseRune-8                   12.0ns ± 6%   4.3ns ± 3%  -64.39%  (p=0.000 n=8+8)
      
      Change-Id: Iea1d6b0180cbbee1739659a0a38038126beecaca
      Reviewed-on: https://go-review.googlesource.com/16940Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      bf5b4e71
    • Russ Cox's avatar
      cmd/compile: fix value range check for complex constants · 2c11164d
      Russ Cox authored
      Fixes #11590.
      
      Change-Id: I4144107334604a2cc98c7984df3b5d4cde3d30af
      Reviewed-on: https://go-review.googlesource.com/16920Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      2c11164d
    • Russ Cox's avatar
      cmd/compile: do not emit args_stackmap for func _ · 292ad592
      Russ Cox authored
      Fixes #11699.
      
      Change-Id: I01bf506d76260bcdf828bbde52791e328aa441a5
      Reviewed-on: https://go-review.googlesource.com/16921Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      292ad592