1. 26 Sep, 2016 15 commits
  2. 25 Sep, 2016 10 commits
  3. 24 Sep, 2016 4 commits
  4. 23 Sep, 2016 7 commits
  5. 22 Sep, 2016 4 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
    • Cherry Zhang's avatar
      test: errorcheck auto-generated functions · d586aae1
      Cherry Zhang authored
      Add an "errorcheckwithauto" action which performs error check
      including lines with auto-generated functions (excluded by
      default). Comment "// ERRORAUTO" matches these lines.
      
      Add testcase for CL 29570 (as an example).
      
      Updates #16016, #17186.
      
      Change-Id: Iaba3727336cd602f3dda6b9e5f97dafe0848e632
      Reviewed-on: https://go-review.googlesource.com/29652
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      d586aae1
    • Cherry Zhang's avatar
      cmd/compile: ensure args are live in tail calls for LR machines · 3dfb92f2
      Cherry Zhang authored
      On link-register machines we uses RET (sym), instead of JMP (sym),
      for tail call (so the assembler knows and may rewrite it to
      restore link register if necessary). Add RET to the analysis.
      
      Fixes #17186.
      Fixes #16016 on link-register machines.
      
      Change-Id: I8690ac57dd9d49beeea76a5f291988e9a1d3afe5
      Reviewed-on: https://go-review.googlesource.com/29570
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      3dfb92f2