broadinstitute / gamgee

A C++14 library for NGS data formats
http://broadinstitute.github.io/gamgee/
MIT License
40 stars 13 forks source link

Void return type for operator ++ and -- in IndividualFieldValueIterator #368

Closed kgururaj closed 10 years ago

kgururaj commented 10 years ago

operators ++ and -- in IndividualFieldValueIterator should not return anything. Expecting a return may cause access to out of bounds memory access, if the iterator points to end() of the field value. Valgrind returns several illegal memory accesses, even for the test case. In some scenarios, it could cause a segmentation fault.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling a4ef26dd1b0e21e67df7ccdea4e48acbc4460513 on intel_individual_field_value_iterator_increment into 9b297d4c54a3de52ef60aa71999091899860d366 on master.

droazen commented 10 years ago

Do we need to do the same in the SharedFieldIterator before we can close out https://github.com/broadinstitute/gamgee/issues/318?