This branch was previously thought unreachable, but evidently is. It resulted in a memory leak which allowed us to detect it. I added a test based on a specific bad input and assert that it returns failure, plus rely on Valgrind to detect if a leak happens; it may be possible to minify the test case even further.
We should convert these "unreachable" branches to assertions, at least for debug builds so we can be sure to find other such cases in e.g. fuzzing.
Coverage increased (+0.002%) to 99.037% when pulling e22eaf3b37357347ca9c61ef1e82406dcf5750ae on isaacbrodsky:fix-compactcells-leak into f581626150e2e2b02f0ee1636084dfb8a4563abf on uber:master.
This branch was previously thought unreachable, but evidently is. It resulted in a memory leak which allowed us to detect it. I added a test based on a specific bad input and assert that it returns failure, plus rely on Valgrind to detect if a leak happens; it may be possible to minify the test case even further.
We should convert these "unreachable" branches to assertions, at least for debug builds so we can be sure to find other such cases in e.g. fuzzing.