Re: free(): invalid pointer:



On 30 Sep, 21:03, Cyron <mdigit...@xxxxxxxxx> wrote:
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?

Are you perhaps writing to memory just outside the memory you have
allocated?

.



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)
  • Thank You -- Thomas J. Gritzan
    ... Thomas -- Your suggestion to malloc() out a block of memory was the ... Below are some details of my memory issues ... ... As a work around solution I guessed a ram disk would solve the ... persistence will frustrate the off topic police and give them a target ...
    (comp.lang.c)
  • Re: Simple question about headers and malloc!
    ... Therefore I am making all of its declarations ... memory (using malloc) and then exit back to main. ... allocation, I get data strored from the second allocation... ...
    (microsoft.public.vc.language)
  • Re: ten thousand small processes
    ... Stack needs to be executable for the current signal trampoline ... the use of malloc() that is causing your primary ... if there is any heap memory in use at all, no matter what you do, ... either directly, as a 4M page mapping (not used for user processes, ...
    (freebsd-performance)