/memcheck/tests/freebsd/eventfd1
/memcheck/tests/freebsd/eventfd2
/memcheck/tests/freebsd/extattr
+/memcheck/tests/freebsd/exterrctl
/memcheck/tests/freebsd/fbsd278566
/memcheck/tests/freebsd/fchroot
/memcheck/tests/freebsd/fexecve
getrlimitusage \
timer_delete \
fchroot \
- setcred
+ setcred \
+ exterrctl
])
# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
[test x$ac_cv_func_fchroot = xyes])
AM_CONDITIONAL([HAVE_SETCRED],
[test x$ac_cv_func_setcred = xyes])
+AM_CONDITIONAL([HAVE_EXTERRCTL],
+ [test x$ac_cv_func_exterrctl = xyes])
if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \
-o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \
eventfd2.stderr.exp \
extattr.vgtest \
extattr.stderr.exp \
+ exterrctl.vgtest \
+ exterrctl.stderr.exp \
fbsd278566.vgtest \
fbsd278566.stderr.exp \
fchroot.vgtest \
check_PROGRAMS += aiov
endif
+if HAVE_EXTERRCTL
+check_PROGRAMS += exterrctl
+endif
+
if HAVE_FCHROOT
check_PROGRAMS += fchroot
fchroot_SOURCES = fchroot.cpp
delete_sized_mismatch_SOURCES = delete_sized_mismatch.cpp
errno_aligned_allocs_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT@
extattr_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@
+if HAVE_EXTERRCTL
+exterrctl_SOURCES = exterrctl.cpp
+endif
get_set_login_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@
getfh_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@
getfsstat_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@
--- /dev/null
+#include <sys/exterrvar.h>
+#include <cstdlib>
+
+static long x0;
+
+int main()
+{
+ // int exterrctl(u_int op, u_int flags, void *ptr);
+ // op should be 0 or EXTERRCTLF_FORCE (1)
+ // flags EXTERRCTL_ENABLE EXTERRCTL_DISABLE EXTERRCTL_UD (1 2 3)
+ // see sys/sys/_uexterror.h for ptr
+ long *px{static_cast<long*>(malloc(2*sizeof(long)))};
+ x0 = px[0];
+
+ char *foo = new char [48+128];
+ delete [] foo;
+
+ exterrctl(x0, x0+2, x0+foo);
+}
+
--- /dev/null
+Syscall param exterrctl(op) contains uninitialised byte(s)
+ at 0x........: exterrctl (in /...libc...)
+ by 0x........: main (exterrctl.cpp:18)
+
+Syscall param exterrctl(flags) contains uninitialised byte(s)
+ at 0x........: exterrctl (in /...libc...)
+ by 0x........: main (exterrctl.cpp:18)
+
+Syscall param exterrctl(ptr) contains uninitialised byte(s)
+ at 0x........: exterrctl (in /...libc...)
+ by 0x........: main (exterrctl.cpp:18)
+
+Syscall param exterrctl(ptr) points to unaddressable byte(s)
+ at 0x........: exterrctl (in /...libc...)
+ by 0x........: main (exterrctl.cpp:18)
+ Address 0x........ is 0 bytes inside a block of size 176 free'd
+ at 0x........: ...operator delete[]... (vg_replace_malloc.c:...)
+ by 0x........: main (exterrctl.cpp:16)
+ Block was alloc'd at
+ at 0x........: ...operator new[]... (vg_replace_malloc.c:...)
+ by 0x........: main (exterrctl.cpp:15)
+
--- /dev/null
+prereq: test -x ./exterrctl
+prog: exterrctl
+vgopts: -q