aboutsummaryrefslogtreecommitdiff
path: root/lib.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-06 11:35:45 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:08 -0700
commite54f26d605b88efdda9b232b1d9480158a2cb536 (patch)
tree64ac98b9da541583512aa63c3595c009f2bea9aa /lib.h
parent[PATCH] Use more simple/fast iterators (diff)
downloadsparse-e54f26d605b88efdda9b232b1d9480158a2cb536.tar.gz
sparse-e54f26d605b88efdda9b232b1d9480158a2cb536.tar.bz2
sparse-e54f26d605b88efdda9b232b1d9480158a2cb536.zip
Poison deleted ptr-list entries.
Our current PREPARE_PTR_LIST/RESET_PTR_LIST implementation has a bug: if we ever hit a block of pointers where every single pointer has been deleted, it doesn't understand to skip over it, and instead uses the first (deleted) entry. This at least causes a nice SIGSEGV rather than random behaviour. I'll have to think about how to do the PTR list traversal fix nicely.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 7b86ebe..9274583 100644
--- a/lib.h
+++ b/lib.h
@@ -400,6 +400,7 @@ static inline void expression_iterate(struct expression_list *list, void (*callb
__this[0] = __this[1]; \
__this++; \
} \
+ *__this = (void *)0xf0f0f0f0; \
__list->nr--; __nr--; \
} while (0)