[PATCH] sim/m32c: fix memory leaks in opc2c
Mike Frysinger
vapier@gentoo.org
Wed Apr 7 11:38:20 GMT 2021
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
More information about the Gdb-patches
mailing list