Ticket #2648 (closed defect: fixed)
GDAL reference counting is thread unsafe
| Reported by: | tamas | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | OGR_SF | Version: | unspecified |
| Severity: | normal | Keywords: | threads refcount |
| Cc: | hobu, tamas |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

