Comments (6)
To simplify debugging:
- use bdwgc master branch
- add parameters to configure: --enable-gc-assertions --disable-threads
- do not use "incremental mode" (-D GC_DISABLE_INCREMENTAL)
- focus on gctest (test.c) debugging (you could even compile it w/o configure: gcc -I include -D GC_ASSERTIONS -D GC_DISABLE_INCREMENTAL -O0 -g tests/test.c)
from bdwgc.
It seems gc currently never defines HAVE_DL_ITERATE_PHDR
on non-glibc Linux platforms. Musl have the one and it is required to work with libc.so properly.
By adding it on dyn_load.c
, --enable-gc-assertions --disable-threads
passes make check
.
For threading support, Musl's default stack size is way too small compared to glibc; at least 80k seems not enough to parallel markers. I think we need 256K-ish here.
I'm not sure why incremental collection is not working on Musl yet..
from bdwgc.
Please contribute the patch
from bdwgc.
The hard part is Musl have no __MUSL__
as the FAQ says so there is no way to statically add any Musl specific workarounds.
Possible solutions are...
- Determine
dl_iterate_phdr
existence withAC_TRY_COMPILE
- Consider
defined(LINUX) && !defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__dietlibc__)
as Musl - Just let distributors to do the workaround
I'm now trying to do 2 but just started research around dietlibc..(and pray there is no other libc exists on Linux)
In case try-compile preferred over 2, I will prepare patch against configure.ac
and CMakeLists.txt
but I believe we have historically avoided doing any dynamic configuration.
from bdwgc.
I suggest solution 2.
Related issues: #70 #84
from bdwgc.
Finally I implemented the 1st approach - see my comment in #148
I have not solved the issue with small stacks for parallel markers, so --disable-parallel-mark should be passed configure.
If you have some patches not submitted to upstream, you are welcome.
PS. Topics related to musl: #66, #70, #72, #84, #123, #148
from bdwgc.
Related Issues (20)
- Downstream libgc releases (Feb 2024) HOT 21
- GC hangs with "parallel mark" if using `GC_allow_register_threads()` HOT 11
- Debugging an issue with GC seemingly not happening on Emscripten/WebAssembly
- Upstream TLS support HOT 2
- How final are the finalizers? HOT 2
- Problem getting finalizers to work HOT 3
- Add examples collection of small programs showing how to use GC for varioues features and with different configurations HOT 2
- Support CHERI extension
- using extra pointer bits on x86_64 (tagged pointer support) HOT 3
- Resolve warnings reported by cppcheck 2.13.3
- rare case of infinite loop on Android HOT 9
- gctest hang on msys64 if mprotected-based incremental collection is on HOT 5
- zig-msvc target error: 'unistd.h' file not found HOT 18
- Specify soversion for shared libs built by Zig
- Unexpected heap growth in gctest if no parallel marker
- cordtest hang on Windows if shared build by Zig using msvc HOT 7
- Some Windows gnu builds hang in zig build
- gctest hang sometimes on Windows if compiled with threads discovery
- Redirect malloc_usable_size() in leak_detector.h HOT 6
- Compilation with TCC fails on ARM macs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bdwgc.