This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/24724] _Unwind_Backtrace() calls malloc
- From: "arun dot sharma at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2005 01:07:39 -0000
- Subject: [Bug other/24724] _Unwind_Backtrace() calls malloc
- References: <bug-24724-11484@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from arun dot sharma at google dot com 2005-11-08 01:07 -------
(In reply to comment #4)
> I really doubt we can remove it because this is also used in the undwinding for
> exceptions.
>
It must be possible to do stack unwinding without any mallocs. If the exception
throwing code path requires mallocs, that's fine by us.
The particular malloc in question is coming from start_fde_sort() in
unwind-dw2-fde.c. Perhaps the sorting can be done earlier i.e. before
_Unwind_Backtrace() is called?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24724