- 17 Sep, 2014 1 commit
-
-
Keith Randall authored
semacquire might need to park the currently running G. It can only park if called from the G stack (because it has no way of saving the M stack state). So all calls to semacquire must come from the G stack. The three violators are GOMAXPROCS, ReadMemStats, and WriteHeapDump. This change moves the semacquire call earlier, out of their C code and into their Go code. This seldom caused bugs because semacquire seldom actually had to park the caller. But it did happen intermittently. Fixes #8749 LGTM=dvyukov R=golang-codereviews, dvyukov, bradfitz CC=golang-codereviews https://golang.org/cl/144940043
-
- 16 Sep, 2014 22 commits
-
-
Rob Pike authored
CC=golang-codereviews https://golang.org/cl/138530044
-
Ahmed Waheed Moanes authored
Fixes #8566. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/126210045
-
Ian Lance Taylor authored
Generated by a+c. R=gobot CC=golang-codereviews https://golang.org/cl/138550043
-
Russ Cox authored
If this needs to be turned back off, it should be done just before the '// in finalizer' comment, not at the top of the function. GC is more precise now than it was (the only imprecise stuff left is some global variables), so maybe the finalizer test will work now on 32-bit systems. LGTM=khr R=khr CC=golang-codereviews https://golang.org/cl/144030043
-
Russ Cox authored
Fixes #6611. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/14990045
-
Russ Cox authored
Like most of the Type methods, the definition of Comparable is what the Go spec says it is. Fixes #7911. LGTM=gri R=gri, r CC=golang-codereviews https://golang.org/cl/144020043
-
Russ Cox authored
If there is a leading ·, assume there is a Go prototype and attach the Go prototype information to the function. If the function is not called from Go and does not need a Go prototype, it can be made file-local instead (using name<>(SB)). This fixes the current BSD build failures, by giving functions like sync/atomic.StoreUint32 argument stack map information. Fixes #8753. LGTM=khr, iant R=golang-codereviews, iant, khr, bradfitz CC=golang-codereviews, r, rlh https://golang.org/cl/142150043
-
Josh Bleecher Snyder authored
Follow-up to CL 137350043. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/141620043
-
Rob Pike authored
This is a corner case, and one that was even tested, but this CL changes the behavior to say that f is "complete" even if it panics. But don't think of it that way, think of it as sync.Once runs the function only the first time it is called, rather than repeatedly until a run of the function completes. Fixes #8118. LGTM=dvyukov R=golang-codereviews, dvyukov CC=golang-codereviews https://golang.org/cl/137350043
-
Keith Randall authored
LGTM=r R=r, bradfitz, khr CC=golang-codereviews https://golang.org/cl/136660044
-
Russ Cox authored
Might make test less flaky. Fixes #8682. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/143160043
-
Russ Cox authored
We believe TestSelfConnect can accidentally connect to something else listening on or dialing from that port. Fixes #8680. LGTM=bradfitz R=bradfitz CC=golang-codereviews, rlh https://golang.org/cl/136700043
-
Russ Cox authored
There's no point in continuing. We will only get confused. 6g already makes this fatal. LGTM=dave, minux, iant R=iant, dave, minux CC=golang-codereviews https://golang.org/cl/140660043
-
Russ Cox authored
mark finalizer1 as having no pointers TBR=iant CC=golang-codereviews https://golang.org/cl/141570045
-
Russ Cox authored
Along with CLs 139610043 and 141490043, this removes all conservative scanning during garbage collection, except _cgo_allocate, which is SWIG-only. LGTM=rlh, khr R=golang-codereviews, dvyukov, rlh, khr CC=golang-codereviews, iant https://golang.org/cl/144860043
-
Russ Cox authored
Now it's two allocations. I don't see much downside to that, since the two pieces were in different cache lines anyway. Rename 'conservative' to 'cgo_conservative_type' and make clear that _cgo_allocate is the only allowed user. This depends on CL 141490043, which removes the other use of conservative (in defer). LGTM=dvyukov, iant R=khr, dvyukov, iant CC=golang-codereviews, rlh https://golang.org/cl/139610043
-
Russ Cox authored
This makes the GC and the stack copying agree about how to interpret the defer structures. Previously, only the stack copying treated them precisely. This removes an untyped memory allocation and fixes at least three copystack bugs. To make sure the GC can find the deferred argument frame until it has been copied, keep a Defer on the defer list during its execution. In addition to making it possible to remove the untyped memory allocation, keeping the Defer on the list fixes two races between copystack and execution of defers (in both gopanic and Goexit). The problem is that once the defer has been taken off the list, a stack copy that happens before the deferred arguments have been copied back to the stack will not update the arguments correctly. The new tests TestDeferPtrsPanic and TestDeferPtrsGoexit (variations on the existing TestDeferPtrs) pass now but failed before this CL. In addition to those fixes, keeping the Defer on the list helps correct a dangling pointer error during copystack. The traceback routines walk the Defer chain to provide information about where a panic may resume execution. When the executing Defer was not on the Defer chain but instead linked from the Panic chain, the traceback had to walk the Panic chain too. But Panic structs are on the stack and being updated by copystack. Traceback's use of the Panic chain while copystack is updating those structs means that it can follow an updated pointer and find itself reading from the new stack. The new stack is usually all zeros, so it sees an incorrect early end to the chain. The new TestPanicUseStack makes this happen at tip and dies when adjustdefers finds an unexpected argp. The new StackCopyPoison mode causes an earlier bad dereference instead. By keeping the Defer on the list, traceback can avoid walking the Panic chain at all, making it okay for copystack to update the Panics. We'd have the same problem for any Defers on the stack. There was only one: gopanic's dabort. Since we are not taking the executing Defer off the chain, we can use it to do what dabort was doing, and then there are no Defers on the stack ever, so it is okay for traceback to use the Defer chain even while copystack is executing: copystack cannot modify the Defer chain. LGTM=khr R=khr CC=dvyukov, golang-codereviews, iant, rlh https://golang.org/cl/141490043
-
Russ Cox authored
The C header files are the single point of truth: every C enum constant Foo is available to Go as _Foo. Remove or redirect duplicate Go declarations so they cannot be out of sync. Eventually we will need to put constants in Go, but for now having them be out of sync with C is too risky. These predate the build support for auto-generating Go constants from the C definitions. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/141510043
-
Russ Cox authored
Fixes #8196. LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/141510044
-
Russ Cox authored
Fixes #8317. LGTM=bradfitz R=bradfitz, iant, r CC=golang-codereviews https://golang.org/cl/143100043
-
Russ Cox authored
It is more useful to report all the errors instead of just the first. LGTM=dave, khr R=khr, dave CC=golang-codereviews https://golang.org/cl/143940043
-
Josh Bleecher Snyder authored
Fixes #7626. LGTM=iant R=rsc, iant CC=golang-codereviews https://golang.org/cl/144870045
-
- 15 Sep, 2014 12 commits
-
-
Robert Griesemer authored
Document that the package cache has an issue (8425) to speed up future debugging. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/143980043
-
Keith Randall authored
Make sure Goexit runs defers. Make sure recover() during a Goexit defer returns nil. LGTM=dvyukov, bradfitz R=golang-codereviews, dvyukov, bradfitz, khr CC=golang-codereviews https://golang.org/cl/140650043
-
Keith Randall authored
Fixes #8736. LGTM=iant, josharian R=golang-codereviews, iant, josharian CC=golang-codereviews https://golang.org/cl/144910044
-
Josh Bleecher Snyder authored
iterdelete's run time varies; occasionally we get unlucky. To reduce spurious failures, average away some of the variation. On my machine, 8 of 5000 runs (0.15%) failed before this CL. After this CL, there were no failures after 35,000 runs. I confirmed that this adjusted test still fails before CL 141270043. LGTM=khr R=khr CC=bradfitz, golang-codereviews https://golang.org/cl/140610043
-
Rémy Oudompheng authored
During anylit run, nodes such as SLICEARR(statictmp, [:]) may be generated and are expected to be found unchanged by gen_as_init. In some walks (in particular walkselect), the statement may be walked again and lowered to its usual form, leading to a crash. Fixes #8017. Fixes #8024. Fixes #8058. LGTM=rsc R=golang-codereviews, dvyukov, gobot, rsc CC=golang-codereviews https://golang.org/cl/112080043
-
Rémy Oudompheng authored
Previously it might happen before calling dowidth and result in a compiler crash. Fixes #8060. LGTM=dvyukov, rsc R=golang-codereviews, dvyukov, gobot, rsc CC=golang-codereviews https://golang.org/cl/110980044
-
Brad Fitzpatrick authored
Fixes #8722 LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/142090043
-
Alex Brainman authored
I have made mistake while converting it to Go (CL 132820043). Added test as penance for my sin. LGTM=rsc R=golang-codereviews, bradfitz, rsc CC=golang-codereviews https://golang.org/cl/136560043
-
Russ Cox authored
Fixes sporadic linux/386 build failure (untyped args) and probably some others we haven't observed yet. Fixes #8727. TBR=iant R=golang-codereviews CC=bradfitz, golang-codereviews, iant, khr, r https://golang.org/cl/143930043
-
Russ Cox authored
This file was already assigned to another CL so it didn't make it into the build fix CL. Sigh. TBR=iant CC=golang-codereviews https://golang.org/cl/144850043
-
Russ Cox authored
CL 144830043 changed LibCall for Windows. I didn't realize Solaris used it too. TBR=iant CC=golang-codereviews https://golang.org/cl/142100043
-
Russ Cox authored
This is necessary because syscall.Syscall blocks, and the garbage collector needs to be able to scan that frame while it is blocked, and C frames have no garbage collection information. Windows builders are broken now due to this problem: http://build.golang.org/log/152ca9a4be6783d3a8bf6e2f5b9fc265089728b6 LGTM=alex.brainman R=alex.brainman CC=golang-codereviews https://golang.org/cl/144830043
-
- 14 Sep, 2014 3 commits
-
-
Nigel Tao authored
Fixes #8693. LGTM=crawshaw R=crawshaw CC=golang-codereviews https://golang.org/cl/141470043
-
Russ Cox authored
The merged traceback was wrong for LR machines, because traceback didn't pass lr to gentraceback. Now that we have a test looking at traceback output for a trap (the test of runtime.Breakpoint), we caught this. While we're here, fix a 'set and not used' warning. Fixes arm build. TBR=r R=r CC=golang-codereviews https://golang.org/cl/143040043
-
Russ Cox authored
It doesn't. Fixes 386 build. While we're here, mark runtime.asmcgocall as GO_ARGS, so that it will work with stack copying. I don't think anything that uses it can lead to a stack copy, but better safe than sorry. Certainly the runtime.asmcgocall_errno variant needs (and already has) GO_ARGS. TBR=iant CC=golang-codereviews https://golang.org/cl/138400043
-
- 12 Sep, 2014 2 commits
-
-
Robert Griesemer authored
http://build.golang.org/log/0434a945e3351eedaf56aa824d2bfe9c0d5e6735 LGTM=dave R=bradfitz, dave CC=golang-codereviews https://golang.org/cl/144800043
-
Josh Bleecher Snyder authored
The behavior was fixed in CL 141270043. Add a test. Fixes #8410. LGTM=khr R=khr, remyoudompheng CC=golang-codereviews https://golang.org/cl/137560044
-