[vtk-developers] Crashes after recent checkins
Brad King
brad.king at kitware.com
Mon Aug 26 13:29:41 EDT 2013
On 08/26/2013 12:05 PM, Berk Geveci wrote:
> Can you try this?
>From the patch:
+ if (!vtkTimeStamp::GlobalTimeStamp)
+ {
+#if VTK_SIZEOF_VOID_P == 8
+ vtkTimeStamp::GlobalTimeStamp = new vtkAtomicInt64;
This runtime initialization is not thread-safe, which IIUC
is the entire point of using an atomic integer. We can
achieve proper static initialization and finalization using
the same Schwarz Counter idiom:
http://en.wikibooks.org/wiki/More_C++_Idioms/Nifty_Counter
that we already use in several places. It provides a way
to order things across translation units.
-Brad
More information about the vtk-developers
mailing list