This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turning off verbose dump


On 25 January 2017 at 09:19, Jonathan Wakely wrote:
> On 25 January 2017 at 06:56, L A Walsh wrote:
>> I am trying to debug a prog but keep having my output flushed off the screen
>> by an unwanted memory map dump.
>>
>> Shouldn't that only be dumped by request?
>>
>> How do I turn it off?
>
> What kind of memory map dump? What OS are you using? Does the program
> exit with an error?
>
> At a guess, you've got some heap corruption that malloc is detecting
> when you try to free and invalid pointer, and it aborts the program
> and dumps some info. If that's the case you need to fix your code. Try
> using valgrind or ASan to find the problem.
>
> In the meantime, can't you just use a pager to stop the output scrolling away?

If you're using GNU libc you can set MALLOC_CHECK_=0 in the
environment to tell malloc to silently ignore errors, preventing the
memory dump (but hiding your bug).

None of this is caused by anything in GCC though.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]