[W::sam_hdr_sanitise] Unexpected NUL character in header. Possibly truncated
[W::sam_hdr_sanitise] Missing trailing newline on SAM header. Possibly truncated
[W::sam_hrecs_update_hashes] Duplicate entry "" in sam header
[W::sam_hrecs_update_hashes] Duplicate entry "" in sam header
@PG' not present] Reference file given, but ref '
[W::cram_get_ref] Failed to populate reference for id 1
[W::cram_write_SAM_hdr] No M5 tags present and could not find reference
[W::cram_write_SAM_hdr] Enabling embed_ref=2 option
[W::cram_write_SAM_hdr] NOTE: the CRAM file will be bigger than using an external reference
CRAM-t����~��4�mNMk�@����s!�Um�wJ]V�����5�e
�%rq����}�bΊWƹإ�Z���i�{���$=.�`5C"�Q����G_�R{I��'5����*x۠C'%1^Jŭ��n���AZ����|_���=�3��ymO6۠m�2T6��d���+�w�?��������We�U�9�e�Z
�g4�s�AyyO&��[W::sam_parse1] unrecognized reference name "c1"; treated as unmapped
[W::sam_parse1] unrecognized reference name "c1"; treated as unmapped
samtools: cram/cram_io.c:3195: void cram_ref_decr_locked(refs_t *, int): Assertion `r->ref_id[id]->count == 0' failed.
Aborted (core dumped)
Summary
Assertion violation in
cram_ref_decr_locked
during parsing of a crafted SAM/FASTA file pair.Environment
Built using LLVM 14 with ASAN on Ubuntu 22.04
How to reproduce
Build with ASAN on latest commit like so:
Within the samtools folder, get poc file and reproduce with:
Which on my setup outputs: