diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-03-15 07:24:59 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-15 07:33:05 +0300 |
commit | 4605a8ec50cf620251bff936e60962a0cb3b3e0a (patch) | |
tree | 4d2e072dd808b063d6ce514d6865689af1ade021 | |
parent | bf39f18ba6e21b1f6203ccd6d34e01a6a45ac2fe (diff) | |
download | bdwgc-4605a8ec50cf620251bff936e60962a0cb3b3e0a.tar.gz |
Do not pass GC_malloc result to GC_size w/o checking in gctest
(a cherry-pick of commit 923a30202 from 'master')
* tests/test.c (run_one_test): Do not call GC_malloc(0) inside
GC_printf argument.
-rw-r--r-- | tests/test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test.c b/tests/test.c index 673cfb00..b97f1a9a 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1242,7 +1242,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; } uncollectable_count++; |