[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-libsigsegv] libsigsegv

From: Bruno Haible
Subject: Re: [bug-libsigsegv] libsigsegv
Date: Thu, 11 Apr 2019 01:08:49 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )


Jonny Grant wrote:
> I wrote the attached, it's pretty simple and outputs a 
> little stack trace. I was just hoping for something a little more 
> advanced than my addr2line wrapper! but at least I have something for 
> the moment to use.

Ah, you want to build some crash diagnostic feature, like 'apport'?

Generally, such crash diagnostics are more easily realized from a
different process than from the same process, for three reasons:
1) If something is broken in the current process, it may affect the
   ability of the crash diagnostic to function.
2) External tools have easier access to 'addr2line' or 'gdb'.

>  From my experience I've always been fortunate that stack trace is 
> generally pretty accurate with gdb, maybe I've been lucky.

3) On some platforms, hopping from frame to frame in a stack trace
   is nontrivial; this is 'libunwind's job. When there was a signal,
   there is usually no reliable connection between the frame above
   the SIGSEGV and the frames below the SIGSEGV. An external tool
   like gdb avoids this because it does not need to add further frames
   to the stack.

Yes, I think you've just been lucky so far.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]