mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
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.
This commit is contained in:
parent
c0e4449908
commit
04b2d77354
4 changed files with 229 additions and 10 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue