1. 02 Oct, 2015 4 commits
    • Ian Lance Taylor's avatar
      misc/cgo/testsanitizers: skip test for version of clang before 3.6 · f80ff56a
      Ian Lance Taylor authored
      I've tested with clang 3.6.  The builder is running 3.5, and fails.
      
      Fixes #12814.
      
      Change-Id: I087fb75c3a24bed7f7fa5e9d7a1444590a316d63
      Reviewed-on: https://go-review.googlesource.com/15259Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      f80ff56a
    • David Crawshaw's avatar
      runtime: darwin/386 entrypoint for c-archive · 47ccf96a
      David Crawshaw authored
      Change-Id: Ic22597b5e2824cffe9598cb9b506af3426c285fd
      Reviewed-on: https://go-review.googlesource.com/12412
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      47ccf96a
    • Michael Hudson-Doyle's avatar
      runtime: adjust the ppc64x memmove and memclr to copy by word as much as it can · 2c911143
      Michael Hudson-Doyle authored
      Issue #12552 can happen on ppc64 too, although much less frequently in my
      testing. I'm fairly sure this fixes it (2 out of 200 runs of oracle.test failed
      without this change and 0 of 200 failed with it). It's also a lot faster for
      large moves/clears:
      
      name           old speed      new speed       delta
      Memmove1-6      157MB/s ± 9%    144MB/s ± 0%    -8.20%         (p=0.004 n=10+9)
      Memmove2-6      281MB/s ± 1%    249MB/s ± 1%   -11.53%        (p=0.000 n=10+10)
      Memmove3-6      376MB/s ± 1%    328MB/s ± 1%   -12.64%        (p=0.000 n=10+10)
      Memmove4-6      475MB/s ± 4%    345MB/s ± 1%   -27.28%         (p=0.000 n=10+8)
      Memmove5-6      540MB/s ± 1%    393MB/s ± 0%   -27.21%        (p=0.000 n=10+10)
      Memmove6-6      609MB/s ± 0%    423MB/s ± 0%   -30.56%         (p=0.000 n=9+10)
      Memmove7-6      659MB/s ± 0%    468MB/s ± 0%   -28.99%         (p=0.000 n=8+10)
      Memmove8-6      705MB/s ± 0%   1295MB/s ± 1%   +83.73%          (p=0.000 n=9+9)
      Memmove9-6      740MB/s ± 1%   1241MB/s ± 1%   +67.61%         (p=0.000 n=10+8)
      Memmove10-6     780MB/s ± 0%   1162MB/s ± 1%   +48.95%         (p=0.000 n=10+9)
      Memmove11-6     811MB/s ± 0%   1180MB/s ± 0%   +45.58%          (p=0.000 n=8+9)
      Memmove12-6     820MB/s ± 1%   1073MB/s ± 1%   +30.83%         (p=0.000 n=10+9)
      Memmove13-6     849MB/s ± 0%   1068MB/s ± 1%   +25.87%        (p=0.000 n=10+10)
      Memmove14-6     877MB/s ± 0%    911MB/s ± 0%    +3.83%        (p=0.000 n=10+10)
      Memmove15-6     893MB/s ± 0%    922MB/s ± 0%    +3.25%         (p=0.000 n=10+9)
      Memmove16-6     897MB/s ± 1%   2418MB/s ± 1%  +169.67%         (p=0.000 n=10+9)
      Memmove32-6     908MB/s ± 0%   3927MB/s ± 2%  +332.64%         (p=0.000 n=10+8)
      Memmove64-6    1.11GB/s ± 0%   5.59GB/s ± 0%  +404.64%          (p=0.000 n=9+9)
      Memmove128-6   1.25GB/s ± 0%   6.71GB/s ± 2%  +437.49%         (p=0.000 n=9+10)
      Memmove256-6   1.33GB/s ± 0%   7.25GB/s ± 1%  +445.06%        (p=0.000 n=10+10)
      Memmove512-6   1.38GB/s ± 0%   8.87GB/s ± 0%  +544.43%        (p=0.000 n=10+10)
      Memmove1024-6  1.40GB/s ± 0%  10.00GB/s ± 0%  +613.80%        (p=0.000 n=10+10)
      Memmove2048-6  1.41GB/s ± 0%  10.65GB/s ± 0%  +652.95%         (p=0.000 n=9+10)
      Memmove4096-6  1.42GB/s ± 0%  11.01GB/s ± 0%  +675.37%         (p=0.000 n=8+10)
      Memclr5-6       269MB/s ± 1%    264MB/s ± 0%    -1.80%        (p=0.000 n=10+10)
      Memclr16-6      600MB/s ± 0%    887MB/s ± 1%   +47.83%        (p=0.000 n=10+10)
      Memclr64-6     1.06GB/s ± 0%   2.91GB/s ± 1%  +174.58%         (p=0.000 n=8+10)
      Memclr256-6    1.32GB/s ± 0%   6.58GB/s ± 0%  +399.86%         (p=0.000 n=9+10)
      Memclr4096-6   1.42GB/s ± 0%  10.90GB/s ± 0%  +668.03%         (p=0.000 n=8+10)
      Memclr65536-6  1.43GB/s ± 0%  11.37GB/s ± 0%  +697.83%          (p=0.000 n=9+8)
      GoMemclr5-6     359MB/s ± 0%    360MB/s ± 0%    +0.46%        (p=0.000 n=10+10)
      GoMemclr16-6    750MB/s ± 0%   1264MB/s ± 1%   +68.45%        (p=0.000 n=10+10)
      GoMemclr64-6   1.17GB/s ± 0%   3.78GB/s ± 1%  +223.58%         (p=0.000 n=10+9)
      GoMemclr256-6  1.35GB/s ± 0%   7.47GB/s ± 0%  +452.44%        (p=0.000 n=10+10)
      
      Update #12552
      
      Change-Id: I7192e9deb9684a843aed37f58a16a4e29970e893
      Reviewed-on: https://go-review.googlesource.com/14840Reviewed-by: 's avatarMinux Ma <minux@golang.org>
      2c911143
    • Mikio Hara's avatar
      runtime: drop sigfwd from signal forwarding unsupported platforms · 9fb79380
      Mikio Hara authored
      This change splits signal_unix.go into signal_unix.go and
      signal2_unix.go and removes the fake symbol sigfwd from signal
      forwarding unsupported platforms for clarification purpose.
      
      Change-Id: I205eab5cf1930fda8a68659b35cfa9f3a0e67ca6
      Reviewed-on: https://go-review.googlesource.com/12062Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      9fb79380
  2. 01 Oct, 2015 9 commits
  3. 30 Sep, 2015 10 commits
  4. 29 Sep, 2015 9 commits
  5. 28 Sep, 2015 7 commits
    • Andrew Gerrand's avatar
      doc: add text/template blocks and redefinition to go1.6.txt · 652d2386
      Andrew Gerrand authored
      Change-Id: Ide82ac98dc7cb1035ceb9d461ed95af899f8f983
      Reviewed-on: https://go-review.googlesource.com/15081Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      652d2386
    • Robert Griesemer's avatar
      encoding/json: document that encoding.TextMarshaler is used if no (json) Marshaler is present · cbe8a353
      Robert Griesemer authored
      Change-Id: I63da54832548c325e47dc54aaa5b5112e1f3b3ba
      Reviewed-on: https://go-review.googlesource.com/15048Reviewed-by: 's avatarRob Pike <r@golang.org>
      cbe8a353
    • Robert Griesemer's avatar
      math/big: improved documentation · 3d4cd144
      Robert Griesemer authored
      - moved existing package documentation from nat.go to doc.go
      - expanded on it
      
      For #11241.
      
      Change-Id: Ie75a2b0178a8904a4154307a1f5080d7efc5489a
      Reviewed-on: https://go-review.googlesource.com/15042Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      3d4cd144
    • Rob Pike's avatar
      cmd/doc: rearrange the newlines to group better · c978f13a
      Rob Pike authored
      Main change is that the comment for an item no longer has a blank line
      before it, so it looks bound to the item it's about.
      
      Motivating example: go doc.io.read changes from
      
      <
      func (l *LimitedReader) Read(p []byte) (n int, err error)
      func (r *PipeReader) Read(data []byte) (n int, err error)
      
          Read implements the standard Read interface: it reads data from the pipe,
          blocking until a writer arrives or the write end is closed. If the write end
          is closed with an error, that error is returned as err; otherwise err is
          EOF.
      func (s *SectionReader) Read(p []byte) (n int, err error)
      >
      
      to
      
      <
      func (l *LimitedReader) Read(p []byte) (n int, err error)
      func (r *PipeReader) Read(data []byte) (n int, err error)
          Read implements the standard Read interface: it reads data from the pipe,
          blocking until a writer arrives or the write end is closed. If the write end
          is closed with an error, that error is returned as err; otherwise err is
          EOF.
      
      func (s *SectionReader) Read(p []byte) (n int, err error)
      >
      
      Now the comment about PipeReader.Read doesn't look like it's about
      SectionReader.
      
      Based on a suggestion by dsnet@, a slight tweak from a CL he suggested
      and abandoned.
      
      Fixes #12756,
      
      Change-Id: Iaf60ee9ae7f644c83c32d5e130acab0312b0c926
      Reviewed-on: https://go-review.googlesource.com/14999Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      c978f13a
    • Andrew Gerrand's avatar
      text/template, html/template: add block keyword and permit template redefinition · 12dfc3be
      Andrew Gerrand authored
      This change adds a new "block" keyword that permits the definition
      of templates inline inside existing templates, and loosens the
      restriction on template redefinition. Templates may now be redefined,
      but in the html/template package they may only be redefined before
      the template is executed (and therefore escaped).
      
      The intention is that such inline templates can be redefined by
      subsequent template definitions, permitting a kind of template
      "inheritance" or "overlay". (See the example for details.)
      
      Fixes #3812
      
      Change-Id: I733cb5332c1c201c235f759cc64333462e70dc27
      Reviewed-on: https://go-review.googlesource.com/14005Reviewed-by: 's avatarRob Pike <r@golang.org>
      12dfc3be
    • Ian Lance Taylor's avatar
      cmd/cgo: only declare real function in gccgo exported header file · 09c6d13a
      Ian Lance Taylor authored
      When exporting a function using gccgo, we generate two functions: a Go
      function with a leading Cgoexp_ prefix, and a C function that calls the
      Go function.  The Go function has a name that can not be represented in
      C, so the C code needs a declaration with an __asm__ qualifier giving
      the name of the Go function.
      
      Before this CL we put that declaration in the exported header file.
      Because code would sometimes #include "_cgo_export.h", we added a macro
      definition for the C function giving it the name of the declaration.  We
      then added a macro undefine in the actual C code, so that we could
      declare the C function we wanted.
      
      This rounadabout process worked OK until we started exporting the header
      file for use with -buildmode=c-archive and c-shared.  Doing that caused
      the code to see the define and thus call the Go function rather than the
      C function.  That often works fine, but the C function calls
      _cgo_wait_runtime_init_done before calling the Go function, and that
      sometimes matters.  This didn't show up in tests because we don't test
      using gccgo.  That is something we should fix, but not now.
      
      Fix that by simplifying the code to declare the C function in the header
      file as one would expect, and move the __asm__ declaration to the C
      code.
      
      Change-Id: I33547e028152ff98e332630994b4f33285feec32
      Reviewed-on: https://go-review.googlesource.com/15043Reviewed-by: 's avatarMinux Ma <minux@golang.org>
      09c6d13a
    • Joel Sing's avatar
      tests/fixedbugs: make test for issue11656 run known instruction · 82a9d90e
      Joel Sing authored
      As detailed in #11910, the current implementation attempts to execute an area
      of memory with unknown content. If the memory is executable, the result is
      unpredictable - instead, make the test deterministic by attempting to execute
      an instruction that is known to trigger a trap on the given architecture.
      
      The new implementation is written by iant@ and provided via #11910.
      
      Update issue #11910
      
      Change-Id: Ia698c36e0dd98a9d9d16a701f60f6748c6faf896
      Reviewed-on: https://go-review.googlesource.com/15058
      Run-TryBot: Joel Sing <jsing@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      82a9d90e
  6. 27 Sep, 2015 1 commit
    • Didier Spezia's avatar
      net/http/fcgi: fix panic with malformed params record · b7fa4f27
      Didier Spezia authored
      As stated in FastCGI specifications:
      
      FastCGI transmits a name-value pair as the length of the name,
      followed by the length of the value, followed by the name,
      followed by the value.
      
      The current implementation trusts the name and value length
      provided in the record, leading to a panic if the record
      is malformed.
      
      Added an explicit check on the lengths.
      
      Test case and fix suggested by diogin@gmail.com (Jingcheng Zhang)
      
      Fixes #11824
      
      Change-Id: I883a1982ea46465e1fb02e0e02b6a4df9e529ae4
      Reviewed-on: https://go-review.googlesource.com/15015Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b7fa4f27