-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
itkTestTransformGetInverse test fails under TSan #3037
Comments
@seanm taking a look, it seems we should be calling:
in:
but that may not be the source of this warning. Thanks for looking into these static analysis issues. |
Sorry, where is that code? I don't seem able to find it in master... PS: TSan is not static analysis, it's a runtime checker. |
Here it is: ITK/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx Lines 41 to 51 in 6a1575d
|
Ah, quite different! I'll try adding those 2 lines... |
@thewtex so I added those 2 lines at the end of that function, but alas it does not fix the TSan error. |
@seanm could that fix please be submitted? It may not be the TSan error, but I think it is still a bug. |
@thewtex ok will do. though I'll need help writing a commit message, since I don't know what I'm doing here. Just looking at this again years later... template <typename TParametersValueType, unsigned int VInputDimension, unsigned int VOutputDimension>
const typename MatrixOffsetTransformBase<TParametersValueType, VInputDimension, VOutputDimension>::FixedParametersType &
MatrixOffsetTransformBase<TParametersValueType, VInputDimension, VOutputDimension>::GetFixedParameters() const
{
for (unsigned int i = 0; i < VInputDimension; ++i)
{
this->m_FixedParameters[i] = this->m_Center[i];
}
return this->m_FixedParameters;
} I'm confused: How can this method be const when it's mutating the thing it's returning? |
#4698 is now merged, and, as suspected, wasn't related to the TSan failure, which still occurs in current master. |
Just retesting some tickets... this still occurs in current master ec75692. |
According to bc1bcae,
itkTestTransformGetInverse
was added to demonstrate a threading bug.Seems it was never fixed though?
The test looks to me to be deliberately using
GetInverse
on a transform shared between threads.The root of the weridness, to me, comes from here where a getter method mutates the object.
Full TSan report:
The text was updated successfully, but these errors were encountered: