Re: valgrind always fails with out of memory

Mario Emmenlauer <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
On 08.09.20 12:25, Mario Emmenlauer wrote:
> 
> On 08.09.20 12:04, Mario Emmenlauer wrote:
>> The error I get most frequently is (full output attached in log.txt)
>> ==32==     Valgrind's memory management: out of memory:
>> ==32==        newSuperblock's request for 6864695621860790272 bytes failed.
>> ==32==          114,106,368 bytes have already been mmap-ed ANONYMOUS.
> 
> Argh! After sending the email, I went through the stack trace for
> the hundredth time, and spotted the use of "zlib". And indeed, when
> replacing my own zlib 1.2.11 with the system zlib 1.2.11, valgrind
> works as expected!
> 
> Does that make sense? Is zlib used by valgrind itself? And why could
> my debug build differ (so much) from the system zlib that it breaks
> valgrind? I double-checked and its the identical source code from
> Ubuntu, just missing two or three patches.

So it seems I can (partially) answer my own question: when valgrind
is used on an executable that links zlib built with -ggdb3, then it
does not work (due to aforementioned error). Keeping all other debug-
settings except -ggdb3 works still fine.

I have no clue as to _why_ this may happen, but I hope it can be
helpful to other people running into the same issue.

All the best,

    Mario Emmenlauer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.