https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119151
--- Comment #5 from Michael Leuchtenburg <michael at slashhome dot org> --- Some additional eyes on the algorithm change would be quite welcome. I think I've missed something as I'm still getting some similar crashes, albeit at a lower rate. The tree structure has the same flaw in those crashes. I also believe the structure of the code can be adjusted to reduce the number of times we look up the slot for a given item. If I'm able to find a clean reproduction for the crash with this patch, I'll share it here. I may also build a smaller randomized test, either for the external interface (__register_frame, __deregister_frame, throw, catch) or for the btree alone.