<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/stack.c, branch fix-runtime-test-GOMAXPROCS</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2014-11-11T22:04:34Z</updated>
<entry>
<title>[dev.cc] runtime: convert panic and stack code from C to Go</title>
<updated>2014-11-11T22:04:34Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-11-11T22:04:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d98553a72782efb2d96c6d6f5e12869826a56779'/>
<id>urn:sha1:d98553a72782efb2d96c6d6f5e12869826a56779</id>
<content type='text'>
The conversion was done with an automated tool and then
modified only as necessary to make it compile and run.

[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]

LGTM=r
R=r, dave
CC=austin, dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/166520043
</content>
</entry>
<entry>
<title>runtime: fix line number in first stack frame in printed stack trace</title>
<updated>2014-10-29T19:14:24Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-10-29T19:14:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a22c11b9957cf3f0d66dd6d1d38172d5ac0ec54a'/>
<id>urn:sha1:a22c11b9957cf3f0d66dd6d1d38172d5ac0ec54a</id>
<content type='text'>
Originally traceback was only used for printing the stack
when an unexpected signal came in. In that case, the
initial PC is taken from the signal and should be used
unaltered. For the callers, the PC is the return address,
which might be on the line after the call; we subtract 1
to get to the CALL instruction.

Traceback is now used for a variety of things, and for
almost all of those the initial PC is a return address,
whether from getcallerpc, or gp-&gt;sched.pc, or gp-&gt;syscallpc.
In those cases, we need to subtract 1 from this initial PC,
but the traceback code had a hard rule "never subtract 1
from the initial PC", left over from the signal handling days.

Change gentraceback to take a flag that specifies whether
we are tracing a trap.

Change traceback to default to "starting with a return PC",
which is the overwhelmingly common case.

Add tracebacktrap, like traceback but starting with a trap PC.

Use tracebacktrap in signal handlers.

Fixes #7690.

LGTM=iant, r
R=r, iant
CC=golang-codereviews
https://golang.org/cl/167810044
</content>
</entry>
<entry>
<title>runtime: add GODEBUG invalidptr setting</title>
<updated>2014-10-29T01:53:31Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-10-29T01:53:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8fcdc70c5ebf9c8d160b85e9402e7db5f4bf0793'/>
<id>urn:sha1:8fcdc70c5ebf9c8d160b85e9402e7db5f4bf0793</id>
<content type='text'>
Fixes #8861.
Fixes #8911.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/165780043
</content>
</entry>
<entry>
<title>runtime: zero a few more dead pointers.</title>
<updated>2014-10-09T00:22:34Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2014-10-09T00:22:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b02450da0227c757205fd16b6648bddceb980d83'/>
<id>urn:sha1:b02450da0227c757205fd16b6648bddceb980d83</id>
<content type='text'>
In channels, zeroing of gp.waiting is missed on a closed channel panic.
m.morebuf.g is not zeroed.

I don't expect the latter causes any problems, but just in case.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/151610043
</content>
</entry>
<entry>
<title>runtime: delay freeing of shrunk stacks until gc is done.</title>
<updated>2014-10-08T22:57:20Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2014-10-08T22:57:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=91e8554b8b9edfb4b05b2c04a50daf4df8ffed7b'/>
<id>urn:sha1:91e8554b8b9edfb4b05b2c04a50daf4df8ffed7b</id>
<content type='text'>
This change prevents confusion in the garbage collector.
The collector wants to make sure that every pointer it finds
isn't junk.  Its criteria for junk is (among others) points
to a "free" span.

Because the stack shrinker modifies pointers in the heap,
there is a race condition between the GC scanner and the
shrinker.  The GC scanner can see old pointers (pointers to
freed stacks).  In particular this happens with SudoG.elem
pointers.

Normally this is not a problem, as pointers into stack spans
are ok.  But if the freed stack is the last one in its span,
the span is marked as "free" instead of "contains stacks".

This change makes sure that even if the GC scanner sees
an old pointer, the span into which it points is still
marked as "contains stacks", and thus the GC doesn't
complain about it.

This change will make the GC pause a tiny bit slower, as
the stack freeing now happens in serial with the mark pause.
We could delay the freeing until the mutators start back up,
but this is the simplest change for now.

TBR=dvyukov
CC=golang-codereviews
https://golang.org/cl/158750043
</content>
</entry>
<entry>
<title>runtime: fix throwsplit check</title>
<updated>2014-09-30T15:34:33Z</updated>
<author>
<name>Dmitriy Vyukov</name>
<email>dvyukov@google.com</email>
</author>
<published>2014-09-30T15:34:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=12308d5a0bb424ef3ee9a664c77192b48e3df84c'/>
<id>urn:sha1:12308d5a0bb424ef3ee9a664c77192b48e3df84c</id>
<content type='text'>
Newstack runs on g0, g0-&gt;throwsplit is never set.

LGTM=rsc
R=rsc
CC=golang-codereviews, khr
https://golang.org/cl/147370043
</content>
</entry>
<entry>
<title>cgo: adjust return value location to account for stack copies.</title>
<updated>2014-09-25T14:59:01Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2014-09-25T14:59:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1b6807bb069c528447270c3d6c66c5c7597f388f'/>
<id>urn:sha1:1b6807bb069c528447270c3d6c66c5c7597f388f</id>
<content type='text'>
During a cgo call, the stack can be copied.  This copy invalidates
the pointer that cgo has into the return value area.  To fix this
problem, pass the address of the location containing the stack
top value (which is in the G struct).  For cgo functions which
return values, read the stktop before and after the cgo call to
compute the adjustment necessary to write the return value.

Fixes #8771

LGTM=iant, rsc
R=iant, rsc, khr
CC=golang-codereviews
https://golang.org/cl/144130043
</content>
</entry>
<entry>
<title>cmd/cc, cmd/ld, runtime: disallow conservative data/bss objects</title>
<updated>2014-09-24T20:55:26Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-09-24T20:55:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=193daab9889708f7a20ff46efe0fa4b2bf0468d3'/>
<id>urn:sha1:193daab9889708f7a20ff46efe0fa4b2bf0468d3</id>
<content type='text'>
In linker, refuse to write conservative (array of pointers) as the
garbage collection type for any variable in the data/bss GC program.

In the linker, attach the Go type to an already-read C declaration
during dedup. This gives us Go types for C globals for free as long
as the cmd/dist-generated Go code contains the declaration.
(Most runtime C declarations have a corresponding Go declaration.
Both are bss declarations and so the linker dedups them.)

In cmd/dist, add a few more C files to the auto-Go-declaration list
in order to get Go type information for the C declarations into the linker.

In C compiler, mark all non-pointer-containing global declarations
and all string data as NOPTR. This allows them to exist in C files
without any corresponding Go declaration. Count C function pointers
as "non-pointer-containing", since we have no heap-allocated C functions.

In runtime, add NOPTR to the remaining pointer-containing declarations,
none of which refer to Go heap objects.

In runtime, also move os.Args and syscall.envs data into runtime-owned
variables. Otherwise, in programs that do not import os or syscall, the
runtime variables named os.Args and syscall.envs will be missing type
information.

I believe that this CL eliminates the final source of conservative GC scanning
in non-SWIG Go programs, and therefore...

Fixes #909.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/149770043
</content>
</entry>
<entry>
<title>runtime: add runtime· prefix to some static variables</title>
<updated>2014-09-19T17:51:23Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-09-19T17:51:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5c795632d658003bdc193b0441137385950bca54'/>
<id>urn:sha1:5c795632d658003bdc193b0441137385950bca54</id>
<content type='text'>
Pure renaming. This will make an upcoming CL have smaller diffs.

LGTM=dvyukov, iant
R=iant, dvyukov
CC=golang-codereviews
https://golang.org/cl/142280043
</content>
</entry>
<entry>
<title>runtime: free stacks of Gdead goroutines at GC time</title>
<updated>2014-09-17T20:25:46Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2014-09-17T20:25:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=92eb1e1600c3770d2ec669a8d6b7947cac551305'/>
<id>urn:sha1:92eb1e1600c3770d2ec669a8d6b7947cac551305</id>
<content type='text'>
We could probably free the G structures as well, but
for the allg list.  Leaving that for another day.

Fixes #8287

LGTM=rsc
R=golang-codereviews, dvyukov, khr, rsc
CC=golang-codereviews
https://golang.org/cl/145010043
</content>
</entry>
</feed>
