Browse Prior Art Database

Garbage Collection of C++ Exception Objects During Stack Unwinding Disclosure Number: IPCOM000014049D
Original Publication Date: 2001-Jul-29
Included in the Prior Art Database: 2003-Jun-19

Publishing Venue



IBM VisualAge C++ line of compilers use an exception handling design that can be conceptually broken into two distinct parts. Compiler generated code creates an object on the stack that describes an exception and calls the C++ runtime (libC.a for AIX/PowerPC and for AIX/IA64) to unwind the stack looking for a catch block region associated with the exception. When the runtime finds a catch region it returns control to conventional compiler generated code. The compiler generated code (catch region) performs error handling and then calls a routine entitled __CleanupCatch to restore the program’s hardware registers and remove the exception object(s) generated earlier.