Actions
Bug #1144
closedDiScaleTemplate<>::interpolatePixel() segfault on MacOS ARM
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Library and Apps
Target version:
-
Start date:
2024-12-25
Due date:
% Done:
0%
Estimated time:
Module:
Operating System:
MacOS
Compiler:
Apple clang 15.0.0
Description
DCMTK's image scaling routine causes segmentation faults in certain situations on MacOS X ARM.
The segmentation fault EXC_BAD_ACCESS (SIGSEGV) is caused by an access to an invalid or out-of-bounds address in memory, in the following method:
Notes:
The segmentation fault EXC_BAD_ACCESS (SIGSEGV) is caused by an access to an invalid or out-of-bounds address in memory, in the following method:
DiScaleTemplate<unsigned char>::interpolatePixel(unsigned char const**, unsigned char**)
Notes:
- The error only occurs in a Release build (which uses the -O3 flag). It does not occur in a Debug build or a "ReleaseWithDebInfo" build (which uses -O2 -g).
- The error only occurs if interpolation algorithm 1 (
--interpolate 1
) is used, which is the default.
- Apple clang version 15.0.0 (clang-1500.0.40.1)
- Target: arm64-apple-darwin22.5.0
The issue can be reproduced with the following command line and the sample file provided here:
dcmscale -v --scale-x-size 800 smpte.dcm output.dcm
Files
Actions