tzcoolman / FACS-OLD

0 stars 2 forks source link

Segfault on travis machine #33

Closed brainstorm closed 11 years ago

brainstorm commented 11 years ago

https://travis-ci.org/brainstorm/DRASS/builds/3948557/#L1718

==2327== Process terminating with default action of signal 11 (SIGSEGV)
1719==2327==  Access not within mapped region at address 0x0
1720==2327==    at 0x402C658: strlen (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
1721==2327==    by 0x569E7AF: CHUNKer (big_query.c:206)
1722==2327==    by 0x569E9BB: query (big_query.c:109)
1723==2327==    by 0x5697DCC: drass_bloom_query (drass.c:41)
(...)

Related to pull request #34

brainstorm commented 11 years ago

Indeed, it seems that the segfault was due to an eventual strlen(NULL):

https://github.com/brainstorm/DRASS/commit/ab6914789893994f620bcc834b67931b3f93a24e

But there's another SIGSEGV, also strlen related now:

https://travis-ci.org/brainstorm/DRASS/builds/3950021/#L1718

Enze, please check the function preconditions, defensive programming is good for strlen, strcpy and the like:

http://en.wikipedia.org/wiki/Defensive_programming

I'll keep the issue open until the travis run passes.

brainstorm commented 11 years ago

Last commit solving several segfaults is:

https://github.com/brainstorm/DRASS/commit/113d40f43c53cad1a586358be59edb732e7937ca

Unfortunately there are -nan's in fastq files that contain more than 8 reads (test1.fastq and test8.fastq pass while test200.fastq fail)... @tzcoolman, any ideas on why?