diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/clang/libclang/Makefile | 3 | ||||
-rw-r--r-- | lib/clang/liblldb/Makefile | 3 | ||||
-rw-r--r-- | lib/libc/gen/getbsize.3 | 5 | ||||
-rw-r--r-- | lib/libc/stdlib/jemalloc/Makefile.inc | 8 | ||||
-rw-r--r-- | lib/libc/sys/kqueue.2 | 12 | ||||
-rw-r--r-- | lib/libc/sys/ptrace.2 | 22 | ||||
-rw-r--r-- | lib/libc/sys/socket.2 | 4 | ||||
-rw-r--r-- | lib/libc/sys/stat.2 | 5 | ||||
-rw-r--r-- | lib/libcam/tests/libcam_test.c | 74 |
9 files changed, 122 insertions, 14 deletions
diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile index 4c5ec9d27f2c..82d932f5037c 100644 --- a/lib/clang/libclang/Makefile +++ b/lib/clang/libclang/Makefile @@ -130,6 +130,7 @@ SRCS_MIN+= Analysis/ReachableCode.cpp SRCS_MIN+= Analysis/ScanfFormatString.cpp SRCS_MIN+= Analysis/ThreadSafety.cpp SRCS_MIN+= Analysis/ThreadSafetyCommon.cpp +SRCS_MIN+= Analysis/ThreadSafetyLogical.cpp SRCS_MIN+= Analysis/ThreadSafetyTIL.cpp SRCS_MIN+= Analysis/UninitializedValues.cpp SRCS_MIN+= Basic/Attributes.cpp @@ -312,6 +313,8 @@ SRCS_MIN+= Frontend/Rewrite/FrontendActions.cpp SRCS_MIN+= Frontend/Rewrite/HTMLPrint.cpp SRCS_MIN+= Frontend/Rewrite/InclusionRewriter.cpp SRCS_MIN+= Frontend/Rewrite/RewriteMacros.cpp +SRCS_MIN+= Frontend/Rewrite/RewriteModernObjC.cpp +SRCS_MIN+= Frontend/Rewrite/RewriteObjC.cpp SRCS_MIN+= Frontend/Rewrite/RewriteTest.cpp SRCS_MIN+= Frontend/SerializedDiagnosticPrinter.cpp SRCS_MIN+= Frontend/SerializedDiagnosticReader.cpp diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index 273333c4d3fb..331411d307c7 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -31,6 +31,7 @@ SRCS+= API/SBEvent.cpp SRCS+= API/SBExecutionContext.cpp SRCS+= API/SBExpressionOptions.cpp SRCS+= API/SBFileSpec.cpp +SRCS+= API/SBFileSpecList.cpp SRCS+= API/SBFrame.cpp SRCS+= API/SBFunction.cpp SRCS+= API/SBHostOS.cpp @@ -41,6 +42,7 @@ SRCS+= API/SBLaunchInfo.cpp SRCS+= API/SBLineEntry.cpp SRCS+= API/SBListener.cpp SRCS+= API/SBMemoryRegionInfo.cpp +SRCS+= API/SBMemoryRegionInfoList.cpp SRCS+= API/SBModule.cpp SRCS+= API/SBModuleSpec.cpp SRCS+= API/SBPlatform.cpp @@ -69,6 +71,7 @@ SRCS+= API/SBTypeSummary.cpp SRCS+= API/SBUnixSignals.cpp SRCS+= API/SBValue.cpp SRCS+= API/SBValueList.cpp +SRCS+= API/SBVariablesOptions.cpp SRCS+= API/SBWatchpoint.cpp SRCS+= API/SystemInitializerFull.cpp SRCS+= Breakpoint/Breakpoint.cpp diff --git a/lib/libc/gen/getbsize.3 b/lib/libc/gen/getbsize.3 index 158973cb1c7e..c0b46bf9e235 100644 --- a/lib/libc/gen/getbsize.3 +++ b/lib/libc/gen/getbsize.3 @@ -28,7 +28,7 @@ .\" @(#)getbsize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 16, 2012 +.Dd June 11, 2017 .Dt GETBSIZE 3 .Os .Sh NAME @@ -67,7 +67,8 @@ Sizes less than 512 bytes are rounded up to 512 bytes, and sizes greater than 1 GB are rounded down to 1 GB. In each case .Fn getbsize -produces a warning message. +produces a warning message via +.Xr warnx 3 . .Pp The .Fn getbsize diff --git a/lib/libc/stdlib/jemalloc/Makefile.inc b/lib/libc/stdlib/jemalloc/Makefile.inc index f491e95759d1..0c64c8e537fa 100644 --- a/lib/libc/stdlib/jemalloc/Makefile.inc +++ b/lib/libc/stdlib/jemalloc/Makefile.inc @@ -2,10 +2,10 @@ .PATH: ${LIBC_SRCTOP}/stdlib/jemalloc -JEMALLOCSRCS:= jemalloc.c arena.c atomic.c base.c bitmap.c chunk.c \ - chunk_dss.c chunk_mmap.c ckh.c ctl.c extent.c hash.c huge.c mb.c \ - mutex.c nstime.c pages.c prng.c prof.c quarantine.c rtree.c spin.c \ - stats.c tcache.c ticker.c tsd.c util.c witness.c +JEMALLOCSRCS:= jemalloc.c arena.c background_thread.c base.c bitmap.c ckh.c \ + ctl.c extent.c extent_dss.c extent_mmap.c hash.c hooks.c large.c \ + malloc_io.c mutex.c mutex_pool.c nstime.c pages.c prng.c prof.c \ + rtree.c spin.c stats.c sz.c tcache.c ticker.c tsd.c witness.c SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index a8825daf3d96..e7bca7231690 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -524,10 +524,6 @@ On return, contains the number of times the timeout has expired since the last call to .Fn kevent . This filter automatically sets the EV_CLEAR flag internally. -There is a system wide limit on the number of timers -which is controlled by the -.Va kern.kq_calloutmax -sysctl. .Bl -tag -width "Dv NOTE_USECONDS" .It Dv NOTE_SECONDS .Va data @@ -545,9 +541,15 @@ is in nanoseconds. .Pp If .Va fflags -is not set, the default is milliseconds. On return, +is not set, the default is milliseconds. +On return, .Va fflags contains the events which triggered the filter. +.Pp +There is a system wide limit on the number of timers +which is controlled by the +.Va kern.kq_calloutmax +sysctl. .It Dv EVFILT_USER Establishes a user event identified by .Va ident diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 8eb26dd9279b..b8968ebaa3da 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd August 29, 2016 +.Dd June 11, 2017 .Dt PTRACE 2 .Os .Sh NAME @@ -643,6 +643,26 @@ and .Fa data arguments are used the same as for .Dv PT_CONTINUE. +.It Dv PT_GET_SC_ARGS +For the thread which is stopped in either +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +state, that is, on entry or exit to a syscall, +this request fetches the syscall arguments. +.Pp +The arguments are copied out into the buffer pointed to by the +.Fa addr +pointer, sequentially. +Each syscall argument is stored as the machine word. +Kernel copies out as many arguments as the syscall accepts, +see the +.Va pl_syscall_narg +member of the +.Vt struct ptrace_lwpinfo , +but not more than the +.Fa data +bytes in total are copied. .It Dv PT_FOLLOW_FORK This request controls tracing for new child processes of a traced process. If diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index 52f5384195b6..55298531c70e 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -28,7 +28,7 @@ .\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd June 10, 2017 .Dt SOCKET 2 .Os .Sh NAME @@ -110,7 +110,7 @@ socket may provide a sequenced, reliable, two-way connection-based data transmission path for datagrams of fixed maximum length; a consumer may be required to read an entire packet with each read system call. -This facility is protocol specific, and presently unimplemented. +This facility may have protocol-specific properties. .Dv SOCK_RAW sockets provide access to internal network protocols and interfaces. The types diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index be6100adef48..e706a408275d 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -137,6 +137,11 @@ The numeric ID of the device containing the file. The file's inode number. .It Va st_nlink The number of hard links to the file. +.It Va st_flags +The flags enabled for the file. +See +.Xr chflags 2 +for the list of flags and their description. .El .Pp The diff --git a/lib/libcam/tests/libcam_test.c b/lib/libcam/tests/libcam_test.c index e0397523a095..a31bdb7e0e6d 100644 --- a/lib/libcam/tests/libcam_test.c +++ b/lib/libcam/tests/libcam_test.c @@ -58,6 +58,75 @@ cam_has_error(void) return (strlen(cam_errbuf) != 0); } +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_NULL_path); +ATF_TC_BODY(cam_get_device_negative_test_NULL_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device(NULL, parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_bad_path); +ATF_TC_BODY(cam_get_device_negative_test_bad_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("1ada", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_nul_path); +ATF_TC_BODY(cam_get_device_negative_test_nul_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_root); +ATF_TC_BODY(cam_get_device_negative_test_root, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("/", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_positive_test); +ATF_TC_BODY(cam_get_device_positive_test, tc) +{ + char expected_dev_name[] = "foo"; + char parsed_dev_name[DEV_IDLEN + 1]; + int expected_unit, parsed_unit; + + expected_unit = 1; + + ATF_REQUIRE_MSG(cam_get_device("/dev/foo1", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, expected_dev_name); + ATF_REQUIRE(parsed_unit == expected_unit); + + strcpy(parsed_dev_name, ""); + parsed_unit = -1; + + ATF_REQUIRE_MSG(cam_get_device("foo1", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, expected_dev_name); + ATF_REQUIRE(parsed_unit == expected_unit); +} + ATF_TC(cam_open_device_negative_test_O_RDONLY); ATF_TC_HEAD(cam_open_device_negative_test_O_RDONLY, tc) { @@ -206,6 +275,11 @@ ATF_TC_BODY(cam_freeccb_negative_test_NULL, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_NULL_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_bad_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_nul_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_root); + ATF_TP_ADD_TC(tp, cam_get_device_positive_test); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_O_RDONLY); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_nonexistent); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_unprivileged); |