Menu

#163 asmOutputFasta Crash

terminator
closed-out-of-date
Crash (103)
5
2012-01-09
2011-04-01
Fredrik
No

Read_MPS_Mesg function (AS_MSG_pmesg1.c:892) crashes on line 913 due to overlapping memory provided by the GetMemory function (AS_MSG_pmesg.c:30). The img struct and imp->delta was overlapping (when asmOutputFasta was executed on a metagenomic dataset) causing imp->delta[i++] = n; (ln 913) to eventually overwrite the delta pointer causing undefined behavior and crash.

The problem is solved by increasing the memory pool allocated through changing line 303 in AS_MSG_pmesg1.c from:
AS_MSG_globals->msgMax = 256;
to
AS_MSG_globals->msgMax = 512;

I was running v 6.1. It took me a whole afternoon to locate this bug as I have not previously had a look at the celera-wgs code-base and I must say I am not used to getting overlapping memory through a GetMemory function. Hopefully this is helpful and could save some time to others

Best Regards,
Fredrik Lysholm
IFM Bioinformatics
Linköping University
Sweden

Discussion

  • Fredrik

    Fredrik - 2011-04-01

    A recompile of buildPosMap with above fix solved a crash of the consequent buildPosMap run. Thus without examining any source code I am guessing buildPosMap suffer from the same issue.

     
  • Jason Miller

    Jason Miller - 2011-04-04
    • assigned_to: nobody --> brianwalenz
     
  • Jason Miller

    Jason Miller - 2011-04-04

    Thank you for this detailed report. It is related to other problems with record size exceeding the buffer. We should fix or document the whole collection in our next release.

     
  • Brian Walenz

    Brian Walenz - 2011-04-08

    Thanks for finding, fixing and reporting. The GetMemory() function in the CVS version should not suffer from this problem. I'll leave the case open until we get a new release out.

     
  • Brian Walenz

    Brian Walenz - 2012-01-09

    Unless show-stopping bugs are found, the new release will be out this week.

     
  • Brian Walenz

    Brian Walenz - 2012-01-09
    • status: open --> closed-out-of-date
     

Log in to post a comment.