-
-
Notifications
You must be signed in to change notification settings - Fork 708
BUG: code crashes when DICOM with 12 bits allocated is processed #5561
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
base: main
Are you sure you want to change the base?
BUG: code crashes when DICOM with 12 bits allocated is processed #5561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing a pull request! 🙏
Welcome to the ITK community! 🤗👋☀️
We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜
More support and guidance on the contribution process can be found in our contributing guide. 📖
This is an automatic message. Allow for time for the ITK community to be able to read the pull request and comment
on it.
if (inOutBufferLength != len) | ||
{ | ||
gdcmDebugMacro("inOutBufferLength = " << inOutBufferLength | ||
<< ", inBufferLength = " << inBufferLength << ", len = " << len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
at the end of the line 123.
Also (line 133, 134)
assert (len == inOutBufferLength);
gdcm_assert(inOutBufferLength == len);
becаme unreachable, can be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malaterre This issue may be resolved by removing line 133 in the upstream GDCM code. It looks like an assert persists in the code and causes the crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malaterre This issue may be resolved by removing line 133 in the upstream GDCM code. It looks like an assert persists in the code and causes the crash.
gdcm_assert(exception) won't be caught by ITK, even if it were, there would be a memory leak (copy
is freed after this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the builds failed due to Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx:123:86: error: expected ';' after 'static_assert'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see commit f57e45134ce6f0092687d0c4a69b5d7bee991dc5 in git/release branch. Let me know if this is acceptable solution.
Thanks all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Purushoth24051999 please check malaterre/GDCM@f57e451. To easily do that, download and build this version of GDCM, then in ITK turn on ITK_USE_SYSTEM_GDCM
. Then you should be able to pick GDCM_DIR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR maybe/probably should have been made against upstream. |
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.