Hack to temporarily enable dumpable flag, call panic_action, then disable it again (if required)