Fixes for the interaction of absent fillers and speculative evaluation for dictionaries

Fix 1

CorePrep: Don't speculatively evaluate bindings that we have already discovered to be absent

In #25924 (closed), we segfault because speculation forces a projection out of a RUBBISH dictionary (which we generated because it absent).

Solution: Don't speculate on bindings we already know are absent.

Fixes #25924 (closed)

Fix 2

Don't make absent fillers for terminating types

In #25924 (closed) we discovered that we could speculatively evaluate an absent filler for a dictionary, and project a field (a superclass selector) out of it, resulting in segfaults.

Solution: Never make an absent filler or rubbish literal for a terminating type like a dictionary. mkAbsentFiller returns Nothing for isTerminatingType, so worker/wrapper and the specialiser keep the real argument instead.

Also ensure that all generations of absent fillers (like in specHeader) go through mkAbsentFiller and maintain the invariants we need instead of calling mkRubbishLit directly.

Edited by Zubin

Merge request reports

Loading