This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch: catch_errors() cleanup chain restore
- To: ac131313 at cygnus dot com
- Subject: Re: Patch: catch_errors() cleanup chain restore
- From: nsd at cygnus dot com
- Date: Thu, 17 Feb 2000 03:42:50 GMT
- CC: gdb-patches at sourceware dot cygnus dot com, ezannoni at cygnus dot com
>I can
>(just) live with GDB occasionally leaking memory
The memory leak happened to be in one of the first RETURN_MASK_ERROR
cases I checked, so I stopped checking. There might be worse bugs
lurking in other cases.
>This makes me think that the catch_errors() and return_to_top_level()'s
>current unhealthy obsession with those error_return and quit_return
>buffers should be cured.
Yes, please!
>I think this would fix both unwind bugs (bad jmpbuf and cleanups).
Agreed.
>BTW, as far as I can tell the FIXME comment I made is still true -
>fixing the problem involves examining every catch_errors call :-(
Just to clarify: by "fixing the problem", you mean "guaranteeing that
restore_cleanups() in catch_errors() doesn't break anything", right?
>Nick, do you need to differentiate between error and quit
For my immediate purposes, it would be sufficient if
catch_errors(RETURN_MASK_ERROR) returns nonlocally on quit and locally
otherwise.
So, I need to differentiate between error and quit behaviors. But I
don't need to differentiate between the values catch_errors() returns
after catching them.
Nick