Branches

default

View source
port-sunos
change destination
default
  • Contributors
    1. Loading...
Author Commit Message Labels Comments Date
250+ commits behind port-sunos.
Dmitriy Vyukov
doc: say that race detector is supported on freebsd R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/103520044
Dmitriy Vyukov
doc: say that race detector is supported on freebsd LGTM=ruiu R=golang-codereviews, ruiu CC=golang-codereviews https://codereview.appspot.com/109100046
Dmitriy Vyukov
run.bash: run race tests on freebsd LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://codereview.appspot.com/102580043
Dmitriy Vyukov
runtime/race: support freebsd All tests pass except one test in regexp package. LGTM=iant R=golang-codereviews, iant, dave CC=golang-codereviews https://codereview.appspot.com/107270043
Dmitriy Vyukov
runtime/race: update linux runtime It was built on an old, bogus revision. LGTM=minux TBR=iant R=iant, minux CC=golang-codereviews https://codereview.appspot.com/101370052
Dmitriy Vyukov
runtime/race: update runtime to tip This requires minimal changes to the runtime hooks. In particular, synchronization events must be done only on valid addresses now, so I've added the additional checks to race.c. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/101000046
Rui Ueyama
strings: speed up byteReplacer.Replace benchmark old ns/op new ns/op delta BenchmarkByteReplacerWriteString 7359 3661 -50.25% LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://codereview.appspot.com/102550043
Dmitriy Vyukov
sync: detect incorrect usages of RWMutex Fixes issue 7858. LGTM=ruiu R=ruiu CC=golang-codereviews https://codereview.appspot.com/92720045
Dmitriy Vyukov
net: simplify code Single-case select with a non-nil channel is pointless. LGTM=mikioh.mikioh R=mikioh.mikioh CC=golang-codereviews https://codereview.appspot.com/103920044
Dmitriy Vyukov
runtime: remove obsolete afterprologue check Afterprologue check was required when did not know about return arguments of functions and/or they were not zeroed. Now 100% precision is required for stacks due to stack copying, so it must work w/o afterprologue one way or another. I can limit this change for 1.3 to merely adding a TODO, but this check is super confusing so I don't want this knowledge to get lost. LGTM=rsc R=golang-codereviews, gobot, rsc, khr CC=golang-codereviews, khr, rsc https://codereview.appspot.com/96580045
Rui Ueyama
strings: define byteBitmap.isSet LGTM=dave R=golang-codereviews, bradfitz, dave CC=golang-codereviews https://codereview.appspot.com/109090048
Rui Ueyama
encoding/base64, encoding/base32: speed up Encode Avoid unnecessary bitwise-OR operations. benchmark old MB/s new MB/s speedup BenchmarkEncodeToStringBase64 179.02 205.74 1.15x BenchmarkEncodeToStringBase32 155.86 167.82 1.08x LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/109090043
Rui Ueyama
strings: reduce allocation in byteStringReplacer.WriteString Use WriteString instead of allocating a byte slice as a buffer. This was a TODO. benchmark old ns/op new ns/op delta BenchmarkWriteString 40139 19991 -50.20% LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/107190044
Bill Thiede
image/jpeg: encode *image.Gray as grayscale JPEGs. Fixes issue 8201. LGTM=nigeltao R=nigeltao CC=golang-codereviews https://codereview.appspot.com/105990046 Committer: Nigel Tao <nigeltao@golang.org>
Caleb Spare
testing/quick: brought Check parameter name in line with function doc LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102830043 Committer: Shenghou Ma <minux@golang.org>
Nigel Tao
image/jpeg: use a look-up table to speed up Huffman decoding. This requires a decoder to do its own byte buffering instead of using bufio.Reader, due to byte stuffing. benchmark old MB/s new MB/s speedup BenchmarkDecodeBaseline 33.40 50.65 1.52x BenchmarkDecodeProgressive 24.34 31.92 1.31x On 6g, unsafe.Sizeof(huffman{}) falls from 4872 to 964 bytes, and the decoder struct contains 8 of those. LGTM=r R=r, nightlyone CC=bradfitz, couchmoney, golang-codereviews, raph https://codereview.appspot.c…
Andrew Gerrand
tag go1.3 LGTM=minux R=golang-codereviews, minux CC=golang-codereviews https://codereview.appspot.com/107200043
Andrew Gerrand
doc: document Go 1.3 This is a clone of 101370043, which I accidentally applied to the release branch first. No big deal, it needed to be applied there anyway. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/108090043
chai2010
image: add RGBAAt, Gray16At, etc. Fixes issue 7694. LGTM=nigeltao, rsc, r R=golang-codereviews, nigeltao, rsc, r CC=golang-codereviews https://codereview.appspot.com/109000049 Committer: Nigel Tao <nigeltao@golang.org>
Rui Ueyama
encoding/base64, encoding/base32: make Encode faster Storing temporary values to a slice is slower than storing them to local variables of type byte. benchmark old MB/s new MB/s speedup BenchmarkEncodeToStringBase32 102.21 156.66 1.53x BenchmarkEncodeToStringBase64 124.25 177.91 1.43x LGTM=crawshaw R=golang-codereviews, crawshaw, bradfitz, dave CC=golang-codereviews https://codereview.apps…
Robert Dinu
testing: fix timing format inconsistency Fixes issue 8175. LGTM=r R=golang-codereviews, r, gobot CC=golang-codereviews https://codereview.appspot.com/103320043 Committer: Rob Pike <r@golang.org>
Rob Pike
fmt: include ±Inf and NaN in the complex format test Just to be more thorough. No need to push this to 1.3; it's just a test change that worked without any changes to the code being tested. LGTM=crawshaw R=golang-codereviews, crawshaw CC=golang-codereviews https://codereview.appspot.com/109080045
dsymonds
go/build: update doc.go for go1.3 build tag. LGTM=bradfitz R=adg, rsc, bradfitz CC=golang-codereviews https://codereview.appspot.com/102470045 Committer: Russ Cox <rsc@golang.org>
Rui Ueyama
strings: add fast path to Replace genericReplacer.lookup is called for each byte of an input string. In many (most?) cases, lookup will fail for the first byte, and it will return immediately. Adding a fast path for that case seems worth it. Benchmark on my Xeon 3.5GHz Linux box: benchmark old ns/op new ns/op delta BenchmarkGenericNoMatch 2691 774 -71.24% BenchmarkGenericMatch…
Keith Randall
runtime: fix gogetcallerpc. Make assembly govet-clean. Clean up fixes for CL 93380044. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/107160047
Rob Pike
fmt: fix signs when zero padding. Bug was introduced recently. Add more tests, fix the bugs. Suppress + sign when not required in zero padding. Do not zero pad infinities. All old tests still pass. This time for sure! Fixes issue 8217. LGTM=rsc R=golang-codereviews, dan.kortschak, rsc CC=golang-codereviews https://codereview.appspot.com/103480043
Dominik Honnef
misc/emacs: add new function godoc-at-point LGTM=adonovan R=adonovan, ruiu CC=golang-codereviews https://codereview.appspot.com/107160048 Committer: Alan Donovan <adonovan@google.com>
Dominik Honnef
misc/emacs: replace hacky go--delete-whole-line with own implementation Using flet to replace kill-region with delete-region was a hack, flet is now (GNU Emacs 24.3) deprecated and at least two people have reported an issue where using go--delete-whole-line would permanently break their kill ring. While that issue is probably caused by faulty third party code (possibly prelude), it's easier to write a clean implementation than to tweak the hack. LGTM=ruiu, adonovan R…
Robert Griesemer
text/scanner: fix comment LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/105300044
Keith Randall
runtime: fix stringw test. Null terminate string. Make it endian-agnostic. TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/106060044
Josh Bleecher Snyder
test: speed up chan/select5 No functional changes. Generating shorter functions improves compilation time. On my laptop, this test's running time goes from 5.5s to 1.5s; the wall clock time to run all tests goes down 1s. On Raspberry Pi, this CL cuts 50s off the wall clock time to run all tests. Fixes issue 7503. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/72590045
Robert Griesemer
go/parser: don't accept trailing explicit semicolon Fixes issue 8207. LGTM=gordon.klaus, bradfitz R=golang-codereviews, wandakkelly, gordon.klaus, bradfitz CC=golang-codereviews https://codereview.appspot.com/106010046
Keith Randall
undo CL 105260044 / afd6f214cc81 The go:nosplit change wasn't the problem, reinstating. ««« original CL description undo CL 93380044 / 7f0999348917 Partial undo, just of go:nosplit annotation. Somehow it is breaking the windows builders. TBR=bradfitz ««« original CL description runtime: implement string ops in Go Also implement go:nosplit annotation. Not really needed for now, but we'll definitely need it for other convers…
Keith Randall
runtime: disable funky wide string test for now. TBR=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/105280045
Keith Randall
runtime: reconstitute runetochar for use by gostringw. Fixes windows builds (hopefully). LGTM=bradfitz R=golang-codereviews, bradfitz, alex.brainman CC=golang-codereviews https://codereview.appspot.com/103470045
Keith Randall
undo CL 93380044 / 7f0999348917 Partial undo, just of go:nosplit annotation. Somehow it is breaking the windows builders. TBR=bradfitz ««« original CL description runtime: implement string ops in Go Also implement go:nosplit annotation. Not really needed for now, but we'll definitely need it for other conversions. benchmark old ns/op new ns/op delta BenchmarkRuneIterate 534 474 …
Shenghou Ma
cmd/5c, cmd/6c, cmd/8c, cmd/cc: remove unused global variable retok. LGTM=bradfitz R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/107160046
Keith Randall
runtime: implement string ops in Go Also implement go:nosplit annotation. Not really needed for now, but we'll definitely need it for other conversions. benchmark old ns/op new ns/op delta BenchmarkRuneIterate 534 474 -11.24% BenchmarkRuneIterate2 535 470 -12.15% LGTM=bradfitz R=golang-codereviews, dave, bradfitz, minux CC=golang-codereviews https://coderevi…
Keith Randall
runtime: implement eqstring in assembly. BenchmarkCompareStringEqual 10.4 7.33 -29.52% BenchmarkCompareStringIdentical 3.99 3.67 -8.02% BenchmarkCompareStringSameLength 9.80 6.84 -30.20% BenchmarkCompareStringDifferentLength 1.09 0.95 -12.84% BenchmarkCompareStringBigUnaligned 75220 76071 +1.13% BenchmarkCom…
Rui Ueyama
net: avoid array copy when shuffling SRV records We don't need to shift array elements to shuffle them. We just have to swap a selected element with 0th element. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/91750044
Robert Griesemer
text/scanner: provide facility for custom identifiers LGTM=r R=golang-codereviews, r CC=golang-codereviews https://codereview.appspot.com/108030044
Matthew Dempsky
bufio: handle excessive white space in ScanWords LGTM=r R=golang-codereviews, bradfitz, r CC=golang-codereviews https://codereview.appspot.com/109020043 Committer: Rob Pike <r@golang.org>
Rob Pike
fmt: don't put 0x on every byte of a compact hex-encoded string Printf("%x", "abc") was "0x610x620x63"; is now "0x616263", which is surely better. Printf("% #x", "abc") is still "0x61 0x62 0x63". Fixes issue 8080. LGTM=bradfitz, gri R=golang-codereviews, bradfitz, gri CC=golang-codereviews https://codereview.appspot.com/106990043
brainman
os: disable TestGetppid on plan9 Fixes build. LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://codereview.appspot.com/105140047
Alan Shreve
syscall: implement syscall.Getppid() on Windows Also added a test to verify os.Getppid() works across all platforms LGTM=alex.brainman R=golang-codereviews, alex.brainman, shreveal, iant CC=golang-codereviews https://codereview.appspot.com/102320044 Committer: Alex Brainman <alex.brainman@gmail.com>
Ian Lance Taylor
A+C: Alan Shreve (individual CLA) Generated by addca. R=gobot CC=golang-codereviews https://codereview.appspot.com/102410044
Ian Lance Taylor
runtime: fix VDSO lookup to use dynamic hash table Reportedly in the Linux 3.16 kernel the VDSO will not have section headers or a normal symbol table. Too late for 1.3 but perhaps for 1.3.1, if there is one. Fixes issue 8197. LGTM=rsc R=golang-codereviews, mattn.jp, rsc CC=golang-codereviews https://codereview.appspot.com/101260044
Nigel Tao
compress/lzw: add commentary that TIFF's LZW differs from the standard algorithm. See https://codereview.appspot.com/105750045/ for an implementation of TIFF's LZW. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/102940043
Nigel Tao
image/png: fix compare-to-golden-file test. bufio.Scanner.Scan returns whether the scan succeeded, not whether it is done, so the test was mistakenly breaking early. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/93670045
Andrew Gerrand
doc: link to new downloads page LGTM=minux R=golang-codereviews, minux CC=golang-codereviews https://codereview.appspot.com/102340044
Russ Cox
undo CL 101970047 / 30307cc8bef2 makes windows-amd64-race benchmarks slower ««« original CL description testing: make benchmarking faster Allow the number of benchmark iterations to grow faster for fast benchmarks, and don't round up twice. Using the default benchtime, this CL reduces wall clock time to run benchmarks: net/http 49s -> 37s (-24%) runtime 8m31s -> 5m55s (-30%) bytes 2m37s -> 1m29s (…
Andrew Gerrand
tag go1.3rc2 LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/101270043
Russ Cox
runtime: revise CL 105140044 (defer nil) to work on Windows It appears that something about Go on Windows cannot handle the fault cause by a jump to address 0. The way Go represents and calls functions, this never happened at all, until CL 105140044. This CL changes the code added in CL 105140044 to make jump to 0 impossible once again. Fixes issue 8047. (again, on Windows) TBR=bradfitz R=golang-codereviews, dave CC=adg, golang-codereviews, iant, r http…
Rob Pike
time: micro symbol for microseconds R=rsc CC=golang-codereviews https://codereview.appspot.com/105930043
Russ Cox
lib/codereview: fix doc/go1.*.txt exception LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/108950046
Russ Cox
doc: add go1.4.txt CC=golang-codereviews https://codereview.appspot.com/103340046
Rob Pike
time: change formatting of microseconds duration to SI modifier 'u' is not micro, µ (U+00B5) is. LGTM=gri, bradfitz R=golang-codereviews, bradfitz, gri CC=golang-codereviews https://codereview.appspot.com/105030046
Russ Cox
codereview: no LGTM needed for doc/go1.x.txt Rob asked for this change to make maintaining go1.4.txt easier. If you are not sure of a change, it is still okay to send for review. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/109880044
Russ Cox
runtime: do not trace past jmpdefer during pprof traceback on arm jmpdefer modifies PC, SP, and LR, and not atomically, so walking past jmpdefer will often end up in a state where the three are not a consistent execution snapshot. This was causing warning messages a few frames later when the traceback realized it was confused, but given the right memory it could easily crash instead. Update issue 8153 LGTM=minux, iant R=golang-codereviews, minux, iant CC=golan…
Russ Cox
runtime: fix defer of nil func Fixes issue 8047. LGTM=r, iant R=golang-codereviews, r, iant CC=dvyukov, golang-codereviews, khr https://codereview.appspot.com/105140044
Rob Pike
time: avoid broken fix for buggy TestOverflowRuntimeTimer The test requires that timerproc runs, but busy loops and starves the scheduler so that, with high probability, timerproc doesn't run. Avoid the issue by expecting the test to succeed; if not, a major outside timeout will kill it and let us know. As you can see from the diffs, there have been several attempts to fix this with chicanery, but none has worked. Don't bother trying any more. Fixes issue 8136. LGTM=rsc R=rsc, josharian CC=golang-codereviews https://codereview.appspot.com/105140043
Brad Fitzpatrick
encoding/json: remove unused field from Encoder struct It should've been removed in https://codereview.appspot.com/9365044 Thanks to Jacek Masiulaniec for noticing. LGTM=ruiu R=ruiu CC=golang-codereviews https://codereview.appspot.com/109880043
Josh Bleecher Snyder
testing: make benchmarking faster Allow the number of benchmark iterations to grow faster for fast benchmarks, and don't round up twice. Using the default benchtime, this CL reduces wall clock time to run benchmarks: net/http 49s -> 37s (-24%) runtime 8m31s -> 5m55s (-30%) bytes 2m37s -> 1m29s (-43%) encoding/json 29s -> 21s (-27%) strings 1m16s -> 53s (-30%) LGTM=crawshaw R=golang-c…
Alan Donovan
doc: add release note for 'godoc -analysis' Contains a link to /lib/godoc/analysis/help.html which is not yet live. LGTM=r R=r, adg CC=golang-codereviews https://codereview.appspot.com/88560044
Rui Ueyama
encoding/ascii85: remove unused field LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/105890044
Rui Ueyama
net: efficient text processing Optimize IP.String, IPMask.String and ParseIP. benchmark old ns/op new ns/op delta BenchmarkParseIP 2216 1849 -16.56% BenchmarkIPString 7828 2486 -68.24% BenchmarkIPMaskString 3872 659 -82.98% LGTM=mikioh.mikioh, dave, bradfitz R=golang-codereviews, mikioh.mikioh, dave, bradfitz CC=golang-codereviews https://codere…
Rui Ueyama
net: do not call time.Now() twice LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/104080043
Andrew Gerrand
doc: link to release history from /doc/ Fixes issue 8168. TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/107950043
Andrew Gerrand
misc/makerelease: update default tag to release-branch.go1.3 TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/104090044
Rui Ueyama
bytes, strings: optimize Repeat Call copy with as large buffer as possible to reduce the number of function calls. benchmark old ns/op new ns/op delta BenchmarkBytesRepeat 540 162 -70.00% BenchmarkStringsRepeat 563 177 -68.56% LGTM=josharian R=golang-codereviews, josharian, dave, dvyukov CC=golang-codereviews https://codereview.appspot.com/90550043 Committer: Josh …
Rui Ueyama
mime/multipart: fix format Remove unnecessary blank line. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/105040045 Committer: Ian Lance Taylor <iant@golang.org>
Keith Randall
runtime: add test for issue 8047. Make sure stack copier doesn't barf on a nil defer. Bug was fixed in https://codereview.appspot.com/101800043 This change just adds a test. Fixes issue 8047 LGTM=dvyukov, rsc R=dvyukov, rsc CC=golang-codereviews https://codereview.appspot.com/108840043 Committer: Russ Cox <rsc@golang.org>
Robert Griesemer
math: remove Nextafter64 alias in favor of existing Nextafter LGTM=adonovan R=rsc, adonovan CC=golang-codereviews https://codereview.appspot.com/104050045
Rui Ueyama
encoding/base64, encoding/base32: make DecodeString faster Previously, an input string was stripped of newline characters at the beginning of DecodeString and then passed to Decode. Decode again tried to strip newline characters. That's waste of time. benchmark old MB/s new MB/s speedup BenchmarkDecodeString 38.37 65.20 1.70x LGTM=dave, bradfitz R=golang-codereviews, dave, bradfitz CC=golang-codereviews https://code…
Russ Cox
cmd/gc: fix &result escaping into result There is a hierarchy of location defined by loop depth: -1 = the heap 0 = function results 1 = local variables (and parameters) 2 = local variable declared inside a loop 3 = local variable declared inside a loop inside a loop etc In general if an address from loopdepth n is assigned to something in loop depth m < n, that indicates an extended lifet…
Robert Griesemer
math/big: implement Rat.Float32 Pending CL 101750048. For submission after the 1.3 release. Fixes issue 8065. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/93550043
Robert Griesemer
math: implement Nextafter32 Provide Nextafter64 as alias to Nextafter. For submission after the 1.3 release. Fixes issue 8117. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/101750048
Russ Cox
cmd/gc: fix escape analysis for &x inside switch x := v.(type) The analysis for &x was using the loop depth on x set during x's declaration. A type switch creates a list of implicit declarations that were not getting initialized with loop depths. Fixes issue 8176. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/108860043
Shenghou Ma
nacltest.bash, misc/nacl/README: update NaCl docs. LGTM=rsc R=dave, rsc CC=golang-codereviews https://codereview.appspot.com/105030043
Brad Fitzpatrick
net/http: fix double Content-Length in response Fixes Issue 8180 LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/105040043
Ian Lance Taylor
cmd/ld: fix PC deltas in DWARF line number table The putpclcdelta function set the DWARF line number PC to s->value + pcline->pc, which is correct, but the code then set the local variable pc to epc, which can be a different value. This caused the next delta in the DWARF table to be wrong. Fixes issue 8098. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/104950045
Rob Pike
docs: link to the assembler document from the Documents tab Fixes issue 8156. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/108840045
Rob Pike
doc/install.html: fix erroneous HTML annotation align=middle is invalid; use align=center LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/106910044
Russ Cox
runtime: fix panic stack during runtime.Goexit during panic A runtime.Goexit during a panic-invoked deferred call left the panic stack intact even though all the stack frames are gone when the goroutine is torn down. The next goroutine to reuse that struct will have a bogus panic stack and can cause the traceback routines to walk into garbage. Most likely to happen during tests, because t.Fatal might be called during a deferred func and uses runtime.Goexi…
Russ Cox
cmd/6g: fix stack zeroing on native client I am not sure what the rounding here was trying to do, but it was skipping the first pointer on native client. The code above the rounding already checks that xoffset is widthptr-aligned, so the rnd was a no-op everywhere but on Native Client. And on Native Client it was wrong. Perhaps it was supposed to be rounding down, not up, but zerorange handles the extra 32 bits correctly, so the rnd does…
Russ Cox
codereview: do not add defaultcc for private CLs LGTM=r R=r, 0xjnml, bradfitz, iant CC=golang-codereviews https://codereview.appspot.com/103070046
Ian Lance Taylor
cmd/cgo: for typedef of untagged struct, use typedef name in C code Fixes issue 8148. LGTM=cookieo9, rsc R=rsc, cookieo9 CC=golang-codereviews https://codereview.appspot.com/103080043
Dmitriy Vyukov
doc: fix happens-before rules for buffered channels The current wording is reversed in 2 places. Not sure how it got 4 LGTMs (mine was there as well). Update issue 6242. LGTM=dan.kortschak, r, rsc R=golang-codereviews, 0xjnml, dan.kortschak, r, rsc CC=golang-codereviews https://codereview.appspot.com/101980047
Shenghou Ma
doc/install-source.html: document that GO386 will be auto-detected when building on both 386 and amd64. Fixes issue 8152. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/102150046
Ian Lance Taylor
debug/elf: support DWARF that needs relocs for 386 It's not clear how widespread this issue is, but we do have a test case generated by a development version of clang. I don't know whether this should go into 1.3 or not; happy to hear arguments either way. LGTM=rsc R=golang-codereviews, bradfitz, rsc CC=golang-codereviews https://codereview.appspot.com/96680045
Ian Lance Taylor
compress/gzip: allow Reset on Reader without NewReader Fixes issue 8126. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/103020044
Russ Cox
cmd/gc: fix escape analysis of func returning indirect of parameter I introduced this bug when I changed the escape analysis to run in phases based on call graph dependency order, in order to be more precise about inputs escaping back to outputs (functions returning their arguments). Given func f(z **int) *int { return *z } we were tagging the function as 'z does not escape and is not returned', which is all true, but not enough information. If used as…
Brad Fitzpatrick
crypto/tls: fix typo referencing the required Config field Thanks to Frithjof Schulze for noticing. LGTM=adg R=adg CC=agl, golang-codereviews, r https://codereview.appspot.com/107740043 Committer: Andrew Gerrand <adg@golang.org>
Brad Fitzpatrick
time: support version 3 zone records Fixes Issue 8134 LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r, rsc https://codereview.appspot.com/100930044
Russ Cox
cmd/gc: fix liveness for address-taken variables in inlined functions The 'address taken' bit in a function variable was not propagating into the inlined copies, causing incorrect liveness information. LGTM=dsymonds, bradfitz R=golang-codereviews, bradfitz CC=dsymonds, golang-codereviews, iant, khr, r https://codereview.appspot.com/96670046
Russ Cox
runtime: fix 1-byte return during x.(T) for 0-byte T The 1-byte write was silently clearing a byte on the stack. If there was another function call with more arguments in the same stack frame, no harm done. Otherwise, if the variable at that location was already zero, no harm done. Otherwise, problems. Fixes issue 8139. LGTM=dsymonds R=golang-codereviews, dsymonds CC=golang-codereviews, iant, r https://codereview.appspot.com/100940043
Rob Pike
cmd/gc: don't generate zillions of linehists for wrapper functions This is a workaround - the code should be better than this - but the fix avoids generating large numbers of linehist entries for the wrapper functions that enable interface conversions. There can be many of them, they all happen at the end of compilation, and they can all share a linehist entry. Avoids bad n^2 behavior in liblink. Test case in issue 8135 goes from 64 seconds to 2.5 seconds (still bad but not intolerable). Fixes issue 8135. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/104840043
Ian Lance Taylor
cmd/cgo: use same Go type for typedef to anonymous struct If we see a typedef to an anonymous struct more than once, presumably in two different Go files that import "C", use the same Go type name. Fixes issue 8133. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/102080043
Ian Lance Taylor
doc: mention WriteHeapDump in 1.3 release notes LGTM=r R=khr, r CC=golang-codereviews https://codereview.appspot.com/103810044
Andrew Gerrand
misc/makerelease: fix secret Not sure how this snuck in undetected. TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/106760043
Andrew Gerrand
tag go1.3rc1 LGTM=minux R=golang-codereviews, minux CC=golang-codereviews https://codereview.appspot.com/106750043
Shenghou Ma
doc/contrib.html: update links, mailing lists and link to 1.3 release note. LGTM=adg R=golang-codereviews, r, adg CC=golang-codereviews https://codereview.appspot.com/102020045
Andrew Gerrand
misc/makerelease: report uploads to the new downloads page LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102040047
Brad Fitzpatrick
api: add go1.3.txt Update Issue 8112 LGTM=adg R=adg CC=golang-codereviews https://codereview.appspot.com/104790045
Shenghou Ma
build: don't build goplay in run.rc. Fix plan 9 build. TBR=rsc R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/100880047
Russ Cox
cmd/objdump: add arm disassembler Fixes issue 7452. LGTM=minux, iant R=minux, iant CC=golang-codereviews https://codereview.appspot.com/104770046
Andrew Gerrand
cmd/dist: only use beta tag in version string for the exact revision Right now, any revision on the default branch after go1.3beta2 is described by "go verson" as go1.3beta2 plus some revision. That's OK for now, but once go1.3 is released, that will seem wrong. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/98650046
Andrew Gerrand
build: remove goplay from run.bash and run.bat TBR=rsc R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/106730043
Andrew Gerrand
misc/goplay: remove program This program has barely been touched since it was first committed, and in its current state it opens a code execution vector similar to the one that was recently fixed in go.tools/playground/socket. Rather than try to make it secure, remove it. LGTM=minux, rsc R=rsc, minux CC=golang-codereviews https://codereview.appspot.com/102030047
Russ Cox
runtime: fix correctness test at end of traceback We were requiring that the defer stack and the panic stack be completely processed, thinking that if any were left over the stack scan and the defer stack/panic stack must be out of sync. It turns out that the panic stack may well have leftover entries in some situations, and that's okay. Fixes issue 8132. LGTM=minux, r R=golang-codereviews, minux, r CC=golang-codereviews, iant, khr https://code…
Rob Pike
lib/timezone: update to IANA 2014d LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102040045
Keith Randall
runtime: mark some C globals as having no pointers. C globals are conservatively scanned. This helps avoid false retention, especially for 32 bit. LGTM=rsc R=golang-codereviews, khr, rsc CC=golang-codereviews https://codereview.appspot.com/102040043 Committer: Russ Cox <rsc@golang.org>
Russ Cox
runtime: make continuation pc available to stack walk The 'continuation pc' is where the frame will continue execution, if anywhere. For a frame that stopped execution due to a CALL instruction, the continuation pc is immediately after the CALL. But for a frame that stopped execution due to a fault, the continuation pc is the pc after the most recent CALL to deferproc in that frame, or else 0. That is where execution will continue, if anywhere. The …
Russ Cox
cmd/gc: fix handling of for post-condition in -race mode Fixes issue 8102. LGTM=bradfitz, dvyukov R=golang-codereviews, bradfitz, dvyukov CC=golang-codereviews https://codereview.appspot.com/100870046
Russ Cox
runtime: fix error check in freebsd/386 i386_set_ldt Update issue 2675 The code here was using the error check for Linux/386, not the one for FreeBSD/386. Most of the time it worked. Thanks to Neel Natu (FreeBSD developer) for finding this. The s/JCC/JAE/ a few lines later is a no-op but makes the test match the rest of the file. Why we write JAE instead of JCC I don't know, but the two are equivalent and the file might as well be consistent. LG…
Shenghou Ma
runtime/debug: skip TestWriteHeapDumpNonempty on NaCl. TestWriteHeap is useless on NaCl anyway. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/101980048
Shenghou Ma
C: add another email of mine. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102920047
minux
runtime: fix empty heap dump bug on windows. Fixes issue 8119. LGTM=khr, rsc R=alex.brainman, khr, bradfitz, rsc CC=golang-codereviews https://codereview.appspot.com/93640044
minux
cmd/cgo: document the cgo types also follow Go name space rules. Fixes issue 7958. LGTM=rsc R=golang-codereviews, rsc, r, gobot CC=golang-codereviews https://codereview.appspot.com/91520043
Russ Cox
cmd/6g: treat vardef-initialized fat variables as live at calls This CL forces the optimizer to preserve some memory stores that would be redundant except that a stack scan due to garbage collection or stack copying might look at them during a function call. As such, it forces additional memory writes and therefore slows down the execution of some programs, especially garbage-heavy programs that are already limited by memory bandwidth. The slowdown can be as …
Ian Lance Taylor
runtime: add zero field to rtype The rtype struct is meant to be a copy of reflect.rtype. The zero field was added to reflect.rtype in 18495:6e50725ac753. LGTM=rsc R=khr, rsc CC=golang-codereviews https://codereview.appspot.com/93660045
Russ Cox
cmd/gc: fix x=x crash [Same as CL 102820043 except applied changes to 6g/gsubr.c also to 5g/gsubr.c and 8g/gsubr.c. The problem I had last night trying to do that was that 8g's copy of nodarg has different (but equivalent) control flow and I was pasting the new code into the wrong place.] Description from CL 102820043: The 'nodarg' function is used to obtain a Node* representing a function argument or result. It retu…
Russ Cox
undo CL 102820043 / b0ce6dbafc18 Breaks 386 and arm builds. The obvious reason is that this CL only edited 6g/gsubr.c and failed to edit 5g/gsubr.c and 8g/gsubr.c. However, the obvious CL applying the same edit to those files (CL 101900043) causes mysterious build failures in various of the standard package tests, usually involving reflect. Something deep and subtle is broken but only on the 32-bit systems. Undo this CL for now.…
Russ Cox
cmd/gc: fix x=x crash The 'nodarg' function is used to obtain a Node* representing a function argument or result. It returned a brand new Node*, but that violates the guarantee in most places in the compiler that two Node*s refer to the same variable if and only if they are the same Node* pointer. Reestablish that invariant by making nodarg return a preexisting named variable if present. Having fixed that, avoid any c…
Andrew Gerrand
misc/makerelease: upload files to Google Cloud Storage LGTM=bradfitz R=jasonhall, bradfitz CC=golang-codereviews https://codereview.appspot.com/91700047
Russ Cox
doc/go1.3.html: math/big's Int and Rat implement TextMarshaler, TextUnmarshaler Update issue 8112 LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/95640043
Russ Cox
regexp: hide one-pass code from exported API Update issue 8112 Hide one-pass regexp API. This means moving the code from regexp/syntax to regexp, but it avoids being locked into the specific API chosen for the implementation. It also removes a slice field from the syntax.Inst, which should avoid bloating the memory footprint of a non-one-pass regexp unnecessarily. LGTM=r R=golang-codereviews, r CC=golang-codereviews, iant https://coderev…
Russ Cox
cmd/cgo: given typedef struct S T, make C.T and C.struct_S interchangeable For incomplete struct S, C.T and C.struct_S were interchangeable in Go 1.2 and earlier, because all incomplete types were interchangeable (even C.struct_S1 and C.struct_S2). CL 76450043, which fixed issue 7409, made different incomplete types different from Go's point of view, so that they were no longer completely interchangeable. However, imprecision about C.T and C.struct_S - really the same …
Robert Griesemer
spec: clarify that break/continue do not work across function boundaries Also made it extra clear for goto statements (even though label scopes are already limited to the function defining a label). Fixes issue 8040. LGTM=r, rsc R=r, rsc, iant, ken CC=golang-codereviews https://codereview.appspot.com/99550043
Brad Fitzpatrick
mime: sort attributes in FormatMediaType Map iteration order issue. Go 1.2 and earlier had stable results for small maps. Fixes Issue 8115 LGTM=r, rsc R=golang-codereviews, r CC=dsymonds, golang-codereviews, iant, rsc https://codereview.appspot.com/98580047
Brad Fitzpatrick
api: update next.txt LGTM=rsc R=golang-codereviews, rsc CC=adg, golang-codereviews https://codereview.appspot.com/99530044
Russ Cox
test/run: limit parallelism to 1 for cross-exec builds This matters for NaCl, which seems to swamp my 4-core MacBook Pro otherwise. It's not a correctness problem, just a usability problem. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/98600046
Russ Cox
test: expand issue7863 test This was sitting in my client but I forgot hg add. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/101800045 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Dmitriy Vyukov
runtime: fix go of nil func value Currently runtime derefences nil with m->locks>0, which causes unrecoverable fatal error. Panic instead. Fixes issue 8045. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews, khr https://codereview.appspot.com/97620043 Committer: Russ Cox <rsc@golang.org>
Russ Cox
cmd/gc: fix race compilation failure 'non-orig name' CL 51010045 fixed the first one of these: cmd/gc: return canonical Node* from temp For historical reasons, temp was returning a copy of the created Node*, not the original Node*. This meant that if analysis recorded information in the returned node (for example, n->addrtaken = 1), the analysis would not show up on the original Node*, the on…
Russ Cox
cmd/gc: fix defer copy(x, <-c) In the first very rough draft of the reordering code that was introduced in the Go 1.3 cycle, the pre-allocated temporary for a ... argument was held in n->right. It moved to n->alloc but the code avoiding n->right was left behind in order.c. In copy(x, <-c), the receive is in n->right and must be processed. Delete the special case code, removing the bug. Fixes issue 8039. LGTM=iant R=golang-cod…
Russ Cox
cmd/gc: fix infinite loop in nil check removal Fixes issue 8076. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/93610043
Russ Cox
cmd/gc: fix method value closures on nacl amd64p32 The code was assuming that pointer alignment is the maximum alignment, but on NaCl uint64 alignment is even more strict. Brad checked in the test earlier today; this fixes the build. Fixes issue 7863. TBR=iant CC=golang-codereviews https://codereview.appspot.com/98630046
Jan Ziak
cmd/go: do not miss an error if import path contains "cmd/something" Fixes issue 7638 LGTM=rsc R=rsc, adg, robert.hencke, bradfitz CC=golang-codereviews https://codereview.appspot.com/89280043 Committer: Russ Cox <rsc@golang.org>
Russ Cox
cmd/gc: fix conversion of runtime constant The code cannot have worked before, because it was trying to use the old value in a range check for the new type, which might have a different representation (hence the 'internal compiler error'). Fixes issue 8073. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/98630045
Keith Randall
runtime: stack copier should handle nil defers without faulting. fixes issue 8047 LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/101800043
Brad Fitzpatrick
test: add test for fixed issue 7863 Fixes Issue 7863 LGTM=rsc R=rsc, ruiu CC=golang-codereviews https://codereview.appspot.com/98610045
Rob Pike
cmd/go: improve error message when import path contains http:// Common mistake (at least for me) because hg etc. require the prefix while the go command forbids it. Before: % go get http://code.google.com/p/go.text/unicode/norm package http:/code.google.com/p/go.text/unicode/norm: unrecognized import path "http:/code.google.com/p/go.text/unicode/norm" After: % go get http://code.google.com/p/go.text/unicode/norm package http:/code.google.com/p/go.text/unicode/norm: "http://" not allowed in import path LGTM=ruiu, rsc R=rsc, ruiu CC=golang-codereviews https:/…
Dmitriy Vyukov
misc: properly spell Chrome in doc LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/99440046
Dave Cheney
runtime: skip stack growth test on 32bit platforms Update issue 8083 See discussion in https://groups.google.com/forum/#!topic/golang-dev/dh6Ra_xJomc LGTM=khr R=golang-codereviews, gobot, khr CC=golang-codereviews https://codereview.appspot.com/99440048
Keith Randall
doc: mention that reflect.SetMapIndex no longer panics when deleting from a nil map. See issue 8051. LGTM=r R=golang-codereviews, r, khr CC=golang-codereviews https://codereview.appspot.com/96540051
brainman
os: document that Interrupt might not work on every os Fixes issue 6720. LGTM=bradfitz R=golang-codereviews, iant, bradfitz CC=golang-codereviews https://codereview.appspot.com/92340043
Robert Griesemer
spec: explicitly disallow blank methods in interface types The spec was unclear about whether blank methods should be permitted in interface types. gccgo permits at most one, gc crashes if there are more than one, go/types permits at most one. Discussion: Since method sets of non-interface types never contain methods with blank names (blank methods are never declared), it is impossible to satisfy an interface with a blank method. It is possible to decl…
Russ Cox
doc/go1.3.html: change uintptr to integer in unsafe.Pointer section The key property here is what the bit pattern represents, not what its type is. Storing 5 into a pointer is the problem. Storing a uintptr that holds pointer bits back into a pointer is not as much of a problem, and not what we are claiming the runtime will detect. Longer discussion at https://groups.google.com/d/msg/golang-nuts/dIGISmr9hw0/0jO4ce85Eh0J LGTM=r R=r CC=golang-codereviews https://c…
Pietro Gagliardi
cmd/cgo: explicitly state that #cgo directives across multiple files are concatenated This is a quick documentation change/clarification, as this confused me before: in my own cgo-based projects, I currently have identical #cgo directives in each relevant source file, and I notice with go build -x that cgo is combining the directives, leading to pkg-config invocations with the same package name (gtk+-3.0, in my case) repeated several times, or on Mac OS X, LDFLAGS listing -framewor…
Ian Lance Taylor
A+C: Pietro Gagliardi (individual CLA) Generated by addca. R=gobot CC=golang-codereviews https://codereview.appspot.com/97660043
ceh
doc: fix typo in sharemem codewalk LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/98460045 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Keith Randall
runtime: provide gc maps for the reflect.callXX frames. Update issue 8030 LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/100620045
Anthony Martin
cmd/objdump: fix dissasembly of Plan 9 object files Ignore symbols that aren't text, data, or bss since they cause problems when dissassembling instructions with small immediate values. Before: build.go:142 0x10ee 83ec50 SUBL $text/template/parse.autotmp_1293(SB), SP After: build.go:142 0x10ee 83ec50 SUBL $0x50, SP Fixes issue 7947. LGTM=rsc R=rsc, 0intro CC=golang-codereviews https://codereview.appspot.com/935…
Russ Cox
test: fix two typos in float_lit2.go Noted by gri in CL 100660044 review but I missed them. TBR=gri CC=golang-codereviews https://codereview.appspot.com/97570049
Russ Cox
test/float_lit2.go: rewrite to test values near boundaries Add larger comment explaining testing methodology, and derive tests arithmetically. (These tests are checking rounding again; the derived tests they replace were checking exact values.) LGTM=r, gri R=gri, r CC=golang-codereviews https://codereview.appspot.com/100660044
Russ Cox
cmd/gc: fix floating point rounding again Passes the expanded test in CL 100660044, which gives me some confidence that it might be right. (The old code failed by not considering all the low bits.) LGTM=r R=golang-codereviews, r, bradfitz CC=golang-codereviews, iant, khr https://codereview.appspot.com/99410051
Rob Pike
fmt: fix floating-point padding once and for all Rewrite formatFloat to be much simpler and clearer and avoid the tricky interaction with padding. The issue refers to complex but the problem is just floating-point. The new tests added were incorrectly formatted before this fix. Fixes issue 8064. LGTM=jscrockett01, rsc R=rsc, jscrockett01 CC=golang-codereviews https://codereview.appspot.com/99420048
Russ Cox
cmd/go: fix coverage for 'package foo_test' tests Fixes issue 8062. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/91610046
Ian Lance Taylor
cmd/go: check for SWIG version that is too old to use Fixes issue 7983. LGTM=crawshaw R=golang-codereviews, crawshaw CC=golang-codereviews, rsc https://codereview.appspot.com/96540044
Robert Griesemer
test/float_lit2.go: fix constants for 386 platforms (fix build) LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/95480045
Robert Griesemer
test/float_lit2.go: compute test values from first principles These constants pass go/types constant conversions as well. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/91590047
Ian Lance Taylor
database/sql/driver: correct method name in comment Fixes issue 8061. LGTM=crawshaw R=golang-codereviews, crawshaw CC=golang-codereviews https://codereview.appspot.com/93520046
Benny Siegert
cmd/ld: correctly compute note size on NetBSD. Patch from http://gnats.NetBSD.org/48811. LGTM=iant R=golang-codereviews, minux.ma, iant CC=golang-codereviews, tk https://codereview.appspot.com/94670047 Committer: Ian Lance Taylor <iant@golang.org>
Ian Lance Taylor
cmd/ld: really import runtime/cgo for external link Fixes issue 8032. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95580043
Andrew Gerrand
tag go1.3beta1 and go1.3beta2 LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/100660043
Robert Griesemer
spec: specify order of init() calls The spec did not specify the order in which init() functions are called. Specify that they are called in source order since we have now also specified the initialization order of independent variables. While technically a language change, no existing code could have relied on this, so this should not break anything. Per suggestion from rsc. LGTM=r, iant R=rsc, iant, r, ken CC=golang-codereviews…
Keith Randall
reflect: don't panic on delete from nil map. Fixes issue 8051 LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/95560046
Robert Griesemer
spec: clarify section on package initialization - split description of package initialization and program execution - better grouping of concerns in section on package initialization - more explicit definition of what constitues a dependency - removed language about constant dependencies - they are computed at compile-time and not initialized at run-time - clarified that independent variables are initialized in declaration order (ra…
Rob Pike
doc/go_spec.html: fix broken anchor tag LGTM=gri R=gri CC=golang-codereviews https://codereview.appspot.com/99420045
Rob Pike
doc/install.html: fix duplicate id= tag LGTM=minux.ma R=adg, minux.ma CC=golang-codereviews https://codereview.appspot.com/95540045
minux
all: fix "the the" typos. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/93470043
minux
runtime: revise the document of Version() Fixes issue 7701. (again, differently) LGTM=rsc R=iant, rsc CC=golang-codereviews https://codereview.appspot.com/94560043
Brad Fitzpatrick
src: make nacltest.bash executable TBR=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/98480043
minux
undo CL 84040045 / 5302b4c58aa0 This idea was rejected in CL 5731059. We should fix the runtime docs instead. ««« original CL description cmd/dist: reflect local changes to tree in goversion runtime.Version() requires a trailing "+" when tree had local modifications at time of build. Fixes issue 7701 LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/84040045 Committer: Ian Lance Taylo…
David du Colombier
debug/plan9obj: cleanup api - Don't export Prog structure. - Remove ProgHeader and ExecTable structures. - Add Magic, Bss and Entry fields in FileHeader. - Replace ?_MAGIC variables with constants. - Ignore final EOF from ReadAt. - Improve documentation. Fixes issue 7989. LGTM=rsc R=rsc, bradfitz CC=golang-codereviews https://codereview.appspot.com/91400044 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Rob Pike
cmd/go: document file types Explain which files the go command looks at, and what they represent. Fixes issue 6348. LGTM=rsc R=rsc, minux.ma CC=golang-codereviews https://codereview.appspot.com/96480043
Russ Cox
doc/go1.3.html: mention cgo [0]byte bug fix fallout Fixes issue 7958. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/91590044
Russ Cox
build: make nacl pass Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes issue 7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://coder…
Russ Cox
test: test issue 7884 (already fixed) I don't know when the bug was fixed, but empirically it was. Make sure it stays fixed by adding a test. Fixes issue 7884. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews https://codereview.appspot.com/93500043
Russ Cox
syscall: fix Write(nil) on NaCl Fixes issue 7050. LGTM=crawshaw, r R=golang-codereviews, crawshaw, r CC=golang-codereviews https://codereview.appspot.com/91590043
Russ Cox
cmd/ld: make lldb happy with Mach-O 6.out files Apparently all the __DWARF sections need addresses even though they are marked as "do not load from disk". Continue the address numbering from the data segment. With this change: g% lldb helloworld Current executable set to 'helloworld' (x86_64). (lldb) b main.main Breakpoint 1: where = helloworld`main.main + 25 at helloworld.go:12, address = 0x0000000000002019 (lldb) r Process 68509 launched: '…
Andrew Gerrand
misc/makerelease: handle update tour file layout Fixes issue 7835. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/94670044
Mikio Hara
doc/go1.3.html: switch default stack size back to 8kB Update issue 8030 LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/94680043
Elias Naur
cmd/cgo: document CC_FOR_TARGET and CXX_FOR_TARGET Update issue 4714 LGTM=iant, minux.ma, rsc R=rsc, iant, r, minux.ma CC=golang-codereviews https://codereview.appspot.com/100390043 Committer: Russ Cox <rsc@golang.org>
Russ Cox
liblink: fix field tracking The USEFIELD instructions no longer make it to the linker, so we have to do something else to pin the references they were pinning. Emit a 0-length relocation of type R_USEFIELD. Fixes issue 7486. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/95530043
Russ Cox
runtime: switch default stack size back to 8kB The move from 4kB to 8kB in Go 1.2 was to eliminate many stack split hot spots. The move back to 4kB was predicated on copying stacks eliminating the potential for hot spots. Unfortunately, the fact that stacks do not copy 100% of the time means that hot spots can still happen under the right conditions, and the slowdown is worse now than it was in Go 1.2. There is a real program in issue 8030 t…
Russ Cox
cmd/gc: fix float32 const conversion and printing of big float consts The float32 const conversion used to round to float64 and then use the hardware to round to float32. Even though there was a range check before this conversion, the double rounding introduced inaccuracy: the round to float64 might round the value further away from the float32 range, reaching a float64 value that could not actually be rounded to float32. The hardware appears to give us 0 in that ca…
minux
cmd/ld: abort if (32-bit) address relocation is negative on amd64. Update issue 7980 This CL make the linker abort for the example program. For Go 1.4, we need to find a general way to handle large memory model programs. LGTM=dave, josharian, iant R=iant, dave, josharian CC=golang-codereviews https://codereview.appspot.com/91500046 Committer: Russ Cox <rsc@golang.org>
Rob Pike
text/template,html/template: document that partial results may be written on error Fixes issue 7445. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/94640043
Russ Cox
cmd/gc: fix <-<-expr The temporary-introducing pass was not recursing into the argumnt of a receive operation. Fixes issue 8011. LGTM=r R=golang-codereviews, r CC=golang-codereviews, iant, khr https://codereview.appspot.com/91540043
Brad Fitzpatrick
net/http: document that ProxyFromEnvironment special-cases localhost Fixes Issue 7256 LGTM=r R=golang-codereviews, r CC=golang-codereviews, rsc https://codereview.appspot.com/97590043
Brad Fitzpatrick
database/sql: more docs explaining that DB is a pool This is the main point of confusion and the emphasis of a recent Gophercon talk. Fixes Issue 5886. (mostly fixed in previous commits) LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/100560043
Russ Cox
math/rand: restore Go 1.2 value stream for Float32, Float64 CL 22730043 fixed a bug in these functions: they could return 1.0 despite documentation saying otherwise. But the fix changed the values returned in the non-buggy case too, which might invalidate programs depending on a particular stream when using rand.Seed(0) or when passing their own Source to rand.New. The example test says: // These tests serve as an example but also make sure we don…
Robert Griesemer
spec: clarify when a program exits Fixes issue 8023. LGTM=rsc R=r, iant, ken, rsc CC=golang-codereviews https://codereview.appspot.com/98340043
Aram Hăvărneanu
doc/go1.3.html: minor tweak of Solaris wording Discussion here: https://codereview.appspot.com/100490044/#msg14 LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/98350043 Committer: Rob Pike <r@golang.org>
Russ Cox
reflect: test, fix access to nil maps Fixes issue 8010. LGTM=bradfitz, khr R=khr, bradfitz, dvyukov CC=golang-codereviews https://codereview.appspot.com/91450048
Dmitriy Vyukov
runtime: fix freeOSMemory to free memory immediately Currently freeOSMemory makes only marking phase of GC, but not sweeping phase. So recently memory is not released after freeOSMemory. Do both marking and sweeping during freeOSMemory. Fixes issue 8019. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rsc https://codereview.appspot.com/97550043
Andrew Gerrand
C: add Burcu Dogan (Google CLA) LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/94610043
Mikio Hara
doc/go1.3.html: fix typo LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/92440043
Dave Cheney
syscall: fix arm build Rename Seek to seek in asm file, was overlooked in CL 99320043. LGTM=bradfitz, r R=r, rsc, bradfitz CC=golang-codereviews https://codereview.appspot.com/99320044
Brad Fitzpatrick
net/http: allow Content-Type on 204 responses Accidental change from fixing Content-Length on 204s in http://golang.org/issue/6685 earlier. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/92400047
Rob Pike
lib/time/zoneinfo.zip: update to IANA release 2014c LGTM=minux.ma R=golang-codereviews, minux.ma CC=golang-codereviews https://codereview.appspot.com/93420046
Mikio Hara
doc/go1.3.html: update the state of supported platforms LGTM=r R=golang-codereviews, aram, 0intro, gobot, r CC=golang-codereviews https://codereview.appspot.com/100490044
Rob Pike
encoding/xml: fix format in test message Found by go vet. LGTM=crawshaw R=golang-codereviews, crawshaw CC=golang-codereviews https://codereview.appspot.com/100510044
Ian Lance Taylor
spec: clarify that newlines are kept in raw string literals Fixes issue 8007. LGTM=r R=gri, r CC=golang-codereviews https://codereview.appspot.com/91510044
Rob Pike
syscall: fix linux amd64 build TBR=rsc TBR=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/100500047
Russ Cox
syscall: fix a few Linux system calls These functions claimed to return error (an interface) and be implemented entirely in assembly, but it's not possible to create an interface from assembly (at least not easily). In reality the functions were written to return an errno uintptr despite the Go prototype saying error. When the errno was 0, they coincidentally filled out a nil error by writing the 0 to the type word of the interface. …
Russ Cox
doc/go1.3.html: add note about small map iteration order LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/98290048
David du Colombier
cmd/addr2line, cmd/objdump: handle Plan 9 a.out object files Update issue 7947. LGTM=iant R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/91500044
Mikio Hara
doc/go1.3.html: add syscall.SendmsgN LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/93430044
Anthony Martin
cmd/pack: buffer writes in TestLargeDefs TestLargeDefs was issuing over one million small writes to create a 7MB file (large.go). This is quite slow on Plan 9 since our disk file systems aren't very fast and they're usually accessed over the network. Buffering the writes makes the test about six times faster. Even on Linux, it's about 1.5 times faster. Here are the results on a slow Plan 9 machine: Before: % ./pack.test -test.…
minux
api: update next.txt LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/95490043
Russ Cox
cmd/gc: fix two select temporary bugs The introduction of temporaries in order.c was not quite right for two corner cases: 1) The rewrite that pushed new variables on the lhs of a receive into the body of the case was dropping the declaration of the variables. If the variables escape, the declaration is what allocates them. Caught by escape analysis sanity check. In fact the declarations should move into the body always, so that we o…
creack
archive/tar: Do not panic on Read if uninitialized Calling tar.Reader.Read() used to work fine, but without this patch it panics. Simply return EOF to indicate the tar.Reader.Next() needs to be called. LGTM=iant, bradfitz R=golang-codereviews, bradfitz, iant, mikioh.mikioh, dominik.honnef CC=golang-codereviews https://codereview.appspot.com/94530043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Mikio Hara
api: update openbsd exceptions This CL restores dropped constants not supported in OpenBSD 5.5 and tris to keep the promise of API compatibility. Update issue 7049 LGTM=jsing, bradfitz R=rsc, jsing, bradfitz CC=golang-codereviews https://codereview.appspot.com/94950043
Mikio Hara
syscall: regenerate z-files for openbsd This CL restores dropped constants not supported in OpenBSD 5.5 and tris to keep the promise of API compatibility. Update issue 7049 LGTM=jsing, bradfitz, rsc R=rsc, jsing, robert.hencke, minux.ma, bradfitz, iant CC=golang-codereviews https://codereview.appspot.com/96970043
Robert Griesemer
container/heap: update example code - use Init to establish heap invariant on a non-empty heap - use Fix to update heap after an element's properties have been changed (The old code used Init where it wasn't needed, and didn't use Fix because Fix was added after the example was written.) LGTM=bradfitz R=adonovan, bradfitz CC=golang-codereviews https://codereview.appspot.com/94520043
Russ Cox
syscall: fix stack frame sizes in assembly for GOOS in darwin freebsd linux nacl netbsd openbsd plan9 solaris windows do for GOARCH in 386 amd64 amd64p32 arm do go vet done done These are all real mistakes being corrected, but none of them should be able to cause problems today due to the NOSPLIT on the functions. However, vet has also identified a few important problems. I'm sending this CL to get…
Russ Cox
sync/atomic: fix unimportant assembly errors found by go vet None of these are real bugs. The variable name in the reference is not semantically meaningful, except that 'go vet' will double check the offset against the name for you. The stack sizes being corrected really are incorrect but they are also in NOSPLIT functions so they typically don't matter. Found by vet. GOOS=linux GOARCH=amd64 go vet sync/atomic GOOS=linux GOARCH=amd64p32 go vet sync/atomi…
Russ Cox
doc/go1.3.html: add note about unsafe.Pointer strictness The vet check is in CL 10470044. LGTM=bradfitz, r R=r, bradfitz CC=golang-codereviews https://codereview.appspot.com/91480044
Russ Cox
runtime: make scan of pointer-in-interface same as scan of pointer The GC program describing a data structure sometimes trusts the pointer base type and other times does not (if not, the garbage collector must fall back on per-allocation type information stored in the heap). Make the scanning of a pointer in an interface do the same. This fixes a crash in a particular use of reflect.SliceHeader. Fixes issue 8004. LGTM=khr R=golang-codereviews, khr CC=0xe2.0x9a.…
Mikio Hara
net/http: fix nits found by go tool vet LGTM=ruiu R=golang-codereviews, ruiu CC=golang-codereviews https://codereview.appspot.com/91480043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Russ Cox
cmd/gc: correct handling of globals, func args, results Globals, function arguments, and results are special cases in registerization. Globals must be flushed aggressively, because nearly any operation can cause a panic, and the recovery code must see the latest values. Globals also must be loaded aggressively, because nearly any store through a pointer might be updating a global: the compiler cannot see all the "address of" operations on globals, esp…
Russ Cox
cmd/gc: fix duplicate map key check Do not compare nil and true. Fixes issue 7996. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://codereview.appspot.com/91470043
Russ Cox
crypto/sha256, crypto/sha512: fix argument size in assembly The function takes 32 bytes of arguments: 8 for the *block and then 3*8 for the slice. The 24 is not causing a bug (today at least) because the final word is the cap of the slice, which the assembly does not use. Identified by 'go vet std'. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/96360043
brainman
cmd/addr2line,cmd/objdump: test that commands accept addresses with 0x prefix and without LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/100440045
brainman
misc/pprof: always use go tool objdump on windows Fixes issue 7406. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://codereview.appspot.com/97440043
brainman
cmd/addr2line, cmd/objdump: fix pe text section starting address fixes windows build LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/97500043
Russ Cox
cmd/nm, cmd/objdump: fix elf symbol types Turns out elf.File.Sections is indexed by the actual section number, not the number minus one. I don't know why I thought the -1 was necessary. Fixes objdump test (and therefore build) on ELF systems. While we're here, fix bounds on gnuDump so that we don't crash when asked to disassemble outside the text segment. May fix Windows build or at least make the failure more interesting. TBR=iant CC=…
creack
net: detect changes to /etc/resolv.conf. Implement the changes as suggested by rsc. Fixes issue 6670. LGTM=josharian, iant R=golang-codereviews, iant, josharian, mikioh.mikioh, alex, gobot CC=golang-codereviews, rsc https://codereview.appspot.com/83690045 Committer: Ian Lance Taylor <iant@golang.org>
Russ Cox
objdump: implement disassembly There is some duplication here with cmd/nm. There is a TODO to address that after 1.3 is out. Update issue 7452 x86 disassembly works and is tested. The arm disassembler does not exist yet and is therefore not yet hooked up. LGTM=crawshaw, iant R=crawshaw, iant CC=golang-codereviews https://codereview.appspot.com/91360046
Russ Cox
cmd/objdump: import x86 disassembler The x86 disassembler lives in rsc.io/x86/x86asm for now. We need to figure out what should live where in the long term, but not before the 1.3 release. The completed code reviews for the disassembler are at: https://codereview.appspot.com/95350044 https://codereview.appspot.com/95300044 https://codereview.appspot.com/97100047 https://codereview.appspot.com/93110044 https://codereview.appspot.com/…
Andrew Gerrand
A+C: Cezar Sá Espinola (individual CLA) Generated by addca. R=gobot CC=golang-codereviews https://codereview.appspot.com/92380043
Mikio Hara
test: fix flakey test case for issue 4388 Seems like we need to drag the stack for <autogenerated>:1 on Plan 9. See http://build.golang.org/log/283b996102b833dd81c58301d78aceaa4fe9838b. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95390043
Rob Pike
doc/effective_go.html: a little more about errors Make it a little clearer how they are used, in particular that it is not enough just to return a nil pointer on error, but also to return an error value explaining the problem. Fixes issue 1963. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/97360045
Robert Griesemer
spec: more precise description of select statement - use previously defined terms (with links) throughout - specify evaluation order more precisely (in particular, the evaluation time of rhs expressions in receive cases was not specified) - added extra example case Not a language change. Description matches observed behavior of code compiled with gc and gccgo. Fixes issue 7669. LGTM=iant, r, rsc R=r, rsc, iant, ken, josharian CC=golang-cod…
creack
archive/tar: Fix bug preventing untar Do not use ustar format if we need the GNU one. Change \000 to \x00 for consistency Check for "ustar\x00" instead of "ustar\x00\x00" for conistency with tar and compatiblity with archive generated with older code (which was ustar\x00\x20\x00) Add test for long name + big file. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/99050043 Committer: Ian Lance …
Dmitriy Vyukov
cmd/gc: fix out of bounds access AddressSanitizer says: AddressSanitizer: heap-buffer-overflow on address 0x60200001b6f3 READ of size 6 at 0x60200001b6f3 thread T0 #0 0x46741b in __interceptor_memcmp asan_interceptors.cc:337 #1 0x4b5794 in compile src/cmd/6g/../gc/pgen.c:177 #2 0x509b81 in funccompile src/cmd/gc/dcl.c:1457 #3 0x520fe2 in p9main src/cmd/gc/lex.c:489 #4 0x5e2e01 in main src/lib9/main.c:57 #5 0x7fab81f7976c in __li…
Mikio Hara
net: fix documentation for SetLinger Fixes issue 7974. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/95320043
Rob Pike
regexp/syntax: don't waste time checking for one pass algorithm The code recurs very deeply in cases like (?:x{1,1000}){1,1000} Since if much time is spent checking whether one pass is possible, it's not worth doing at all, a simple fix is proposed: Stop if the check takes too long. To do this, we simply avoid machines with >1000 instructions. Benchmarks show a percent or less change either way, effectively zero. Fixes issue 7608. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/92290043
Dmitriy Vyukov
reflect: fix map type generation If a map variable is created with reflect.New it has incorrect type (map[unsafe.Pointer]unsafe.Pointer). If GC follows such pointer, it scans Hmap and buckets with incorrect type. This can lead to overscan of up to 120 bytes for map[int8]struct{}. Which in turn can lead to crash if the memory after a bucket object is unaddressable or false retention (buckets are scanned as arrays of unsafe.Pointer). I don't see how it can lead to heap corruptions, though. LGTM=khr R=rsc, khr CC=golang-codereviews https://codereview.appspot.com/96270044
Dmitriy Vyukov
runtime: fix triggering of forced GC mstats.last_gc is unix time now, it is compared with abstract monotonic time. On my machine GC is forced every 5 mins regardless of last_gc. LGTM=rsc R=golang-codereviews CC=golang-codereviews, iant, rsc https://codereview.appspot.com/91350045
Russ Cox
cmd/go: fix go test again Fixes subrepo builds. LGTM=iant, mikioh.mikioh R=golang-codereviews, iant, mikioh.mikioh CC=golang-codereviews https://codereview.appspot.com/96310043
Russ Cox
runtime: handle decommit failure gracefully on Windows I have no test case for this at tip. The original report included a program crashing at revision 88ac7297d2fa. I tested this code at that revision and it does fix the crash. However, at tip the reported code no longer crashes, presumably because some allocation patterns have changed. I believe the bug is still present at tip and that this code still fixes it. Fixes issue 7143. LGTM=alex.brainman…
Russ Cox
cmd/cgo: omit misaligned struct fields, like we omit bitfields Fixes issue 7560. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/96300045
Russ Cox
io: copy slice argument in MultiReader and MultiWriter Replaces CL 91240045. Fixes issue 7809. LGTM=bradfitz R=golang-codereviews, minux.ma CC=adg, bradfitz, golang-codereviews, iant, r https://codereview.appspot.com/94380043
Russ Cox
encoding/json: document what unmarshal of `null` into non-reference type does Originally it was an error, which made perfect sense, but in issue 2540 I got talked out of this sensible behavior. I'm not thrilled with the "new" behavior but it's been there since Go 1.1 so we're stuck with it now. Fixes issue 6724. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/100430043
Jason Del Ponte
encoding/xml: fix to allow xml declaration with EncodeToken This changes allows the first token encoded to be a xml declaration. A ProcInst with target of xml. Any other ProcInst after that with a target of xml will fail Fixes Issue 7380. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/72410043 Committer: Russ Cox <rsc@golang.org>
Russ Cox
A+C: Jason Del Ponte (individual CLA) Generated by addca. R=gobot CC=golang-codereviews https://codereview.appspot.com/100410045
710 commits not shown.