This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][PATCH] Segfault while unwinding an invalid function pointer
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>, eberlein at us dot ibm dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Nov 2007 09:54:27 +0100
- Subject: Re: [PING][PATCH] Segfault while unwinding an invalid function pointer
- References: <470D384A.5060302@linux.vnet.ibm.com> <472257C7.9050608@linux.vnet.ibm.com> <18211.7927.465759.15249@zebedee.pink> <47265B9E.1020106@linux.vnet.ibm.com> <4726675E.9020605@linux.vnet.ibm.com> <472FA96C.70600@linux.vnet.ibm.com> <20071106000139.GZ5451@devserv.devel.redhat.com> <20071106003849.GA10431@caradoc.them.org>
On 11/6/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Mon, Nov 05, 2007 at 07:01:39PM -0500, Jakub Jelinek wrote:
> > For Linux, what about
> > int dummy = 0;
> > syscall (SYS_futex, &dummy, FUTEX_WAIT, 1, address_to_check_if_readable)
> > ?
>
> If we can do this with one of the classic syscalls, that seems like it
> would be wiser... and maybe useful for other platforms, unlike futex.
Why not use mincore? That should return EFAULT for invalid addresses.
Richard.