<pre class="notranslate">1. What is a short input program that triggers the error?

(compile with -race enabled)

package pdl

var (
      codec1 = codec{newE, "application/pdf"}
      codec2 = codec{newE, "text/plain"}

      availableCodecs = [...]codec{codec1, codec2}
)

type encoder interface{}

type codec struct {
      NewWriter func() encoder
      MimeType  string
}

type E struct{}

func newE() encoder { return new(E) }


2. What is the full compiler output?

./y.go:7: internal compiler error: found non-orig name node availableCodecs

3. What version of the compiler are you using?  (Run it with the -V flag.)

go version go1.3beta2 +e165495e81bf Fri May 23 12:29:29 2014 +1000 linux/amd64</pre>
<pre class="notranslate">What steps will reproduce the problem?
1. Set your $INCLUDE environment variable to be longer than 500 characters.
2. Try to assemble any .s file. (I've been using
$GOROOT/src/pkg/runtime/$GOARCH/asm.s)
3. Get a segmentation fault.

I've reproduced with both 6a and 8a. I'm assuming 5a does the same thing.

Which revision are you using?  (hg identify)
4d7f5eddd695 tip

The problem is due to a buffer overflow in macinc cc/macbody. symb is an
array of 500 characters and it's filled using strcpy without checking the
length of the source. $INCLUDE happens to be one of these sources and it's
easier than you might think to exceed 500 characters -- particularly in cygwin.

There might be other buffer overflows possible in this file through similar
means. There are a number of strcpy calls.</pre>