http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24724
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Last reconfirmed| |2012-09-13 Resolution|WONTFIX | Ever Confirmed|0 |1 --- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-13 13:43:42 UTC --- (In reply to comment #13) > There are two solutions to this: > > (1) Make sure your binary provides PT_GNU_EH_FRAME. This is the quickest > path through the unwinder, since the table is pre-sorted by the linker. This isn't the problem. > (2) Have your malloc detect the recursion and return NULL. This will cause > the unwinder to perform a linear search through the unsorted tables. > It should not fail due to the fake out-of-memory condition, since it > was designed to handle throwing an exception during a true OOM condition. The problem is _Unwind_Find_FDE in unwind-dw2-fde.c calls search_object to find FDE in the registered objects, which is loaded unsorted from .eh_frame section. Can we use .eh_frame_hdr section to load the sorted table directly?