- 19 Nov, 2015 6 commits
-
-
Austin Clements authored
A sigprof during stack barrier insertion or removal can crash if it detects an inconsistency between the stkbar array and the stack itself. Currently we protect against this when scanning another G's stack using stackLock, but we don't protect against it when unwinding stack barriers for a recover or a memmove to the stack. This commit cleans up and improves the stack locking code. It abstracts out the lock and unlock operations. It uses the lock consistently everywhere we perform stack operations, and pushes the lock/unlock down closer to where the stack barrier operations happen to make it more obvious what it's protecting. Finally, it modifies sigprof so that instead of spinning until it acquires the lock, it simply doesn't perform a traceback if it can't acquire it. This is necessary to prevent self-deadlock. Updates #11863, which introduced stackLock to fix some of these issues, but didn't go far enough. Updates #12528. Change-Id: I9d1fa88ae3744d31ba91500c96c6988ce1a3a349 Reviewed-on: https://go-review.googlesource.com/17036Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Currently, if a profiling signal happens in the middle of stackBarrier, gentraceback may see inconsistencies between stkbar and the barriers on the stack and it will certainly get the wrong return PC for stackBarrier. In most cases, the return PC won't be a PC at all and this will immediately abort the traceback (which is considered okay for a sigprof), but if it happens to be a valid PC this may sent gentraceback down a rabbit hole. Fix this by detecting when the gentraceback starts in stackBarrier and simulating the completion of the barrier to get the correct initial frame. Change-Id: Ib11f705ac9194925f63fe5dfbfc84013a38333e6 Reviewed-on: https://go-review.googlesource.com/17035Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
This CL adds skipped failing tests, showing differences between HTTP/1 and HTTP/2 behavior. They'll be fixed in later commits. Only a tiny fraction of the net/http tests have been split into their "_h1" and "_h2" variants. That will also continue. (help welcome) Updates #6891 Updates #13315 Updates #13316 Updates #13317 Change-Id: I16c3c381dbe267a3098fb266ab0d804c36473a64 Reviewed-on: https://go-review.googlesource.com/17046 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fix regression from https://golang.org/cl/16829 ("require valid methods in NewRequest and Transport.RoundTrip"). An empty string is a valid method (it means "GET", per the docs). Fixes #13311 Change-Id: I26b71dc4ccc146498b5d7e38fbe31ed11dd5a6cf Reviewed-on: https://go-review.googlesource.com/16952 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I22d40248e83fcad5ab73c0d402183d06e91064c7 Reviewed-on: https://go-review.googlesource.com/16388Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: If1faa2bba28a4e9a8061693173797c4114a7d699 Reviewed-on: https://go-review.googlesource.com/16387Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 18 Nov, 2015 22 commits
-
-
Robert Griesemer authored
For #13243. Change-Id: I802cef3dad5d1236e70d0cd52047008a6a7a311a Reviewed-on: https://go-review.googlesource.com/17045Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
For #13243. Change-Id: I544a8c44971fad126103157575e983ab528309bf Reviewed-on: https://go-review.googlesource.com/17044Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Change-Id: Ie24d56422ae2196198a6c306716fa867c1442d6e Reviewed-on: https://go-review.googlesource.com/17043Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Handling of &(T{}) assumed that the parser would not introduce ()'s. Also: Better comments around handling of OPAREN syntax tree optimization. Fixes #13261. Change-Id: Ifc5047a0448f5e7d74cd42f6608b87dcc9c2f2fb Reviewed-on: https://go-review.googlesource.com/17040Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Also: - better error messages in some cases - factored out function to produce syntax error at given line number Fixes #13273. Change-Id: I0192a94731cc23444680a26bd0656ef663e6da0b Reviewed-on: https://go-review.googlesource.com/16992Reviewed-by: Chris Manghane <cmang@golang.org>
-
Ian Lance Taylor authored
Found by cmd/vet. Change-Id: Id570ecd76c3f1efd9696680ccd9799610217f8f7 Reviewed-on: https://go-review.googlesource.com/17042 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I97504a11291ee60e656efb7704e37387e864d74f Reviewed-on: https://go-review.googlesource.com/16385Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
This works by adding a call to __x86.get_pc_thunk.cx immediately before any instruction that accesses global data and then assembling the instruction to use the appropriate offset from CX instead of the absolute address. Some forms cannot be assembled that way and are rewritten to load the address into CX first. -buildmode=pie works now, but is not yet tested. Fixes #13201 (I think) Change-Id: I32a8561e7fc9dd4ca6ae3b0e57ad78a6c50bf1f5 Reviewed-on: https://go-review.googlesource.com/17014Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
I was prodded into doing this in review comments for the ARM version, and it's going to make shared libs for 386 easier. Change-Id: Id12de801b1425b8c6b5736fe91b418fc123a4e40 Reviewed-on: https://go-review.googlesource.com/17012Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
Does not fix #12327 but nicer anyway. Change-Id: I4ad730a4ca833d76957b7571895b3a08a6a530d4 Reviewed-on: https://go-review.googlesource.com/16964Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #12686. Change-Id: I7a9f49dbd1f60b1d0240de57787753b425f9548c Reviewed-on: https://go-review.googlesource.com/17031Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Cgo-created threads transition between having associated Go g's and m's and not. A signal arriving during the transition could think it was safe and appropriate to run Go signal handlers when it was in fact not. Avoid the race by masking all signals during the transition. Fixes #12277. Change-Id: Ie9711bc1d098391d58362492197a7e0f5b497d14 Reviewed-on: https://go-review.googlesource.com/16915Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Change-Id: I373a64fc30dee804d99e106d4627b780e1846917 Reviewed-on: https://go-review.googlesource.com/16999Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
This reverts commit 7db77271. Change-Id: I6d8855eb05ca331025dc49a5533c6da4d1fa4e84 Reviewed-on: https://go-review.googlesource.com/17030Reviewed-by: Russ Cox <rsc@golang.org>
-
Caleb Spare authored
Change-Id: Ieba62c0cb668daeb343f72fdd568e46b0b21b7d6 Reviewed-on: https://go-review.googlesource.com/16998Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Ian Lance Taylor authored
An internal link may need the C compiler support library, libgcc.a. Add a -libgcc option to set the name of the compiler support library. If -libgcc is not used, run the compiler to find it. Permit -libgcc=none to skip using libgcc at all and hope for the best. Change cmd/dist to not copy libgcc into the distribution. Add tests to ensure that all the standard packages that use cgo can be linked in internal mode without using libgcc. This ensures that somebody with a Go installation without a C compiler can build programs. Change-Id: I8ba35fb87ab0dd20e5cc0166b5f4145b04ce52a4 Reviewed-on: https://go-review.googlesource.com/16993Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Michael Hudson-Doyle authored
This includes the first parts of the general approach to PIC: load PC into CX whenever it is needed. This is going to lead to large binaries and poor performance but it's a start and easy to get right. Change-Id: Ic8bf1d0a74284cca0d94a68cf75024e8ab063b4e Reviewed-on: https://go-review.googlesource.com/16383Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
We might be able to do better than this, but it's a start. Change-Id: I80ebce9094e084a4746039106ccf1ad9c4b8bb7c Reviewed-on: https://go-review.googlesource.com/16384Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Mostly by avoiding CX entirely, sometimes by reloading it. I also vetted the assembly in other packages, it's all fine. Change-Id: I50059669aaaa04efa303cf22ac228f9d14d83db0 Reviewed-on: https://go-review.googlesource.com/16386Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: Ie4cdf50fdaf7b368a189a84f4e2aea4cedd5ca7d Reviewed-on: https://go-review.googlesource.com/17013Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Benjamin authored
BER allows the sender to choose either short form or long form where both are legal, but DER requires the minimal one be used. Enforce this and add a test. Fix one test which was not minimally-encoded and another which would not distinguish rejecting the input because the long form length wasn't minimally-encoded from rejecting it because long form was chosen when short form was allowed. Change-Id: I1b56fcca594dcdeddea9378b4fab427cbe7cd26d Reviewed-on: https://go-review.googlesource.com/16517Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org>
-
Edward Muller authored
Otherwise _2006 is treated as _2 and then an error. Fixes #11334 Change-Id: I40a385b45e279e9f4538bf419baab72781cdb215 Reviewed-on: https://go-review.googlesource.com/16311Reviewed-by: Rob Pike <r@golang.org>
-
- 17 Nov, 2015 12 commits
-
-
Mohit Agarwal authored
Compare basepath and targetpath using strings.EqualFold. The absence of this on Windows causes an unterminating condition in `for` statement later in the function. Fixes #13258 Change-Id: Ib5a0caba864ee425dc75ece47b9cf6fb626f47f1 Reviewed-on: https://go-review.googlesource.com/16857 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Matthew Dempsky authored
Only apply RFC 6724's CommonPrefixLen rule for IPv4 source/destination pairs that are members of the same IPv4 special purpose block. Fixes #13283. Change-Id: I2f7c26b408dd4675dfc5c1959e22d05b43bb8241 Reviewed-on: https://go-review.googlesource.com/16995Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mohit Agarwal authored
On Windows, Rel emits error messages of the form `Rel: can't make \windows relative to \windows`. Rather than emitting paths after stripping volume names, emit the original paths so as to make those of the form `Rel: can't make d:\windows relative to c:\windows`. Fixed a test that expected the error message to emit clean path instead of the original. Fixes #13259 Change-Id: I3a9bd5b137205f22794ec8046b4e917ee48cf750 Reviewed-on: https://go-review.googlesource.com/16858 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Hyang-Ah Hana Kim authored
no buildmode=c-shared yet. Update golang/go#9327. Change-Id: I9989d954d574807bac105da401c3463607fe8a99 Reviewed-on: https://go-review.googlesource.com/16700Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Elias Naur authored
Replace the cross platform but unsafe [4]uintptr type with a OS specific type, sigset. Most OSes already define sigset, and this change defines a suitable sigset for the OSes that don't (darwin, openbsd). The OSes that don't use m.sigmask (windows, plan9, nacl) now defines sigset as the empty type, struct{}. The gain is strongly typed access to m.sigmask, saving a dynamic size sanity check and unsafe.Pointer casting. Also, some storage is saved for each M, since [4]uinptr was conservative for most OSes. The cost is that OSes that don't need m.sigmask has to define sigset. completes ./all.bash with GOOS linux, on amd64 completes ./make.bash with GOOSes openbsd, android, plan9, windows, darwin, solaris, netbsd, freebsd, dragonfly, all amd64. With GOOS=nacl ./make.bash failed with a seemingly unrelated error. R=go1.7 Change-Id: Ib460379f063eb83d393e1c5efe7333a643c1595e Reviewed-on: https://go-review.googlesource.com/16942Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joe Tsai authored
The NamePos value was not being set, and would default to a value of zero. This would cause the printing logic to get confused as to where exactly to place the "Has unexported fields" string. A trivial package changes from < type A struct { A int // A B int // B // Has unexported fields. } > to < type A struct { A int // A B int // B // Has unexported fields. } > Fixes #12971 Change-Id: I53b7799a1f1c0ad7dcaddff83d9aaeb1d6b7823e Reviewed-on: https://go-review.googlesource.com/16286 Run-TryBot: Joe Tsai <joetsai@digital-static.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Michael Hudson-Doyle authored
golang.org/cl/16796 broke android/386 by assuming behaviour specific to glibc's dynamic linker. Copy bionic by using int $0x80 to invoke syscalls on android/386 as the old alternative (CALL *runtime_vdso(SB)) cannot be compiled without text relocations, which we want to get rid of on android. Also remove "CALL *runtime_vdso(SB)" variant from the syscall package. Change-Id: I6c01849f8dcbd073d000ddc8f13948a836b8b261 Reviewed-on: https://go-review.googlesource.com/16996 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Dan Peterson authored
Fixes #12778 Change-Id: I2ca53180d46180b951749abe453fd560d0f1d9d6 Reviewed-on: https://go-review.googlesource.com/16950Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Change-Id: Id164a099e0ac8bd231ee7ed8d7b7a34c91f5f68f Reviewed-on: https://go-review.googlesource.com/16991 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Emmanuel Odeke authored
Completes sniffing for mp4 signature according to the spec at: https://mimesniff.spec.whatwg.org/#signature-for-mp4 Clause 6.2.1 Fixes #8773 Change-Id: Icfc4a23324ae249db52c94a21c0e8509e1833e19 Reviewed-on: https://go-review.googlesource.com/16951Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Not all tests passing yet, but a good chunk are. Change-Id: I5daebaeabf3aecb380674ece8830a86751a8d139 Reviewed-on: https://go-review.googlesource.com/16458Reviewed-by: Rahul Chaudhry <rahulchaudhry@google.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Caleb Spare authored
Inspect the crypto/tls error to recognize this case and give a more helpful error. Fixes #11111. Change-Id: I63f6af8c375aa892326ccccbd29655d54d68df0b Reviewed-on: https://go-review.googlesource.com/16079 Run-TryBot: Caleb Spare <cespare@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-