diff --git a/Changes b/Changes index 5053279e0b..ae32797428 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,14 @@ -10.5.x.x (relative to 10.5.18.1) +10.5.x.x (relative to 10.5.18.2) ======== +10.5.18.2 (relative to 10.5.18.1) +======== + +Fixes +----- + +- VDB : Mitigated lack of thread safety in `hash()` + 10.5.18.1 (relative to 10.5.18.0) ======== diff --git a/SConstruct b/SConstruct index 2009706062..bcac6be15a 100644 --- a/SConstruct +++ b/SConstruct @@ -55,7 +55,7 @@ SConsignFile() ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below ieCoreMajorVersion = 5 # backwards-incompatible changes ieCoreMinorVersion = 18 # new backwards-compatible features -ieCorePatchVersion = 1 # bug fixes +ieCorePatchVersion = 2 # bug fixes ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc. ########################################################################################### diff --git a/src/IECoreVDB/VDBObject.cpp b/src/IECoreVDB/VDBObject.cpp index 41b09d6328..d4449bf805 100644 --- a/src/IECoreVDB/VDBObject.cpp +++ b/src/IECoreVDB/VDBObject.cpp @@ -424,11 +424,12 @@ openvdb::GridBase::Ptr VDBObject::HashedGrid::grid() const IECore::MurmurHash VDBObject::HashedGrid::hash() const { + /// \todo This is not threadsafe. Fix it. if( !m_hashValid ) { - m_hash = IECore::MurmurHash(); + IECore::MurmurHash h; - MurmurHashSink sink( m_hash ); + MurmurHashSink sink( h ); boost::iostreams::stream hashStream( sink ); openvdb::io::StreamMetadata::Ptr streamMetadata ( new openvdb::io::StreamMetadata() ); @@ -439,6 +440,7 @@ IECore::MurmurHash VDBObject::HashedGrid::hash() const m_grid->writeBuffers( hashStream ); m_grid->writeTransform( hashStream ); + m_hash = h; m_hashValid = true; }