This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Invalid program counters and unwinding


On Mon, Jul 02, 2018 at 05:48:32PM +0200, Michael Matz wrote:
> 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.

Doesn't that clash with the x86-64 ABI which says what kind of FDE use by
default if none is found (essentially a standard leaf routine that doesn't
change sp, nor save any registers)?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]