From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KIumGYjkbGCTWgAAWB0awg (envelope-from ) for ; Tue, 06 Apr 2021 18:45:28 -0400 Received: by simark.ca (Postfix, from userid 112) id 676EE1E939; Tue, 6 Apr 2021 18:45:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 705A61E590 for ; Tue, 6 Apr 2021 18:45:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA7ED3858012; Tue, 6 Apr 2021 22:45:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA7ED3858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617749126; bh=255/vC1rKGYqu9opopx+wCqNGHL2zu3nfxLO+NbinOM=; 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=Q6d2RwgOSSmSZf38RQn9dF4570h3miK45hSqJelm97ABF4tDVx5glRenJVK8fe0jl nOcAg6lAyafVMH93RW2d/GDQTjk0J8hh25/OXYaOTdVXfhpAUMwtRIqONdnwUVRv4a 57uCNq37ntbP5tRFhN3i2ZFO1Zn3JYft2clG5OSQ= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 224143857819 for ; Tue, 6 Apr 2021 22:45:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 224143857819 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 380FF335C76; Tue, 6 Apr 2021 22:45:24 +0000 (UTC) Date: Tue, 6 Apr 2021 18:45:22 -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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 09:28, Simon Marchi via Gdb-patches wrote: > On 2021-04-06 6:41 a.m., Mike Frysinger wrote: > > On 05 Apr 2021 21:36, Simon Marchi via Gdb-patches wrote: > >> Although I'm always in favor of using C++ for just not having to think > >> about free-ing stuff. > > > > right, and we don't have to debate this :). i can let it go for the sake > > of the gains with the better language. > > > > NB: this would only apply to build-time tools like opc2c. > > > > to be clear, if you want to take on changing these tools to C++, i'd be > > more than happy to help review. but if you feel that's too much to take > > on, we can do the aforementioned conditional frees. > > I might try to take it on as a side project, but this is clearly too big > as an immediate solution. that's totally understandable > What do you think of the patch below that > sets ASAN_OPTIONS while running the tools? 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