<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libgo/runtime, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>runtime: avoid libc memmove and memclr</title>
<updated>2025-07-08T22:49:16+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2025-07-01T04:26:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=479872227c0ac284f3935cafe90c70348059a35c'/>
<id>479872227c0ac284f3935cafe90c70348059a35c</id>
<content type='text'>
The libc memmove and memclr don't reliably operate on full memory words.
We already avoided them on PPC64, but the same problem can occur even
on x86, where some processors use "rep movsb" and "rep stosb".
Always use C code that stores full memory words.

While we're here, clean up the C code. We don't need special handling
if the memmove/memclr pointers are not pointer-aligned.

Unfortunately, this will likely be slower. Perhaps some day we can
have our own assembly code that operates a word at a time,
or we can use different operations when we know there are no pointers.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/685178
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The libc memmove and memclr don't reliably operate on full memory words.
We already avoided them on PPC64, but the same problem can occur even
on x86, where some processors use "rep movsb" and "rep stosb".
Always use C code that stores full memory words.

While we're here, clean up the C code. We don't need special handling
if the memmove/memclr pointers are not pointer-aligned.

Unfortunately, this will likely be slower. Perhaps some day we can
have our own assembly code that operates a word at a time,
or we can use different operations when we know there are no pointers.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/685178
</pre>
</div>
</content>
</entry>
<entry>
<title>syscall: don't define syscall stub on Hurd</title>
<updated>2024-10-30T18:33:07+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2024-10-29T22:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=aad9de322774c25e80f3ade6ecd96f45b62bf40a'/>
<id>aad9de322774c25e80f3ade6ecd96f45b62bf40a</id>
<content type='text'>
Patch from Samuel Thibault.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/623415
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch from Samuel Thibault.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/623415
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: dump registers on Solaris</title>
<updated>2024-04-29T18:39:58+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2024-04-28T20:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=a05efc8bf5ed329ea7d9b1740c326bdc6b04e37a'/>
<id>a05efc8bf5ed329ea7d9b1740c326bdc6b04e37a</id>
<content type='text'>
Patch by Rainer Orth &lt;ro@gcc.gnu.org&gt;.

Fixes PR go/106813

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/581724
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Rainer Orth &lt;ro@gcc.gnu.org&gt;.

Fixes PR go/106813

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/581724
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: use &lt;stdbool.h&gt;</title>
<updated>2024-04-29T17:59:28+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2024-04-28T16:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=678dc5e85053f1a1ca76997eec95ba8823bb6830'/>
<id>678dc5e85053f1a1ca76997eec95ba8823bb6830</id>
<content type='text'>
&lt;stdbool.h&gt; has been available since C99. Use it rather than defining
our own boolean type and values.

Fixes https://gcc.gnu.org/PR114875

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/582275
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&lt;stdbool.h&gt; has been available since C99. Use it rather than defining
our own boolean type and values.

Fixes https://gcc.gnu.org/PR114875

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/582275
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: use a C function to call mmap</title>
<updated>2023-06-20T16:55:58+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2023-06-19T21:57:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=efecb298d880cda20f8d7bea2d7b500a9752ce56'/>
<id>efecb298d880cda20f8d7bea2d7b500a9752ce56</id>
<content type='text'>
The final argument to mmap, of type off_t, varies.
In CL 445375 we changed it to always use the C off_t type,
but that broke 32-bit big-endian Linux systems.  On those systems,
using the C off_t type requires calling the mmap64 function.
In C this is automatically handled by the &lt;sys/mman.h&gt; file.
In Go, we would have to change the magic //extern comment to
call mmap64 when appropriate.  Rather than try to get that right,
we instead go through a C function that uses C implicit type
conversions to pick the right type.

Fixes PR go/110297

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504415
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The final argument to mmap, of type off_t, varies.
In CL 445375 we changed it to always use the C off_t type,
but that broke 32-bit big-endian Linux systems.  On those systems,
using the C off_t type requires calling the mmap64 function.
In C this is automatically handled by the &lt;sys/mman.h&gt; file.
In Go, we would have to change the magic //extern comment to
call mmap64 when appropriate.  Rather than try to get that right,
we instead go through a C function that uses C implicit type
conversions to pick the right type.

Fixes PR go/110297

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504415
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: force XSI strerror on hurd</title>
<updated>2022-11-30T20:21:15+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-11-30T17:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=91607eba8fe49c064192122ec60a3e03dd8f2515'/>
<id>91607eba8fe49c064192122ec60a3e03dd8f2515</id>
<content type='text'>
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454275
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454275
</pre>
</div>
</content>
</entry>
<entry>
<title>syscall, runtime: always call XSI strerror_r</title>
<updated>2022-11-30T00:09:13+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-11-29T23:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b6c6a3d64f2e4e9347733290aca3c75898c44b2e'/>
<id>b6c6a3d64f2e4e9347733290aca3c75898c44b2e</id>
<content type='text'>
This does the right thing for either glibc or musl on GNU/Linux.

Based on patch by Sören Tempel.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This does the right thing for either glibc or musl on GNU/Linux.

Based on patch by Sören Tempel.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: portable access to sigev_notify_thread_id</title>
<updated>2022-09-27T16:30:23+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-09-26T19:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=e73d9fcafbd07bc3714fbaf8a82db71d50015c92'/>
<id>e73d9fcafbd07bc3714fbaf8a82db71d50015c92</id>
<content type='text'>
Previously, libgo relied on the _sigev_un implementation-specific
field in struct sigevent, which is only available on glibc.
This patch uses the sigev_notify_thread_id macro instead which is
mandated by timer_create(2). In theory, this should work with any libc
implementation for Linux. Unfortunately, there is an open glibc bug
as glibc does not define this macro. For this reason, a glibc-specific
workaround is required. Other libcs (such as musl) define the macro
and don't require the workaround.

See https://sourceware.org/bugzilla/show_bug.cgi?id=27417

This makes libgo compatible with musl libc.

Based on patch by Sören Tempel.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, libgo relied on the _sigev_un implementation-specific
field in struct sigevent, which is only available on glibc.
This patch uses the sigev_notify_thread_id macro instead which is
mandated by timer_create(2). In theory, this should work with any libc
implementation for Linux. Unfortunately, there is an open glibc bug
as glibc does not define this macro. For this reason, a glibc-specific
workaround is required. Other libcs (such as musl) define the macro
and don't require the workaround.

See https://sourceware.org/bugzilla/show_bug.cgi?id=27417

This makes libgo compatible with musl libc.

Based on patch by Sören Tempel.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: ignore __morestack function in runtime.Callers</title>
<updated>2022-09-07T01:39:50+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-09-03T17:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=c0852b51b7a68ada822955eb7ef83d933cc33e47'/>
<id>c0852b51b7a68ada822955eb7ef83d933cc33e47</id>
<content type='text'>
We were ignoring all functions starting with "__morestack_", but not
the function "__morestack" itself.  Without this change, some tests
such as recover.go started failing recently, though I'm not sure
exactly what changed.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/427935
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were ignoring all functions starting with "__morestack_", but not
the function "__morestack" itself.  Without this change, some tests
such as recover.go started failing recently, though I'm not sure
exactly what changed.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/427935
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: use correct field name for PPC32 GLIBC registers</title>
<updated>2022-04-21T00:49:44+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-04-20T21:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=6a4e9934545c112eef5eb7248636baa96cbfd2c0'/>
<id>6a4e9934545c112eef5eb7248636baa96cbfd2c0</id>
<content type='text'>
One of these days we will get this right.

Fixes PR go/105315

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/401374
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of these days we will get this right.

Fixes PR go/105315

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/401374
</pre>
</div>
</content>
</entry>
</feed>
