refactor: define PKG_MAX_DEINSTALL_RECURSION to replace magic number 128
Give a name to the deinstall graph recursion depth limit, making
the check self-documenting.
refactor: extract pkg_solved_extract_pkg to deduplicate switch in graph_edge
Resolve the TODO in pkg_jobs_schedule_graph_edge by extracting the
repeated switch that extracts old/new package pointers from a
pkg_solved into a standalone helper.
Eliminates 46 duplicate lines while improving readability and
reducing the maintenance surface.
refactor: introduce PKG_LOAD_COMMON and PKG_LOAD_ALL defines
Replace duplicated 9-flag and 10-flag PKG_LOAD combinations with
named macros, reducing ~24 lines of verbose bit-OR chains across
pkg_jobs_universe.c, pkg_jobs.c, and pkg.c.
- PKG_LOAD_COMMON: the 9-flag subset used by most consumers
- PKG_LOAD_ALL: PKG_LOAD_COMMON plus PKG_LOAD_RDEPS
[SimplifyLibCalls] Don't set nnan on synthesized frem in optimizeFMod (#199284)
LibCallSimplifier can fold a libcall to fmod to an frem instruction if
the fmod call doesn't set errno.
fmod(x, y) sets errno if x == +/-Inf or y == 0. The old code assumed
that this was also a sufficient condition to prove that the result is
not NaN, and so unconditionally set the nnan fmf on the new frem
instruction. That's not sound; e.g. fmod(x, NaN) == frem(x, NaN) ==
NaN.
We don't actually have to worry about propagating the `nnan` flag;
B.CreateFRemFMF does it for us automagically.
This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
[SimplifyLibCalls] Fix optimizeFdim for Inf-Inf cases (#199306)
fdim(x,y) is defined as
NaN if x or y is NaN, otherwise
(x > y) ? x - y : +0
optimizeFdim computed fdim(x,y) as max(x-y, +0). This is not correct
when x == y == +/-Inf; the result should be 0, but this optimization
returns NaN.
I was surprised by this bug because there's even a testcase checking the
incorrect behavior. But returning 0 matches the description in C99 and
POSIX, where, just to be extra clear, the spelling of the piecewise
function is
NaN if either input is NaN
x - y if x > y
+0 if x <= y
[4 lines not shown]
misc/vxl: Don't override build conflicts by one another
Fix port Makefile by merging two lines defining CONFLICTS_BUILD, where
the second occurrence was overriding the former.
PR: 295304
Approved by: portmgr blanket
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D57015
15.1/relnotes: Adjust EC2 entries
Remove an item about ec2-small and cloud-init which is included in
the following entry.
Add an item about ec2-small having firstboot_pkgs turned off by
default; this change speeds up the boot process by 6 seconds by not
installing zero packages.
Define CARD64 as unsigned long long on OpenBSD LP64 to match uint64_t.
This fixes a number of errors with llvm 22 where X code mixes
CARD64 and uint64_t. ok tb@
netlink: Check for NULL return from npt_alloc()
Reviewed by: glebius, pouria
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57171
Merge tag 'nios2_updates_for_v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux
Pull nios2 fixes from Dinh Nguyen:
- Implement _THIS_IP_ for inline asm
- Add Simon Schuster as a maintainer and mark the NIOS2 as Supported
* tag 'nios2_updates_for_v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
nios2: Implement _THIS_IP_ using inline asm
MAINTAINERS: arch/nios2: Add Simon Schuster as co-maintainer
Merge tag 'loongarch-fixes-7.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen:
"Rework KASLR to avoid initrd overlap, remove some unused code to avoid
a build warning, fix some bugs in kprobes and KVM"
* tag 'loongarch-fixes-7.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
LoongArch: KVM: Move some variable declarations to paravirt.h
LoongArch: kprobes: Fix handling of fatal unrecoverable recursions
LoongArch: kprobes: Use larch_insn_text_copy() to patch instructions
LoongArch: Remove unused code to avoid build warning
LoongArch: Avoid initrd overlap during kernel relocation
LoongArch: Skip relocation-time KASLR if already applied
efi/loongarch: Randomize kernel preferred address for KASLR