public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/24724] _Unwind_Backtrace() calls malloc Date: Thu, 13 Sep 2012 13:44:00 -0000 [thread overview] Message-ID: <bug-24724-4-B7la7bKEO0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-24724-4@http.gcc.gnu.org/bugzilla/> 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?
next parent reply other threads:[~2012-09-13 13:44 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-24724-4@http.gcc.gnu.org/bugzilla/> 2012-09-13 13:44 ` hjl.tools at gmail dot com [this message] 2012-09-13 14:06 ` ian at airs dot com 2012-09-13 14:20 ` hjl.tools at gmail dot com 2005-11-07 23:24 [Bug c/24724] New: " arun dot sharma at google dot com 2005-11-08 0:23 ` [Bug other/24724] " pinskia at gcc dot gnu dot org 2005-11-08 0:48 ` arun dot sharma at google dot com 2005-11-08 0:51 ` pinskia at gcc dot gnu dot org 2005-11-08 0:53 ` pinskia at gcc dot gnu dot org 2005-11-08 0:55 ` arun dot sharma at google dot com 2005-11-08 1:02 ` pinskia at gcc dot gnu dot org 2005-11-08 1:07 ` arun dot sharma at google dot com 2005-11-08 1:09 ` arun dot sharma at google dot com 2005-11-08 1:10 ` pinskia at gcc dot gnu dot org 2005-11-08 1:13 ` pinskia at gcc dot gnu dot org 2005-11-08 1:23 ` pinskia at gcc dot gnu dot org 2005-11-08 1:30 ` arun dot sharma at google dot com 2010-08-04 23:08 ` rth at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-24724-4-B7la7bKEO0@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).