> For example one disasterous consequence of using exceptions in GCC is that there is a global application wide lock used to manage stack unwinding.
This might have been (partially?) fixed? GCC Bug 71744 "Concurrently throwing exceptions is not scalable" is marked "RESOLVED FIXED" [0], and commit 6e80a1d164d1 in particular looks interesting:
> eliminate mutex in fast path of __register_frame
>
> <snip>
>
> This commit eliminates both the mutex and the sorted list from the atomic fast path, and replaces it with a btree that uses optimistic lock coupling during lookup. This allows for fully parallel unwinding and is essential to scale exception handling to large core counts.
I'm not particularly familiar with the unwinding machinery though so I don't know if the issue is fully resolved.
This might have been (partially?) fixed? GCC Bug 71744 "Concurrently throwing exceptions is not scalable" is marked "RESOLVED FIXED" [0], and commit 6e80a1d164d1 in particular looks interesting:
> eliminate mutex in fast path of __register_frame > > <snip> > > This commit eliminates both the mutex and the sorted list from the atomic fast path, and replaces it with a btree that uses optimistic lock coupling during lookup. This allows for fully parallel unwinding and is essential to scale exception handling to large core counts.
I'm not particularly familiar with the unwinding machinery though so I don't know if the issue is fully resolved.
[0]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744