Project

General

Profile

Actions

Bug #755

closed

Segmentation fault in empty DcmDataDictionary

Added by Jan Schlamelcher over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Jan Schlamelcher
Category:
-
Target version:
Start date:
2017-05-17
Due date:
% Done:

100%

Estimated time:
Module:
dcmdata
Operating System:
Compiler:

Description

The recently introduced configuration tests for correct implementation of various STL classes showed that the failing DcmDataDictionary test was not caused by incorrect iterator invalidation as previously assumed. Instead it was caused by DcmHashDictIterator's implementation that relied on comparing default constructed std::list iterators in case the dictionary was empty (since the dictionary contains an array of lists, no list object is available within an empty dictionary that could be used to construct an iterator by calling std::list<>::end() etc.). The comparison of default constructed (more precise: value initialized) iterators has only be specified for C++14 and later and was previously undefined. Most compilers seem to have implemented the now specified behavior that all value initialized iterators compare equal with each other, however, Visual Studio 2010 (and earlier) produced code that segfaulted. Since this behavior was perfectly legal prior to C++14, a workaround has been implemented by commit #db46b818b48630177.

Actions #1

Updated by Jan Schlamelcher over 8 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF