Skip to content

Enforce updated lower limit of exported memory after grow#755

Merged
gumb0 merged 3 commits intomasterfrom
export-grown-memory
May 20, 2022
Merged

Enforce updated lower limit of exported memory after grow#755
gumb0 merged 3 commits intomasterfrom
export-grown-memory

Conversation

@gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Mar 11, 2021

This fixes the case from WebAssembly/spec#1293 (and depends on it being merged)

  1. Return updated min limit from find_exported_memory
    (Note: this approach will not work if find_exported_memory will be called before executing memory.grow again)
  2. Fail instantiate if min limit is not equal imported memory size.

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #755 (ed9f106) into master (a1dd22d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #755   +/-   ##
=======================================
  Coverage   99.12%   99.12%           
=======================================
  Files          85       85           
  Lines       12978    13010   +32     
=======================================
+ Hits        12864    12896   +32     
  Misses        114      114           
Flag Coverage Δ
rust 99.90% <ø> (ø)
spectests 89.98% <75.00%> (+<0.01%) ⬆️
unittests 98.94% <100.00%> (+<0.01%) ⬆️
unittests-32 99.03% <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/api_test.cpp 100.00% <100.00%> (ø)
test/unittests/instantiate_test.cpp 100.00% <100.00%> (ø)

@gumb0 gumb0 force-pushed the export-grown-memory branch from 7bb4e26 to 21ce9ea Compare March 12, 2021 10:36
@axic
Copy link
Member

axic commented Mar 12, 2021

I think we should not merge this until the spectest is merged.

@gumb0 gumb0 force-pushed the export-grown-memory branch from 21ce9ea to 6932008 Compare March 15, 2021 13:01
@gumb0 gumb0 force-pushed the export-grown-memory branch 2 times, most recently from 8db59ab to cae8c11 Compare March 16, 2021 18:37
@gumb0 gumb0 changed the title Fix lower limit of exported memory after grow Enforce updated lower limit of exported memory after grow Mar 16, 2021
@gumb0 gumb0 changed the base branch from master to imported-limits-check 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 force-pushed the export-grown-memory branch from cae8c11 to b88e33b Compare March 16, 2021 18:41
@gumb0 gumb0 force-pushed the imported-limits-check branch from f8811f9 to b39277a Compare March 17, 2021 12:15
@gumb0 gumb0 force-pushed the imported-limits-check branch from b39277a to 52defb1 Compare March 30, 2021 09:23
Base automatically changed from imported-limits-check to master March 30, 2021 10:07
@gumb0 gumb0 force-pushed the export-grown-memory branch from b88e33b to aebc2ed Compare April 12, 2021 12:43
@gumb0 gumb0 marked this pull request as ready for review April 12, 2021 12:44
@gumb0 gumb0 requested review from axic and chfast April 12, 2021 12:54
@axic
Copy link
Member

axic commented Nov 22, 2021

This was merged last April.

@gumb0
Copy link
Collaborator Author

gumb0 commented Nov 23, 2021

Related spec tests are backported to Fizzy spectests in wasmx/wasm-spec#3

@gumb0 gumb0 force-pushed the export-grown-memory branch from aebc2ed to ed9f106 Compare May 20, 2022 14:15
@gumb0 gumb0 merged commit 7b700be into master May 20, 2022
@gumb0 gumb0 deleted the export-grown-memory branch May 20, 2022 16:08
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