Skip to content

Backport SOL-2025-1 through SOL-2026-3 fixes to release_0.8.31#135

Merged
CodeNinjaEvan merged 17 commits into
tronprotocol:release_0.8.31from
yanghang8612:backport/sol-2025-1-to-sol-2026-3
Jul 16, 2026
Merged

Backport SOL-2025-1 through SOL-2026-3 fixes to release_0.8.31#135
CodeNinjaEvan merged 17 commits into
tronprotocol:release_0.8.31from
yanghang8612:backport/sol-2025-1-to-sol-2026-3

Conversation

@yanghang8612

Copy link
Copy Markdown

Summary

Backports the upstream fixes corresponding to SOL-2025-1 through SOL-2026-3 to release_0.8.31.

  • fixes storage array cleanup/copy operations at the 2^256 storage boundary in both the legacy and via-IR pipelines
  • separates persistent and transient storage zeroing helpers to prevent generated-function name collisions
  • replaces recursive-cycle handling in the Yul call graph with Tarjan SCC analysis, including intersecting-cycle cases
  • prevents storage-layout diagnostics from mutating the linearized base-contract order
  • includes upstream regression coverage and the compatibility adjustments needed by TRON 0.8.31

Validation

  • full Release build passed
  • all 133 changed semantic tests passed in unoptimized and optimized modes (266/266 total)
  • targeted storage-boundary, transient-storage, and inheritance regressions passed in both modes
  • relevant non-semantic/unit suites passed (76 tests), plus Solidity optimizer tests (23/23)
  • Tarjan SCC behavior passed a 10,000-case randomized graph property check
  • command-line regression tests passed
  • gas-test comparison introduced no new failures relative to the release_0.8.31 baseline

Semantic execution used a local test-only EVMC shim for TRON's no-token CALLTOKENID/CALLTOKENVALUE behavior; the shim is not included in this branch.

Scope

This PR contains only the security backports and their tests. Unrelated workflow edits are intentionally excluded.

r0qs and others added 17 commits July 16, 2026 16:18
…and copy)

Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
Co-authored-by: clonker <1685266+clonker@users.noreply.github.com>
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
…cy and via-ir on deletion, partial assigments and copy

Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
Use Tarjan's strongly-connected-components algorithm: a function is recursive iff it lies
in a non-trivial SCC or has a self-edge.

Also add intersection recursive cycles regression test to function specializer tests.
These are tests to demonstrate incorrect processing of inheritance
hierarchy in the presence of custom storage layout close to the storage
end.
When the compiler emits a warning about storage base location being
too close to storage end, it calls a helper function to determine the
last storage variable. This helper function previously unintentionally
reversed the linearized based contracts annotation. The function only
needs to take reversed **view**. It should not modify the underlying
data.
@github-actions

Copy link
Copy Markdown

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@yanghang8612
yanghang8612 marked this pull request as ready for review July 16, 2026 09:40
@CodeNinjaEvan
CodeNinjaEvan merged commit 8b01632 into tronprotocol:release_0.8.31 Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants