Project

General

Profile

Bug #1337

Cpv Declarations of types with constructors may induce 'static initialization order fiasco'

Added by Phil Miller over 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
Start date:
12/21/2016
Due date:
% Done:

0%


Description

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);

Related issues

Related to Charm++ - Bug #1331: Isomalloc hangs in startup for Clang non-SMP builds Merged 12/21/2016

History

#1 Updated by Phil Miller over 2 years ago

https://charm.cs.illinois.edu/gerrit/2093 Fix for the ckcallback case.

#2 Updated by Sam White over 2 years ago

Fix for conv-ldb/topology case: https://charm.cs.illinois.edu/gerrit/#/c/2094/

The rest of these are probably lower priority, being in libs/, langs/, and tests/

#3 Updated by Eric Bohm over 2 years ago

  • Priority changed from Normal to Low

Shifting to low priority as most of these are in code that is more likely to be eliminated than to become important.

#4 Updated by Sam White over 2 years ago

Found another static variable of complex type in src/conv-core/cputopology.C: static CpuTopology cpuTopo;

Edit: nvm, CpuTopology has no constructor.

#5 Updated by Sam White over 2 years ago

  • Target version changed from 6.8.0 to 6.8.1

#6 Updated by Eric Bohm about 2 years ago

  • Assignee set to Phil Miller

#7 Updated by Sam White almost 2 years ago

  • Target version changed from 6.8.1 to 6.9.0

#8 Updated by Phil Miller over 1 year ago

  • Assignee deleted (Phil Miller)

#9 Updated by Eric Bohm over 1 year ago

  • Target version changed from 6.9.0 to 6.9.1

#10 Updated by Eric Bohm over 1 year ago

  • Target version changed from 6.9.1 to Unscheduled

no known use cases to justify making this a release 6.9.1 target

Also available in: Atom PDF