-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix segfault with next boehm gc (after v8.2.4) #14130
Fix segfault with next boehm gc (after v8.2.4) #14130
Conversation
The next release of libgc segfaults while marking the stacks when compiling without MT. Replacing the direct access to `GC_stackbottom` with the thread-safe version (already used on windows) avoids the problem and doesn't seem to have any negative impact on performance.
The thread-safe functions are a relatively recent addition that we upstreamed to libgc. The use of (That's the reason CI is failing on aarch64. We're using an old build image for that.) |
Weird, I don't have any segfault running the
|
….0 only Let's keep support for older GC releases (before 8.2.0), and manipulating GC_stackbottom seems to be noticeably faster than the thread explicit methods, so let's only enable it for 8.3.0
I'm now using I also fixed the library name for pkg-config which is |
There doesn't seem to be any noticeable impact on performance, even with lots of allocations (fibers, channels) and fiber swapcontexts. Co-authored-by: Johannes Müller <straightshoota@gmail.com>
Note: this is another (tiny) step to a thread safe stdlib, and thus towards MT 😁 |
This pull request has been mentioned on Crystal Forum. There might be relevant details there: https://forum.crystal-lang.org/t/crystal-no-longer-runs-gc-in-parallel-threads/6892/6 |
The next release of libgc segfaults while marking the stacks when compiling without MT. Replacing the direct access to
GC_stackbottom
with the thread-safe version (already used on windows) avoids the problem and doesn't seem to have any negative impact on performance.