Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim/m32c: fix memory leaks in opc2c
Date: Wed, 7 Apr 2021 07:38:20 -0400	[thread overview]
Message-ID: <YG2ZrOjLVT7TLR9d@vapier> (raw)
In-Reply-To: <13aff427-e308-33cb-0aed-4b4285c52df6@polymtl.ca>

On 06 Apr 2021 21:45, Simon Marchi via Gdb-patches wrote:
> > i'm not keen on pushing it in this direction exactly.  it would mean every
> > caller would have to update & keep track.
> > 
> > i think you could define an IGEN variable in common/Make-common.in and change
> > all callers over to that.  then that would be the only place you'd have to add
> > any sanitizer related variables to.
> 
> I can do that, but I'm not sure where in common/Make-common.in I should
> add the variable.  There seems to be a logic to the organization in that
> file, but I don't get it.

*shrug* there isn't much to it.  you can put it after the POSTCOMPILE= line.

> Also, not that ppc has its own igen, so I
> guess it will still use its own definition.

correct, for now, it's duplicated and we eat that cost

> Another option is to just factor out the env var:
> 
>   DISABLE_LSAN = ASAN_OPTIONS=detect_leaks=0
> 
> ... and still use it in rules:
> 
> target: source
> 	$(DISABLE_LSAN) ../igen/igen --blah

i'm not keen on doing sanitizer-specific vars.  there's ASAN, LSAN, TSAN,
UBSAN, KSAN, and prob more in the future.  that's why having a common IGEN
var and then having it use a generic name (SANITIZE_ENV?) would work best
imo.

> Side-note, I saw some `@GMAKE_TRUE@` in Make-common.in.  In GDB, we
> decided to require GNU make and remove that complexity, in case you want
> to do the same.

sim/ is changing to automake, so a lot of that stuff will go away entirely.
i'm focusing on that rather than chipping away at smaller bits.

you can see this with the igen/ dir:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b6b1c790843087e67e85e7cfd3327a872c03c6bc

although i need to do more groundwork in the C side first.
-mike

  reply	other threads:[~2021-04-07 11:38 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
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 [this message]
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=YG2ZrOjLVT7TLR9d@vapier \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=vapier@gentoo.org \
    /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