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

Binary format: Don't emit empty Memory sections #5145

Merged
merged 3 commits into from
Oct 17, 2022
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 17, 2022

If the only memories are imported, we don't need the section. We were already
doing that for tables, functions, etc.

The binary testcase here is this (in a binary that has no Memory section):

(module
 (type $none_=>_i32 (func (result i32)))
 (import "a" "b" (memory $mimport$0 0))
 (export "test" (func $0))
 (func $0 (result i32)
  (i32.load
   (i32.const 10)
  )
 )
)

Noticed here: paritytech/substrate#12280 (comment)

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