Renumbering fixes (collisions with pre-existing IDs): - spring-0001-annotations-scanner → spring-0007 (spring-0001 was already assigned) - hibernate-0001-class-hierarchy-helper → hibernate-validator-0003 (wrong ecosystem/numbering) - django-0006-migrations-flatten-bases → django-0007 (django-0006 was already assigned) New diamond defects from agents that rate-limited before committing: - micronaut-0007: SuperclassAwareTypeVisitor.getInterfaces O(2^D) (new site) - quarkus-0005: ConfigMappingUtils.collectInterfacesRec O(2^D) (new site) - weld-0005: Services.identifyServiceInterfaces O(2^D) (new site) - typescript-0005: hasBaseType O(2^D) diamond interface hierarchy - rails-0019: Digestor#dependency_digest Array#include? O(N²) cycle detection CLEAN: go, rustc (diamond recursion patterns absent)
1.4 KiB
1.4 KiB
rustc — CWE-407 Diamond Recursion Scan — CLEAN
Scanned: compiler/rustc_trait_selection/src/, compiler/rustc_infer/src/traits/, compiler/rustc_middle/src/ty/
(Note: sparse clone — only rustc_infer, rustc_middle, rustc_trait_selection crates present.
rustc_type_ir contains the Elaborator struct; it re-exports into scope via pub use rustc_middle::ty::elaborate::*.)
Functions Examined
| Function | File | Guard | Verdict |
|---|---|---|---|
transitive_bounds_that_define_assoc_item |
rustc_infer/traits/util.rs | if !seen.insert(...) { continue; } |
CLEAN |
| vtable DFS loop | rustc_trait_selection/traits/vtable.rs | visited.insert(super_trait) as guard in .find() |
CLEAN |
auto_trait predicate loop |
rustc_trait_selection/traits/auto_trait.rs | if !already_visited.insert(pred) |
CLEAN |
seen_projection_preds |
rustc_trait_selection/traits/util.rs | if !seen_projection_preds.insert(...) |
CLEAN |
checked_wf_args |
rustc_trait_selection/src/traits/query/... | if !checked_wf_args.insert(arg) |
CLEAN |
Note
The elaborate iterator in rustc_type_ir::elaborate (not cloned) is called as a BFS/worklist
iterator, not as a recursive function. The sparse-clone boundary stops here; the pattern as used
through all call sites in the 3 available crates is iterator-based with deduplication guards.
Scan verdict: CLEAN — no CWE-407 diamond recursion defects found in cloned crates.