<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/os/exec, branch master</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>os, syscall: support ill-formed UTF-16 strings on Windows</title>
<updated>2023-05-15T09:26:16+00:00</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2023-05-05T16:17:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=974236bda9b9aad87b4b10ec9af2cc01b14e382f'/>
<id>974236bda9b9aad87b4b10ec9af2cc01b14e382f</id>
<content type='text'>
Windows UTF-16 strings can contain unpaired surrogates, which can't be
decoded into a valid UTF-8 string. This file defines a set of functions
that can be used to encode and decode potentially ill-formed UTF-16
strings by using the
[the WTF-8 encoding](https://simonsapin.github.io/wtf-8/).

WTF-8 is a strict superset of UTF-8, i.e. any string that is
well-formed in UTF-8 is also well-formed in WTF-8 and the content
is unchanged. Also, the conversion never fails and is lossless.

The benefit of using WTF-8 instead of UTF-8 when decoding a UTF-16
string is that the conversion is lossless even for ill-formed
UTF-16 strings. This property allows to read an ill-formed UTF-16
string, convert it to a Go string, and convert it back to the same
original UTF-16 string.

Fixes #59971

Change-Id: Id6007f6e537844913402b233e73d698688cd5ba6
Reviewed-on: https://go-review.googlesource.com/c/go/+/493036
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Paul Hampson &lt;Paul.Hampson@Pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Windows UTF-16 strings can contain unpaired surrogates, which can't be
decoded into a valid UTF-8 string. This file defines a set of functions
that can be used to encode and decode potentially ill-formed UTF-16
strings by using the
[the WTF-8 encoding](https://simonsapin.github.io/wtf-8/).

WTF-8 is a strict superset of UTF-8, i.e. any string that is
well-formed in UTF-8 is also well-formed in WTF-8 and the content
is unchanged. Also, the conversion never fails and is lossless.

The benefit of using WTF-8 instead of UTF-8 when decoding a UTF-16
string is that the conversion is lossless even for ill-formed
UTF-16 strings. This property allows to read an ill-formed UTF-16
string, convert it to a Go string, and convert it back to the same
original UTF-16 string.

Fixes #59971

Change-Id: Id6007f6e537844913402b233e73d698688cd5ba6
Reviewed-on: https://go-review.googlesource.com/c/go/+/493036
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Paul Hampson &lt;Paul.Hampson@Pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: add check for unknown godebug setting</title>
<updated>2023-04-18T13:19:19+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2023-03-14T18:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=14ab998f95b53baa6e336c598b0f34e319cc9717'/>
<id>14ab998f95b53baa6e336c598b0f34e319cc9717</id>
<content type='text'>
A //go:debug line mentioning an unknown or retired setting
should be diagnosed as making the program invalid. Do that.
We agreed on this in the proposal but I forgot to implement it.

Change-Id: Ie69072a1682d4eeb6866c02adbbb426f608567c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/476280
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A //go:debug line mentioning an unknown or retired setting
should be diagnosed as making the program invalid. Do that.
We agreed on this in the proposal but I forgot to implement it.

Change-Id: Ie69072a1682d4eeb6866c02adbbb426f608567c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/476280
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os: add wasip1 support</title>
<updated>2023-04-07T23:34:21+00:00</updated>
<author>
<name>Johan Brandhorst-Satzkorn</name>
<email>johan.brandhorst@gmail.com</email>
</author>
<published>2023-03-25T17:18:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=66cac9e1e4877ac7e66f888b0599a7a4a5787b76'/>
<id>66cac9e1e4877ac7e66f888b0599a7a4a5787b76</id>
<content type='text'>
For #58141

Co-authored-by: Richard Musiol &lt;neelance@gmail.com&gt;
Co-authored-by: Achille Roussel &lt;achille.roussel@gmail.com&gt;
Co-authored-by: Julien Fabre &lt;ju.pryz@gmail.com&gt;
Co-authored-by: Evan Phoenix &lt;evan@phx.io&gt;
Change-Id: I52e3e161f81dcbe8605570e47d732992979c4d34
Reviewed-on: https://go-review.googlesource.com/c/go/+/479623
Run-TryBot: Johan Brandhorst-Satzkorn &lt;johan.brandhorst@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For #58141

Co-authored-by: Richard Musiol &lt;neelance@gmail.com&gt;
Co-authored-by: Achille Roussel &lt;achille.roussel@gmail.com&gt;
Co-authored-by: Julien Fabre &lt;ju.pryz@gmail.com&gt;
Co-authored-by: Evan Phoenix &lt;evan@phx.io&gt;
Change-Id: I52e3e161f81dcbe8605570e47d732992979c4d34
Reviewed-on: https://go-review.googlesource.com/c/go/+/479623
Run-TryBot: Johan Brandhorst-Satzkorn &lt;johan.brandhorst@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: skip remount in TestFindExecutableVsNoexec on EROFS</title>
<updated>2023-04-04T21:20:20+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2023-04-04T12:57:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=2f2b874b0aab741a8628fd971f4b3aa41e2fdffb'/>
<id>2f2b874b0aab741a8628fd971f4b3aa41e2fdffb</id>
<content type='text'>
To allow using testenv.SyscallIsNotSupported, rewrite the test to use
the exported API only. Given that path is an absolute path,
exec.LookPath is equivalent to exec.findExecutable on linux.

Fixes #59087

Change-Id: Ia01b84d4e9d5a65a88dd995f9e3c8a81c4ccd19f
Reviewed-on: https://go-review.googlesource.com/c/go/+/481620
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Bypass: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To allow using testenv.SyscallIsNotSupported, rewrite the test to use
the exported API only. Given that path is an absolute path,
exec.LookPath is equivalent to exec.findExecutable on linux.

Fixes #59087

Change-Id: Ia01b84d4e9d5a65a88dd995f9e3c8a81c4ccd19f
Reviewed-on: https://go-review.googlesource.com/c/go/+/481620
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Bypass: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/link/internal/ld: move more of mustLinkExternal into internal/platform</title>
<updated>2023-03-02T16:34:21+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-03-01T16:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=3f8f929d60a90c4e4e2b07c8d1972166c1a783b1'/>
<id>3f8f929d60a90c4e4e2b07c8d1972166c1a783b1</id>
<content type='text'>
internal/platform.MustLinkExternal is used in various places to
determine whether external linking is required. It should always
match what the linker actually requires, but today does not match
because the linker imposes additional constraints.

Updates #31544.

Change-Id: I0cc6ad587e95c607329dea5d60d29a5fb2a9e722
Reviewed-on: https://go-review.googlesource.com/c/go/+/472515
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
internal/platform.MustLinkExternal is used in various places to
determine whether external linking is required. It should always
match what the linker actually requires, but today does not match
because the linker imposes additional constraints.

Updates #31544.

Change-Id: I0cc6ad587e95c607329dea5d60d29a5fb2a9e722
Reviewed-on: https://go-review.googlesource.com/c/go/+/472515
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: fix typos</title>
<updated>2023-02-28T03:43:42+00:00</updated>
<author>
<name>pgxiaolianzi</name>
<email>gnnu_d13@163.com</email>
</author>
<published>2023-02-27T06:51:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=81cd9ff7dbf46a57710fd72330f2d60e3db959d0'/>
<id>81cd9ff7dbf46a57710fd72330f2d60e3db959d0</id>
<content type='text'>
Change-Id: Ica8d5e5799a4de532764ae86cdb623508d3a8e18
GitHub-Last-Rev: 3e97cca9de3885f2fe0d7deb776e59cc1c73146d
GitHub-Pull-Request: golang/go#58689
Reviewed-on: https://go-review.googlesource.com/c/go/+/471021
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ica8d5e5799a4de532764ae86cdb623508d3a8e18
GitHub-Last-Rev: 3e97cca9de3885f2fe0d7deb776e59cc1c73146d
GitHub-Pull-Request: golang/go#58689
Reviewed-on: https://go-review.googlesource.com/c/go/+/471021
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os: use testenv.Command instead of exec.Command in tests</title>
<updated>2023-02-21T23:07:55+00:00</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2022-11-18T06:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=dd87e33d88eadaf5302895fb91b0a0e2e16b136e'/>
<id>dd87e33d88eadaf5302895fb91b0a0e2e16b136e</id>
<content type='text'>
testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I84d469d12ca1f39175b713ca41e7cd2202d11d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/451895
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I84d469d12ca1f39175b713ca41e7cd2202d11d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/451895
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>internal/godebug: export non-default-behavior counters in runtime/metrics</title>
<updated>2023-01-19T22:26:43+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-11-28T18:59:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=213495a4a67c318a1fab6e76093e6690c2141c0e'/>
<id>213495a4a67c318a1fab6e76093e6690c2141c0e</id>
<content type='text'>
Allow GODEBUG users to report how many times a setting
resulted in non-default behavior.

Record non-default-behaviors for all existing GODEBUGs.

Also rework tests to ensure that runtime is in sync with runtime/metrics.All,
and generate docs mechanically from metrics.All.

For #56986.

Change-Id: Iefa1213e2a5c3f19ea16cd53298c487952ef05a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/453618
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow GODEBUG users to report how many times a setting
resulted in non-default behavior.

Record non-default-behaviors for all existing GODEBUGs.

Also rework tests to ensure that runtime is in sync with runtime/metrics.All,
and generate docs mechanically from metrics.All.

For #56986.

Change-Id: Iefa1213e2a5c3f19ea16cd53298c487952ef05a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/453618
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: avoid leaking an exec.Cmd in TestWaitInterrupt</title>
<updated>2023-01-10T17:59:34+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-01-10T16:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=82f09b75ca181a6be0e594e1917e4d3d91934b27'/>
<id>82f09b75ca181a6be0e594e1917e4d3d91934b27</id>
<content type='text'>
In CL 436655 I added a GODEBUG setting to this test process to verify
that Wait is eventually called for every exec.Cmd before it becomes
unreachable. However, the cmdHang test helpers in
TestWaitInterrupt/Exit-hang and TestWaitInterrupt/SIGKILL-hang
intentially leak a subprocess in order to simulate a leaky third-party
program, as Go users might encounter in practical use.

To avoid tripping over the leak check, we call Wait on the leaked
subprocess in a background goroutine. Since we expect the process
running cmdHang to exit before its subprocess does, the call to Wait
should have no effect beyond suppressing the leak check.

Fixes #57596.
Updates #52580.
Updates #50436.

Change-Id: Ia4b88ea47fc6b605c27ca6d9d7669c874867a900
Reviewed-on: https://go-review.googlesource.com/c/go/+/460998
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In CL 436655 I added a GODEBUG setting to this test process to verify
that Wait is eventually called for every exec.Cmd before it becomes
unreachable. However, the cmdHang test helpers in
TestWaitInterrupt/Exit-hang and TestWaitInterrupt/SIGKILL-hang
intentially leak a subprocess in order to simulate a leaky third-party
program, as Go users might encounter in practical use.

To avoid tripping over the leak check, we call Wait on the leaked
subprocess in a background goroutine. Since we expect the process
running cmdHang to exit before its subprocess does, the call to Wait
should have no effect beyond suppressing the leak check.

Fixes #57596.
Updates #52580.
Updates #50436.

Change-Id: Ia4b88ea47fc6b605c27ca6d9d7669c874867a900
Reviewed-on: https://go-review.googlesource.com/c/go/+/460998
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: retry ETXTBSY errors in TestFindExecutableVsNoexec</title>
<updated>2022-12-16T03:04:44+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-12-15T22:09:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=3323dab1f45bbad1033cdd0c2fbfb9884c5d54cc'/>
<id>3323dab1f45bbad1033cdd0c2fbfb9884c5d54cc</id>
<content type='text'>
I made this test parallel in CL 439196, which exposed it to the
fork/exec race condition described in #22315. The ETXTBSY errors from
that race should resolve on their own, so we can simply retry the call
to get past them.

Fixes #56811.
Updates #22315.

Change-Id: I2c6aa405bf3a1769d69cf08bf661a9e7f86440b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/458016
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I made this test parallel in CL 439196, which exposed it to the
fork/exec race condition described in #22315. The ETXTBSY errors from
that race should resolve on their own, so we can simply retry the call
to get past them.

Fixes #56811.
Updates #22315.

Change-Id: I2c6aa405bf3a1769d69cf08bf661a9e7f86440b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/458016
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
