* stat(2) does not indicate behavior with NULL filename arg, man pages 3.24 @ 2010-04-21 19:00 Jeff Mahovsky [not found] ` <4BCF4B3A.8020909-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jeff Mahovsky @ 2010-04-21 19:00 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA The stat(2) manpage does not indicate the behavior of the stat() function when the filename is a NULL pointer. Does stat() return an error or is the behavior undefined? Jeff Mahovsky Dreamworks Animation -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <4BCF4B3A.8020909-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org>]
* Re: stat(2) does not indicate behavior with NULL filename arg, man pages 3.24 [not found] ` <4BCF4B3A.8020909-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org> @ 2010-05-11 1:46 ` Petr Baudis 2010-05-24 5:23 ` Michael Kerrisk 1 sibling, 0 replies; 3+ messages in thread From: Petr Baudis @ 2010-05-11 1:46 UTC (permalink / raw) To: Jeff Mahovsky Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA On Wed, Apr 21, 2010 at 12:00:10PM -0700, Jeff Mahovsky wrote: > The stat(2) manpage does not indicate the behavior of the stat() > function when the filename is a NULL pointer. Does stat() return an > error or is the behavior undefined? I think it is generally not safe to rely on proper handling of such NULL pointers unless it is explicitly specified that they are handled correctly. I think e.g. glibc will happily peek at the stat()'s filename if you compile with -fbounded-pointers. -- Petr "Pasky" Baudis When I feel like exercising, I just lie down until the feeling goes away. -- xed_over -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: stat(2) does not indicate behavior with NULL filename arg, man pages 3.24 [not found] ` <4BCF4B3A.8020909-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org> 2010-05-11 1:46 ` Petr Baudis @ 2010-05-24 5:23 ` Michael Kerrisk 1 sibling, 0 replies; 3+ messages in thread From: Michael Kerrisk @ 2010-05-24 5:23 UTC (permalink / raw) To: Jeff Mahovsky; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Petr Baudis Jeff On Wed, Apr 21, 2010 at 9:00 PM, Jeff Mahovsky <Jeff.Mahovsky-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org> wrote: > The stat(2) manpage does not indicate the behavior of the stat() function > when the filename is a NULL pointer. Does stat() return an error or is the > behavior undefined? > > Jeff Mahovsky > Dreamworks Animation Just to add to what Petr said. A NULL pointer is a general kind of error that can affect many interfaces. I don't really see a need to document this case for a specific interface. Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface" http://blog.man7.org/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-24 5:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-04-21 19:00 stat(2) does not indicate behavior with NULL filename arg, man pages 3.24 Jeff Mahovsky [not found] ` <4BCF4B3A.8020909-hCDZnVt6e3JSwrhanM7KvQ@public.gmane.org> 2010-05-11 1:46 ` Petr Baudis 2010-05-24 5:23 ` Michael Kerrisk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).