- 06 Sep, 2014 4 commits
-
-
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 18 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
-
Russ Cox authored
I did this just to clean things up, but it will be important when we drop the pkg directory later. LGTM=bradfitz R=r, bradfitz CC=golang-codereviews https://golang.org/cl/132600043
-
Russ Cox authored
Behavior before this CL: 1. If onM is called on a g0 stack, it just calls the given function. 2. If onM is called on a gsignal stack, it calls badonm. 3. If onM is called on a curg stack, it switches to the g0 stack and then calls the function. In cases 1 and 2, if the program then crashes (and badonm always does), we want to see what called onM, but the traceback stops at onM. In case 3, the traceback must stop at onM, because the g0 stack we are renting really does stop at onM. The current code stops the traceback at onM to handle 3, at the cost of making 1 and 2 crash with incomplete traces. Change traceback to scan past onM but in case 3 make it look like on the rented g0 stack, onM was called from mstart. The traceback already knows that mstart is a top-of-stack function. Alternate fix at CL 132610043 but I think this one is cleaner. This CL makes 3 the exception, while that CL makes 1 and 2 the exception. Submitting TBR to try to get better stack traces out of the freebsd/amd64 builder, but happy to make changes in a followup CL. TBR=khr R=khr CC=golang-codereviews https://golang.org/cl/133620043
-
Russ Cox authored
The old change worked fine in my client, but my client must not have been in a completely clean state. TBR=r CC=golang-codereviews https://golang.org/cl/138100043
-
Russ Cox authored
1) cmd/dist was copying textflag.h to the build include directory, but only after compiling package runtime. So other packages could use it, just not runtime. Copy earlier, so that runtime can use it too. 2) We decided for android that anything marked linux is also included in the build. The generated linux-specific files in cmd/dist must therefore have explicit +build !android tags, or else you can't have simultaneous linux/arm and android/arm builds in a single client. The tag was already there for at least one file, but it was missing from many others. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134500043
-
Russ Cox authored
sysAlloc is the only mem function called from Go. LGTM=iant, khr R=golang-codereviews, khr, 0intro, iant CC=dvyukov, golang-codereviews, r https://golang.org/cl/139210043
-
Russ Cox authored
Mostly NOSPLIT additions. Had to rewrite atomic_arm.c in Go because it calls lock, and lock is too complex. With this CL, I find no Go -> C calls that can split the stack on any system except Solaris and Windows. Solaris and Windows need more work and will be done separately. LGTM=iant, dave R=golang-codereviews, bradfitz, iant, dave CC=dvyukov, golang-codereviews, khr, r https://golang.org/cl/137160043
-
Brad Fitzpatrick authored
The -nocgo builder failed because it has cgo disabled as well as no USER environment variable: http://build.golang.org/log/2250abb82f5022b72a12997b8ff89fcdeff094c9 # Checking API compatibility. Error getting current user: user: Current not implemented on linux/amd64 exit status 1 Don't require the environment variable here. LGTM=minux R=dave, adg, minux CC=golang-codereviews https://golang.org/cl/140290043
-
- 04 Sep, 2014 18 commits
-
-
Robert Griesemer authored
(a b string, ok bool) is not a valid signature Fixes #8656. LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/137140043
-
Russ Cox authored
Convert no-op race functions. Everything else is tiny and gets NOSPLITs. After this, all that is left on darwin is sysAlloc, panic, and gothrow (all pending). There may be system-specific calls in other builds. LGTM=iant R=golang-codereviews, iant CC=dvyukov, golang-codereviews, khr, r https://golang.org/cl/140240044
-
Dmitriy Vyukov authored
LGTM=khr, rsc R=golang-codereviews, khr, rsc CC=golang-codereviews https://golang.org/cl/131670043
-
Russ Cox authored
When this code was written, there was no way for Go to reuse the C function and enum values. Now there is. LGTM=bradfitz R=rlh, bradfitz CC=dvyukov, golang-codereviews, iant, khr, r https://golang.org/cl/139150045
-
Russ Cox authored
The original conversion in CL 132090043 cut up the function in an attempt to avoid converting most of the code to Go. This contorts the control flow. While debugging the onM signal stack bug, I reconverted sigqueue.goc in its entirety. This restores the original control flow, which is much easier to understand. The current conversion is correct, it's just complex and will be hard to maintain. The new one is as readable as the original code. I uploaded sigqueue.goc as the initial copy of sigqueue.go in the CL, so if you view the diffs of sigqueue.go comparing against patch set 2 [sic] it will show the actual starting point. For example: https://golang.org/cl/136160043/diff2/20001:60001/src/pkg/runtime/sigqueue.go LGTM=dvyukov, iant R=golang-codereviews, dvyukov, iant CC=golang-codereviews, khr, r https://golang.org/cl/136160043
-
Robert Griesemer authored
Without this fix, some tests crashed (e.g. go test -run Invalid). LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/133580043
-
David Crawshaw authored
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/138070043
-
Dmitriy Vyukov authored
TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/141030043
-
Dmitriy Vyukov authored
TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/140220043
-
Mikio Hara authored
LGTM=dvyukov R=dvyukov CC=golang-codereviews https://golang.org/cl/141000043
-
David du Colombier authored
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/138050043
-
Dmitriy Vyukov authored
TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/140990043
-
Dmitriy Vyukov authored
The common code is converted, epoll and kqueue are converted. Windows and solaris are still C. LGTM=rsc R=golang-codereviews, rsc, dave CC=golang-codereviews, iant, khr, rsc https://golang.org/cl/132910043
-
Russ Cox authored
BP is not a legal register on nacl. TBR=iant CC=golang-codereviews https://golang.org/cl/140980043
-
Russ Cox authored
I had this right in one of my clients, but apparently not the one I submitted from. Fixes 386 builds. TBR=dfc CC=golang-codereviews https://golang.org/cl/138000045
-
Russ Cox authored
TBR=iant CC=golang-codereviews https://golang.org/cl/137130043
-
Russ Cox authored
The arm5 build breakage at CL 139110043 was caused by calling funcPC on a lessstack defined as a struct{}. That symbol ended up with a non-4-aligned address, which caused the memory fault that broke the builders. The definition of lessstack was fixed in CL 140880043. Tracking that down suggested that it would be worth looking for the same bug elsewhere in the directory. This is the only one I found. LGTM=bradfitz R=golang-codereviews, dave, bradfitz CC=dvyukov, golang-codereviews, iant, khr, r https://golang.org/cl/134410043
-
Russ Cox authored
Some things get converted. Other things (too complex or too many C deps) get onM calls. Other things (too simple) get #pragma textflag NOSPLIT. After this CL, the offending function list is basically: - panic.c - netpoll.goc - mem*.c - race stuff - readgstatus - entersyscall/exitsyscall LGTM=r, iant R=golang-codereviews, r, iant CC=dvyukov, golang-codereviews, khr https://golang.org/cl/140930043
-