| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
pmc_read(3): fix manlint error
Remove spurious trailing comma from last .Nm entry in NAME section.
|
|
|
|
| |
localeconv(3): start sentences on new lines
|
|
|
|
|
|
| |
xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS
This unbreaks the .Nm declaration
|
|
|
|
| |
__iconv_get_list: separate .Nm entries with commas
|
|
|
|
| |
sctp_send(3): start sentences on new lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318704:
posix1e(3): reference using the section (3) when referencing libbsm with .Xr
r318708:
acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS
r318709:
acl_to_text(3): start sentences on new lines
|
|
|
|
| |
quick_exit(3): delete trailing whitespace in licensing tort
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318718:
rctl_add_rule(2): fix manlint warnings
- Fix commas (either missing or misused) after .Nm entries in SYNOPSIS
r318719:
open(2): fix manlint warnings
- Sort SEE ALSO .Xr entries.
- Sort sections (HISTORY comes after STANDARDS).
r318720:
ptrace(2): clean up trailing whitespace
r318721:
kill(2): add missing section for sysctl(9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319048:
Push `snapshot_file` copying down into run_tests function, and mark snapshot_file
const char *.
This fixes a bogus set of errors from gcc about strdup not being allowed a NULL
argument.
r319049:
Bump WARNS from 1 to 3 after recent commits to fix warnings in the
directory.
Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0
r319051:
hostent_test_getnameinfo_eq(..): initialize found_a_host to false
CID: 1368943
r319054:
hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done
This plugs a leak of memory allocated via getaddrinfo.
CID: 1346866
|
|
|
|
|
|
|
|
|
| |
getbsize(3): clarify that underflow/overflow warnings in regard to $BLOCKSIZE
gets output via warnx(3)
This helps set expectations for how one might deal with those messages, i.e.,
mute output from /dev/stderr today, since that's where vwarn(3) outputs messages
to today.
|
|
|
|
|
|
| |
err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0`
This is being done to aid humans and static analysis checkers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319844:
Add positive and negative testcases for cam_get_device(3)
r319845:
Remove stdlib.h #include added in r319844
A previous iteration of the tests I added in r319844 involved free(3), but
that attempt didn't pan out, so I switched to stack allocated buffers instead
of heap allocated ones, making the #include unnecessary.
MFC with: r319844
|
|
|
|
|
|
|
|
| |
fopen(3): make manlint fixes
- Break on new lines.
- Use .Dv with NULL.
- Rewrap lines as necessary/when possible.
|
|
|
|
|
|
|
| |
Use __FBSDID instead of the license agreement to embed the $FreeBSD$ RCS keyword
Reminded by a comment made by markj w.r.t. using __FBSDID in .c files ala a
past Phabricator review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbuf(3): add some basic functional tests for the library
Areas not covered still [positive functionality wise] are:
- sbuf_{clear,get,set}_flags
- sbuf_new (in particular, with fixed buffers, etc).
Some basic negative testing has been added, but more will be added in the
future.
This work was in part to validate work done by cem in r288223, and ian
before that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r307873 (by marcel):
Include <stdarg.h> instead of <machine/stdarg.h> when compiled as
part of libsbuf. The former is the standard header, and allows us
to compile libsbuf on macOS/linux.
r314397 (by scottl):
Implement sbuf_prf(), which takes an sbuf and outputs it
to stdout in the non-kernel case and to the console+log
in the kernel case. For the kernel case it hooks the
putbuf() machinery underneath printf(9) so that the buffer
is written completely atomically and without a copy into
another temporary buffer. This is useful for fixing
compound console/log messages that become broken and
interleaved when multiple threads are competing for the
console.
r314399 (by scottl):
Add prototype for sbuf_putbuf()
r314419 (by jkim):
Include stdio.h to fix libsbuf build.
r314420 (by scottl):
Provide a comment on why stdio.h needs to be included.
r314533 (by scottl):
Expose the sbuf_putbuf() symbol to libsbuf. There are a few other symbols
that are present but not exposed, like get/set/clear flags, not sure if they
need to be exposed at this point.
r316553:
sbuf(3): expose sbuf_{clear,get,set}_flags(3) via libsbuf
These functions were added to sbuf(9) in r279992, but never
exposed to userspace. Expose them now so they can be used/tested.
|
|
|
|
|
|
| |
Make stdio deferred cancel-safe.
Requested by: eugen
|
|
|
|
|
|
| |
Don't bother to set target for SEEK_END.
While there also collapase SEEK_END into default case in lseek.
|
|
|
|
| |
Correct signatures of several pthreads stubs.
|
|
|
|
| |
false positive reported by cppcheck.
|
|
|
|
|
|
|
|
|
|
|
| |
In r300388, endnetconfig() was called on nc_handle which would release
the associated netconfig structure, which means tmpnconf->nc_netid
would be a use-after-free.
Solve this by doing endnetconfig() in return paths instead.
Reported by: jemalloc via kevlo
Reviewed by: cem, ngie (earlier version)
|
|
|
|
| |
Do not leak syslog_mutex on cancellation.
|
|
|
|
|
|
|
|
| |
The documentation moved to section 3 several years ago, but
'man cap_rights_get' pulls up cap_rights_limit(2) (which is
MLINKed to cap_rights_get.2) instead of cap_rights_get(3).
Approved by: re (gjb)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fdata-sections can cause bogus "section type conflict" errors. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33168 for more information.
Since the upstream fixes are under GPLv3 and non-trivial, just disable
using function and data sections, at the cost of a slightly larger
executable.
Direct commit to stable/10, since the version of clang in head and
stable/11 cannot be built by gcc 4.2 at all.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* limit size of buffers to RPC_MAXDATASIZE
* don't leak memory
* be more picky about bad parameters
From:
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt
via NetBSD.
|
|
|
|
|
|
| |
Add tests for some cases in r318298.
PR: 219154
|
|
|
|
|
|
|
|
| |
fma_test: mute a warning about unreachable code on amd64 by restructuring
the #ifdef block to only handle the rest of the logic in the loop in the
#else case.
CID: 1346844
|
|
|
|
|
|
|
|
| |
logarithm_test: assert that feclearexcept succeeds
This helps ensure that test preconditons are fulfilled.
CID: 1346572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319156:
:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)
This fixes a potential NULL pointer dereference.
CID: 1362051
r319159:
:dnvlist_get_string__default_value: fix a bogus string comparison test
Check actual_value vs "5", not "5" vs itself.
CID: 1362021
|
|
|
|
| |
Mention that the basep argument to getdirentries(2) can be NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317311:
Check for failures from getpagesize(3)
Return errno on failure, similar to the open(2) call above it.
CID: 1193753
r317312:
Fix type for `pagesize` to match the return type for getpagesize(3)
to fix the build
Pointyhat to: ngie
r319019:
Remove getpagesize(3) error checking added in r317312
getpagesize(3) no longer fails as of r317436.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046:
r319027:
lib/libc/tests/nss: use calloc appropriately
The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.
r319028:
Sort make variables to suit style.Makefile(5)
This is being done prior to functional changes.
r319029:
Staticize functions and remove unused variables to aid with bumping WARNS
r319030:
Fix -Wsign-compare warnings
r319031:
getusershell_test: staticize run_tests(..) to fix warnings
r319033:
getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings
r319034:
getaddrinfo_test: fix -Wsign-compare warnings
r319035:
getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings
r319036:
getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings
r319037:
getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings
r319038:
getusershell_test: mark mdata parameter in compare_usershell __unused
r319039:
getserv_test: mark unused parameters __unused to fix corresponding
warnings
r319040:
getrpc_test: fix -Wunused warnings
- Mark unused function parameters unused.
- Remove an unused function prototype.
r319041:
getproto_test: fix -Wunused warnings
Mark unused parameters __unused in functions.
r319042:
gethostby_test: fix multiple warning types
- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
for comparisons.
Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.
r319043:
getpw_test: fix -Wunused warnings
- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.
r319044:
getgr_test: fix -Wunused warnings
r319045:
Fix -Wunused and -Wshadow warnings
r319046:
Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318514:
Use size_t.
Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11
r318515:
The current qsort(3) implementation ignores the sizes of partitions, and
always perform recursion on the left partition, then use a tail call to
handle the right partition. In the worst case this could require O(N)
levels of recursions.
Reduce the possible recursion level to log2(N) by always recursing on the
smaller partition instead.
Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096
r318517:
Sync qsort.c with userland r318515.
(Note that MIN macro is removed in favor of sys/param.h's version).
PR: 213922
r318917:
Disconnect heimdal version of qsort.c from build because we are already
using libc's version of qsort.
PR: bin/213922
|
|
|
|
| |
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r279663:
qsort(3): enhance to handle 32-bit aligned data on 64-bit systems
Implement a small enhancement to the original qsort implementation:
If the data is 32 bit aligned we can side-step the long type
version and use int instead.
The change brings a modest but significant improvement in
32 bit workloads.
r279666:
qsort(3): small style(9) cleanups.
Basically spaces vs. tabs.
No functional change.
|
|
|
|
| |
Add missing double quote to fix r316635 commit.
|
|
|
|
|
|
| |
Enable 16-bit longest_match for x86.
This gives a ~2% improvement in compression tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315272:
Implement INHERIT_ZERO for minherit(2).
INHERIT_ZERO is an OpenBSD feature.
When a page is marked as such, it would be zeroed
upon fork().
This would be used in new arc4random(3) functions.
PR: 182610
Reviewed by: kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D427
r315370:
The adj_free and max_free values of new_entry will be calculated and
assigned by subsequent vm_map_entry_link(), therefore, remove the
pointless copying.
Submitted by: alc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315032:
Increase WARNS for iconv tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315033:
Increase WARNS for nss tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315034:
Document that the msun tests require WARNS=0
ATF tests have a default WARNS of 0, unlike other usermode programs. This
change is technically a noop, but it documents that the msun tests don't
work with any warnings enabled, at least not on all architectures.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315035:
Increase WARNS for libcrypt tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315036:
Increase WARNS for libmp tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315039:
Increase WARNS for libutil tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315041:
Increase WARNS for pw tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
|
|
|
|
| |
Style.
|
|
|
|
| |
Simplify cleanup on failure in realpath(3).
|
|
|
|
|
|
| |
Fix several buffer overflows in realpath(3), and other minor issues.
PR: 219154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)
Part of my original reasoning as far as converting the snprintf
calls was to permit switching over from char[] to wchar_t[] in the
future, as well as futureproof in case cam_errbuf's size was ever
changed.
Unfortunately, my approach was bugged because it conflated the
number of items with the size of the buffer, instead of the number of
elements being a fixed size != 1 byte.
Use nitems(..) instead which counts the quantity of items of a specific
type, as opposed to an unqualified sizeof(..) (which assumes that the
number of characters is equal to the buffer size).
Noted by: cem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317310:
Minor style(9) fixups
Delete trailing whitespace and sort headers.
Leave libgeom.h's placement alone, per reasoning in r317289.
r317316:
Minor style(9) fixups
Delete trailing whitespace and sort headers.
Leave libgeom.h's placement alone, per reasoning in r317289.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lib/libkvm: start adding basic tests for kvm(3)
- kvm_close: add a testcase to verify support for errno = EINVAL / -1
(see D10065) when kd == NULL is provided to the libcall.
- kvm_geterr:
-- Add a negative testcase for kd == NULL returning "" (see D10022).
-- Add two positive testcases:
--- test the error case using kvm_write on a O_RDONLY descriptor.
--- test the "no error" case using kvm_read(3) and kvm_nlist(3) as
helper routines and by injecting a bogus error message via
_kvm_err (an internal API) _kvm_err was used as there isn't a
formalized way to clear the error output, and because
kvm_nlist always returns ENOENT with the NULL terminator today.
- kvm_open, kvm_open2:
-- Add some basic negative tests for kvm_open(3) and kvm_open2(3).
Testing positive cases with a specific
`corefile`/`execfile`/`resolver` requires more work and would require
user intervention today in order to reliably test this out.
MFC note:
lib/libkvm/kvm_open2_test is not compiled/tested because ^/stable/10
lacks the kvm_open2(3) libcall.
|