[cs631apue] Memory Errors

Tyler Romeo tromeo at stevens.edu
Sat Oct 17 05:08:57 EDT 2015


Usually this kind of error is caused by a buffer overflow. Somewhere you
are writing data beyond the boundaries of a buffer, and it is overwriting C
runtime information about allocated memory, causing an error when you try
to free() it.


-- 
Tyler Romeo
Stevens Institute of Technology
Class of 2016

On Fri, Oct 16, 2015 at 10:40 PM, Patrick Murray <pmurray1 at stevens.edu>
wrote:

> How would you recommend we approach memory related errors? I have been
> experiencing the following two errors in particular:
>
>    1. free(): invalid next size (normal)
>    2. munmap_chunk(): invalid pointer
>
> Instead of using malloc, I've switched to calloc to initialize the memory
> to zero. Additionally, I've attempted to free up memory when no longer
> needed. However, these errors still persist. I've tried to use valgrind and
> gdb to debug their causes but am a little overwhelmed by their outputs (the
> errors only occur when traversing a large number of entires, think "/"
> recursively)
>
> -Pat
>
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20151017/f8bb06dd/attachment.html>


More information about the cs631apue mailing list