1. 26 Sep, 2016 17 commits
  2. 25 Sep, 2016 10 commits
  3. 24 Sep, 2016 4 commits
  4. 23 Sep, 2016 7 commits
  5. 22 Sep, 2016 2 commits
    • Ian Lance Taylor's avatar
      cmd/compile: don't instrument copy and append in runtime · 9d8522fd
      Ian Lance Taylor authored
      Instrumenting copy and append for the race detector changes them to call
      different functions. In the runtime package the alternate functions are
      not marked as nosplit. This caused a crash in the SIGPROF handler when
      invoked on a non-Go thread in a program built with the race detector. In
      some cases the handler can call copy, the race detector changed that to
      a call to a non-nosplit function, the function tried to check the stack
      guard, and crashed because it was running on a non-Go thread. The
      SIGPROF handler is written carefully to avoid such problems, but hidden
      function calls are difficult to avoid.
      
      Fix this by changing the compiler to not instrument copy and append when
      compiling the runtime package. Change the runtime package to add
      explicit race checks for the only code I could find where copy is used
      to write to user data (append is never used).
      
      Change-Id: I11078a66c0aaa459a7d2b827b49f4147922050af
      Reviewed-on: https://go-review.googlesource.com/29472
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
      9d8522fd
    • Keith Randall's avatar
      cmd/compile: fix type of static closure pointer · 88d2f911
      Keith Randall authored
        var x *X = ...
        defer x.foo()
      
      As part of the defer, we need to calculate &(*X).foo·f.  This expression
      is the address of the static closure that will call (*X).foo when a
      pointer to that closure is used in a call/defer/go.  This pointer is not
      currently properly typed in SSA.  It is a pointer type, but the base
      type is nil, not a proper type.
      
      This turns out not to be a problem currently because we never use the
      type of these SSA values.  But I'm trying to change that (to be able to
      spill them) in CL 28391.  To fix, use uint8 as the fake type of the
      closure.
      
      Change-Id: Ieee388089c9af398ed772ee8c815122c347cb633
      Reviewed-on: https://go-review.googlesource.com/29444
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      88d2f911