[pitboss/grind] cleanup session-0020 (20260521T201327Z-3848)

This commit is contained in:
pitboss 2026-05-21 20:38:05 -05:00
parent dd9da4eef5
commit de24d25e4f
6 changed files with 54 additions and 68 deletions

View file

@ -283,9 +283,6 @@ pub mod index {
/// footprint.
pub const SCHEMA_VERSION: &str = "4";
// TODO: ADD CLEANS FOR EACH TABLE BASED ON PROJECT WHICH RUNS ON CLEAN
// TODO: ADD DROP AND GIVE A CLI PARAMETER FOR DROP
/// A single issue row, ready for insertion.
#[derive(Debug, Clone)]
pub struct IssueRow<'a> {

View file

@ -8,7 +8,6 @@
use crate::labels::Cap;
use crate::ssa::ir::{SsaBody, Terminator};
use crate::summary::ssa_summary::PathFactReturnEntry;
use crate::symbol::FuncKey;
use crate::taint::domain::{TaintOrigin, VarTaint};
use petgraph::graph::NodeIndex;
@ -32,11 +31,6 @@ pub(crate) struct InlineResult {
/// provably narrows it (e.g. a `sanitize_path` early-returning on
/// `s.contains("..")`).
pub(super) return_path_fact: crate::abstract_interp::PathFact,
/// Per-return-path decomposition of `return_path_fact`. Non-empty
/// when the callee has ≥2 return blocks with different predicate
/// gates.
#[allow(dead_code)]
pub(super) return_path_facts: SmallVec<[PathFactReturnEntry; 2]>,
}
/// Structural (callsite-agnostic) summary of an inline-analyzed
@ -71,9 +65,6 @@ pub(crate) struct ReturnShape {
/// state under Top-seeded Params. Describes the callee's intrinsic
/// narrowing.
pub(super) return_path_fact: crate::abstract_interp::PathFact,
/// Per-return-path decomposition of the return value. Populated
/// when the callee has ≥2 return blocks with different predicates.
pub(super) return_path_facts: SmallVec<[PathFactReturnEntry; 2]>,
}
impl CachedInlineShape {

View file

@ -3114,20 +3114,13 @@ fn extract_inline_return_taint(
let return_path_fact =
return_path_fact_acc.unwrap_or_else(crate::abstract_interp::PathFact::top);
// Only keep per-return-path entries when at least one entry carries
// meaningful signal (non-Top path_fact or a variant_inner_fact). A
// list of all-Top entries adds bytes on disk without helping a
// caller pick a path. Additionally require ≥2 distinct entries ,
// a single-entry list is no finer than the joined `return_path_fact`.
let return_path_facts = if per_return_path_entries.len() >= 2
// Surface per-return-path signal in the gate below: at least two
// distinct entries with non-Top path_fact or a variant_inner_fact.
// Single-entry lists are no finer than the joined `return_path_fact`.
let has_per_return_path_signal = per_return_path_entries.len() >= 2
&& per_return_path_entries
.iter()
.any(|e| !e.path_fact.is_top() || e.variant_inner_fact.is_some())
{
per_return_path_entries
} else {
SmallVec::new()
};
.any(|e| !e.path_fact.is_top() || e.variant_inner_fact.is_some());
// Even when the callee produces no return taint and no param/receiver
// provenance, a non-Top PathFact on the return is still meaningful
@ -3138,7 +3131,7 @@ fn extract_inline_return_taint(
&& !final_receiver
&& final_internal.is_empty()
&& return_path_fact.is_top()
&& return_path_facts.is_empty()
&& !has_per_return_path_signal
{
return CachedInlineShape(None);
}
@ -3150,7 +3143,6 @@ fn extract_inline_return_taint(
receiver_provenance: final_receiver,
uses_summary: true, // inline analysis is a form of summary
return_path_fact,
return_path_facts,
}))
}
@ -3325,7 +3317,6 @@ fn apply_cached_shape(
return InlineResult {
return_taint: None,
return_path_fact: crate::abstract_interp::PathFact::top(),
return_path_facts: SmallVec::new(),
};
};
@ -3407,7 +3398,6 @@ fn apply_cached_shape(
InlineResult {
return_taint,
return_path_fact: ret.return_path_fact.clone(),
return_path_facts: ret.return_path_facts.clone(),
}
}

View file

@ -263,7 +263,6 @@ mod inline_cache_epoch_tests {
receiver_provenance: false,
uses_summary: false,
return_path_fact: crate::abstract_interp::PathFact::top(),
return_path_facts: SmallVec::new(),
}))
}
@ -337,7 +336,6 @@ mod inline_cache_epoch_tests {
receiver_provenance: false,
uses_summary: true,
return_path_fact: crate::abstract_interp::PathFact::top(),
return_path_facts: SmallVec::new(),
}));
// Caller A: argument carries an env-source origin.
@ -404,7 +402,6 @@ mod inline_cache_epoch_tests {
receiver_provenance: false,
uses_summary: true,
return_path_fact: crate::abstract_interp::PathFact::top(),
return_path_facts: SmallVec::new(),
}));
let state = SsaTaintState::initial();