From: John M. <jm...@sa...> - 2014-04-16 13:31:26
|
On 15 Apr 2014, at 16:22, Kamil Slowikowski <ksl...@gm...> wrote: > I encountered a Segmentation fault when attempting to open a URL that does not exist. This is caused by a call to freeaddrinfo(res) with a null pointer on line 88 of knetfile.c. > > After a bit of googling, it seems that this is known to happen on Android but not on Linux. The POSIX specification is unclear whether you're supposed to call freeaddrinfo() when getaddrinfo() fails, though I am inclined to agree with [1]. Apparently it also crashes on the BSDs. So I've turned your report into https://github.com/attractivechaos/klib/pull/32 (klib is the main home of knetfile.c) and in due course I'll also update htslib's knetfile.c, which will fix this for upcoming samtools versions. Thanks for spotting and analysing this, John [1] http://stackoverflow.com/a/22758280 -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |