internal/core/adt: avoid crash
Sometimes, evaluation of a Vertex may, recursively,
trigger the evaluation of itself. This may cause
the checks or Arc slices to be reset while they are
in the process of being filtered. As filtering is no
longer needed if a node is already finalized, we can
safely drop out of the computation if we detect this.
Note that there are no test cases. Issues around this
were detected by upcoming changes that fix hangs
in cyclic function and validator calls. We separate out
these changes, though, so that we can see they are
a noop and to facilitate bisection if these turn out to
be problamatic after all.
Issue #3649
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: If298ba3d9bd4addde0ac1d55be968211660bc113
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1208699
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>