Repository navigation
tests: add tests for recursive functions that require spills - #715
Conversation
🧪 Integration tests — standard · PR vs
|
| Suite | New failures | Size Δ | Gas Δ | Report |
|---|---|---|---|---|
| solx-tester | ✅ 0 | solx-tester-report.xlsx ↓ | ||
| Foundry · 26 proj | ✅ 0 (414 pre-existing) | ⚪ jitter 29 of 3,150, median <0.1% (not gated) | foundry-report.xlsx ↓ | |
| Hardhat · 3 proj | ✅ 0 | ⚪ not collected | ⚪ not collected | hardhat-report.xlsx ↓ |
solx-tester — largest size changes:
tests/solidity/simple/mlir/recursive_fnptr_dispatch.sol::default[EVMLA M3B3 0.8.37, deploy] 1,102 → 1,119 B (+1.5%)tests/solidity/simple/mlir/recursive_fnptr_dispatch.sol::default[EVMLA M3B3 0.8.37, runtime] 1,075 → 1,092 B (+1.6%)solidity/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory_complex.sol[EVMLA MzB3 0.8.37, deploy] 1,416 → 1,428 B (+0.8%)tests/solidity/simple/mlir/recursive_struct_mutual.sol::default[EVMLA MzB3 0.8.37, deploy] 529 → 541 B (+2.3%)tests/solidity/simple/mlir/recursive_struct_mutual.sol::default[EVMLA MzB3 0.8.37, runtime] 502 → 514 B (+2.4%)- +119 more — see solx-tester-report.xlsx
solx-tester — largest gas changes:
tests/solidity/simple/recursion/fibonacci.sol::sixteenth[fib:1][EVMLA M3B3 0.8.37] 249,200 → 253,991 (+1.9%)tests/solidity/simple/recursion/fibonacci.sol::sixteenth[fib:1][EVMLA MzB3 0.8.37] 249,200 → 253,991 (+1.9%)solidity/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol[run:1][EVMLA M3B3 0.8.37] 165,654 → 166,257 (+0.4%)solidity/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol[run:1][EVMLA MzB3 0.8.37] 167,589 → 167,790 (+0.1%)tests/solidity/simple/algorithm/tree/treap.sol::one[one:1][EVMLA M3B3 0.8.37] 24,047 → 24,238 (+0.8%)- +69 more — see solx-tester-report.xlsx
Foundry — largest size changes:
Bytes32ArraysMock[legacy, deploy] 1,244 → 1,261 B (+1.4%)Bytes32ArraysMock[legacy, runtime] 832 → 849 B (+2.0%)Uint256ArraysMock[legacy, deploy] 2,230 → 2,247 B (+0.8%)Uint256ArraysMock[legacy, runtime] 1,818 → 1,835 B (+0.9%)AddressArraysMock[legacy, deploy] 1,471 → 1,484 B (+0.9%)- +3 more — see foundry-report.xlsx
Compile time — wall-clock tripwire, positive = PR slower (authoritative Δ in the compile-time benchmark comment)
| Suite | legacy (agg / median) |
|---|---|
| Foundry · 26 proj | -0.1% / -0.1% |
| Hardhat · 3 proj | +2.0% / +4.1% |
Within noise — no suite ≥ 5%, no project ≥ 15%.
37e80fa to
fcdbc32
Compare
0415d02 to
c611122
Compare
c611122 to
863c8c1
Compare
Compile-time benchmark (
|
| binary | median | mean ± σ | min … max | vs baseline |
|---|---|---|---|---|
| pr | 0.283 s | 0.286 s ± 0.005 s | 0.282 s … 0.294 s | 0.975× |
| main | 0.291 s | 0.292 s ± 0.006 s | 0.283 s … 0.302 s | 1.000× |
| prerelease | 0.497 s | 0.496 s ± 0.004 s | 0.489 s … 0.501 s | 1.711× |
openzeppelin-contracts-0.34--solx-legacy-dwarf
| binary | median | mean ± σ | min … max | vs baseline |
|---|---|---|---|---|
| pr | 2.198 s | 2.199 s ± 0.005 s | 2.189 s … 2.207 s | 0.997× |
| main | 2.205 s | 2.205 s ± 0.007 s | 2.191 s … 2.216 s | 1.000× |
| prerelease | 3.203 s | 3.201 s ± 0.018 s | 3.175 s … 3.227 s | 1.452× |
uniswap-v4-core-solx--solx-legacy-dwarf
| binary | median | mean ± σ | min … max | vs baseline |
|---|---|---|---|---|
| pr | 0.953 s | 0.954 s ± 0.011 s | 0.943 s … 0.972 s | 0.986× |
| main | 0.967 s | 0.963 s ± 0.012 s | 0.946 s … 0.976 s | 1.000× |
| prerelease | 2.133 s | 2.128 s ± 0.026 s | 2.086 s … 2.162 s | 2.206× |
f9eaa30 to
2e7e3eb
Compare
OpenZeppelin builds a `.yul` source since its commit 598d3905, and the slang compiler cannot compile Yul, so the Foundry pin stops at the commit before it. The Hardhat pin keeps the newer commit, as hardhat-yul compiles that source outside solx. seaport fails on a recursive internal dispatch that is stack too deep, which #715 addresses; it stays disabled until then, with the memory-safety check off for the other stack-too-deep errors it reports.
OpenZeppelin builds a `.yul` source since its commit 598d3905, and the slang compiler cannot compile Yul, so the Foundry pin stops at the commit before it. The Hardhat pin keeps the newer commit, as hardhat-yul compiles that source outside solx. seaport fails on a recursive internal dispatch that is stack too deep, which #715 addresses; it stays disabled until then, with the memory-safety check off for the other stack-too-deep errors it reports.
OpenZeppelin builds a `.yul` source since its commit 598d3905, and the slang compiler cannot compile Yul, so the Foundry pin stops at the commit before it. The Hardhat pin keeps the newer commit, as hardhat-yul compiles that source outside solx. seaport fails on a recursive internal dispatch that is stack too deep, which #715 addresses; it stays disabled until then, with the memory-safety check off for the other stack-too-deep errors it reports.
OpenZeppelin builds a `.yul` source since its commit 598d3905, and the slang compiler cannot compile Yul, so the Foundry pin stops at the commit before it. The Hardhat pin keeps the newer commit, as hardhat-yul compiles that source outside solx. seaport fails on a recursive internal dispatch that is stack too deep, which #715 addresses; it stays disabled until then, with the memory-safety check off for the other stack-too-deep errors it reports.
2e7e3eb to
c6bf6ba
Compare
c6bf6ba to
9e652e9
Compare
Sourcify sweep
Candidate-only failures (35)kinds:
Failures shared with the reference (reference diagnostics) (162)kinds:
|
9e652e9 to
7f92a6e
Compare
7f92a6e to
7b420f7
Compare
ee28012 to
098aad4
Compare
098aad4 to
5ef587c
Compare
nebasuke
left a comment
There was a problem hiding this comment.
Thanks, looks good!
There is one swap-vm failure (test_TWAP_CumulativeSoldTracking_Multiple_Swaps) but this is an upstream test bug. (I'll follow up with a PR so this is more visible in the integration test comment next time.)
A PR run whose main counterpart failed to build was paired for the build comparison, but main's test count was never measured, so the PR's test failures were skipped without appearing anywhere in the summary. #715 hit this: main could not build swap-vm, the PR could, and the one failing swap-vm test showed up in neither the new, pre-existing nor unbaselined counts. Such runs now count as unbaselined, so their failures reach the "No baseline" line and the table's failure cell.
A PR run whose main counterpart failed to build was paired for the build comparison, but main's test count was never measured, so the PR's test failures were skipped without appearing anywhere in the summary. #715 hit this: main could not build swap-vm, the PR could, and the one failing swap-vm test showed up in neither the new, pre-existing nor unbaselined counts. Such runs now count as unbaselined when the PR's tests fail, so their failures reach the "No baseline" line and the table's failure cell. A repaired build whose tests all pass leaves nothing uncompared and stays out of it. The line now says "no `main` baseline", which holds for both an unpaired run and a paired one whose main side never ran its tests.
5ef587c to
d45eb72
Compare
A PR run whose main counterpart failed to build was paired for the build comparison, but main's test count was never measured, so the PR's test failures were skipped without appearing anywhere in the summary. #715 hit this: main could not build swap-vm, the PR could, and the one failing swap-vm test showed up in neither the new, pre-existing nor unbaselined counts. Such runs now count as unbaselined when the PR's tests fail, so their failures reach the "No baseline" line and the table's failure cell. A repaired build whose tests all pass leaves nothing uncompared and stays out of it. The line now says "no `main` baseline", which holds for both an unpaired run and a paired one whose main side never ran its tests.
d45eb72 to
cbafcc5
Compare
…ills The llvm pin is bumped to the version that supports spilling in recursive functions.
The 0.8.34 Sourcify sweep found twelve deployed contracts that solc compiles and solx rejected with a stack-too-deep error in a recursive function. They reduce to four distinct functions, so one deployment per function is kept. Each test keeps the mode that reproduced the rejection and asserts that the standard JSON output holds bytecode and no stack-too-deep message. Co-authored-by: Bas van Gijzel <bas@nomic.foundation>
A dependency can pin an exact pragma, so a project names the installed directories to rewrite; everything else keeps the tracked-only rewrite.
cbafcc5 to
003296e
Compare
OpenZeppelin builds a `.yul` source since its commit 598d3905, and the slang compiler cannot compile Yul, so the Foundry pin stops at the commit before it. The Hardhat pin keeps the newer commit, as hardhat-yul compiles that source outside solx. seaport fails on a recursive internal dispatch that is stack too deep, which #715 addresses; it stays disabled until then, with the memory-safety check off for the other stack-too-deep errors it reports.
NomicFoundation/solx-llvm#150