Skip to content

fix(interpreter): return MemoryOOG when memory resize fails - #3864

Merged
rakita merged 1 commit into
bluealloy:mainfrom
cuiweixie:fix/memory-resize-oog
Aug 19, 2026
Merged

rakita merged 1 commit into
bluealloy:mainfrom
cuiweixie:fix/memory-resize-oog

Conversation

@cuiweixie

Copy link
Copy Markdown
Contributor

Summary

  • Honor MemoryTr::resize's bool result in resize_memory_cold.
  • If resize fails (custom memory that cannot grow), halt with MemoryOOG instead of ignoring the failure and risking later out-of-bounds access.

Test plan

  • cargo nextest run -p revm-interpreter
  • cargo clippy --workspace --all-targets --all-features

MemoryTr::resize can fail for custom memory implementations; ignore that result and later accesses can go out of bounds.
@codspeed

codspeed Bot commented Aug 18, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.12%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 4 regressed benchmarks
✅ 213 untouched benchmarks
⏩ 9 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation transact_commit_1000txs 8.6 ms 9.3 ms -6.68%
❌ Simulation transact_1000tx_commit_inner_every_40 7.5 ms 8 ms -5.54%
❌ Simulation SLOAD_50 58.9 µs 61.3 µs -3.91%
❌ Simulation SSTORE_50 76 µs 78.4 µs -3.03%
⚡ Simulation CREATE_50 968.6 µs 932.3 µs +3.89%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing cuiweixie:fix/memory-resize-oog (a6b238c) with main (6ef49c4)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@rakita
rakita merged commit 3660eeb into bluealloy:main Aug 19, 2026
33 of 34 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 19, 2026
RealiCZ added a commit to megaeth-labs/revm that referenced this pull request Sep 18, 2026
…lloy#3746 bluealloy#3802 bluealloy#3864 (#54)

Co-authored-by: Prajjwal Chittori <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Anders Brownworth <[email protected]>
Co-authored-by: Ivan Wang <[email protected]>
Co-authored-by: cui <[email protected]>
@RealiCZ RealiCZ mentioned this pull request Sep 18, 2026
30 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants