Git Product home page Git Product logo

Comments (6)

ivmai avatar ivmai commented on July 17, 2024

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.

okuoku avatar okuoku commented on July 17, 2024

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.

ivmai avatar ivmai commented on July 17, 2024

Please contribute the patch

from bdwgc.

okuoku avatar okuoku commented on July 17, 2024

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...

  1. Determine dl_iterate_phdr existence with AC_TRY_COMPILE
  2. Consider defined(LINUX) && !defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__dietlibc__) as Musl
  3. 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.

ivmai avatar ivmai commented on July 17, 2024

I suggest solution 2.
Related issues: #70 #84

from bdwgc.

ivmai avatar ivmai commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.