xdr_string: don't leak strings with xdr_free
Historically (and in a small amount of older software such as OpenAFS),
developers would attempt to free XDR strings with
xdr_free((xdrproc_t)xdr_string, &string)
This resulted in xdr_free calling xdr_string with only two intentional
arguments and whatever was left in the third argument register. If the
register held a sufficently small number, xdr_string would return FALSE
and not free the string (no one checks the return values).
Software should instead free strings with:
xdr_free((xdrproc_t)xdr_wrapstring, &string)
Because buggy software exists in the wild, act as though xdr_wrapstring
was used in the XDR_FREE case and plug these leaks.
[5 lines not shown]
rpc/xdr.h: make xdrproc_t always take two arguments
The type of xdrproc_t is clearly defined in the comments as a function
with two arguments, an XDR * and a void * (sometimes spelled caddr_t).
It was initialy defined as:
typedef bool_t (*xdrproc_t)();
At some point people started giving it a non-empty argument list.
Unfortunatly, there has been widespread disagreement about how arguments
are passed. There seems to have been a widespread view that it should
be allowed to pass three argument function pointer to xdrproc_t. Most
notable is xdr_string which takes a maximum length parameter. This lead
to all sorts of prototypes (all of which have been present in the
FreeBSD source tree):
FreeBSD userspace (nominally from tirpc, but seemingly local):
typedef bool_t (*xdrproc_t)(XDR *, ...);
FreeBSD kernel, glibc:
[36 lines not shown]
dpnaa2: announce transmit checksum support
Let the network stack know that the NIC supports checksum offloading
for the IPv4 header checksum and the TCP and UDP transport checksum.
This avoids the computation in software and therefore provides the
expected performance gain.
PR: 292006
Reviewed by: dsl, Timo Völker
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54809
14.4: Update stable/14 to -PRERELEASE
This marks the start of the FreeBSD 14.4 release cycle; the stable/14
tree is now in "code slush".
Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time. Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.
Approved by: re (implicit)
Sponsored by: OpenSats Initiative
x11/contour: Unbreak build on -CURRENT
clang with debug assertions enabled (on -CURRENT) crashes when it
tries to compile this port. As a workaround use clang from ports when
system clang has debug assertions enabled.
audio/wavpack: Update to 5.9.0
Add source URL to WWW, since this is what devs really want.
Remove cmake:testing; test target has been failing for a while.
This needs more investigation.
Remove unused WAVPACK_BUILD_DOCS from CMAKE_ARGS. Project transitioned
to WAVPACK_INSTALL_DOCS, but disabling this would disable installation
of the manpages, which is not the desired effect.
https://github.com/dbry/WavPack/releases/tag/5.9.0
devel/arduino: pin to openjdk8
Dependency comms/rxtx is tied to openjdk8 and installs jars in
PREFIX/openjdk8/jre/lib/ext. This directory is gone in jdk9+, but
arduino expects it.
So pin arduino to openjdk8 also.
If anybody wants this to be supported by jdk9+, patches are welcome.
PR: 292651
graphics/darktable: Add `llvm:build` after `compiler:*` in USES=
The move of `USES+=compiler:*` later in the file to be able to check
`${ARCH}` apparently triggered the following warning:
make: .../Mk/Uses/compiler.mk:86: warning: Command "/usr/local/llvm19/bin/clang --version" exited with status 127
make: .../Mk/Uses/compiler.mk:134: warning: Command "/usr/local/llvm19/bin/clang++ -### /dev/null 2>&1" exited with status 127
It looks like the order of `compiler:*` and `llvm:*` is important.
Moving the addition of `llvm:compiler` after `compiler:*` was added
conditionally fixes that warning.
PR: 292128
Reported by: Trond Endrestøl <Trond.Endrestol at ximalas.info>
Tested by: Trond Endrestøl <Trond.Endrestol at ximalas.info>,
Herbert J. Skuhra <herbert at gojira.at>
net/wireguard-tools: Add possibility to configure keys in rc script
Add possibility to ingest WireGuard keys from files using the rc script.
It basically adds two more options: "wireguard_<iface>_key" and
"wireguard_<iface>_psk". Both are optional.
PR: 291997
x86 lapic: Dump LVTs from the ddb show lapic command
Add description for each LVT element, use it in show lapic dump.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week