- 18 Nov, 2015 20 commits
-
-
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 17 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>
-
Robert Griesemer authored
The line correction when reporting a missing package clause was removed before since it wasn't clear that it was needed. Added it again because of issue 13267. No explicit test case has been added to test/fixedbugs because it would require a file that contains a single byte and such a file doesn't fit the existing test harness. Instead documented the problematic line in the parser for future reference. Fixes #13267. Change-Id: I590fe8f358042aab73acf16c2ed9567872b174f4 Reviewed-on: https://go-review.googlesource.com/16975Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Issue #13248 was fixed by https://go-review.googlesource.com/#/c/16930/. This is the corresponding test case (original offending program). Change-Id: I7c99783db74a5422704409cea7e5073094beadd3 Reviewed-on: https://go-review.googlesource.com/16973Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Fixes #13274. Fixes #13272. Change-Id: Ie67a2c4671ee2b49831898fff7677cd65d780942 Reviewed-on: https://go-review.googlesource.com/16972Reviewed-by: Chris Manghane <cmang@golang.org>
-
Robert Griesemer authored
Fixes #13266. Change-Id: I31da922e0599989e52acf346374c2077b157ebb7 Reviewed-on: https://go-review.googlesource.com/16971Reviewed-by: Chris Manghane <cmang@golang.org>
-
Austin Clements authored
Currently, if an allocation is large enough that arena_end + size overflows (which is not hard to do on 32-bit), we go ahead and call sysReserve with the impossible base and length and depend on this to either directly fail because the kernel can't possibly fulfill the requested mapping (causing mheap.sysAlloc to return nil) or to succeed with a mapping at some other address which will then be rejected as outside the arena. In order to make this less subtle, less dependent on the kernel getting all of this right, and to eliminate the hopeless system call, add an explicit overflow check. Updates #13143. This real issue has been fixed by 0de59c27, but this is a belt-and-suspenders improvement on top of that. It was uncovered by my symbolic modeling of that bug. Change-Id: I85fa868a33286fdcc23cdd7cdf86b19abf1cb2d1 Reviewed-on: https://go-review.googlesource.com/16961 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 16 Nov, 2015 3 commits
-
-
Robert Griesemer authored
Issue introduced by https://go-review.googlesource.com/#/c/16920/ . TBR=rsc Change-Id: I2a0e0c81f641f869568230837c566913f6538f37 Reviewed-on: https://go-review.googlesource.com/16990 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Austin Clements authored
mcache.tiny is in non-GC'd memory, but points to heap memory. As a result, there may or may not be write barriers when writing to mcache.tiny. Make it clearer that funny things are going on by making mcache.tiny a uintptr instead of an unsafe.Pointer. Change-Id: I732a5b7ea17162f196a9155154bbaff8d4d00eac Reviewed-on: https://go-review.googlesource.com/16963 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
The tiny alloc cache is maintained in a pointer from non-GC'd memory (mcache) to heap memory and hence must be handled carefully. Currently we clear the tiny alloc cache during sweep termination and, if it is assigned to a non-nil value during concurrent marking, we depend on a write barrier to keep the new value alive. However, while the compiler currently always generates this write barrier, we're treading on thin ice because write barriers may not happen for writes to non-heap memory (e.g., typedmemmove). Without this lucky write barrier, the GC may free a current tiny block while it's still reachable by the tiny allocator, leading to later memory corruption. Change this code so that, rather than depending on the write barrier, we simply clear the tiny cache during mark termination when we're clearing all of the other mcaches. If the current tiny block is reachable from regular pointers, it will be retained; if it isn't reachable from regular pointers, it may be freed, but that's okay because there won't be any pointers in non-GC'd memory to it. Change-Id: I8230980d8612c35c2997b9705641a1f9f865f879 Reviewed-on: https://go-review.googlesource.com/16962 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-