This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Segfault while unwinding an invalid function pointer


On Thu, Jan 31, 2008 at 11:48:18AM +0100, Andi Kleen wrote:
> mincore is racy because the page could be just munmaped by a different
> thread in the window between the call and the access. The only way to make it 
> safe would be to use mlock, but that might require root.
> 
> Better would be to install a signal handler and handle the exception.
> Might be tricky to coordinate this with other signal handlers though.

That's not something the unwinder can/should do.  Signal handlers are
process-wide, a library shouldn't mess up with application's signal handlers
and some other thread can change the signal handler in the mean time anyway.

	Jakub


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