]> granicus.if.org Git - gc/commitdiff
2011-04-04 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Mon, 4 Apr 2011 19:45:06 +0000 (19:45 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:57 +0000 (21:06 +0400)
* 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).

ChangeLog
tests/test.c

index c349fc5cffb5d1564316bbd4e92cecab9bb4c979..26522ba005387658164a9095efbf026cdba28350 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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).
+
 2011-04-03  Ivan Maidanski  <ivmai@mail.ru>
 
        * misc.c (GC_stdout, GC_stderr): Move the definition to the place
index ee0cd97cccf6ed40a88371008b2956f2c02c671a..d6e2fc88a13cb5c0ef5469bc524bded7e1e61867 100644 (file)
@@ -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);