- 19 Nov, 2015 18 commits
-
-
Austin Clements authored
allocm is a very unusual function: it is specifically designed to allocate in contexts where m.p is nil by temporarily taking over a P. Since allocm is used in many contexts where it would make sense to use nowritebarrierrec, this commit teaches the nowritebarrierrec analysis to stop at allocm. Updates #10600. Change-Id: I8499629461d4fe25712d861720dfe438df7ada9b Reviewed-on: https://go-review.googlesource.com/17005Reviewed-by:
Russ Cox <rsc@golang.org>
-
Austin Clements authored
This replaces *memHdr with memHdrPtr. Updates #10600. Change-Id: I673aa2cd20f29abec8ab91ed7e783718c8479ce1 Reviewed-on: https://go-review.googlesource.com/17009 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by:
Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David du Colombier <0intro@gmail.com>
-
Austin Clements authored
This replaces *traceAllocBlock with traceAllocBlockPtr. Updates #10600. Change-Id: I94a20d90f04cca7c457b29062427748e315e4857 Reviewed-on: https://go-review.googlesource.com/17004 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dmitry Vyukov <dvyukov@google.com>
-
Austin Clements authored
gentraceback is used in many contexts where write barriers are disallowed. This currently works because the only write barrier is in assigning frame.argmap in setArgInfo and in practice frame is always on the stack, so this write barrier is a no-op. However, we can easily eliminate this write barrier, which will let us statically disallow write barriers (using go:nowritebarrierrec annotations) in many more situations. As a bonus, this makes the code a little more idiomatic. Updates #10600. Change-Id: I45ba5cece83697ff79f8537ee6e43eadf1c18c6d Reviewed-on: https://go-review.googlesource.com/17003 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dmitry Vyukov <dvyukov@google.com>
-
Russ Cox authored
This is a bit of a belt-and-suspenders fix. On OS X, we now parse the Mach-O file to find the __text section, which is arguably the more proper fix. But it's a bit worrisome to depend on a name like __text not changing, so we also read more of the initial file (now 32 kB, up from 8 kB) and scan that too. Fixes #12327. Change-Id: I3a201a3dc278d24707109bb3961c3bdd8b8a0b7b Reviewed-on: https://go-review.googlesource.com/17038Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
My version of bash doesn't know what 'declare -A' means. Change-Id: Icf6b0e60ebaea3feaa8661ec0423012f213b53e8 Reviewed-on: https://go-review.googlesource.com/17070Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
There was no documentation produced by "go doc cmd/asm". Follow the style set by cmd/compile. Fixes #13148. Change-Id: I02e08ce2e7471f855bfafbbecee98ffdb7096995 Reviewed-on: https://go-review.googlesource.com/16997Reviewed-by:
Russ Cox <rsc@golang.org>
-
Russ Cox authored
The assumption is that there are no nested function calls in complex expressions. For the most part that assumption is true. It wasn't for these calls inserted during walk. Fix that. I looked through all the calls to mkcall in walk and these were the only cases that emitted calls, that could be part of larger expressions (like not delete), and that were not already handled. Fixes #12225. Change-Id: Iad380683fe2e054d480e7ae4e8faf1078cdd744c Reviewed-on: https://go-review.googlesource.com/17034Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Michael Matloob authored
Because there are now multiple packages that compose the runtime we need to distinguish between the case where a runtime package is being compiled versus the case the "runtime" package is being compiled. In golang.org/cl/14204 I mistakenly used localpkg.Name == "runtime" to check against the "runtime" package, but doing this would treat a package with the path "foo.org/bar/runtime" as the runtime package. The correct check is myimportpath == "runtime" . Change-Id: If90e95cef768d91206f2df1c06e27be876722e4e Reviewed-on: https://go-review.googlesource.com/17059 Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Update #12416. Change-Id: Iccbcb12709d1ca9bea87274f44f93cfcebadb070 Reviewed-on: https://go-review.googlesource.com/17048 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
Michael Hudson-Doyle authored
golang.org/cl/16383 broke android/386 because by a sort of confluence of hacks no TLS relocations were emitted at all when Flag_shared != 0. The hack in runtime/cgo works as well in a PIE executable as it does with a position dependent one, so the simplest fix is to still emit a R_TLS_LE reloc when goos == "android". A real fix is to use something more like the IE model code but loading the offset from %gs to the thread local storage from a global variable rather than from a location chosen by the system linker (this is how android/arm works). Issue #9327. Change-Id: I9fbfc890ec7fe191f80a595b6cf8e2a1fcbe3034 Reviewed-on: https://go-review.googlesource.com/17049Reviewed-by:
Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Austin Clements authored
This adds a test that runs CPU profiling with a high load of stack barriers and stack barrier insertion/removal operations and checks that both 1) the runtime doesn't crash and 2) stackBarrier itself never appears in a profile. Prior to the fix for gentraceback starting in the middle of stackBarrier, condition 2 often failed. Change-Id: Ic28860448859029779844c4bf3bb28ca84611e2c Reviewed-on: https://go-review.googlesource.com/17037Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
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>
-