This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/24724] _Unwind_Backtrace() calls malloc



------- Comment #13 from rth at gcc dot gnu dot org  2010-08-04 23:08 -------
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.

(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.


-- 

rth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24724


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]