From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sZZHJbOZbWBiagAAWB0awg (envelope-from ) for ; Wed, 07 Apr 2021 07:38:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 8A9291E965; Wed, 7 Apr 2021 07:38:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 933A31E54D for ; Wed, 7 Apr 2021 07:38:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E27033858028; Wed, 7 Apr 2021 11:38:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E27033858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617795505; bh=lNAgeChLirxQrwCAz7v2JWCrYjdh3PUw/VUehvfIQc0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SvADrzAxRcCPmwjsq9CCW42OCYILftigmwiDeb2aODN/s87JaCoRFkmRDhUodNIHw MhNeAzRLgGVRRmS9yHV4jUqCSTgv/g6euwwE+vYwh+O3aGNXm5vyYq4dryF1Co803w hLKSV5tJBgw5WzjwczdK5rLXza4MQAFsBOUq94hU= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id E0E5D386EC42 for ; Wed, 7 Apr 2021 11:38:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E0E5D386EC42 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 92CC5335D91; Wed, 7 Apr 2021 11:38:21 +0000 (UTC) Date: Wed, 7 Apr 2021 07:38:20 -0400 To: Simon Marchi Subject: Re: [PATCH] sim/m32c: fix memory leaks in opc2c Message-ID: Mail-Followup-To: Simon Marchi , gdb-patches@sourceware.org References: <20210405145856.3925296-1-simon.marchi@polymtl.ca> <13aff427-e308-33cb-0aed-4b4285c52df6@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <13aff427-e308-33cb-0aed-4b4285c52df6@polymtl.ca> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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