]> granicus.if.org Git - gc/commitdiff
Fix missing atomic_count and realloc_count incrementation in gctest
authorIvan Maidanski <ivmai@mail.ru>
Sun, 8 Oct 2017 10:09:46 +0000 (13:09 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 12 Oct 2017 07:43:49 +0000 (10:43 +0300)
(Cherry-pick commit e60b3b8 from 'release-7_6' branch.)

* tests/test.c [!AT_END && !THREADS] (reverse_test_inner): Increment
realloc_count after GC_REALLOC() call.
* tests/test.c (run_one_test): Increment atomic_count after
(void)GC_MALLOC_ATOMIC(0) call.

tests/test.c

index e82fe88590bf6f7ceda7b8cba55f323bc5dc6db7..0a51786e319ef1f9881d01f96238c7424deb9d7b 100644 (file)
@@ -686,6 +686,7 @@ void *GC_CALLBACK reverse_test_inner(void *data)
           } else {
             a = (sexpr)GC_REALLOC((void *)a, 8200);
           }
+          realloc_count++;
 #       endif
     }
     check_ints(a,1,49);
@@ -1328,6 +1329,7 @@ void run_one_test(void)
              collectable_count++;
              GC_FREE(GC_MALLOC(0));
              (void)GC_MALLOC_ATOMIC(0);
+             atomic_count++;
              GC_FREE(GC_MALLOC_ATOMIC(0));
            }
          }