GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
except

except: Add chain_next/chain_prev for eh_catch_d for GTY

Enhances exception handling structures with linked list pointers to prevent stack overflows during garbage collection.

This commit adds chain_next and chain_prev pointers to the eh_catch_d structure. This change is intended to preemptively address potential garbage collection (GC) issues that could lead to stack overflows due to deeply nested structures.

In Details

The eh_catch_d structure, used in exception handling, is now equipped with chain_next and chain_prev pointers. This preemptive addition, marked with GTY, aims to mitigate potential stack overflows during garbage collection cycles that might arise from a very long chain of eh_catch_d instances.

For Context
eh_catch_d
A data structure used within GCC's exception handling mechanism to represent a catch region.
GTY
A GCC-specific mechanism for garbage collecting compiler data structures. It requires special markers for fields that are part of linked lists or trees.
stack overflow
An error condition that occurs when a program exceeds the allocated stack memory, often due to excessively deep function calls or recursive data structures.
Filed Under: exception handlinggarbage collectionstability