<p dir="auto">by <strong>maparent</strong>:</p>
<pre class="notranslate">Tested on MacOS 10.6.2
Reproduce:
cd go/src
export LC_ALL=fr
./make.bash

error:
.../go/bin/quietgcc -ggdb -I"/Users/maparent/OpenSource/go"/include -O2
-fno-inline -c 
".../go/src/cmd/gc"/y1.tab.c
.../go/src/cmd/gc/yerr.h:17: error: 'loadsys' undeclared here (not in a function)

echo $GOOS $GOARCH
darwin amd64

hg identify
52b6d624f245 tip

The problem is simply that bison -v -y -d go.y 
uses locale-specific strings in y.output, which the awk script bisonerror does not
expect.
Solution: set the locale in the make.bash (and related) scripts.</pre>
<pre class="notranslate">go version devel +4a839bf01b58 Tue May 20 15:52:08 2014 +1000 + linux/amd64

Build the attached program and run as:

export GOMAXPROCS=2
export GOGC=0
RES=`./0 2&gt;&amp;1`
OK=`echo $RES | grep "slice capacity smaller than length"`
if [ ! -z "$OK" -a "$OK" != " " ]; then
    echo $RES
        exit 1
fi

Once in a while it crashes as:

bad pointer in frame main.id9 at 0x7f369fadcbf8: 0x1
fatal error: bad pointer in scanbitvector

runtime stack:
runtime.throw(0x4b3d61)
        src/pkg/runtime/panic.c:522 +0x69 fp=0x7f369faf0b20
scanbitvector(0x488790, 0x475b01, 0x7f369fadcbf8, 0x7f369faf0bd8, 0x409301,
0x7f369faf0dc8)
        src/pkg/runtime/mgc0.c:1492 +0x38d fp=0x7f369faf0b88
scanframe(0x7f369faf0c48, 0x7f369faf0dc8)
        src/pkg/runtime/mgc0.c:1618 +0x2d1 fp=0x7f369faf0c00
runtime.gentraceback(0x40f550, 0x7f369fadcb40, 0x0, 0xc208002120, 0x400000000000, 0x0,
0x7fffffff, 0x4099f0, 0x7f369faf0dc8, 0x0)
        src/pkg/runtime/traceback_x86.c:206 +0x413 fp=0x7f369faf0cc8
addstackroots(0xc208002120, 0x7f369faf0dc8)
        src/pkg/runtime/mgc0.c:1688 +0x168 fp=0x7f369faf0d58
markroot(0xc208016900, 0x5)
        src/pkg/runtime/mgc0.c:1321 +0xbe fp=0x7f369faf0dd8
runtime.parfordo(0xc208016900)
        src/pkg/runtime/parfor.c:103 +0x128 fp=0x7f369faf0e50
gc(0x7f369faecf78)
        src/pkg/runtime/mgc0.c:2403 +0x1d6 fp=0x7f369faf0f80
mgc(0xc208002ea0)
        src/pkg/runtime/mgc0.c:2345 +0x2e fp=0x7f369faf0f90
runtime.mcall(0x429be7)
        src/pkg/runtime/asm_amd64.s:181 +0x4b fp=0x7f369faf0fa0</pre>