From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7369 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Execinfo.h, backtrace is needed. Date: Thu, 9 Apr 2015 13:34:18 -0400 Message-ID: <20150409173418.GL6817@brightrain.aerifal.cx> References: <20150408160507.GB31681@port70.net> <5526B6D7.9080601@safe.ca> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1428600874 29033 80.91.229.3 (9 Apr 2015 17:34:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2015 17:34:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7382-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 09 19:34:33 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YgGLZ-0003Wz-CQ for gllmg-musl@m.gmane.org; Thu, 09 Apr 2015 19:34:33 +0200 Original-Received: (qmail 13881 invoked by uid 550); 9 Apr 2015 17:34:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 13863 invoked from network); 9 Apr 2015 17:34:31 -0000 Content-Disposition: inline In-Reply-To: <5526B6D7.9080601@safe.ca> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7369 Archived-At: On Thu, Apr 09, 2015 at 01:28:55PM -0400, Jean-Marc Pigeon wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > > Noticed today, musl doesn't provide execinfo.h > nor backtrace function. > > Reading mailling list as backtrace is a not needed > function as "gdb can do it". > > I beg to disagree. > > There is many time where backtrace capabilities > are handy. > Ex: within a daemon you want to detect and trace > a memory leak origin. This can not be done within > a testbench, as the leak is small and occur > once in a (very long) while. > > I understand there is no "standard" defining > the way to implement it. > What is the musl designers position, > never ever backtrace to be implemented or > this could be good for real production > program. > > May be there is a way to get backtrace > capabilities I overlooked within musl? I believe there's a third-party libbacktrace that might work with little or no modification. The function is not appropriate for inclusion in musl both for the reasons discussed in the past and for important technical reasons, including at least: - It would require musl either static link with gcc's libgcc_eh or libunwind, neither of which is acceptable, or that we implement our own dwarf interpreter, which is major scope creep. - It would require that at least part of musl be built with eh_frame unwind information. With a third-party library all of these issues are isolated from musl and only affect people using the backtrace library. Rich