svn commit: r272908 - head/contrib/netbsd-tests/lib/libc/gen

Garrett Cooper ngie at FreeBSD.org
Fri Oct 10 19:28:58 UTC 2014


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);


More information about the svn-src-head mailing list