<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go, branch go1.15.3</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=go1.15.3</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=go1.15.3'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2020-10-14T19:10:41Z</updated>
<entry>
<title>[release-branch.go1.15] go1.15.3</title>
<updated>2020-10-14T19:10:41Z</updated>
<author>
<name>Alexander Rakoczy</name>
<email>alex@golang.org</email>
</author>
<published>2020-10-14T17:45:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1984ee00048b63eacd2155cd6d74a2d13e998272'/>
<id>urn:sha1:1984ee00048b63eacd2155cd6d74a2d13e998272</id>
<content type='text'>
Change-Id: I8a45870039d0d3f210d883c464a7fed2abd9e28b
Reviewed-on: https://go-review.googlesource.com/c/go/+/262337
Run-TryBot: Alexander Rakoczy &lt;alex@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Alexander Rakoczy &lt;alex@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: fix left shift constant folding rule</title>
<updated>2020-10-14T15:13:22Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-10-01T16:57:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7863f742c4e8427a7169325b024c2d8a970e0134'/>
<id>urn:sha1:7863f742c4e8427a7169325b024c2d8a970e0134</id>
<content type='text'>
The 32-bit left shift constant folding rule should keep its result
properly sign extended.

Fixes #41720
Fixes #41711

Change-Id: I0fc74444d444274e911952e1725dab0b7737a846
Reviewed-on: https://go-review.googlesource.com/c/go/+/258817
Trust: Keith Randall &lt;khr@golang.org&gt;
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] runtime: correct signature of call16</title>
<updated>2020-10-14T15:11:41Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2020-10-03T20:44:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8b224e9951438283ae53ae35dc2a50a56fccc404'/>
<id>urn:sha1:8b224e9951438283ae53ae35dc2a50a56fccc404</id>
<content type='text'>
The signature of call16 is currently missing the "typ" parameter. This
CL fixes this. This wasn't caught by vet because call16 is defined by
macro expansion (see #17544), and we didn't notice the mismatch with
the other call* functions because call16 is defined only on 32-bit
architectures and lives alone in stubs32.go.

Unfortunately, this means its GC signature is also wrong: the "arg"
parameter is treated as a scalar rather than a pointer, so GC won't
trace it and stack copying won't adjust it. This turns out to matter
in exactly one case right now: on 32-bit architectures (which are the
only architectures where call16 is defined), a stack-allocated defer
of a function with a 16-byte or smaller argument frame including a
non-empty result area can corrupt memory if the deferred function
grows the stack and is invoked during a panic. Whew. All other current
uses of reflectcall pass a heap-allocated "arg" frame (which happens
to be reachable from other stack roots, so tracing isn't a problem).

Curiously, in 2016, the signatures of all call* functions were wrong
in exactly this way. CL 31654 fixed all of them in stubs.go, but
missed the one in stubs32.go.

Updates #41795.
Fixes #41797.

Change-Id: I31e3c0df201f79ee5707eeb8dc4ff0d13fc10ada
Reviewed-on: https://go-review.googlesource.com/c/go/+/259338
Trust: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/259598
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: export notinheap annotation to object file</title>
<updated>2020-10-12T15:15:57Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-10-02T23:04:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=76a2c87a2c4e78f40f0f70bda3da93c773630179'/>
<id>urn:sha1:76a2c87a2c4e78f40f0f70bda3da93c773630179</id>
<content type='text'>
In the rare case when a cgo type makes it into an object file, we need
the go:notinheap annotation to go with it.

Fixes #41432.

Change-Id: Ie2ef241ee49661792e0d8c8c46c51b2fe5c6fa7c
Reviewed-on: https://go-review.googlesource.com/c/go/+/259300
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: propagate go:notinheap implicitly</title>
<updated>2020-10-09T17:25:48Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-09-17T16:55:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=cfeb16ddec5b2134198dcc029cdd501ed11a7c01'/>
<id>urn:sha1:cfeb16ddec5b2134198dcc029cdd501ed11a7c01</id>
<content type='text'>
//go:notinheap
type T int

type U T

We already correctly propagate the notinheap-ness of T to U.  But we
have an assertion in the typechecker that if there's no explicit
//go:notinheap associated with U, then report an error. Get rid of
that error so that implicit propagation is allowed.

Adjust the tests so that we make sure that uses of types like U
do correctly report an error when U is used in a context that might
cause a Go heap allocation.

Update #41432

Change-Id: I1692bc7cceff21ebb3f557f3748812a40887118d
Reviewed-on: https://go-review.googlesource.com/c/go/+/255637
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
(cherry picked from commit 22053790fa2c0944df53ea95df476ad2f855424f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/255697
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: make go:notinheap error message friendlier for cgo</title>
<updated>2020-10-09T17:25:25Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-08-27T21:05:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=46a6fd080635001d7f9fbd8118094f0aa21661a0'/>
<id>urn:sha1:46a6fd080635001d7f9fbd8118094f0aa21661a0</id>
<content type='text'>
Update #40954

Change-Id: Ifaab7349631ccb12fc892882bbdf7f0ebf3d845f
Reviewed-on: https://go-review.googlesource.com/c/go/+/251158
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/255338
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/cgo: use go:notinheap for anonymous structs</title>
<updated>2020-10-09T17:25:11Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-08-26T21:17:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=96983721d42e9e238ea9fec720849ab7bb616122'/>
<id>urn:sha1:96983721d42e9e238ea9fec720849ab7bb616122</id>
<content type='text'>
They can't reasonably be allocated on the heap. Not a huge deal, but
it has an interesting and useful side effect.

After CL 249917, the compiler and runtime treat pointers to
go:notinheap types as uintptrs instead of real pointers (no write
barrier, not processed during stack scanning, ...). That feature is
exactly what we want for cgo to fix #40954. All the cases we have of
pointers declared in C, but which might actually be filled with
non-pointer data, are of this form (JNI's jobject heirarch, Darwin's
CFType heirarchy, ...).

Fixes #40954

Change-Id: I44a3b9bc2513d4287107e39d0cbbd0efd46a3aae
Reviewed-on: https://go-review.googlesource.com/c/go/+/250940
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/255321
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: allow aliases to go:notinheap types</title>
<updated>2020-10-09T17:24:56Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-08-26T21:07:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=142027888a7d3da0494d77581166f1d120317864'/>
<id>urn:sha1:142027888a7d3da0494d77581166f1d120317864</id>
<content type='text'>
The alias doesn't need to be marked go:notinheap. It gets its
notinheap-ness from the target type.

Without this change, the type alias test in the notinheap.go file
generates these two errors:

notinheap.go:62: misplaced compiler directive
notinheap.go:63: type nih must be go:notinheap

The first is a result of go:notinheap pragmas not applying
to type alias declarations.
The second is the result of then trying to match the notinheap-ness
of the alias and the target type.

Add a few more go:notinheap tests while we are here.

Update #40954

Change-Id: I067ec47698df6e9e593e080d67796fd05a1d480f
Reviewed-on: https://go-review.googlesource.com/c/go/+/250939
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/255337
Trust: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: don't allow go:notinheap on the heap or stack</title>
<updated>2020-10-09T17:24:33Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-08-22T03:20:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=439ce71eb6a472c5f758021a92f06d8489ca0689'/>
<id>urn:sha1:439ce71eb6a472c5f758021a92f06d8489ca0689</id>
<content type='text'>
Right now we just prevent such types from being on the heap. This CL
makes it so they cannot appear on the stack either. The distinction
between heap and stack is pretty vague at the language level (e.g. it
is affected by -N), and we don't need the flexibility anyway.

Once go:notinheap types cannot be in either place, we don't need to
consider pointers to such types to be pointers, at least according to
the garbage collector and stack copying. (This is the big win of this
CL, in my opinion.)

The distinction between HasPointers and HasHeapPointer no longer
exists. There is only HasPointers.

This CL is cleanup before possible use of go:notinheap to fix #40954.

Update #13386

Change-Id: Ibd895aadf001c0385078a6d4809c3f374991231a
Reviewed-on: https://go-review.googlesource.com/c/go/+/255320
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/compile: make Haspointers a method instead of a function</title>
<updated>2020-10-09T17:24:07Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2020-08-22T21:07:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a460a2beee167fc5e7ada6d4effbbf2a52969bfb'/>
<id>urn:sha1:a460a2beee167fc5e7ada6d4effbbf2a52969bfb</id>
<content type='text'>
More ergonomic that way. Also change Haspointers to HasPointers
while we are here.

Change-Id: I45bedc294c1a8c2bd01dc14bd04615ae77555375
Reviewed-on: https://go-review.googlesource.com/c/go/+/249959
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/255318
Trust: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
</feed>
