Open Shadowfall357 opened 3 years ago
I can reproduce. It's both an easy and hard fix.
So my check is a sanity check to ensure that thread-local variables are all zeroes. I technically only rely on this only for my background Weave experimental API https://github.com/mratsim/weave/blob/f41a5626880e55600f57eb1dbf5c29ae30e8cfb2/weave/datatypes/context_thread_local.nim#L107-L110, https://github.com/mratsim/weave/blob/e5a3701d59ec17c1c71a22a299ab526777054b44/weave/contexts.nim#L34
In practice, this is true for all other GCs, and it seems to be true whether TLS emulation is used or not but:
GcBoehm has strange comparison issues with thread-local variables\ before the offending check, it seems like I do get binary zero \ Another strange error if I remove that check and run the test suite on Boehm
It seems like GC Boehm somehow implies TLS Emulation which I don't support because it does weird things and I can't deactivate it.
So the next steps are:
Note that I should be able to rely on zero initialization of thread-local variables in C++: https://en.cppreference.com/w/cpp/language/zero_initialization I assume it's the same for C though I can't find a public spec.
--gc:boehm does indeed imply --tlsEmulation:on, this was a bugfix as Boehm apparently doesn't consider roots inside thread-local storage. However, this is likely to be platform specific...
Hello,
is it possible to use Weave with gc Boehm? I wrote this simple program:
Unfortunately I get this error when compiling with Boehm GC with more than 8 threads:
Am I doing something wrong or does the boehm gc not work with weave?
Thank you in advance.