B&W print-friendly diagrams + tinkerpop-0001 + wave-3 proof sections. Squash of 94 local commits onto remote master.
2.2 KiB
2.2 KiB
| id | priority | status | created |
|---|---|---|---|
| scan-verilator | high | unscanned | 2026-03-23 |
Target
Repo: https://github.com/verilator/verilator
Language: C++
Why: Used by Google and lowRISC for RISC-V chip verification — SCC/DFS over large RTL netlists during elaboration; linear visited-set scans scale poorly with design size.
Scan command
# Shallow clone
git clone --depth 1 https://github.com/verilator/verilator /tmp/verilator
# Submit to unsandbox
cat > /tmp/scan-verilator.sh << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
GRAPH_KW="tarjan|strongly.connected|dfs|scc|topolog|topo.sort|cycle|reachab|postorder|dominator|liveness|digraph|shortest.path|path.find"
MEM="std::find|\.count\(|vector.*find|find.*begin.*end|push_back.*visited|visited\.push_back"
find /tmp/verilator/src -name "*.cpp" -o -name "*.h" | sort | while read f; do
graph_lines=$(grep -inE "$GRAPH_KW" "$f" 2>/dev/null | cut -d: -f1 | head -5 || true)
[ -z "$graph_lines" ] && continue
while IFS= read -r lineno; do
s=$(( lineno > 20 ? lineno - 20 : 1 )); e=$(( lineno + 20 ))
hit=$(sed -n "${s},${e}p" "$f" 2>/dev/null | grep -iE "$MEM" | head -1 | sed 's/^\s*//' || true)
[ -n "$hit" ] && echo "CANDIDATE\t${f}:${lineno}\t${hit}"
done <<< "$graph_lines"
done
EOF
export UNSANDBOX_PUBLIC_KEY=unsb-pk-russ-test-isth-best
export UNSANDBOX_SECRET_KEY=unsb-sk-rk46c-3zvpg-zjf6z-hjrge
~/git/un-inception/build/un /tmp/scan-verilator.sh
Key files to check
src/V3Graph.cpp— Core graph data structure and traversalsrc/V3GraphAlg.cpp— Graph algorithms including SCCsrc/V3GraphPathChecker.cpp— Path existence checking in the elaboration graphsrc/V3Order.cpp— Ordering/scheduling pass; topological sort
Expected pattern
std::find(visited.begin(), visited.end(), vertex) or visited.count(vertex) where visited is a std::vector inside V3GraphAlg SCC or DFS traversal — should be std::unordered_set for O(1) lookup.
Acceptance criteria
- Scan run and results saved to
tools/scan-results/verilator.txt - All CANDIDATE hits triaged (confirmed defect or false positive)
- If confirmed: defect ticket created in
tools/tickets/defects/