Opened 10 years ago

Closed 10 years ago

#4848 closed defect (fixed)

CPLOpenShared() doesn't behave nicely in a multi-threaded scenario

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 1.9.2
Component: default Version: unspecified
Severity: normal Keywords: CPLOpenShared VRTRawRasterBand threads
Cc:

Description

Reported as http://lists.osgeo.org/pipermail/gdal-dev/2012-October/034175.html

VRTRawRasterBand uses CPLOpenShared() to open the raw file. If 2 threads open the same VRT, they will currently share the same handle to the raw file, which will lead to chaos.

To avoid that, CPLOpenShared() must take into account the thread ID.

Change History (1)

comment:1 by Even Rouault, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r25041) and branches/1.9 (r25042)

Note: See TracTickets for help on using tickets.