- 11 Jun, 2014 1 commit
-
-
Shenghou Ma authored
LGTM=rsc R=dave, rsc CC=golang-codereviews https://golang.org/cl/105030043
-
- 10 Jun, 2014 4 commits
-
-
Brad Fitzpatrick authored
Fixes #8180 LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/105040043
-
Ian Lance Taylor authored
The putpclcdelta function set the DWARF line number PC to s->value + pcline->pc, which is correct, but the code then set the local variable pc to epc, which can be a different value. This caused the next delta in the DWARF table to be wrong. Fixes #8098. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/104950045
-
Rob Pike authored
Fixes #8156. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/108840045
-
Rob Pike authored
align=middle is invalid; use align=center LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/106910044
-
- 06 Jun, 2014 1 commit
-
-
Russ Cox authored
A runtime.Goexit during a panic-invoked deferred call left the panic stack intact even though all the stack frames are gone when the goroutine is torn down. The next goroutine to reuse that struct will have a bogus panic stack and can cause the traceback routines to walk into garbage. Most likely to happen during tests, because t.Fatal might be called during a deferred func and uses runtime.Goexit. This "not enough cleared in Goexit" failure mode has happened to us multiple times now. Clear all the pointers that don't make sense to keep, not just gp->panic. Fixes #8158. LGTM=iant, dvyukov R=iant, dvyukov CC=golang-codereviews https://golang.org/cl/102220043
-
- 05 Jun, 2014 4 commits
-
-
Russ Cox authored
I am not sure what the rounding here was trying to do, but it was skipping the first pointer on native client. The code above the rounding already checks that xoffset is widthptr-aligned, so the rnd was a no-op everywhere but on Native Client. And on Native Client it was wrong. Perhaps it was supposed to be rounding down, not up, but zerorange handles the extra 32 bits correctly, so the rnd does not seem to be necessary at all. This wouldn't be worth doing for Go 1.3 except that it can affect code on the playground. Fixes #8155. LGTM=r, iant R=golang-codereviews, r, iant CC=dvyukov, golang-codereviews, khr https://golang.org/cl/108740047
-
Russ Cox authored
LGTM=r R=r, 0xjnml, bradfitz, iant CC=golang-codereviews https://golang.org/cl/103070046
-
Ian Lance Taylor authored
Fixes #8148. LGTM=cookieo9, rsc R=rsc, cookieo9 CC=golang-codereviews https://golang.org/cl/103080043
-
Dmitriy Vyukov authored
The current wording is reversed in 2 places. Not sure how it got 4 LGTMs (mine was there as well). Update #6242. LGTM=dan.kortschak, r, rsc R=golang-codereviews, 0xjnml, dan.kortschak, r, rsc CC=golang-codereviews https://golang.org/cl/101980047
-
- 04 Jun, 2014 1 commit
-
-
Shenghou Ma authored
doc/install-source.html: document that GO386 will be auto-detected when building on both 386 and amd64. Fixes #8152. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/102150046
-
- 03 Jun, 2014 7 commits
-
-
Ian Lance Taylor authored
It's not clear how widespread this issue is, but we do have a test case generated by a development version of clang. I don't know whether this should go into 1.3 or not; happy to hear arguments either way. LGTM=rsc R=golang-codereviews, bradfitz, rsc CC=golang-codereviews https://golang.org/cl/96680045
-
Ian Lance Taylor authored
Fixes #8126. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/103020044
-
Russ Cox authored
I introduced this bug when I changed the escape analysis to run in phases based on call graph dependency order, in order to be more precise about inputs escaping back to outputs (functions returning their arguments). Given func f(z **int) *int { return *z } we were tagging the function as 'z does not escape and is not returned', which is all true, but not enough information. If used as: var x int p := &x q := &p leak(f(q)) then the compiler might try to keep x, p, and q all on the stack, since (according to the recorded information) nothing interesting ends up being passed to leak. In fact since f returns *q = p, &x is passed to leak and x needs to be heap allocated. To trigger the bug, you need a chain that the compiler wants to keep on the stack (like x, p, q above), and you need a function that returns an indirect of its argument, and you need to pass the head of the chain to that function. This doesn't come up very often: this bug has been present since June 2012 (between Go 1 and Go 1.1) and we haven't seen it until now. It helps that most functions that return indirects are getters that are simple enough to be inlined, avoiding the bug. Earlier versions of Go also had the benefit that if &x really wasn't used beyond x's lifetime, nothing broke if you put &x in a heap-allocated structure accidentally. With the new stack copying, though, heap-allocated structures containing &x are not updated when the stack is copied and x moves, leading to crashes in Go 1.3 that were not crashes in Go 1.2 or Go 1.1. The fix is in two parts. First, in the analysis of a function, recognize when a value obtained via indirect of a parameter ends up being returned. Mark those parameters as having content escape back to the return results (but we don't bother to write down which result). Second, when using the analysis to analyze, say, f(q), mark parameters with content escaping as having any indirections escape to the heap. (We don't bother trying to match the content to the return value.) The fix could be less precise (simpler). In the first part we might mark all content-escaping parameters as plain escaping, and then the second part could be dropped. Or we might assume that when calling f(q) all the things pointed at by q escape always (for any f and q). The fix could also be more precise (more complex). We might record the specific mapping from parameter to result along with the number of indirects from the parameter to the thing being returned as the result, and then at the call sites we could set up exactly the right graph for the called function. That would make notleaks(f(q)) be able to keep x on the stack, because the reuslt of f(q) isn't passed to anything that leaks it. The less precise the fix, the more stack allocations become heap allocations. This fix is exactly as precise as it needs to be so that none of the current stack allocations in the standard library turn into heap allocations. Fixes #8120. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, khr, r https://golang.org/cl/102040046
-
Brad Fitzpatrick authored
Thanks to Frithjof Schulze for noticing. LGTM=adg R=adg CC=agl, golang-codereviews, r https://golang.org/cl/107740043
-
Brad Fitzpatrick authored
Fixes #8134 LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r, rsc https://golang.org/cl/100930044
-
Russ Cox authored
The 'address taken' bit in a function variable was not propagating into the inlined copies, causing incorrect liveness information. LGTM=dsymonds, bradfitz R=golang-codereviews, bradfitz CC=dsymonds, golang-codereviews, iant, khr, r https://golang.org/cl/96670046
-
Russ Cox authored
The 1-byte write was silently clearing a byte on the stack. If there was another function call with more arguments in the same stack frame, no harm done. Otherwise, if the variable at that location was already zero, no harm done. Otherwise, problems. Fixes #8139. LGTM=dsymonds R=golang-codereviews, dsymonds CC=golang-codereviews, iant, r https://golang.org/cl/100940043
-
- 02 Jun, 2014 8 commits
-
-
Rob Pike authored
This is a workaround - the code should be better than this - but the fix avoids generating large numbers of linehist entries for the wrapper functions that enable interface conversions. There can be many of them, they all happen at the end of compilation, and they can all share a linehist entry. Avoids bad n^2 behavior in liblink. Test case in issue 8135 goes from 64 seconds to 2.5 seconds (still bad but not intolerable). Fixes #8135. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/104840043
-
Ian Lance Taylor authored
If we see a typedef to an anonymous struct more than once, presumably in two different Go files that import "C", use the same Go type name. Fixes #8133. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/102080043
-
Ian Lance Taylor authored
LGTM=r R=khr, r CC=golang-codereviews https://golang.org/cl/103810044
-
Andrew Gerrand authored
Not sure how this snuck in undetected. TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://golang.org/cl/106760043
-
Andrew Gerrand authored
LGTM=minux R=golang-codereviews, minux CC=golang-codereviews https://golang.org/cl/106750043
-
Shenghou Ma authored
LGTM=adg R=golang-codereviews, r, adg CC=golang-codereviews https://golang.org/cl/102020045
-
Andrew Gerrand authored
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/102040047
-
Brad Fitzpatrick authored
Update #8112 LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/104790045
-
- 01 Jun, 2014 7 commits
-
-
Shenghou Ma authored
Fix plan 9 build. TBR=rsc R=golang-codereviews CC=golang-codereviews https://golang.org/cl/100880047
-
Russ Cox authored
Fixes #7452. LGTM=minux, iant R=minux, iant CC=golang-codereviews https://golang.org/cl/104770046
-
Andrew Gerrand authored
Right now, any revision on the default branch after go1.3beta2 is described by "go verson" as go1.3beta2 plus some revision. That's OK for now, but once go1.3 is released, that will seem wrong. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/98650046
-
Andrew Gerrand authored
TBR=rsc R=golang-codereviews CC=golang-codereviews https://golang.org/cl/106730043
-
Andrew Gerrand authored
This program has barely been touched since it was first committed, and in its current state it opens a code execution vector similar to the one that was recently fixed in go.tools/playground/socket. Rather than try to make it secure, remove it. LGTM=minux, rsc R=rsc, minux CC=golang-codereviews https://golang.org/cl/102030047
-
Russ Cox authored
We were requiring that the defer stack and the panic stack be completely processed, thinking that if any were left over the stack scan and the defer stack/panic stack must be out of sync. It turns out that the panic stack may well have leftover entries in some situations, and that's okay. Fixes #8132. LGTM=minux, r R=golang-codereviews, minux, r CC=golang-codereviews, iant, khr https://golang.org/cl/100900044
-
Rob Pike authored
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/102040045
-
- 31 May, 2014 7 commits
-
-
Keith Randall authored
C globals are conservatively scanned. This helps avoid false retention, especially for 32 bit. LGTM=rsc R=golang-codereviews, khr, rsc CC=golang-codereviews https://golang.org/cl/102040043
-
Russ Cox authored
The 'continuation pc' is where the frame will continue execution, if anywhere. For a frame that stopped execution due to a CALL instruction, the continuation pc is immediately after the CALL. But for a frame that stopped execution due to a fault, the continuation pc is the pc after the most recent CALL to deferproc in that frame, or else 0. That is where execution will continue, if anywhere. The liveness information is only recorded for CALL instructions. This change makes sure that we never look for liveness information except for CALL instructions. Using a valid PC fixes crashes when a garbage collection or stack copying tries to process a stack frame that has faulted. Record continuation pc in heapdump (format change). Fixes #8048. LGTM=iant, khr R=khr, iant, dvyukov CC=golang-codereviews, r https://golang.org/cl/100870044
-
Russ Cox authored
Fixes #8102. LGTM=bradfitz, dvyukov R=golang-codereviews, bradfitz, dvyukov CC=golang-codereviews https://golang.org/cl/100870046
-
Russ Cox authored
Update #2675 The code here was using the error check for Linux/386, not the one for FreeBSD/386. Most of the time it worked. Thanks to Neel Natu (FreeBSD developer) for finding this. The s/JCC/JAE/ a few lines later is a no-op but makes the test match the rest of the file. Why we write JAE instead of JCC I don't know, but the two are equivalent and the file might as well be consistent. LGTM=bradfitz, minux R=golang-codereviews, bradfitz, minux CC=golang-codereviews https://golang.org/cl/99680044
-
Shenghou Ma authored
TestWriteHeap is useless on NaCl anyway. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/101980048
-
Shenghou Ma authored
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/102920047
-
Shenghou Ma authored
Fixes #8119. LGTM=khr, rsc R=alex.brainman, khr, bradfitz, rsc CC=golang-codereviews https://golang.org/cl/93640044
-