Function fault_crate_swap::self_swap_handler
source · pub fn self_swap_handler(crate_name: &str) -> Result<SwapRanges, String>
Expand description
This function calls the crate swapping routine for a corrupted crate (referred to as self swap) Swapping a crate with a new copy of object file includes following steps in high level
- Call generic crate swapping routine with self_swap = true
- Change the calues in the stack to the reloaded crate
- Change any other references in the heap to the reloaded crate This function handles 1 and 2 operations and 3 is handled in the call site depending on necessity