Re: [MLton] Crash in GC

"Chris Cannam" <[email protected]> Mon, 07 Nov 2022 16:12:48 +0000
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
On Mon, 7 Nov 2022, at 15:44, Matthew Fluet wrote:
> Untested, but something like:
>
> [...]
> +  if (numObjptrs > 0 and l > 0) {
> +    markCard (s, ad);
> +  }
> +
>    eltSize = bytesNonObjptrs + (numObjptrs * OBJPTR_SIZE);
>    GC_memmove (as + eltSize * ss, ad + eltSize * ds, eltSize * l);
>  }
>
> should do the trick.

It does! With that added, it runs successfully - and produces the same results with copy-generational-ratio 10.0 as it did with the default arguments.

I wonder what a minimal test-case for this would look like. If this copy is part of an optimisation for constructing a sequence, does this mean it is constructing it directly into old generation heap, rather than in the nursery? If so, why? Is there a rule that it will do that for sequences above a certain size? Is that affected by copy-generational-ratio?


Chris