This is the mail archive of the
mailing list for the GCC project.
Re: [PING][PATCH] Segfault while unwinding an invalid function pointer
On Mon, Oct 29, 2007 at 03:15:58PM -0700, Pete Eberlein wrote:
> The heavyweight part (opening a file) will only happen under rare
> circumstances: when fde==NULL (unwind-dw2.c (uw_frame_state_for)) as
> frame unwind info could not be found for that function. This should
> only happen for a signal frame or a garbage address.
Or a function without unwind info. Something that happens quite often.
E.g. even with -fasynchronous-unwind-tables built glibc, the outermost
stack frame is always without unwind info and so every backtrace(3)
will hit your tmpfile/write/fclose at least once. This is too costly.
> 2007-10-29 Pete Eberlein <email@example.com>
> * linux-unwind.h (unwind_memory_range_check): New function
> that determines if a memory range is readable.
> * linux-unwind.h (x86_64_fallback_frame_state): Handle
> invalid function pointer address and change cfa.