On Mon, Feb 6, 2012 at 9:31 AM, Dmitry V. Levin <[email protected]> wrote: > On Mon, Feb 06, 2012 at 07:43:58AM -0800, H.J. Lu wrote: >> On Mon, Feb 6, 2012 at 7:24 AM, Dmitry V. Levin wrote: >> > On Fri, Feb 03, 2012 at 10:19:55AM -0800, H.J. Lu wrote: >> >> >> >> This patch avoids segfault when there are holes in system call table. >> >> It can happen with syscall (number, ...) and number is in those holes. >> > >> > We don't have sysent tables with holes yet, do we? >> >> I am working on such a target, x32. >> >> > Another question is, assuming that we have such sysent tables, should >> > those syscalls be treated exactly the same way as syscalls which numbers >> > are out of range? >> >> I don't mind either way as long as strace doesn't segfault. > > What about the following commit message, then? > > --- > Skip the syscall entry if the sys_func field is NULL > > Avoid NULL dereference when there are holes in sysent tables. > It can happen with syscall (number, ...) and number is in those holes. > There are no targets with holey systent tables so far, but at least > one such a target, x32, is already on the horizon. > > * defs.h (SCNO_IN_RANGE): Also check the sys_func field.
Works for me. Thanks. -- H.J. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
