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

Add explicit check for imported limits validity #762

Merged
merged 2 commits into from
Mar 30, 2021
Merged

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Mar 15, 2021

  • This improves error message for the case when import's max is below min: provided imported table doesn't fit provided limits => provided import's min limit is above import's max limit.
  • Also it will allow to simplify imported memory size checks in Enforce updated lower limit of exported memory after grow #755 (to leave only the check memory.size() == min.limit in instantiate).

@gumb0 gumb0 force-pushed the imported-limits-check branch from 7b0609a to 6fd0096 Compare March 15, 2021 15:06
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #762 (52defb1) into master (7e7d3bf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #762   +/-   ##
=======================================
  Coverage   99.25%   99.25%           
=======================================
  Files          77       77           
  Lines       11740    11744    +4     
=======================================
+ Hits        11653    11657    +4     
  Misses         87       87           
Flag Coverage Δ
rust 99.86% <ø> (ø)
spectests 90.54% <50.00%> (-0.04%) ⬇️
unittests 99.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/fizzy/instantiate.cpp 100.00% <100.00%> (ø)
test/unittests/instantiate_test.cpp 100.00% <100.00%> (ø)

@gumb0 gumb0 force-pushed the imported-limits-check branch from 6fd0096 to f34043f Compare March 16, 2021 18:37
@gumb0 gumb0 marked this pull request as ready for review March 16, 2021 18:38
@gumb0 gumb0 force-pushed the imported-limits-check branch from f34043f to f8811f9 Compare March 16, 2021 18:40
@gumb0 gumb0 requested review from axic and chfast March 16, 2021 18:50
@gumb0 gumb0 force-pushed the imported-limits-check branch from f8811f9 to b39277a Compare March 17, 2021 12:15
@gumb0
Copy link
Collaborator Author

gumb0 commented Mar 17, 2021

Split tests into a separate commit to show the error message change.

@gumb0 gumb0 force-pushed the imported-limits-check branch from b39277a to 52defb1 Compare March 30, 2021 09:23
@gumb0 gumb0 merged commit 2f102ae into master Mar 30, 2021
@gumb0 gumb0 deleted the imported-limits-check branch March 30, 2021 10:07
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.

3 participants