From: Hamayama Date: Tue, 20 Jun 2017 21:30:24 +0000 (+0300) Subject: Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit) X-Git-Tag: v7.4.6~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9a497926859639a68241e0a01b83b621d322f3c;p=gc Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit) Issue #166 (bdwgc). * tests/test.c (typed_test): Pass 320*sizeof(word)+some_number instead of 2000 to GC_malloc_explicitly_typed, so that to satisfy the size argument requirement of the latter regardless of word size). --- diff --git a/tests/test.c b/tests/test.c index cc363ae0..0c4e9eac 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1038,7 +1038,8 @@ void typed_test(void) GC_descr d2 = GC_make_descriptor(&bm2, 2); GC_descr d3 = GC_make_descriptor(&bm_large, 32); GC_descr d4 = GC_make_descriptor(bm_huge, 320); - GC_word * x = (GC_word *)GC_malloc_explicitly_typed(2000, d4); + GC_word * x = (GC_word *)GC_malloc_explicitly_typed( + 320 * sizeof(GC_word) + 123, d4); int i; # ifndef LINT