Cpv Declarations of types with constructors may induce 'static initialization order fiasco'
The following Cpv declarations in C++ code instantiate objects of types that have constructors. Those constructors must be called during program startup, before
main(). Their potential to allocate memory and reference other entities that may not have been initialized is a hazard. They should be converted to pointers to those types where appropriate, or otherwise made safe.
typedef CkHashtableT<CkHashtableAdaptorT<unsigned int>, CkCallback*> threadCB_t; src/ck-core/ckcallback.C:CpvStaticDeclare(threadCB_t, threadCBs); // class defs in blue_impl.h src/langs/bluegene/blue.C:CpvDeclare(BGMach, bgMach); src/langs/bluegene/blue.C:CpvDeclare(SimState, simState); // class def in eventID.h src/libs/ck-libs/pose/pose.C:CpvDeclare(eventID, theEventID); tests/charm++/xcastredn/convMsgHandlers.C:CpvDeclare(std::vector<MyChareArray*>, localElems);