[RFA 4/8] Make strip_bg_char return a unique_xmalloc_ptr

Yao Qi qiyaoltc@gmail.com
Tue Oct 17 11:05:00 GMT 2017


Simon Marchi <simon.marchi@polymtl.ca> writes:

> When reviewing previous cleanup-removal patches, I tried to look for
> something that hinted like it would install and return a cleanup, but
> it's obviously not a 100% reliable method.  What you could do is
> temporarily add
>
>   struct cleanup *before = cleanup_chain;
>
> at the beginning of the function, and
>
>   gdb_assert (cleanup_chain == before);
>
> at the end.

Yes, that is one approach I though of, but it needs changing code.  I am
looking at running gdb testsuite with valgrind, but there are too many
warnings on leak, so it is not that useful to find new leaks.

The patch is the good direction to go, so I don't want to block it.
Meanwhile, I am still looking at memory leaks reported by valgrind.

Tom, if you don't hear me by Friday this week, feel free to commit it.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list