[Debian-med-packaging] Bug#865130: Bug#865130: reapr FTBFS on big endian: Error sampling from files '00.Sample/fragCov.gz', '00.assembly.fa.gc.gz'

Sascha Steinbiss satta at debian.org
Tue Aug 8 00:33:12 UTC 2017


reassign 865130 bamtools
affects 865130 ariba
thanks

[...]
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> Aborted

I suspect that this may actually be an issue in bamtools -- an apparent
problem on big-endian platforms makes bamtools'
bamReader.GetReferenceData() return a negative int32_t value as a
reference sequence length, which when interpreted as an unsigned long by
REAPR will cause a bad alloc.

I've attached a small example program to test on both platforms with the
BAM file generated by the problematic test case in REAPR, and I can
confirm that the problem occurs consistently.

amd64:
------

[satta:/tmp/tmp.Z5tPunaEOw/result] $ g++ -o bamtools_test
~/bamtools_test.cpp -I /usr/include/bamtools -lbamtools
[satta:/tmp/tmp.Z5tPunaEOw/result] $ samtools view -H 00.in.bam | grep SQ
@SQ	SN:foo	LN:1000111
[satta:/tmp/tmp.Z5tPunaEOw/result] $ ./bamtools_test 00.in.bam
ref: foo, length: 1000111


mips:
-----

(sid_mips-dchroot)satta at minkus:/tmp/tmp.cWdSvSEoaT/result$ g++ -o
bamtools_test ~/bamtools_test.cpp -I /usr/include/bamtools -lbamtools
(sid_mips-dchroot)satta at minkus:/tmp/tmp.cWdSvSEoaT/result$ samtools view
-H 00.in.bam| grep SQ
@SQ	SN:foo	LN:1000111
(sid_mips-dchroot)satta at minkus:/tmp/tmp.cWdSvSEoaT/result$
./bamtools_test 00.in.bam
ref: foo, length: -81

Notice how 'samtools view' shows the same length for both archs but the
bamtools test program does not.

I am going to forward this to upstream as well.

Sascha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bamtools_test.cpp
Type: text/x-c++src
Size: 594 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20170808/39054d65/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00.in.bam
Type: application/octet-stream
Size: 1119946 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20170808/39054d65/attachment-0001.obj>


More information about the Debian-med-packaging mailing list