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: [PING][PATCH] Segfault while unwinding an invalid function pointer


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.


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