Re: Bug#269643: readseq: segfaults when command line arguments are provided
> > > On gcc-3.4 AMD64 (from
> > > deb http://debian-amd64.alioth.debian.org/gcc-3.4 testing main contrib non-free)
> > > on a dual Opteron, readseq segfaults when it gets command line arguments
> > > (even --help). It seems to work when everything is specified interactively.
> > [...]
> > > Versions of packages readseq depends on:
> > > ii libc6 2.3.2.ds1-16.0.0.1.amd64 GNU C Library: Shared libraries an
> > > ii libncbi6 6.1.20040616-1 NCBI libraries for biology applica
> >
> > I cannot reproduce this on powerpc - package versions are pretty much the
> > same here. In order to investigate the bug, I'd need ncbi-tools-dev
> > installed in the sid-amd64-pure chroot on pergolesi, please.
>
> Done.
OK, found the bug:
readseq retrieves its argc and argv via the ncbi libs' interface
(Nlm_GetArgc() and Nlm_GetArgv()) instead of declaring a main(). On amd64,
we get
DEBUG: argc=2 org argv=0xffffffffbffffaa8
while compiling without ncbi support I see
DEBUG: argc=2 org argv=0x7fbffffa98
The first argv pointer segfaults, the second is just fine, so the ncbi libs
seem to generate an invalid argv pointer somewhere.
Hacking a workaround (just masking off the offending high bits of the
pointer) I get to:
DEBUG: argc=2 org argv=0xffffffffbffffaa8
DEBUG: argc=2 new argv=0x7fbffffaa8
readSeq (1Feb93), multi-format molbio sequence reader.
usage: readseq [-options] in.seq > out.seq
options
-a[ll] select All sequences
-c[aselower] change to lower case
....
which is fine again. I suspect libncbi6 is broken on amd64 and will at
least need a recompile. I might be missing some subtle 64bit trick here,
though: CC goes to debian-amd64 (please CC me, I'm not subscribed there).
Unless someone convinces me to the contrary, I will reassign the bug to
libncbi6 in a few days.
Michael
Reply to: