[PATCH] sim/m32c: fix memory leaks in opc2c

Simon Marchi simon.marchi@polymtl.ca
Wed Apr 7 01:45:49 GMT 2021


> 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.
> -mike
> 

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.  Also, not that ppc has its own igen, so I
guess it will still use its own definition.

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

Worst case, if somebody forgets to use DISABLE_LSAN somewhere, someone
building with ASan will notice and it's a trivial fix to add it.

Anyway, feel free to push the version you prefer, it will be faster than
telling me how to do it :).

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.

Simon


More information about the Gdb-patches mailing list