wave10b/c: 465/212 hudi/iceberg/scylladb/yugabyte/foundationdb

This commit is contained in:
russell@unturf.com 2026-03-27 17:12:25 -04:00
parent f7fa333977
commit 70702dff5c
38 changed files with 2073 additions and 5 deletions

View file

@ -1 +1 @@
93e63b76eed03e223cacf4b27544c527 undefect-cwe407-2026-03-27.pdf
25e9125115c5f626aa76d76fa7c2b85a undefect-cwe407-2026-03-27.pdf

View file

@ -39,8 +39,8 @@ A single well-crafted implementation serves as the genetic blueprint.
4. **Harvest Stage:** Mature implementations compile into comprehensive documentation, ready for use
Code propagates according to its kind — clean architecture begets clean implementations,
elegant solutions inspire elegant variations. The process of generating 462 validated
defect patches across 209 ecosystems in a single research wave demonstrates how truth,
elegant solutions inspire elegant variations. The process of generating 465 validated
defect patches across 212 ecosystems in a single research wave demonstrates how truth,
properly seeded, multiplies. Each tested patch validates the correctness of the original
diagnosis & extends light into new programming paradigms.
@ -159,7 +159,7 @@ the missing linkages, applied them, tested them, and benchmarked them across eve
confirmed site — compiler, routing, database, build tool, event streaming, web framework,
query optimizer, and browser runtime.
**462 sites patched. 3 deferred (PostgreSQL -0001/-0005; MongoDB -0005 IndexBounds).
**465 sites patched. 3 deferred (PostgreSQL -0001/-0005; MongoDB -0005 IndexBounds).
1 fixable-upstream (Erlang OTP). 1 fixable-pending (swipl-0003). 2 not-worth-fixing.
3 unpatched (Minecraft, Create mod). No language left behind.
@ -375,6 +375,9 @@ stacks, Spark schemas — this is the dominant build cost.
| tidb-0006 | TiDB | `planner/core/``slices.Contains` in aggregate pushdown (188×) | **PATCHED** |
| tidb-0007 | TiDB | `planner/core/``slices.Contains` in index merge path selection (188×) | **PATCHED** |
| tidb-0008 | TiDB | `planner/core/``slices.Contains` in expression rewriter (188×) | **PATCHED** |
| scylladb-0001 | ScyllaDB | `service/storage_proxy.cc:7135``std::find` on replica-set vector in `intersection()`, O(V×RF²) per range scan; fix: `unordered_set<host_id>` | **PATCHED** |
| yugabyte-0001 | YugabyteDB | `master/xrepl_catalog_manager.cc:793``std::find` on protobuf `table_id` field in CDC stream loop; O(D×M×T) cubic (66×) | **PATCHED** |
| foundationdb-0001 | FoundationDB | `DDRelocationQueue.actor.cpp:465``std::count` on `servers` vector in `canLaunchSrc()` double loop; O(S×R×S') | **PATCHED** |
| kubernetes-0001 | Kubernetes | `pkg/controller/job/job_controller.go``slices.Contains(Values)` O(C×R×V) per failed pod in failure policy eval; fix: `HashSet` per requirement (45×) | **PATCHED** |
| kubernetes-0002 | Kubernetes | `pkg/controller/garbagecollector/``slices.Contains(ownerUIDs)` O(refs×UIDs) per GC cycle; fix: `map[types.UID]struct{}` (150×) | **PATCHED** |
| kubernetes-0003 | Kubernetes | `pkg/controller/job/job_controller.go:1357``hasJobTrackingFinalizer()` called again in pass 2 despite `uidsWithFinalizer` set already built in pass 1; redundant O(P×F) scan; fix: `uidsWithFinalizer.Has(pod.UID)` (1.67×) | **PATCHED** |
@ -737,7 +740,7 @@ where D is the depth of the diamond chain. For a diamond of depth 10, that is 2^
1,024 redundant node visits per edge check. Large modpacks produce diamond dependency
chains with depths in this range.
**462 sites patched. 3 deferred (PostgreSQL -0001/-0005; MongoDB -0005 IndexBounds). 1 fixable-upstream (Erlang OTP — sltab patch). 1 fixable-pending (swipl-0003 attr_unify_hook). 2 not-worth-fixing. 3 unpatched (Minecraft, Create mod). 12 CLEAN (WireGuard-tools, Solana, git, JGit, Dask, OSRM, Buck2, DGL, Protocol Buffers, gRPC Python, Apache Beam, Apache Samza).**
**465 sites patched. 3 deferred (PostgreSQL -0001/-0005; MongoDB -0005 IndexBounds). 1 fixable-upstream (Erlang OTP — sltab patch). 1 fixable-pending (swipl-0003 attr_unify_hook). 2 not-worth-fixing. 3 unpatched (Minecraft, Create mod). 12 CLEAN (WireGuard-tools, Solana, git, JGit, Dask, OSRM, Buck2, DGL, Protocol Buffers, gRPC Python, Apache Beam, Apache Samza).**
---
@ -1326,6 +1329,29 @@ This fires on every `updateSchema()` DDL commit. Fix: change `deletes` to `HashS
and Apache Samza are CLEAN: Beam's pipeline graph uses `ImmutableSet`/`HashSet` throughout; Samza's
`topologicalSort()` uses `HashSet<JobNode> visited`.
**ScyllaDB — scylladb-0001 (MEDIUM)**
`storage_proxy::intersection()` computes replica-set intersection using `std::remove_copy_if` with an
inner `std::find` closure over the second replica list — O(|l1|×|l2|). Called twice per vnode in the
range-merge scatter/gather read path. With 256 vnodes and RF=5, each range scan accumulates 512 O(RF²)
intersection calls. Fix: pre-build `unordered_set<host_id>` for O(|l1|+|l2|). Affects the legacy
vnode path only (tablet clusters bypass via runtime guard).
**YugabyteDB — yugabyte-0001 (HIGH, 66×)**
`GetXReplStreamsForTable()` in the xCluster/CDC catalog manager iterates all M CDC streams and calls
`std::find` on the protobuf `table_id` repeated field (T entries) per stream, in a per-dropped-table
loop — O(D×M×T) cubic. At D=50, M=100, T=20: 94,750 comparisons vs 1,430 for the fix. The same
pattern appears in `AddTableToXReplStream` and `GetNonUserTablesInStream`. Fix: single pass with
`unordered_set` on the dropped-table set.
**FoundationDB — foundationdb-0001 (MEDIUM)**
`canLaunchSrc()` in `DDRelocationQueue` checks source-server load by iterating `relocation.src` (S)
servers and for each scanning `cancellableRelocations` (R entries) with `std::count` on each
relocation's source server list — O(S×R×S'). Called in the hot relocation-dispatch loop. Fix:
pre-build `unordered_map<UID, vector<int>>` from server UID to cancellable relocation indices.
**CFEngine** — **cfe-0001/0002/0003 PATCHED.** `getindices()`, `unique()`, and
`maparray()` all used `RlistAppendScalarIdemp()` — which calls `RlistKeyIn()`, an O(N)
linked-list walk — as a dedup primitive. `unique()` is a first-class CFEngine policy