Repository navigation
Faithful SlithIR: name resolution, pipeline semantics, points-to and EVM-checked analyses - #3169
Open
0xalpharush wants to merge 1274 commits into
Open
0xalpharush wants to merge 1274 commits into
0xalpharush wants to merge 1274 commits into
Conversation
The frontends no longer run ReadVar, WriteVar, FindCalls and the call classification on every node: Node.track_expression_uses marks a node, and the views are computed from its expression when first read. The function-level views are computed from the nodes' on first read too. Reading them warns (DeprecationWarning); get_summary keeps its external calls without warning. Upgrading.md lists the IR replacements. SLITHER_SHADOW=1 compares the lazy views with the eager ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uninitialized-storage walked every path of the CFG and kept its state in node.context, which was never cleared between runs. It now reports a pointer used where its SSA version may be the declaration's, with the def-use check of uninitialized-local (reaches_zero). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unused-state reads the state variables an array length is written with from constant_value.length_state_variables instead of running ExportValues itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The detector compared the SSA index of the called value with 0, and for a struct field it read the index of the reference, which numbers temporaries: a field called after another field access was missed. It also reported every state variable as the constructor receives it, even one initialized at its declaration. A called value is now uninitialized when its definition (or that of its struct, through merges and copies) is none, or the constructor's entry value of a state variable without initializer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The detector followed one path, taking the false branch of each if, so 'if (b) return; _;' was not reported. A modifier is now reported when a node ending it is reachable from its entry without passing a placeholder or a revert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'(bool ok, ) = dst.call("")' with ok never read was not reported: the
destructuring read the returned tuple. unchecked-lowlevel now also
reports a call whose success flag goes to locals that no operation reads,
following copies through the SSA def-use chains. Leaving the flag out of
the pattern is still a discard on purpose.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setter that emits its event through an internal helper was reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setter that emits its event through an internal helper was reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only expression statements of a loop body were searched, so a push in a
declaration ('S storage s = array.push();') went unseen and the loop was
reported; and any read of array.length counted as a change, so a loop
reading it in its body was not. The detector now looks for writes of the
length (push, pop), deletes of the whole array and non-view external
calls in every node.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the state the function called in the assert writes itself counted: assert(f()) with f calling a writer was missed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A function or modifier of a contract is a binding: binding.function is its declaration and binding.contract the contract it is reached in. Its calls are Call objects (slither.core.declarations.binding) with their kind (CallKind) and what they reach there: binding.calls, calls_at(node) and all_calls(), and Contract.all_calls(). Call.inline_callee is the single answer to the callee an internal or library call runs, replacing storage_callee and its inline copies. The tuple forms high_level_calls and all_high_level_calls and HighLevelCall.destination_contract are deprecated, internal_calls and library_calls are views over calls, and dispatch.resolve is private. The in-tree users of the deprecated forms are ported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tx-origin reported a condition reading tx.origin itself, unless the same condition read msg.sender anywhere. A copy of tx.origin compared with the owner was missed, and so was 'tx.origin == owner && msg.sender == x', while 'sender == tx.origin' with a copy of msg.sender was reported. Uses of tx.origin and its copies (on the SSA definitions) are now reported unless they are compared with msg.sender or a copy of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'uint8 y; y == 300' is always false and 'y != 300' always true, but tautology only decided <, >, <= and >=. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The return type was matched on its name ('[]', bytes, string), so a
struct holding bytes was taken as static. The ABI rule of the interpreter
(slither.slithir.interpreter.abi.is_dynamic) now decides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture starts anvil on a free port (boxes share ports), waits for it to answer, funds the test account with anvil_setBalance and impersonates it for unsigned transactions. CI installs Foundry for the tool tests instead of ganache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A private function or state variable of a base contract is not visible in the derived one, so a local named like it shadows nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The printer listed only the conditions reading msg.sender directly, so a check through _msgSender() did not appear. A Protected column gives Function.is_protected, which follows such checks and modifiers. The conditions are printed as written (Node.source_text), and a callee reached through several calls is listed once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A high s only matters when the contract identifies a signature by its bytes: ecrecover-malleable now reports an unbounded s only when the function or a callee writes state keyed by a value computed from s, or from what s is computed from (used[keccak256(sig)], used[r][s]), or stores one. Keys from the digest or the recovered signer (nonces, used digests, permits like Aave's) are not reported. Impact and confidence are now Medium. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
constant_functions excluded every function calling a helper with a storage parameter, because all_state_variables_written missed the writes made through it. It now attributes them to the call site (storage pointer analysis), so a function passing storage to a helper that only reads it is constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A body declared in a contract runs in every contract inheriting it. The text now keeps the binding-invariant form of what its references reach: the dispatch site of each call (dispatch = kind target from @declarer) and of each function value of a block. The builder rebuilds the sites, the comparison includes them, and the corpus round trip checks that the rebuilt units pass check_dispatch. This is what a body shared by several bindings needs to round-trip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--warn-unused-ignores crashed with KeyError: 'id' once results became deduplicated across compilation units (found triaging crytic#3137). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but function-id printed the contracts of every unit, so a target with several units listed each contract once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but modifiers covered every unit, so a target with several units printed each one once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but not-pausable covered every unit, so a target with several units printed each one once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but variable-order covered every unit, so a target with several units printed each one once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but constructor-calls covered every unit, so a target with several units printed each one once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slither runs a printer once per compilation unit, but require covered every unit, so a target with several units printed each one once per unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ding The interpreter runs an internal or modifier call, and reads a function value, as the binding its frame runs reaches it (Call.target, and binding.function_value for the dispatch site of a function value) instead of taking the IR's target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The call graph printer, echidna's constant functions, the upgradeability initializer check, the reentrancy custom calls and self calls, ecrecover's wrappers and the binding classes read ir.function or ir.called_function, which a body shared across contracts resolves in its declarer. They now take Call.target in the binding they walk. The IR text printer and compare show the modifier a statement runs in the binding (modifier_of), and the taint oracle compares the owners of labels by declaration. The lookups of events, `using for` and `Contract.x` state variables in the conversion take the declaring contract: names resolve where a body is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
keccak256("...") in a function body now folds to a bytes32 Constant
(crytic#1512), which the slot analyses read only as integers: such a slot became
unknown and every storage read depended on its writes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slither.core.expressions becomes slither.hir, the typed high-level IR the Solidity, Yul and Vyper parsers build and the lowering reads. slither/core/expressions.py re-exports it: the old package and each of its submodules are the new modules, so code outside Slither keeps working. Slither itself imports slither.hir, and the import allow-list test moves to tests/unit/hir with the new path. Upgrading.md documents the move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The allow-list becomes a freeze: the importers of the expression tree are grouped by role (producers, synthesized code, holders, lowering, pre-IR constants, syntax detectors), and a module outside them fails the test. Slither must import slither.hir rather than its former location, and the former location must be the same modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An inherited function or modifier is no longer re-parsed per contract. Each declaration is parsed, lowered and put in SSA form once; a contract lists a binding of it (slither.core.declarations.bound) that shares the body and keeps its own contract, calls, caches, SSA links, context, overrides and reachability. - SSA is built unit-wide: a declaration sees the state variables of every contract running it, a call defines what any binding's callee may write, and state versions are numbered across the unit. - Bindings are linked per contract, also when SSA is read as written. - this.x() reaches a public variable getter overriding x (Call.target). - References through dispatch sites are bound in inheriting contracts. - The IR text frontend binds inherited Solidity functions too. - dispatch_check no longer compares copies; the id deduplication of inherited elements is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A node names its declaration, whose contract is the declarer: the arbitrary-send-erc20 and weak-prng detectors pass the binding's contract instead, as the per-contract copies did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BinaryOperation.type and UnaryOperation.type held the operator. The operator is now .operator; .type is the type of the result, solc's typeString or Vyper's annotation (crytic#1701). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AssignmentOperation.type held the operator, like BinaryOperation and UnaryOperation did. The operator is now .operator; .type is the type of the result, solc's typeString or Vyper's annotation of the target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The accesses of a shared node are filtered to the state variables of the binding's contract; a library declares none and runs on the storage of its callers, so its bindings are not filtered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
returned_values(binding) gives the one value each return value is on every path that returns (a Solidity variable, a parameter, or None), through copies, address casts, merges, tuples and internal and library calls resolved in the binding's contract. returns_source(binding, source) lists the returns that are source; exact=False uses the data dependency instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A load of a memory location took the references stored at every location that may alias it, including those above and below it: reading a[i] also returned the strings stored in a[i].symbol. In a loop that stores strings into the fields of a struct element, the element then pointed to the strings, and the field-by-field copy into them nested the struct's fields under each string field up to the path depth: 11631 paths in UiPoolDataProviderV3.getReservesData, 27 s of data dependency on Aave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0xalpharush
marked this pull request as ready for review
December 1, 2026 23:03
0xalpharush
requested review from
bohendo,
elopez and
smonicas
as code owners
December 1, 2026 23:03
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The goal is a SlithIR that is faithful to the semantics of the code that runs, checked against the EVM, with analyses that are more precise than master's. Roughly:
is_compact_astchecks go from 103 to 8); a scope-graph name resolver that binds every identifier by declaration (checked against solc'sreferencedDeclarationon solc's own test suite and every e2e AST), replacingfind_variableand import renaming; Yul references bound throughexternalReferences, with one scope per Yul block; call options and member types decided from the AST rather than by name; a Vyper 0.4/0.5 frontend (Vyper 0.3.x is no longer supported).?:,&&and||lowered into the CFG with exact short-circuit semantics; reverts end their path andbreak/continueare linked while parsing; operand evaluation order and other semantics follow the unit's pipeline (legacy or via-IR,compilation_unit.via_ir); literals, Yul words and conversions typed as solc types them; Cooper-Harvey-Kennedy dominators; pruned SSA with no phi operations (merges are block parameters, call effects are operation results); an MLIR-like text format that--print slithiremits and Slither loads back.missing-zero-checkandecrecover.Functionper declaration. An inherited function is a binding (the declaration run in a contract) that shares its declaration's nodes, IR and SSA; the per-contract copies are gone. Calls resolve per binding through dispatch sites (binding.calls,Call.target), and the SSA is linked per binding (SSALinks).node.functionis the declaration (Upgrading.md "One body per declaration"). On Aave this cut wall time by about 7.5% and peak memory by 25%.slither/hir/(slotted classes, typed fields, typedCallOptions, a separateVyperCall, exhaustivematchdispatch);slither.core.expressionsre-exports it. Only the frontends, IR lowering, pre-IR constants and three syntax detectors import it, enforced by a test; every detector, printer, tool and analysis reads IR. Constants are evaluated with Solidity's rational-literal semantics (constant_evaluation.py, checked against solc on generated expressions), and each literal-only subexpression lowers to one constant that keeps its source.tests/unit/analyses/ui); every detector re-run on IR loaded back from text gives the same findings.How to review
The branch is a sequence of topic merges, each with its own commits. Reading merge by merge (
git log --first-parent) is easier than the full diff:API changes for scripts and plugins (phi operations,
HighLevelCall.function,internal_calls, removed parser helpers) are listed with their replacements indocs/src/Upgrading.md.Verification
pytest tests/unit tests/e2e(with the Vyper 0.5 tests): 21364 passed, 12 skipped, 1 strict xfail (the rebuilt-IR test cannot see state initializers foruninitialized-fptr-cst). ruff andty check(strict) pass.Differential fuzzing, 300 generated programs per configuration with SSA: no mismatches on solc 0.4.26, 0.6.12, 0.8.28 legacy and via-IR, and Vyper 0.4.3 and 0.5.
Interpreter vs revm on solc 0.8.39's semanticTests, legacy and via-IR (3,480 cases): 2,976 pass, 24 diverge, 0 crash, 289 unsupported, 36 format gaps, 155 skipped. The divergences: 10 where pyrevm 0.3.7 disagrees with solc's expected output (selfdestruct,
block.gaslimit) and the interpreter matches it; 4 needing legacy codegen's dirty bits or gas; 2 underrevertStrings: debug; 8 fixed on the tip since the run (4 on rational constants, 4 onsuperresolving to an unimplemented function). Unsupported is mostly dirty values in assembly (78), internal function pointers in storage (68) and memory addresses leaving assembly (24). Vyper 0.4.3 functional tests: 772 pass, 0 diverge, 0 crash, 6 unsupported, 279 skipped.IR structure check (SSA, dominators, text round trip) on solc's semantic test suite: 3334 cases, 0 violations.
Soundness oracles, 300 programs per configuration: value analysis, taint and points-to report no violations. Reentrancy reports 2 violations on 0.6.12, both a check-effects-interactions pattern split around the call, which is not reported by design.
Detector output is byte-identical across
PYTHONHASHSEEDvalues (tests/e2e/test_determinism.py; also checked on Aave with 492 contracts).SAILFISH: the paper's figures, its artifact and the solar test cases are e2e detector tests. On the hand-labelled SAILFISH set (701 of 750 contracts re-fetched from Sourcify, 669 compile on the branch, 648 on master), scored against the labels as true positives / false positives / false negatives:
| | reentrancy | TOD |
|---|---|---|
| master | 13 / 73 / 13 | not run |
| branch | 13 / 9 / 13 | 38 / 54 / 57 |
| branch,
--reentrancy-untrusted-fixed-callees| 13 / 37 / 13 | 38 / 58 / 57 |No true positive is lost. Trusting fixed callees by default removes 28 reentrancy false positives, all calls to addresses set in the constructor or by the owner. The 9 left are owner checks written as
ifin a modifier (2), an oraclize callback, one likely mislabel and 5 not yet triaged; an earlier reading of the false negatives found most of them mislabelled. The TOD false positives are mostly per-key writes, fresh indexes, non-payable functions, SafeMath reverts and mutually exclusive phases.Master (97c1d10) vs this branch (9f62841; the Aave rows at a90fb63, after the points-to fix below), all detectors, same builds and machine, one Slither process at a time, two runs each (the runs agree within 1%):
The default Aave build took 46 s before a90fb63: a memory load returned the references stored in the loaded value's fields, so one function (
UiPoolDataProviderV3.getReservesData) built exponentially many access paths. With the fix, detector output is unchanged on all six builds.Master cannot generate IR for 38 functions on OpenZeppelin and 3 on Aave; the branch generates IR for every function. The differences from master were classified at 792caf5, and each later merge was gated against its parent with every changed finding classified. Removed findings are false positives, for example:
Added findings are true positives by the detector's definition, mostly code master does not model (Yul
timestamp(), time packed into OpenZeppelinTime.Delay, interest accrual in Aave, unused imports), or come from the new detectors (transaction-order-dependence, read-only reentrancy).Code size
Python lines in
slither/: 71,097 on master, 119,056 here (+47,959). Tests: 10,863 → 22,103 lines of Python, plus test data and snapshots.slithir/interpreteris_dynamic)dataflow,reentrancy,storage_pointer,data_dependency, access paths, pass manager)slithir/textsolc_parsing/ast,resolution,yul,vyper_parsing, minus the old declarations code)slithir/utils,slithir,visitors/slithir)utilscore/declarations,hirreplacingcore/expressions)CallAPI; the moved expression tree is the same sizeUser-visible changes
evaluation-orderandtransaction-order-dependence.unused-importis registered again.--reentrancy-untrusted-fixed-callees(orSlither(reentrancy_untrusted_fixed_callees=True)) restores view-only trust.read-only-reentrancyreports a view that can observe state half-updated around a call, unless the view itself checks the lock.missing-zero-checkdecides by the value reaching each sink (state writes, including contract-typed ones, ETH transfers, low-level calls and internal helpers that pass the parameter on) and checks base-contract constructors. A check or call on the address that runs on every path after the sink counts, since a revert undoes the write; a parameter passed through helpers is reported once, at the function that receives it.ecrecoverproves the signer non-zero and checks replay protection, including at the callers of internal verifiers (supersedes Detector for ecrecover return value validation and use of nonces #2015).timestampandincorrect-equalityjudge comparisons where the tainted value enters: a comparison in a helper is reported once with the call sites that pass the value. Range and overflow checks, and the results of external calls, are not reported.is_protectedasks whether a caller other than a privileged one can complete the function.assemblyno longer reports Yul functions separately from the function that contains them.locked-etherno longer reports a contract whose only payable function is its constructor.--vyperselects the compiler.--print slithir/slithir-ssaprint the new text format;slithir-textis removed.--solc-ast, which did not work, is removed.os._exitafter flushing its output, skipping the interpreter's heap teardown;atexithandlers registered by plugins do not run.Open items
Known limits:
_reserves[asset]and update reserve state after the call; those addresses are written only by the pool configurator, which the trust default does not cover (it trusts state variables set in the constructor or by a restricted setter, not mapping entries). The other 11 are SafeERC20 calls to a token parameter or a stored token, true under the analysis' model of an untrusted token. With tests included the count is 252 against 10, mostly Foundrystdstoreloops and invariant handlers whose callees are arbitrary.missing-zero-checkreports parameters that are zero by design (renounce, disable).mstore(solady's SafeTransferLib) are not decoded for reentrancy benign enhancements #1566.consolecontract #767, Most derived contracts: Filter Test/Mock contracts #770) waits on crytic-compile exposing that classification (add option to skip compiling Foundry scripts and tests crytic-compile#435).Issues
Issues fixed (148)
Each has a regression test on this branch.
Closes #1927, closes #1775, closes #1800, closes #1566, closes #933, closes #690, closes #1482, closes #2586, closes #1805, closes #1811, closes #1333, closes #1652, closes #3137, closes #834, closes #1954, closes #1138, closes #2300, closes #2497, closes #864, closes #1003, closes #2777, closes #1950, closes #2563, closes #2501, closes #3163, closes #3160, closes #3103, closes #3082, closes #3064, closes #3054, closes #2954, closes #2839, closes #2838, closes #2837, closes #2836, closes #2810, closes #2796, closes #2757, closes #2752, closes #2750, closes #2749, closes #2721, closes #2712, closes #2674, closes #2659, closes #2650, closes #2647, closes #2646, closes #2645, closes #2644, closes #2643, closes #2618, closes #2598, closes #2562, closes #2544, closes #2538, closes #2535, closes #2528, closes #2527, closes #2509, closes #2425, closes #2379, closes #2378, closes #2375, closes #2369, closes #2291, closes #2282, closes #2257, closes #2241, closes #2217, closes #2214, closes #2209, closes #2204, closes #2202, closes #2195, closes #2194, closes #2193, closes #2192, closes #2139, closes #2130, closes #2129, closes #2128, closes #2100, closes #2095, closes #2089, closes #2059, closes #2050, closes #2046, closes #2037, closes #2016, closes #2011, closes #1987, closes #1985, closes #1966, closes #1931, closes #1923, closes #1910, closes #1851, closes #1829, closes #1827, closes #1822, closes #1810, closes #1807, closes #1798, closes #1797, closes #1794, closes #1751, closes #1742, closes #1708, closes #1688, closes #1683, closes #1631, closes #1622, closes #1541, closes #1537, closes #1469, closes #1436, closes #1331, closes #1199, closes #1078, closes #1056, closes #981, closes #934, closes #891, closes #884, closes #883, closes #735, closes #583, closes #582, closes #552, closes #543, closes #515, closes #473, closes #468, closes #434, closes #365, closes #1512, closes #1701, closes #2755, closes #2233, closes #941, closes #865, closes #1916, closes #2780, closes #3041, closes #1338, closes #1646, closes #465
return/revert/stop/invalid/selfdestructend the CFG path (tests/unit/solc_parsing/yul/test_halting_builtins.py)_tokens[i](57d40afc0, detector test)token_balance_delta.sol)[token call]/token_callin JSONDataLocationenum (string-valued;set_location(str)deprecated)DataLocation,Visibility,ContractKindenumsVariable.is_dynamicContract.using_for_directiveswith source mappingstests/unit/core/test_filtering.py)/* slither-disable-* */block comments (test_filtering.py)--diff REFkeeps results on changed lines (test_filtering.py)test_filtering.py)--detect a,bsorted by impact; every e2e result checked filterableSolcOutputplatform (slither/solc_parsing/compiler_output.py)--combined-json/ standard JSON output as targetsslither-read-storage out.jsonon standard JSONecrecover-malleablewhere signature bytes key a used-set (e2e 0.8.20, 0.4.25)SolidityCallout ofinternal_calls, ternary lowering, filtering stage, rename, flows, data flow graph, Call API--solc-astremoved; JSON targets load throughSolcOutputtests/unit/detectors/test_detector_precision.py,tests/unit/solc_parsing/resolution/test_binding.pytests/e2e/vyper_parsing/test_data/modules/ownable.vytests/unit/slithir/test_data/ir/calls.soltests/unit/solc_parsing/resolution/test_binding.pytest_using_for_merges_bases_3082tests/unit/utils/test_data/signature_types.soltests/e2e/detectors/test_data/incorrect-exp/0.8.28/incorrect_exp_yul.sol,incorrect-shift/0.8.28/shift_yul_operands.soltests/unit/solc_parsing/resolution/test_binding.py(issues/i2954)tests/unit/slithir/test_data/ir/calls.soltests/unit/solc_parsing/resolution/test_data/cases/qualified_modifier.soltests/unit/solc_parsing/yul/test_data/external_references.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.sol,tests/unit/slithir/interpreter/test_data/divergences/tuple_component_order.soltests/e2e/vyper_parsing/test_data/builtins.vytests/unit/solc_parsing/resolution/test_binding.pytest_bases_bind_by_id_2757tests/unit/tools/test_flattening_patches.pytests/unit/tools/test_flattening_patches.pytests/unit/tools/test_flattening_patches.pytests/unit/slithir/test_data/bytes_constants.soltests/unit/detectors/test_detector_precision.pytests/tools/mutator/test_mutator.pytests/e2e/detectors/test_data/constable-states/0.8.0/storage_pointer_library.soltests/unit/solc_parsing/resolution/test_binding.py(issues/i2650)tests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/interpreter/test_data/divergences/large_literal_operands.soltests/unit/slithir/test_data/ir/builtin_types.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/e2e/detectors/test_data/reentrancy-eth/0.7.6/issue_2618_mutex.soltests/unit/analyses/ui/storage_pointer/libraries.soltests/unit/solc_parsing/resolution/test_binding.py(issues/i2562)tests/e2e/detectors/test_data/reentrancy-no-eth/0.8.28/issue_2544_*.soltests/unit/core/test_literal.pytests/e2e/detectors/test_data/unused-import/0.8.16/(detector re-registered)tests/e2e/vyper_parsing/(Vyper 0.4.3)tests/unit/core/test_function_type.pytests/unit/slithir/test_data/ir/ssa_control_flow.sol(test_issue_2509_…)tests/unit/detectors/test_detector_precision.pytests/unit/detectors/test_vyper_regressions.pytests/e2e/vyper_parsing/test_data/calls.vytests/e2e/vyper_parsing/test_data/calls.vytests/unit/slithir/interpreter/test_data/divergences/yul_sibling_block_functions.soltests/e2e/detectors/test_data/unused-state/0.8.28/calldata_slice_bounds.soltests/e2e/detectors/test_data/suicidal/0.8.28/suicidal_access_control.soltests/unit/analyses/dataflow/test_pdg.pytests/unit/analyses/ui/storage_pointer/libraries.soltests/unit/solc_parsing/resolution/test_binding.pytests/e2e/detectors/test_data/arbitrary-send-eth/0.8.28/arbitrary_send_eth_sender_argument.sol(part 2 was answered as benign)tests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/solc_parsing/resolution/test_binding.py(issues/i2204)tests/unit/slithir/test_data/ir/issue_regressions.soltests/e2e/vyper_parsing/test_data/issue_regressions.vytests/e2e/vyper_parsing/test_data/issue_regressions.vytests/e2e/vyper_parsing/test_data/issue_regressions.vytests/e2e/vyper_parsing/test_data/issue_regressions.vytests/e2e/detectors/test_data/unused-return/0.8.15/unused_return_destructuring.soltests/unit/tools/test_flattening_patches.pytests/unit/slithir/test_data/ir/builtin_types.soltests/unit/slithir/interpreter/test_data/divergences/named_constructor_arguments.sol,named_args_order.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/tools/test_erc_conformance_getter.pytests/unit/slithir/test_data/ir/using_for_array_length.soltests/unit/slithir/test_data/ir/control_flow.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/interpreter/test_data/divergences/named_value_and_gas.soltests/unit/core/test_data/constant_folding/constant_folding_conversions.soltests/unit/slithir/test_data/ir/literal_types.soltests/unit/test_main.pytests/e2e/detectors/test_data/cache-array-length/0.8.17/storage_alias.soltests/unit/solc_parsing/resolution/test_binding.pytests/unit/slithir/test_data/ir/contract_type_members.soltests/unit/slithir/test_data/ir/literal_types.soltests/unit/slithir/interpreter/test_data/divergences/named_value_and_gas.soltests/unit/slithir/test_data/ir/builtin_types.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/builtin_types.soltests/e2e/detectors/test_data/reentrancy-eth/0.8.28/issue_1807_privileged_caller.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/detectors/test_scope.pytests/unit/analyses/ui/data_dependency/interprocedural.soltests/unit/slithir/test_data/ir/cfg_terminators.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_ssa_call_effects.pytests/unit/slithir/test_data/ir/control_flow.sol,tests/unit/slithir/interpreter/test_data/divergences/empty_if_branch.soltests/unit/solc_parsing/resolution/test_data/cases/same_names.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/test_data/ir/issue_regressions.soltests/unit/slithir/interpreter/test_data/divergences/calldata_offset.soltests/unit/analyses/ui/data_dependency/lengths_and_literals.soltests/e2e/printers/test_printers.pytests/e2e/printers/test_printers.pytests/e2e/printers/test_printers.pytests/unit/slithir/interpreter/test_data/divergences/calldata_offset.soltests/e2e/detectors/test_data/missing-zero-check/0.7.6/base_constructor.soltests/e2e/detectors/test_data/reentrancy-eth/0.8.28/issue_934_cross_contract_state.soltests/e2e/detectors/test_data/dead-code/0.8.0/function_values.soltests/unit/detectors/test_detector_precision.pytests/e2e/detectors/test_data/external-function/0.6.8/external_function_abstract.soltests/e2e/detectors/test_data/reentrancy-benign/0.8.28/benign_locked.soltests/unit/slithir/test_data/ir/cfg_terminators.soltests/unit/slithir/test_data/ir/yul_words.soltests/unit/slithir/test_ir_typing.py(IndexRange)tests/unit/slithir/test_data/ir/yul_words.soltests/unit/analyses/storage_pointer/test_storage_pointer.pytests/unit/slithir/test_data/ir/ssa_control_flow.soltests/unit/slithir/test_data/ir/ssa_control_flow.soltests/unit/slithir/test_ssa_call_effects.pytests/e2e/detectors/test_data/uninitialized-local/0.8.0/uninitialized_local_variable_fields.sol; sub-issues #1436, #884 fixed here, #778 on masterkeccak256of a literal folds to a bytes32 constant that keeps its preimage (Constant.hash_preimage), through SSA and the text round trip (tests/unit/slithir/test_keccak_folding.py)BinaryOperation/UnaryOperation/AssignmentOperation:.operatoris the operator,.typethe Solidity result type (tests/unit/hir/test_operations.py)returns_source(binding, msg_sender)lists the return values that aremsg.senderthrough locals, casts, merges, tuples and internal and library calls, resolved per binding (an ERC2771_msgSenderoverride is not);exact=Falsegives data dependency (tests/unit/analyses/test_returned_values.py)--printer-filter REGEXon table rows, text and JSON (pyr/detector-cleanup tests)--printer-sort(pyr/detector-cleanup tests)natspecprinter; the typed AST keeps event and error documentation (pyr/detector-cleanup tests)memory-safe-comment(pyr/detector-cleanup tests)if(pyr/detector-cleanup tests)Issues fixed without a regression test (16)
Verified by running the issue's reproducer on master and on this branch, or by inspection where noted. These are not auto-closed.
SolidityType,AnyExpression,YulStatement) matched exhaustively withassert_neverin 10 modules;tystrict at 0 diagnostics in CIimport {X as Y}base: master AssertionError; tip inherits the aliasTRY -> [2,4,6,8]; tip[2,4,6]this.balancecall.library L.g(fe14188)Interface.test.selectorlowered to a constantmintcallingmintFresh(msg.sender, a): master protected, tip not (5c1d9b1)x = arr.push(1)(solc < 0.6): no dangling temporaryslither/solc_parsing/astconverts both JSON flavors; parser reads no raw JSONall_internal_calls()identical under 5 hash seedsmake typecheck(ty, strict) required in CIarr.push().push(): master fails; tip lowers ituint256, tipint256&&/ `Issues partly fixed (3)
evaluation-orderdetector. Remaining: the other listed changes (state-variable initialization order, modifier locals, …).explain_tainted), so a reviewer can dismiss it from the output. Remaining: whether to keep or retune the detector's heuristics.Not addressed (1)
🤖 Generated with Claude Code