1
0
mirror of https://github.com/golang/go synced 2024-10-04 10:21:21 -06:00
Commit Graph

19942 Commits

Author SHA1 Message Date
Adam Langley
c12c5dba9c compress/bzip2: fix panics on malformed input.
Fixes 8363.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/114810043
2014-07-15 18:44:33 -07:00
Rob Pike
cddad8affe cmd/ld: change DWARF encoding for array lengths
They can be large, so use a varint encoding rather than only one byte.

LGTM=iant, rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/113180043
2014-07-15 21:18:18 +00:00
Matthew Dempsky
6012ac9b79 cmd/ld: consistently document flags that expect values
LGTM=minux, rsc
R=golang-codereviews, minux, rsc
CC=golang-codereviews
https://golang.org/cl/113970044
2014-07-15 17:05:35 -04:00
Matthew Dempsky
348a20548d objdump: remove out-of-date comment
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/112320043
2014-07-15 06:03:36 -07:00
Dmitriy Vyukov
387c1c661f runtime: make a test more robust
The issue is discovered during testing of a change to runtime.
Even if it is unlikely to happen, the comment can safe an hour
next person who hits it.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/116790043
2014-07-15 10:30:12 +04:00
Dmitriy Vyukov
8422d1ea65 runtime: zero dangling pointer
I don't see how it can lead to bad things today.
But it's better to kill it before it does.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/111130045
2014-07-15 10:27:36 +04:00
Jakob Borg
0a5cb7dc49 net: Don't read beyond end of slice when parsing resolv.conf options.
Fixes #8252.

LGTM=adg
R=ruiu, josharian, adg
CC=golang-codereviews
https://golang.org/cl/102470046
2014-07-15 14:49:26 +10:00
Dave Cheney
c213b8864f cmd/go: skip vcs tests on nacl and android
Fixes build failures on nacl/* and android/* platforms.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/113140043
2014-07-15 14:45:59 +10:00
Volker Dobler
c0a824aad6 strconv: fix CanBackquote for invalid UTF-8
Make CanBackquote(invalid UTF-8) return false.

Also add two test which show that CanBackquote reports
true for strings containing a BOM.

Fixes #7572.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/111780045
2014-07-14 19:49:26 -07:00
Robert Griesemer
deae10e038 go/ast: fix walk to handle "for range x"
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/117790043
2014-07-14 19:14:27 -07:00
Rob Pike
79b106ec62 cmd/ld: generate correct upper bound value for array types.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/115820043
2014-07-15 01:38:05 +00:00
Chris McGee
fd7b82b4e4 go get: Support for IBM DevOps Services (hub.jazz.net) git repos
LGTM=adg
R=golang-codereviews, adg, minux
CC=golang-codereviews
https://golang.org/cl/106740044
2014-07-15 11:27:04 +10:00
Andrew Gerrand
a44cf8d18e A+C: add Chris McGee (individual CLA)
TBR=dsymonds
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/112300043
2014-07-15 11:25:39 +10:00
Russ Cox
64c2083ebc runtime: refactor routines for stopping, running goroutine from m
This CL adds 'dropg', which is called to drop the association
between m and its current goroutine, and it makes schedule
handle locked goroutines correctly, instead of requiring all
callers of schedule to do that.

The effect is that if you want to take over an m for, say,
garbage collection work while still allowing the current g
to run on some other m, you can do an mcall to a function
that is:

        // dissociate gp
        dropg();
        gp->status = Gwaiting; // for ready

        // put gp on run queue for others to find
        runtime·ready(gp);

        /* ... do other work here ... */

        // done with m, let it run goroutines again
        schedule();

Before this CL, the dropg() body had to be written explicitly,
and the check for lockedg before schedule had to be
written explicitly too, both of which make the code a bit
more fragile than it needs to be.

LGTM=iant
R=dvyukov, iant
CC=golang-codereviews, rlh
https://golang.org/cl/113110043
2014-07-14 20:56:37 -04:00
Robert Griesemer
d3a2f58700 go/*: permit "for range x"
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/112970044
2014-07-14 16:17:17 -07:00
Rob Pike
81e661aa45 doc/go1.4.txt: permit for range x
CC=golang-codereviews
https://golang.org/cl/110640044
2014-07-14 15:45:14 -07:00
Robert Griesemer
20ae6d9bc5 spec: permit "for range x" (no index variables)
This is a fully backward-compatible language change.

There are not a lot of cases in the std library, but
there are some. Arguably this makes the syntax a bit
more regular - any trailing index variable that is _
can be left away, and there's some analogy to type
switches where the temporary can be left away.

Implementation-wise the change should be trivial as
it can be done completely syntactically. For instance,
the respective change in go/parser is a dozen lines
(see https://golang.org/cl/112970044 ).

Fixes #6102.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/104680043
2014-07-14 15:08:09 -07:00
Peter Collingbourne
8b836fa872 cmd/go: introduce support for $GCCGO env var
This variable allows users to select the compiler when using the
gccgo toolchain.

LGTM=rsc
R=rsc, iant, minux, aram
CC=axwalk, golang-codereviews
https://golang.org/cl/106700044
2014-07-14 09:51:20 -04:00
Alex Brainman
369a3ff3fd make.bat: return exit code to dashboard builder
Fixes #7806.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/104690043
2014-07-12 15:18:36 +10:00
Russ Cox
e1821692ca cmd/ld: add go-specific dwarf type information
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/116720043
2014-07-11 23:10:00 -04:00
David du Colombier
90c146f390 liblink: fix warnings on Plan 9
warning: /usr/go/src/liblink/asm5.c:720 set and not used: m
warning: /usr/go/src/liblink/asm5.c:807 set and not used: c

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/108570043
2014-07-11 22:24:45 +02:00
Rob Pike
125d1e9269 ld: change DWARF output for structs
The debug/dwarf package cannot parse the format generated here,
but the format can be changed so it does.
After this edit, tweaking the expression defining the offset
of a struct field, the dwarf package can parse the tables (again?).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/105710043
2014-07-11 15:16:00 +00:00
Dustin Long
5c2f01f392 image/png: interlacing support for png.
Fixes #6293.

Image "testdata/benchRGB-interlace.png" was generated by opening "testdata/benchRGB.png" in the editor Gimp and saving it with interlacing enabled.

Benchmark:
BenchmarkDecodeRGB        	     500	   7014194 ns/op	  37.37 MB/s
ok  	pkg/image/png	4.657s

BenchmarkDecodeInterlacing	     100	  10623241 ns/op	  24.68 MB/s
ok  	pkg/image/png	1.339s

LGTM=nigeltao
R=nigeltao, andybons, matrixik
CC=golang-codereviews
https://golang.org/cl/102130044
2014-07-11 11:02:02 +10:00
Benny Siegert
0e694298e9 cmd/go: do not fail if libgcc does not exist
(This is a patch from the pkgsrc Go package.)

LGTM=iant
R=golang-codereviews, iant, joerg.sonnenberger, dave
CC=golang-codereviews, joerg
https://golang.org/cl/108340043
2014-07-10 14:35:04 -07:00
Pietro Gagliardi
f5b600f70c debug/elf: add (*File).DynamicSymbols, ErrNoSymbols, and tests for (*File).Symbols and (*File).DynamicSymbols, and formalize symbol order.
Added a complement to (*File).Symbols for the dynamic symbol table.
Would be useful, for instance, if seraching for certain shared objects
compatible with certain libraries (for instance, LADSPA requires an
exported symbol "ladspa_descriptor").

Added a variable ErrNoSymbols that canonicalizes a return from
(*File).Symbols and (*File).DyanmicSymbols if the file has no symbols.

Added tests for both (*File).Symbols and (*File).DynamicSymbols;
there was never a test for (*File).Symbols at all. A small C program using
libelf, included in the test data, was used to produce the golden
symbols to compare against.

As part of the requirements for testing, (*File).Symbols and (*File).DynamicSymbols now document the order in which the symbol tables are returned (in the order the symbols appear in the file).

All tests currently pass.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/107530043
2014-07-10 12:44:40 -07:00
Shenghou Ma
54d0b5ab6a nacltest.bash: set GOROOT before invoking cmd/go
The builder builds with GOROOT_FINAL=/usr/local/go set.

TBR=rsc
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/112100043
2014-07-10 15:36:48 -04:00
Shenghou Ma
99e2a56786 nacltest.bash: nacl/arm support.
Also detect GOARCH automatically based on `uname -m`.

LGTM=crawshaw, dave, rsc
R=rsc, iant, crawshaw, dave
CC=golang-codereviews
https://golang.org/cl/111780043
2014-07-10 15:15:41 -04:00
Shenghou Ma
0829533b6e misc/nacl: add go_nacl_arm_exec, update README
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/109390043
2014-07-10 15:15:32 -04:00
Shenghou Ma
366f88f3e4 cmd/dist: always use GOARM=7 for nacl/arm
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/101590044
2014-07-10 15:15:24 -04:00
Shenghou Ma
d1fee626f6 crypto/rc4: disable assembly implementation for nacl/arm.
It uses an unsupported addressing mode.

LGTM=iant, rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/106370043
2014-07-10 15:15:16 -04:00
Shenghou Ma
837bc4e502 syscall: nacl/arm support.
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/101620043
2014-07-10 15:15:06 -04:00
Shenghou Ma
62af04c0bc sync/atomic: nacl/arm support.
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/110330044
2014-07-10 15:14:58 -04:00
Shenghou Ma
d1177ed40d runtime: nacl/arm support.
LGTM=rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/103680046
2014-07-10 15:14:49 -04:00
Shenghou Ma
783bcba84d cmd/5c, cmd/5g, cmd/5l, liblink: nacl/arm support
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/108360043
2014-07-10 15:14:37 -04:00
Nigel Tao
6fbade1ec6 A+C: add Dustin Long (Markover Inc. DBA Poptip corporate CLA).
LGTM=adg
R=adg
CC=dustmop, golang-codereviews
https://golang.org/cl/111000044
2014-07-10 18:08:33 +10:00
Alex Brainman
418b39d436 runtime: align stack before calling windows in usleep2
Fixes #8174.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/102360043
2014-07-10 14:23:50 +10:00
Shenghou Ma
a1778ec146 runtime: ignore exceptions from foreign threads.
Fixes #8224.

LGTM=alex.brainman, rsc
R=alex.brainman, rsc, dave
CC=golang-codereviews
https://golang.org/cl/104200046
2014-07-09 23:55:35 -04:00
Josh Bleecher Snyder
76ce843afe net/rpc: use html/template to render html
Found using the vet check in CL 106370045.

This is a second attempt at CL 101670044, which omitted the deps_test change.

This adds dependencies to net/rpc:

        encoding
        encoding/base64
        encoding/json
        html
        unicode/utf16

The obvious correctness and security warrants the additional dependencies.

LGTM=rsc
R=r, minux, rsc, adg
CC=golang-codereviews
https://golang.org/cl/110890043
2014-07-09 19:33:45 -07:00
Andrew Gerrand
475d266cec A+C: Manuel Mendez (individual CLA)
Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/110970047
2014-07-10 10:49:59 +10:00
Robin Eklind
8e902dd726 docs: Make consistent use of optional li closing tags.
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/105100044
2014-07-09 14:26:37 -07:00
David Crawshaw
fe71b387b3 androidtest.bash: missing !
LGTM=iant
R=bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/112010045
2014-07-09 14:54:11 -04:00
David Crawshaw
c4b714d3fe os: no /tmp on android
LGTM=minux, bradfitz
R=golang-codereviews, minux, bradfitz
CC=golang-codereviews
https://golang.org/cl/104650043
2014-07-09 14:12:30 -04:00
Peter Collingbourne
5512f6f3b3 cmd/go: use $CC to build _cgo_defun.c
LGTM=dave, iant
R=iant, dave
CC=golang-codereviews
https://golang.org/cl/112000043
2014-07-09 10:04:38 -07:00
Dmitriy Vyukov
0622e13b4d runtime: grow heap by 64K instead of 128K
When we've switched to 8K pages,
heap started to grow by 128K instead of 64K,
because it was implicitly assuming that pages are 4K.
Fix that and make the code more robust.

LGTM=khr
R=golang-codereviews, dave, khr
CC=golang-codereviews, rsc
https://golang.org/cl/106450044
2014-07-09 17:00:54 +04:00
David Crawshaw
a5f8e8f99c androidtest.bash, misc/android: build scripts for android
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/107640044
2014-07-09 06:56:49 -04:00
Aram Hăvărneanu
29aac3d91b debug/plan9obj: fix test build
LGTM=0intro, dave
R=dave, 0intro
CC=golang-codereviews
https://golang.org/cl/106560044
2014-07-09 12:48:55 +02:00
Aram Hăvărneanu
9c3141145a syscall: use the nsec system call instead of /dev/bintime on Plan 9
Also remove arch-specific Go files in the Plan 9 syscall package

LGTM=0intro
R=0intro, dave
CC=ality, golang-codereviews, jas, mischief, rsc
https://golang.org/cl/112720043
2014-07-09 12:34:06 +02:00
Aram Hăvărneanu
a84e3ad198 runtime: use the nsec system call instead of /dev/bintime on Plan 9
LGTM=0intro
R=0intro
CC=ality, dave, golang-codereviews, jas, mischief, rsc
https://golang.org/cl/104570043
2014-07-09 12:33:42 +02:00
Aram Hăvărneanu
0a2083edd7 debug/plan9obj, cmd/addr2line: on Plan 9 use a.out header
size instead of abusing text symbol

cmd/addr2line needs to know the virtual address of the start
of the text segment (load address plus header size). For
this, it used the text symbol added by the linker. This is
wrong on amd64. Header size is 40 bytes, not 32 like on 386
and arm. Function alignment is 16 bytes causing text to be
at 0x200030.

debug/plan9obj now exports both the load address and the
header size; cmd/addr2line uses this new information and
doesn't rely on text anymore.

LGTM=0intro
R=0intro, gobot, ality
CC=ality, golang-codereviews, jas, mischief
https://golang.org/cl/106460044
2014-07-09 12:33:13 +02:00
Aram Hăvărneanu
fa113cf767 cmd/objdump: set goarch properly on non-386 Plan 9 systems
LGTM=0intro, r
R=0intro, r
CC=ality, golang-codereviews, jas, mischief
https://golang.org/cl/108420043
2014-07-09 12:32:49 +02:00