C++ Runtime Work 【Desktop OFFICIAL】
: The stack is unwound again. For each frame between the throw site and the catch frame, the personality routine calls destructors for local objects ( _UA_CLEANUP_PHASE ). Finally, control jumps to the catch block.
done: return instance_memory;
Compiler transforms to:
| Component | Responsibility | Typical Implementation | |-----------|----------------|------------------------| | | Program startup, atoi , printf , heap base (malloc/free) | libc.so / msvcrt.dll | | C++ ABI Runtime | Constructor/destructor calling conventions, RTTI structures, exception personality routines | libstdc++ (GCC), libc++abi (LLVM), msvcrt + VCRuntime (MSVC) | | C++ Standard Library Runtime | std::vector , std::string , std::cout , std::thread | libstdc++.so , libc++.so , MSVC STL | | Language Support Library | new / delete operators, __cxa_* exception APIs, __gxx_personality_v0 | Part of ABI runtime | | Compiler‑Generated Helpers | Thunk functions for virtual calls, dynamic cast helpers, guard variables for static locals | Injected by compiler (e.g., __cxa_guard_acquire ) | c++ runtime
must return a pointer to the start of the most derived object. The runtime computes this by following a “offset to top” field stored in the vtable. : The stack is unwound again