summaryrefslogtreecommitdiff
path: root/tests/gctest.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-03-15 07:24:59 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-03-15 07:24:59 +0300
commit923a3020214f5b87dba30d83ada47b5451d7fd4a (patch)
tree6109ac60421ce252c64aaf9c2d50076bf8f6ee0c /tests/gctest.c
parentf21eefafc047240a4d971de5147bf64dd46725fe (diff)
downloadbdwgc-923a3020214f5b87dba30d83ada47b5451d7fd4a.tar.gz
Do not pass GC_malloc result to GC_size w/o checking in gctest
(fix of commit 051f57762) * tests/gctest.c (run_one_test): Do not call GC_malloc(0) inside GC_printf argument.
Diffstat (limited to 'tests/gctest.c')
-rw-r--r--tests/gctest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gctest.c b/tests/gctest.c
index 861764bb..4e0d6622 100644
--- a/tests/gctest.c
+++ b/tests/gctest.c
@@ -1534,7 +1534,7 @@ void run_one_test(void)
CHECK_OUT_OF_MEMORY(x);
if (GC_size(x) != MIN_WORDS * sizeof(GC_word)) {
GC_printf("GC_malloc(0) failed: GC_size returns %lu\n",
- (unsigned long)GC_size(GC_malloc(0)));
+ (unsigned long)GC_size(x));
FAIL;
}
AO_fetch_and_add1(&uncollectable_count);