Menu

#2 malloc() memory corruption

0.7.0
open-accepted
nobody
Internals (3)
7
2010-11-05
2010-11-05
No

An error appears when handling POST requests in [mod_nps]. I suppose that its not only caused by [mod_nps], because I tried to rewrote the code, but it did not fix the error. I think I should check the entire code and take care about all memory allocations in it. These are the contents of the error:

ccgid: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Aborted

Discussion

  • Schmidt Anton

    Schmidt Anton - 2010-11-05
    • status: open --> open-accepted
     
  • Schmidt Anton

    Schmidt Anton - 2010-11-05
    • priority: 5 --> 7
     
  • Schmidt Anton

    Schmidt Anton - 2010-11-12

    It seems that bug appears only when ccgid is built with 'mod_nps'

     
  • Schmidt Anton

    Schmidt Anton - 2010-11-13

    No, it's not :) It's just appeared in functions that parse some data (GET,
    POST). Heap crushes because of incorrect freeing of allocated memory chunks
    after return from these functions.

     

Log in to post a comment.

MongoDB Logo MongoDB