Menu

#576 Crash in gdcmOverlay.cxx:323

3.1
open
nobody
None
5
2026-05-20
2026-01-15
Adrien
No

I get a crash with the attached dicom file and gdcm 3.2.2:

$ gdcmconv -i ../test\ files/gdcm-crash.dcm -w -o raw.dcm
libc++abi: terminating due to uncaught exception of type gdcm::Exception: /private/tmp/nix-build-gdcm-3.2.2.drv-0/source/Source/MediaStorageAndFileFormat/gdcmOverlay.cxx:323 ():
An invalid logic behavior occurred8 * ovlength == (unsigned int)Internal->Rows * Internal->Columns
1 Attachments

Discussion

  • Oliver Schneider

    Do you happen to know which Clang version and which libc++ version you used? Would also be useful to know if you used any libc++ hardening options. The error message suggests it a bit ...

     
  • Oliver Schneider

    With this new branch and UBSan + libc++ hardening enabled, I don't see it at the current release.

    Used command line:

    rm -rf _build/; env CFLAGS="-std=c17" CC=clang CXX=clang++ cmake -S . -B _build -G "Ninja Multi-Config" -DCMAKE_INSTALL_PREFIX=_output -DGDCM_BUILD_APPLICATIONS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache -DGDCM_USE_SYSTEM_ZLIB=ON -DGDCM_USE_SYSTEM_EXPAT=ON -DGDCM_LINK_LIBCXX=ON -DGDCM_HARDENING=ON -DGDCM_SANITIZER_UBSAN=ON -DGDCM_OVERRIDE_HARDENING_MODE_RELEASE=debug && cmake --build _build --config Release
    
     

Log in to post a comment.