<div>Hi All</div><div> </div><div>my question is<div>starting from gdal-3.x OGRCoordinateTransformation object (::Transform() in particular) is not intended to be used by multiple threads?</div><div>With gdal-2.4 it worked fine.</div></div><div> </div><div>details:</div><div> </div><div>We have upgraded from using gdal-2.4.3 to gdal-3.1.2 and started to get crashes in multi-threaded code with this stack</div><div> </div><div>#3 OGRSpatialReference::GetAxis(char const*, int, OGRAxisOrientation*) const gdal-3.1.2/ogr/ogrspatialreference.cpp:9603<br />#4 OGRProjCT::Transform(int, double*, double*, double*, double*, int*) gdal-3.1.2/ogr/ogrct.cpp:1686<br />#5 OGRCoordinateTransformation::Transform(int, double*, double*, double*, int*) gdal-3.1.2/ogr/ogrct.cpp:1487</div><div> </div><div>ogrspatialreference.cpp:9603 line is const char * assignment to CPLString</div><div>d->m_osAxisName[iAxis] = pszName;</div><div> </div><div>all threads are using the same OGRCoordinateTransformation object and here race between multiple threads could produce double-free (#1-#2 part of stack)</div><div> </div><div>with gdal-2.4.3 it looked different</div><div>OGRProj4CT::Transform was not calling GetAxis</div><div>and even GetAxis itself did not use temporary libproj context with axis name, but only it's internal structure</div><div> </div><div>Regards</div><div>Maxim</div><div> </div><div> </div><div> </div>