Date: Fri, 10 Oct 2014 19:28:57 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272908 - head/contrib/netbsd-tests/lib/libc/gen Message-ID: <201410101928.s9AJSvN3050033@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Oct 10 19:28:57 2014 New Revision: 272908 URL: https://svnweb.freebsd.org/changeset/base/272908 Log: Disable the invalid pointer test on FreeBSD FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the address passed in in libc, whereas NetBSD just passes the information off to the syscall, which allows the kernel to return EFAULT on bad pointers. In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Fri Oct 10 19:27:36 2014 (r272907) +++ head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Fri Oct 10 19:28:57 2014 (r272908) @@ -56,10 +56,12 @@ ATF_TC_BODY(getcwd_err, tc) ATF_REQUIRE(getcwd(buf, 0) == NULL); ATF_REQUIRE(errno == EINVAL); +#if defined(__NetBSD__) errno = 0; ATF_REQUIRE(getcwd((void *)-1, sizeof(buf)) == NULL); ATF_REQUIRE(errno == EFAULT); +#endif } ATF_TC(getcwd_fts);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410101928.s9AJSvN3050033>