[Gc] windows static thread (release) error
meessen at cppm.in2p3.fr
Wed May 23 10:17:17 PDT 2007
since gc7.0a9 is not working in release mode, I'm back to 6.8. But it
also doesn't work in release mode. Stack trace shows that a
GC_malloc_uncollectable is performed in cinit which is called before
main to initialize global or static variables. GC_INIT was not called.
Suggestion: adding inline code in all c++ new operators to call GC_INIT
before malloc if gc is not yet initialize. This can be wrapped in an
ifdef so that it is only inserted when desired.
This will make C++ code using libgc more robust against global and
static initialization involving malloc calls. I will try it with gc6.8
to see how far I get with this change.
More information about the Gc