- 31 Jan, 2013 17 commits
-
-
Russ Cox authored
This is a backwards compatible API change that fixes broken code. In Go 1.0, ReadFull(r, buf) could return either len(buf), nil or len(buf), non-nil. Most code expects only the former, so do that and document the guarantee. Code that was correct before is still correct. Code that was incorrect before, by assuming the guarantee, is now correct too. The same applies to ReadAtLeast. Fixes #4544. R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/7235074
-
Russ Cox authored
Also document %2f vs / ambiguity in URL.Path. Fixes #3913. Fixes #3659. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7225076
-
Russ Cox authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7221079
-
Adam Langley authored
Someone found software that generates negative numbers for the RSA modulus in an X.509 certificate. Our error messages were very poor in this case so this change improves that. Update #4728 Return more helpful errors when RSA parameters are negative or zero. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7228072
-
Russ Cox authored
* Reject import paths of the form cmd/x/y. * Reject 'go install' of command outside GOPATH * Clearer error rejecting 'go install' of package outside GOPATH. * Name temporary binary for first file in 'go run' list or for test. * Provide a way to pass -ldflags arguments with spaces. * Pass all Go files (even +build ignored ones) to go fix, go fmt, go vet. * Reject 'go run foo_test.go'. * Silence 'exit 1' prints from 'go tool' invocations. * Make go test -xxxprofile leave binary behind for analysis. * Reject ~ in GOPATH except on Windows. * Get a little less confused by symlinks. * Document that go test x y z runs three test binaries. * Fix go test -timeout=0. * Add -tags flag to 'go list'. * Use pkg/gccgo_$GOOS_$GOARCH for gccgo output. Fixes #3389. Fixes #3500. Fixes #3503. Fixes #3760. Fixes #3941. Fixes #4007. Fixes #4032. Fixes #4074. Fixes #4127. Fixes #4140. Fixes #4311. Fixes #4568. Fixes #4576. Fixes #4702. R=adg CC=golang-dev https://golang.org/cl/7225074
-
Russ Cox authored
Fixes #4599. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7226067
-
Russ Cox authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7228067
-
Russ Cox authored
Fixes #3802. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7228066
-
Russ Cox authored
Fixes #4664. R=golang-dev, adg CC=golang-dev https://golang.org/cl/7237060
-
Rémy Oudompheng authored
The linker accepts MOVB involving non-byte-addressable registers, by generating XCHG instructions to AX or BX. It does not handle the case where nor AX nor BX are available. See also revision 1470920a2804. Assembling TEXT ·Truc(SB),7,$0 MOVB BP, (BX)(AX*1) RET gives before: 08048c60 <main.Truc>: 8048c60: 87 dd xchg %ebx,%ebp 8048c62: 88 1c 03 mov %bl,(%ebx,%eax,1) 8048c65: 87 dd xchg %ebx,%ebp 8048c67: c3 ret and after: 08048c60 <main.Truc>: 8048c60: 87 cd xchg %ecx,%ebp 8048c62: 88 0c 03 mov %cl,(%ebx,%eax,1) 8048c65: 87 cd xchg %ecx,%ebp 8048c67: c3 ret R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7226066
-
Rémy Oudompheng authored
R=rsc, lvd, golang-dev, kardianos CC=golang-dev https://golang.org/cl/7093050
-
Caleb Spare authored
This adds a simple IntHeap example, and modifies the more complex PriorityQueue example to make use of the index field it maintains. Fixes #4331. R=rsc, adg CC=golang-dev https://golang.org/cl/7068048
-
Alex Brainman authored
Fixes #4569. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/6972047
-
Nigel Tao authored
examples at http://publicsuffix.org/. That website previously listed pvt.k12.wy.us, but that was an error, as confirmed by correspondance with submissions@publicsuffix.org, and the website was fixed on 2013-01-23. R=adg CC=dr.volker.dobler, golang-dev https://golang.org/cl/7241053
-
Robert Daniel Kortschak authored
Fixes #4685. R=golang-dev, adg, remyoudompheng, rsc CC=golang-dev https://golang.org/cl/7205047
-
Rick Arnold authored
Attempt 2. The first fix was much faster but ignored syntax errors. benchmark old ns/op new ns/op delta BenchmarkCodeEncoder 74993543 72982390 -2.68% BenchmarkCodeMarshal 77811181 75610637 -2.83% BenchmarkCodeDecoder 213337123 190144982 -10.87% BenchmarkCodeUnmarshal 212180972 190394852 -10.27% BenchmarkCodeUnmarshalReuse 202113428 182106660 -9.90% BenchmarkUnmarshalString 1343 919 -31.57% BenchmarkUnmarshalFloat64 1149 908 -20.97% BenchmarkUnmarshalInt64 967 778 -19.54% BenchmarkSkipValue 28851581 28414125 -1.52% benchmark old MB/s new MB/s speedup BenchmarkCodeEncoder 25.88 26.59 1.03x BenchmarkCodeMarshal 24.94 25.66 1.03x BenchmarkCodeDecoder 9.10 10.21 1.12x BenchmarkCodeUnmarshal 9.15 10.19 1.11x BenchmarkSkipValue 69.05 70.11 1.02x Fixes #3949. R=rsc CC=golang-dev https://golang.org/cl/7231058
-
Russ Cox authored
Generated by addca. R=gobot CC=golang-dev https://golang.org/cl/7245045
-
- 30 Jan, 2013 23 commits
-
-
Alan Donovan authored
The time to test all of math/big is now: default => ~3min --test.short => 150ms R=rsc CC=golang-dev https://golang.org/cl/7223054
-
Brad Fitzpatrick authored
Fixes #4724 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7225071
-
Anthony Martin authored
R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/7095067
-
Anthony Martin authored
R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/7235064
-
Russ Cox authored
Fixes #4699. R=golang-dev, agl CC=golang-dev https://golang.org/cl/7231065
-
Brad Fitzpatrick authored
This code never worked. Maybe it's not necessary? R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7225070
-
Marcel van Lohuizen authored
ICU and collate package: ICU requires strings to be in FCD form. Not all NFC strings are in this form, leading to incorrect results. Change to NFD instead. R=rsc CC=golang-dev https://golang.org/cl/7201043
-
Rémy Oudompheng authored
Export data was broken after revision 6b602ab487d6 when -l is specified at least 3 times: it makes the compiler write out func (*T).Method() declarations in export data, which is not supported. Also fix the formatting of recover() in export data. It was not treated like panic() and was rendered as "<node RECOVER>". R=golang-dev, lvd, minux.ma, rsc CC=golang-dev https://golang.org/cl/7067051
-
Daniel Morsing authored
Fixes #4264. R=cldorian, rsc CC=golang-dev https://golang.org/cl/6845113
-
Jeff R. Allen authored
Handle return values from recvfrom correctly when the kernel decides to not return an address. Fixes #4636. Fixes #4352. R=rsc, mikioh.mikioh, dave CC=golang-dev https://golang.org/cl/7058062
-
Akshat Kumar authored
If os.OpenFile holds ForkLock on files that block opens, then threads that simultaneously try to do fork-exec will get hung up (until the open succeeds). Blocked opens are common enough on Plan 9 that protecting against fd leaks into fork-execs means not being able to do fork-execs properly in the general case. Thus, we forgo taking the lock. R=rsc, ality CC=golang-dev https://golang.org/cl/7235066
-
Michael Teichgräber authored
An hostport of "[::1]" now results in the same error message "missing port in address" as the hostport value "127.0.0.1", so SplitHostPort won't complain about "too many colons in address" anymore for an IPv6 address missing a port. Added tests checking the error values. Fixes #4526. R=dave, rsc, mikioh.mikioh CC=golang-dev https://golang.org/cl/7038045
-
Russ Cox authored
Generated by addca. R=gobot CC=golang-dev https://golang.org/cl/7237057
-
Russ Cox authored
I am still not convinced this is a change we should make, but at least documenting it will keep us from forgetting it as we get closer to Go 1.1. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7226064
-
Andrey Mirtchovski authored
The JSON unmarshaller failed to allocate an array when there are no values for the input causing the `[]` unmarshalled to []interface{} to generate []interface{}(nil) rather than []interface{}{}. This wasn't caught in the tests because Decode() works correctly and because jsonBig never generated zero-sized arrays. The modification to scanner_test.go quickly triggers the error: without the change to decoder.go, but with the change to scanner_test.go: $ go test --- FAIL: TestUnmarshalMarshal (0.10 seconds) decode_test.go:446: Marshal jsonBig scanner_test.go:206: diverge at 70: «03c1OL6$":null},{"[=» vs «03c1OL6$":[]},{"[=^\» FAIL exit status 1 FAIL encoding/json 0.266s Also added a simple regression to decode_test.go. R=adg, dave, rsc CC=golang-dev https://golang.org/cl/7196050
-
Russ Cox authored
R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7226063
-
Jan Ziak authored
Binary data in mprof.goc may prevent the garbage collector from freeing memory blocks. This patch replaces all calls to runtime·mallocgc() with calls to an allocator private to mprof.goc, thus making the private memory invisible to the garbage collector. The addrhash variable is moved outside of the .bss section. R=golang-dev, dvyukov, rsc, minux.ma CC=dave, golang-dev, remyoudompheng https://golang.org/cl/7135063
-
Elias Naur authored
Added the -shared flag to 5l/6l to output a PIC executable with the required dynamic relocations and RIP-relative addressing in machine code. Added dummy support to 8l to avoid compilation errors See also: https://golang.org/cl/6822078 https://golang.org/cl/7064048 and https://groups.google.com/d/topic/golang-nuts/P05BDjLcQ5k/discussion R=rsc, iant CC=golang-dev https://golang.org/cl/6926049
-
Russ Cox authored
Fixes #4729. R=golang-dev, iant CC=golang-dev https://golang.org/cl/7232060
-
Russ Cox authored
Generated by addca. R=gobot CC=golang-dev https://golang.org/cl/7230054
-
James Gray authored
To allow for stdcall decorated names on Windows, two changes were needed: 1. Change the symbol versioning delimiter '@' in cgo's dynimport output to a '#', and in cmd/ld when it parses dynimports. 2. Remove the "@N" decorator from the first argument of cgo's dynimport output (PE only). Fixes #4607. R=minux.ma, adg, rsc CC=golang-dev https://golang.org/cl/7047043
-
Adam Langley authored
(Although it's still half the speed of OpenSSL.) benchmark old ns/op new ns/op delta BenchmarkRC4_128 1409 398 -71.75% BenchmarkRC4_1K 10920 2898 -73.46% BenchmarkRC4_8K 131323 23083 -82.42% benchmark old MB/s new MB/s speedup BenchmarkRC4_128 90.83 321.43 3.54x BenchmarkRC4_1K 93.77 353.28 3.77x BenchmarkRC4_8K 61.65 350.73 5.69x R=rsc, remyoudompheng CC=golang-dev, jgrahamc https://golang.org/cl/7234055
-
Russ Cox authored
Exposing this on the Encoder allows streaming generation of indented XML. R=golang-dev, rogpeppe CC=golang-dev https://golang.org/cl/7221075
-