unsafe fn install_main_guard() -> Option<Range<usize>>
This function must only be called from the main thread, and there must be sufficient stack space remaining to place a stack guard.