free(): invalid pointer:



Hello friends,

I'm getting a bizaare glibc error referencing free -- I malloc a
chunk of memory and then later when I try to free it is when the
program aborts. I've added some debug code to the source and find
that my pointer i get from malloc matches the one that I'm calling
free with -- and there is no possibility that have i have previously
freed the memory because there is only 1 free call in the entire
source (surrounded by debug printfs) so I don't know what is going on.
Any insight?

Thanks,
Mike

.



Relevant Pages

  • The Malloc Maleficarum
    ... Glibc Malloc Exploitation Techniques ... the exploitation of overflowed dynamic memory chunks on Linux. ... I have the House of Prime. ... a malloc chunk. ...
    (Bugtraq)
  • [Full-disclosure] The Malloc Maleficarum
    ... Glibc Malloc Exploitation Techniques ... the exploitation of overflowed dynamic memory chunks on Linux. ... I have the House of Prime. ... a malloc chunk. ...
    (Full-Disclosure)
  • Re: A solution for the allocation failures problem
    ... As I read the description of free, it releases memory for subsequent ... but when it needs more it will request another block and will give ... The standard does not require that a block requested from malloc() can ... inside that block is no more a chunk free that is big enough to ...
    (comp.lang.c)
  • Re: restrictions with malloc???
    ... possible to choose the size of the memory pool to be like 4 kb (or ... the number of malloc calls is unlikely to be relevant. ... A call to mallocattempts to allocate memory for your program to ... sub-chunks of that chunk. ...
    (comp.lang.c)
  • Re: malloc and Active memory
    ... >> that explain why the Active memory is not released again as soon as the ... > isn't a SINGLE chunk available of that size. ... > there isn't a single 7GB chunk available and malloc() will fail. ... See also the kernel Documentation directory, ...
    (Fedora)