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

Fix wasm memory #1467

Merged
merged 4 commits into from
Jan 12, 2023
Merged

Fix wasm memory #1467

merged 4 commits into from
Jan 12, 2023

Conversation

turuslan
Copy link
Contributor

Referenced issues

Description of the Change

  • binaryen: allocate multiple of page size
  • wavm: fix wrong page size
  • wasm allocator: use size getter to avoid inconsistency
  • wasm init: allocate memory for all data segments

Benefits

  • Fix binaryen hash mismatch

Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested review from kamilsa and Harrm January 11, 2023 10:33
@turuslan turuslan requested a review from igor-egorov January 12, 2023 09:21
@@ -21,6 +21,8 @@ OUTCOME_CPP_DEFINE_CATEGORY(kagome::runtime,
return "Failed to obtain the required block from storage";
case E::ABSENT_HEAP_BASE:
return "Failed to extract heap base from a module";
case E::HEAP_BASE_TOO_LOW:
return "Heap base too low";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite unclear from this error message what it is too low for.

@turuslan turuslan merged commit c327d36 into master Jan 12, 2023
@turuslan turuslan deleted the fix/wasm-memory branch January 12, 2023 10:39
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.

4 participants