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:30:26 +0300 |
commit | af53391d76a9dfada5c21826f0772c430f218179 (patch) | |
tree | 9898df9cb158d2eb44d73494939907e09fd6cc76 | |
parent | f8dcf9976524972308c27d7f12a302df5c2aa111 (diff) | |
download | bdwgc-af53391d76a9dfada5c21826f0772c430f218179.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 7f3f1fbe..100e0606 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1373,7 +1373,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); |