<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/sys_windows_386.s, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-25T22:05:14Z</updated>
<entry>
<title>runtime: delete unused cbctxts variable on windows assembly</title>
<updated>2023-01-25T22:05:14Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2023-01-25T07:56:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2c7856087a7b3864284f908c0a091fd5af419d03'/>
<id>urn:sha1:2c7856087a7b3864284f908c0a091fd5af419d03</id>
<content type='text'>
runtime·cbctxts has been unused since CL 258938, but it was left over.

Change-Id: I374ad26e668a36994e41f5d17593b33090bdc644
Reviewed-on: https://go-review.googlesource.com/c/go/+/463119
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;
</content>
</entry>
<entry>
<title>runtime: remove unused badsignal2 on windows</title>
<updated>2023-01-24T12:56:06Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2023-01-23T11:59:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7b5a34418cd32ec4d2c0f7d6e4c7e6fe7585a17f'/>
<id>urn:sha1:7b5a34418cd32ec4d2c0f7d6e4c7e6fe7585a17f</id>
<content type='text'>
This CL removes badsignal2 function, as it is unused on Windows.

badsignal2 was originally intended to abort the process when
an exception was raised on a non-Go thread, following the same approach
as Linux and others.

Since it was added, back on https://golang.org/cl/5797068, it has caused
several issues on Windows, see #8224 and #50877. That's because we can't
know wether the signal is bad or not, as our trap might not be at the
end of the exception handler chain.

To fix those issues, https://golang.org/cl/104200046 and CL 442896
stopped calling badsignal2, and CL 458135 removed one last incorrect
call on amd64 and 386.

Change-Id: I5bd31ee2672118ae0f1a2c8b46a1bb0f4893a011
Reviewed-on: https://go-review.googlesource.com/c/go/+/463116
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: factor out windows sigtramp</title>
<updated>2023-01-24T12:05:07Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2022-12-16T15:54:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=cf9263dee1bb160f013a080bbda3532a7d35da15'/>
<id>urn:sha1:cf9263dee1bb160f013a080bbda3532a7d35da15</id>
<content type='text'>
This CL factors out part of the Windows sigtramp implementation, which
was duplicated in all four architectures. The new common code is
implemented in Go rather than in assembly, which will make Windows
error handling easier to reason and maintain.

While here, implement the control flow guard workaround on
windows/386, which almost comes for free.

Change-Id: I0bf38c28c54793225126e161bd95527a62de05e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/458135
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime,cmd/internal/obj/x86: use TEB TLS slots on windows/i386</title>
<updated>2023-01-23T18:15:35Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2022-12-02T08:25:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=28f8dbd7b941648aea311bb0cf331f88c02441b6'/>
<id>urn:sha1:28f8dbd7b941648aea311bb0cf331f88c02441b6</id>
<content type='text'>
This CL redesign how we get the TLS pointer on windows/i386.
It applies the same changes as done in CL 431775 for windows/amd64.

We were previously reading it from the [TEB] arbitrary data slot,
located at 0x14(FS), which can only hold 1 TLS pointer.

With this CL, we will read the TLS pointer from the TEB TLS slot array,
located at 0xE10(GS). The TLS slot array can hold multiple
TLS pointers, up to 64, so multiple Go runtimes running on the
same thread can coexists with different TLS.

Each new TLS slot has to be allocated via [TlsAlloc],
which returns the slot index. This index can then be used to get the
slot offset from GS with the following formula: 0xE10 + index*4.

The slot index is fixed per Go runtime, so we can store it
in runtime.tls_g and use it latter on to read/update the TLS pointer.

Loading the TLS pointer requires the following asm instructions:

  MOVQ runtime.tls_g, AX
  MOVQ AX(FS), AX

Notice that this approach will now be implemented in all the supported
windows arches.

[TEB]: https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
[TlsAlloc]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsalloc

Change-Id: If4550b0d44694ee6480d4093b851f4991a088b32
Reviewed-on: https://go-review.googlesource.com/c/go/+/454675
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>[dev.typeparams] runtime: use internal/abi.FuncPCABI0 to take address of assembly functions</title>
<updated>2021-05-21T21:52:38Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2021-05-20T22:55:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=fb42fb705df4832a76165f9a36f3a8d5d7ca8f49'/>
<id>urn:sha1:fb42fb705df4832a76165f9a36f3a8d5d7ca8f49</id>
<content type='text'>
There are a few assembly functions in the runtime that are marked
as ABIInternal, solely because funcPC can get the right address.
The functions themselves do not actually follow ABIInternal (or
irrelevant). Now we have internal/abi.FuncPCABI0, use that, and
un-mark the functions.

Also un-mark assembly functions that are only called in assembly.
For them, it only matters if the caller and callee are consistent.

Change-Id: I240e126ac13cb362f61ff8482057ee9f53c24097
Reviewed-on: https://go-review.googlesource.com/c/go/+/321950
Trust: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: abort when receiving a signal on a non-Go thread on Windows</title>
<updated>2021-05-04T21:16:16Z</updated>
<author>
<name>Michael Anthony Knyszek</name>
<email>mknyszek@google.com</email>
</author>
<published>2021-05-04T16:00:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=cd28ca3a4e130c88dd8f2d198050620b11d22ce4'/>
<id>urn:sha1:cd28ca3a4e130c88dd8f2d198050620b11d22ce4</id>
<content type='text'>
Currently if a signal lands on a non-Go thread that's handled by the Go
handler, Go will emit a message. However, unlike everywhere else in the
runtime, Go will not abort the process after, and the signal handler
will try to continue executing.

This leads to cascading failures and possibly even memory corruption.

For #45638.

Change-Id: I546f4e82f339d555bed295528d819ac883b92bc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/316809
Trust: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: move Windows time.now implementations into separate files</title>
<updated>2021-04-28T20:16:36Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-04-27T23:04:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b36596b14f8d3bee586479323c56b5db416a49e5'/>
<id>urn:sha1:b36596b14f8d3bee586479323c56b5db416a49e5</id>
<content type='text'>
This is a step toward separating whether time.now is implemented in
assembly from whether we are using faketime.

Change-Id: I8bf059b44a103b034835e3d3b799319cc05e9552
Reviewed-on: https://go-review.googlesource.com/c/go/+/314273
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: consolidate Windows time constants into single copy</title>
<updated>2021-04-28T15:58:43Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-04-27T17:58:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e51246c8819f16cd78d3da01162ca14b432d30bc'/>
<id>urn:sha1:e51246c8819f16cd78d3da01162ca14b432d30bc</id>
<content type='text'>
Change-Id: I1a583d3da9cca4ac51f3fec9b508b7638b452d60
Reviewed-on: https://go-review.googlesource.com/c/go/+/314270
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: eliminate externalthreadhandler</title>
<updated>2021-04-13T21:13:12Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2021-04-13T12:44:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c19759aa487f7d6f479daa00e7462425f4efc481'/>
<id>urn:sha1:c19759aa487f7d6f479daa00e7462425f4efc481</id>
<content type='text'>
This function is no longer used.

Eliminating this actually fixes several problems:

- It made assumptions about what registers memclrNoHeapPointers would
  preserve. Besides being an abstraction violation and lurking
  maintenance issue, this actively became a problem for regabi because
  the call to memclrNoHeapPointers now happens through an ABI wrapper,
  which is generated by the compiler and hence we can't easily control
  what registers it clobbers.

- The amd64 implementation (at least), does not interact with the host
  ABI correctly. Notably, it doesn't save many of the registers that
  are callee-save in the host ABI but caller-save in the Go ABI.

- It interacts strangely with the NOSPLIT checker because it allocates
  an entire M and G on its stack. It worked around this on arm64, and
  happened to do things the NOSPLIT checker couldn't track on 386 and
  amd64, and happened to be *4 bytes* below the limit on arm (so any
  addition to the m or g structs would cause a NOSPLIT failure). See
  CL 309031 for a more complete explanation.

Fixes #45530.
Updates #40724.

Change-Id: Ic70d4d7e1c17f1d796575b3377b8529449e93576
Reviewed-on: https://go-review.googlesource.com/c/go/+/309634
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: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: use newm for profileloop</title>
<updated>2021-04-13T21:13:11Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2021-04-13T12:32:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e69f02265c74529a368a2ff27fdce4aeb3483e8b'/>
<id>urn:sha1:e69f02265c74529a368a2ff27fdce4aeb3483e8b</id>
<content type='text'>
This replaces the externalthreadhandler-based implementation of
profileloop with one that uses newm to start a new thread. This is a
step toward eliminating externalthreadhandler.

For #45530.

Change-Id: Id8e5540423fe2d2004024b649afec6998f77b092
Reviewed-on: https://go-review.googlesource.com/c/go/+/309633
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: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
</feed>
