qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 0/3] tcg: Support debugging leakage of temporaries
Date: Mon, 7 Mar 2011 09:42:51 +0100	[thread overview]
Message-ID: <20110307084251.GE10503@volta.aurel32.net> (raw)
In-Reply-To: <1299447595-13344-1-git-send-email-peter.maydell@linaro.org>

On Sun, Mar 06, 2011 at 09:39:52PM +0000, Peter Maydell wrote:
> This patchset removes the ad-hoc debug code in target-arm for
> identifying cases where we leaked TCG temporary variables, in
> favour of an implementation in tcg itself.
> 
> Generally any temporaries created by a target while it is
> translating an instruction should be freed by the end of that
> instruction; otherwise carefully crafted guest code could cause
> TCG to run out of temporaries and assert.
> 
> Putting the leak-debugging code into TCG proper (a) makes more
> sense as this isn't at all arm-specific (b) makes it more
> comprehensive, as it now covers temporaries created in all ways,
> not just via the new_tmp()/dead_tmp() wrapper functions
> (c) avoids annoying false positives where eg a TCG temp created
> with tcg_const_i32() was passed to dead_tmp().
> 
> The tracking only happens if qemu was configured with
> --enable-debug-tcg. It should be easy to add to other targets if
> desired; it's just a matter of calling tcg_clear_temp_count()
> and tcg_check_temp_count() in the appropriate places.
> 
> Changes since v1:
>  use "do { } while (0)" for the non-debug version of the
>  tcg_clear_temp_count() macro to avoid creating empty statements
> 
> Peter Maydell (3):
>   tcg: Add support for debugging leakage of temporaries
>   target-arm: Remove ad-hoc leak checking code
>   target-arm: Use TCG temporary leak debugging facilities
> 
>  target-arm/translate.c |  705 +++++++++++++++++++++++------------------------
>  tcg/tcg.c              |   32 +++
>  tcg/tcg.h              |   17 ++
>  3 files changed, 394 insertions(+), 360 deletions(-)
> 
> 
> 

Thanks, all applied.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

      parent reply	other threads:[~2011-03-07  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 21:39 [Qemu-devel] [PATCH v2 0/3] tcg: Support debugging leakage of temporaries Peter Maydell
2011-03-06 21:39 ` [Qemu-devel] [PATCH v2 1/3] tcg: Add support for " Peter Maydell
2011-03-06 21:39 ` [Qemu-devel] [PATCH v2 2/3] target-arm: Remove ad-hoc leak checking code Peter Maydell
2011-03-06 21:39 ` [Qemu-devel] [PATCH v3 3/3] target-arm: Use TCG temporary leak debugging facilities Peter Maydell
2011-03-07  8:42 ` Aurelien Jarno [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=20110307084251.GE10503@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).