Open seanm opened 2 months ago
@dzenanz @hjmjohnson @N-Dekker I don't know this code at all, but I noticed the existence of m_ANTSAssociateOnceFlag
already, so this fix seems good to me.
BTW I've created a nightly cdash submission than uses Thread Sanitizer: https://open.cdash.org/viewTest.php?onlyfailed&buildid=9578838
I will triage the other test failures...
Anyone have further thoughts on this one?
Friendly ping. @dzenanz @N-Dekker @hjmjohnson @thewtex any thoughts on this one?
In the big picture, it would be a major improvement to migrate this code to modern C++ lambda's, use
thread_local
, etc. in terms of readability, maybe performance, and immunity to some of these subtle issues like race conditions.
I don't actually use this class, so while I agree, realistically I won't have time to volunteer for that. :)
What I have been trying to spend a bit of time on though is get all ITK tests passing with TSan.
10 to go: https://open.cdash.org/viewTest.php?onlyfailed&buildid=9719623
Found with thread sanitizer (TSan) running the
itkANTSNeighborhoodCorrelationImageToImageRegistrationTest
unit test.There was already a
m_ANTSAssociateOnceFlag
flag for use withstd::call_once
, so I just used that in this place too (it's already used elsewhere).Partial backtrace from TSan:
PR Checklist
Refer to the ITK Software Guide for further development details if necessary.