This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Invalid program counters and unwinding
- From: Michael Matz <matz at suse dot de>
- To: Jeff Law <law at redhat dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, GCC <gcc at gcc dot gnu dot org>, GNU C Library <libc-alpha at sourceware dot org>, Binutils <binutils at sourceware dot org>, gnu-gabi at sourceware dot org
- Date: Mon, 2 Jul 2018 17:48:32 +0200 (CEST)
- Subject: Re: Invalid program counters and unwinding
- References: <ae764484-5bd4-5e40-ed50-81209eb54360@redhat.com> <6feeaf09-0bc2-238b-42df-2ff915f3581e@redhat.com> <2b47dbd9-f1a2-1bf0-06ca-fca40660fabf@redhat.com> <6c555c05-e6d7-f37a-577f-4e0559c36f76@redhat.com>
Hi,
On Thu, 28 Jun 2018, Jeff Law wrote:
> I believe "dumb" is referring to the fact that we're already in a bit of
> a weird state as evidenced by the NULL FDE. Blindly trying to read the
> contents of the PC that we couldn't map to an FDE is, IMHO, dumb.
>
> One might even be able to argue in this day and age that we should have
> suitable descriptors for everything. If no suitable descriptor is found
> then backtracing should stop. Lack of suitable descriptors in any code
> would be considered a bug in that scenario.
I disagree. ASM code often lacks unwind descriptors (now less than in the
past, but still). My rule of thumb is always: no descriptor -> has to be
a framepointer-using routine with standard calling sequence. (I.e.
declare the combination of no descriptor and no fp to be a bug). Some of
the callee-saved register will temporarily be wrong but unwinding can
continue.
Ciao,
Michael.