check that we don't attempt to un-drop while evacuating
This commit is contained in:
@@ -304,11 +304,15 @@ impl<'a> LoadState<'a> for LiveLoadAndMachineState<'a> {
|
|||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn evacuate(mut loader: Loader<'a, Self>) -> Result<Self::Evacuable, SessionError> {
|
fn evacuate(mut loader: Loader<'a, Self>) -> Result<Self::Evacuable, SessionError> {
|
||||||
|
if loader.payload.load_state.get_tag() != ArenaHeaderTag::Dropped {
|
||||||
loader
|
loader
|
||||||
.payload
|
.payload
|
||||||
.load_state
|
.load_state
|
||||||
.set_tag(ArenaHeaderTag::InactiveLoadState);
|
.set_tag(ArenaHeaderTag::InactiveLoadState);
|
||||||
Ok(loader.payload.load_state)
|
Ok(loader.payload.load_state)
|
||||||
|
} else {
|
||||||
|
unreachable!("we never evacuate after dropping")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|||||||
Reference in New Issue
Block a user