Re: libcurl leaks information in freed memory
Date: Fri, 19 Oct 2018 10:55:32 +0200
On 19.10.18 08:58, Gabriel Zachmann via curl-library wrote:
> get the length. But yes, if all allocated memory should be freed, we
> have to keep track of the size. A simple way to do so is using an custom
> allocator that allocates more memory as requested and saves the size in
> the memory before the pointer it returns.
I attached some code that should be capable of doing so.
> And measuring if the cleared memory was really cleared is also not that
We can use the following commands to do so:
gcore -o /tmp/xxxx $PID
cat /tmp/xxxx.$PID | strings | grep yyy
and use a characteristic string for yyy, so we can see if that string
was really removed from memory.
But that would not be a simple unit test.
- text/x-csrc attachment: customMemory.c
- application/pkcs7-signature attachment: S/MIME Cryptographic Signature