From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 210463858CD1 for ; Mon, 31 Jul 2023 14:21:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 210463858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-348dfefd1a4so24567415ab.1 for ; Mon, 31 Jul 2023 07:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1690813274; x=1691418074; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=fHRJhBIVKWBJ8VrUhNkDayuK8ewnxnacaohNES+GoOA=; b=gPj13e11fe8d9yNAgbY/Iz1OwhKbbbFEmUtMuKLyiVcT+K3LGooxCf5jG6PASEWM/z OggtbHZRXlGtrrVrObtYylZaABPxg/ok0SOSKAP8NmSjRqYOWJJdqup9ibNjREmowFeA EYpXSW3oLbsaSmz6J3JBxo7RviI2riNzmEoanQLDCiPl3Da7eOXEuIBy7mVBYcJ2CvH4 2BS+RIKeP04YG/E4X0F26qOiKShFqOIoN8rr1HEYWjZjOCYiuLxWLSmgVeEISFroIxoJ NXZCOuzLhjWiBGwPkXmrTkqoof9BAwWRnVXoTq7nVpfQlu489PBYJ2uksuqMH2ooAUre X0kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690813274; x=1691418074; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fHRJhBIVKWBJ8VrUhNkDayuK8ewnxnacaohNES+GoOA=; b=k2XLpkH8Bi1Q63qhLFC6SEZUV3Q5bSzpOPrOF5tS9s0tOq83g8Tvx+MEz+UUm467r/ 6HDxrifvDhIp17kOezHkey1cXKT2GKwPgmaxFpEUDgK1zVZPa7aFbcpZCEy13dp+wYx9 ow+8B85foUts2jx2WDcn9J3sibZIABMOUQeMzgS77lpCjD86FiC441aRID4hqRwv/32K I3pOWCOhvwFYzvdWFmafJE9UjuOvORm5cNstSdo9R/XnkySwjM77nkFc3IpdkkRYTgz2 G5UAqlPrQ8bF4+fV92hrXu5JDA05Tw+s6ib/kfwUvNGkxj5LUkW3p+o72FADLkQ4Q2yT T+yg== X-Gm-Message-State: ABy/qLY5joCBvkg5FAybq/6hSwAMCtGUcol6o2QTFWK5ynuFKcw6Cr7X irLTqKVGiH88DL2H7IMTZCwcWA== X-Google-Smtp-Source: APBJJlEtXx6EdGDG9xZ9N6ABmf7GhI87AvB0XjPsNxTG2Wzs5TMgVUnJG1zuOwIyM+VOfmvtvQEkCw== X-Received: by 2002:a05:6e02:11a6:b0:349:501:12bd with SMTP id 6-20020a056e0211a600b00349050112bdmr7619588ilj.20.1690813274345; Mon, 31 Jul 2023 07:21:14 -0700 (PDT) Received: from murgatroyd (75-166-135-140.hlrn.qwest.net. [75.166.135.140]) by smtp.gmail.com with ESMTPSA id s7-20020a92d907000000b003426356a35asm3184262iln.0.2023.07.31.07.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 07:21:13 -0700 (PDT) From: Tom Tromey To: Sam James Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Set PYTHONMALLOC in the test suite References: <20230728123332.2521239-1-tromey@adacore.com> <87wmyk2gij.fsf@gentoo.org> X-Attribution: Tom Date: Mon, 31 Jul 2023 08:21:13 -0600 In-Reply-To: <87wmyk2gij.fsf@gentoo.org> (Sam James's message of "Fri, 28 Jul 2023 16:37:20 +0100") Message-ID: <87h6pkgo12.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >> Setting PYTHONMALLOC helped me locate an earlier bug. It seems to me >> that there aren't big downsides to always setting this during testing, >> and it might help find other bugs in the future. Sam> This looks like a good idea. I was a bit disappointed that Python's Sam> Valgrind integration didn't work for you in that bug, because it's Sam> _supposed_ to detect when running under Valgrind and defer to its Sam> malloc instead of its own, but I guess its own debug malloc is Sam> different. I think the issue here is that the bug is a race, which memcheck wouldn't find (I didn't try helgrind or whatever). malloc_debug worked because it detects GIL violations. Sam> Anyway, yeah, the only downside is speed and that's not Sam> a problem for tests, especially given they're small. I'm going to check this in. Thanks for your comments. Tom