[Debian-med-packaging] Bug#923433: 0x51063B3: EncoderStrategy::Flush() (encoderstrategy.h:156)

Mathieu Malaterre malat at debian.org
Fri Mar 8 11:29:35 GMT 2019


Control: severity -1 important
Control: tags -1 patch

Turns out that every single DICOM instance that I tried seems to
produce the exact same SEGFAULT.

Running in valgrind show something like this for me (*).

I would suggest the following trivial patch to have a stable
DCMTK+JPEGLS encoder in buster:

$ cat debian/patches/series
01_dcmtk_3.6.0-1.patch
#02_system_charls.patch
03_datadic_install.patch
04_Fixed-OFoptional-by-introducing-OFalign.patch
05_performance.patch
07_dont_export_all_executables.patch
08_remove_system_processor.patch
#09_charls-2.0.patch

I suspect there is little value in using CharLS 2.0 for DCMTK until
upstream decide to make the move.

Thanks for consideration,

(*)
==3030== Invalid write of size 1
==3030==    at 0x51063B3: EncoderStrategy::Flush() (encoderstrategy.h:156)
==3030==    by 0x5106554: EncoderStrategy::AppendToBitStream(int, int)
(encoderstrategy.h:87)
==3030==    by 0x5116F95: EncodeMappedValue (scan.h:347)
==3030==    by 0x5116F95: DoRegular (scan.h:271)
==3030==    by 0x5116F95: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::DoLine(unsigned short*) (scan.h:660)
==3030==    by 0x5117169: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::DoScan() (scan.h:739)
==3030==    by 0x5117502: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::EncodeScan(std::unique_ptr<ProcessLine,
std::default_delete<ProcessL
ine> >, ByteStreamInfo&, void*) (scan.h:820)
==3030==    by 0x5127BBD:
JpegImageDataSegment::Serialize(JpegStreamWriter&)
(jpegstreamreader.cpp:81)
==3030==    by 0x5128C90: JpegStreamWriter::Write(ByteStreamInfo
const&) (jpegstreamwriter.cpp:65)
==3030==    by 0x5100C29: JpegLsEncodeStream(ByteStreamInfo, unsigned
long&, ByteStreamInfo, JlsParameters const&, char*)
(interface.cpp:136)
==3030==    by 0x5100D65: JpegLsEncode (interface.cpp:218)
==3030==    by 0x4875A20: DJLSEncoderBase::compressRawFrame(unsigned
char const*, unsigned short, unsigned short, unsigned short, unsigned
short, unsigned sho
rt, OFString const&, DcmPixelSequence*, OFList<unsigned int>&,
unsigned long&, DJLSCodecParameter const*) const (djcodece.cc:676)
==3030==    by 0x34B60D1E920A2A2: ???
==3030==    by 0x148147302459A4FF: ???
==3030==  Address 0x1fff001000 is not stack'd, malloc'd or (recently) free'd
==3030==
==3030==
==3030== Process terminating with default action of signal 11 (SIGSEGV)
==3030==  Access not within mapped region at address 0x1FFF001000
==3030==    at 0x51063B3: EncoderStrategy::Flush() (encoderstrategy.h:156)
==3030==    by 0x5106554: EncoderStrategy::AppendToBitStream(int, int)
(encoderstrategy.h:87)
==3030==    by 0x5116F95: EncodeMappedValue (scan.h:347)
==3030==    by 0x5116F95: DoRegular (scan.h:271)
==3030==    by 0x5116F95: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::DoLine(unsigned short*) (scan.h:660)
==3030==    by 0x5117169: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::DoScan() (scan.h:739)
==3030==    by 0x5117502: JlsCodec<LosslessTraitsT<unsigned short,
16>, EncoderStrategy>::EncodeScan(std::unique_ptr<ProcessLine,
std::default_delete<ProcessL
ine> >, ByteStreamInfo&, void*) (scan.h:820)



More information about the Debian-med-packaging mailing list