From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6936 invoked by alias); 4 Aug 2010 23:08:45 -0000 Received: (qmail 6661 invoked by uid 48); 4 Aug 2010 23:08:28 -0000 Date: Wed, 04 Aug 2010 23:08:00 -0000 Message-ID: <20100804230828.6660.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/24724] _Unwind_Backtrace() calls malloc In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg00280.txt.bz2 ------- 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