- 26 Sep, 2016 8 commits
-
-
Alberto Donizetti authored
Fixes #16439 Updates #16679 Change-Id: Idff4b313f29351866b1a649786501adee85fd580 Reviewed-on: https://go-review.googlesource.com/29011 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Ian Lance Taylor authored
Combine the various versions of sigtrampgo into a single function in signal_unix.go. This requires defining a fixsigcode method on sigctxt for all operating systems; it only does something on Darwin. This also requires changing the darwin/amd64 signal handler to call sigreturn itself, rather than relying on sigtrampgo to call sigreturn for it. We can then drop the Darwin sigreturn function, as it is no longer used. Change-Id: I5a0b9d2d2c141957e151b41e694efeb20e4b4b9a Reviewed-on: https://go-review.googlesource.com/29761 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Chase authored
There's no load-signed-byte on PPC, so MOVB causes the assembler to macro-expand in a useless sign extension. Fixes #17211. Change-Id: Ibcd73aea4c94ba6df0a998b0091e45508113be2a Reviewed-on: https://go-review.googlesource.com/29762 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <munday@ca.ibm.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Alberto Donizetti authored
When processing a fallthrough, the casebody function in swt.go checks that the last statement has indeed Op == OXFALL (not-processed fallthrough) before setting it to OFALL (processed fallthrough). Unfortunately, sometimes the fallthrough statement won't be in the last node. For example, in case 0: return func() int {return 1}() fallthrough the compiler generates autotmp_0 = (func literal)(); return autotmp_0; fallthrough; <node VARKILL> with an OVARKILL node in the last position. casebody will find that last.Op != OXFALL, won't mark the fallthrough as processed, and the fallthrough line will cause a "fallthrough statement out of place" error. To fix this, we change casebody so that it searches for the fallthrough statement backwards in the statements list, without assuming that it'll be in the last position. Fixes #13262 Change-Id: I366c6caa7fd7442d365bd7a08cc66a552212d9b2 Reviewed-on: https://go-review.googlesource.com/22921 Run-TryBot: Quentin Smith <quentin@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Quentin Smith <quentin@golang.org>
-
Ian Lance Taylor authored
Change all Unix systems to use stackt for the alternate signal stack (some were using sigaltstackt). Add OS-specific setSignalstackSP function to handle different types for ss_sp field, and unify all OS-specific signalstack functions into one. Unify handling of alternate signal stack in OS-specific minit and sigtrampgo functions via new functions minitSignalstack and setGsignalStack. Change-Id: Idc316dc69b1dd725717acdf61a1cd8b9f33ed174 Reviewed-on: https://go-review.googlesource.com/29757 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Updates #13994 Updates #16840 Change-Id: Ia3cad5c211e0c688a945ed6b6277c2552592774c Reviewed-on: https://go-review.googlesource.com/29760 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Gyu-Ho Lee authored
To prevent slice growths with append operations. Change-Id: Icdb745b23cc44dfaf3e16746b94c06997f814e15 Reviewed-on: https://go-review.googlesource.com/23784Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Antonio Murdaca authored
Change-Id: I894a8f49d29dbb6f9265e4b3df5767318b225460 Signed-off-by: Antonio Murdaca <runcom@redhat.com> Reviewed-on: https://go-review.googlesource.com/24492Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 25 Sep, 2016 10 commits
-
-
Sam Whited authored
Fixes #16678 Change-Id: I48c2825d4fef55a75d2f99640a7079c56fce39db Reviewed-on: https://go-review.googlesource.com/28370Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Anders Pearson authored
Add a method to expose the handler to allow it to be installed at a non-standard location or used with a different ServeMux. fixes #15030 Change-Id: If778ad6fcc200f124a05c0a493511e364fca6078 Reviewed-on: https://go-review.googlesource.com/24722Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Implement a comment by Ralph Corderoy on CL 29754. Change-Id: I22bbede211ddcb8a057f16b4f47d335a156cc8d2 Reviewed-on: https://go-review.googlesource.com/29756 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Change-Id: Iba541045b4878405834c637095627631b6559a35 Reviewed-on: https://go-review.googlesource.com/29754 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Vyukov authored
Currently raceSymbolizeCode uses funcline, which is internal runtime function which crashes on incorrect PCs. Use FileLine instead, it is public and does not crash on invalid data. Note: FileLine returns "?" file on failure. That string is not NUL-terminated, so we need to additionally check what FileLine returns. Fixes #17190 Change-Id: Ic6fbd4f0e68ddd52e9b2dd25e625b50adcb69a98 Reviewed-on: https://go-review.googlesource.com/29714 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitry Vyukov authored
Don't write line info for types, we don't have it. Otherwise types look like: type _Ctype_struct_cb struct { //line :1 on_test *[0]byte //line :1 } Which is not useful. Moreover we never override source info, so subsequent source code uses the same source info. Moreover, empty file name makes compile emit no source debug info at all. Update #17190 Change-Id: I7ae6fa4964520d7665743d340419b787df0b51e8 Reviewed-on: https://go-review.googlesource.com/29713 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitry Vyukov authored
PC passed to racegostart is expected to be a return PC of the go statement. Race runtime will subtract 1 from the PC before symbolization. Passing start PC of a function is wrong. Add sys.PCQuantum to the function start PC. Update #17190 Change-Id: Ia504c49e79af84ed4ea360c2aea472b370ea8bf5 Reviewed-on: https://go-review.googlesource.com/29712 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Jaana Burcu Dogan authored
This sentence is partially guilty why httptrace is considered as an http.Client tracing package. Removing the mention. Updates #17152. Change-Id: I69f78a6e10817db933f44e464a949ae896e44ec6 Reviewed-on: https://go-review.googlesource.com/29755Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Replace all the Unix sighandler functions with a single instance. Push the relatively small amount of processor-specific code into five methods on sigctxt: sigpc, sigsp, siglr, fault, preparePanic. (Some processors already had a fault method.) Change-Id: Ib459412ff8f7e0f5ad06bfd43eb827c8b196fc32 Reviewed-on: https://go-review.googlesource.com/29752 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Kale Blankenship authored
Fixes #17164 Change-Id: I3e626d92293c1379e2922276f033fdee6f48dda3 Reviewed-on: https://go-review.googlesource.com/29753Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Sep, 2016 4 commits
-
-
Keith Randall authored
Takes a bit too long to run it all the time. Fixes #17217 Update #17104 Change-Id: I4802190ea16ee0f436a7f95b093ea0f995f5b11d Reviewed-on: https://go-review.googlesource.com/29751 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Unify the OS-specific versions of msigsave, msigrestore, sigblock, updatesigmask, and unblocksig into single versions in signal_unix.go. To do this, make sigprocmask work the same way on all systems, which required adding a definition of sigprocmask for linux and openbsd. Also add a single OS-specific function sigmaskToSigset. Change-Id: I7cbf75131dddb57eeefe648ef845b0791404f785 Reviewed-on: https://go-review.googlesource.com/29689 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
David Crawshaw authored
Change-Id: I6071881a5f7b9638bca0bfef76d6f4f45c9202a6 Reviewed-on: https://go-review.googlesource.com/29396 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Change-Id: I8e594e059448879a9f451801064729186ac7c11b Reviewed-on: https://go-review.googlesource.com/29395 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 23 Sep, 2016 7 commits
-
-
David Crawshaw authored
This CL turns some special section marker symbols into real symbols laid out in the sections they mark. This is to deal with the fact that dyld on OS X resolves the section marker symbols in any dlopen-ed Go program to the original section marker symbols in the host program. More details in a comment in cmd/link/internal/ld/data.go. Change-Id: Ie9451cfbf06d0bdcccb9959219c791b829f3f771 Reviewed-on: https://go-review.googlesource.com/29394Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
The 2-byte rule was firing before the 4-byte rule, preventing the 4-byte rule from firing. Update the 4-byte rule to use the results of the 2-byte rule instead. Add some tests to make sure we don't regress again. Fixes #17147 Change-Id: Icfeccd9f2b96450981086a52edd76afb3191410a Reviewed-on: https://go-review.googlesource.com/29382 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Michael Munday authored
Before this change a nil check on s390x could be scheduled after the target pointer has been dereferenced. Change-Id: I7ea40a4b52f975739f6db183a2794be4981c4e3d Reviewed-on: https://go-review.googlesource.com/29730 Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Lynn Boger authored
This adds the instructions frim, frip, and friz to the ppc64x assembler for use in implementing the math.Floor, math.Ceil, and math.Trunc functions to improve performance. Fixes #17185 BenchmarkCeil-128 21.4 6.99 -67.34% BenchmarkFloor-128 13.9 6.37 -54.17% BenchmarkTrunc-128 12.7 6.33 -50.16% Change-Id: I96131bd4e8c9c8dbafb25bfeb544cf9d2dbb4282 Reviewed-on: https://go-review.googlesource.com/29654 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Michael Munday <munday@ca.ibm.com>
-
David Crawshaw authored
Attempt to fix the linux-amd64-clang builder, which broke with CL 29472. Turns out pthread_yield is a non-portable Linux function, and should have #define _GNU_SOURCE before #include <pthread.h>. GCC doesn't complain about this, but Clang does: ./raceprof.go:44:3: warning: implicit declaration of function 'pthread_yield' is invalid in C99 [-Wimplicit-function-declaration] (Though the error, while explicable, certainly could be clearer.) There is a portable POSIX equivalent, sched_yield, so this CL uses it instead. Change-Id: I58ca7a3f73a2b3697712fdb02e72a8027c391169 Reviewed-on: https://go-review.googlesource.com/29675 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Crawshaw authored
Change-Id: I76981d1d83da401178226634d076371a04f5ccb7 Reviewed-on: https://go-review.googlesource.com/29392 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Inspired by difficulties with plugin support on darwin. Change-Id: I2cef8410837946454e75d00e94e46791f03f2267 Reviewed-on: https://go-review.googlesource.com/29391Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 22 Sep, 2016 9 commits
-
-
Ian Lance Taylor authored
Instrumenting copy and append for the race detector changes them to call different functions. In the runtime package the alternate functions are not marked as nosplit. This caused a crash in the SIGPROF handler when invoked on a non-Go thread in a program built with the race detector. In some cases the handler can call copy, the race detector changed that to a call to a non-nosplit function, the function tried to check the stack guard, and crashed because it was running on a non-Go thread. The SIGPROF handler is written carefully to avoid such problems, but hidden function calls are difficult to avoid. Fix this by changing the compiler to not instrument copy and append when compiling the runtime package. Change the runtime package to add explicit race checks for the only code I could find where copy is used to write to user data (append is never used). Change-Id: I11078a66c0aaa459a7d2b827b49f4147922050af Reviewed-on: https://go-review.googlesource.com/29472 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Keith Randall authored
var x *X = ... defer x.foo() As part of the defer, we need to calculate &(*X).foo·f. This expression is the address of the static closure that will call (*X).foo when a pointer to that closure is used in a call/defer/go. This pointer is not currently properly typed in SSA. It is a pointer type, but the base type is nil, not a proper type. This turns out not to be a problem currently because we never use the type of these SSA values. But I'm trying to change that (to be able to spill them) in CL 28391. To fix, use uint8 as the fake type of the closure. Change-Id: Ieee388089c9af398ed772ee8c815122c347cb633 Reviewed-on: https://go-review.googlesource.com/29444 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Cherry Zhang authored
Add an "errorcheckwithauto" action which performs error check including lines with auto-generated functions (excluded by default). Comment "// ERRORAUTO" matches these lines. Add testcase for CL 29570 (as an example). Updates #16016, #17186. Change-Id: Iaba3727336cd602f3dda6b9e5f97dafe0848e632 Reviewed-on: https://go-review.googlesource.com/29652 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Cherry Zhang authored
On link-register machines we uses RET (sym), instead of JMP (sym), for tail call (so the assembler knows and may rewrite it to restore link register if necessary). Add RET to the analysis. Fixes #17186. Fixes #16016 on link-register machines. Change-Id: I8690ac57dd9d49beeea76a5f291988e9a1d3afe5 Reviewed-on: https://go-review.googlesource.com/29570 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Adam Langley authored
After renegotiation support was added (af125a51) it's possible for a Write to block on a Read when racing to complete the handshake: 1. The Write determines that a handshake is needed and tries to take the neccesary locks in the correct order. 2. The Read also determines that a handshake is needed and wins the race to take the locks. 3. The Read goroutine completes the handshake and wins a race to unlock and relock c.in, which it'll hold when waiting for more network data. If the application-level protocol requires the Write to complete before data can be read then the system as a whole will deadlock. Unfortunately it doesn't appear possible to reverse the locking order of c.in and handshakeMutex because we might read a renegotiation request at any point and need to be able to do a handshake without unlocking. So this change adds a sync.Cond that indicates that a goroutine has committed to doing a handshake. Other interested goroutines can wait on that Cond when needed. The test for this isn't great. I was able to reproduce the deadlock with it only when building with -race. (Because -race happened to alter the timing just enough.) Fixes #17101. Change-Id: I4e8757f7b82a84e46c9963a977d089f0fb675495 Reviewed-on: https://go-review.googlesource.com/29164Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Kale Blankenship authored
This change modifies URL.String to prepend "./" to a relative URL which contains a colon in the first path segment. Per RFC 3986 §4.2: > A path segment that contains a colon character (e.g., "this:that") > cannot be used as the first segment of a relative-path reference, as > it would be mistaken for a scheme name. Such a segment must be > preceded by a dot-segment (e.g., "./this:that") to make a relative- > path reference. https://go-review.googlesource.com/27440 corrects the behavior for http.FileServer, but URL.String will still return an invalid URL. This CL reverts the changes to http.FileServer as they are unnecessary with this fix. Fixes #17184 Change-Id: I9211ae20f82c91b785d1b079b2cd766487d94225 Reviewed-on: https://go-review.googlesource.com/29610Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
Abandoned earlier efforts to expose zero register, but left it in numbering to decrease squirrelyness of register allocator. ISELrelOp used in code generation of bool := x relOp y. Some patterns added to better elide zero case and some sign extension. Updates: #17109 Change-Id: Ida7839f0023ca8f0ffddc0545f0ac269e65b05d9 Reviewed-on: https://go-review.googlesource.com/29380 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Emmanuel Odeke authored
Updates #16360. Adds examples uing: + Writer, Reader + Reader.Multistream to concatenate and then individually retrieve multiple gzipped files + Reset Change-Id: I9ad9b92729a5cd58f7368eaf2db05f1cdf21063d Reviewed-on: https://go-review.googlesource.com/29218Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
See https://groups.google.com/d/topic/golang-nuts/stbum5gZbAc/discussion Change-Id: I2e78e8d0dadd78c8b0389514cad3c45d061b663b Reviewed-on: https://go-review.googlesource.com/29496Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 Sep, 2016 2 commits
-
-
Ian Lance Taylor authored
Requires adding a sigfwd function for Solaris, as previously signal2_unix.go was not built for Solaris. Change-Id: Iea3ff0ddfa15af573813eb075bead532b324a3fc Reviewed-on: https://go-review.googlesource.com/29550 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
This change reverts CL 18835 which is a workaroud for older DragonFly BSD kernels, and fixes #14051, #14052 and #14067 in a more general way the same as other platforms except NetBSD. This change also bumps the minimum required version of DragonFly BSD kernel to 4.4.4. Fixes #16329. Change-Id: I0b44b6afa675f5ed9523914226bd9ec4809ba5ae Reviewed-on: https://go-review.googlesource.com/29491Reviewed-by: Ian Lance Taylor <iant@golang.org>
-