Skip to content

Commit ee78fb7

Browse files
authored
Merge pull request #1746 from Idclip/tsan_volume_spheres_fix
Fixed a TSAN issue with TBB operators being modified and copied concu…
2 parents f931626 + 065bd6f commit ee78fb7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

openvdb/openvdb/tools/VolumeToSpheres.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class UpdatePoints
549549
const std::vector<Vec3R>& mPoints;
550550
std::vector<float>& mDistances;
551551
std::vector<unsigned char>& mMask;
552-
bool mOverlapping;
552+
const bool mOverlapping;
553553
float mRadius;
554554
int mIndex;
555555
};
@@ -578,8 +578,8 @@ UpdatePoints::UpdatePoints(UpdatePoints& rhs, tbb::split)
578578
, mDistances(rhs.mDistances)
579579
, mMask(rhs.mMask)
580580
, mOverlapping(rhs.mOverlapping)
581-
, mRadius(rhs.mRadius)
582-
, mIndex(rhs.mIndex)
581+
, mRadius(0.0)
582+
, mIndex(0)
583583
{
584584
}
585585

pendingchanges/tsan_spheres.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
OpenVDB:
2+
Bug Fixes:
3+
- Fixed a thread sanitizer issue which could cause undefined behaviour
4+
in VolumeToSpheres::fillWithSpheres
5+
[Reported by Jérémie Dumas]

0 commit comments

Comments
 (0)