1. 23 Sep, 2014 1 commit
  2. 22 Sep, 2014 7 commits
  3. 21 Sep, 2014 1 commit
    • Keith Randall's avatar
      runtime: be very careful with bad pointer tests · 3b2577ce
      Keith Randall authored
      Saw this on a test:
      
      runtime: bad pointer in frame runtime_test.testSetPanicOnFault at 0xc20801c6b0: 0xfff
      fatal error: bad pointer!
      
      runtime stack:
      ...
      copystack(0xc2081bf7a0, 0x1000)
              /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/stack.c:621 +0x173 fp=0xfffffd7ffd5ffee0 sp=0xfffffd7ffd5ffe20
      runtime.newstack()
              /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/stack.c:774 +0x552 fp=0xfffffd7ffd5fff90 sp=0xfffffd7ffd5ffee0
      runtime.morestack()
              /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/asm_amd64.s:324 +0x90 fp=0xfffffd7ffd5fff98 sp=0xfffffd7ffd5fff90
      
      goroutine 163354 [stack growth]:
      ...
      runtime.convT2E(0x587000, 0xc20807bea8, 0x0, 0x0)
              /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/iface.go:141 +0xd2 fp=0xc20801c678 sp=0xc20801c640
      runtime_test.testSetPanicOnFault(0xc20822c510, 0xfff, 0xc20801c748)
              /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/runtime_test.go:211 +0xc6 fp=0xc20801c718 sp=0xc20801c678
      ...
      
      This test is testing bad pointers.  It loads the bad pointer into a pointer variable,
      but before it gets a chance to dereference it, calls convT2E.  That call causes a stack copy,
      which exposes that live but bad pointer variable.
      
      LGTM=dvyukov
      R=golang-codereviews, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/146880043
      3b2577ce
  4. 19 Sep, 2014 22 commits
  5. 18 Sep, 2014 9 commits
    • Robert Griesemer's avatar
      go/doc: document rationale for recent change · e4fa1e40
      Robert Griesemer authored
      LGTM=adg
      R=adg
      CC=golang-codereviews
      https://golang.org/cl/143290043
      e4fa1e40
    • Russ Cox's avatar
      bytes, strings: document that FieldsFunc f must not be stateful · e9ec8e7a
      Russ Cox authored
      Fixes #8738.
      
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews
      https://golang.org/cl/143260045
      e9ec8e7a
    • Russ Cox's avatar
      syscall: fix infinite recursion in itoa · ab76638c
      Russ Cox authored
      Fixes #8332.
      
      LGTM=dvyukov
      R=golang-codereviews, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/138650044
      ab76638c
    • Josh Bleecher Snyder's avatar
      go/doc: treat _ consts as exported · 2b59c9d3
      Josh Bleecher Snyder authored
      Fixes #5397.
      
      LGTM=adg
      R=gri, adg
      CC=golang-codereviews, rsc
      https://golang.org/cl/144110044
      2b59c9d3
    • David du Colombier's avatar
      runtime: fix handling of GOTRACEBACK · 45143aec
      David du Colombier authored
      Since CL 130990043, the GOTRACEBACK variable is
      only used when the GODEBUG variable is set.
      This change restores the original behavior.
      
      LGTM=rsc
      R=golang-codereviews, aram, gobot, r, rsc
      CC=golang-codereviews
      https://golang.org/cl/132520043
      45143aec
    • Russ Cox's avatar
      runtime: delete panicstring; move its checks into gopanic · c3b5db89
      Russ Cox authored
      In Go 1.3 the runtime called panicstring to report errors like
      divide by zero or memory faults. Now we call panic (gopanic)
      with pre-allocated error values. That new path is missing the
      checking that panicstring did, so add it there.
      
      The only call to panicstring left is in cnew, which is problematic
      because if it fails, probably the heap is corrupt. In that case,
      calling panicstring creates a new errorCString (no allocation there),
      but then panic tries to print it, invoking errorCString.Error, which
      does a string concatenation (allocating), which then dies.
      Replace that one panicstring with a throw: cnew is for allocating
      runtime data structures and should never ask for an inappropriate
      amount of memory.
      
      With panicstring gone, delete newErrorCString, errorCString.
      While we're here, delete newErrorString, not called by anyone.
      (It can't be: that would be C code calling Go code that might
      block or grow the stack.)
      
      Found while debugging a malloc corruption.
      This resulted in 'panic during panic' instead of a more useful message.
      
      LGTM=khr
      R=khr
      CC=golang-codereviews
      https://golang.org/cl/138290045
      c3b5db89
    • Russ Cox's avatar
      os: avoid error result when dir is removed out from under RemoveAll · 98a5f52e
      Russ Cox authored
      Fixes #7776.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews, r
      https://golang.org/cl/145860043
      98a5f52e
    • Russ Cox's avatar
      net: disable TestDialMultiFDLeak · 76c75481
      Russ Cox authored
      It fails about 25% of the time on OS X.
      I don't know what it's trying to do.
      Created issue 8764 to correct this, but for now disable.
      
      LGTM=bradfitz, mikioh.mikioh
      R=bradfitz, mikioh.mikioh
      CC=golang-codereviews
      https://golang.org/cl/144070044
      76c75481
    • Dmitriy Vyukov's avatar
      encoding/gob: speedup encoding · dfd4123e
      Dmitriy Vyukov authored
      Replace typeLock with copy-on-write map using atomic.Value.
      
      benchmark                               old ns/op     new ns/op     delta
      BenchmarkEndToEndPipe                   7722          7709          -0.17%
      BenchmarkEndToEndPipe-2                 5114          4344          -15.06%
      BenchmarkEndToEndPipe-4                 3192          2429          -23.90%
      BenchmarkEndToEndPipe-8                 1833          1438          -21.55%
      BenchmarkEndToEndPipe-16                1332          983           -26.20%
      BenchmarkEndToEndPipe-32                1444          675           -53.25%
      BenchmarkEndToEndByteBuffer             6474          6019          -7.03%
      BenchmarkEndToEndByteBuffer-2           4280          2810          -34.35%
      BenchmarkEndToEndByteBuffer-4           2264          1774          -21.64%
      BenchmarkEndToEndByteBuffer-8           1275          979           -23.22%
      BenchmarkEndToEndByteBuffer-16          1257          753           -40.10%
      BenchmarkEndToEndByteBuffer-32          1342          644           -52.01%
      BenchmarkEndToEndArrayByteBuffer        727725        671349        -7.75%
      BenchmarkEndToEndArrayByteBuffer-2      394079        320473        -18.68%
      BenchmarkEndToEndArrayByteBuffer-4      211785        178175        -15.87%
      BenchmarkEndToEndArrayByteBuffer-8      141003        118857        -15.71%
      BenchmarkEndToEndArrayByteBuffer-16     139249        86367         -37.98%
      BenchmarkEndToEndArrayByteBuffer-32     144128        73454         -49.04%
      
      LGTM=r
      R=golang-codereviews, r
      CC=golang-codereviews
      https://golang.org/cl/147720043
      dfd4123e