MarkOates / blast

0 stars 0 forks source link

Flakey test in DependencySymbolAtomizer #30

Closed MarkOates closed 1 year ago

MarkOates commented 1 year ago

dsymutil 2023-03-07 15-25-40

MarkOates commented 1 year ago

Fixed with https://github.com/MarkOates/blast/commit/ffb0ee6184438f596b3fb1dafe973823d6a0d916.

This was a pretty cool bug. In effect, a for (int i=0; i<vector.size(); i++) contained a i-- in the body. This i decrementing would occur on a 0 index, leaving a negative number, that was then compared against a std::size_t from the vector.size().

This was an interesting bug because that comparison is "undefined behavior" and would thus sometimes be fine, and other times not, resulting in a sometimes failing test.

An issue was added here to fix code that may have the design flaw: https://github.com/MarkOates/blast/issues/36