From: Bennet Bleßmann Date: Sun, 7 Jul 2024 12:37:28 +0000 (+0200) Subject: check that we don't attempt to un-drop while evacuating X-Git-Tag: v0.10.0~127^2~3 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=a0d790445d65f7d960656a7357b8f13b35540f58;p=scryer-prolog.git check that we don't attempt to un-drop while evacuating --- diff --git a/src/machine/loader.rs b/src/machine/loader.rs index 88666330..0dfdfad2 100644 --- a/src/machine/loader.rs +++ b/src/machine/loader.rs @@ -304,11 +304,15 @@ impl<'a> LoadState<'a> for LiveLoadAndMachineState<'a> { #[inline(always)] fn evacuate(mut loader: Loader<'a, Self>) -> Result { + if loader.payload.load_state.get_tag() != ArenaHeaderTag::Dropped { loader .payload .load_state .set_tag(ArenaHeaderTag::InactiveLoadState); Ok(loader.payload.load_state) + } else { + unreachable!("we never evacuate after dropping") + } } #[inline(always)]