Opened 14 years ago
Closed 14 years ago
#1463 closed defect (fixed)
Access to the CsMap coordinate system dictionary files is not correctly protected by the Mg API
Reported by: | baertelchen | Owned by: | brucedechant |
---|---|---|---|
Priority: | low | Milestone: | 2.3 |
Component: | General | Version: | 2.1.0 |
Severity: | minor | Keywords: | Coordinate System API |
Cc: | External ID: |
Description (last modified by )
See the CriticalSection.h in \MgDev\OS\Common\CoordinateSystem:
There exists the class CustomCriticalSection and a static variable of that class is defined, too.
static CustomCriticalSection CriticalClass;
This one has internal linkage, however; i.e. each object file this header is compiled into, will have it's own instance of CriticalClass.
The problem surfaces, when trying to read all available coordinate systems from multiple threads. The Mg API will eventually fail, because CsMap is not thread-safe.
Originally, only one instance existed.
The attached patch moves the CriticalClass into a separate source file and declares it [extern] in the header.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | FixNonGlobalCriticalSection_1463.patch added |
---|
comment:1 by , 14 years ago
Description: | modified (diff) |
---|---|
Owner: | set to |
comment:2 by , 14 years ago
Milestone: | → 2.3 |
---|
Patch that adds the CriticalSection implementation in its own file, updates to the makefile and the VS project file