1. 30 Mar, 2018 12 commits
  2. 29 Mar, 2018 18 commits
  3. 28 Mar, 2018 10 commits
    • Ian Lance Taylor's avatar
      cmd/go: reject relative tmpdir · f961272e
      Ian Lance Taylor authored
      Fixes #23264
      
      Change-Id: Ib6c343dc8e32949c6de72cb628cace2e8fabc302
      Reviewed-on: https://go-review.googlesource.com/103236
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      f961272e
    • Ian Lance Taylor's avatar
      bufio: document ReadFrom/WriteTo calls to underlying methods · c53ff281
      Ian Lance Taylor authored
      In general use of these magic methods must be documented so that
      users understand what will happen.
      
      Fixes #23289
      
      Change-Id: Ic46915eee1d3b7e57d8d1886834ddfb2e8e66e62
      Reviewed-on: https://go-review.googlesource.com/103238Reviewed-by: default avatarRob Pike <r@golang.org>
      c53ff281
    • Andrew Bonventre's avatar
      doc: document Go 1.9.5 · 2f14fc9c
      Andrew Bonventre authored
      Change-Id: I8f12b188d2e13555e1d7634b9cc0319fc737cb1d
      Reviewed-on: https://go-review.googlesource.com/103216Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      2f14fc9c
    • Andrew Bonventre's avatar
      doc: document Go 1.10.1 · bdbd8ed3
      Andrew Bonventre authored
      Change-Id: Ibba5d4fd8124db9b1e4e50b8f37366f8dd23f47e
      Reviewed-on: https://go-review.googlesource.com/103217Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      bdbd8ed3
    • Andrew Bonventre's avatar
      net/http/pprof: harden handler responses · baa46bcf
      Andrew Bonventre authored
      A very small number of old browsers consider content as HTML
      even when it is explicitly stated in the Content-Type header
      that it is not. If content served is based on user-supplied
      input, then an XSS is possible. Introduce three mitigations:
      
      + Don't reflect user input in error strings
      + Set a Content-Disposition header when requesting a resource
        that should never be displayed in a browser window
      + Set X-Content-Type-Options: nosniff on all responses
      
      Change-Id: I81c9d6736e0439ebd1db99cd7fb701cc56d24805
      Reviewed-on: https://go-review.googlesource.com/102318
      Run-TryBot: Andrew Bonventre <andybons@golang.org>
      Reviewed-by: default avatarFilippo Valsorda <filippo@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      baa46bcf
    • Ian Lance Taylor's avatar
      flag: document use of FlagSet name parameter · 70afd51e
      Ian Lance Taylor authored
      Fixes #24225
      
      Change-Id: I876ac1b9d3615283f7b88cfa0b965ef81a57f056
      Reviewed-on: https://go-review.googlesource.com/102955Reviewed-by: default avatarRob Pike <r@golang.org>
      70afd51e
    • Hana Kim's avatar
      internal/trace: fix double counting in span analysis · ad638fbf
      Hana Kim authored
      When snapshotting the execution time stats of a goroutine
      we take into account the intermediate values kepts in the GDesc's
      gdesc field. At the end of goroutine analysis, we go through all
      goroutines and replace the GExecutionStat with the new snapshot.
      Here the mistake was that we replaced the GExecutionStat with
      the value that reflects the intermediate values, but did clear
      the intermediate values. So, when the following finalizeActiveSpans
      runs, it trieds to add the intermediate values again (double-counting)
      when taking a snapshot.
      
      Fix the issue by using the finalized GExecutionStat instead of
      recomputing the snapshot. While we are here, refactor the finalization
      logic so it can be used when processing GoEnd, GoStop events.
      
      Change-Id: Ibdb342214c29b65d4ea37e52b1f8b83f1fb20143
      Reviewed-on: https://go-review.googlesource.com/103157Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
      ad638fbf
    • Josh Bleecher Snyder's avatar
      cmd/compile: prefer rematerialization to copying · dafca7de
      Josh Bleecher Snyder authored
      Fixes #24132
      
      
      name                     old time/op    new time/op    delta
      BinaryTree17-8              2.18s ± 2%     2.15s ± 2%  -1.28%  (p=0.000 n=25+26)
      Fannkuch11-8                2.16s ± 3%     2.13s ± 3%  -1.54%  (p=0.000 n=27+30)
      FmtFprintfEmpty-8          29.9ns ± 3%    29.6ns ± 3%  -1.08%  (p=0.001 n=29+26)
      FmtFprintfString-8         53.6ns ± 2%    54.0ns ± 4%    ~     (p=0.193 n=28+29)
      FmtFprintfInt-8            56.8ns ± 3%    57.0ns ± 3%    ~     (p=0.330 n=29+29)
      FmtFprintfIntInt-8         85.3ns ± 2%    85.8ns ± 3%  +0.56%  (p=0.042 n=30+29)
      FmtFprintfPrefixedInt-8    94.1ns ± 5%    99.0ns ± 8%  +5.20%  (p=0.000 n=27+30)
      FmtFprintfFloat-8           183ns ± 4%     182ns ± 3%    ~     (p=0.619 n=30+26)
      FmtManyArgs-8               369ns ± 2%     369ns ± 2%    ~     (p=0.748 n=27+29)
      GobDecode-8                4.78ms ± 2%    4.75ms ± 1%    ~     (p=0.051 n=28+27)
      GobEncode-8                4.06ms ± 3%    4.07ms ± 3%    ~     (p=0.781 n=29+30)
      Gzip-8                      178ms ± 2%     177ms ± 2%    ~     (p=0.171 n=29+30)
      Gunzip-8                   28.2ms ± 7%    28.0ms ± 4%    ~     (p=0.155 n=30+30)
      HTTPClientServer-8         71.5µs ± 3%    71.3µs ± 1%    ~     (p=0.913 n=25+27)
      JSONEncode-8               9.71ms ± 5%    9.86ms ± 4%  +1.55%  (p=0.015 n=28+30)
      JSONDecode-8               38.8ms ± 2%    39.3ms ± 2%  +1.41%  (p=0.000 n=28+29)
      Mandelbrot200-8            3.47ms ± 6%    3.44ms ± 3%    ~     (p=0.183 n=28+28)
      GoParse-8                  2.55ms ± 2%    2.54ms ± 3%  -0.58%  (p=0.003 n=27+29)
      RegexpMatchEasy0_32-8      66.0ns ± 5%    65.3ns ± 4%    ~     (p=0.124 n=30+30)
      RegexpMatchEasy0_1K-8       152ns ± 2%     152ns ± 3%    ~     (p=0.881 n=30+30)
      RegexpMatchEasy1_32-8      62.9ns ± 9%    62.7ns ± 7%    ~     (p=0.717 n=30+30)
      RegexpMatchEasy1_1K-8       263ns ± 3%     263ns ± 4%    ~     (p=0.909 n=30+29)
      RegexpMatchMedium_32-8     93.4ns ± 3%    89.3ns ± 2%  -4.32%  (p=0.000 n=29+29)
      RegexpMatchMedium_1K-8     27.5µs ± 3%    27.1µs ± 2%  -1.46%  (p=0.000 n=30+27)
      RegexpMatchHard_32-8       1.33µs ± 3%    1.31µs ± 3%  -1.50%  (p=0.000 n=27+28)
      RegexpMatchHard_1K-8       39.4µs ± 2%    39.1µs ± 2%  -0.54%  (p=0.027 n=28+28)
      Revcomp-8                   274ms ± 4%     276ms ± 2%  +0.67%  (p=0.048 n=29+28)
      Template-8                 45.1ms ± 5%    44.6ms ± 7%  -1.22%  (p=0.029 n=30+29)
      TimeParse-8                 227ns ± 3%     224ns ± 3%  -1.25%  (p=0.000 n=28+27)
      TimeFormat-8                248ns ± 3%     245ns ± 3%  -1.33%  (p=0.002 n=30+29)
      [Geo mean]                 36.6µs         36.5µs       -0.32%
      
      
      Change-Id: I24083f0013506b77e2d9da99c40ae2f67803285e
      Reviewed-on: https://go-review.googlesource.com/101076
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      dafca7de
    • Josh Bleecher Snyder's avatar
      cmd/compile: strength reduce more x86 constant multiplication · 6a74fe2f
      Josh Bleecher Snyder authored
      The additions were machine-generated.
      
      The change for x * 7 avoids a reg-reg move,
      reducing the number of instructions from 3 to 2.
      
      Change-Id: Ib002e39f29ca5e46cfdb8daaf87ddc7ba50a17e5
      Reviewed-on: https://go-review.googlesource.com/102395
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      6a74fe2f
    • Agniva De Sarker's avatar
      os: keep the $ if a variable is not detected · 7bf631e1
      Agniva De Sarker authored
      If the character after $ cannot be detected as a valid
      variable declaration, do not gobble the $.
      
      Fixes #24345
      
      Change-Id: Iec47be1f2e4f8147b8ceb64c30778eae8045b58f
      Reviewed-on: https://go-review.googlesource.com/103055
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      7bf631e1