GDAL reference counting is thread unsafe
|Reported by:||tamas||Owned by:||warmerdam|
Currently the reference counting implementation doesn't use atomic increment and decrement operations, and therefore it may cause memory corruption issues with the garbage collected runtimes like for C#. Attached a C# example which can produce the problem quite systematically.
I think we could utilize something like the InterlockedIncrement/InterlockedDecrement API on Windows to make these operations atomic.
Change History (12)
follow-up: 5 comment:4 by , 14 years ago
|Component:||default → OGR_SF|
|Keywords:||threads refcount added|
|Priority:||normal → high|