]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agoA+C: fixed doubled entry
Rob Pike [Wed, 30 Jul 2014 00:18:00 +0000 (17:18 -0700)]
A+C: fixed doubled entry
Delete an erroneously doubled name in both files. Once is enough.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/118420043

10 years agofmt: measure width in runes not bytes with %c and %q for ints
Mihai Borobocea [Tue, 29 Jul 2014 23:46:53 +0000 (16:46 -0700)]
fmt: measure width in runes not bytes with %c and %q for ints

This is meant to share my progress on Issue 8275, if it's useful to you. I'm not familiar with the formatter's internals, so this change is likely naive.

Change these calls to measure width in runes not bytes:
fmt.Printf("(%5q)\n", '§')
fmt.Printf("(%3c)\n", '§')

 Fixes #8275.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/104320043

10 years agocmd/gc: don't allow escaping arguments in the runtime package.
Keith Randall [Tue, 29 Jul 2014 21:38:08 +0000 (14:38 -0700)]
cmd/gc: don't allow escaping arguments in the runtime package.

This is a case that was missed in https://golang.org/cl/105280047/

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/120910043

10 years agoA+C: Mihai Borobocea (individual CLA)
Rob Pike [Tue, 29 Jul 2014 20:34:47 +0000 (13:34 -0700)]
A+C: Mihai Borobocea (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/115370044

10 years agoruntime: generate type info for chans
Dmitriy Vyukov [Tue, 29 Jul 2014 18:06:47 +0000 (22:06 +0400)]
runtime: generate type info for chans

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, khr
https://golang.org/cl/115280043

10 years agoruntime: verify hmap type size
Dmitriy Vyukov [Tue, 29 Jul 2014 18:06:20 +0000 (22:06 +0400)]
runtime: verify hmap type size

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, khr
https://golang.org/cl/114510044

10 years agoruntime: mark global var as NOPTR
Dmitriy Vyukov [Tue, 29 Jul 2014 11:18:01 +0000 (15:18 +0400)]
runtime: mark global var as NOPTR

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/120280044

10 years agoruntime: mark global var as NOPTR
Dmitriy Vyukov [Tue, 29 Jul 2014 10:45:07 +0000 (14:45 +0400)]
runtime: mark global var as NOPTR

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/119300043

10 years agonet: prevent spurious on-connect events via epoll on linux
Mikio Hara [Tue, 29 Jul 2014 07:48:11 +0000 (16:48 +0900)]
net: prevent spurious on-connect events via epoll on linux

On Linux, adding a socket descriptor to epoll instance before getting
the EINPROGRESS return value from connect system call could be a root
cause of spurious on-connect events.

See golang.org/issue/8276, golang.org/issue/8426 for further information.

All credit to Jason Eggleston <jason@eggnet.com>

Fixes #8276.
Fixes #8426.

LGTM=dvyukov
R=dvyukov, golang-codereviews, adg, dave, iant, alex.brainman
CC=golang-codereviews
https://golang.org/cl/120820043

10 years agocmd/ld: better diagnostics on unaligned symbols
Dmitriy Vyukov [Tue, 29 Jul 2014 07:22:57 +0000 (11:22 +0400)]
cmd/ld: better diagnostics on unaligned symbols
Want to see why builders are failing.
Then decide whether to rollback or fix.

TBR=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/114510043

10 years agoruntime: simpler and faster GC
Dmitriy Vyukov [Tue, 29 Jul 2014 07:01:02 +0000 (11:01 +0400)]
runtime: simpler and faster GC

Implement the design described in:
https://docs.google.com/document/d/1v4Oqa0WwHunqlb8C3ObL_uNQw3DfSY-ztoA-4wWbKcg/pub

Summary of the changes:
GC uses "2-bits per word" pointer type info embed directly into bitmap.
Scanning of stacks/data/heap is unified.
The old spans types go away.
Compiler generates "sparse" 4-bits type info for GC (directly for GC bitmap).
Linker generates "dense" 2-bits type info for data/bss (the same as stacks use).

Summary of results:
-1680 lines of code total (-1000+ in mgc0.c only)
-25% memory consumption
-3-7% binary size
-15% GC pause reduction
-7% run time reduction

LGTM=khr
R=golang-codereviews, rsc, christoph, khr
CC=golang-codereviews, rlh
https://golang.org/cl/106260045

10 years agoimage/png: use branch-free abs function
Rui Ueyama [Tue, 29 Jul 2014 04:29:14 +0000 (14:29 +1000)]
image/png: use branch-free abs function

benchmark                        old ns/op     new ns/op     delta
BenchmarkPaeth                   5.06          6.02          +18.97%
BenchmarkDecodeGray              1010551       956911        -5.31%
BenchmarkDecodeNRGBAGradient     3877813       3754160       -3.19%
BenchmarkDecodeNRGBAOpaque       3194058       3079094       -3.60%
BenchmarkDecodePaletted          699243        700211        +0.14%
BenchmarkDecodeRGB               2835733       2692120       -5.06%
BenchmarkDecodeInterlacing       3651805       3563124       -2.43%
BenchmarkEncodeGray              4399183       4404113       +0.11%
BenchmarkEncodeNRGBOpaque        13323627      13306485      -0.13%
BenchmarkEncodeNRGBA             15840092      15751188      -0.56%
BenchmarkEncodePaletted          4396622       4404373       +0.18%
BenchmarkEncodeRGBOpaque         13320475      13279189      -0.31%
BenchmarkEncodeRGBA              36898392      36781002      -0.32%

LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/117290043

10 years agotime: make it clearer that the reference time is the reference time.
Rob Pike [Tue, 29 Jul 2014 00:24:39 +0000 (17:24 -0700)]
time: make it clearer that the reference time is the reference time.
Because the reference time is the reference time but beginners seem
to think otherwise, make it clearer you can't choose the reference time.

LGTM=josharian, dave
R=golang-codereviews, josharian, dave
CC=golang-codereviews
https://golang.org/cl/117250044

10 years agocrypto/tls: check curve equation in ECDHE.
Adam Langley [Mon, 28 Jul 2014 22:46:27 +0000 (15:46 -0700)]
crypto/tls: check curve equation in ECDHE.

This change causes a TLS client and server to verify that received
elliptic curve points are on the expected curve. This isn't actually
necessary in the Go TLS stack, but Watson Ladd has convinced me that
it's worthwhile because it's pretty cheap and it removes the
possibility that some change in the future (e.g. tls-unique) will
depend on it without the author checking that precondition.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/115290046

10 years agoencoding/asn1: only omit optional elements matching default value.
Adam Langley [Mon, 28 Jul 2014 21:47:37 +0000 (14:47 -0700)]
encoding/asn1: only omit optional elements matching default value.

ASN.1 elements can be optional, and can have a default value.
Traditionally, Go has omitted elements that are optional and that have
the zero value. I believe that's a bug (see [1]).

This change causes an optional element with a default value to only be
omitted when it has that default value. The previous behaviour of
omitting optional, zero elements with no default is retained because
it's used quite a lot and will break things if changed.

[1] https://groups.google.com/d/msg/Golang-nuts/9Ss6o9CW-Yo/KL_V7hFlyOAJ

Fixes #7780.

R=bradfitz

LGTM=bradfitz
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews, r
https://golang.org/cl/86960045

10 years agocrypto/tls: Support ECDSA keys in generate_cert.go
Asim Shankar [Mon, 28 Jul 2014 21:46:34 +0000 (14:46 -0700)]
crypto/tls: Support ECDSA keys in generate_cert.go

R=golang-codereviews, bradfitz, agl
CC=golang-codereviews
https://golang.org/cl/117180043

10 years agonet/http: make ServeContent support dates in If-Range headers
Brad Fitzpatrick [Mon, 28 Jul 2014 06:30:53 +0000 (23:30 -0700)]
net/http: make ServeContent support dates in If-Range headers

Fixes #8367

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/116300044

10 years agoliblink: warn about TLS base MRC instruction that does not write into R0.
Shenghou Ma [Sat, 26 Jul 2014 21:46:51 +0000 (17:46 -0400)]
liblink: warn about TLS base MRC instruction that does not write into R0.

While we're here, make it lookup the tlsfallback symbol only once.

LGTM=crawshaw
R=golang-codereviews, crawshaw, dave
CC=golang-codereviews
https://golang.org/cl/107430044

10 years agocmd/ld: remove duplicated nuxiinit() call.
Shenghou Ma [Sat, 26 Jul 2014 21:45:45 +0000 (17:45 -0400)]
cmd/ld: remove duplicated nuxiinit() call.

It is already called by linknew().

LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/120760043

10 years agocmd/5g: remove dead code.
Shenghou Ma [Sat, 26 Jul 2014 21:45:24 +0000 (17:45 -0400)]
cmd/5g: remove dead code.

LGTM=bradfitz, dave
R=rsc, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/115070043

10 years agocmd/5l: remove unused noop.c
Shenghou Ma [Sat, 26 Jul 2014 21:44:47 +0000 (17:44 -0400)]
cmd/5l: remove unused noop.c

LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/116330043

10 years agocmd/5l, cmd/6l, cmd/8l: remove mkenam.
Shenghou Ma [Sat, 26 Jul 2014 21:43:10 +0000 (17:43 -0400)]
cmd/5l, cmd/6l, cmd/8l: remove mkenam.

Unused. cmd/dist will generate enams as liblink/anames[568].c.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/119940043

10 years agoruntime: convert complex128div to go.
Keith Randall [Fri, 25 Jul 2014 22:12:45 +0000 (15:12 -0700)]
runtime: convert complex128div to go.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/116320043

10 years agoinclude/u.h: define _DEFAULT_SOURCE for new glibc
Bobby Powers [Fri, 25 Jul 2014 15:54:09 +0000 (08:54 -0700)]
include/u.h: define _DEFAULT_SOURCE for new glibc

glibc devs have apparently decided _BSD_SOURCE will be
deprecated on Linux, and issue a preprocessor warning if
declaring _BSD_SOURCE without _DEFAULT_SOURCE.

https://sourceware.org/glibc/wiki/Release/2.20

Fixes #8397.

LGTM=iant
R=dave, gobot, iant
CC=golang-codereviews
https://golang.org/cl/112530043

10 years agocmd/gc: don't mark select descriptor as EscNone
Bobby Powers [Fri, 25 Jul 2014 07:22:58 +0000 (11:22 +0400)]
cmd/gc: don't mark select descriptor as EscNone

selv is created with temp() which calls tempname, which marks
the new n with EscNever, so there is no need to explicitly set
EscNone on the select descriptor.

Fixes #8396.

LGTM=dvyukov
R=golang-codereviews, dave, dvyukov
CC=golang-codereviews
https://golang.org/cl/112520043

10 years agosyscall: fix handling of bool return values in mksyscall_windows.go
Alex Brainman [Fri, 25 Jul 2014 05:13:59 +0000 (15:13 +1000)]
syscall: fix handling of bool return values in mksyscall_windows.go

LGTM=chines
R=chines
CC=golang-codereviews
https://golang.org/cl/118160044

10 years agodoc: drop scheme from links that are known to support HTTPS
Andrew Gerrand [Fri, 25 Jul 2014 00:28:39 +0000 (10:28 +1000)]
doc: drop scheme from links that are known to support HTTPS

golang.org now serves HTTPS with a valid cert, so it's reasonable
that users should click through to the HTTPS versions of *.golang.org
and other known sites.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112650043

10 years agotime: minor typo in doc
Mathieu Lonjaret [Thu, 24 Jul 2014 22:18:41 +0000 (18:18 -0400)]
time: minor typo in doc

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/120150043

10 years agoruntime: set sweepgen atomically before updating span state
Keith Randall [Thu, 24 Jul 2014 21:37:34 +0000 (14:37 -0700)]
runtime: set sweepgen atomically before updating span state

Sweepone may be running while a new span is allocating.  It
must not see the state updated while the sweepgen is unset.

Fixes #8399

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/118050043

10 years agotest/run: always set goos and goarch
David du Colombier [Thu, 24 Jul 2014 21:18:54 +0000 (23:18 +0200)]
test/run: always set goos and goarch

Following CL 68150047, the goos and goarch
variables are not currently set when the GOOS
and GOARCH environment variables are not set.

This made the content of the build tag to be
ignored in this case.

This CL sets goos and goarch to runtime.GOOS
and runtime.GOARCH when the GOOS and GOARCH
environments variables are not set.

LGTM=aram, bradfitz
R=golang-codereviews, aram, gobot, rsc, dave, bradfitz
CC=golang-codereviews, rsc
https://golang.org/cl/112490043

10 years agonet/http: don't ignore errors in Request.Write
Brad Fitzpatrick [Thu, 24 Jul 2014 01:38:13 +0000 (18:38 -0700)]
net/http: don't ignore errors in Request.Write

LGTM=josharian, adg
R=golang-codereviews, josharian, adg
CC=golang-codereviews
https://golang.org/cl/119110043

10 years agomisc/pprof: support web profiles on windows/MinGW
ChaiShushan [Wed, 23 Jul 2014 17:35:04 +0000 (10:35 -0700)]
misc/pprof: support web profiles on windows/MinGW

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/117060043

10 years agoruntime: don't lock mheap on user goroutine
Dmitriy Vyukov [Wed, 23 Jul 2014 14:52:25 +0000 (18:52 +0400)]
runtime: don't lock mheap on user goroutine
This is bad for 2 reasons:
1. if the code under lock ever grows stack,
it will deadlock as stack growing acquires mheap lock.
2. It currently deadlocks with SetCPUProfileRate:
scavenger locks mheap, receives prof signal and tries to lock prof lock;
meanwhile SetCPUProfileRate locks prof lock and tries to grow stack
(presumably in runtime.unlock->futexwakeup). Boom.
Let's assume that it
Fixes #8407.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, khr
https://golang.org/cl/112640043

10 years agoruntime: fix unexpected return pc for runtime.newstackcall
Dmitriy Vyukov [Wed, 23 Jul 2014 14:51:34 +0000 (18:51 +0400)]
runtime: fix unexpected return pc for runtime.newstackcall
With cl/112640043 TestCgoDeadlockCrash episodically print:
unexpected return pc for runtime.newstackcall
After adding debug output I see the following trace:

runtime: unexpected return pc for runtime.newstackcall called from 0xc208011b00
runtime.throw(0x414da86)
        src/pkg/runtime/panic.c:523 +0x77
runtime.gentraceback(0x40165fc, 0xba440c28, 0x0, 0xc208d15200, 0xc200000000, 0xc208ddfd20, 0x20, 0x0, 0x0, 0x300)
src/pkg/runtime/traceback_x86.c:185 +0xca4
runtime.callers(0x1, 0xc208ddfd20, 0x20)
src/pkg/runtime/traceback_x86.c:438 +0x98
mcommoninit(0xc208ddfc00)
src/pkg/runtime/proc.c:369 +0x5c
runtime.allocm(0xc208052000)
src/pkg/runtime/proc.c:686 +0xa6
newm(0x4017850, 0xc208052000)
src/pkg/runtime/proc.c:933 +0x27
startm(0xc208052000, 0x100000001)
src/pkg/runtime/proc.c:1011 +0xba
wakep()
src/pkg/runtime/proc.c:1071 +0x57
resetspinning()
src/pkg/runtime/proc.c:1297 +0xa1
schedule()
src/pkg/runtime/proc.c:1366 +0x14b
runtime.gosched0(0xc20808e240)
src/pkg/runtime/proc.c:1465 +0x5b
runtime.newstack()
src/pkg/runtime/stack.c:891 +0x44d
runtime: unexpected return pc for runtime.newstackcall called from 0xc208011b00
runtime.newstackcall(0x4000cbd, 0x4000b80)
src/pkg/runtime/asm_amd64.s:278 +0x6f

I suspect that it can happen on any stack split.
So don't unwind g0 stack.
Also, that comment is lying -- we can traceback w/o mcache,
CPU profiler does that.

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://golang.org/cl/120040043

10 years agoliblink: more precise literal word comparison on arm
Russ Cox [Wed, 23 Jul 2014 14:17:59 +0000 (10:17 -0400)]
liblink: more precise literal word comparison on arm

There are fields in the Addr that do not matter for the
purpose of deciding that the same word is already
in the current literal pool. Copy only the fields that
do matter.

This came up when comparing against the Go version
because the way it is invoked doesn't copy a few fields
(like node) that are never directly used by liblink itself.

Also remove a stray print that is not well-defined in
the new liblink. (Cannot use %D outside of %P, because
%D needs the outer Prog*.)

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/119000043

10 years agolib9: format %#04x, 0 as 0x0000 not 000000.
Russ Cox [Wed, 23 Jul 2014 14:17:47 +0000 (10:17 -0400)]
lib9: format %#04x, 0 as 0x0000 not 000000.

This matches Go's fmt.Printf instead of ANSI C's dumb rules.
It makes the -S output from C liblink match Go's liblink.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/112600043

10 years agocmd/gc: mark auxiliary symbols as containing no pointers
Dmitriy Vyukov [Wed, 23 Jul 2014 13:36:10 +0000 (17:36 +0400)]
cmd/gc: mark auxiliary symbols as containing no pointers
They do not, but pretend that they do.
The immediate need is that it breaks the new GC because
these are weird symbols as if with pointers but not necessary
pointer aligned.

LGTM=rsc
R=golang-codereviews, dave, josharian, khr, rsc
CC=golang-codereviews, iant, khr, rlh
https://golang.org/cl/116060043

10 years agodoc/go1.4.txt: windows can do symlinks now
Alex Brainman [Wed, 23 Jul 2014 06:36:29 +0000 (16:36 +1000)]
doc/go1.4.txt: windows can do symlinks now

R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/111560043

10 years agotesting: add Coverage function
Russ Cox [Wed, 23 Jul 2014 02:56:35 +0000 (22:56 -0400)]
testing: add Coverage function

I've found this very useful for generating
good test case lists for -short mode for
the disassemblers.

Fixes #7959.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/98150043

10 years agosyscall: allow for mksyscall_windows.go to be used outside of syscall
Alex Brainman [Wed, 23 Jul 2014 02:36:34 +0000 (12:36 +1000)]
syscall: allow for mksyscall_windows.go to be used outside of syscall

Fixes #8398.

LGTM=chines
R=golang-codereviews, chines, josharian
CC=golang-codereviews
https://golang.org/cl/114140043

10 years agoruntime: rename throwgo to gothrow
Dave Cheney [Tue, 22 Jul 2014 21:08:52 +0000 (07:08 +1000)]
runtime: rename throwgo to gothrow

As pointed out by Elias Naur, the convention for Go runtime functions means this function should be named gothrow.

Discussion: https://golang.org/cl/115860045/#msg6

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/118120043

10 years agocmd/ld: mark hostobj sections as containing no pointers
Dmitriy Vyukov [Tue, 22 Jul 2014 08:10:18 +0000 (12:10 +0400)]
cmd/ld: mark hostobj sections as containing no pointers
Currently they are scanned conservatively.
But there is no reason to scan them. C world must not contain
pointers into Go heap. Moreover, we don't have enough information
to emit write barriers nor update pointers there in future.
The immediate need is that it breaks the new GC because
these are weird symbols as if with pointers but not necessary
pointer aligned.

LGTM=rsc
R=golang-codereviews, rlh, rsc
CC=golang-codereviews, iant, khr
https://golang.org/cl/117000043

10 years agoruntime: make go vet happy
Keith Randall [Tue, 22 Jul 2014 04:35:48 +0000 (21:35 -0700)]
runtime: make go vet happy

CL 117950044 updates vet to fix LEA* issue.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112440043

10 years agocmd/gc: in the runtime package, don't promote any decls to the heap.
Keith Randall [Tue, 22 Jul 2014 03:56:44 +0000 (20:56 -0700)]
cmd/gc: in the runtime package, don't promote any decls to the heap.

In the runtime, we want to control where allocations happen.
In particular, we don't want the code implementing malloc to
itself trigger a malloc.  This change prevents the compiler
from inserting mallocs on our behalf (due to escaping declarations).

This check does not trigger on the current runtime code.

Note: Composite literals are still allowed.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/105280047

10 years agoruntime: keep build version around in binaries
Keith Randall [Tue, 22 Jul 2014 03:52:11 +0000 (20:52 -0700)]
runtime: keep build version around in binaries

So we can tell from a binary which version of
Go built it.

LGTM=minux, rsc
R=golang-codereviews, minux, khr, rsc, dave
CC=golang-codereviews
https://golang.org/cl/117040043

10 years agosyscall: fix typo in namei doc comment.
David Symonds [Tue, 22 Jul 2014 00:09:32 +0000 (10:09 +1000)]
syscall: fix typo in namei doc comment.

LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/112420044

10 years agocrypto/subtle: make ConstantTimeCompare return zero for args of different length.
David Symonds [Tue, 22 Jul 2014 00:08:23 +0000 (10:08 +1000)]
crypto/subtle: make ConstantTimeCompare return zero for args of different length.

This is more useful than panicking, since otherwise every caller needs
to do the length check before calling; some will forget, and have a
potential submarine crasher as a result. Other implementations of this
functionality do a length check.

This is backward compatible, except if someone has written code that
relies on this panicking with different length args. However, that was
not the case before Go 1.3 either.

Updates #7304.

LGTM=agl
R=agl, minux, hanwen
CC=golang-codereviews
https://golang.org/cl/118750043

10 years agoruntime: pass correct size to malloc
Dmitriy Vyukov [Mon, 21 Jul 2014 21:56:19 +0000 (01:56 +0400)]
runtime: pass correct size to malloc
In both cases we lie to malloc about the actual size that we need.
In panic we ask for less memory than we are going to use.
In slice we ask for more memory than we are going to use
(potentially asking for a fractional number of elements).
This breaks the new GC.

LGTM=khr
R=golang-codereviews, dave, khr
CC=golang-codereviews, rsc
https://golang.org/cl/116940043

10 years agoruntime: simplify code
Dmitriy Vyukov [Mon, 21 Jul 2014 21:56:01 +0000 (01:56 +0400)]
runtime: simplify code

LGTM=khr
R=golang-codereviews, dave, khr
CC=golang-codereviews, rsc
https://golang.org/cl/116950043

10 years agoliblink: remove some gotos + other fixes
Russ Cox [Mon, 21 Jul 2014 21:38:48 +0000 (17:38 -0400)]
liblink: remove some gotos + other fixes

Rewrite gotos that violate Go's stricter rules.
Use uchar* instead of char* in a few places that aren't strings.
Remove dead opcross code from asm5.c.
Declare regstr (in both list6 and list8) static.

LGTM=minux, dave
R=minux, dave
CC=golang-codereviews
https://golang.org/cl/113230043

10 years agoruntime: round gohash stack frame to multiple of 8 on amd64p32
Russ Cox [Mon, 21 Jul 2014 21:38:30 +0000 (17:38 -0400)]
runtime: round gohash stack frame to multiple of 8 on amd64p32

Even though pointers are 4 bytes the stack frame should be kept
a multiple of 8 bytes so that return addresses pushed on the stack
are properly aligned.

Fixes #8379.

LGTM=dvyukov, minux
R=minux, bradfitz, dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/115840048

10 years agonet/http: create internal pkg, unify two chunked.go files
Brad Fitzpatrick [Mon, 21 Jul 2014 19:18:14 +0000 (12:18 -0700)]
net/http: create internal pkg, unify two chunked.go files

LGTM=rsc
R=rsc, dan.kortschak
CC=golang-codereviews, r
https://golang.org/cl/115840046

10 years agocmd/api: ignore internal packages
Brad Fitzpatrick [Mon, 21 Jul 2014 19:06:30 +0000 (12:06 -0700)]
cmd/api: ignore internal packages

We might want to add a go/build.IsInternal(pkg string) bool
later, but this works for now.

LGTM=dave, rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/113300044

10 years agoruntime: add Benchmark[Clear|Copy]Fat[8|12]
Josh Bleecher Snyder [Mon, 21 Jul 2014 18:23:29 +0000 (11:23 -0700)]
runtime: add Benchmark[Clear|Copy]Fat[8|12]

These correspond to 2 and 3 word fat copies/clears on 8g, which dominate usage in the stdlib. (70% of copies and 46% of clears are for 2 or 3 words.) I missed these in CL 111350043, which added 2 and 3 word benchmarks for 6g. A follow-up CL will optimize these cases.

LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/115160043

10 years agomake.bat: do not exit builder on successful completion of make.bat (fixes build)
Alex Brainman [Mon, 21 Jul 2014 06:29:38 +0000 (16:29 +1000)]
make.bat: do not exit builder on successful completion of make.bat (fixes build)

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/118020043

10 years agotest: avoid "declared but not used" errors in shift1.go
Ian Lance Taylor [Sun, 20 Jul 2014 19:25:24 +0000 (12:25 -0700)]
test: avoid "declared but not used" errors in shift1.go

I'm improving gccgo's detection of variables that are only set
but not used, and it triggers additional errors on this code.
The new gccgo errors are correct; gc seems to suppress them
due to the other, expected, errors.  This change uses the
variables so that no compiler will complain.

gccgo change is https://golang.org/cl/119920043 .

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/116050043

10 years agotest: add test for confusion with dot imports
Ian Lance Taylor [Sun, 20 Jul 2014 17:28:51 +0000 (10:28 -0700)]
test: add test for confusion with dot imports

The gccgo compiler would fail this test.  The fix for gccgo is
https://golang.org/cl/116960043 .

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/118000043

10 years agocmd/gc: do not mark PC as pointer on stack
Dmitriy Vyukov [Sun, 20 Jul 2014 14:52:46 +0000 (18:52 +0400)]
cmd/gc: do not mark PC as pointer on stack
GC thinks that it's an invalid pointer on plan9:
http://build.golang.org/log/f7da638a20544ef7f45e81f23fdbc4875044c296

LGTM=0intro
R=golang-codereviews, 0intro
CC=aram, golang-codereviews
https://golang.org/cl/113350043

10 years agocmd/gc: allocate select descriptor on stack
Dmitriy Vyukov [Sun, 20 Jul 2014 11:07:10 +0000 (15:07 +0400)]
cmd/gc: allocate select descriptor on stack

benchmark                      old ns/op     new ns/op     delta
BenchmarkSelectUncontended     220           165           -25.00%
BenchmarkSelectContended       209           161           -22.97%
BenchmarkSelectProdCons        1042          904           -13.24%

But more importantly this change will allow
to get rid of free function in runtime.

Fixes #6494.

LGTM=rsc, khr
R=golang-codereviews, rsc, dominik.honnef, khr
CC=golang-codereviews, remyoudompheng
https://golang.org/cl/107670043

10 years agosync/atomic: fix data races in tests
Dmitriy Vyukov [Sun, 20 Jul 2014 10:59:19 +0000 (14:59 +0400)]
sync/atomic: fix data races in tests
Fixes #8389.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/111320044

10 years agobuild: be verbose when running tests on Plan 9
Anthony Martin [Sun, 20 Jul 2014 10:14:53 +0000 (13:14 +0300)]
build: be verbose when running tests on Plan 9

This is a temporary change to see how far the
builder gets when it times out.

LGTM=aram, 0intro
R=0intro, aram
CC=golang-codereviews, mischief
https://golang.org/cl/111400043

10 years agoruntime: fix stacks_sys accounting
Keith Randall [Sat, 19 Jul 2014 17:29:57 +0000 (10:29 -0700)]
runtime: fix stacks_sys accounting

subtract freed count before span gets merged during free.

LGTM=dvyukov
R=dmitry, dvyukov
CC=golang-codereviews
https://golang.org/cl/112450045

10 years agocmd/addr2line, cmd/objdump: fix on amd64 Plan 9
David du Colombier [Sat, 19 Jul 2014 09:16:16 +0000 (12:16 +0300)]
cmd/addr2line, cmd/objdump: fix on amd64 Plan 9

Fix virtual address of the start of the text segment
on amd64 Plan 9.

This issue has been partially fixed in cmd/add2line,
as part of CL 106460044, but we forgot to report the
change to cmd/objdump.

In the meantime, we also fixed the textStart address
in both cmd/add2line and cmd/objdump.

LGTM=aram, ality, mischief
R=rsc, mischief, aram, ality
CC=golang-codereviews, jas
https://golang.org/cl/117920043

10 years agotest: add some tests for mismatches between call results and uses
Ian Lance Taylor [Sat, 19 Jul 2014 08:12:42 +0000 (01:12 -0700)]
test: add some tests for mismatches between call results and uses

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/111360045

10 years agocodereview: abort 'hg commit' before entering commit message.
Shenghou Ma [Sat, 19 Jul 2014 01:04:56 +0000 (21:04 -0400)]
codereview: abort 'hg commit' before entering commit message.

Hook pre-commit runs before 'hg commit' command whereas hook precommit runs
after the user has entered commit message.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/106320043

10 years agocodereview: revive the tests.
Shenghou Ma [Sat, 19 Jul 2014 01:00:35 +0000 (21:00 -0400)]
codereview: revive the tests.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/105500043

10 years agotest: add test for issue8347
Shenghou Ma [Sat, 19 Jul 2014 00:59:55 +0000 (20:59 -0400)]
test: add test for issue8347

Fixes #8347.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/109600044

10 years agoruntime: use uint32 arrays in BenchmarkClearFat*
Josh Bleecher Snyder [Fri, 18 Jul 2014 19:41:20 +0000 (12:41 -0700)]
runtime: use uint32 arrays in BenchmarkClearFat*

The CopyFat benchmarks were changed in CL 92760044. See CL 111350043 for discussion.

LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/116000043

10 years agoruntime: add Benchmark[Clear|Copy]Fat[16|24]
Josh Bleecher Snyder [Fri, 18 Jul 2014 19:18:36 +0000 (12:18 -0700)]
runtime: add Benchmark[Clear|Copy]Fat[16|24]

These benchmarks are important for performance. When compiling the stdlib:

* 77.1% of the calls to sgen (copyfat) are for 16 bytes; another 8.7% are for 24 bytes. (The next most common is 32 bytes, at 5.7%.)
* Over half the calls to clearfat are for 16 or 24 bytes.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews
https://golang.org/cl/111350043

10 years agoos: broaden the range of errors understood by IsNotExist on Plan 9
Nicolas Owens [Fri, 18 Jul 2014 18:04:29 +0000 (11:04 -0700)]
os: broaden the range of errors understood by IsNotExist on Plan 9

Ken's standalone file server and its derivatives, like cwfs, return
error strings different from fossil when the user opens non-existent
files.

LGTM=aram, 0intro, r
R=0intro, aram, r
CC=golang-codereviews, ken
https://golang.org/cl/112420045

10 years agogo/ast: fix typo in comment
Josh Bleecher Snyder [Fri, 18 Jul 2014 16:58:54 +0000 (09:58 -0700)]
go/ast: fix typo in comment

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/111330043

10 years agobufio: fix UnreadSlice followed by UnreadRune
Egon Elbre [Fri, 18 Jul 2014 16:25:59 +0000 (09:25 -0700)]
bufio: fix UnreadSlice followed by UnreadRune

Also, fix a write check in writeBuf and make some bounds checks simpler.

LGTM=gri
R=golang-codereviews, adg, gri, r, minux
CC=golang-codereviews
https://golang.org/cl/113060043

10 years agoA+C: add Xia Bin (individual CLA)
Russ Cox [Fri, 18 Jul 2014 16:04:39 +0000 (12:04 -0400)]
A+C: add Xia Bin (individual CLA)

This CLA replaces the one for 'snyh'.
Verified by hand.

LGTM=minux
R=iant, minux
CC=golang-codereviews
https://golang.org/cl/112420043

10 years agoruntime: fix gctrace=1
Keith Randall [Fri, 18 Jul 2014 09:05:21 +0000 (13:05 +0400)]
runtime: fix gctrace=1

updatememstats is called on both the m and g stacks.
Call into flushallmcaches correctly.  flushallmcaches
can only run on the M stack.

This is somewhat temporary.  once ReadMemStats is in
Go we can have all of this code M-only.

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/116880043

10 years agogo/printer: simplify test
Dmitriy Vyukov [Fri, 18 Jul 2014 08:44:24 +0000 (12:44 +0400)]
go/printer: simplify test
Pre Go1?

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/115870043

10 years agoencoding/gob: remove unnecessary receivers
Dmitriy Vyukov [Fri, 18 Jul 2014 08:39:00 +0000 (12:39 +0400)]
encoding/gob: remove unnecessary receivers
Encoder compilation must be enc-independent,
because the resulting program is reused across
different encoders.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/115860043

10 years agoundo CL 109640045 / f97fb06525e5
Shenghou Ma [Fri, 18 Jul 2014 06:59:54 +0000 (02:59 -0400)]
undo CL 109640045 / f97fb06525e5

Breaks build for FreeBSD. Probably clang related?

««« original CL description
cmd/cgo: disable inappropriate warnings when the gcc struct is empty

package main
//#cgo CFLAGS: -Wall
//void test() {}
import "C"
func main() {
    C.test()
}

This code will cause gcc issuing warnings about unused variable.

This commit use offset of the second return value of
Packages.structType to detect whether the gcc struct is empty,
and if it's directly invoke the C function instead of writing an
unused code.

LGTM=dave, minux
R=golang-codereviews, iant, minux, dave
CC=golang-codereviews
https://golang.org/cl/109640045

»»»

TBR=dfc
R=dave
CC=golang-codereviews
https://golang.org/cl/114990044

10 years agocmd/cgo: disable inappropriate warnings when the gcc struct is empty
snyh [Fri, 18 Jul 2014 06:47:21 +0000 (02:47 -0400)]
cmd/cgo: disable inappropriate warnings when the gcc struct is empty

package main
//#cgo CFLAGS: -Wall
//void test() {}
import "C"
func main() {
    C.test()
}

This code will cause gcc issuing warnings about unused variable.

This commit use offset of the second return value of
Packages.structType to detect whether the gcc struct is empty,
and if it's directly invoke the C function instead of writing an
unused code.

LGTM=dave, minux
R=golang-codereviews, iant, minux, dave
CC=golang-codereviews
https://golang.org/cl/109640045

10 years agoruntime: add throwgo
Dave Cheney [Fri, 18 Jul 2014 06:30:38 +0000 (16:30 +1000)]
runtime: add throwgo

Fixes #8380.

Also update hashmap.go to use throwgo rather than panic.

LGTM=khr
R=khr, rsc
CC=golang-codereviews
https://golang.org/cl/115860045

10 years agoundo CL 101570044 / 2c57aaea79c4
Keith Randall [Thu, 17 Jul 2014 21:41:46 +0000 (14:41 -0700)]
undo CL 101570044 / 2c57aaea79c4

redo stack allocation.  This is mostly the same as
the original CL with a few bug fixes.

1. add racemalloc() for stack allocations
2. fix poolalloc/poolfree to terminate free lists correctly.
3. adjust span ref count correctly.
4. don't use cache for sizes >= StackCacheSize.

Should fix bugs and memory leaks in original changelist.

««« original CL description
undo CL 104200047 / 318b04f28372

Breaks windows and race detector.
TBR=rsc

««« original CL description
runtime: stack allocator, separate from mallocgc

In order to move malloc to Go, we need to have a
separate stack allocator.  If we run out of stack
during malloc, malloc will not be available
to allocate a new stack.

Stacks are the last remaining FlagNoGC objects in the
GC heap.  Once they are out, we can get rid of the
distinction between the allocated/blockboundary bits.
(This will be in a separate change.)

Fixes #7468
Fixes #7424

LGTM=rsc, dvyukov
R=golang-codereviews, dvyukov, khr, dave, rsc
CC=golang-codereviews
https://golang.org/cl/104200047
»»»

TBR=rsc
CC=golang-codereviews
https://golang.org/cl/101570044
»»»

LGTM=dvyukov
R=dvyukov, dave, khr, alex.brainman
CC=golang-codereviews
https://golang.org/cl/112240044

10 years agosync: fix typo in benchmark name
Josh Bleecher Snyder [Thu, 17 Jul 2014 19:50:56 +0000 (12:50 -0700)]
sync: fix typo in benchmark name

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/118860043

10 years agoruntime: make NumGoroutines faster
Dmitriy Vyukov [Thu, 17 Jul 2014 17:51:03 +0000 (21:51 +0400)]
runtime: make NumGoroutines faster
Resolves TODO for not walking all goroutines in NumGoroutines.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/107290044

10 years agoruntime: improve select benchmarks
Dmitriy Vyukov [Thu, 17 Jul 2014 17:49:45 +0000 (21:49 +0400)]
runtime: improve select benchmarks
1. Add select on sync channels benchmark.
2. Make channels in BenchmarkSelectNonblock shared.
With GOMAXPROCS=1 it is the same, but with GOMAXPROCS>1
it becomes a more interesting benchmark.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews
https://golang.org/cl/115780043

10 years agostrings: remove byteBitmap
Rui Ueyama [Thu, 17 Jul 2014 16:55:12 +0000 (09:55 -0700)]
strings: remove byteBitmap

Previously we had a bitmap to check whether or not a byte
appears in a string should be replaced. But we don't actually
need a separate bitmap for that purpose. Removing the bitmap
makes the code simpler.

LGTM=dave, iant, nigeltao
R=golang-codereviews, dave, gobot, nigeltao, iant, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/110100043

10 years agogofmt: -s flag simplifies "for _ = range x"
Robert Griesemer [Thu, 17 Jul 2014 16:40:27 +0000 (09:40 -0700)]
gofmt: -s flag simplifies "for _ = range x"

LGTM=adonovan, rsc
R=rsc, adonovan
CC=golang-codereviews
https://golang.org/cl/117800043

10 years agoos: Implement symlink support for Windows
Michael Fraenkel [Thu, 17 Jul 2014 07:02:46 +0000 (17:02 +1000)]
os: Implement symlink support for Windows

Fixes #5750.

https://code.google.com/p/go/issues/detail?id=5750

os: Separate windows from posix. Implement windows support.
path/filepath: Use the same implementation as other platforms
syscall: Add/rework new APIs for Windows

LGTM=alex.brainman
R=golang-codereviews, alex.brainman, gobot, rsc, minux
CC=golang-codereviews
https://golang.org/cl/86160044

10 years agoA+C: snyh (individual CLA)
Shenghou Ma [Thu, 17 Jul 2014 05:35:53 +0000 (01:35 -0400)]
A+C: snyh (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/114890043

10 years agoruntime: align gomemeq return value correctly
Keith Randall [Thu, 17 Jul 2014 00:16:12 +0000 (17:16 -0700)]
runtime: align gomemeq return value correctly

Fixes #8378

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/114880043

10 years agoarchive/tar: fix writing of pax headers
Cristian Staretu [Thu, 17 Jul 2014 00:00:29 +0000 (10:00 +1000)]
archive/tar: fix writing of pax headers

"archive/tar: reuse temporary buffer in writeHeader" introduced a
change which was supposed to help lower the number of allocations from
512 bytes for every call to writeHeader. This change broke the writing
of PAX headers.

writeHeader calls writePAXHeader and writePAXHeader calls writeHeader
again. writeHeader will end up writing the PAX header twice.

example broken header:
PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000
PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000

example correct header:
PaxHeaders.4290/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021516 xustar0000000000000000
0100644000000000000000000000270412301216634007250 0ustar0000000000000000

This commit adds a dedicated buffer for pax headers to the Writer
struct. This change increases the size of the struct by 512 bytes, but
allows tar/writer to avoid allocating 512 bytes for all written
headers and it avoids allocating 512 more bytes for pax headers.

LGTM=dsymonds
R=dsymonds, dave, iant
CC=golang-codereviews
https://golang.org/cl/110480043

10 years agosrc, misc: applied gofmt -s -w
Robert Griesemer [Wed, 16 Jul 2014 23:29:51 +0000 (16:29 -0700)]
src, misc: applied gofmt -s -w

Pending CL 113120043.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/112290043

10 years agocmd/gc: implement 'for range x {'
Russ Cox [Wed, 16 Jul 2014 23:27:10 +0000 (19:27 -0400)]
cmd/gc: implement 'for range x {'

Fixes #6102.

LGTM=gri
R=ken, r, gri
CC=golang-codereviews
https://golang.org/cl/113120043

10 years agotime: change nsec back to int32
Russ Cox [Wed, 16 Jul 2014 23:26:45 +0000 (19:26 -0400)]
time: change nsec back to int32

The garbage collector and stack scans are good enough now.

Fixes #7446.

LGTM=r
R=r, dvyukov
CC=golang-codereviews, mdempsky, mtj
https://golang.org/cl/112870046

10 years agoliblink: fix precedence bug in pcdata comparison
Russ Cox [Wed, 16 Jul 2014 23:26:36 +0000 (19:26 -0400)]
liblink: fix precedence bug in pcdata comparison

As written, the ! applies before the &1.
This would crash writing out missing pcdata tables
if we ever used non-contiguous IDs in a function.
We don't, but fix anyway.

LGTM=iant, minux
R=minux, iant
CC=golang-codereviews
https://golang.org/cl/117810047

10 years agoruntime: convert map implementation to Go.
Keith Randall [Wed, 16 Jul 2014 21:16:19 +0000 (14:16 -0700)]
runtime: convert map implementation to Go.

It's a bit slower, but not painfully so.  There is still room for
improvement (saving space so we can use nosplit, and removing the
requirement for hash/eq stubs).

benchmark                              old ns/op     new ns/op     delta
BenchmarkMegMap                        23.5          24.2          +2.98%
BenchmarkMegOneMap                     14.9          15.7          +5.37%
BenchmarkMegEqMap                      71668         72234         +0.79%
BenchmarkMegEmptyMap                   4.05          4.93          +21.73%
BenchmarkSmallStrMap                   21.9          22.5          +2.74%
BenchmarkMapStringKeysEight_16         23.1          26.3          +13.85%
BenchmarkMapStringKeysEight_32         21.9          25.0          +14.16%
BenchmarkMapStringKeysEight_64         21.9          25.1          +14.61%
BenchmarkMapStringKeysEight_1M         21.9          25.0          +14.16%
BenchmarkIntMap                        21.8          12.5          -42.66%
BenchmarkRepeatedLookupStrMapKey32     39.3          30.2          -23.16%
BenchmarkRepeatedLookupStrMapKey1M     322353        322675        +0.10%
BenchmarkNewEmptyMap                   129           136           +5.43%
BenchmarkMapIter                       137           107           -21.90%
BenchmarkMapIterEmpty                  7.14          8.71          +21.99%
BenchmarkSameLengthMap                 5.24          6.82          +30.15%
BenchmarkBigKeyMap                     34.5          35.3          +2.32%
BenchmarkBigValMap                     36.1          36.1          +0.00%
BenchmarkSmallKeyMap                   26.9          26.7          -0.74%

LGTM=rsc
R=golang-codereviews, dave, dvyukov, rsc, gobot, khr
CC=golang-codereviews
https://golang.org/cl/99380043

10 years agostrconv: fix handling of BOMs in CanBackquote
Volker Dobler [Wed, 16 Jul 2014 20:06:11 +0000 (13:06 -0700)]
strconv: fix handling of BOMs in CanBackquote

A byte order mark  (BOM) cannot be backquoted.

LGTM=r
R=golang-codereviews, gobot, r
CC=golang-codereviews
https://golang.org/cl/112310043

10 years agoflag: fix typo
Matthew Cottingham [Wed, 16 Jul 2014 19:27:25 +0000 (12:27 -0700)]
flag: fix typo

LGTM=r
R=golang-codereviews, gobot, r
CC=golang-codereviews
https://golang.org/cl/114850043

10 years agocmd/ld: use count, not upper bound, in type of array
Rob Pike [Wed, 16 Jul 2014 18:26:50 +0000 (18:26 +0000)]
cmd/ld: use count, not upper bound, in type of array
DWARF says only one is necessary.
The count is preferable because it admits 0-length arrays.
Update debug/dwarf to handle either form.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/111230044

10 years agocmd/go/doc: Fix example domain
Yasuhiro Matsumoto [Wed, 16 Jul 2014 10:48:57 +0000 (20:48 +1000)]
cmd/go/doc: Fix example domain
code.org exists

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/95500043

10 years agoruntime: start goroutine ids at 1
Dmitriy Vyukov [Wed, 16 Jul 2014 08:19:33 +0000 (12:19 +0400)]
runtime: start goroutine ids at 1

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, khr
https://golang.org/cl/117810043

10 years agocompress/bzip2: fix panics on malformed input.
Adam Langley [Wed, 16 Jul 2014 01:44:33 +0000 (18:44 -0700)]
compress/bzip2: fix panics on malformed input.

Fixes 8363.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/114810043