From: Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] sim/m32c: fix memory leaks in opc2c
Date: Tue, 06 Apr 2021 20:01:08 +0200 [thread overview]
Message-ID: <775188def7eadad222b95195daaef55363326534.camel@skynet.be> (raw)
In-Reply-To: <877dlfle6r.fsf@tromey.com>
On Tue, 2021-04-06 at 07:45 -0600, Tom Tromey wrote:
> Simon> I might try to take it on as a side project, but this is clearly too big
> Simon> as an immediate solution. What do you think of the patch below that
> Simon> sets ASAN_OPTIONS while running the tools?
>
> FWIW, I was surprised to hear that leak sanitizer reported this kind of
> leak. IIRC, valgrind has an option to ignore these, for just the reason
> that Mike pointed out -- there's no point to handling a leak just before
> exit.
Effectively, with valgrind, you can control which leak kinds to show
at exit, and you can control separately which leak kinds have to be considered
as error:
--show-leak-kinds=kind1,kind2,.. which leak kinds to show?
[definite,possible]
--errors-for-leak-kinds=kind1,kind2,.. which leak kinds are errors?
[definite,possible]
where kind is one of:
definite indirect possible reachable all none
You can similarly to the answer below do leak search from within the program itself.
Philippe
>
> Anyway, I researched a little and came across this answer:
>
> https://stackoverflow.com/questions/51553115/how-do-i-make-leaksanitizer-ignore-end-of-program-leaks
>
> I don't know if that's something we'd want to enshrine in the tree, but
> at least now we know there's a way available if we want it.
>
> Tom
next prev parent reply other threads:[~2021-04-06 18:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 14:58 Simon Marchi via Gdb-patches
2021-04-05 16:23 ` Mike Frysinger via Gdb-patches
2021-04-05 18:46 ` Simon Marchi via Gdb-patches
2021-04-05 21:51 ` Mike Frysinger via Gdb-patches
2021-04-06 1:36 ` Simon Marchi via Gdb-patches
2021-04-06 10:41 ` Mike Frysinger via Gdb-patches
2021-04-06 13:28 ` Simon Marchi via Gdb-patches
2021-04-06 13:45 ` Tom Tromey
2021-04-06 18:01 ` Philippe Waroquiers via Gdb-patches [this message]
2021-04-06 22:45 ` Mike Frysinger via Gdb-patches
2021-04-07 1:45 ` Simon Marchi via Gdb-patches
2021-04-07 11:38 ` Mike Frysinger via Gdb-patches
2021-04-07 14:19 ` Simon Marchi via Gdb-patches
2021-04-08 4:51 ` Mike Frysinger via Gdb-patches
2021-04-08 13:52 ` Simon Marchi via Gdb-patches
2021-04-08 4:50 ` Mike Frysinger via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=775188def7eadad222b95195daaef55363326534.camel@skynet.be \
--to=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox