qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] tcg: Support debugging leakage of temporaries
@ 2011-02-23 15:19 Peter Maydell
  2011-02-23 15:19 ` [Qemu-devel] [PATCH 1/3] tcg: Add support for " Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Peter Maydell @ 2011-02-23 15:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

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.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-03-07  9:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 15:19 [Qemu-devel] [PATCH 0/3] tcg: Support debugging leakage of temporaries Peter Maydell
2011-02-23 15:19 ` [Qemu-devel] [PATCH 1/3] tcg: Add support for " Peter Maydell
2011-02-23 17:53   ` Peter Maydell
2011-02-23 15:19 ` [Qemu-devel] [PATCH 2/3] target-arm: Remove ad-hoc leak checking code Peter Maydell
2011-02-23 15:19 ` [Qemu-devel] [PATCH 3/3] target-arm: Use TCG temporary leak debugging facilities Peter Maydell
2011-02-25 15:32   ` Blue Swirl
2011-02-25 15:48     ` Peter Maydell
2011-03-06 18:18 ` [Qemu-devel] [PATCH 0/3] tcg: Support debugging leakage of temporaries Aurelien Jarno
2011-03-06 21:52   ` Peter Maydell
2011-03-07  8:42     ` Aurelien Jarno
2011-03-07  9:11       ` Peter Maydell

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