diff options
author | Andy Wingo <wingo@pobox.com> | 2012-01-27 19:04:46 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-01-27 19:34:19 +0100 |
commit | 04b2d773548c57b6eadd1808a8d15cce47af9630 (patch) | |
tree | 18fa47ca6a85f444788c286323a4c523be0f634e /libguile/vm-engine.h | |
parent | c0e4449908eee84bcb293ec21c10fec646bde45d (diff) | |
download | guile-04b2d773548c57b6eadd1808a8d15cce47af9630.tar.gz |
attempt to clear stale references on VM C stack
* libguile/vm-engine.h (DEAD): New macro, nulls out a value.
* libguile/vm-i-system.c:
* libguile/vm-i-loader.c:
* libguile/vm-i-scheme.c: Use DEAD when variables become dead.
Later we can #ifdef this out, but I want to give the buildbots a try
with this patch to make sure it's correct.
Diffstat (limited to 'libguile/vm-engine.h')
-rw-r--r-- | libguile/vm-engine.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h index 000397de2..52467c229 100644 --- a/libguile/vm-engine.h +++ b/libguile/vm-engine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -152,6 +152,8 @@ #define ASSERT_BOUND(x) #endif +#define DEAD(v) v = SCM_UNDEFINED + #if VM_CHECK_OBJECT #define SET_OBJECT_COUNT(n) object_count = n #else @@ -325,6 +327,7 @@ do \ CONS (l, x, l); \ } \ PUSH (l); \ + DEAD (l); \ } while (0) /* The opposite: push all of the elements in L onto the list. */ @@ -350,7 +353,9 @@ do { \ CONS (l, o, l); \ POP (o); \ } \ + DEAD (o); \ PUSH (l); \ + DEAD (l); \ } while (0) #define POP_CONS_MARK() \ @@ -363,7 +368,9 @@ do { \ CONS (l, o, l); \ POP (o); \ } \ + DEAD (o); \ PUSH (l); \ + DEAD (l); \ } while (0) |