summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-04 21:45:06 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:57 +0200
commit1348d9d446428a3afc8900881b61ed7bbdffe5f5 (patch)
treec3ba2885ff613d0c5995611220c2a69710f3bdd5 /tests
parent2f9f31a6feb731f07aecebbb31c592f7eb7e35f5 (diff)
2011-04-04 Ivan Maidanski <ivmai@mail.ru>
* tests/test.c (reverse_test_inner): Undo one of the previous patches which shifts "c" and "d" pointers only if ALL_INTERIOR_POINTERS (since interior pointers are always recognized in stacks).
Diffstat (limited to 'tests')
-rw-r--r--tests/test.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test.c b/tests/test.c
index ee0cd97..d6e2fc8 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -585,14 +585,12 @@ void *GC_CALLBACK reverse_test_inner(void *data)
h[1999] = ints(1,200);
# endif
/* Try to force some collections and reuse of small list elements */
- for (i = 0; i < 10; i++) {
- (void)ints(1, BIG);
- }
-# ifdef ALL_INTERIOR_POINTERS
- /* Superficially test interior pointer recognition on stack */
- c = (sexpr)((char *)c + sizeof(char *));
- d = (sexpr)((char *)d + sizeof(char *));
-# endif
+ for (i = 0; i < 10; i++) {
+ (void)ints(1, BIG);
+ }
+ /* Superficially test interior pointer recognition on stack */
+ c = (sexpr)((char *)c + sizeof(char *));
+ d = (sexpr)((char *)d + sizeof(char *));
GC_FREE((void *)e);
@@ -623,8 +621,11 @@ void *GC_CALLBACK reverse_test_inner(void *data)
}
check_ints(a,1,49);
check_ints(b,1,50);
+
+ /* Restore c and d values. */
c = (sexpr)((char *)c - sizeof(char *));
d = (sexpr)((char *)d - sizeof(char *));
+
check_ints(c,1,BIG);
check_uncollectable_ints(d, 1, 100);
check_ints(f[5], 1,17);