doc: use 'git-codereview' in contributor docs

Change-Id: I63d5c81fdaf9aca2fc3da3defcc6e9c4094c690b
Reviewed-on: https://go-review.googlesource.com/1742
Reviewed-by: Andrew Gerrand <adg@golang.org>
doc: update source install instructions

Change-Id: I794a5773ed47d470ff91fcdd82f9747a91424eb4
Reviewed-on: https://go-review.googlesource.com/1402
Reviewed-by: Rob Pike <r@golang.org>
doc: fixes to contributor docs

Change-Id: Ib31fb1f8239d8113728bc4c6e411416721571341
Reviewed-on: https://go-review.googlesource.com/1743
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
test: add bug494: test case miscompiled by gccgo

Gccgo incorrectly executed functions multiple times when they appeared
in a composite literal that required a conversion between different
interface types.

Change-Id: I7b40e76ed23fa8440ffa03b262041265c109adf7
Reviewed-on: https://go-review.googlesource.com/1710
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
api: update next.txt

Change-Id: I9eac8b23eb9e6b6940069811177365b4772c2fb1
Reviewed-on: https://go-review.googlesource.com/1513
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/chrome/gophertool: update for the git/gerrit transition

Change-Id: I7b9601ae6e1cfb18ef79a7b189aa7e689c0fe942
Reviewed-on: https://go-review.googlesource.com/1621
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
cmd/gc: fix warning on Plan 9

warning: src/cmd/gc/bits.c:101 non-interruptable temporary

Change-Id: I74661fefab50455b912b8085d913fc45ba13c5c8
Reviewed-on: https://go-review.googlesource.com/1780
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
cmd/gc: remove outdated warning from pre-go1.

People are probably not making this mistake anymore.

Fixes #9164

Change-Id: I86b440ed63d09b4ca676bba7034838860f1a5d8b
Reviewed-on: https://go-review.googlesource.com/1782
Reviewed-by: Minux Ma <minux@golang.org>
liblink: generate correct code for MOVD $-n(Rm), x on ppc64

On ppc64, liblink rewrites MOVD's of >32-bit constants by putting the
constant in memory and rewriting the MOVD to load from that memory
address.  However, there were two bugs in the condition:

a) owing to an incorrect sign extension, it triggered for all negative
   constants, and

b) it could trigger for constant offsets from registers (addresses of
   the form $n(Rm) in assembly)

Together, these meant instructions of the form MOVD $-n(Rm), x were
compiled by putting -n in memory and rewriting the MOVD to load this
constant from memory (completely dropping Rm).

Change-Id: I1f6cc980efa3e3d6f164b46c985b2c3b55971cca
Reviewed-on: https://go-review.googlesource.com/1752
Reviewed-by: Minux Ma <minux@golang.org>
path/filepath: remove named result parameter for VolumeName

Fix style by removing unnecessary named result parameter.

Fix doc comment while here.

Change-Id: If8394e696ab37e00a95484d5137955aa06c59520
Reviewed-on: https://go-review.googlesource.com/1781
Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
cmd/yacc: Prevent index out of range. Fixes #9099.

Change-Id: I7ef01a738b6ca49af1c148146d439c81b0a33b16
Reviewed-on: https://go-review.googlesource.com/1785
Reviewed-by: Ian Lance Taylor <iant@golang.org>
cmd/go: gc never permits C files; gccgo always does

Change-Id: I513665626ec0866f32036c26207dc234c17acea1
Reviewed-on: https://go-review.googlesource.com/1540
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
test: add missing linkx test

This test was added in CL 151000043.
It got lost in CL 144630044.

Change-Id: I318ab11be8e3e7489fc1395457c029c8bdb2aa41
Reviewed-on: https://go-review.googlesource.com/1773
Reviewed-by: Ian Lance Taylor <iant@golang.org>
crypto/tls: enable TLS_FALLBACK_SCSV in server with default max version

Fix TLS_FALLBACK_SCSV check when comparing the client version to the
default max version. This enables the TLS_FALLBACK_SCSV check by default
in servers that do not explicitly set a max version in the tls config.

Change-Id: I5a51f9da6d71b79bc6c2ba45032be51d0f704b5e
Reviewed-on: https://go-review.googlesource.com/1776
Reviewed-by: Adam Langley <agl@golang.org>
crypto/tls: change default minimum version to TLS 1.0.

SSLv3 (the old minimum) is still supported and can be enabled via the
tls.Config, but this change increases the default minimum version to TLS
1.0. This is now common practice in light of the POODLE[1] attack
against SSLv3's CBC padding format.

[1] https://www.imperialviolet.org/2014/10/14/poodle.html

Fixes #9364.

Change-Id: Ibae6666ee038ceee0cb18c339c393155928c6510
Reviewed-on: https://go-review.googlesource.com/1791
Reviewed-by: Minux Ma <minux@golang.org>
runtime: fix a minor typo in comments

Change-Id: I13a8aacd1b8243c992b539ab6bf7b5dff2a1393a
Reviewed-on: https://go-review.googlesource.com/1757
Reviewed-by: Minux Ma <minux@golang.org>
runtime/cgo: guard against redefinition of PTHREAD_KEYS_MAX

Fixes #9374.

Change-Id: Ic53757eba98fc43bcd24e25e03876fef917b4da1
Reviewed-on: https://go-review.googlesource.com/1751
Reviewed-by: David Crawshaw <crawshaw@golang.org>
cmd/gc: resolve static addresses of the form &x.f at link time

When we do y = &x for global variables x and y, y gets initialized
at link time.  Do the same for y = &x.f if x is a struct and y=&x[5]
if x is an array.

fixes #9217
fixes #9355

Change-Id: Iea3c0ce2ce1b309e2b760e345608fd95460b5713
Reviewed-on: https://go-review.googlesource.com/1691
Reviewed-by: Minux Ma <minux@golang.org>
cmd/ld: set ELF ABI version for ppc64x

On ppc64, there are three ELF ABI versions an ELF file can request.
Previously, we used 0, which means "unspecified".  On our test
machines, this meant to use the default (v1 for big endian and v2 for
little endian), but apparently some systems can pick the wrong ABI if
neither is requested.  Leaving this as 0 also confuses libbfd, which
confuses gdb, objdump, etc.

Fix these problems by specifying ABI v1 for big endian and v2 for
little endian.

Change-Id: I4d3d5478f37f11baab3681a07daff3da55802322
Reviewed-on: https://go-review.googlesource.com/1800
Reviewed-by: Minux Ma <minux@golang.org>
liblink: fail for too-large register offset constants

Previously, liblink would silently truncate register offset constants
to 32 bits.  For example,

    MOVD $0x200000004(R2),R3

would assemble to

    addis   r31,r2,0
    addi    r3,r31,4

To fix this, limit C_LACON to 32 bit (signed) offsets and introduce a
new C_DACON operand type for larger register offsets.  We don't
implement this currently, but at least liblink will now give an error
if it encounters an address like this.

Change-Id: I8e87def8cc4cc5b75498b0fb543ac7666cf2964e
Reviewed-on: https://go-review.googlesource.com/1758
Reviewed-by: Minux Ma <minux@golang.org>