refactor: convert dep formula parser from DL lists to vec
Replace the 4 DL linked list structs in the dependency formula parser
(pkg_dep_formula, pkg_dep_formula_item, pkg_dep_version_item,
pkg_dep_option_item) with vec types stored inline.
Parser builds structs on the stack and pushes by value, transferring
ownership of inner vecs via shallow copy. This eliminates all per-element
heap allocations in the formula parser.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
refactor: convert audit linked lists to vec, remove ref mechanism
Replace all linked lists in the audit system (pkg_audit_entry,
pkg_audit_package, pkg_audit_pkgname, pkg_audit_versions_range,
pkg_audit_cve) with vec types stored inline.
Remove the ref (reference entry) mechanism entirely. Instead of
creating lightweight copies that borrow pointers from the original
entry, the preprocess index now carries (entry, pkg_idx, name_idx)
triples to identify which package/name within an entry matched.
fix: handle trailing %% in printf format strings
Found by fuzz_printf: a format string ending with %% causes a
timeout because parse_format does not advance past the trailing
null byte. Add an early check in process_format_trailer() to
emit a literal %% and return when %% is the last character.
refactor: convert solver variable chain and rule items to slice/vec
Replace the solver variable DL chain with solve_var_slice_t — a simple
{begin, count} view into the flat variables array. Since variables for
the same UID are already allocated consecutively, no extra allocation
is needed beyond the slice struct itself.
Replace the rule items DL chain with vec_t(struct pkg_solve_item),
eliminating per-item heap allocations.
Remove the unused pkg_solve_impl_graph struct.
refactor: convert pkg->files from DL list + hash to sorted vec
Replace the doubly-linked list + pkghash (filehash) for package files
with a sorted vec_t(struct pkg_file) using bsearch for lookups.
refactor: convert request item DL chain to vec
Replace the doubly-linked list of pkg_job_request_item with
request_itemv_t (vec of inline items). This eliminates per-item heap
allocations and simplifies iteration/deletion in the solver and
upgrade chain processing.
fix: harden input validation found by fuzzing
- pkg_deps_parse_formula: handle empty/whitespace-only input gracefully
instead of asserting on NULL cur_item.name
- pkg_abi_from_string: handle empty version after ':' for wildcard ABI
(e.g. "*:") instead of asserting in pkg_abi_string_only_major_version
- pkg_addshlib_required: accept empty name gracefully instead of
asserting
fix: handle empty string in pkg_deps_parse_formula()
Found by fuzz_deps: passing an empty string triggers an assertion
failure at line 262 (cur_item != NULL in st_parse_comma state).
Add an early return for NULL or empty input.
refactor: replace universe item DL chain with vec
Replace the circular doubly-linked list of pkg_job_universe_item (keyed
by UID) with universe_itemv_t (vec of heap-allocated item pointers).
The pkghash maps uid -> universe_itemv_t * for O(1) lookup + indexed
access to all variants of a package.
This eliminates the prev/next/inhash fields, removes all circular
"rewind to head" patterns in the solver, and simplifies the double-nested
conflict traversals. Items remain heap-allocated for pointer stability
(request items and solver variables store item pointers).
[LV] Fix dead early exit in test. NFC (#198813)
The early exit in this test is dead because the predicated block's
condition (< 0) means the exit cond (== 1) can't be met.
[workflows] Dedupe artifacts by name in unprivileged-download-artifact (#198792)
Manual workflow rerun uploads fresh artifacts alongside the old ones
with the same name. And as a result, PR comments regarding the tests
status are not updated.
Example: https://github.com/llvm/llvm-project/pull/198766 - CI is
passing after reruns (there was a sporadic issue), but the comments
after rerun are not updated
[AMDGPU] Only fold mul24+add into V_MAD_U64_U32 when operands fit in 24 bits (#198729)
V_MAD_U64_U32 does a full 32x32 multiply, but AMDGPUmul_u24 only uses
the low 24 bits. simplifyMul24 strips outer AND masks, so the fold can
silently include nonzero bits 24-31 that should not actually have any
impact on the result