Skip Menu |

This queue is for tickets about the Bio-SamTools CPAN distribution.

Report information
The Basics
Id: 54562
Status: new
Priority: 0/
Queue: Bio-SamTools

People
Owner: Nobody in particular
Requestors: benbooth5 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.10
Fixed in: (no value)



Subject: Bio::DB::Sam segfaults when reading a BAM file without reading the header first
Steps to reproduce: Run this script, passing in any BAM file: use Bio::DB::Sam; $bam=Bio::DB::Bam->open($ARGV[0]); while ($read=$bam->read1) { print "segfault\n"; } Workaround: Read the header after Bio::DB::Bam->open: use Bio::DB::Sam; $bam=Bio::DB::Bam->open($ARGV[0]); $bam->header; while ($read=$bam->read1) { print "works\n"; } Possible fix: Change the code block in Bio::DB::Bam bam_open in Sam.xs to be: RETVAL = bam_open(filename,mode); bam_header_destroy(bam_header_read(RETVAL));