<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<ol dir="auto">
<li>What version of Go are you using (<code class="notranslate">go version</code>)?</li>
</ol>
<p dir="auto">Go tip.</p>
<ol dir="auto">
<li>What operating system and processor architecture are you using (<code class="notranslate">go env</code>)?</li>
</ol>
<p dir="auto">OS X and Linux on Travis</p>
<ol dir="auto">
<li>What did you do?</li>
</ol>
<p dir="auto">Build Hugo (<a href="https://github.com/spf13/hugo">https://github.com/spf13/hugo</a>).</p>
<p dir="auto">If possible, provide a recipe for reproducing the error.<br>
A complete runnable program is good.<br>
A link on play.golang.org is best.</p>
<p dir="auto">See <a href="https://travis-ci.org/spf13/hugo/builds/121437210" rel="nofollow">https://travis-ci.org/spf13/hugo/builds/121437210</a></p>
<ol dir="auto">
<li>What did you expect to see?</li>
</ol>
<p dir="auto">All green.</p>
<ol dir="auto">
<li>What did you see instead?</li>
</ol>
<p dir="auto">Build fails on Go tip, both OS X and Linux.</p>
<p dir="auto">I tried to see if this is a duplicate of an already reported issue, but it's hard to tell.</p>
<p dir="auto">There is a test failure that I haven't looked into, but then there are these build failures:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="19.35s$ go build -race

# github.com/pkg/sftp

../../pkg/sftp/client.go:829: internal error: (*File).WriteTo autotmp_781 (type *[]byte) recorded as live on entry, p.Pc=10248

# github.com/russross/blackfriday

../../russross/blackfriday/html.go:932: internal error: (*Html).ensureUniqueHeaderID autotmp_747 (type *int) recorded as live on entry, p.Pc=15486"><pre class="notranslate"><code class="notranslate">19.35s$ go build -race

# github.com/pkg/sftp

../../pkg/sftp/client.go:829: internal error: (*File).WriteTo autotmp_781 (type *[]byte) recorded as live on entry, p.Pc=10248

# github.com/russross/blackfriday

../../russross/blackfriday/html.go:932: internal error: (*Html).ensureUniqueHeaderID autotmp_747 (type *int) recorded as live on entry, p.Pc=15486
</code></pre></div>
<p dir="auto">Not sure when these failures started to happen ...</p>
<p dir="auto">This was first reported here <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="145307077" data-permission-text="Title is private" data-url="https://github.com/russross/blackfriday/issues/251" data-hovercard-type="issue" data-hovercard-url="/russross/blackfriday/issues/251/hovercard" href="https://github.com/russross/blackfriday/issues/251">russross/blackfriday#251</a>, but it looks like a Go compiler issue.</p>
<h6 dir="auto">What version of Go are you using (<code class="notranslate">go version</code>)?</h6>
<p dir="auto"><code class="notranslate">go version devel +59fc42b Fri Apr 1 22:23:13 2016 +0000 linux/amd64</code></p>
<h6 dir="auto">What operating system and processor architecture are you using (<code class="notranslate">go env</code>)?</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GOARCH=&quot;amd64&quot;
GOBIN=&quot;&quot;
GOEXE=&quot;&quot;
GOHOSTARCH=&quot;amd64&quot;
GOHOSTOS=&quot;linux&quot;
GOOS=&quot;linux&quot;
GOPATH=&quot;/home/gyuho/go&quot;
GORACE=&quot;&quot;
GOROOT=&quot;/home/gyuho/go-master/go&quot;
GOTOOLDIR=&quot;/home/gyuho/go-master/go/pkg/tool/linux_amd64&quot;
CC=&quot;gcc&quot;
GOGCCFLAGS=&quot;-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build999228004=/tmp/go-build -gno-record-gcc-switches&quot;
CXX=&quot;g++&quot;
CGO_ENABLED=&quot;1&quot;"><pre class="notranslate"><code class="notranslate">GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gyuho/go"
GORACE=""
GOROOT="/home/gyuho/go-master/go"
GOTOOLDIR="/home/gyuho/go-master/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build999228004=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
</code></pre></div>
<h6 dir="auto">What did you do?</h6>
<p dir="auto">I just run <code class="notranslate">go build -race</code> to reproduce:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package sample

type Html struct {
    headerIDs map[string]int
}

func (options *Html) header(id string) string {
    for count, found := options.headerIDs[id]; found; count, found = options.headerIDs[id] {
        _ = count
    }
    return &quot;&quot;
}"><pre class="notranslate"><span class="pl-k">package</span> sample

<span class="pl-k">type</span> <span class="pl-smi">Html</span> <span class="pl-k">struct</span> {
    <span class="pl-c1">headerIDs</span> <span class="pl-k">map</span>[<span class="pl-smi">string</span>]<span class="pl-smi">int</span>
}

<span class="pl-k">func</span> (<span class="pl-s1">options</span> <span class="pl-c1">*</span><span class="pl-smi">Html</span>) <span class="pl-en">header</span>(<span class="pl-s1">id</span> <span class="pl-smi">string</span>) <span class="pl-smi">string</span> {
    <span class="pl-k">for</span> <span class="pl-s1">count</span>, <span class="pl-s1">found</span> <span class="pl-c1">:=</span> <span class="pl-s1">options</span>.<span class="pl-c1">headerIDs</span>[<span class="pl-s1">id</span>]; <span class="pl-s1">found</span>; <span class="pl-s1">count</span>, <span class="pl-s1">found</span> <span class="pl-c1">=</span> <span class="pl-s1">options</span>.<span class="pl-c1">headerIDs</span>[<span class="pl-s1">id</span>] {
        <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">count</span>
    }
    <span class="pl-k">return</span> <span class="pl-s">""</span>
}</pre></div>
<h6 dir="auto">What did you expect to see?</h6>
<p dir="auto">No error message.</p>
<h6 dir="auto">What did you see instead?</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./sample.go:7: internal error: (*Html).header autotmp_3 (type *int) recorded as live on entry, p.Pc=0"><pre class="notranslate"><code class="notranslate">./sample.go:7: internal error: (*Html).header autotmp_3 (type *int) recorded as live on entry, p.Pc=0
</code></pre></div>
<p dir="auto">Thank you all!</p>