- 08 Sep, 2014 11 commits
-
-
Dave Cheney authored
Fixes warning /home/dfc/go/src/cmd/gc/subr.c:3469:8: runtime error: negation of -9223372036854775808 cannot be represented in type 'int64' (aka 'long'); cast to an unsigned type to negate this value to itself LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/141220043
-
Rob Pike authored
CC=golang-codereviews https://golang.org/cl/139310043
-
Russ Cox authored
These were missed in CL 134570043. Fixes nacl, solaris builds. TBR=r CC=golang-codereviews https://golang.org/cl/136320043
-
Russ Cox authored
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
-
Russ Cox authored
This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134570043
-
Brad Fitzpatrick authored
CC=golang-codereviews https://golang.org/cl/132670045
-
Brad Fitzpatrick authored
Per discussions out of https://golang.org/cl/128930043/ and golang-nuts threads and with agl. Fixes #8522 LGTM=agl, adg R=agl, c, adg CC=c, golang-codereviews https://golang.org/cl/137940043
-
Russ Cox authored
These all used a C implementation that contained 64-bit divide by 1000000000. On 32-bit systems that ends up in the 64-bit C divide support, which makes other calls and ends up using a fair amount of stack. We could convert them to Go but then they'd still end up in software 64-bit divide code. That would be okay, because Go code can split the stack, but it's still unnecessary. Write time·now in assembly, just like on all the other systems, and use the actual hardware support for 64/32 -> 64/32 division. This cuts the software routines out entirely. The actual code to do the division is copied and pasted from the sys_darwin_*.s files. LGTM=alex.brainman R=golang-codereviews, alex.brainman CC=aram, golang-codereviews, iant, khr, r https://golang.org/cl/136300043
-
Russ Cox authored
Now it's failing on Windows: panic: httptest: failed to listen on a port: listen tcp 127.0.0.1:0: listen: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. Since we can't seem to understand what the test is trying to test, and because it is causing problems on multiple systems, delete it. Fixes #7264. TBR=bradfitz CC=brainman, golang-codereviews https://golang.org/cl/141210043
-
Russ Cox authored
This is what broke the build at http://build.golang.org/log/d9c6d334be16cbab85e99fddc6b4ba034319bd4e LGTM=iant R=golang-codereviews, iant CC=dvyukov, golang-codereviews, khr, r https://golang.org/cl/135580043
-
Russ Cox authored
I am seeing deadlocks waiting on <-inHandler. It seems to me that there is no guarantee that the handler actually runs, if the client does write header close connection fast enough. The server might see the EOF on the connection before it manages to invoke the handler. This change fixes the deadlock, but it may make the test not actually test anything. Not sure. LGTM=bradfitz R=bradfitz, dvyukov CC=golang-codereviews https://golang.org/cl/140970043
-
- 07 Sep, 2014 10 commits
-
-
Russ Cox authored
This is one of those "how did this ever work?" bugs. The current build failures are happening because a fault comes up while executing on m->curg on a system-created thread using an m obtained from needm, but TLS is set to m->g0, not m->curg. On fault, sigtramp starts executing, assumes r10 (g) might be incorrect, reloads it from TLS, and gets m->g0, not m->curg. Then sighandler dutifully pushes a call to sigpanic onto the stack and returns to it. We're now executing on the m->curg stack but with g=m->g0. Sigpanic does a stack split check, sees that the SP is not in range (50% chance depending on relative ordering of m->g0's and m->curg's stacks), and then calls morestack. Morestack sees that g=m->g0 and crashes the program. The fix is to replace every change of g in asm_arm.s with a call to a function that both updates g and saves the updated g to TLS. Why did it start happening? That's unclear. Unfortunately there were other bugs in the initial checkin that mask exactly which of a sequence of CLs started the behavior where sigpanic would end up tripping the stack split. Fixes arm build. Fixes #8675. LGTM=iant R=golang-codereviews, iant CC=dave, golang-codereviews, khr, minux, r https://golang.org/cl/135570043
-
Russ Cox authored
Maybe will help us understand Solaris build failure. TBR=aram CC=golang-codereviews https://golang.org/cl/139290043
-
Russ Cox authored
Fixes arm build. TBR=khr CC=golang-codereviews https://golang.org/cl/132700043
-
Russ Cox authored
The Unix make.bash builds cmd/dist from *.c. make.bat apparently does not. TBR=r CC=golang-codereviews https://golang.org/cl/137280043
-
Russ Cox authored
After the three pending CLs listed below, there will be no more .goc files. 134580043 runtime: move stubs.goc code into runtime.c 133670043 runtime: fix windows syscalls for copying stacks 141180043 runtime: eliminate Go -> C -> block paths for Solaris LGTM=bradfitz R=golang-codereviews, bradfitz, dave CC=golang-codereviews, iant, r https://golang.org/cl/132680043
-
Russ Cox authored
Update #8675 Fixes nacl/amd64p32 build. TBR=khr CC=golang-codereviews https://golang.org/cl/141140045
-
Russ Cox authored
Syscall and everything it calls must be nosplit: we cannot split a stack once Syscall has been invoked, because we don't know which of its arguments are pointers. LGTM=khr, r, alex.brainman R=dvyukov, iant, khr, r, bradfitz, alex.brainman CC=golang-codereviews https://golang.org/cl/133670043
-
Russ Cox authored
LGTM=aram, r R=golang-codereviews, aram, r CC=golang-codereviews, iant, khr https://golang.org/cl/141180043
-
Russ Cox authored
Increase NOSPLIT reservation from 192 to 384 bytes. The problem is that the non-Unix systems (Solaris and Windows) just can't make system calls in a small amount of space, and then worse they do things that are complex enough to warrant calling runtime.throw on failure. We don't have time to rewrite the code to use less stack. I'm not happy about this, but it's still a small amount. The good news is that we're doing this to get to only using copying stacks for stack growth. Once that is true, we can drop the default stack size from 8k to 4k, which should more than make up for the bytes we're losing here. LGTM=r R=iant, r, bradfitz, aram.h CC=golang-codereviews https://golang.org/cl/140350043
-
Russ Cox authored
LGTM=bradfitz R=adg, bradfitz, minux CC=golang-codereviews https://golang.org/cl/140310045
-
- 06 Sep, 2014 8 commits
-
-
Russ Cox authored
This will keep the go command from trying to build it when the cmd/ tree is no longer a special case. Also update doc.go to refer to the correct location. (It was incorrect even before this CL.) LGTM=r R=iant, r CC=golang-codereviews https://golang.org/cl/134560043
-
Russ Cox authored
This will withstand the src/pkg/ to src/ move. LGTM=r R=iant, r CC=golang-codereviews https://golang.org/cl/134530044
-
Russ Cox authored
Now that the calling conventions are the same, there's no danger to using plain C for these. LGTM=bradfitz R=golang-codereviews, bradfitz CC=dvyukov, golang-codereviews, iant, khr, r https://golang.org/cl/134580043
-
Russ Cox authored
This was supposed to be in CL 135490044 but got lost in a transfer from machine to machine. TBR=khr R=khr CC=golang-codereviews https://golang.org/cl/135560043
-
Aram Hăvărneanu authored
LGTM=dave, rsc R=khr, dvyukov, dave, gobot, rsc CC=golang-codereviews, rsc https://golang.org/cl/133220044
-
Russ Cox authored
The gp->panicwrap adjustment is just fatally flawed. Now that there is a Panic.argp field, update that instead. That can be done on entry only, so that unwinding doesn't need to worry about undoing anything. The wrappers emit a few more instructions in the prologue but everything else in the system gets much simpler. It also fixes (without trying) a broken test I never checked in. Fixes #7491. LGTM=khr R=khr CC=dvyukov, golang-codereviews, iant, r https://golang.org/cl/135490044
-
Keith Randall authored
LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/136260043
-
Keith Randall authored
testSchedLocal* tests need to malloc now because their stack frames are too big to fit on the G0 stack. LGTM=iant R=golang-codereviews, iant, khr CC=golang-codereviews https://golang.org/cl/133660043
-
- 05 Sep, 2014 11 commits
-
-
Keith Randall authored
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/141150043
-
Keith Randall authored
LGTM=rsc R=rsc, khr CC=golang-codereviews https://golang.org/cl/132660043
-
Russ Cox authored
I forgot to clear this before submitting. TBR=khr CC=golang-codereviews https://golang.org/cl/132640044
-
Russ Cox authored
newstackcall creates a new stack segment, and we want to be able to throw away all that code. LGTM=khr R=khr, iant CC=dvyukov, golang-codereviews, r https://golang.org/cl/139270043
-
Russ Cox authored
If there is doubt about passing arguments correctly (as there is in this test), there should be doubt about getting the results back intact too. Using 0 and 1 (especially 0 for success) makes it easy to get a PASS accidentally when the return value is not actually being propagated. Use less common values. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://golang.org/cl/141110043
-
Russ Cox authored
We cannot let a real panic start there, because there is C code on the stack, and worse, there is an assembly frame with a saved copy of the registers and we have no idea which ones are pointers. Instead, detect the nil ptr load/store and return out of the C and assembly into a stub that will start the call to sigpanic. Fixes GOARM=5 build. LGTM=iant R=golang-codereviews, iant CC=dave, golang-codereviews, minux, r https://golang.org/cl/138130043
-
Russ Cox authored
Minor changes to make logic clearer. Observed while working on the conversion. LGTM=iant, dvyukov R=dvyukov, iant CC=golang-codereviews https://golang.org/cl/140250043
-
Alex Brainman authored
Update #8662 LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/138120043
-
Keith Randall authored
created panic1.go just so diffs were available. After this CL is in, I'd like to move panic.go -> defer.go and panic1.go -> panic.go. LGTM=rsc R=rsc, khr CC=golang-codereviews https://golang.org/cl/133530045
-
Russ Cox authored
sigprof and setcpuprofilerate coordinate the enabling/disabling of the handler using a Mutex. This has always been a bit dodgy: setcpuprofilerate must be careful to turn off signals before acquiring the lock to avoid a deadlock. Now the lock implementations use onM, and onM isn't okay on the signal stack. We know how to make it okay, but it's more work than is probably worth doing. Since this is super-dodgy anyway, replace the lock with a simple cas loop. It is only contended if setcpuprofilerate is being called, and that doesn't happen frequently enough to care about the raw speed or about using futexes/semaphores. TBR to fix freebsd/amd64 and dragonfly/amd64 builds. Happy to make changes in a follow-up CL. TBR=dvyukov CC=golang-codereviews https://golang.org/cl/141080044
-
Russ Cox authored
The general kernel system call interface takes 6 arguments: R0, R1, R2, R3, R4, R5. Syscall is for calls that only need 3. The amd64 and 386 versions zero the extra arg registers, but the arm version does not. func utimensat calls Syscall with 3 arguments. The kernel expects a 4th argument. That turns out to be whatever is in R3 at the time of the call. CL 137160043 changed various pieces of code and apparently changed the value left in R3 at the time of utimensat's Syscall. This causes the kernel to return EINVAL. Change linux/arm Syscall to zero R3, R4, R5, so that calls will behave deterministically, even if they pass too few arguments. Arguably, utimensat could be fixed too, but the predictable zeroing is certainly worth doing, and once done utimensat's use of Syscall is fine. Fixes arm build. TBR=bradfitz CC=golang-codereviews https://golang.org/cl/141080043
-