1. 13 Mar, 2014 17 commits
  2. 12 Mar, 2014 15 commits
    • Brad Fitzpatrick's avatar
      doc: update go1.3.txt for regexp change · 15068b6d
      Brad Fitzpatrick authored
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/72640043
      15068b6d
    • Dave Cheney's avatar
      runtime: fix missing nacl/386 symbol · f2037e15
      Dave Cheney authored
      syscall.naclWrite was missing from sys_nacl_386.s
      
      This gets ./make.bash passing, but doesn't pass validation. I'm not sure if this is the fault of this change, or validation was broken anyway.
      
      LGTM=rsc
      R=minux.ma, rsc
      CC=golang-codereviews
      https://golang.org/cl/74510043
      f2037e15
    • Russ Cox's avatar
      doc/go1.3.txt: add notes about copying stacks, win2k support · b11aeef9
      Russ Cox authored
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/74800043
      b11aeef9
    • Dominik Honnef's avatar
      misc/emacs: correctly fontify methods when go-fontify-function-calls is nil · e9ba9470
      Dominik Honnef authored
      We were fontifying the wrong part of method declarations
      
      LGTM=adonovan
      R=adonovan
      CC=golang-codereviews
      https://golang.org/cl/66120043
      e9ba9470
    • Rob Pike's avatar
      fmt: improve documentation for width and precision · 78992439
      Rob Pike authored
      Fixes #7048.
      
      LGTM=dominik.honnef
      R=golang-codereviews, dominik.honnef
      CC=golang-codereviews
      https://golang.org/cl/74280044
      78992439
    • Dmitriy Vyukov's avatar
      runtime: efence support for growable stacks · 1f4d2e79
      Dmitriy Vyukov authored
      1. Fix the bug that shrinkstack returns memory to heap.
         This causes growslice to misbehave (it manually initialized
         blocks, and in efence mode shrinkstack's free leads to
         partially-initialized blocks coming out of growslice.
         Which in turn causes GC to crash while treating the garbage
         as Eface/Iface.
      2. Enable efence for stack segments.
      
      LGTM=rsc
      R=golang-codereviews, rsc
      CC=golang-codereviews, khr
      https://golang.org/cl/74080043
      1f4d2e79
    • Dmitriy Vyukov's avatar
      runtime: temporary weaken a check in test · 00e6fc1e
      Dmitriy Vyukov authored
      Currently the test fails as:
      $ go test -v -cpu 1,1,1,1 runtime -test.run=TestStack
      stack_test.go:1584: Stack inuse: want 4194304, got 18446744073709547520
      
      Update #7468
      
      LGTM=rsc
      R=golang-codereviews, bradfitz
      CC=golang-codereviews, khr, rsc
      https://golang.org/cl/74010043
      00e6fc1e
    • Jan Ziak's avatar
      cmd/go: respect system CGO_CFLAGS and CGO_CXXFLAGS · b87c7729
      Jan Ziak authored
      Fixes #6882
      
      LGTM=iant
      R=rsc, iant
      CC=golang-codereviews
      https://golang.org/cl/72080043
      b87c7729
    • Brad Fitzpatrick's avatar
      net/http/cgi: serve 500, not 200, on invalid responses from child processes · d53251d4
      Brad Fitzpatrick authored
      Per RFC 3875 section 6 rules.
      
      Fixes #7198
      
      LGTM=adg
      R=adg
      CC=golang-codereviews
      https://golang.org/cl/68960049
      d53251d4
    • Russ Cox's avatar
      runtime: fix empty string handling in garbage collector · 54c901cd
      Russ Cox authored
      The garbage collector uses type information to guide the
      traversal of the heap. If it sees a field that should be a string,
      it marks the object pointed at by the string data pointer as
      visited but does not bother to look at the data, because
      strings contain bytes, not pointers.
      
      If you save s[len(s):] somewhere, though, the string data pointer
      actually points just beyond the string data; if the string data
      were exactly the size of an allocated block, the string data
      pointer would actually point at the next block. It is incorrect
      to mark that next block as visited and not bother to look at
      the data, because the next block may be some other type
      entirely.
      
      The fix is to ignore strings with zero length during collection:
      they are empty and can never become non-empty: the base
      pointer will never be used again. The handling of slices already
      does this (but using cap instead of len).
      
      This was not a bug in Go 1.2, because until January all string
      allocations included a trailing NUL byte not included in the
      length, so s[len(s):] still pointed inside the string allocation
      (at the NUL).
      
      This bug was causing the crashes in test/run.go. Specifically,
      the parsing of a regexp in package regexp/syntax allocated a
      []syntax.Inst with rounded size 1152 bytes. In fact it
      allocated many such slices, because during the processing of
      test/index2.go it creates thousands of regexps that are all
      approximately the same complexity. That takes a long time, and
      test/run works on other tests in other goroutines. One such
      other test is chan/perm.go, which uses an 1152-byte source
      file. test/run reads that file into a []byte and then calls
      strings.Split(string(src), "\n"). The string(src) creates an
      1152-byte string - and there's a very good chance of it
      landing next to one of the many many regexp slices already
      allocated - and then because the file ends in a \n,
      strings.Split records the tail empty string as the final
      element in the slice. A garbage collection happens at this
      point, the collection finds that string before encountering
      the []syntax.Inst data it now inadvertently points to, and the
      []syntax.Inst data is not scanned for the pointers that it
      contains. Each syntax.Inst contains a []rune, those are
      missed, and the backing rune arrays are freed for reuse. When
      the regexp is later executed, the runes being searched for are
      no longer runes at all, and there is no match, even on text
      that should match.
      
      On 64-bit machines the pointer in the []rune inside the
      syntax.Inst is larger (along with a few other pointers),
      pushing the []syntax.Inst backing array into a larger size
      class, avoiding the collision with chan/perm.go's
      inadvertently sized file.
      
      I expect this was more prevalent on OS X than on Linux or
      Windows because those managed to run faster or slower and
      didn't overlap index2.go with chan/perm.go as often. On the
      ARM systems, we only run one errorcheck test at a time, so
      index2 and chan/perm would never overlap.
      
      It is possible that this bug is the root cause of other crashes
      as well. For now we only know it is the cause of the test/run crash.
      
      Many thanks to Dmitriy for help debugging.
      
      Fixes #7344.
      Fixes #7455.
      
      LGTM=r, dvyukov, dave, iant
      R=golang-codereviews, dave, r, dvyukov, delpontej, iant
      CC=golang-codereviews, khr
      https://golang.org/cl/74250043
      54c901cd
    • Russ Cox's avatar
      test/run: make errorcheck tests faster · d5887c5a
      Russ Cox authored
      Some of the errorcheck tests have many many identical regexps.
      Use a map to avoid storing the compiled form many many times
      in memory. Change the filterRe to a simple string to avoid
      the expense of those regexps as well.
      
      Cuts the time for run.go on index2.go by almost 50x.
      
      Noticed during debugging of issue 7344.
      
      LGTM=bradfitz
      R=bradfitz, josharian
      CC=golang-codereviews
      https://golang.org/cl/74380043
      d5887c5a
    • Russ Cox's avatar
      cmd/gc: fix crash in -live mode · ab844022
      Russ Cox authored
      debuglive >= 1 is not the condition under which we
      start recording messages (we avoid printing for
      init functions even if debuglive is set).
      
      LGTM=bradfitz, iant
      R=golang-codereviews, bradfitz
      CC=golang-codereviews, iant, khr
      https://golang.org/cl/74390043
      ab844022
    • Dhiru Kholia's avatar
      dwarf: add extensions for multi-file compression (.dwz) · 5b5c8f05
      Dhiru Kholia authored
      LGTM=iant
      R=golang-codereviews, iant, bradfitz
      CC=golang-codereviews, math-nuts
      https://golang.org/cl/72820044
      5b5c8f05
    • Mikio Hara's avatar
      runtime: make use of THREAD_SHARE userspace mutex on freebsd · ae9b661f
      Mikio Hara authored
      For now Note, futexsleep and futexwakeup are designed for threads,
      not for processes. The explicit use of UMTX_OP_WAIT_UINT_PRIVATE and
      UMTX_OP_WAKE_PRIVATE can avoid unnecessary traversals of VM objects,
      to hit undiscovered bugs related to VM system on SMP/SMT/NUMA
      environment.
      
      Update #7496
      
      LGTM=iant
      R=golang-codereviews, gobot, iant, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/72760043
      ae9b661f
    • Mikio Hara's avatar
      syscall, net: clean up socket stub for solaris · ef6c21d0
      Mikio Hara authored
      Solaris doesn't have struct ip_mreqn, instead it uses struct ip_mreq
      and struct group_req with struct sockaddr_storage.
      
      Also fixes incorrect SockaddrDatalink.
      
      Update #7399
      
      LGTM=aram, iant
      R=golang-codereviews, aram, gobot, iant
      CC=golang-codereviews
      https://golang.org/cl/73920043
      ef6c21d0
  3. 11 Mar, 2014 8 commits