public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Sam James <sam@gentoo.org>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Set PYTHONMALLOC in the test suite
Date: Mon, 31 Jul 2023 08:21:13 -0600	[thread overview]
Message-ID: <87h6pkgo12.fsf@tromey.com> (raw)
In-Reply-To: <87wmyk2gij.fsf@gentoo.org> (Sam James's message of "Fri, 28 Jul 2023 16:37:20 +0100")

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

      reply	other threads:[~2023-07-31 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28 12:33 Tom Tromey
2023-07-28 15:37 ` Sam James
2023-07-31 14:21   ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6pkgo12.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sam@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).