You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because sam_read1()calls cram_eof() to distinguish EOF from error, and in this case the cram eof flag is set. Note that following PR #91 the EOF flag is set in cram_dopen() and later cleared in cram_read_container(). This means there are places where failures can occur when it's set. A few of these set fd->eof = 0 before returning so the error gets reported, but it seems there are places where this isn't done.
The text was updated successfully, but these errors were encountered:
To reproduce, build HTSlib with @jkbonfield 's malloc testing framework. Create a small cram file:
Try to read it back, but trigger a malloc failure. It will only print the header, log error messages but return success:
This is because
sam_read1()
callscram_eof()
to distinguish EOF from error, and in this case the cram eof flag is set. Note that following PR #91 the EOF flag is set incram_dopen()
and later cleared incram_read_container()
. This means there are places where failures can occur when it's set. A few of these setfd->eof = 0
before returning so the error gets reported, but it seems there are places where this isn't done.The text was updated successfully, but these errors were encountered: