1. 06 Feb, 2014 5 commits
    • Jakub Ryszard Czarnowicz's avatar
      net/mail: correctly handle whitespaces when formatting an email address · d3b9567a
      Jakub Ryszard Czarnowicz authored
      Whitespace characters are allowed in quoted-string according to RFC 5322 without
      being "Q"-encoding. Address.String() already always formats the name portion in
      quoted string, so whitespace characters should be allowed in there.
      
      Fixes #6641.
      
      LGTM=dave, dsymonds
      R=golang-codereviews, gobot, dsymonds, dave
      CC=golang-codereviews
      https://golang.org/cl/55770043
      d3b9567a
    • Shenghou Ma's avatar
      cmd/go: do not create world-writable files. · c66956cd
      Shenghou Ma authored
      Fixes #7240.
      
      LGTM=tommi.virtanen, bradfitz
      R=golang-codereviews, tommi.virtanen, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/60480045
      c66956cd
    • Richard Musiol's avatar
      math/big: replace goto with for loop · 547a82c3
      Richard Musiol authored
      I just added support for goto statements to my GopherJS project and now I am trying to get rid of my patches. These occurrences of goto however are a bit problematic:
      GopherJS has to emulate gotos, so there is some performance drawback when doing so. In this case the drawback is major, since this is a core function of math/big which is called quite often. Additionally I can't see any reason here why the implementation with gotos should be preferred over my proposal.
      That's why I would kindly ask to include this patch, even though it is functional equivalent to the existing code.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/55470046
      547a82c3
    • Shenghou Ma's avatar
      doc/install.html: get rid of explicit version number in docs. · 2b6eb111
      Shenghou Ma authored
      So that we don't need to update the file each time a new version is released.
      
      LGTM=dave, r, adg
      R=golang-codereviews, dave, josharian, gobot, adg, r
      CC=golang-codereviews
      https://golang.org/cl/48730043
      2b6eb111
    • Elias Naur's avatar
      cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled · 2dc759d7
      Elias Naur authored
      Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET.
      CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while
      CC remains for compiling for GOHOSTARCH.
      CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for
      GOARCH.
      
      CGO_ENABLED defaults to disabled when cross compiling and has to be
      explicitly enabled.
      
      Update #4714
      
      LGTM=minux.ma, iant
      R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef
      CC=golang-codereviews
      https://golang.org/cl/57100043
      2dc759d7
  2. 05 Feb, 2014 2 commits
  3. 04 Feb, 2014 4 commits
  4. 03 Feb, 2014 6 commits
    • Elias Naur's avatar
      liblink, cmd/5l: restore flag_shared · 9ed5995c
      Elias Naur authored
      CL 56120043 fixed and cleaned up TLS on ARM after introducing liblink, but
      left flag_shared broken. This CL restores the (unsupported) flag_shared
      behaviour by simply rewriting access to $runtime.tlsgm(SB) with
      runtime.tlsgm(SB), to compensate for the extra indirection when going from
      the R_ARM_TLS_LE32 relocation to the R_ARM_TLS_IE32 relocation.
      
      Also, remove unnecessary symbol lookup left after 56120043.
      
      LGTM=iant
      R=iant, rsc
      CC=golang-codereviews
      https://golang.org/cl/57000043
      9ed5995c
    • Elias Naur's avatar
      liblink, cmd/5a, cmd/5l: restore cgo on older ARM processors · 1dd4da14
      Elias Naur authored
      CL 56120043 fixed TLS handling on ARM after the introduction of
      liblink but left older ARM processors broken.
      
      Before liblink, the MRC instruction was replaced with a fallback
      on older ARMs. CL 56120043 removed that, because the rewrite matched
      bit patterns on the AWORD pseudo-instruction and could therefore change
      unrelated AWORDs that happened to match.
      
      This CL adds an AMRC instruction to encode both MRC and MCR previously
      encoded as AWORDs. Then, in liblink, the AMRC instructions are either
      rewritten to AWORD, or, on goarm < 7, replaced with a branch to the
      fallback.
      
      ./all.bash completes successfully on an ARMv7 with either GOARM=7 or
      GOARM=5. I have verified that the fallback is indeed present in both
      runtime.save_gm and runtime.load_gm when GOARM=5 but not when GOARM=7.
      
      If all goes well, this should fix the armv5 builders.
      
      LGTM=iant
      R=iant, rsc
      CC=golang-codereviews
      https://golang.org/cl/55540044
      1dd4da14
    • Brad Fitzpatrick's avatar
      os/exec: fix Command with relative paths · e6d8bfe2
      Brad Fitzpatrick authored
      Command was (and is) documented like:
      "If name contains no path separators, Command uses LookPath to
      resolve the path to a complete name if possible. Otherwise it
      uses name directly."
      
      But that wasn't true. It always did LookPath, and then
      set a sticky error that the user couldn't unset.
      And then if cmd.Dir was changed, Start would still fail
      due to the earlier sticky error being set.
      
      This keeps LookPath in the same place as before (so no user
      visible changes in cmd.Path after Command), but only does
      it when the documentation says it will happen.
      
      Also, clarify the docs about a relative Dir path.
      
      No change in any existing behavior, except using Command
      is now possible with relative paths. Previously it only
      worked if you built the *Cmd by hand.
      
      Fixes #7228
      
      LGTM=iant
      R=iant
      CC=adg, golang-codereviews
      https://golang.org/cl/59580044
      e6d8bfe2
    • Brad Fitzpatrick's avatar
      net/http: make a test fail harder, earlier · 4723308f
      Brad Fitzpatrick authored
      LGTM=dave
      R==r, r, dave
      CC=golang-codereviews
      https://golang.org/cl/59810043
      4723308f
    • Robert Griesemer's avatar
      A+C: Gordon Klaus (individual CLA) · 07cbf550
      Robert Griesemer authored
      Generated by addca.
      
      LGTM=iant
      R=gobot, iant
      CC=golang-codereviews
      https://golang.org/cl/59770043
      07cbf550
    • Brad Fitzpatrick's avatar
      A+C: 申习之 (individual CLA) · 9a960042
      Brad Fitzpatrick authored
      Generated by addca.
      
      TBR=iant
      R=gobot
      CC=golang-codereviews
      https://golang.org/cl/59550044
      9a960042
  5. 02 Feb, 2014 11 commits
  6. 01 Feb, 2014 1 commit
  7. 31 Jan, 2014 5 commits
  8. 30 Jan, 2014 6 commits
    • Rémy Oudompheng's avatar
      cmd/gc: do not consider length zero arrays as comparable. · 502958ff
      Rémy Oudompheng authored
      Array values are comparable if values of the array element type
      are comparable.
      
      Fixes #6526.
      
      LGTM=khr
      R=rsc, bradfitz, khr
      CC=golang-codereviews
      https://golang.org/cl/58580043
      502958ff
    • Ian Lance Taylor's avatar
      cmd/ld: fix bug with "runtime/cgo" in external link mode · 1683dab7
      Ian Lance Taylor authored
      In external link mode the linker explicitly adds the string
      constant "runtime/cgo".  It adds the string constant using the
      same symbol name as the compiler, but a different format.  The
      compiler assumes that the string data immediately follows the
      string header, but the linker puts the two in different
      sections.  The result is bad string data when the compiler
      sees "runtime/cgo" used as a string constant.
      
      The compiler assumption is in datastring in [568]g/gobj.c.
      The linker layout is in addstrdata in ld/data.c.  The compiler
      assumption is valid for string literals.  The linker is not
      creating a string literal, so its assumption is also valid.
      
      There are a few ways to avoid this problem.  This patch fixes
      it by only doing the fake import of runtime/cgo if necessary,
      and by only creating the string symbol if necessary.
      
      Fixes #7234.
      
      LGTM=dvyukov
      R=golang-codereviews, dvyukov, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/58410043
      1683dab7
    • David du Colombier's avatar
      net/http: temporarily disable the failing tests on Plan 9 · 73b0d84c
      David du Colombier authored
      Update #7237
      
      LGTM=bradfitz
      R=jas, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/57190045
      73b0d84c
    • Dmitriy Vyukov's avatar
      runtime: increase page size to 8K · e48751e2
      Dmitriy Vyukov authored
      Tcmalloc uses 8K, 32K and 64K pages, and in custom setups 256K pages.
      Only Chromium uses 4K pages today (in "slow but small" configuration).
      The general tendency is to increase page size, because it reduces
      metadata size and DTLB pressure.
      This change reduces GC pause by ~10% and slightly improves other metrics.
      
      json-1
      allocated                 8037492      8038689      +0.01%
      allocs                     105762       105573      -0.18%
      cputime                 158400000    155800000      -1.64%
      gc-pause-one              4412234      4135702      -6.27%
      gc-pause-total            2647340      2398707      -9.39%
      rss                      54923264     54525952      -0.72%
      sys-gc                    3952624      3928048      -0.62%
      sys-heap                 46399488     46006272      -0.85%
      sys-other                 5597504      5290304      -5.49%
      sys-stack                  393216       393216      +0.00%
      sys-total                56342832     55617840      -1.29%
      time                    158478890    156046916      -1.53%
      virtual-mem             256548864    256593920      +0.02%
      
      garbage-1
      allocated                 2991113      2986259      -0.16%
      allocs                      62844        62652      -0.31%
      cputime                  16330000     15860000      -2.88%
      gc-pause-one            789108229    725555211      -8.05%
      gc-pause-total            3945541      3627776      -8.05%
      rss                    1143660544   1132253184      -1.00%
      sys-gc                   65609600     65806208      +0.30%
      sys-heap               1032388608   1035599872      +0.31%
      sys-other                37501632     22777664     -39.26%
      sys-stack                 8650752      8781824      +1.52%
      sys-total              1144150592   1132965568      -0.98%
      time                     16364602     15891994      -2.89%
      virtual-mem            1327296512   1313746944      -1.02%
      
      This is the exact reincarnation of already LGTMed:
      https://golang.org/cl/45770044
      which must not break darwin/freebsd after:
      https://golang.org/cl/56630043
      TBR=iant
      
      LGTM=khr, iant
      R=iant, khr
      CC=golang-codereviews
      https://golang.org/cl/58230043
      e48751e2
    • Brad Fitzpatrick's avatar
      net/http: use a struct instead of a string in transport conn cache key · ae8251b0
      Brad Fitzpatrick authored
      The Transport's idle connection cache is keyed by a string,
      for pre-Go 1.0 reasons.  Ever since Go has been able to use
      structs as map keys, there's been a TODO in the code to use
      structs instead of allocating strings. This change does that.
      
      Saves 3 allocatins and ~100 bytes of garbage per client
      request. But because string hashing is so fast these days
      (thanks, Keith), the performance is a wash: what we gain
      on GC and not allocating, we lose in slower hashing. (hashing
      structs of strings is slower than 1 string)
      
      This seems a bit faster usually, but I've also seen it be a
      bit slower. But at least it's how I've wanted it now, and it
      the allocation improvements are consistent.
      
      LGTM=adg
      R=adg
      CC=golang-codereviews
      https://golang.org/cl/58260043
      ae8251b0
    • Rémy Oudompheng's avatar
      encoding/gob: fix two crashes on corrupted data. · 7a73f327
      Rémy Oudompheng authored
      Fixes #6323.
      
      LGTM=r
      R=r
      CC=golang-codereviews
      https://golang.org/cl/56870043
      7a73f327