View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0004099 | ITK | | public | 2006-11-30 05:32 | 2007-02-02 11:27 |
|
Reporter | Marco Nolden | |
Assigned To | Luis Ibanez | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
|
Summary | 0004099: crash with static initialization in shared object file |
Description | My application crashed while loading a dll which itself does some static initializations on load time which create itk objects.
The problem I identified was the itself statically initialized TimeStampMutex.
My proposed patch moves the initialization of TimeStampMutex so it is guaranteed before first usage. |
Tags | No tags attached. |
|
Resolution Date | |
Sprint | |
Sprint Status | |
|
Attached Files | timestamp-patch [^] (615 bytes) 1969-12-31 19:00 [Show Content] [Hide Content]--- /opt/share/itk-3.0.0/InsightToolkit-3.0.0/Code/Common/itkTimeStamp.cxx 2003-09-10 16:29:27.000000000 +0200
+++ itkTimeStamp.cxx 2006-11-30 11:27:31.000000000 +0100
@@ -33,8 +33,6 @@
return new Self;
}
-/** Used for mutex locking */
-static SimpleFastMutexLock TimeStampMutex;
/**
* Make sure the new time stamp is greater than all others so far.
@@ -47,6 +45,8 @@
* Initialize static member
*/
static unsigned long itkTimeStampTime = 0;
+ /** Used for mutex locking */
+ static SimpleFastMutexLock TimeStampMutex;
TimeStampMutex.Lock();
m_ModifiedTime = ++itkTimeStampTime;
|
|