Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only grow wasm memory with write ops #3315

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

sug0
Copy link
Contributor

@sug0 sug0 commented May 27, 2024

Describe your changes

Closes #3314

Indicate on which release or other PRs this topic is based on

Based on v0.38.1

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@sug0 sug0 changed the title Tiago/wasmer read only mem Only grow wasm memory with write ops May 27, 2024
Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 54.07%. Comparing base (883bd0f) to head (e265807).

Files Patch % Lines
crates/namada/src/vm/wasm/memory.rs 95.00% 2 Missing ⚠️
crates/namada/src/vm/wasm/run.rs 96.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3315      +/-   ##
==========================================
+ Coverage   54.05%   54.07%   +0.01%     
==========================================
  Files         315      315              
  Lines      106296   106344      +48     
==========================================
+ Hits        57461    57505      +44     
- Misses      48835    48839       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sug0
Copy link
Contributor Author

sug0 commented May 28, 2024

#3308 (comment)
scrapped, too complex to write without using refcells or smth. might as well keep passing &mut refs to a store, which is never accessed mutably anyway

This was referenced May 28, 2024
@brentstone brentstone mentioned this pull request May 31, 2024
@sug0 sug0 force-pushed the tiago/wasmer-read-only-mem branch from 44cb3d0 to 76628c5 Compare June 2, 2024 09:28
@sug0 sug0 marked this pull request as ready for review June 2, 2024 09:30
Fraccaman added a commit that referenced this pull request Jun 3, 2024
* up/tiago/wasmer-read-only-mem:
  Changelog for #3315
  Test that RO wasm memory cannot grow
  Avoid growing wasm memory when performing reads
brentstone added a commit that referenced this pull request Jun 5, 2024
* origin/tiago/wasmer-read-only-mem:
  Changelog for #3315
  Test that RO wasm memory cannot grow
  Avoid growing wasm memory when performing reads
@brentstone brentstone merged commit 544319b into main Jun 6, 2024
18 of 19 checks passed
@brentstone brentstone deleted the tiago/wasmer-read-only-mem branch June 6, 2024 07:53
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.

Avoid growing wasm memory when performing out-of-bounds reads
5 participants